Page 4 of 5

Re: Game definition jsons - Effect definition json

Posted: Wed Dec 02, 2020 5:51 pm
by Stratego (dev)
CHG_POWER_BY_ABILITY_ADD, // (dont use on stickers!*) in case of property changer effect: add the effect (the changing numerical values) the abilityPower of caster unit (use positive value!)
"environmentalDef":{"density":1, "range":1}, -----------------------------------------------------------// sets the range and density to use for area effect (usable on SYSTEM_SPECIAL_EFFECT_ENVIRONMENTAL/SYSTEM_SPECIAL_EFFECT_TARGET_AND_AREA), density: dont use on stickers!*
* dont use on stickers!*: means dont use this setting on an ability that casts effect to units that "sticks" and should be removed by disenchant, or vanishes in time and so on. (reason: on effect removal unit will not return to its original values) - so buggy

Re: Game definition jsons - Effect definition json

Posted: Sat Dec 26, 2020 6:06 pm
by Stratego (dev)
new option:
NO_AUTOCAST, // this effect must be casted manually by player, must not be casted automatically by playerAI as instinct-action.

(reason: money courier automatically casted the pay to production, and i player might him to do it elsewhere - so money courier in AOS will get this flag)

Re: Game definition jsons - Effect definition json

Posted: Thu Apr 01, 2021 3:15 pm
by Stratego (dev)
new optiopn:

"trnDecorSpellcastSpriteID":"SOME_SPRITE_ID" ----------------------------------------you can reference a sprite in graphics.json to show when the unit casts the spell, it is shown during spellcast and fades out in (on texture defined) amount of sec after spellcast.

Re: Game definition jsons - Effect definition json

Posted: Fri Apr 02, 2021 9:13 am
by Maxbirykov2004
Stratego (dev) wrote: Thu Apr 01, 2021 3:15 pm new optiopn:

"trnDecorSpellcastSpriteID":"SOME_SPRITE_ID" ----------------------------------------you can reference a sprite in graphics.json to show when the unit casts the spell, it is shown during spellcast and fades out in (on texture defined) amount of sec after spellcast.
How we can use this option?

Re: Game definition jsons - Effect definition json

Posted: Sat Apr 03, 2021 7:03 am
by Midonik
You use it when only one of a unit's spells is meant to trigger the sprite at cast.

Re: Game definition jsons - Effect definition json

Posted: Mon Apr 26, 2021 12:46 pm
by Stratego (dev)
new spec:

Code: Select all

IS_EFFECT_RANGE_IS_RANGE_ATTACK, // uses unit.rangeAttack in the effect instead of ability range (IS_EFFECT_RANGE_ABSOLUTE also usable with it)

Re: Game definition jsons - Effect definition json

Posted: Tue Apr 27, 2021 2:10 pm
by Stratego (dev)
new speccosst option:
SACRIFICE_UNIT_COST_SUM, //will select the units by their cost - the required amount of turncost is in specCostNr

Re: Game definition jsons - Effect definition json

Posted: Tue Apr 27, 2021 2:15 pm
by makazuwr32
@Savra
I think with this we can rebalance a bit dragon summoning of orcs (and later of undeads).

Re: Game definition jsons - Effect definition json

Posted: Tue Apr 27, 2021 4:22 pm
by L4cus
Stratego (dev) wrote: Mon Apr 26, 2021 12:46 pm new spec:

Code: Select all

IS_EFFECT_RANGE_IS_RANGE_ATTACK, // uses unit.rangeAttack in the effect instead of ability range (IS_EFFECT_RANGE_ABSOLUTE also usable with it)
looks pretty usefull for me thanks

Re: Game definition jsons - Effect definition json

Posted: Wed Apr 28, 2021 8:46 pm
by Maxbirykov2004
L4cus wrote: Tue Apr 27, 2021 4:22 pm
Stratego (dev) wrote: Mon Apr 26, 2021 12:46 pm new spec:

Code: Select all

IS_EFFECT_RANGE_IS_RANGE_ATTACK, // uses unit.rangeAttack in the effect instead of ability range (IS_EFFECT_RANGE_ABSOLUTE also usable with it)
looks pretty usefull for me thanks
Thats right

Re: Game definition jsons - Effect definition json

Posted: Wed Dec 01, 2021 6:38 pm
by Stratego (dev)
comment change:

CHG_POWER_BY_ABILITY_MULTIPLY, // (beware on stickers** see on end) in case of property changer effect: multiply the effect (the changing numerical values) with abilityPower of caster unit (use positive value!) - **If this spec is used on any sticker effect in chain of related effects - every other sticker related effect have to have it too
CHG_POWER_BY_ATTACK_MULTIPLY, // (beware on stickers** see on end) in case of property changer effect: multiply the effect (the changing numerical values) with attackPower of caster unit - **If this spec is used on any sticker effect in chain of related effects - every other sticker related effect have to have it too

Re: Game definition jsons - Effect definition json

Posted: Thu Dec 02, 2021 10:10 am
by Stratego (dev)
Deprecated ones:
"isOneTimeSpell":false,---------------------------------------------------------------If canster can cast it on only once in his lifetime
//depracated: was not ever implemented, and you can use big cooldown instead (but not insane big please)

Re: Game definition jsons - Effect definition json

Posted: Thu Dec 02, 2021 10:24 am
by makazuwr32
Stratego (dev) wrote: Thu Dec 02, 2021 10:10 am Deprecated ones:
"isOneTimeSpell":false,---------------------------------------------------------------If canster can cast it on only once in his lifetime
//depracated: was not ever implemented, and you can use big cooldown instead (but not insane big please)
Why so?
When cooldown change (increase or decrease) will be properly implemented in aof it might also reduce cd of such abilities which must not be affected by it so this variant might be actually better.

Re: Game definition jsons - Effect definition json

Posted: Thu Dec 02, 2021 10:39 am
by Stratego (dev)
makazuwr32 wrote: Thu Dec 02, 2021 10:24 am
Stratego (dev) wrote: Thu Dec 02, 2021 10:10 am Deprecated ones:
"isOneTimeSpell":false,---------------------------------------------------------------If canster can cast it on only once in his lifetime
//depracated: was not ever implemented, and you can use big cooldown instead (but not insane big please)
Why so?
When cooldown change (increase or decrease) will be properly implemented in aof it might also reduce cd of such abilities which must not be affected by it so this variant might be actually better.
would be but we do not have it (was never implemented) and would need to make a new storage for already used effects or sometihng.
that i would not make in android version.
(eg. currently i have literally a 12 point list that i need to double implement in Unity version, these many changes were in recent weeks that i need to double code in unity verison - as all realted code is there too, and bad news: i can not do it instantly in unity version as in most cases i make fixes on these changes so i always have to wait a few weeks before puttin into unity version - when it seems working)

Re: Game definition jsons - Effect definition json

Posted: Thu Dec 02, 2021 10:42 am
by makazuwr32
I am not saying to implement in android and than reimplement in unity.

Just please add this to implement properly in unity version.

Re: Game definition jsons - Effect definition json

Posted: Thu Dec 02, 2021 11:45 am
by Stratego (dev)
it was never implemented.
consider it as never existed property.

if you want such you can ask it when unity version is ready - in about 2023 :) when unity version will be :)

Re: Game definition jsons - Effect definition json

Posted: Thu Dec 02, 2021 11:57 am
by makazuwr32
Well anyway most of other effects we need will be implemented also properly only in unity version so magic update probably will be delayed as well to unity version as well.
For example ability cooldown change.

Re: Game definition jsons - Effect definition json

Posted: Fri Jan 21, 2022 9:06 am
by Stratego (dev)
new spec:

Code: Select all

ENV_AFFECT_EACH_TILE, //if set then targeting a mega unit (multi tiled) will affect all tiles of the unit (if in range) not only once on the mega building.

Re: Game definition jsons - Effect definition json

Posted: Fri Jan 21, 2022 2:05 pm
by b2198
Stratego (dev) wrote: Fri Jan 21, 2022 9:06 am new spec:

Code: Select all

ENV_AFFECT_EACH_TILE, //if set then targeting a mega unit (multi tiled) will affect all tiles of the unit (if in range) not only once on the mega building.
:O great one there.

Re: Game definition jsons - Effect definition json

Posted: Mon May 09, 2022 5:58 am
by Stratego (dev)
added a short descrition on triggers

effectTriggers:
possible events:
- ON_DAMAGED, "single" type : when unit (having this active effect) gets damaged
- ON_DAMAGES, "single" type : when unit (having this active effect) deals damage
- ON_DIED, "single" type : it can be a simple prop changer effect, or a related effect to it that is to be launched
- ON_KILL_ENEMY, "single" type : when unit (having this active effect) kills an enemy
- ON_DAMAGED_AMOUNT, "multiplied" type: triggers same time as ON_DAMAGED
- ON_DAMAGES_AMOUNT "multiplied" type: triggers same time as ON_DAMAGES
"single" type: means the effect will run once and with x * 1 multiplier on eg. prochanger case.
"multiplied" type: means the effect will run as many times as the damage amount (so with =x * damage_amount) multiplier on eg. prochanger case (adds that many hp that many damage it dealt)

Re: Game definition jsons - Effect definition json

Posted: Thu May 12, 2022 10:23 pm
by Stratego (dev)
some descrition aabout triggered effects


Triggered effects
About triggered effects you can make triggers "when" the effect should be executed (eg. if unit kills another unit)
A little complex the implementation (read: shit) but here is a help on it
2 ways you can define such effects
1. SIMPLE case: you define a TRIGGERED_EFFECT in an effect json (on unit kills an enemy, like Veteraning), and inside that single json you set a trnActionUnitID value (that will change the unit properties, eg. on veteraning some extra power)
2. COMPLEX case:
- you define a TRIGGERED_EFFECT json where you define NO trnActionUnitID! but you define a trnEffectDefIDRelated to a new effect
- you define the second trigger that is doing the job
- this case you can also set chancePercent to have probability on success
(remark: i suggest naming the TRIGGERED_EFFECT type json files to start with "trigger_" )

Re: Game definition jsons - Effect definition json

Posted: Tue May 24, 2022 6:59 am
by Stratego (dev)
Extra Description about targeting, also i have fixed in code that Auras are now also checked for "valid targets" relations (they were not checked before)

possible target types:
HIMSELF,
FRIENDLY,
FRIENDLY_BUT_NOT_ME,
ENEMY,
ENEMY_OR_FRIENDLY,
ENEMY_OR_FRIENDLY_BUT_NOT_ME,
Apart from these you can "target" units by setting a "trnActionUnitID" and that will filter out the possible "validTargerts" set in that reference
eg:

Code: Select all

"trnActionUnitID":"EFFECT_NON_STRUCTURE",
note: it is not checked in these cases
- EFFECT_SPELL type: here the placed effect checeked instead
- Transform (as the target unit type can be set in this attribute)
- Summon (as the target unit type can be set in this attribute)
but it is checked on other cases.

Re: Game definition jsons - Effect definition json

Posted: Tue Jul 12, 2022 9:01 am
by Stratego (dev)
new spec, not for ability buttons!:

SYSTEM_SPECIAL_EFFECT_TRANSFORM2 = 124; //secondary transfom, dont use for abilities, executes transform definition, target unit id can ONLY be set on the "carrier" unit of this effect (use for eg. turn unit to this zombie unit)

Re: Game definition jsons - Effect definition json

Posted: Tue Nov 01, 2022 10:20 am
by Stratego (dev)
new option:
NO_AI_CAST, // this effect must not be casted by AI (maybe makes harm as not properly implemented the usage)

Re: Game definition jsons - Effect definition json

Posted: Tue Nov 01, 2022 6:37 pm
by makazuwr32
Stratego (dev) wrote: Tue Nov 01, 2022 10:20 am new option:
NO_AI_CAST, // this effect must not be casted by AI (maybe makes harm as not properly implemented the usage)
May i ask several extra options similar to this one for ai?

1. AI_CAST_FIRST — this effect must be casted before ai moves unit or attacks if possible, can try to cast this effect once again after movement before attack and one more time after attack;
2. AI_MOVE_THAN_CAST — this effect must be casted only after ai moves unit, not before, if possible, but before attack. Can have a second try to be used after attack.
3. AI_CAST_LAST — effect must be used after ai moved unit and attacked with him (or is unable to attack during this turn — no possible targets).

Examples of effects for which 1st option will be perfect:
Any debuffs in aof, ranged damaging spells, some self healing abilities, cavalry charge abilities.

Examples of effects for which 2nd option will be perfect:
Blade whirl various abilties which damage units around, some transformation abilities.

Examples of effects for which 3rd option will be perfect:
Various aimed shot abilities, load explosive round for cannons and some other.

Re: Game definition jsons - Effect definition json

Posted: Wed Nov 02, 2022 5:23 pm
by Endru1241
makazuwr32 wrote: Tue Nov 01, 2022 6:37 pm
Stratego (dev) wrote: Tue Nov 01, 2022 10:20 am new option:
NO_AI_CAST, // this effect must not be casted by AI (maybe makes harm as not properly implemented the usage)
May i ask several extra options similar to this one for ai?

1. AI_CAST_FIRST — this effect must be casted before ai moves unit or attacks if possible, can try to cast this effect once again after movement before attack and one more time after attack;
2. AI_MOVE_THAN_CAST — this effect must be casted only after ai moves unit, not before, if possible, but before attack. Can have a second try to be used after attack.
3. AI_CAST_LAST — effect must be used after ai moved unit and attacked with him (or is unable to attack during this turn — no possible targets).

Examples of effects for which 1st option will be perfect:
Any debuffs in aof, ranged damaging spells, some self healing abilities, cavalry charge abilities.

Examples of effects for which 2nd option will be perfect:
Blade whirl various abilties which damage units around, some transformation abilities.

Examples of effects for which 3rd option will be perfect:
Various aimed shot abilities, load explosive round for cannons and some other.
Sounds good - would be useful.
Mentioning autocasting however - did something significant change, so that the same non-stacking effect is cast on the same unit again (instead of another adjacent unit not having this effect yet) or was it like that all the time?

Re: Game definition jsons - Effect definition json

Posted: Wed Nov 02, 2022 5:46 pm
by godOfKings
I can already see first case for winged hussar

Re: Game definition jsons - Effect definition json

Posted: Wed Jul 26, 2023 3:19 pm
by Stratego (dev)
new attribute (green was already in)
String[] trnAffectedEffectDefs;-------------------------------------------------------------------------- //the list of effect IDs that can be target of the given effects (eg. SYSTEM_SPECIAL_EFFECT_LASTS_TURN_MODIFIER effect)
ArrayList<String> affectedEffectGroups; ---------------------------------------------------------------//if set than all effect marked with these groups are affected

Re: Game definition jsons - Effect definition json

Posted: Thu Jul 27, 2023 11:03 am
by Stratego (dev)
new spec

Code: Select all

        CAN_BE_COUNTER_ATTACKED,        // set if this effect can be counterattacked (like normal attacks), eg bombing ability in AOW

Re: Game definition jsons - Effect definition json

Posted: Tue Sep 12, 2023 9:16 am
by Stratego (dev)
new spec:

Code: Select all

UNIQUE_WITHIN_GROUP,            // If set it enables checking this: In its group only one can be "sticked" on a unit at the same time (all such effects needs this), do not set on Aura effects, only normal unit targeted sticky spells