Game definition jsons - Effect definition json

Learn the .json format
used to define characteristics of units and other game elements
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Game definition jsons - Effect definition json

Post 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
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Game definition jsons - Effect definition json

Post 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)
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Game definition jsons - Effect definition json

Post 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.
User avatar
Maxbirykov2004
Posts: 1022
Joined: Mon Mar 30, 2020 12:50 pm
Location: Belarus

Re: Game definition jsons - Effect definition json

Post 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?
Midonik
Posts: 5325
Joined: Mon Sep 05, 2016 5:27 pm
Location: Poland

Re: Game definition jsons - Effect definition json

Post by Midonik »

You use it when only one of a unit's spells is meant to trigger the sprite at cast.
Support new AoS variant, Age of Galaxy: http://ageofstrategy.net/viewforum.php? ... 608408ebc8
All help will be welcome.
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Game definition jsons - Effect definition json

Post 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)
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Game definition jsons - Effect definition json

Post 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
User avatar
makazuwr32
Posts: 7830
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Game definition jsons - Effect definition json

Post by makazuwr32 »

@Savra
I think with this we can rebalance a bit dragon summoning of orcs (and later of undeads).
makazuwr32 wrote: Mon Sep 16, 2019 7:54 amWhen you ask to change something argument why...
Put some numbers, compare to what other races have and so on...
© by Makazuwr32™.
AoF Dev Co-Leader
Image
User avatar
L4cus
Posts: 2358
Joined: Fri Jan 31, 2020 7:51 pm
Location: Perú

Re: Game definition jsons - Effect definition json

Post 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
Extra ecclesiam nulla salus...
AOD, a new variant...
viewforum.php?f=230
User avatar
Maxbirykov2004
Posts: 1022
Joined: Mon Mar 30, 2020 12:50 pm
Location: Belarus

Re: Game definition jsons - Effect definition json

Post 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
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Game definition jsons - Effect definition json

Post 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
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Game definition jsons - Effect definition json

Post 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)
User avatar
makazuwr32
Posts: 7830
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Game definition jsons - Effect definition json

Post 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.
makazuwr32 wrote: Mon Sep 16, 2019 7:54 amWhen you ask to change something argument why...
Put some numbers, compare to what other races have and so on...
© by Makazuwr32™.
AoF Dev Co-Leader
Image
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Game definition jsons - Effect definition json

Post 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)
User avatar
makazuwr32
Posts: 7830
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Game definition jsons - Effect definition json

Post 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.
makazuwr32 wrote: Mon Sep 16, 2019 7:54 amWhen you ask to change something argument why...
Put some numbers, compare to what other races have and so on...
© by Makazuwr32™.
AoF Dev Co-Leader
Image
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Game definition jsons - Effect definition json

Post 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 :)
User avatar
makazuwr32
Posts: 7830
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Game definition jsons - Effect definition json

Post 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.
makazuwr32 wrote: Mon Sep 16, 2019 7:54 amWhen you ask to change something argument why...
Put some numbers, compare to what other races have and so on...
© by Makazuwr32™.
AoF Dev Co-Leader
Image
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Game definition jsons - Effect definition json

Post 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.
User avatar
b2198
Posts: 798
Joined: Mon Aug 30, 2021 5:48 pm
Location: Brazil

Re: Game definition jsons - Effect definition json

Post 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.
Green is the correct color, other colors are "less correct".
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Game definition jsons - Effect definition json

Post 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)
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Game definition jsons - Effect definition json

Post 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_" )
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Game definition jsons - Effect definition json

Post 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.
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Game definition jsons - Effect definition json

Post 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)
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Game definition jsons - Effect definition json

Post 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)
User avatar
makazuwr32
Posts: 7830
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Game definition jsons - Effect definition json

Post 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.
makazuwr32 wrote: Mon Sep 16, 2019 7:54 amWhen you ask to change something argument why...
Put some numbers, compare to what other races have and so on...
© by Makazuwr32™.
AoF Dev Co-Leader
Image
User avatar
Endru1241
Posts: 2717
Joined: Fri Sep 11, 2015 8:43 am
Location: Poland

Re: Game definition jsons - Effect definition json

Post 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?
Age of Strategy design leader
User avatar
godOfKings
Posts: 3302
Joined: Fri Sep 22, 2017 4:50 pm

Re: Game definition jsons - Effect definition json

Post by godOfKings »

I can already see first case for winged hussar
There is no place for false kings here, only those who proves themselves to b the true kings of legend, or serves under me

For I watch over this world looking for those worthy to become kings, and on the way get rid of the fakes and rule over the fools
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Game definition jsons - Effect definition json

Post 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
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Game definition jsons - Effect definition json

Post 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
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Game definition jsons - Effect definition json

Post 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
Post Reply

Return to “Game Definition .JSON”