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: 14165
Joined: Fri Apr 25, 2014 9:28 pm

Re: Game definition jsons - Effect definition json

Post by Stratego (dev) » Wed Dec 02, 2020 5:51 pm

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: 14165
Joined: Fri Apr 25, 2014 9:28 pm

Re: Game definition jsons - Effect definition json

Post by Stratego (dev) » Sat Dec 26, 2020 6:06 pm

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: 14165
Joined: Fri Apr 25, 2014 9:28 pm

Re: Game definition jsons - Effect definition json

Post by Stratego (dev) » 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.

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 » Fri Apr 02, 2021 9:13 am

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: 4980
Joined: Mon Sep 05, 2016 5:27 pm
Location: Poland

Re: Game definition jsons - Effect definition json

Post by Midonik » Sat Apr 03, 2021 7:03 am

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: 14165
Joined: Fri Apr 25, 2014 9:28 pm

Re: Game definition jsons - Effect definition json

Post by Stratego (dev) » 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)

Stratego (dev)
Site Admin
Posts: 14165
Joined: Fri Apr 25, 2014 9:28 pm

Re: Game definition jsons - Effect definition json

Post by Stratego (dev) » Tue Apr 27, 2021 2:10 pm

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: 7523
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Game definition jsons - Effect definition json

Post by makazuwr32 » Tue Apr 27, 2021 2:15 pm

@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 am
When 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

User avatar
L4cus
Posts: 2347
Joined: Fri Jan 31, 2020 7:51 pm
Location: Perú

Re: Game definition jsons - Effect definition json

Post by L4cus » 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
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 » Wed Apr 28, 2021 8:46 pm

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: 14165
Joined: Fri Apr 25, 2014 9:28 pm

Re: Game definition jsons - Effect definition json

Post by Stratego (dev) » Wed Dec 01, 2021 6:38 pm

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: 14165
Joined: Fri Apr 25, 2014 9:28 pm

Re: Game definition jsons - Effect definition json

Post by Stratego (dev) » 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)

User avatar
makazuwr32
Posts: 7523
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Game definition jsons - Effect definition json

Post by makazuwr32 » 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.
makazuwr32 wrote:
Mon Sep 16, 2019 7:54 am
When 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

Stratego (dev)
Site Admin
Posts: 14165
Joined: Fri Apr 25, 2014 9:28 pm

Re: Game definition jsons - Effect definition json

Post by Stratego (dev) » Thu Dec 02, 2021 10:39 am

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: 7523
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Game definition jsons - Effect definition json

Post by makazuwr32 » Thu Dec 02, 2021 10:42 am

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 am
When 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

Stratego (dev)
Site Admin
Posts: 14165
Joined: Fri Apr 25, 2014 9:28 pm

Re: Game definition jsons - Effect definition json

Post by Stratego (dev) » Thu Dec 02, 2021 11:45 am

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: 7523
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Game definition jsons - Effect definition json

Post by makazuwr32 » Thu Dec 02, 2021 11:57 am

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 am
When 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

Stratego (dev)
Site Admin
Posts: 14165
Joined: Fri Apr 25, 2014 9:28 pm

Re: Game definition jsons - Effect definition json

Post by Stratego (dev) » 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.

User avatar
b2198
Posts: 469
Joined: Mon Aug 30, 2021 5:48 pm
Location: Brazil

Re: Game definition jsons - Effect definition json

Post by b2198 » Fri Jan 21, 2022 2:05 pm

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: 14165
Joined: Fri Apr 25, 2014 9:28 pm

Re: Game definition jsons - Effect definition json

Post by Stratego (dev) » Mon May 09, 2022 5:58 am

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: 14165
Joined: Fri Apr 25, 2014 9:28 pm

Re: Game definition jsons - Effect definition json

Post by Stratego (dev) » Thu May 12, 2022 10:23 pm

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_" )

Post Reply

Return to “Game Definition .JSON”