Difference between revisions of "Bonus Format"
From VCMI Project Wiki
m (→Available prefixes) |
(→Available prefixes) |
||
Line 59: | Line 59: | ||
* spell. | * spell. | ||
* primSkill. | * primSkill. | ||
− | * primarySkill. | + | * primarySkill. (since 1.3) |
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
"attack", "defence", "spellpower", "knowledge" | "attack", "defence", "spellpower", "knowledge" | ||
Line 66: | Line 66: | ||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
"dirt", "sand", "grass", "snow", "swamp", "rough", "subterra", "lava", "water", "rock" | "dirt", "sand", "grass", "snow", "swamp", "rough", "subterra", "lava", "water", "rock" | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | * spellSchool. | ||
+ | <syntaxhighlight lang="javascript"> | ||
+ | "any", "fire", "air", "water", "earth" | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 01:33, 28 August 2023
Enumerative parameters are described in HeroBonus.h file.
Contents
Short format
{
["BONUS_TYPE", val, subtype, addInfo]
}
Full format
All parameters but type are optional.
{
"type": "BONUS_TYPE",
"subtype": 0,
"val" : 0,
"valueType": "VALUE_TYPE",
"addInfo" : 0, // or [1, 2, ...]
"duration" : "BONUS_DURATION", //or ["BONUS_DURATION1", "BONUS_DURATION2", ...]"
"turns" : 0,
"sourceType" : "SOURCE_TYPE",
"sourceID" : 0,
"effectRange" : "EFFECT_RANGE",
"limiters" : [
"PREDEFINED_LIMITER", optional_parameters (...), //whhich one is preferred?
{"type" : LIMITER_TYPE, "parameters" : [1,2,3]}
],
"propagator" : ["PROPAGATOR_TYPE", optional_parameters (...)],
"updater" : {Bonus Updater},
"propagationUpdater" : {Bonus Updater, but works during propagation},
"description" : "",
"stacking" : ""
}
Subtype resolution
All string identifiers of items can be used in "subtype" field. This allows cross-referencing between the mods and make config file more readable.
Available prefixes
- creature.
- artifact.
- skill.
"pathfinding", "archery", "logistics", "scouting", "diplomacy",
"navigation", "leadership", "wisdom", "mysticism", "luck",
"ballistics", "eagleEye", "necromancy", "estates", "fireMagic",
"airMagic", "waterMagic", "earthMagic", "scholar", "tactics",
"artillery", "learning", "offence", "armorer", "intelligence",
"sorcery", "resistance", "firstAid"
- resource.
Possible values:
"wood", "mercury", "ore", "sulfur", "crystal", "gems", "gold", "mithril"
- hero.
- faction.
- spell.
- primSkill.
- primarySkill. (since 1.3)
"attack", "defence", "spellpower", "knowledge"
- terrain (since 0.99)
"dirt", "sand", "grass", "snow", "swamp", "rough", "subterra", "lava", "water", "rock"
- spellSchool.
"any", "fire", "air", "water", "earth"
Example
"bonus" :
{
"type" : "HATE",
"subtype" : "creature.enchanter",
"val" : 50
}
This bonus makes creature do 50% more damage to Enchanters.
Bonus string constants
- List of all bonus types
- List of bonus value types
- List of bonus range types
- List of bonus duration types
- List of bonus sources
- List of bonus limiters
- List of bonus propagators
- List of bonus updaters
Additional links
- Bonus system
- Bonus Format