| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327 |
- {
- "definitions" : {
- "townIcon" :
- {
- "type" : "object",
- "additionalProperties" : false,
- "required" : [ "small", "large" ],
- "properties" : {
- "small" : { "type" : "string", "format" : "imageFile" },
- "large" : { "type" : "string", "format" : "imageFile" }
- }
- },
- "townIconPair" : {
- "type" : "object",
- "additionalProperties" : false,
- "required" : [ "normal", "built" ],
- "properties" : {
- "built" : {
- "$ref" : "#/definitions/townIcon",
- "description" : "Icon used after player build something in town"
- },
- "normal" : {
- "$ref" : "#/definitions/townIcon",
- "description" : "Icon used normally"
- }
- }
- }
- },
- "type" : "object",
- "$schema" : "http://json-schema.org/draft-04/schema",
- "title" : "VCMI faction format",
- "description" : "Json format for defining new faction (aka towns) in VCMI",
- "required" : [ "name", "boat", "alignment", "nativeTerrain", "creatureBackground" ],
- "dependencies" : {
- "town" : [ "puzzleMap" ]
- },
- "additionalProperties" : false,
- "properties" : {
- "name" : {
- "type" : "string",
- "description" : "Localizable faction name, e.g. Rampart"
- },
- "description" : {
- "type" : "string",
- "description" : "Description about the faction"
- },
- "alignment" : {
- "type" : "string",
- "enum" : [ "good", "neutral", "evil" ],
- "description" : "Faction alignment, good, neutral or evil"
- },
- "nativeTerrain" : {
- "type" : "string",
- "description" : "Native terrain for creatures. Creatures fighting on native terrain receive several bonuses"
- },
- "boat" : {
- "type" : "string",
- "description" : "Identifier of boat type that is produced by shipyard and used by heroes in water taverns or prisons"
- },
- "preferUndergroundPlacement" : {
- "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."
- },
- "special" : {
- "type" : "boolean",
- "description" : "If true, faction is disabled from starting pick and in random map generation"
- },
- "creatureBackground" : {
- "type" : "object",
- "additionalProperties" : false,
- "required" : [ "120px", "130px" ],
- "description" : "Backgrounds for creature info card",
- "properties" : {
- "120px" : {
- "type" : "string",
- "description" : "Version that is 120 pixels in height",
- "format" : "imageFile"
- },
- "130px" : {
- "type" : "string",
- "description" : "Version that is 130 pixels in height",
- "format" : "imageFile"
- }
- }
- },
- "town" : {
- "type" : "object",
- "additionalProperties" : false,
- "required" : [
- "mapObject", "buildingsIcons", "buildings", "creatures", "guildWindow", "names",
- "hallBackground", "hallSlots", "horde", "mageGuild", "moatAbility", "defaultTavern", "tavernVideo", "guildBackground", "musicTheme", "siege", "structures", "townBackground"
- ],
- "description" : "town",
- "properties" : {
- "creatures" : {
- "type" : "array",
- "minItems" : 7,
- "maxItems" : 8,
- "description" : "List of creatures available for recruitment on each level",
- "items" : {
- "type" : "array",
- "items" : { "type" : "string" }
- }
- },
- "hallSlots" : {
- "type" : "array",
- "description" : "Description of town hall",
- "minItems" : 5,
- "maxItems" : 5,
- "items" : {
- "type" : "array",
- "minItems" : 1,
- "maxItems" : 4,
- "items" : {
- "type" : "array",
- "description" : "List of buildings available in one slot",
- "items" : { "type" : "string" }
- }
- }
- },
- "buildings" : {
- "type" : "object",
- "additionalProperties" : {
- "$ref" : "townBuilding.json"
- }
- },
- "mageGuild" : {
- "type" : "number",
- "description" : "Maximal level of mage guild"
- },
- "primaryResource" : {
- "type" : "string",
- "description" : "Primary resource for this town. Produced by Silo and offered as starting bonus"
- },
- "horde" : {
- "type" : "array",
- "maxItems" : 2,
- "description" : "Levels of creatures that have hordes in town",
- "items" : { "type" : "number" }
- },
- "moatAbility" : {
- "type" : "string",
- "description" : "Identifier of ability to use as town moat during siege"
- },
- "siege" : {
- "$ref" : "townSiege.json"
- },
- "musicTheme" : {
- "type" : "array",
- "description" : "Path to town music themes",
- "minItems" : 1,
- "items" : {
- "type" : "string",
- "format" : "musicFile"
- }
- },
- "tavernVideo" : {
- "type" : "string",
- "description" : "Video for tavern window",
- "format" : "videoFile"
- },
- "townBackground" : {
- "type" : "string",
- "description" : "Background for town screen",
- "format" : "imageFile"
- },
- "guildWindow" : {
- "anyOf" : [
- {
- "type" : "array",
- "description" : "Image with small view on town from mage guild (each array element for different mage guild level; if one element only this will be always selected)",
- "minItems" : 1,
- "items" : {
- "type" : "string",
- "format" : "imageFile"
- }
- },
- {
- "type" : "string",
- "description" : "Image with small view on town from mage guild",
- "format" : "imageFile"
- }
- ]
- },
- "guildBackground" : {
- "anyOf" : [
- {
- "type" : "array",
- "description" : "Image with background of mage guild (each array element for different mage guild level; if one element only this will be always selected)",
- "minItems" : 1,
- "items" : {
- "type" : "string",
- "format" : "imageFile"
- }
- },
- {
- "type" : "string",
- "description" : "Image with background of mage guild",
- "format" : "imageFile"
- }
- ]
- },
- "guildWindowPosition" : {
- "type" : "object",
- "additionalProperties" : false,
- "properties" : {
- "x" : { "type" : "number", "description" : "X coordinate on screen" },
- "y" : { "type" : "number", "description" : "Y coordinate on screen" }
- }
- },
- "guildSpellPositions" : {
- "type" : "array",
- "description" : "Positions of spells in mage guild",
- "items" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "additionalProperties" : false,
- "properties" : {
- "x" : { "type" : "number", "description" : "X coordinate on screen" },
- "y" : { "type" : "number", "description" : "Y coordinate on screen" }
- }
- }
- }
- },
- "hallBackground" : {
- "type" : "string",
- "description" : "background image for town hall",
- "format" : "imageFile"
- },
- "buildingsIcons" : {
- "type" : "string",
- "description" : "Path to building icons for town hall",
- "format" : "animationFile"
- },
- "mapObject" : {
- "properties" : {
- "filters" : {
- "type" : "object",
- "additionalProperties" : { "type" : "array" }
- }
- }
- },
- "structures" : {
- "type" : "object",
- "additionalProperties" : {
- "$ref" : "townStructure.json"
- }
- },
- "icons" : {
- "type" : "object",
- "additionalProperties" : false,
- "description" : "Town icons",
- "required" : [ "fort", "village" ],
- "properties" : {
- "fort" : {
- "$ref" : "#/definitions/townIconPair",
- "description" : "Icons for town with built fort"
- },
- "village" : {
- "$ref" : "#/definitions/townIconPair",
- "description" : "Icons for town without fort"
- }
- }
- },
- "defaultTavern" : {
- "type" : "number",
- "description" : "Default chance for hero to appear in tavern, used only when value vas not set in tavern field",
- "minimum" : 0
- },
- "tavern" : {
- "type" : "object",
- "description" : "Hero classes available in tavern. Value indicates chance for hero of this class to appear",
- "additionalProperties" : {
- "type" : "number",
- "minimum" : 0
- }
- },
- "guildSpells" : {
- "type" : "object",
- "description" : "Spells available in mage guild. Value indicates chance for this spell to appear",
- "additionalProperties" : {
- "type" : "number"
- }
- },
- "names" : {
- "type" : "array",
- "description" : "Names for towns on adventure map",
- "minItems" : 1,
- "items" : { "type" : "string" }
- }
- }
- },
- "puzzleMap" : {
- "type" : "object",
- "additionalProperties" : false,
- "required" : [ "prefix", "pieces" ],
- "description" : "Puzzle map from obelisks for this town. Must contain 48 pieces",
- "properties" : {
- "pieces" : {
- "type" : "array",
- "description" : "Lits of pieces definitions",
- "minItems" : 48,
- "maxItems" : 48,
- "items" : {
- "type" : "object",
- "additionalProperties" : false,
- "properties" : {
- "index" : { "type" : "number", "description" : "Order in which images will be opened" },
- "x" : { "type" : "number", "description" : "X coordinate on screen" },
- "y" : { "type" : "number", "description" : "Y coordinate on screen" }
- }
- }
- },
- "prefix" : {
- "type" : "string",
- "description" : "Prefix for image names, e.g. \"PUZCAS\" for name \"PUZCAS12.png\""
- }
- }
- },
- "index" : {
- "type" : "number",
- "description" : "Private field to break things, do not use."
- }
- }
- }
|