Game definition jsons - Effect definition json

Learn the .json format
used to define characteristics of units and other game elements
User avatar
Dagravian
Posts: 938
Joined: Tue Sep 06, 2016 6:20 am
Location: Terra - Brasil

Re: Game definition jsons - Effect definition json

Post by Dagravian »

Ok it is here:

https://www.androidutils.com/forum/view ... 53f94d96f7

If you have any questions, you can leave there and i will answer later... (currently is +3AM, i made the post while the idea was fresh, but i need to sleep 😅)
Stay Awesome!
(ノಠ益ಠ)ノ彡┻━┻
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 opions under the specs part

Code: Select all

        RESISTED_BY_DODGE_MELEE,  // probability is calculated as dodge melee is calculated
        RESISTED_BY_DODGE_RANGED, // probability is calculated as dodge ranged is calculated
        RESISTED_BY_HP,           // probability is calculated based on DEFINE_UNIT_BIG_HP_VALUE and unit hp
        RESISTED_BY_POWER,        // probability is calculated based on DEFINE_UNIT_BIG_POWER_VALUE and unit hp
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 »

There is no list of "effectTriggers", that's set when "effectBehaviour":"TRIGGERED_EFFECT".
That would be helpful.

Applicable effects ids put in "trnSystemSpecialEffectID" could also help.
Age of Strategy design leader
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) »

updated:
"effectTriggers":["ON_DAMAGED"], ----------------------------------------------------------------------- what event triggers the effect: ON_DAMAGED, ON_DAMAGED_AMOUNT, ON_DIED, ON_KILL_ENEMY, ON_DAMAGES, ON_DAMAGES_AMOUNT



system special effects are under "system special effects"
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) »

IS_TERRAIN_SOURCE, // this effect is from a terrain affection (like in woods foot units can have +1 defense)

(first steps of making terrain put some effect on units)
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) »

i made a little differntly - so IS_TERRAIN_SOURCE is removed.
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 feature:

"chancePercent":1.0,----------------------------------------------------------------chance of casting the spell, here use 1=100% if you want to be always
// Also on WEAPON_SLOT_1,WEAPON_EFFECT_SLOT_HEAL the probability to take effect on targeted/damaged unit (eg. is weapon fire effect sticks on enemy or not)
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 kind of effects:
public static final int SYSTEM_SPECIAL_EFFECT_RELOCATE = 118; // used to "teleport" the caster unit to the target location, target is read by the green environmental floating action.
public static final int SYSTEM_SPECIAL_EFFECT_REVEAL = 119; // used to reveal a spot on target location, target is read by the green environmental floating action.
User avatar
Alexander82
Posts: 7969
Joined: Thu Feb 26, 2015 8:18 pm

Re: Game definition jsons - Effect definition json

Post by Alexander82 »

You are great!
Age of Fantasy design leader
User avatar
Alexander82
Posts: 7969
Joined: Thu Feb 26, 2015 8:18 pm

Re: Game definition jsons - Effect definition json

Post by Alexander82 »

Stratego (dev) wrote: Sun Jan 19, 2020 10:53 pm new kind of effects:
public static final int SYSTEM_SPECIAL_EFFECT_RELOCATE = 118; // used to "teleport" the caster unit to the target location, target is read by the green environmental floating action.
public static final int SYSTEM_SPECIAL_EFFECT_REVEAL = 119; // used to reveal a spot on target location, target is read by the green environmental floating action.
btw can the caster also teleport others?
Age of Fantasy design leader
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) »

no, he can not.
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) »

also never forget that the AI will not use these ever.
(until i implement it)
User avatar
Alexander82
Posts: 7969
Joined: Thu Feb 26, 2015 8:18 pm

Re: Game definition jsons - Effect definition json

Post by Alexander82 »

Ok, thanks!
Age of Fantasy design leader
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 effect special settings:
IS_TERRAIN_SOURCE, // this effect is from a terrain affection (like in woods foot units can have +1 defense)
WEARS_OFF_AFTER_MOVE, // the effect (if on unit as a enchantment) will wears off after unit moves
WEARS_OFF_AFTER_ATTACK, // the effect (if on unit as a enchantment) will wears off after unit attacs
WEARS_OFF_AFTER_ABILITY_USE, // the effect (if on unit as a enchantment) will wears off after unit uses spell or ability
Jasondunkel
Posts: 553
Joined: Wed Oct 16, 2019 2:52 pm

Re: Game definition jsons - Effect definition json

Post by Jasondunkel »

Sounds good and very intresting
User avatar
Alexander82
Posts: 7969
Joined: Thu Feb 26, 2015 8:18 pm

Re: Game definition jsons - Effect definition json

Post by Alexander82 »

Stratego (dev) wrote: Fri Jan 24, 2020 2:33 pm new effect special settings:
IS_TERRAIN_SOURCE, // this effect is from a terrain affection (like in woods foot units can have +1 defense)
WEARS_OFF_AFTER_MOVE, // the effect (if on unit as a enchantment) will wears off after unit moves
WEARS_OFF_AFTER_ATTACK, // the effect (if on unit as a enchantment) will wears off after unit attacs
WEARS_OFF_AFTER_ABILITY_USE, // the effect (if on unit as a enchantment) will wears off after unit uses spell or ability
Thanks! You've bben really fast!
Hiding spells coming!
Age of Fantasy design leader
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:
"groups":["GROUP1", "GROUP2"], -------------------------------------------------- the group(s) of this effect (used in eg. removesEffectGroups), you can configure any string value here
"removesEffectGroups":["GROUP1", "GROUP2"], ----------------------------------- list of effect groups that effects will be removed when this effect applied, combines with removesBuffs! "NONE" considered as "ALL"

changed:
"removesBuffs":"ENEMYSPELLS", --------------------------------------------------- removes buffs debuffs or all (eg. poison/slowing etc) ENEMYSPELLS/ALL/NONE Beware! removesEffectGroups relies on this!
User avatar
Alexander82
Posts: 7969
Joined: Thu Feb 26, 2015 8:18 pm

Re: Game definition jsons - Effect definition json

Post by Alexander82 »

Grat job!
Age of Fantasy design leader
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 option:
IS_EFFECT_RANGE_ABSOLUTE, // if set than effect has absolute range - independent from caster spell range.
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) »

2 new Spec:

CAN_TARGET_TC_FIRST, // if set: the spell can target the tc if the first unit is targetable, only that unit will receive the effect
CAN_TARGET_TC_FIRST_TARGETABLE, // if set: the spell can target the tc any of units is targetable, but only first of them will get the effect
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 effect type

public static final int SYSTEM_SPECIAL_EFFECT_PROD_SPEEDUP = 120; // production speedup works exactly like the PROD_SPEEDUP specunitaction, will instantly decrease turnsleft (by dataInt value) in production (self sacrifice should be coded in json)
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 propert to set:
trnEffectDefIDOnFail = "EFFECTNAME"; -------------------------------------------------------- used when the effect casting falied, this effect will be attached to target (if it was a targeted spell)

usage: eg. you can put "fear" on target even if you missed to shoot it down.
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 flags:

AMOUNT_BY_ABILITY, // in case of non prop.changer effects (eg. multiple enchantments to put): use the effect that many times as the abilityPower of caster unit (use positive integer value!)
CHG_POWER_BY_ABILITY_MULTIPLY, // in case of property changer effect: multiply the effect (the changing numerical values) with abilityPower of caster unit (use positive value!)
CHG_POWER_BY_ABILITY_ADD, // in case of property changer effect: add the effect (the changing numerical values) the abilityPower of caster unit (use positive value!)
CHG_POWER_BY_ATTACK_MULTIPLY, // in case of property changer effect: multiply the effect (the changing numerical values) with attackPower of caster 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 spec setting:
HIDE_BUTTON_IF_NO_SPEC_COST_AVAILABLE, //if set the button will not appear when the spec cost is not available (like riding an unicorn will available if unicorn nearby)
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 operation:
public static final int SYSTEM_SPECIAL_EFFECT_COOLDOWN_MODIFIER = 121; // dataInt must be filled!, a spell that will modify the cooldown of one or more running effects (defined in trnAffectedEffectDefs) on target unit having cooldown
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) »

This 2 new things makes able to make units that can change the decoration! (only on nonTMX maps! - on TMX maps it will throw a message to player that this feature can not be used there)

make a unit that can build or summon another DECORATIONplacer unit,
set to die right on spawning (use the below flag)
and another effect to place decoration with below spec and also the flag to make it immediate.

in AOS will be example unit soon.

SYSTEM_SPECIAL_EFFECT_TERRAIN_DECORATION_SET = 122; // dataInt must be filled!, dataInt is the DECORATION terrain ID to be placed on the effect execution tile (under the unit, or on target tile) - if 0 than clears the decoration only

IS_COUNTDOWN_ON_SPAWN, // if set AND it has counter set (lastsNr), eg SUSPEND or VANISHING kind, than the counter will start the first count right on unit spawning
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 »

is there any way to make an effect/spells useless if the unit is transformed? for example i have a siege machine with a spell but it can only use it if it is unpacked...
Extra ecclesiam nulla salus...
AOD, a new variant...
viewforum.php?f=230
Midonik
Posts: 5325
Joined: Mon Sep 05, 2016 5:27 pm
Location: Poland

Re: Game definition jsons - Effect definition json

Post by Midonik »

Excuse me sir.
When the unit transforms, it is overwritten by a different unit (usually keeping the hp and effects on it) from the second JSON you made. So if you want it to not use a spell, all you have to do is remove said spell from the transformed form. Then it won't be able to use it in the second form, however if you transform it back (assuming you gave it such ability) it will have the spell back, the same way it has the stats, special actions any other properties.
Support new AoS variant, Age of Galaxy: http://ageofstrategy.net/viewforum.php? ... 608408ebc8
All help will be welcome.
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 »

Will the coldown be affected by transformation?
For example, it has a 4 turns coldown spell, so it could transform twice so the coldown is rebooted
Extra ecclesiam nulla salus...
AOD, a new variant...
viewforum.php?f=230
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) »

i am afraid yes- good point :)
Post Reply

Return to “Game Definition .JSON”