mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-15 20:03:15 +02:00
Updated schemas & docs for several game entities
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
"index" : 9,
|
"index" : 9,
|
||||||
"nativeTerrain" : "none",
|
"nativeTerrain" : "none",
|
||||||
"alignment" : "neutral",
|
"alignment" : "neutral",
|
||||||
|
"boat" : "boatFortress",
|
||||||
"creatureBackground" :
|
"creatureBackground" :
|
||||||
{
|
{
|
||||||
"120px" : "TPCASNEU",
|
"120px" : "TPCASNEU",
|
||||||
|
@@ -123,7 +123,7 @@
|
|||||||
},
|
},
|
||||||
"onlyOnWaterMap" : {
|
"onlyOnWaterMap" : {
|
||||||
"type" : "boolean",
|
"type" : "boolean",
|
||||||
"description" : "It true, artifact won't spawn on a map without water"
|
"description" : "If set to true, artifact won't spawn on a map without water"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -23,7 +23,7 @@
|
|||||||
},
|
},
|
||||||
"disabled" : {
|
"disabled" : {
|
||||||
"type" : "boolean",
|
"type" : "boolean",
|
||||||
"description" : "Object is competely disabled and may not be even loaded in-game"
|
"description" : "Internal. Object is competely disabled and may not be even loaded in-game"
|
||||||
},
|
},
|
||||||
"name" : {
|
"name" : {
|
||||||
"type" : "object",
|
"type" : "object",
|
||||||
@@ -122,26 +122,22 @@
|
|||||||
"$ref" : "bonus.json"
|
"$ref" : "bonus.json"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"abilityText" : {
|
|
||||||
"type" : "string",
|
|
||||||
"description" : "Text version of creature abilities. Used only with original creature window"
|
|
||||||
},
|
|
||||||
"graphics" : {
|
"graphics" : {
|
||||||
"type" : "object",
|
"type" : "object",
|
||||||
"additionalProperties" : false,
|
"additionalProperties" : false,
|
||||||
"description" : "Describes how this creature looks like during battles",
|
"description" : "Describes how this creature looks like",
|
||||||
"required" : [
|
"required" : [
|
||||||
"animation", "animationTime", "timeBetweenFidgets"
|
"animation", "animationTime", "timeBetweenFidgets"
|
||||||
],
|
],
|
||||||
"properties" : {
|
"properties" : {
|
||||||
"animation" : {
|
"animation" : {
|
||||||
"type" : "string",
|
"type" : "string",
|
||||||
"description" : ".def file with animation of this creature in battles",
|
"description" : "File with animation of this creature in battles",
|
||||||
"format" : "defFile"
|
"format" : "defFile"
|
||||||
},
|
},
|
||||||
"map" : {
|
"map" : {
|
||||||
"type" : "string",
|
"type" : "string",
|
||||||
"description" : ".def file with animation of this creature on adventure map",
|
"description" : "File with animation of this creature on adventure map",
|
||||||
"format" : "defFile"
|
"format" : "defFile"
|
||||||
},
|
},
|
||||||
"mapMask" : {
|
"mapMask" : {
|
||||||
@@ -247,7 +243,7 @@
|
|||||||
},
|
},
|
||||||
"attackClimaxFrame" : {
|
"attackClimaxFrame" : {
|
||||||
"type" : "number",
|
"type" : "number",
|
||||||
"description" : "Frame from attack animation during which creature deals damage"
|
"description" : "Frame at which shooter shoots his projectile (e.g. releases arrow)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -264,7 +260,7 @@
|
|||||||
"sound" : {
|
"sound" : {
|
||||||
"type" : "object",
|
"type" : "object",
|
||||||
"additionalProperties" : false,
|
"additionalProperties" : false,
|
||||||
"description" : "Various sound files associated with this creature",
|
"description" : "Sound files associated with this creature",
|
||||||
"properties" : {
|
"properties" : {
|
||||||
"attack" : { "type" : "string", "format" : "soundFile" },
|
"attack" : { "type" : "string", "format" : "soundFile" },
|
||||||
"defend" : { "type" : "string", "format" : "soundFile" },
|
"defend" : { "type" : "string", "format" : "soundFile" },
|
||||||
|
@@ -30,20 +30,20 @@
|
|||||||
"$schema" : "http://json-schema.org/draft-04/schema",
|
"$schema" : "http://json-schema.org/draft-04/schema",
|
||||||
"title" : "VCMI faction format",
|
"title" : "VCMI faction format",
|
||||||
"description" : "Json format for defining new faction (aka towns) in VCMI",
|
"description" : "Json format for defining new faction (aka towns) in VCMI",
|
||||||
"required" : [ "name", "alignment", "nativeTerrain", "creatureBackground" ],
|
"required" : [ "name", "boat", "alignment", "nativeTerrain", "creatureBackground" ],
|
||||||
"dependencies" : {
|
"dependencies" : {
|
||||||
"town" : [ "puzzleMap", "boat" ]
|
"town" : [ "puzzleMap" ]
|
||||||
},
|
},
|
||||||
"additionalProperties" : false,
|
"additionalProperties" : false,
|
||||||
"properties" : {
|
"properties" : {
|
||||||
"name" : {
|
"name" : {
|
||||||
"type" : "string",
|
"type" : "string",
|
||||||
"description" : "Translatable name of town"
|
"description" : "Localizable faction name, e.g. Rampart"
|
||||||
},
|
},
|
||||||
"alignment" : {
|
"alignment" : {
|
||||||
"type" : "string",
|
"type" : "string",
|
||||||
"enum" : [ "good", "neutral", "evil" ],
|
"enum" : [ "good", "neutral", "evil" ],
|
||||||
"description" : "Town alignment, good, neutral or evil"
|
"description" : "Faction alignment, good, neutral or evil"
|
||||||
},
|
},
|
||||||
"nativeTerrain" : {
|
"nativeTerrain" : {
|
||||||
"type" : "string",
|
"type" : "string",
|
||||||
@@ -51,12 +51,12 @@
|
|||||||
},
|
},
|
||||||
"boat" : {
|
"boat" : {
|
||||||
"type" : "string",
|
"type" : "string",
|
||||||
"description" : "Identifier of boat type that is produced by shipyard in town, if any"
|
"description" : "Identifier of boat type that is produced by shipyard and used by heroes in water taverns or prisons"
|
||||||
},
|
},
|
||||||
|
|
||||||
"preferUndergroundPlacement" : {
|
"preferUndergroundPlacement" : {
|
||||||
"type" : "boolean",
|
"type" : "boolean",
|
||||||
"description" : "Random map generator places player/cpu-owned towns underground if true is specified and on the ground otherwise. Parameter is unused for maps without underground. False by default."
|
"description" : "Random map generator places player/cpu-owned towns underground if true is specified and on the ground otherwise. Parameter is unused for maps without underground."
|
||||||
},
|
},
|
||||||
"creatureBackground" : {
|
"creatureBackground" : {
|
||||||
"type" : "object",
|
"type" : "object",
|
||||||
@@ -173,7 +173,7 @@
|
|||||||
},
|
},
|
||||||
"buildingsIcons" : {
|
"buildingsIcons" : {
|
||||||
"type" : "string",
|
"type" : "string",
|
||||||
"description" : "Path to .def file with building icons",
|
"description" : "Path to building icons for town hall",
|
||||||
"format" : "animationFile"
|
"format" : "animationFile"
|
||||||
},
|
},
|
||||||
"mapObject" : {
|
"mapObject" : {
|
||||||
|
@@ -16,19 +16,19 @@
|
|||||||
"properties" : {
|
"properties" : {
|
||||||
"special" : {
|
"special" : {
|
||||||
"type" : "boolean",
|
"type" : "boolean",
|
||||||
"description" : "Marks this object as special and not available by default"
|
"description" : "If set to true hero will be unavailable on start and won't appear in taverns (campaign heroes)"
|
||||||
},
|
},
|
||||||
"class" : {
|
"class" : {
|
||||||
"type" : "string",
|
"type" : "string",
|
||||||
"description" : "Hero class, e.g. knight or battleMage"
|
"description" : "Identifier of class this hero belongs to. Such as knight or battleMage"
|
||||||
},
|
},
|
||||||
"female" : {
|
"female" : {
|
||||||
"type" : "boolean",
|
"type" : "boolean",
|
||||||
"description" : "This hero is female (changeable via editor)"
|
"description" : "Set to true if the hero is female by default (can be changed in map editor)"
|
||||||
},
|
},
|
||||||
"battleImage" : {
|
"battleImage" : {
|
||||||
"type" : "string",
|
"type" : "string",
|
||||||
"description" : "Custom def used on battle",
|
"description" : "Custom animation to be used on battle, overrides hero class property",
|
||||||
"format" : "defFile"
|
"format" : "defFile"
|
||||||
},
|
},
|
||||||
"images" : {
|
"images" : {
|
||||||
@@ -174,11 +174,11 @@
|
|||||||
},
|
},
|
||||||
"onlyOnWaterMap" : {
|
"onlyOnWaterMap" : {
|
||||||
"type" : "boolean",
|
"type" : "boolean",
|
||||||
"description" : "It true, hero won't show up on a map with water"
|
"description" : "If set to true, hero won't show up on a map with water"
|
||||||
},
|
},
|
||||||
"onlyOnMapWithoutWater" : {
|
"onlyOnMapWithoutWater" : {
|
||||||
"type" : "boolean",
|
"type" : "boolean",
|
||||||
"description" : "It true, hero will show up only if the map contains no water"
|
"description" : "If set to true, hero will show up only if the map contains no water"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
},
|
},
|
||||||
"faction" : {
|
"faction" : {
|
||||||
"type" : "string",
|
"type" : "string",
|
||||||
"description" : "Faction this hero class belongs to"
|
"description" : "Identifier of faction this class belongs to"
|
||||||
},
|
},
|
||||||
"affinity" : {
|
"affinity" : {
|
||||||
"type" : "string",
|
"type" : "string",
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
},
|
},
|
||||||
"images" : {
|
"images" : {
|
||||||
"type" : "object",
|
"type" : "object",
|
||||||
"description" : "skill icons of varying size",
|
"description" : "Skill icons of varying size",
|
||||||
"properties" : {
|
"properties" : {
|
||||||
"small" : {
|
"small" : {
|
||||||
"type" : "string",
|
"type" : "string",
|
||||||
@@ -47,11 +47,11 @@
|
|||||||
"properties" : {
|
"properties" : {
|
||||||
"name" : {
|
"name" : {
|
||||||
"type" : "string",
|
"type" : "string",
|
||||||
"description" : "localizable skill name"
|
"description" : "Mandatory, localizable skill name"
|
||||||
},
|
},
|
||||||
"index" : {
|
"index" : {
|
||||||
"type" : "number",
|
"type" : "number",
|
||||||
"description" : "numeric id of skill, required for existing skills"
|
"description" : "Internal, numeric id of skill, required for existing skills"
|
||||||
},
|
},
|
||||||
"obligatoryMajor" : {
|
"obligatoryMajor" : {
|
||||||
"type" : "boolean",
|
"type" : "boolean",
|
||||||
@@ -63,22 +63,16 @@
|
|||||||
},
|
},
|
||||||
"gainChance" : {
|
"gainChance" : {
|
||||||
"description" : "Chance for the skill to be offered on level-up (heroClass may override)",
|
"description" : "Chance for the skill to be offered on level-up (heroClass may override)",
|
||||||
"anyOf" : [
|
"type" : "object",
|
||||||
{
|
"required" : ["might", "magic"],
|
||||||
"type" : "number"
|
"properties" : {
|
||||||
},
|
"might" : {
|
||||||
{
|
"type" : "number",
|
||||||
"type" : "object",
|
"description" : "Chance for hero classes with might affinity"
|
||||||
"required" : ["might", "magic"],
|
},
|
||||||
"properties" : {
|
"magic" : {
|
||||||
"might" : {
|
"type" : "number",
|
||||||
"type" : "number",
|
"description" : "Chance for hero classes with magic affinity"
|
||||||
"description" : "Chance for hero classes with might affinity"
|
|
||||||
},
|
|
||||||
"magic" : {
|
|
||||||
"type" : "number",
|
|
||||||
"description" : "Chance for hero classes with magic affinity"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@@ -27,11 +27,11 @@
|
|||||||
"description" : "Numeric identifier of this building"
|
"description" : "Numeric identifier of this building"
|
||||||
},
|
},
|
||||||
"name" : {
|
"name" : {
|
||||||
"description" : "Name of this building",
|
"description" : "Localizable name of this building",
|
||||||
"type" : "string"
|
"type" : "string"
|
||||||
},
|
},
|
||||||
"description" : {
|
"description" : {
|
||||||
"description" : "Full decsription of this building",
|
"description" : "Localizable decsription of this building",
|
||||||
"type" : "string"
|
"type" : "string"
|
||||||
},
|
},
|
||||||
"type" : {
|
"type" : {
|
||||||
@@ -53,13 +53,13 @@
|
|||||||
"description" : "List of town buildings that must be built before this one"
|
"description" : "List of town buildings that must be built before this one"
|
||||||
},
|
},
|
||||||
"upgrades" : {
|
"upgrades" : {
|
||||||
"description" : "If this building is upgrade, identifier of base building",
|
"description" : "Optional, indicates that this building upgrades another base building",
|
||||||
"type" : "string"
|
"type" : "string"
|
||||||
},
|
},
|
||||||
"cost" : {
|
"cost" : {
|
||||||
"type" : "object",
|
"type" : "object",
|
||||||
"additionalProperties" : false,
|
"additionalProperties" : false,
|
||||||
"description" : "Cost to build this building",
|
"description" : "Resources needed to build building",
|
||||||
"properties" : {
|
"properties" : {
|
||||||
"gold" : { "type" : "number"},
|
"gold" : { "type" : "number"},
|
||||||
"wood" : { "type" : "number"},
|
"wood" : { "type" : "number"},
|
||||||
@@ -69,11 +69,11 @@
|
|||||||
"crystal" : { "type" : "number"},
|
"crystal" : { "type" : "number"},
|
||||||
"gems" : { "type" : "number"}
|
"gems" : { "type" : "number"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"produce" : {
|
"produce" : {
|
||||||
"type" : "object",
|
"type" : "object",
|
||||||
"additionalProperties" : false,
|
"additionalProperties" : false,
|
||||||
"description" : "Resources this building produce each day",
|
"description" : "Resources produced each day by this building",
|
||||||
"properties" : {
|
"properties" : {
|
||||||
"gold" : { "type" : "number"},
|
"gold" : { "type" : "number"},
|
||||||
"wood" : { "type" : "number"},
|
"wood" : { "type" : "number"},
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
},
|
},
|
||||||
"area" : {
|
"area" : {
|
||||||
"type" : "string",
|
"type" : "string",
|
||||||
"description" : "Area that indicate when building is selected. Must be 8-bit image",
|
"description" : "Area that indicate when building is selected.",
|
||||||
"format" : "imageFile"
|
"format" : "imageFile"
|
||||||
},
|
},
|
||||||
"border" : {
|
"border" : {
|
||||||
|
@@ -2,10 +2,6 @@
|
|||||||
|
|
||||||
Artifact bonuses use [Bonus Format](../Bonus_Format.md)
|
Artifact bonuses use [Bonus Format](../Bonus_Format.md)
|
||||||
|
|
||||||
TODO:
|
|
||||||
|
|
||||||
- Artifacts growing with Commander level
|
|
||||||
|
|
||||||
## Required data
|
## Required data
|
||||||
|
|
||||||
In order to make functional artifact you also need:
|
In order to make functional artifact you also need:
|
||||||
@@ -16,50 +12,72 @@ In order to make functional artifact you also need:
|
|||||||
|
|
||||||
## Format
|
## Format
|
||||||
|
|
||||||
``` javascript
|
``` jsonc
|
||||||
{
|
{
|
||||||
//what kind of bearer can use this artifact
|
// Type of this artifact - creature, hero or commander
|
||||||
"type": ["HERO", "CREATURE", "COMMANDER"]
|
"type": ["HERO", "CREATURE", "COMMANDER"]
|
||||||
|
|
||||||
//TREASURE, MINOR, MAJOR, RELIC, SPECIAL
|
// TREASURE, MINOR, MAJOR, RELIC, SPECIAL
|
||||||
"class": "TREASURE",
|
"class": "TREASURE",
|
||||||
|
|
||||||
//SHOULDERS, NECK, RIGHT_HAND, LEFT_HAND, TORSO, RIGHT_RING, LEFT_RING, FEET, MISC1, MISC2, MISC3, MISC4,
|
// Slot(s) to which this artifact can be put, if applicable
|
||||||
//MACH1, MACH2, MACH3, MACH4, SPELLBOOK, MISC5
|
// SHOULDERS, NECK, RIGHT_HAND, LEFT_HAND, TORSO, RIGHT_RING, LEFT_RING, FEET, MISC1, MISC2, MISC3, MISC4,
|
||||||
//also possible MISC, RING
|
// MACH1, MACH2, MACH3, MACH4, SPELLBOOK, MISC5
|
||||||
|
// MISC, RING
|
||||||
"slot": "HEAD",
|
"slot": "HEAD",
|
||||||
|
"slot": [ "LEFT_HAND", "RIGHT_HAND ],
|
||||||
|
|
||||||
//based on ARTRAITS.txt
|
// Cost of this artifact, in gold
|
||||||
"value": 12000,
|
"value": 12000,
|
||||||
|
|
||||||
"text":
|
"text":
|
||||||
{
|
{
|
||||||
|
// Name of the artifact
|
||||||
"name": "Big Sword",
|
"name": "Big Sword",
|
||||||
|
|
||||||
|
// Long description of this artifact
|
||||||
"description": "Big sword gived +10 attack to hero",
|
"description": "Big sword gived +10 attack to hero",
|
||||||
|
|
||||||
|
// Text that visible on picking this artifact on map
|
||||||
"event": "On your travel, you stumble upon big sword. You dust it off and stick in your backpack"
|
"event": "On your travel, you stumble upon big sword. You dust it off and stick in your backpack"
|
||||||
},
|
},
|
||||||
"graphics":
|
"graphics":
|
||||||
{
|
{
|
||||||
|
// Base image for this artifact, used for example in hero screen
|
||||||
"image": "BigSword.png",
|
"image": "BigSword.png",
|
||||||
|
|
||||||
|
// Large image, used for drag-and-drop and popup messages
|
||||||
"large": "BigSword_large.png",
|
"large": "BigSword_large.png",
|
||||||
|
|
||||||
//def file for adventure map
|
//def file for adventure map
|
||||||
"map": "BigSword.def"
|
"map": "BigSword.def"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Bonuses provided by this artifact using bonus system
|
||||||
"bonuses":
|
"bonuses":
|
||||||
{
|
{
|
||||||
Bonus_1,
|
Bonus_1,
|
||||||
Bonus_2
|
Bonus_2
|
||||||
},
|
},
|
||||||
|
|
||||||
//optional, for combined artifacts only
|
// Optional, list of components for combinational artifacts
|
||||||
"components":
|
"components":
|
||||||
[
|
[
|
||||||
"artifact1",
|
"artifact1",
|
||||||
"artifact2",
|
"artifact2",
|
||||||
"artifact3"
|
"artifact3"
|
||||||
],
|
],
|
||||||
|
|
||||||
//if set with artifact works like war machine
|
// Creature id to use on battle field. If set, this artifact is war machine
|
||||||
"warMachine" : "some.creature"
|
"warMachine" : "some.creature"
|
||||||
|
|
||||||
|
// If set to true, artifact won't spawn on a map without water
|
||||||
|
"onlyOnWaterMap" : false,
|
||||||
|
|
||||||
|
// TODO: document
|
||||||
|
"growing" : {
|
||||||
|
"bonusesPerLevel" : {},
|
||||||
|
"thresholdBonuses" : {},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@@ -25,7 +25,7 @@ In order to make functional creature you also need:
|
|||||||
// camelCase unique creature identifier
|
// camelCase unique creature identifier
|
||||||
"creatureName" :
|
"creatureName" :
|
||||||
{
|
{
|
||||||
// translatable names
|
// Translatable names for this creature
|
||||||
"name" :
|
"name" :
|
||||||
{
|
{
|
||||||
"singular" : "Creature",
|
"singular" : "Creature",
|
||||||
@@ -33,12 +33,13 @@ In order to make functional creature you also need:
|
|||||||
},
|
},
|
||||||
"level" : 0,
|
"level" : 0,
|
||||||
|
|
||||||
// if set to true creature will not appear in-game randomly (e.g. as neutral creature)
|
// Marks this object as special and not available by default
|
||||||
"special" : true,
|
"special" : true,
|
||||||
|
|
||||||
// config name of faction. Examples: castle, rampart
|
// Faction this creature belongs to. Examples: castle, rampart
|
||||||
"faction" : "",
|
"faction" : "",
|
||||||
// cost to recruit, zero values can be omitted.
|
|
||||||
|
// Cost to recruit this creature, zero values can be omitted.
|
||||||
"cost" :
|
"cost" :
|
||||||
{
|
{
|
||||||
"wood" : 0,
|
"wood" : 0,
|
||||||
@@ -52,75 +53,80 @@ In order to make functional creature you also need:
|
|||||||
// "value" of creature, used to determine for example army strength
|
// "value" of creature, used to determine for example army strength
|
||||||
"fightValue" : 0,
|
"fightValue" : 0,
|
||||||
|
|
||||||
// "ai value" - how valuable this creature should be for AI
|
// Describes how valuable this creature is to AI. Usually similar to fightValue
|
||||||
"aiValue" : 0,
|
"aiValue" : 0,
|
||||||
|
|
||||||
// normal growth in town or external dwellings
|
// Basic growth of this creature in town or in external dwellings
|
||||||
"growth" : 0,
|
"growth" : 0,
|
||||||
|
|
||||||
// growth bonus from horde building
|
// Bonus growth of this creature from built horde
|
||||||
// TODO: reconsider need of this field after configurable buildings support
|
|
||||||
"hordeGrowth" : 0,
|
"hordeGrowth" : 0,
|
||||||
|
|
||||||
// Creature stats in battle
|
// Creature stats in battle
|
||||||
"attack" : 0,
|
"attack" : 0,
|
||||||
"defense" : 0,
|
"defense" : 0,
|
||||||
"hitPoints" : 0,
|
"hitPoints" : 0,
|
||||||
"shots" : 0,
|
|
||||||
"speed" : 0,
|
"speed" : 0,
|
||||||
"damage" :
|
"damage" :
|
||||||
{
|
{
|
||||||
"min" : 0,
|
"min" : 0,
|
||||||
"max" : 0
|
"max" : 0
|
||||||
},
|
},
|
||||||
// spellpoints this creature has, how many times creature may cast its spells
|
|
||||||
|
// Number of shots this creature has, required only for ranged units
|
||||||
|
"shots" : 0,
|
||||||
|
|
||||||
|
// Spell points this creature has (usually equal to number of casts)
|
||||||
"spellPoints" : 0,
|
"spellPoints" : 0,
|
||||||
// initial size of creature army on adventure map
|
|
||||||
|
// Initial size of random stacks on adventure map
|
||||||
"advMapAmount" :
|
"advMapAmount" :
|
||||||
{
|
{
|
||||||
"min" : 0,
|
"min" : 0,
|
||||||
"max" : 0
|
"max" : 0
|
||||||
},
|
},
|
||||||
|
|
||||||
// Creature to which this creature can be upgraded
|
// List of creatures to which this one can be upgraded
|
||||||
// Note that only one upgrade can be available from UI
|
|
||||||
"upgrades" :
|
"upgrades" :
|
||||||
[
|
[
|
||||||
"anotherCreature"
|
"anotherCreature"
|
||||||
],
|
],
|
||||||
|
|
||||||
// Creature is 2-tiles in size on the battlefield
|
// If set, creature will be two tiles wide on battlefield
|
||||||
"doubleWide" : false,
|
"doubleWide" : false,
|
||||||
|
|
||||||
// All creature abilities, using bonus format
|
// Creature abilities described using Bonus system
|
||||||
"abilities" :
|
"abilities" :
|
||||||
[
|
[
|
||||||
"someName1" : Bonus Format,
|
"someName1" : Bonus Format,
|
||||||
"someName2" : Bonus Format
|
"someName2" : Bonus Format
|
||||||
],
|
],
|
||||||
|
|
||||||
|
// creature may receive "week of" events
|
||||||
"hasDoubleWeek": true,
|
"hasDoubleWeek": true,
|
||||||
|
|
||||||
"graphics" :
|
"graphics" :
|
||||||
{
|
{
|
||||||
// name of file with creature battle animation
|
// File with animation of this creature in battles
|
||||||
"animation" : "",
|
"animation" : "",
|
||||||
// adventure map animation def
|
// File with animation of this creature on adventure map
|
||||||
"map" : "",
|
"map" : "",
|
||||||
// path to small icon for tooltips & hero exchange window
|
// Optional. Object mask that describes on which tiles object is visible/blocked/activatable
|
||||||
|
"mapMask" : [ "VV", "VA" ],
|
||||||
|
|
||||||
|
// Small icon for this creature, used for example in exchange screen
|
||||||
"iconSmall" : "",
|
"iconSmall" : "",
|
||||||
// path to large icon, used on town screen and in hero screen
|
// Large icon for this creature, used for example in town screen
|
||||||
"iconLarge" : "",
|
"iconLarge" : "",
|
||||||
|
|
||||||
// animation parameters
|
// animation parameters
|
||||||
|
|
||||||
// how often creature should play idle animation
|
// how often creature should play idle animation
|
||||||
"timeBetweenFidgets" : 1.00,
|
"timeBetweenFidgets" : 1.00,
|
||||||
// unused H3 property
|
|
||||||
"troopCountLocationOffset" : 0,
|
|
||||||
"animationTime" :
|
"animationTime" :
|
||||||
{
|
{
|
||||||
// movement animation time.
|
// movement animation time factor
|
||||||
"walk" : 1.00,
|
"walk" : 1.00,
|
||||||
|
|
||||||
// idle animation time. For H3 creatures this value is always 10
|
// idle animation time. For H3 creatures this value is always 10
|
||||||
@@ -128,19 +134,15 @@ In order to make functional creature you also need:
|
|||||||
|
|
||||||
// ranged attack animation time. Applicable to shooting and casting animation
|
// ranged attack animation time. Applicable to shooting and casting animation
|
||||||
// NOTE: does NOT affects melee attacks
|
// NOTE: does NOT affects melee attacks
|
||||||
// This is H3 behaviour, for proper synchronization of attack/defense animations
|
// This is H3 behaviour, likely for proper synchronization of attack/defense animations
|
||||||
"attack" : 1.00,
|
"attack" : 1.00,
|
||||||
|
|
||||||
// How far flying creature should move during one "round" of movement animation
|
|
||||||
// This is multiplier to base value (200 pixels)
|
|
||||||
"flight" : 1.00
|
|
||||||
},
|
},
|
||||||
"missile" :
|
"missile" :
|
||||||
{
|
{
|
||||||
// name of file for missile
|
// name of file for missile
|
||||||
"animation" : "",
|
"animation" : "",
|
||||||
|
|
||||||
// (VCMI 1.1 or later only) indicates that creature uses ray animation for ranged attacks instead of missile image (e.g. Evil Eye)
|
// indicates that creature uses ray animation for ranged attacks instead of missile image (e.g. Evil Eye)
|
||||||
"ray" :
|
"ray" :
|
||||||
[
|
[
|
||||||
{ // definition of first (top-most) line in the ray
|
{ // definition of first (top-most) line in the ray
|
||||||
@@ -153,7 +155,7 @@ In order to make functional creature you also need:
|
|||||||
// Frame at which shooter shoots his projectile (e.g. releases arrow)
|
// Frame at which shooter shoots his projectile (e.g. releases arrow)
|
||||||
"attackClimaxFrame" : 0,
|
"attackClimaxFrame" : 0,
|
||||||
|
|
||||||
// offsets between position of shooter and position where projectile should appear
|
// Position where projectile image appears during shooting in specific direction
|
||||||
"offset" :
|
"offset" :
|
||||||
{
|
{
|
||||||
"upperX" : 0,
|
"upperX" : 0,
|
||||||
@@ -190,6 +192,19 @@ In order to make functional creature you also need:
|
|||||||
// Creature start/end movement or teleports
|
// Creature start/end movement or teleports
|
||||||
"startMoving" : "",
|
"startMoving" : "",
|
||||||
"endMoving" : ""
|
"endMoving" : ""
|
||||||
}
|
},
|
||||||
|
|
||||||
|
// Stack experience, using bonus system
|
||||||
|
"stackExperience" : [
|
||||||
|
{
|
||||||
|
// Bonus description
|
||||||
|
"bonus" : { BONUS_FORMAT },
|
||||||
|
// Per-level value of bonus. Must have 10 elements
|
||||||
|
"values" : [
|
||||||
|
0, 0, 1, 1, 2, 2, 3, 3, 4, 4
|
||||||
|
]
|
||||||
|
},
|
||||||
|
...
|
||||||
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
@@ -12,16 +12,12 @@ In order to make functional town you also need:
|
|||||||
- Mage guild window view (1 image)
|
- Mage guild window view (1 image)
|
||||||
- Town hall background (1 image)
|
- Town hall background (1 image)
|
||||||
|
|
||||||
<!-- -->
|
|
||||||
|
|
||||||
- Set of town icons, consists from all possible combinations of: (8
|
- Set of town icons, consists from all possible combinations of: (8
|
||||||
images total)
|
images total)
|
||||||
- small and big icons
|
- small and big icons
|
||||||
- village and fort icons
|
- village and fort icons
|
||||||
- built and normal icons
|
- built and normal icons
|
||||||
|
|
||||||
<!-- -->
|
|
||||||
|
|
||||||
- Set for castle siege screen, consists from:
|
- Set for castle siege screen, consists from:
|
||||||
- Background (1 image)
|
- Background (1 image)
|
||||||
- Destructible towers (3 parts, 3 images each)
|
- Destructible towers (3 parts, 3 images each)
|
||||||
@@ -49,18 +45,18 @@ Each town requires a set of buildings (Around 30-45 buildings)
|
|||||||
|
|
||||||
## Faction node (root entry for town configuration)
|
## Faction node (root entry for town configuration)
|
||||||
|
|
||||||
``` javascript
|
```jsonc
|
||||||
// Unique faction identifier. Should be unique.
|
// Unique faction identifier.
|
||||||
"myTown" :
|
"myFaction" :
|
||||||
{
|
{
|
||||||
// Main part of town description, see below
|
// Main part of town description, see below
|
||||||
// Optional but it should be present for playable faction
|
// Optional but it should be present for playable faction
|
||||||
"town" : { ... },
|
"town" : { ... },
|
||||||
|
|
||||||
// Native terrain for this town. See config/terrains.json for identifiers
|
// Native terrain for creatures. Creatures fighting on native terrain receive several bonuses
|
||||||
"nativeTerrain" : "grass",
|
"nativeTerrain" : "grass",
|
||||||
|
|
||||||
// Localizable town name, e.g. "Rampart"
|
// Localizable faction name, e.g. "Rampart"
|
||||||
"name" : "",
|
"name" : "",
|
||||||
|
|
||||||
// Faction alignment. Can be good, neutral (default) or evil.
|
// Faction alignment. Can be good, neutral (default) or evil.
|
||||||
@@ -72,7 +68,13 @@ Each town requires a set of buildings (Around 30-45 buildings)
|
|||||||
// Paths to background images
|
// Paths to background images
|
||||||
"120px" : "",
|
"120px" : "",
|
||||||
"130px" : ""
|
"130px" : ""
|
||||||
}
|
},
|
||||||
|
|
||||||
|
// Identifier of boat type that is produced by shipyard and used by heroes in water taverns or prisons
|
||||||
|
"boat" : "boatFortress",
|
||||||
|
|
||||||
|
// Random map generator places player/cpu-owned towns underground if true is specified and on the ground otherwise. Parameter is unused for maps without underground.
|
||||||
|
"preferUndergroundPlacement" : false
|
||||||
|
|
||||||
// Town puzzle map
|
// Town puzzle map
|
||||||
"puzzleMap" :
|
"puzzleMap" :
|
||||||
@@ -98,17 +100,9 @@ Each town requires a set of buildings (Around 30-45 buildings)
|
|||||||
|
|
||||||
## Town node
|
## Town node
|
||||||
|
|
||||||
``` javascript
|
```jsonc
|
||||||
{
|
{
|
||||||
// DEPRECATED, see "mapObject" field below | Path to images of object on adventure map
|
// Field that describes behavior of map object part of town. Town-specific part of object format
|
||||||
"adventureMap" :
|
|
||||||
{
|
|
||||||
"village": "", // village without built fort
|
|
||||||
"castle" : "", // town with built fort
|
|
||||||
"capitol": "" // town with capitol (usually have some additional flags)
|
|
||||||
},
|
|
||||||
|
|
||||||
// field that describes behavior of map object part of town. Town-specific part of object format
|
|
||||||
"mapObject" :
|
"mapObject" :
|
||||||
{
|
{
|
||||||
// Optional, controls what template will be used to display this object.
|
// Optional, controls what template will be used to display this object.
|
||||||
@@ -174,21 +168,20 @@ Each town requires a set of buildings (Around 30-45 buildings)
|
|||||||
// Small scenery for window in mage guild screen
|
// Small scenery for window in mage guild screen
|
||||||
"guildWindow": "",
|
"guildWindow": "",
|
||||||
|
|
||||||
// Background image for window in mage guild screen - since 0.95b
|
// Background image for window in mage guild screen
|
||||||
"guildBackground" : "",
|
"guildBackground" : "",
|
||||||
|
|
||||||
// Video for tavern window - since 0.95b
|
// Video for tavern window
|
||||||
"tavernVideo" : "",
|
"tavernVideo" : "",
|
||||||
|
|
||||||
// Building icons for town hall
|
// Path to building icons for town hall
|
||||||
"buildingsIcons": "HALLCSTL.DEF",
|
"buildingsIcons": "HALLCSTL.DEF",
|
||||||
|
|
||||||
// Background image for town hall window
|
// Background image for town hall window
|
||||||
"hallBackground": "",
|
"hallBackground": "",
|
||||||
|
|
||||||
// List of buildings available in each slot of town hall window
|
// List of buildings available in each slot of town hall window
|
||||||
// As in most cases there is no hard limit on number of columns, rows
|
// Note that size of gui is limited to 5 rows and 4 columns
|
||||||
// or items in any of them, but size of gui is limited to 5 rows and 4 columns
|
|
||||||
"hallSlots":
|
"hallSlots":
|
||||||
[
|
[
|
||||||
[ [ "buildingID1" ], [ "buildingID2", "buildingID3" ] ],
|
[ [ "buildingID1" ], [ "buildingID2", "buildingID3" ] ],
|
||||||
@@ -232,19 +225,16 @@ Each town requires a set of buildings (Around 30-45 buildings)
|
|||||||
// Chance of specific spell to appear in mages guild of this town
|
// Chance of specific spell to appear in mages guild of this town
|
||||||
// If spell is missing or set to 0 it will not appear unless set as "always present" in editor
|
// If spell is missing or set to 0 it will not appear unless set as "always present" in editor
|
||||||
// Spells from unavailable levels are not required to be in this list
|
// Spells from unavailable levels are not required to be in this list
|
||||||
// TODO: Mirrored version of field "guildSpells" from spell format
|
|
||||||
"guildSpells" :
|
"guildSpells" :
|
||||||
{
|
{
|
||||||
"magicArrow" : 30,
|
"magicArrow" : 30,
|
||||||
"bless" : 10
|
"bless" : 10
|
||||||
},
|
},
|
||||||
|
|
||||||
// TODO: Entries below should be replaced with autodetection
|
|
||||||
|
|
||||||
// Which tiers in this town have creature hordes. Set to -1 to disable horde(s)
|
// Which tiers in this town have creature hordes. Set to -1 to disable horde(s)
|
||||||
"horde" : [ 2, -1 ],
|
"horde" : [ 2, -1 ],
|
||||||
|
|
||||||
// Resource given by starting bonus, if not set silo will produce wood + ore
|
// Resource given by starting bonus. If not set silo will produce wood + ore
|
||||||
"primaryResource" : "gems",
|
"primaryResource" : "gems",
|
||||||
|
|
||||||
// maximum level of mage guild
|
// maximum level of mage guild
|
||||||
@@ -252,12 +242,15 @@ Each town requires a set of buildings (Around 30-45 buildings)
|
|||||||
|
|
||||||
// war machine produced in town
|
// war machine produced in town
|
||||||
"warMachine" : "ballista"
|
"warMachine" : "ballista"
|
||||||
|
|
||||||
|
// Identifier of spell that will create effects for town moat during siege
|
||||||
|
"moatAbility" : "castleMoat"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Siege node
|
## Siege node
|
||||||
|
|
||||||
``` javascript
|
```jsonc
|
||||||
// Describes town siege screen
|
// Describes town siege screen
|
||||||
// Comments in the end of each graphic position indicate specify required suffix for image
|
// Comments in the end of each graphic position indicate specify required suffix for image
|
||||||
// Note: one not included image is battlefield background with suffix "BACK"
|
// Note: one not included image is battlefield background with suffix "BACK"
|
||||||
@@ -265,13 +258,13 @@ Each town requires a set of buildings (Around 30-45 buildings)
|
|||||||
// shooter creature name
|
// shooter creature name
|
||||||
"shooter" : "archer",
|
"shooter" : "archer",
|
||||||
|
|
||||||
// (VCMI 1.1 or later) Large icon of towers, for use in battle queue
|
// Large icon of towers, for use in battle queue
|
||||||
"towerIconLarge" : "",
|
"towerIconLarge" : "",
|
||||||
|
|
||||||
// (VCMI 1.1 or later) Small icon of towers, for use in battle queue
|
// (Small icon of towers, for use in battle queue
|
||||||
"towerIconSmall" : "",
|
"towerIconSmall" : "",
|
||||||
|
|
||||||
// prefix for all siege images. Final name will be composed as <prefix><suffix>
|
// Prefix for all siege images. Final name will be composed as <prefix><suffix>
|
||||||
"imagePrefix" : "SGCS",
|
"imagePrefix" : "SGCS",
|
||||||
|
|
||||||
// Descriptions for towers. Each tower consist from 3 parts:
|
// Descriptions for towers. Each tower consist from 3 parts:
|
||||||
@@ -302,7 +295,7 @@ Each town requires a set of buildings (Around 30-45 buildings)
|
|||||||
"creature" : { "x": 0, "y": 0}
|
"creature" : { "x": 0, "y": 0}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
//Two parts of gate: gate itself and arch above it
|
// Two parts of gate: gate itself and arch above it
|
||||||
"gate" :
|
"gate" :
|
||||||
{
|
{
|
||||||
"gate" : { "x": 0, "y": 0}, // "DRW1" ... "DRW3" and "DRWC" (rope)
|
"gate" : { "x": 0, "y": 0}, // "DRW1" ... "DRW3" and "DRWC" (rope)
|
||||||
@@ -317,8 +310,13 @@ Each town requires a set of buildings (Around 30-45 buildings)
|
|||||||
"bottomMid" : { "x": 0, "y": 0}, // "WA31" ... "WA33"
|
"bottomMid" : { "x": 0, "y": 0}, // "WA31" ... "WA33"
|
||||||
"bottom" : { "x": 0, "y": 0} // "WA11" ... "WA13"
|
"bottom" : { "x": 0, "y": 0} // "WA11" ... "WA13"
|
||||||
},
|
},
|
||||||
// Two pieces for moat: moat itself and shore
|
|
||||||
"moat" : { "x": 0, "y": 0}, // moat: "MOAT", shore: "MLIP"
|
// Two pieces for moat: moat itself and moat bank
|
||||||
|
"moat" :
|
||||||
|
{
|
||||||
|
"bank" : { "x" : 0, "y" : 0 }, // "MOAT"
|
||||||
|
"moat" : { "x" : 0, "y" : 0 } // "MLIP"
|
||||||
|
},
|
||||||
|
|
||||||
// Static non-destructible walls. All of them have only one piece
|
// Static non-destructible walls. All of them have only one piece
|
||||||
"static" :
|
"static" :
|
||||||
@@ -337,28 +335,56 @@ Each town requires a set of buildings (Around 30-45 buildings)
|
|||||||
|
|
||||||
## Building node
|
## Building node
|
||||||
|
|
||||||
``` javascript
|
```jsonc
|
||||||
{
|
{
|
||||||
|
// Numeric identifier of this building
|
||||||
"id" : 0,
|
"id" : 0,
|
||||||
|
|
||||||
|
// Localizable name of this building
|
||||||
"name" : "",
|
"name" : "",
|
||||||
|
|
||||||
|
// Localizable decsription of this building
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"upgrades" : "baseBuilding", // optional, which building can be upgraded by this one
|
|
||||||
"requires" : [ "allOf", [ "mageGuild1" ], [ "tavern" ] ], // building requirements, H3-style. See below for full format.
|
// Optional, indicates that this building upgrades another base building
|
||||||
"cost" : { ... }, //resources needed to buy building
|
"upgrades" : "baseBuilding",
|
||||||
"produce" : { ... }, //resources produced each day by building - since 0.95b
|
|
||||||
|
// List of town buildings that must be built before this one. See below for full format
|
||||||
|
"requires" : [ "allOf", [ "mageGuild1" ], [ "tavern" ] ],
|
||||||
|
|
||||||
|
// Resources needed to build building
|
||||||
|
"cost" : { ... },
|
||||||
|
|
||||||
|
// TODO: Document me: Subtype for some special buildings
|
||||||
|
"type" : "",
|
||||||
|
|
||||||
|
// TODO: Document me: Height for lookout towers and some grails
|
||||||
|
"height" : "average"
|
||||||
|
|
||||||
|
// Resources produced each day by this building
|
||||||
|
"produce" : { ... },
|
||||||
|
|
||||||
//determine how this building can be built. Possible values are:
|
//determine how this building can be built. Possible values are:
|
||||||
// normal - default value. Fulfill requirements, use resources, spend one day
|
// normal - default value. Fulfill requirements, use resources, spend one day
|
||||||
// auto - building appears when all requirements are built
|
// auto - building appears when all requirements are built
|
||||||
// special - building can not be built manually
|
// special - building can not be built manually
|
||||||
// grail - building reqires grail to be built
|
// grail - building reqires grail to be built
|
||||||
"mode" : "auto"
|
"mode" : "auto",
|
||||||
|
|
||||||
|
// Buildings which bonuses should be overridden with bonuses of the current building
|
||||||
|
"overrides" : [ "anotherBuilding ]
|
||||||
|
|
||||||
|
// Bonuses, provided by this special building on build using bonus system
|
||||||
|
"bonuses" : BONUS_FORMAT
|
||||||
|
|
||||||
|
// Bonuses, provided by this special building on hero visit and applied to the visiting hero
|
||||||
|
"onVisitBonuses" : BONUS_FORMAT
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Building requirements can be described using logical expressions:
|
Building requirements can be described using logical expressions:
|
||||||
|
|
||||||
``` javascript
|
```jsonc
|
||||||
"requires" :
|
"requires" :
|
||||||
[
|
[
|
||||||
"allOf", // Normal H3 "build all" mode
|
"allOf", // Normal H3 "build all" mode
|
||||||
@@ -378,13 +404,30 @@ Building requirements can be described using logical expressions:
|
|||||||
|
|
||||||
## Structure node
|
## Structure node
|
||||||
|
|
||||||
``` javascript
|
```jsonc
|
||||||
{
|
{
|
||||||
"animation" : "", // def file with animation
|
// Main animation file for this building
|
||||||
|
"animation" : "",
|
||||||
|
|
||||||
|
// Horizontal position on town screen
|
||||||
"x" : 0,
|
"x" : 0,
|
||||||
|
|
||||||
|
// Vertical position on town screen
|
||||||
"y" : 0,
|
"y" : 0,
|
||||||
"z" : 0, // used for blit order. Higher value places structure close to screen
|
|
||||||
"border" : "", // selection highlight
|
// used for blit order. Higher value places structure close to screen and drawn on top of buildings with lower values
|
||||||
"area" : "" // used to detect building selection
|
"z" : 0,
|
||||||
|
|
||||||
|
// Path to image with golden border around building, displayed when building is selected
|
||||||
|
"border" : "",
|
||||||
|
|
||||||
|
// Path to image with area that indicate when building is selected
|
||||||
|
"area" : "",
|
||||||
|
|
||||||
|
//TODO: describe me
|
||||||
|
"builds": "",
|
||||||
|
|
||||||
|
// If upgrade, this building will replace parent animation but will not alter its behaviour
|
||||||
|
"hidden" : false
|
||||||
}
|
}
|
||||||
```
|
```
|
@@ -61,8 +61,7 @@ In order to make functional hero class you also need:
|
|||||||
"knowledge" : 2
|
"knowledge" : 2
|
||||||
},
|
},
|
||||||
|
|
||||||
// Chance to get specific primary skill on level-up
|
// Chance to get specific primary skill on level-up, applicable for levels less than 10
|
||||||
// This set specifies chances for levels 2-9
|
|
||||||
"lowLevelChance" :
|
"lowLevelChance" :
|
||||||
{
|
{
|
||||||
"attack" : 15,
|
"attack" : 15,
|
||||||
@@ -71,8 +70,7 @@ In order to make functional hero class you also need:
|
|||||||
"knowledge" : 25
|
"knowledge" : 25
|
||||||
},
|
},
|
||||||
|
|
||||||
// Chance to get specific primary skill on level-up
|
// Chance to get specific primary skill on level-up, applicable for levels starting from 10
|
||||||
// This set specifies chances for levels starting from 10
|
|
||||||
"highLevelChance" :
|
"highLevelChance" :
|
||||||
{
|
{
|
||||||
"attack" : 25,
|
"attack" : 25,
|
||||||
@@ -82,7 +80,7 @@ In order to make functional hero class you also need:
|
|||||||
},
|
},
|
||||||
|
|
||||||
// Chance to get specific secondary skill on level-up
|
// Chance to get specific secondary skill on level-up
|
||||||
// Skills not listed here will be considered as unavailable, including universities
|
// All missing skills are considered to be banned, including universities
|
||||||
"secondarySkills" :
|
"secondarySkills" :
|
||||||
{
|
{
|
||||||
"pathfinding" : 3.
|
"pathfinding" : 3.
|
||||||
|
@@ -12,10 +12,10 @@ In order to make functional hero you also need:
|
|||||||
``` javascript
|
``` javascript
|
||||||
"myHeroName" :
|
"myHeroName" :
|
||||||
{
|
{
|
||||||
// Identifier of class. Usually camelCase version of human-readable name
|
// Identifier of class this hero belongs to. Such as knight or battleMage
|
||||||
"class" : "wizard",
|
"class" : "wizard",
|
||||||
|
|
||||||
// List of starting spells, if available. Will also grant spellbook
|
// List of starting spells, if available. This entry (even empty) will also grant spellbook
|
||||||
"spellbook" :
|
"spellbook" :
|
||||||
[
|
[
|
||||||
"magicArrow"
|
"magicArrow"
|
||||||
@@ -26,6 +26,12 @@ In order to make functional hero you also need:
|
|||||||
|
|
||||||
// If set to true hero will be unavailable on start and won't appear in taverns (campaign heroes)
|
// If set to true hero will be unavailable on start and won't appear in taverns (campaign heroes)
|
||||||
"special" : true,
|
"special" : true,
|
||||||
|
|
||||||
|
// If set to true, hero won't show up on a map with water
|
||||||
|
"onlyOnWaterMap" : false,
|
||||||
|
|
||||||
|
// If set to true, hero will show up only if the map contains no water
|
||||||
|
"onlyOnMapWithoutWater" : false,
|
||||||
|
|
||||||
// All translatable texts related to hero
|
// All translatable texts related to hero
|
||||||
"texts" :
|
"texts" :
|
||||||
@@ -61,11 +67,10 @@ In order to make functional hero you also need:
|
|||||||
|
|
||||||
// Small 48x32px portrait
|
// Small 48x32px portrait
|
||||||
"small" : "myMod/myHero/small.png"
|
"small" : "myMod/myHero/small.png"
|
||||||
|
|
||||||
// Class-independent animation in battle
|
|
||||||
"small" : "myMod/myHero/battle.def"
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Custom animation to be used on battle, overrides hero class property
|
||||||
|
"battleImage" : "heroInBattle.def"
|
||||||
|
|
||||||
// Initial hero army when recruited in tavern
|
// Initial hero army when recruited in tavern
|
||||||
// Must have 1-3 elements
|
// Must have 1-3 elements
|
||||||
@@ -95,7 +100,7 @@ In order to make functional hero you also need:
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
// List of skills received by hero
|
// List of skills initially known by hero
|
||||||
// Not limited by size - you can add as many skills as you wish
|
// Not limited by size - you can add as many skills as you wish
|
||||||
"skills" :
|
"skills" :
|
||||||
[
|
[
|
||||||
|
@@ -2,21 +2,39 @@
|
|||||||
|
|
||||||
## Main format
|
## Main format
|
||||||
|
|
||||||
``` javascript
|
```jsonc
|
||||||
{
|
{
|
||||||
"skillName":
|
"skillName":
|
||||||
{
|
{
|
||||||
//numeric id of skill required only for original skills, prohibited for new skills
|
//Mandatory, localizable skill name
|
||||||
"index": 0,
|
"name": "Localizable name",
|
||||||
//Mandatory
|
|
||||||
"name": "Localizable name",
|
// Optional base format, will be merged with basic/advanced/expert
|
||||||
//optional base format, will be merged with basic/advanced/expert
|
"base": {Skill level base format},
|
||||||
"base": {Skill level base format},
|
|
||||||
//configuration for different skill levels
|
// Configuration for different skill levels
|
||||||
"basic": {Skill level format},
|
"basic": {Skill level format},
|
||||||
"advanced": {Skill level format},
|
"advanced": {Skill level format},
|
||||||
"expert": {Skill level format}
|
"expert": {Skill level format},
|
||||||
}
|
|
||||||
|
// Chance for the skill to be offered on level-up (heroClass may override)
|
||||||
|
"gainChance" : {
|
||||||
|
// Chance for hero classes with might affinity
|
||||||
|
"might" : 4,
|
||||||
|
// Chance for hero classes with magic affinity
|
||||||
|
"magic" : 6,
|
||||||
|
// Chance for specific classes
|
||||||
|
"knight" : 2,
|
||||||
|
"cleric" : 8,
|
||||||
|
...
|
||||||
|
},
|
||||||
|
|
||||||
|
// This skill is major obligatory (like H3 Wisdom) and is guaranteed to be offered once per specific number of levels
|
||||||
|
"obligatoryMajor" : false,
|
||||||
|
|
||||||
|
// This skill is minor obligatory (like H3 Magic school) and is guaranteed to be offered once per specific number of levels
|
||||||
|
"obligatoryMinor" : false,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -28,19 +46,30 @@ level fields become optional if they equal "base" configuration.
|
|||||||
|
|
||||||
## Skill level format
|
## Skill level format
|
||||||
|
|
||||||
``` javascript
|
```jsonc
|
||||||
{
|
{
|
||||||
//Optional, localizable description
|
// Localizable description
|
||||||
//Use {xxx} for formatting
|
// Use {xxx} for formatting
|
||||||
"description": "",
|
"description": "",
|
||||||
//Bonuses provided by skill at given level
|
|
||||||
//If different levels provide same bonus with different val, only the highest applies
|
// Bonuses provided by skill at given level
|
||||||
"effects":
|
// If different levels provide same bonus with different val, only the highest applies
|
||||||
{
|
"effects":
|
||||||
"firstEffect": {bonus format},
|
{
|
||||||
"secondEffect": {bonus format}
|
"firstEffect": {bonus format},
|
||||||
//...
|
"secondEffect": {bonus format}
|
||||||
}
|
//...
|
||||||
|
},
|
||||||
|
|
||||||
|
// Skill icons of varying size
|
||||||
|
"images" : {
|
||||||
|
// 32x32 skill icon
|
||||||
|
"small" : "",
|
||||||
|
// 44x44 skill icon
|
||||||
|
"medium" : "",
|
||||||
|
// 82x93 skill icon
|
||||||
|
"large" : "",
|
||||||
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -49,40 +78,40 @@ level fields become optional if they equal "base" configuration.
|
|||||||
The following modifies the tactics skill to grant an additional speed
|
The following modifies the tactics skill to grant an additional speed
|
||||||
boost at advanced and expert levels.
|
boost at advanced and expert levels.
|
||||||
|
|
||||||
``` javascript
|
```jsonc
|
||||||
"core:tactics" : {
|
"core:tactics" : {
|
||||||
"base" : {
|
"base" : {
|
||||||
"effects" : {
|
"effects" : {
|
||||||
"main" : {
|
"main" : {
|
||||||
"subtype" : "skill.tactics",
|
"subtype" : "skill.tactics",
|
||||||
"type" : "SECONDARY_SKILL_PREMY",
|
"type" : "SECONDARY_SKILL_PREMY",
|
||||||
"valueType" : "BASE_NUMBER"
|
"valueType" : "BASE_NUMBER"
|
||||||
},
|
},
|
||||||
"xtra" : {
|
"xtra" : {
|
||||||
"type" : "STACKS_SPEED",
|
"type" : "STACKS_SPEED",
|
||||||
"valueType" : "BASE_NUMBER"
|
"valueType" : "BASE_NUMBER"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"basic" : {
|
"basic" : {
|
||||||
"effects" : {
|
"effects" : {
|
||||||
"main" : { "val" : 3 },
|
"main" : { "val" : 3 },
|
||||||
"xtra" : { "val" : 0 }
|
"xtra" : { "val" : 0 }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"advanced" : {
|
"advanced" : {
|
||||||
"description" : "{Advanced Tactics}\n\nAllows you to rearrange troups within 5 hex rows, and increases their speed by 1.",
|
"description" : "{Advanced Tactics}\n\nAllows you to rearrange troups within 5 hex rows, and increases their speed by 1.",
|
||||||
"effects" : {
|
"effects" : {
|
||||||
"main" : { "val" : 5 },
|
"main" : { "val" : 5 },
|
||||||
"xtra" : { "val" : 1 }
|
"xtra" : { "val" : 1 }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"expert" : {
|
"expert" : {
|
||||||
"description" : "{Expert Tactics}\n\nAllows you to rearrange troups within 7 hex rows, and increases their speed by 2.",
|
"description" : "{Expert Tactics}\n\nAllows you to rearrange troups within 7 hex rows, and increases their speed by 2.",
|
||||||
"effects" : {
|
"effects" : {
|
||||||
"main" : { "val" : 7 },
|
"main" : { "val" : 7 },
|
||||||
"xtra" : { "val" : 2 }
|
"xtra" : { "val" : 2 }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
@@ -566,7 +566,8 @@ std::vector<JsonNode> CCreatureHandler::loadLegacyData()
|
|||||||
data["advMapAmount"]["min"].Float() = parser.readNumber();
|
data["advMapAmount"]["min"].Float() = parser.readNumber();
|
||||||
data["advMapAmount"]["max"].Float() = parser.readNumber();
|
data["advMapAmount"]["max"].Float() = parser.readNumber();
|
||||||
|
|
||||||
data["abilityText"].String() = parser.readString();
|
// unused - ability text, not used since we no longer have original creature window
|
||||||
|
parser.readString();
|
||||||
loadBonuses(data, parser.readString()); //Attributes
|
loadBonuses(data, parser.readString()); //Attributes
|
||||||
|
|
||||||
h3Data.push_back(data);
|
h3Data.push_back(data);
|
||||||
|
Reference in New Issue
Block a user