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: 7162
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
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
Other special settings in a list called "specs":
"specs":["BYPASS_SPELL_RESISTANCE"] -- if this is set then the spell is not affected by spell resistance
"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

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,----------------------------------------------------------------for unique button (if the deafult the summoned unit image is not good enough)
"actionTextureID":0,-----------------------------------------------------------------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

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

"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

}

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)
"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)
"systemSpecialEffectID":103,--------------------------------------------------------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)

"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

}

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: 7162
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 58 times

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

Stratego (dev)
Site Admin
Posts: 7162
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: 2689
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 si-fi themed: viewforum.php?f=135
All help will be welcome.

Fielderan Crown's Great Hetman
viewtopic.php?f=66&t=4729

Stratego (dev)
Site Admin
Posts: 7162
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: 2689
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 si-fi themed: viewforum.php?f=135
All help will be welcome.

Fielderan Crown's Great Hetman
viewtopic.php?f=66&t=4729

User avatar
makazuwr32
Posts: 3096
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?
Prefered AoS games: AoS, AoF (humans, elves, orcs, dwarves)
Nature Defenders: Recruting

Stratego (dev)
Site Admin
Posts: 7162
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: 3096
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?
Prefered AoS games: AoS, AoF (humans, elves, orcs, dwarves)
Nature Defenders: Recruting

Stratego (dev)
Site Admin
Posts: 7162
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: 3096
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?
Prefered AoS games: AoS, AoF (humans, elves, orcs, dwarves)
Nature Defenders: Recruting

Stratego (dev)
Site Admin
Posts: 7162
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

Post Reply

Return to “Game Definition .JSON”