|
|
| (22 intermediate revisions by 6 users not shown) |
| Line 1: |
Line 1: |
| − | Enumerative parameters are described in HeroBonus.h file.
| + | {{Template:MovedToWebpage|https://vcmi.eu/modders/Bonus_Format/}} |
| − | ===Short format===
| |
| − | <syntaxhighlight lang="javascript">
| |
| − | { | |
| − | ["BONUS_TYPE", val, subtype, additionalInfo]
| |
| − | }
| |
| − | </syntaxhighlight>
| |
| − | ===Full format===
| |
| − | All parameters but type are optional.
| |
| − | <syntaxhighlight lang="javascript">
| |
| − | { | |
| − | "type": "BONUS_TYPE",
| |
| − | "subtype": 0,
| |
| − | "val" : 0,
| |
| − | "valueType", "VALUE_TYPE",
| |
| − | "addInfo" : 0,
| |
| − | | |
| − | "duration" : "BONUS_DURATION",
| |
| − | "turns" : 0,
| |
| − | | |
| − | "sourceType" : "SOURCE_TYPE",
| |
| − | "sourceID" : 0,
| |
| − | "effectRange" : "EFFECT_RANGE",
| |
| − | "limiter" : ["LIMITER_TYPE", optional_parameters (...)]
| |
| − | "propagator" : ["PROPAGATOR_TYPE", optional_parameters (...)]
| |
| − | "description" : ""
| |
| − | }
| |
| − | </syntaxhighlight>
| |
| − | | |
| − | == 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 redable.
| |
| − | === Available prefixes ===
| |
| − | * creature.
| |
| − | * artifact.
| |
| − | * skill.
| |
| − | <syntaxhighlight lang="javascript">
| |
| − | "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"
| |
| − | </syntaxhighlight>
| |
| − | * resource.
| |
| − | Possible values:
| |
| − | <syntaxhighlight lang="javascript">
| |
| − | "wood", "mercury", "ore", "sulfur", "crystal", "gems", "gold", "mithril"
| |
| − | </syntaxhighlight>
| |
| − | * hero.
| |
| − | * faction.
| |
| − | === Example ===
| |
| − | <syntaxhighlight lang="javascript">
| |
| − | "bonus" :
| |
| − | {
| |
| − | "type" : "HATE",
| |
| − | "subtype" : "creature.enchanter",
| |
| − | "val" : 50
| |
| − | } | |
| − | </syntaxhighlight>
| |
| − | 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]]
| |
| − | | |
| − | = Additional links =
| |
| − | [[Bonus system]]
| |