1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-04 09:42:40 +02:00
vcmi/config/schemas/hero.json

186 lines
4.6 KiB
JSON
Raw Normal View History

{
2023-05-19 20:14:01 +02:00
"type" : "object",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI hero format",
"description" : "Format used to define new heroes in VCMI",
2023-05-19 20:14:01 +02:00
"required" : [ "class", "army", "skills", "texts" ],
"oneOf" : [
{
"required" : [ "images" ]
},
{
"required" : [ "index" ]
}
],
"additionalProperties" : false,
2023-05-19 20:14:01 +02:00
"properties" : {
"special" : {
"type" : "boolean",
"description" : "Marks this object as special and not available by default"
},
2023-05-19 20:14:01 +02:00
"class" : {
"type" : "string",
"description" : "Hero class, e.g. knight or battleMage"
},
2023-05-19 20:14:01 +02:00
"female" : {
"type" : "boolean",
"description" : "This hero is female (changeable via editor)"
},
2023-05-19 20:14:01 +02:00
"battleImage" : {
"type" : "string",
"description" : "Custom def used on battle",
"format" : "defFile"
},
2023-05-19 20:14:01 +02:00
"images" : {
"type" : "object",
"additionalProperties" : false,
2023-05-19 20:14:01 +02:00
"description" : "images",
"required" : [ "large", "small", "specialtyLarge", "specialtySmall" ],
"properties" : {
"large" : {
"type" : "string",
"description" : "Large version of portrait for use in hero screen",
"format" : "imageFile"
},
2023-05-19 20:14:01 +02:00
"small" : {
"type" : "string",
"description" : "Small version of portrait for use on adventure map",
"format" : "imageFile"
},
2023-05-19 20:14:01 +02:00
"specialtyLarge" : {
"type" : "string",
"description" : "Large image of hero specilty, used in hero screen",
"format" : "imageFile"
},
2023-05-19 20:14:01 +02:00
"specialtySmall" : {
"type" : "string",
"description" : "Small image of hero specialty for use in exchange screen",
"format" : "imageFile"
}
}
},
2023-05-19 20:14:01 +02:00
"army" : {
"type" : "array",
"description" : "Initial hero army when recruited in tavern",
"minItems" : 1,
"maxItems" : 3,
2023-05-19 20:14:01 +02:00
"items" : {
"type" : "object",
"additionalProperties" : false,
"required" : [ "creature", "min", "max" ],
2023-05-19 20:14:01 +02:00
"properties" : {
"creature" : {
"type" : "string",
"description" : "creature"
},
2023-05-19 20:14:01 +02:00
"max" : {
"type" : "number",
"description" : "max",
"minimum" : 1
},
2023-05-19 20:14:01 +02:00
"min" : {
"type" : "number",
"description" : "min",
"minimum" : 1
}
}
}
},
2023-05-19 20:14:01 +02:00
"skills" : {
"type" : "array",
"description" : "List of skills initially known by hero",
"maxItems" : 8,
2023-05-19 20:14:01 +02:00
"items" : {
"type" : "object",
"additionalProperties" : false,
"required" : [ "level", "skill" ],
2023-05-19 20:14:01 +02:00
"properties" : {
"level" : {
"type" : "string",
"description" : "level",
"enum" : [ "basic", "advanced", "expert" ]
},
2023-05-19 20:14:01 +02:00
"skill" : {
"type" : "string",
"description" : "skill"
}
}
}
},
2023-05-19 20:14:01 +02:00
"specialty" : {
"type" : "object",
2023-05-19 20:14:01 +02:00
"description" : "Description of hero specialty using bonus system",
"additionalProperties" : false,
"properties" : {
"base" : {
"type" : "object",
"description" : "Will be merged with all bonuses."
},
"bonuses" : {
"type" : "object",
"description" : "Set of bonuses",
"additionalProperties" : { "$ref" : "bonus.json" }
},
"creature" : {
"type" : "string",
"description" : "Name of base creature to grant standard specialty to."
}
}
},
2023-05-19 20:14:01 +02:00
"spellbook" : {
"type" : "array",
"description" : "List of starting spells, if available. This entry (even empty) will also grant spellbook",
"items" : { "type" : "string" }
},
2023-05-19 20:14:01 +02:00
"texts" : {
"type" : "object",
"additionalProperties" : false,
2023-05-19 20:14:01 +02:00
"description" : "All translatable texts related to hero",
"required" : [ "name", "biography", "specialty" ],
2023-05-19 20:14:01 +02:00
"properties" : {
"name" : {
"type" : "string",
"description" : "Hero name"
},
2023-05-19 20:14:01 +02:00
"biography" : {
"type" : "string",
"description" : "Hero biography"
},
2023-05-19 20:14:01 +02:00
"specialty" : {
"type" : "object",
"additionalProperties" : false,
2023-05-19 20:14:01 +02:00
"description" : "Hero specialty information",
"required" : [ "name", "description", "tooltip" ],
2023-05-19 20:14:01 +02:00
"properties" : {
"name" : {
"type" : "string",
"description" : "Name of the specialty"
},
2023-05-19 20:14:01 +02:00
"description" : {
"type" : "string",
"description" : "Description visible when hovering over specialty icon"
},
2023-05-19 20:14:01 +02:00
"tooltip" : {
"type" : "string",
"description" : "Tooltip visible on clicking icon."
}
}
}
}
},
"index" : {
"type" : "number",
"description" : "Private field to break things, do not use."
2023-07-18 19:24:45 +02:00
},
"onlyOnWaterMap" : {
"type" : "boolean",
"description" : "It true, hero won't show up on a map with water"
},
"onlyOnMapWithoutWater" : {
"type" : "boolean",
"description" : "It true, hero will show up only if the map contains no water"
}
}
}