Game definition jsons - Effect definition json

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

Game definition jsons - Effect definition json

Post by Stratego (dev) » Sun Dec 18, 2016 8:02 am

Here is how to create effect definitions (that can be used in "spell" or ability section of a unit json)

effect behaviours:
INSTANT, //SPELL immediate and permanent kind and no long lasting effects
ENCHANTMENT, //EFFECT long lasting modifier, but activates only on the first turn, when removed the modifications are undoed (need to save or something), should not be special ability like convert
ENCHANTMENT_VANISHING, //EFFECT long lasting modifier, but activates only on the first turn, when wears off or removed the modifications are undoed (need to save or something), should not be special ability like convert
INSTANT_REPETITIVE_VANISHING, //EFFECT on impact, and each turn it executes (eg. poisoning), when vanished unit remains as it is (no regaining abilities).
REPETITIVE_VANISHING, //EFFECT on impact does nothing, but each turn it executes (eg. poisoning), when vanished unit remains as it is (no regaining abilities).
REPETITIVE_VANISHING_ENCHANTMENT, //EFFECT on impact does nothing, but each turn it executes (eg. slowing), when vanished unit regains its old abilities
SUSPENDED, //EFFECT does nothing on impact and nothing on countdown, but at the end it executes the effect (eg. delayed conversion), permanent
TRIGGERED_EFFECT, //EFFECT says : no execute, only on trigger.
EFFECT_SPELL, // only places an effect of a different effectID (giving lifelink)
AURA_EFFECT //EFFECT says : no execute, only on AURA TRIGGERS. (an aura)
possible target types:
HIMSELF,
FRIENDLY,
FRIENDLY_BUT_NOT_ME,
ENEMY,
ENEMY_OR_FRIENDLY,
ENEMY_OR_FRIENDLY_BUT_NOT_ME,
special cost options:
SACRIFICE_UNIT, // spell that requires specCostNr number of nearby corpse (consumes it) to be casted
SACRIFICE_HP_AMOUNT,
SACRIFICE_POWER_AMOUNT,
NEARBY_CORPSE, // spell that requires specCostNr number of nearby corpse (consumes it) to be casted
also you specify unit types in trnSpecCostTypeList

system special effects
public static final int SYSTEM_SPECIAL_EFFECT_CONVERT = 100;
public static final int SYSTEM_SPECIAL_EFFECT_HEAL = 101;
public static final int SYSTEM_SPECIAL_EFFECT_DISENCHANT = 102;
public static final int SYSTEM_SPECIAL_EFFECT_SUMMON = 103;
public static final int SYSTEM_SPECIAL_EFFECT_REGENERATION = 104;



public static final int SYSTEM_SPECIAL_EFFECT_FORESTWALK = 108;
public static final int SYSTEM_SPECIAL_EFFECT_MOUNTAINWALK = 109;
public static final int SYSTEM_SPECIAL_EFFECT_WATERWALK = 110;
public static final int SYSTEM_SPECIAL_EFFECT_AIRWALK = 111;

public static final int SYSTEM_SPECIAL_EFFECT_TRANSFORM1 = 112;
public static final int SYSTEM_SPECIAL_EFFECT_ANIMATE_DEAD = 113;

public static final int SYSTEM_SPECIAL_EFFECT_ENVIRONMENTAL = 114; //An instant spell that casts a lightning storm, or fireball storm or ice storm - effects in a radius with a special randomization
public static final int SYSTEM_SPECIAL_EFFECT_DISABLE = 115;

public static final int SYSTEM_SPECIAL_EFFECT_LASTSTURN_MODIFIER = 116; // a spell that will modify the lasts turn nr of a running effect on target unit
Specs Other special settings in a list called "specs" you set these in "trnSpecs":
BYPASS_SPELL_RESISTANCE, // set this to make the spell to be an ability that is not reduced by spell resistance at all (update: any resistance)
IS_NEGATIVE_EFFECT, // set this to make the effect a negative one like slowing (if not set than considered positive like strengthening), now in AOF disenchant uses if it wants to remove effect or not
IS_COOLDOWN_ON_SPAWN, // if set AND it has cooldown, than the cooldown will start right on unit spawning
AMOUNT_BY_STRENGTH, // if set than the caster unit's strength will mutiply the "effect" (effect will run this many times)
AMOUNT_BY_HP, // if set than the caster unit's hp will mutiply the "effect" (effect will run this many times)

Summon or Place effect

Here the effect will spawn an other "unit" on pressing the effect button of the "caster" unit, it will start floating like the elf wolf does.
living samples:
- aof: elf wolf, skeleton dragon + orc dragon etc.
- aow: sea mines
{
"effectNameString":"EFFECT_INSTANT_SUMMON_WOLF", ---------------------- effect name
"effectDefID":126,------------------------------------------------------------------effect id
"trnActionUnitID":"UNIT_GER_BLD_WATER_MINES",---------------------which unit to summon ("NO_UNIT" means "unset" value)
"trnActionUnitIDForCaster":"NO_UNIT",--------------------------------------------which effect to apply on caster after casting (ef. losing health) ("NO_UNIT" means "unset" value)

"buttonTextureID":0,----------------------------------------------------------------[OBSOLETE, use trnButtonTextureID]for unique button (if the deafult the summoned unit image is not good enough)
"actionTextureID":0,-----------------------------------------------------------------[OBSOLETE, use trn*...]not used here

"chancePercent":1.0,----------------------------------------------------------------chance of casting the spell, here use 1=100% if you want to be always
"lastsTurnNr":0,-----------------------------------------------------------------------not used here

"effectBehaviour":"INSTANT",--------------------------------------------------------effect behaviour (see above)
"effectTargets":"HIMSELF",-----------------------------------------------------------tagert types (see above)
"trnSystemSpecialEffectID":"SYSTEM_SPECIAL_EFFECT_SUMMON ",-----------Special effects (see above), here this is the summon unit
"trnTransformTo" ----------------------------------------------------------------------transformation ID, used for case of SYSTEM_SPECIAL_EFFECT_TRANSFORM1, if null than the Unit.transformTo1 value will be used


"isOneTimeSpell":false,---------------------------------------------------------------If canster can cast it on only once in his lifetime
"castRangeModifier":0,---------------------------------------------------------------- it can modify the spell range relative to caster default spellrange (eg +3)
"cooldownTurnNr":0,------------------------------------------------------------------If you want the spell has cooldown (caster needs to wait X turns before casting it again.)

"specCost":null,-------------------------------------------------------------------------special cost type (see above)
"specCostNr":1,--------------------------------------------------------------------------special cost amount (eg. 3 nearby corpses)
"trnSpecCostTypeList":null,------------------------------------------------------------- special cost type listt to be sacrificed: eg you can list only goblins, by category or specify exact types
"trnRequires":null,-----------------------------------------------------------------------required techs to be owned before use this effect

"priority":0-------------------------------------------------------------------------------The priority the AI should use when selecting weapons against targets: 0 for irrelevant ones, about 900 on strongest effects, 100-800 the average effects

}

FULL TEMPLATE: just a full template ------
{
"effectNameString":"EFFECT_INSTANT_SUMMON_WOLF", ---------------------- effect name
"effectDefID":126,------------------------------------------------------------------effect id
"effectDefIDRelated":0,------------------------------------------------------------ not used here
"propertyChangerUnitID":308,-----------------------------------------------------which unit to summon (with id)
"propertyChangerUnitIDForCaster":-1,--------------------------------------------which effect to apply on caster after casting (ef. losing health) (-1 means nothing)

"trnIndicatorTextureID":"SOME_TEXTURE_ID",-------------------------------------------------------------use the texture "idString" here to reference
"trnButtonTextureID":null,----------------------------------------------------------------use the texture "idString" here to reference - for unique button (if the deafult the summoned unit image is not good enough - *more details below)
"buttonTextureWithBackground":false,-----------------------------------------------if set, if set you can explicitely tell the engine if the button is with or without button background
"trnProjectileSpriteID":null,---------------------------------------------------------------use the sprite "idString" here to reference
"trnActionTextureID":null,-----------------------------------------------------------------use the texture "idString" here to reference
"trnSpotAnimationSpriteID":null,----------------------------------------------------------use the sprite "idString" here to reference

"chancePercent":1.0,----------------------------------------------------------------chance of casting the spell, here use 1=100% if you want to be always
"lastsTurnNr":0,-----------------------------------------------------------------------not used here

"effectBehaviour":"INSTANT",--------------------------------------------------------effect behaviour (see above)
"effectTargets":"HIMSELF",-----------------------------------------------------------tagert types (see above)
"trnSystemSpecialEffectID":"SYSTEM_SPECIAL_EFFECT_SUMMON ",--------------------------------------------------------Special effects (see above), here this is the summon unit

"isOneTimeSpell":false,---------------------------------------------------------------If canster can cast it on only once in his lifetime
"castRangeModifier":0,---------------------------------------------------------------- it can modify the spell range relative to caster default spellrange (eg +3)
"cooldownTurnNr":0,------------------------------------------------------------------If you want the spell has cooldown (caster needs to wait X turns before casting it again.)

"specCost":null,-------------------------------------------------------------------------special cost type (see above)
"specCostNr":1,--------------------------------------------------------------------------special cost amount (eg. 3 nearby corpses)
"trnSpecCostTypeList":{
"categories":["U_CHEAP_MELEE","U_BURNABLE", "U_BUILDING_SIZED_UNITS"],
"unitTypes":["UNIT_ORNITHOPTER"]
},------------------------------------------------------------- special cost type listt to be sacrificed: eg you can list only goblins, by category or specify exact types
"trnRequires":["TECH_X","TECH_Y"],-----------------------------------------------------------------------required techs to be owned before use this effect
"removingWeaponSlotTypes":["HEAL", "MEND", "SPELLCAST", "WP1", "WP2"], ----------------------which type of action removes this effect (eg burning removed by MEND)

"priority":0-------------------------------------------------------------------------------The priority the AI should use when selecting weapons against targets: 0 for irrelevant ones, about 900 on strongest effects, 100-800 the average effects

}
Button image appearance

Here see how button image is drawn:
1st prior if u explicitely gave Button image in trnButtonTextureID - than this will appear there
(image includes the button background too in AOf+AOS, in AOW it means only the decoration. You can override with "buttonTextureWithBackground")
2nd prior using the trnActionTextureID over the button background (like a cannonball shot cannonball image in AOF/AOS)
3rd prior in summon type of effect then the summoned unit's image is used over the button background (like the green dragon in AOF)
4th prior if it is a transform effect than a "transformation" image is shown over the button background
5th prior if a "requires" unit/tech is set then the image of that unit/techs is shown over the button background

User avatar
Sunrise Samurai
Posts: 2650
Joined: Thu Jun 18, 2015 11:21 pm
Location: Florida, U.S.

Re: Effect definition json

Post by Sunrise Samurai » Sat Sep 23, 2017 11:19 am

Can you compile a zip of a bunch of AoF abilities? Please include at least raise dead, fireball, convert, one aura, and one enchantment​ for us to study.
Currently residing at the local ninja academy. I'm still watching though.

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

Re: Effect definition json

Post by Stratego (dev) » Sat Sep 23, 2017 2:57 pm

Not all AOF and AOS units/effects and other things are defined in jsons *, but here what are in AOF currently (effects, units, and so on - everything in AOF)
AOFJsons.zip
(306.56 KiB) Downloaded 82 times

* : AOW will be the first that is only JSON definition based.

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

Re: Game definition jsons - Effect definition json

Post by Stratego (dev) » Sat Apr 07, 2018 5:56 am

"specs":["IS_NEGATIVE_EFFECT"] -- set this to make the effect a negative one like slowing (if not set than considered positive like strengthening), now in AOF disenchant uses if it wants to remove effect or not
new spec.

means all negative effects should be marked (not only sticky ones)

Midonik
Posts: 3442
Joined: Mon Sep 05, 2016 5:27 pm
Location: Poland

Re: Game definition jsons - Effect definition json

Post by Midonik » Wed Aug 01, 2018 10:09 am

Can I make disenchant work only on few types of effects, not all? Probably not...
Support new AoS variant, Age of Galaxy,its sci-fi themed: http://www.androidutils.com/forum/viewforum.php?f=135
All help will be welcome.

Fielderan Crown's Great Hetman
http://www.androidutils.com/forum/viewt ... =66&t=4729

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

Re: Game definition jsons - Effect definition json

Post by Stratego (dev) » Wed Aug 01, 2018 11:42 am

The current disenchant removes all.
We need dedicated ones if u need that

Midonik
Posts: 3442
Joined: Mon Sep 05, 2016 5:27 pm
Location: Poland

Re: Game definition jsons - Effect definition json

Post by Midonik » Wed Aug 01, 2018 12:07 pm

Currently all is ok too.
Support new AoS variant, Age of Galaxy,its sci-fi themed: http://www.androidutils.com/forum/viewforum.php?f=135
All help will be welcome.

Fielderan Crown's Great Hetman
http://www.androidutils.com/forum/viewt ... =66&t=4729

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

Re: Game definition jsons - Effect definition json

Post by makazuwr32 » Wed Aug 01, 2018 12:49 pm

but can we add undisenchantable effects?
Specifically for not so genious persons
makazuwr32 wrote:
Fri Dec 07, 2018 9:24 am
IT IS ALWAYS EASIER TO CORRECT EXISTING THINGS THAN TO MAKE SOMETHING NEW FROM SCRAP. © by Makazuwr32™.

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

Re: Game definition jsons - Effect definition json

Post by Stratego (dev) » Wed Aug 01, 2018 6:30 pm

Yes. Which would those be?

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

Re: Game definition jsons - Effect definition json

Post by makazuwr32 » Wed Aug 01, 2018 6:48 pm

Many Runic spells that target units i suggested for dwarves.
Rune battle priest all his spells must be undisenchantable.
Rune mage 1 spell is undisenchantable.

Also another question - can we add damage to summoned/elemental unit types for disenchant spell?
Specifically for not so genious persons
makazuwr32 wrote:
Fri Dec 07, 2018 9:24 am
IT IS ALWAYS EASIER TO CORRECT EXISTING THINGS THAN TO MAKE SOMETHING NEW FROM SCRAP. © by Makazuwr32™.

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

Re: Game definition jsons - Effect definition json

Post by Stratego (dev) » Wed Aug 01, 2018 7:05 pm

runes: then what is the counterspell for them?

summoneds: could be, but needs coding , put into the needs list posts to be "vodted"

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

Re: Game definition jsons - Effect definition json

Post by makazuwr32 » Wed Aug 01, 2018 9:27 pm

Runes don't need counter spell but runic magic's weaknesses are
1. long cooldown (4/6/8 turns cooldown) 2. short time effect (1-2 turns exept 2 of them)/until used (these 2 will have long time cooldown and both are castable by unique unit only - the one that can be trained only one per player)

I designed single target runic spells that they will be powerful but have long time cooldown and short time effect

Also another question - can we add some sort of spell that forcibly sets cooldown of target unit's abilities (all) to target value?
Specifically for not so genious persons
makazuwr32 wrote:
Fri Dec 07, 2018 9:24 am
IT IS ALWAYS EASIER TO CORRECT EXISTING THINGS THAN TO MAKE SOMETHING NEW FROM SCRAP. © by Makazuwr32™.

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

Re: Game definition jsons - Effect definition json

Post by Stratego (dev) » Thu Aug 02, 2018 6:05 am

runes: ok it is easy to make a setting to be exceptional spells that are not removable by disenchant - email me about it please

setting cooldown to abilities: harder, lets put it too "needs" vote

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

Re: Game definition jsons - Effect definition json

Post by Stratego (dev) » Fri Feb 15, 2019 3:15 pm

"trnSpecCostTypeList":{
"categories":["U_CHEAP_MELEE","U_BURNABLE", "U_BUILDING_SIZED_UNITS"],
"unitTypes":["UNIT_ORNITHOPTER"]
},------------------------------------------------------------- special cost type listt to be sacrificed: eg you can list only goblins, by category or give exact types

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

Re: Game definition jsons - Effect definition json

Post by makazuwr32 » Fri Feb 15, 2019 4:31 pm

Oh. This will come in handy for mounting ability of eagles.
Specifically for not so genious persons
makazuwr32 wrote:
Fri Dec 07, 2018 9:24 am
IT IS ALWAYS EASIER TO CORRECT EXISTING THINGS THAN TO MAKE SOMETHING NEW FROM SCRAP. © by Makazuwr32™.

User avatar
General Brave
Posts: 4521
Joined: Thu Oct 19, 2017 3:12 am
Location: The Four Point Military Academy.

Re: Game definition jsons - Effect definition json

Post by General Brave » Sat Feb 16, 2019 8:13 pm

Will be useful.
Wise, Might, Loyalty. Forever stands Warfell.

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

Re: Game definition jsons - Effect definition json

Post by Stratego (dev) » Tue May 14, 2019 9:44 am

new spec option:
IS_COOLDOWN_ON_SPAWN -- if set AND it has cooldown, than the cooldown will start right on unit spawning

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

Re: Game definition jsons - Effect definition json

Post by Stratego (dev) » Fri May 31, 2019 7:28 am

new option to set transformation from now not on unt but on effect:
"trnTransformTo" ----------------------------------------------------------------------transformation ID, used for case of SYSTEM_SPECIAL_EFFECT_TRANSFORM1, if null than the Unit.transformTo1 value will be used

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

Re: Game definition jsons - Effect definition json

Post by Stratego (dev) » Mon Jun 17, 2019 6:00 am

new trnSpecs options

AMOUNT_BY_STRENGTH, // if set than the caster unit's strength will mutiply the "effect" (effect will run this many times)
AMOUNT_BY_HP, // if set than the caster unit's hp will mutiply the "effect" (effect will run this many times)

new button texture setting:
"buttonTextureWithBackground":false,-----------------------------------------------if set you can explicitely tell the engine if the button is with or without button background

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

Re: Game definition jsons - Effect definition json

Post by Stratego (dev) » Sat Jul 13, 2019 5:44 am

new setting:
"removingWeaponSlotTypes":["HEAL", "MEND", "SPELLCAST", "WP1", "WP2"], ----------------------which type of action removes this effect (eg burning removed by MEND)

User avatar
godOfKings
Posts: 2059
Joined: Fri Sep 22, 2017 4:50 pm

Re: Game definition jsons - Effect definition json

Post by godOfKings » Sun Jul 14, 2019 4:38 am

Where should it b written, on the spell effect json?
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: 8767
Joined: Fri Apr 25, 2014 9:28 pm

Re: Game definition jsons - Effect definition json

Post by Stratego (dev) » Sun Jul 14, 2019 6:02 am

yes under effects folder (this topic is about jsons in effects folder)

Post Reply

Return to “Game Definition .JSON”