2013-04-02 20:06:43 +03:00
{
2013-04-22 22:51:22 +03:00
"definitions" : {
"townIcon" :
{
"type" : "object" ,
"additionalProperties" : false ,
"required" : [ "small" , "large" ] ,
"properties" : {
2013-10-26 22:33:34 +03:00
"small" : { "type" : "string" , "format" : "imageFile" } ,
"large" : { "type" : "string" , "format" : "imageFile" }
2013-04-22 22:51:22 +03:00
}
} ,
"townIconPair" : {
2023-05-19 20:14:01 +02:00
"type" : "object" ,
2013-04-22 22:51:22 +03:00
"additionalProperties" : false ,
"required" : [ "normal" , "built" ] ,
2023-05-19 20:14:01 +02:00
"properties" : {
"built" : {
2013-04-22 22:51:22 +03:00
"$ref" : "#/definitions/townIcon" ,
2023-05-19 20:14:01 +02:00
"description" : "Icon used after player build something in town"
2013-04-22 22:51:22 +03:00
} ,
2023-05-19 20:14:01 +02:00
"normal" : {
2013-04-22 22:51:22 +03:00
"$ref" : "#/definitions/townIcon" ,
2023-05-19 20:14:01 +02:00
"description" : "Icon used normally"
2013-04-22 22:51:22 +03:00
}
}
}
} ,
2023-05-19 20:14:01 +02:00
"type" : "object" ,
"$schema" : "http://json-schema.org/draft-04/schema" ,
2013-04-02 20:06:43 +03:00
"title" : "VCMI faction format" ,
2023-05-19 20:14:01 +02:00
"description" : "Json format for defining new faction (aka towns) in VCMI" ,
2023-05-19 20:04:31 +02:00
"required" : [ "name" , "alignment" , "nativeTerrain" , "creatureBackground" ] ,
2013-04-02 20:06:43 +03:00
"dependencies" : {
2023-06-20 18:37:03 +02:00
"town" : [ "puzzleMap" , "boat" ]
2013-04-02 20:06:43 +03:00
} ,
2013-04-11 22:24:14 +03:00
"additionalProperties" : false ,
2023-05-19 20:14:01 +02:00
"properties" : {
2013-04-02 20:06:43 +03:00
"name" : {
"type" : "string" ,
"description" : "Translatable name of town"
} ,
2023-05-19 20:14:01 +02:00
"alignment" : {
"type" : "string" ,
2013-04-02 20:06:43 +03:00
"enum" : [ "good" , "neutral" , "evil" ] ,
2023-05-19 20:14:01 +02:00
"description" : "Town alignment, good, neutral or evil"
2013-04-02 20:06:43 +03:00
} ,
2023-05-19 20:14:01 +02:00
"nativeTerrain" : {
"type" : "string" ,
"description" : "Native terrain for creatures. Creatures fighting on native terrain receive several bonuses"
2023-05-19 20:04:31 +02:00
} ,
2023-06-20 18:37:03 +02:00
"boat" : {
"type" : "string" ,
"description" : "Identifier of boat type that is produced by shipyard in town, if any"
} ,
2023-05-19 20:14:01 +02:00
"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. False by default."
2023-05-19 20:04:31 +02:00
} ,
2023-05-19 20:14:01 +02:00
"creatureBackground" : {
"type" : "object" ,
2013-04-11 22:24:14 +03:00
"additionalProperties" : false ,
2013-04-02 20:06:43 +03:00
"required" : [ "120px" , "130px" ] ,
2023-05-19 20:14:01 +02:00
"description" : "Backgrounds for creature info card" ,
"properties" : {
"120px" : {
"type" : "string" ,
"description" : "Version that is 120 pixels in height" ,
2013-10-26 22:33:34 +03:00
"format" : "imageFile"
2013-04-02 20:06:43 +03:00
} ,
2023-05-19 20:14:01 +02:00
"130px" : {
"type" : "string" ,
"description" : "Version that is 130 pixels in height" ,
2013-10-26 22:33:34 +03:00
"format" : "imageFile"
2013-04-02 20:06:43 +03:00
}
}
} ,
2023-05-19 20:14:01 +02:00
"town" : {
"type" : "object" ,
2013-04-11 22:24:14 +03:00
"additionalProperties" : false ,
2013-04-02 20:06:43 +03:00
"required" : [
2014-06-16 19:27:26 +03:00
"mapObject" , "buildingsIcons" , "buildings" , "creatures" , "guildWindow" , "names" ,
2023-03-20 13:02:09 +02:00
"hallBackground" , "hallSlots" , "horde" , "mageGuild" , "moatAbility" , "defaultTavern" , "tavernVideo" , "guildBackground" , "musicTheme" , "siege" , "structures" , "townBackground" , "warMachine"
2013-04-02 20:06:43 +03:00
] ,
2023-05-19 20:14:01 +02:00
"description" : "town" ,
"properties" : {
"creatures" : {
"type" : "array" ,
2013-04-02 20:06:43 +03:00
"minItems" : 7 ,
"maxItems" : 7 ,
"description" : "List of creatures available for recruitment on each level" ,
2023-05-19 20:14:01 +02:00
"items" : {
"type" : "array" ,
2013-04-02 20:06:43 +03:00
"items" : { "type" : "string" }
}
} ,
2023-05-19 20:14:01 +02:00
"hallSlots" : {
"type" : "array" ,
"description" : "Description of town hall" ,
2013-04-02 20:06:43 +03:00
"minItems" : 5 ,
"maxItems" : 5 ,
2023-05-19 20:14:01 +02:00
"items" : {
"type" : "array" ,
2013-04-02 20:06:43 +03:00
"minItems" : 1 ,
"maxItems" : 4 ,
"items" : {
"type" : "array" ,
"description" : "List of buildings available in one slot" ,
2013-12-04 13:36:39 +03:00
"items" : { "type" : "string" }
2013-04-02 20:06:43 +03:00
}
}
} ,
2023-05-19 20:14:01 +02:00
"buildings" : {
2023-05-19 20:04:31 +02:00
"type" : "object" ,
"additionalProperties" : {
"$ref" : "townBuilding.json"
}
} ,
2023-05-19 20:14:01 +02:00
"mageGuild" : {
"type" : "number" ,
"description" : "Maximal level of mage guild"
2023-05-19 20:04:31 +02:00
} ,
2023-05-19 20:14:01 +02:00
"primaryResource" : {
"type" : "string" ,
"description" : "Primary resource for this town. Produced by Silo and offered as starting bonus"
2023-05-19 20:04:31 +02:00
} ,
2023-05-19 20:14:01 +02:00
"warMachine" : {
"type" : "string" ,
"description" : "Identifier of war machine produced by blacksmith in town"
2023-05-19 20:04:31 +02:00
} ,
2023-05-19 20:14:01 +02:00
"horde" : {
"type" : "array" ,
2013-04-02 20:06:43 +03:00
"maxItems" : 2 ,
2023-05-19 20:14:01 +02:00
"description" : "Levels of creatures that have hordes in town" ,
"items" : { "type" : "number" }
2013-04-02 20:06:43 +03:00
} ,
2023-05-19 20:14:01 +02:00
"moatAbility" : {
"type" : "string" ,
"description" : "Identifier of ability to use as town moat during siege"
2023-05-19 20:04:31 +02:00
} ,
2023-05-19 20:14:01 +02:00
"siege" : {
2023-05-19 20:04:31 +02:00
"$ref" : "townSiege.json"
} ,
2023-05-19 20:14:01 +02:00
"musicTheme" : {
"type" : "string" ,
"description" : "Path to town music theme" ,
2023-05-19 20:04:31 +02:00
"format" : "musicFile"
} ,
"tavernVideo" : {
"type" : "string" ,
"description" : "Video for tavern window" ,
"format" : "videoFile"
} ,
2023-05-19 20:14:01 +02:00
"townBackground" : {
"type" : "string" ,
"description" : "Background for town screen" ,
2023-05-19 20:04:31 +02:00
"format" : "imageFile"
} ,
2023-05-19 20:14:01 +02:00
"guildWindow" : {
"type" : "string" ,
"description" : "Image with small view on town from mage guild"
2023-05-19 20:04:31 +02:00
} ,
2023-05-19 20:14:01 +02:00
"guildBackground" : {
"type" : "string" ,
"description" : "Image with background of mage guild" ,
2023-05-19 20:04:31 +02:00
"format" : "imageFile"
} ,
2023-05-19 20:14:01 +02:00
"hallBackground" : {
"type" : "string" ,
"description" : "background image for town hall" ,
2023-05-19 20:04:31 +02:00
"format" : "imageFile"
} ,
2023-05-19 20:14:01 +02:00
"buildingsIcons" : {
2023-05-19 20:04:31 +02:00
"type" : "string" ,
2023-05-19 20:14:01 +02:00
"description" : "Path to .def file with building icons" ,
2023-05-19 20:04:31 +02:00
"format" : "animationFile"
} ,
"mapObject" : {
"properties" : {
"filters" : {
"type" : "object" ,
"additionalProperties" : { "type" : "array" }
}
}
} ,
2023-05-19 20:14:01 +02:00
"structures" : {
2023-05-19 20:04:31 +02:00
"type" : "object" ,
"additionalProperties" : {
"$ref" : "townStructure.json"
}
} ,
2023-05-19 20:14:01 +02:00
"icons" : {
"type" : "object" ,
2013-04-11 22:24:14 +03:00
"additionalProperties" : false ,
2023-05-19 20:14:01 +02:00
"description" : "Town icons" ,
2013-04-02 20:06:43 +03:00
"required" : [ "fort" , "village" ] ,
2023-05-19 20:14:01 +02:00
"properties" : {
"fort" : {
2013-04-22 22:51:22 +03:00
"$ref" : "#/definitions/townIconPair" ,
2023-05-19 20:14:01 +02:00
"description" : "Icons for town with built fort"
2013-04-02 20:06:43 +03:00
} ,
2023-05-19 20:14:01 +02:00
"village" : {
2013-04-22 22:51:22 +03:00
"$ref" : "#/definitions/townIconPair" ,
2023-05-19 20:14:01 +02:00
"description" : "Icons for town without fort"
2013-04-02 20:06:43 +03:00
}
}
} ,
2023-05-19 20:04:31 +02:00
"defaultTavern" : {
"type" : "number" ,
"description" : "Default chance for hero to appear in tavern, used only when value vas not set in tavern field" ,
"minimum" : 0
2013-04-02 20:06:43 +03:00
} ,
2023-05-19 20:04:31 +02:00
"tavern" : {
2013-04-21 15:49:26 +03:00
"type" : "object" ,
2023-05-19 20:04:31 +02:00
"description" : "Hero classes available in tavern. Value indicates chance for hero of this class to appear" ,
2013-04-21 15:49:26 +03:00
"additionalProperties" : {
2023-05-19 20:04:31 +02:00
"type" : "number" ,
"minimum" : 0
2013-04-02 20:06:43 +03:00
}
} ,
2023-05-19 20:04:31 +02:00
"guildSpells" : {
"type" : "object" ,
"description" : "Spells available in mage guild. Value indicates chance for this spell to appear" ,
"additionalProperties" : {
"type" : "number"
}
2013-04-02 20:06:43 +03:00
} ,
2023-05-19 20:04:31 +02:00
"names" : {
"type" : "array" ,
"description" : "Names for towns on adventure map" ,
"minItems" : 1 ,
"items" : { "type" : "string" }
}
}
} ,
2023-05-19 20:14:01 +02:00
"puzzleMap" : {
"type" : "object" ,
2023-05-19 20:04:31 +02:00
"additionalProperties" : false ,
"required" : [ "prefix" , "pieces" ] ,
2023-05-19 20:14:01 +02:00
"description" : "Puzzle map from obelisks for this town. Must contain 48 pieces" ,
"properties" : {
"pieces" : {
"type" : "array" ,
"description" : "Lits of pieces definitions" ,
2023-05-19 20:04:31 +02:00
"minItems" : 48 ,
"maxItems" : 48 ,
2023-05-19 20:14:01 +02:00
"items" : {
"type" : "object" ,
2023-05-19 20:04:31 +02:00
"additionalProperties" : false ,
2023-05-19 20:14:01 +02:00
"properties" : {
"index" : { "type" : "number" , "description" : "Order in which images will be opened" } ,
"x" : { "type" : "number" , "description" : "X coordinate on screen" } ,
"y" : { "type" : "number" , "description" : "X coordinate on screen" }
2023-05-19 20:04:31 +02:00
}
}
2013-04-02 20:06:43 +03:00
} ,
2023-05-19 20:14:01 +02:00
"prefix" : {
"type" : "string" ,
"description" : "Prefix for image names, e.g. \"PUZCAS\" for name \"PUZCAS12.png\""
2013-04-02 20:06:43 +03:00
}
}
2023-05-19 20:04:31 +02:00
} ,
"index" : {
"type" : "number" ,
"description" : "Private field to break things, do not use."
2013-04-02 20:06:43 +03:00
}
}
}