effect behaviours:
possible target types: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)
special cost options:HIMSELF,
FRIENDLY,
FRIENDLY_BUT_NOT_ME,
ENEMY,
ENEMY_OR_FRIENDLY,
ENEMY_OR_FRIENDLY_BUT_NOT_ME,
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
ACTION_POINT //if set than it requires extra action points or even 0 action point, altering the default 1 action cost
also you specify unit types in trnSpecCostTypeList
system special effects
Specs Other special settings in a list called "specs" you set these in "trnSpecs":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
public static final int SYSTEM_SPECIAL_EFFECT_SUMMON_IMMEDIATE = 117;
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)
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
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 ------
Button image appearance{
"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
"effectTriggers":["ON_DAMAGED"], ----------------------------------------------------------------------- what event triggers the effect: ON_DAMAGED, ON_DAMAGED_AMOUNT, ON_DIED, ON_KILL_ENEMY, ON_DAMAGES, ON_DAMAGES_AMOUNT
"removesBuffs":"ENEMYSPELLS", //removes buffs debuffs or all (eg. poison/slowing etc) ENEMYSPELLS/ALL/NONE
"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
}
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