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" : {
|
|
|
|
"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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2013-04-02 20:06:43 +03:00
|
|
|
"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", "alignment", "creatureBackground" ],
|
|
|
|
"dependencies" : {
|
2013-12-13 21:27:54 +03:00
|
|
|
"town" : [ "puzzleMap" ]
|
2013-04-02 20:06:43 +03:00
|
|
|
},
|
2013-04-11 22:24:14 +03:00
|
|
|
|
|
|
|
"additionalProperties" : false,
|
2013-04-02 20:06:43 +03:00
|
|
|
"properties":{
|
|
|
|
"name" : {
|
|
|
|
"type" : "string",
|
|
|
|
"description" : "Translatable name of town"
|
|
|
|
},
|
2013-04-11 22:24:14 +03:00
|
|
|
"index" : {
|
|
|
|
"type" : "number",
|
|
|
|
"description" : "Private field to break things, do not use."
|
|
|
|
},
|
2013-04-02 20:06:43 +03:00
|
|
|
"alignment": {
|
|
|
|
"type":"string",
|
|
|
|
"enum" : [ "good", "neutral", "evil" ],
|
|
|
|
"description": "Town alignment, good, neutral or evil"
|
|
|
|
},
|
|
|
|
"creatureBackground": {
|
|
|
|
"type":"object",
|
2013-04-11 22:24:14 +03:00
|
|
|
"additionalProperties" : false,
|
2013-04-02 20:06:43 +03:00
|
|
|
"required" : [ "120px", "130px" ],
|
|
|
|
"description": "Backgrounds for creature info card",
|
|
|
|
"properties":{
|
|
|
|
"120px": {
|
|
|
|
"type":"string",
|
2013-10-26 22:33:34 +03:00
|
|
|
"description": "Version that is 120 pixels in height",
|
|
|
|
"format" : "imageFile"
|
2013-04-02 20:06:43 +03:00
|
|
|
},
|
|
|
|
"130px": {
|
|
|
|
"type":"string",
|
2013-10-26 22:33:34 +03:00
|
|
|
"description": "Version that is 130 pixels in height",
|
|
|
|
"format" : "imageFile"
|
2013-04-02 20:06:43 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"nativeTerrain": {
|
|
|
|
"type":"string",
|
2013-08-20 22:32:21 +03:00
|
|
|
"description": "Native terrain for creatures. Creatures fighting on native terrain receive several bonuses"
|
2013-04-02 20:06:43 +03:00
|
|
|
},
|
|
|
|
"puzzleMap": {
|
|
|
|
"type":"object",
|
2013-04-11 22:24:14 +03:00
|
|
|
"additionalProperties" : false,
|
2013-04-02 20:06:43 +03:00
|
|
|
"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",
|
2013-04-11 22:24:14 +03:00
|
|
|
"additionalProperties" : false,
|
2013-04-02 20:06:43 +03: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" }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"prefix": {
|
|
|
|
"type":"string",
|
|
|
|
"description": "Prefix for image names, e.g. \"PUZCAS\" for name \"PUZCAS12.png\""
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"town": {
|
|
|
|
"type":"object",
|
2013-04-11 22:24:14 +03:00
|
|
|
"additionalProperties" : false,
|
2013-04-02 20:06:43 +03:00
|
|
|
"required" : [
|
|
|
|
"adventureMap", "buildingsIcons", "buildings", "creatures", "guildWindow", "names",
|
2014-04-24 22:36:10 +03:00
|
|
|
"hallBackground", "hallSlots", "horde", "mageGuild", "moatDamage", "defaultTavern", "tavernVideo", "guildBackground", "musicTheme", "siege", "structures", "townBackground", "warMachine"
|
2013-04-02 20:06:43 +03:00
|
|
|
],
|
|
|
|
"description": "town",
|
|
|
|
"properties":{
|
|
|
|
"adventureMap": {
|
|
|
|
"type":"object",
|
2013-04-11 22:24:14 +03:00
|
|
|
"additionalProperties" : false,
|
2013-04-02 20:06:43 +03:00
|
|
|
"description": "Paths to images of object on adventure map",
|
|
|
|
"required" : [ "capitol", "castle", "village" ],
|
|
|
|
"properties":{
|
|
|
|
"capitol": {
|
|
|
|
"type":"string",
|
2013-10-26 22:33:34 +03:00
|
|
|
"description": "Town with capitol",
|
|
|
|
"format" : "defFile"
|
2013-04-02 20:06:43 +03:00
|
|
|
},
|
|
|
|
"castle": {
|
|
|
|
"type":"string",
|
2013-10-26 22:33:34 +03:00
|
|
|
"description": "Town with built fort",
|
|
|
|
"format" : "defFile"
|
2013-04-02 20:06:43 +03:00
|
|
|
},
|
|
|
|
"village": {
|
|
|
|
"type":"string",
|
2013-10-26 22:33:34 +03:00
|
|
|
"description": "Village without built fort",
|
|
|
|
"format" : "defFile"
|
2013-04-02 20:06:43 +03:00
|
|
|
},
|
|
|
|
"dwellings" : {
|
|
|
|
"type" : "array",
|
2013-07-07 22:44:08 +03:00
|
|
|
"minItems" : 7,
|
|
|
|
"maxItems" : 7,
|
2013-04-02 20:06:43 +03:00
|
|
|
"description" : "Dwellings on adventure map",
|
|
|
|
"items" : {
|
|
|
|
"type" : "object",
|
2013-04-11 22:24:14 +03:00
|
|
|
"additionalProperties" : false,
|
2013-07-07 22:44:08 +03:00
|
|
|
"required" : [ "name", "graphics" ],
|
2013-04-02 20:06:43 +03:00
|
|
|
"properties" : {
|
|
|
|
"name": { "type":"string" },
|
2013-10-26 22:33:34 +03:00
|
|
|
"graphics": { "type":"string", "format" : "defFile" }
|
2013-04-02 20:06:43 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"guildSpells" : {
|
|
|
|
"type" : "object",
|
|
|
|
"description" : "Spells available in mage guild. Value indicates chance for this spell to appear",
|
|
|
|
"additionalProperties" : {
|
|
|
|
"type" : "number"
|
|
|
|
}
|
2013-11-03 15:07:23 +03: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
|
|
|
},
|
|
|
|
"tavern" : {
|
|
|
|
"type" : "object",
|
|
|
|
"description" : "Hero classes available in tavern. Value indicates chance for hero of this class to appear",
|
|
|
|
"additionalProperties" : {
|
2013-11-03 15:07:23 +03:00
|
|
|
"type" : "number",
|
|
|
|
"minimum" : 0
|
2013-04-02 20:06:43 +03:00
|
|
|
}
|
|
|
|
},
|
2014-04-24 22:36:10 +03:00
|
|
|
"tavernVideo" : {
|
|
|
|
"type" : "string",
|
2014-04-29 20:55:35 +03:00
|
|
|
"description" : "Video for tavern window",
|
|
|
|
"format" : "videoFile"
|
2014-04-24 22:36:10 +03:00
|
|
|
},
|
2013-04-02 20:06:43 +03:00
|
|
|
"names" : {
|
|
|
|
"type" : "array",
|
|
|
|
"description" : "Names for towns on adventure map",
|
|
|
|
"minItems" : 1,
|
|
|
|
"items" : { "type" : "string" }
|
|
|
|
},
|
|
|
|
"buildingsIcons": {
|
|
|
|
"type" : "string",
|
2013-10-26 22:33:34 +03:00
|
|
|
"description": "Path to .def file with building icons",
|
|
|
|
"format" : "animationFile"
|
2013-04-02 20:06:43 +03:00
|
|
|
},
|
|
|
|
"buildings": {
|
2013-04-21 15:49:26 +03:00
|
|
|
"type" : "object",
|
|
|
|
"additionalProperties" : {
|
2013-04-02 20:06:43 +03:00
|
|
|
"$ref" : "vcmi:townBuilding"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"creatures": {
|
|
|
|
"type":"array",
|
|
|
|
"minItems" : 7,
|
|
|
|
"maxItems" : 7,
|
|
|
|
"description" : "List of creatures available for recruitment on each level",
|
|
|
|
"items": {
|
|
|
|
"type":"array",
|
|
|
|
"items" : { "type" : "string" }
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"guildWindow": {
|
|
|
|
"type":"string",
|
|
|
|
"description": "Image with small view on town from mage guild"
|
|
|
|
},
|
2014-04-24 22:36:10 +03:00
|
|
|
"guildBackground": {
|
|
|
|
"type":"string",
|
|
|
|
"description": "Image with background of mage guild",
|
|
|
|
"format" : "imageFile"
|
|
|
|
},
|
|
|
|
|
2013-04-02 20:06:43 +03:00
|
|
|
"hallBackground": {
|
|
|
|
"type":"string",
|
2013-10-26 22:33:34 +03:00
|
|
|
"description": "background image for town hall",
|
|
|
|
"format" : "imageFile"
|
2013-04-02 20:06:43 +03:00
|
|
|
},
|
|
|
|
"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",
|
2013-12-04 13:36:39 +03:00
|
|
|
"items" : { "type" : "string" }
|
2013-04-02 20:06:43 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"horde": {
|
|
|
|
"type":"array",
|
|
|
|
"maxItems" : 2,
|
|
|
|
"description": "Levels of creatures that have hordes in town",
|
|
|
|
"items": { "type":"number" }
|
|
|
|
},
|
|
|
|
"icons": {
|
|
|
|
"type":"object",
|
2013-04-11 22:24:14 +03:00
|
|
|
"additionalProperties" : false,
|
2013-04-02 20:06:43 +03:00
|
|
|
"description": "Town icons",
|
|
|
|
"required" : [ "fort", "village" ],
|
|
|
|
"properties":{
|
|
|
|
"fort": {
|
2013-04-22 22:51:22 +03:00
|
|
|
"$ref" : "#/definitions/townIconPair",
|
|
|
|
"description": "Icons for town with built fort"
|
2013-04-02 20:06:43 +03:00
|
|
|
},
|
|
|
|
"village": {
|
2013-04-22 22:51:22 +03:00
|
|
|
"$ref" : "#/definitions/townIconPair",
|
|
|
|
"description": "Icons for town without fort"
|
2013-04-02 20:06:43 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"mageGuild": {
|
|
|
|
"type":"number",
|
|
|
|
"description": "Maximal level of mage guild"
|
|
|
|
},
|
|
|
|
"moatDamage": {
|
|
|
|
"type":"number",
|
|
|
|
"description": "Damage dealt to creature that entered town moat during siege"
|
|
|
|
},
|
|
|
|
"musicTheme": {
|
|
|
|
"type":"string",
|
2013-10-26 22:33:34 +03:00
|
|
|
"description": "Path to town music theme",
|
|
|
|
"format" : "musicFile"
|
2013-04-02 20:06:43 +03:00
|
|
|
},
|
|
|
|
"siege": {
|
|
|
|
"$ref" : "vcmi:townSiege"
|
|
|
|
},
|
|
|
|
"structures": {
|
2013-04-21 15:49:26 +03:00
|
|
|
"type" : "object",
|
|
|
|
"additionalProperties" : {
|
2013-04-02 20:06:43 +03:00
|
|
|
"$ref" : "vcmi:townStructure"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"townBackground": {
|
|
|
|
"type":"string",
|
2013-10-26 22:33:34 +03:00
|
|
|
"description": "Background for town screen",
|
|
|
|
"format" : "imageFile"
|
2013-04-02 20:06:43 +03:00
|
|
|
},
|
|
|
|
"primaryResource": {
|
|
|
|
"type":"string",
|
|
|
|
"description": "Primary resource for this town. Produced by Silo and offered as starting bonus"
|
|
|
|
},
|
|
|
|
"warMachine": {
|
|
|
|
"type":"string",
|
|
|
|
"description": "Identifier of war machine produced by blacksmith in town"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|