mirror of
https://github.com/vcmi/vcmi.git
synced 2026-06-19 22:57:37 +02:00
Now `compatibilityIdentifers` field is supported for all game entities. As result it is now possible for mods to provide compatibility support for loading mods and saves made with older version of the mod. Also, added docs to specify what exactly breaks saves with mods updates and ways to avoid that
356 lines
9.9 KiB
JSON
356 lines
9.9 KiB
JSON
{
|
|
"type" : "object",
|
|
"$schema" : "http://json-schema.org/draft-04/schema",
|
|
"title" : "VCMI creature format",
|
|
"description" : "Json format for defining new creatures in VCMI",
|
|
"required" : [ "faction" ],
|
|
"allOf" : [
|
|
{
|
|
"if" : {
|
|
"properties" : {
|
|
"disabled" : {
|
|
"const" : false
|
|
}
|
|
}
|
|
},
|
|
"then" : {
|
|
"required" : [
|
|
"name", "level", "cost", "speed", "hitPoints", "attack", "defense", "damage", "fightValue", "aiValue", "graphics", "sound"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"if" : {
|
|
"properties" : {
|
|
"special" : {
|
|
"const" : false
|
|
},
|
|
"disabled" : {
|
|
"const" : false
|
|
}
|
|
}
|
|
},
|
|
"then" : {
|
|
"required" : [ "advMapAmount" ],
|
|
"properties" : {
|
|
"advMapAmount" : {
|
|
"type" : "object",
|
|
"additionalProperties" : false,
|
|
"description" : "Initial size of random stacks on adventure map",
|
|
"required" : [ "min", "max" ],
|
|
"properties" : {
|
|
"min" : { "type" : "number", "minimum" : 1 },
|
|
"max" : { "type" : "number", "minimum" : 1 }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"additionalProperties" : false,
|
|
"properties" : {
|
|
"compatibilityIdentifiers" : {
|
|
"type" : "array",
|
|
"items" : {
|
|
"type" : "string"
|
|
},
|
|
"description" : "Additional identifiers that may refer to this object, to provide compatibility after object has been renamed"
|
|
},
|
|
"special" : {
|
|
"type" : "boolean",
|
|
"description" : "Marks this object as special and not available by default"
|
|
},
|
|
"disabled" : {
|
|
"type" : "boolean",
|
|
"description" : "Internal. Object is competely disabled and may not be even loaded in-game"
|
|
},
|
|
"excludeFromRandomization" : {
|
|
"type" : "boolean",
|
|
"description" : "If set, this creature will never be picked as random monster and will not appear in Refugee Camp. Random map generator can still pick this creature"
|
|
},
|
|
"name" : {
|
|
"type" : "object",
|
|
"additionalProperties" : false,
|
|
"description" : "Translatable names for this creature",
|
|
"required" : [ "singular", "plural" ],
|
|
"properties" : {
|
|
"singular" : {
|
|
"type" : "string",
|
|
"description" : "Singular version"
|
|
},
|
|
"plural" : {
|
|
"type" : "string",
|
|
"description" : "Plural version"
|
|
}
|
|
}
|
|
},
|
|
"description" : {
|
|
"type" : "string",
|
|
"description" : "Description of creature"
|
|
},
|
|
"faction" : {
|
|
"type" : "string",
|
|
"description" : "Faction this creature belongs to. Examples: castle, rampart"
|
|
},
|
|
"level" : { "type" : "number"},
|
|
"upgrades" : {
|
|
"type" : "array",
|
|
"description" : "List of creatures to which this one can be upgraded",
|
|
"items" : { "type" : "string" }
|
|
},
|
|
"cost" : {
|
|
"type" : "object",
|
|
"additionalProperties" : {
|
|
"type" : "number"
|
|
},
|
|
"description" : "Cost to recruit this creature"
|
|
},
|
|
"speed" : { "type" : "number" },
|
|
"hitPoints" : { "type" : "number" },
|
|
"attack" : { "type" : "number" },
|
|
"defense" : { "type" : "number" },
|
|
"damage" : {
|
|
"type" : "object",
|
|
"additionalProperties" : false,
|
|
"required" : [ "min", "max" ],
|
|
"properties" : {
|
|
"max" : { "type" : "number" },
|
|
"min" : { "type" : "number" }
|
|
}
|
|
},
|
|
"shots" : { "type" : "number" },
|
|
"spellPoints" : {
|
|
"type" : "number",
|
|
"description" : "Spell points this creature has (usually equal to number of casts)"
|
|
},
|
|
"doubleWide" : {
|
|
"type" : "boolean",
|
|
"description" : "If set, creature will be two tiles wide on battlefield"
|
|
},
|
|
"fightValue" : {
|
|
"type" : "number",
|
|
"description" : " \"value\" of creature, used to determine for example army strength"
|
|
},
|
|
"aiValue" : {
|
|
"type" : "number",
|
|
"description" : "Describes how valuable this creature is to AI. Usually similar to fightValue"
|
|
},
|
|
"growth" : {
|
|
"type" : "number",
|
|
"description" : "Basic growth of this creature in town or in external dwellings"
|
|
},
|
|
"horde" : {
|
|
"type" : "number",
|
|
"description" : "Bonus growth of this creature from built horde"
|
|
},
|
|
"advMapAmount" : {
|
|
"type" : "object",
|
|
"additionalProperties" : false,
|
|
"description" : "Initial size of random stacks on adventure map",
|
|
"properties" : {
|
|
"min" : { "type" : "number" },
|
|
"max" : { "type" : "number" }
|
|
}
|
|
},
|
|
"hasDoubleWeek" : {
|
|
"type" : "boolean",
|
|
"description" : "creature may receive \"week of\" events"
|
|
},
|
|
"abilities" : {
|
|
"description" : "Creature abilities described using Bonus system",
|
|
"type" : "object",
|
|
"additionalProperties" : {
|
|
"$ref" : "bonusInstance.json"
|
|
}
|
|
},
|
|
"graphics" : {
|
|
"type" : "object",
|
|
"additionalProperties" : false,
|
|
"description" : "Describes how this creature looks like",
|
|
"required" : [
|
|
"animation", "animationTime", "timeBetweenFidgets"
|
|
],
|
|
"properties" : {
|
|
"animation" : {
|
|
"type" : "string",
|
|
"description" : "File with animation of this creature in battles",
|
|
"format" : "animationFile"
|
|
},
|
|
"map" : {
|
|
"type" : "string",
|
|
"description" : "File with animation of this creature on adventure map",
|
|
"format" : "animationFile"
|
|
},
|
|
"mapMask" : {
|
|
"type" : "array",
|
|
"items" : { "type" : "string" },
|
|
"description" : "Object mask that describes on which tiles object is visible/blocked/activatable"
|
|
},
|
|
"mapAttackFromLeft" : {
|
|
"type" : "string",
|
|
"description" : "Adventure map creature image when attacked from left",
|
|
"format" : "imageFile"
|
|
},
|
|
"mapAttackFromRight" : {
|
|
"type" : "string",
|
|
"description" : "Adventure map creature image when attacked from right",
|
|
"format" : "imageFile"
|
|
},
|
|
"iconLarge" : {
|
|
"type" : "string",
|
|
"description" : "Large icon for this creature, used for example in town screen",
|
|
"format" : "imageFile"
|
|
},
|
|
"iconSmall" : {
|
|
"type" : "string",
|
|
"description" : "Small icon for this creature, used for example in exchange screen",
|
|
"format" : "imageFile"
|
|
},
|
|
"animationTime" : {
|
|
"type" : "object",
|
|
"additionalProperties" : false,
|
|
"required" : [ "attack", "walk", "idle" ],
|
|
"description" : "Length of several animations",
|
|
"properties" : {
|
|
"attack" : {
|
|
"type" : "number",
|
|
"description" : "attack"
|
|
},
|
|
"idle" : {
|
|
"type" : "number",
|
|
"description" : "idle"
|
|
},
|
|
"walk" : {
|
|
"type" : "number",
|
|
"description" : "walk"
|
|
}
|
|
}
|
|
},
|
|
"missile" : {
|
|
"type" : "object",
|
|
"additionalProperties" : false,
|
|
"required" : [ "frameAngles", "offset", "attackClimaxFrame" ],
|
|
"description" : "Missile description for archers",
|
|
"properties" : {
|
|
"projectile" : {
|
|
"type" : "string",
|
|
"description" : "Path to projectile animation",
|
|
"format" : "animationFile"
|
|
},
|
|
"ray" : {
|
|
"type" : "array",
|
|
"description" : "Colors of ray projectile animation",
|
|
"minItems" : 1,
|
|
"items" : {
|
|
"type" : "object",
|
|
"required" : [ "start", "end" ],
|
|
"properties" : {
|
|
"start" : {
|
|
"type" : "array",
|
|
"minItems" : 4,
|
|
"maxItems" : 4,
|
|
"items" : {
|
|
"minimum" : 0,
|
|
"maximum" : 255,
|
|
"type" : "number"
|
|
}
|
|
},
|
|
"end" : {
|
|
"type" : "array",
|
|
"minItems" : 4,
|
|
"maxItems" : 4,
|
|
"items" : {
|
|
"minimum" : 0,
|
|
"maximum" : 255,
|
|
"type" : "number"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"frameAngles" : {
|
|
"type" : "array",
|
|
"description" : "Angles of missile images, should go from 90 to -90",
|
|
"minItems" : 1,
|
|
"items" : {
|
|
"minimum" : -90,
|
|
"maximum" : 90,
|
|
"type" : "number"
|
|
}
|
|
},
|
|
"offset" : {
|
|
"type" : "object",
|
|
"additionalProperties" : false,
|
|
"required" : [ "lowerX", "lowerY", "middleX", "middleY", "upperX", "upperY" ],
|
|
"description" : "Position where projectile image appears during shooting in specific direction",
|
|
"properties" : {
|
|
"lowerX" : { "type" : "number" },
|
|
"lowerY" : { "type" : "number" },
|
|
"middleX" : { "type" : "number" },
|
|
"middleY" : { "type" : "number" },
|
|
"upperX" : { "type" : "number" },
|
|
"upperY" : { "type" : "number" }
|
|
}
|
|
},
|
|
"attackClimaxFrame" : {
|
|
"type" : "number",
|
|
"description" : "Frame at which shooter shoots his projectile (e.g. releases arrow)"
|
|
}
|
|
}
|
|
},
|
|
"timeBetweenFidgets" : {
|
|
"type" : "number",
|
|
"description" : "How often creature will play idling animation"
|
|
}
|
|
}
|
|
},
|
|
"sound" : {
|
|
"type" : "object",
|
|
"additionalProperties" : false,
|
|
"description" : "Sound files associated with this creature",
|
|
"properties" : {
|
|
"attack" : { "type" : "string", "format" : "soundFile" },
|
|
"defend" : { "type" : "string", "format" : "soundFile" },
|
|
"killed" : { "type" : "string", "format" : "soundFile" },
|
|
"startMoving" : { "type" : "string", "format" : "soundFile" },
|
|
"endMoving" : { "type" : "string", "format" : "soundFile" },
|
|
"move" : { "type" : "string", "format" : "soundFile" },
|
|
"shoot" : { "type" : "string", "format" : "soundFile" },
|
|
"wince" : { "type" : "string", "format" : "soundFile" }
|
|
}
|
|
},
|
|
"stackExperience" : {
|
|
"type" : "array",
|
|
"description" : "Stack experience, using bonus system",
|
|
"items" : {
|
|
"type" : "object",
|
|
"additionalProperties" : false,
|
|
"required" : [ "bonus", "values" ],
|
|
"description" : "0",
|
|
"properties" : {
|
|
"bonus" : {"$ref" : "bonusInstance.json" },
|
|
"values" : {
|
|
"type" : "array",
|
|
"minItems" : 10,
|
|
"maxItems" : 10,
|
|
"description" : "Strength of the bonus",
|
|
"anyOf" : [
|
|
{ "items" : { "type" : "number" } },
|
|
{ "items" : { "type" : "boolean" } }
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"index" : {
|
|
"type" : "number",
|
|
"description" : "Private field to break things, do not use."
|
|
},
|
|
"extraNames" : {
|
|
"type" : "array",
|
|
"items" : { "type" : "string" },
|
|
"description" : "Private field to break things, do not use."
|
|
}
|
|
}
|
|
}
|