1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

Fixed white spaces

This commit is contained in:
krs
2023-05-19 21:14:01 +03:00
parent 2e6cae80a9
commit 105dcf5a9f
23 changed files with 1062 additions and 1081 deletions

View File

@@ -4,7 +4,6 @@
"title" : "VCMI battlefield format", "title" : "VCMI battlefield format",
"description" : "Format used to define new battlefields in VCMI", "description" : "Format used to define new battlefields in VCMI",
"required" : [ "graphics" ], "required" : [ "graphics" ],
"additionalProperties" : false, "additionalProperties" : false,
"properties" : { "properties" : {
"name" : { "name" : {
@@ -15,13 +14,9 @@
"type" : "boolean", "type" : "boolean",
"description" : "Shows if this battleground has own obstacles" "description" : "Shows if this battleground has own obstacles"
}, },
"graphics": {
"type":"string",
"format" : "imageFile",
"description": "BMP battleground resource"
},
"graphics" : { "graphics" : {
"type" : "string", "type" : "string",
"format" : "imageFile",
"description" : "BMP battleground resource" "description" : "BMP battleground resource"
}, },
"impassableHexes" : { "impassableHexes" : {

View File

@@ -1,10 +1,9 @@
{ {
"type":"object", "type" : "object",
"$schema": "http://json-schema.org/draft-04/schema", "$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI bonus system format", "title" : "VCMI bonus system format",
"description" : "Subsection of several formats, used to add generic bonuses to objects", "description" : "Subsection of several formats, used to add generic bonuses to objects",
"required": ["type"], "required" : ["type"],
"definitions" : "definitions" :
{ {
"nestedLimiter" : { "nestedLimiter" : {
@@ -38,43 +37,42 @@
] ]
} }
}, },
"additionalProperties" : false, "additionalProperties" : false,
"properties":{ "properties" : {
"type": { "type" : {
"type":"string", "type" : "string",
"description": "type" "description" : "type"
}, },
"subtype": { "subtype" : {
"anyOf" : [ "anyOf" : [
{ "type" : "string" }, { "type" : "string" },
{ "type" : "number" } { "type" : "number" }
], ],
"description": "subtype" "description" : "subtype"
}, },
"sourceID": { "sourceID" : {
"type":"number", "type" : "number",
"description": "sourceID" "description" : "sourceID"
}, },
"sourceType": { "sourceType" : {
"type":"string", "type" : "string",
"description": "sourceType" "description" : "sourceType"
}, },
"targetSourceType": { "targetSourceType" : {
"type":"string", "type" : "string",
"description": "targetSourceType" "description" : "targetSourceType"
}, },
"propagator": { "propagator" : {
"description": "propagator", "description" : "propagator",
"anyOf" : [ "anyOf" : [
{ {
"type" : "string" "type" : "string"
}, },
{ {
"type":"array", "type" : "array",
"items": { "items" : {
"type":"string", "type" : "string",
"description": "0" "description" : "0"
} }
} }
] ]
@@ -94,7 +92,7 @@
"type" : "string", "type" : "string",
"description" : "type" "description" : "type"
}, },
"parameters": { "parameters" : {
"type" : "array", "type" : "array",
"description" : "parameters", "description" : "parameters",
"additionalItems" : true "additionalItems" : true
@@ -118,7 +116,7 @@
"type" : "string", "type" : "string",
"description" : "type" "description" : "type"
}, },
"parameters": { "parameters" : {
"type" : "array", "type" : "array",
"description" : "parameters", "description" : "parameters",
"additionalItems" : true "additionalItems" : true
@@ -131,19 +129,19 @@
"$ref" : "#/definitions/nestedLimiter", "$ref" : "#/definitions/nestedLimiter",
"description" : "limiter" "description" : "limiter"
}, },
"effectRange": { "effectRange" : {
"type":"string", "type" : "string",
"description": "effectRange" "description" : "effectRange"
}, },
"val": { "val" : {
"type":"number", "type" : "number",
"description": "val" "description" : "val"
}, },
"valueType": { "valueType" : {
"type":"string", "type" : "string",
"description": "valueType" "description" : "valueType"
}, },
"addInfo": { "addInfo" : {
"anyOf" : [ "anyOf" : [
{ "type" : "string" }, { "type" : "string" },
{ "type" : "number" }, { "type" : "number" },
@@ -157,26 +155,26 @@
} }
} }
], ],
"description": "addInfo" "description" : "addInfo"
}, },
"duration": { "duration" : {
"anyOf" : [ "anyOf" : [
{ "type": "string"}, { "type" : "string"},
{ "type": "array", "items": {"type": "string"} } { "type" : "array", "items" : {"type" : "string"} }
], ],
"description": "duration" "description" : "duration"
}, },
"turns": { "turns" : {
"type":"number", "type" : "number",
"description": "turns" "description" : "turns"
}, },
"stacking" : { "stacking" : {
"type" : "string", "type" : "string",
"description" : "stacking" "description" : "stacking"
}, },
"description": { "description" : {
"type":"string", "type" : "string",
"description": "description" "description" : "description"
} }
} }
} }

View File

@@ -62,8 +62,7 @@
"mercury" : { "type" : "number"}, "mercury" : { "type" : "number"},
"sulfur" : { "type" : "number"}, "sulfur" : { "type" : "number"},
"crystal" : { "type" : "number"}, "crystal" : { "type" : "number"},
"gems" : { "type" : "number"}, "gems" : { "type" : "number"}
} }
}, },
"speed" : { "type" : "number" }, "speed" : { "type" : "number" },

View File

@@ -11,94 +11,92 @@
} }
}, },
"townIconPair" : { "townIconPair" : {
"type":"object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"required" : [ "normal", "built" ], "required" : [ "normal", "built" ],
"properties": { "properties" : {
"built": { "built" : {
"$ref" : "#/definitions/townIcon", "$ref" : "#/definitions/townIcon",
"description": "Icon used after player build something in town" "description" : "Icon used after player build something in town"
}, },
"normal": { "normal" : {
"$ref" : "#/definitions/townIcon", "$ref" : "#/definitions/townIcon",
"description": "Icon used normally" "description" : "Icon used normally"
} }
} }
} }
}, },
"type" : "object",
"type":"object", "$schema" : "http://json-schema.org/draft-04/schema",
"$schema": "http://json-schema.org/draft-04/schema",
"title" : "VCMI faction format", "title" : "VCMI faction format",
"description": "Json format for defining new faction (aka towns) in VCMI", "description" : "Json format for defining new faction (aka towns) in VCMI",
"required" : [ "name", "alignment", "nativeTerrain", "creatureBackground" ], "required" : [ "name", "alignment", "nativeTerrain", "creatureBackground" ],
"dependencies" : { "dependencies" : {
"town" : [ "puzzleMap" ] "town" : [ "puzzleMap" ]
}, },
"additionalProperties" : false, "additionalProperties" : false,
"properties":{ "properties" : {
"name" : { "name" : {
"type" : "string", "type" : "string",
"description" : "Translatable name of town" "description" : "Translatable name of town"
}, },
"alignment": { "alignment" : {
"type":"string", "type" : "string",
"enum" : [ "good", "neutral", "evil" ], "enum" : [ "good", "neutral", "evil" ],
"description": "Town alignment, good, neutral or evil" "description" : "Town alignment, good, neutral or evil"
}, },
"nativeTerrain": { "nativeTerrain" : {
"type":"string", "type" : "string",
"description": "Native terrain for creatures. Creatures fighting on native terrain receive several bonuses" "description" : "Native terrain for creatures. Creatures fighting on native terrain receive several bonuses"
}, },
"preferUndergroundPlacement": { "preferUndergroundPlacement" : {
"type":"boolean", "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." "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."
}, },
"creatureBackground": { "creatureBackground" : {
"type":"object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"required" : [ "120px", "130px" ], "required" : [ "120px", "130px" ],
"description": "Backgrounds for creature info card", "description" : "Backgrounds for creature info card",
"properties":{ "properties" : {
"120px": { "120px" : {
"type":"string", "type" : "string",
"description": "Version that is 120 pixels in height", "description" : "Version that is 120 pixels in height",
"format" : "imageFile" "format" : "imageFile"
}, },
"130px": { "130px" : {
"type":"string", "type" : "string",
"description": "Version that is 130 pixels in height", "description" : "Version that is 130 pixels in height",
"format" : "imageFile" "format" : "imageFile"
} }
} }
}, },
"town": { "town" : {
"type":"object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"required" : [ "required" : [
"mapObject", "buildingsIcons", "buildings", "creatures", "guildWindow", "names", "mapObject", "buildingsIcons", "buildings", "creatures", "guildWindow", "names",
"hallBackground", "hallSlots", "horde", "mageGuild", "moatAbility", "defaultTavern", "tavernVideo", "guildBackground", "musicTheme", "siege", "structures", "townBackground", "warMachine" "hallBackground", "hallSlots", "horde", "mageGuild", "moatAbility", "defaultTavern", "tavernVideo", "guildBackground", "musicTheme", "siege", "structures", "townBackground", "warMachine"
], ],
"description": "town", "description" : "town",
"properties":{ "properties" : {
"creatures": { "creatures" : {
"type":"array", "type" : "array",
"minItems" : 7, "minItems" : 7,
"maxItems" : 7, "maxItems" : 7,
"description" : "List of creatures available for recruitment on each level", "description" : "List of creatures available for recruitment on each level",
"items": { "items" : {
"type":"array", "type" : "array",
"items" : { "type" : "string" } "items" : { "type" : "string" }
} }
}, },
"hallSlots": { "hallSlots" : {
"type":"array", "type" : "array",
"description": "Description of town hall", "description" : "Description of town hall",
"minItems" : 5, "minItems" : 5,
"maxItems" : 5, "maxItems" : 5,
"items": { "items" : {
"type":"array", "type" : "array",
"minItems" : 1, "minItems" : 1,
"maxItems" : 4, "maxItems" : 4,
"items" : { "items" : {
@@ -108,40 +106,40 @@
} }
} }
}, },
"buildings": { "buildings" : {
"type" : "object", "type" : "object",
"additionalProperties" : { "additionalProperties" : {
"$ref" : "townBuilding.json" "$ref" : "townBuilding.json"
} }
}, },
"mageGuild": { "mageGuild" : {
"type":"number", "type" : "number",
"description": "Maximal level of mage guild" "description" : "Maximal level of mage guild"
}, },
"primaryResource": { "primaryResource" : {
"type":"string", "type" : "string",
"description": "Primary resource for this town. Produced by Silo and offered as starting bonus" "description" : "Primary resource for this town. Produced by Silo and offered as starting bonus"
}, },
"warMachine": { "warMachine" : {
"type":"string", "type" : "string",
"description": "Identifier of war machine produced by blacksmith in town" "description" : "Identifier of war machine produced by blacksmith in town"
}, },
"horde": { "horde" : {
"type":"array", "type" : "array",
"maxItems" : 2, "maxItems" : 2,
"description": "Levels of creatures that have hordes in town", "description" : "Levels of creatures that have hordes in town",
"items": { "type":"number" } "items" : { "type" : "number" }
}, },
"moatAbility": { "moatAbility" : {
"type":"string", "type" : "string",
"description": "Identifier of ability to use as town moat during siege" "description" : "Identifier of ability to use as town moat during siege"
}, },
"siege": { "siege" : {
"$ref" : "townSiege.json" "$ref" : "townSiege.json"
}, },
"musicTheme": { "musicTheme" : {
"type":"string", "type" : "string",
"description": "Path to town music theme", "description" : "Path to town music theme",
"format" : "musicFile" "format" : "musicFile"
}, },
"tavernVideo" : { "tavernVideo" : {
@@ -149,28 +147,28 @@
"description" : "Video for tavern window", "description" : "Video for tavern window",
"format" : "videoFile" "format" : "videoFile"
}, },
"townBackground": { "townBackground" : {
"type":"string",
"description": "Background for town screen",
"format" : "imageFile"
},
"guildWindow": {
"type":"string",
"description": "Image with small view on town from mage guild"
},
"guildBackground": {
"type":"string",
"description": "Image with background of mage guild",
"format" : "imageFile"
},
"hallBackground": {
"type":"string",
"description": "background image for town hall",
"format" : "imageFile"
},
"buildingsIcons": {
"type" : "string", "type" : "string",
"description": "Path to .def file with building icons", "description" : "Background for town screen",
"format" : "imageFile"
},
"guildWindow" : {
"type" : "string",
"description" : "Image with small view on town from mage guild"
},
"guildBackground" : {
"type" : "string",
"description" : "Image with background of mage guild",
"format" : "imageFile"
},
"hallBackground" : {
"type" : "string",
"description" : "background image for town hall",
"format" : "imageFile"
},
"buildingsIcons" : {
"type" : "string",
"description" : "Path to .def file with building icons",
"format" : "animationFile" "format" : "animationFile"
}, },
"mapObject" : { "mapObject" : {
@@ -181,25 +179,25 @@
} }
} }
}, },
"structures": { "structures" : {
"type" : "object", "type" : "object",
"additionalProperties" : { "additionalProperties" : {
"$ref" : "townStructure.json" "$ref" : "townStructure.json"
} }
}, },
"icons": { "icons" : {
"type":"object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"description": "Town icons", "description" : "Town icons",
"required" : [ "fort", "village" ], "required" : [ "fort", "village" ],
"properties":{ "properties" : {
"fort": { "fort" : {
"$ref" : "#/definitions/townIconPair", "$ref" : "#/definitions/townIconPair",
"description": "Icons for town with built fort" "description" : "Icons for town with built fort"
}, },
"village": { "village" : {
"$ref" : "#/definitions/townIconPair", "$ref" : "#/definitions/townIconPair",
"description": "Icons for town without fort" "description" : "Icons for town without fort"
} }
} }
}, },
@@ -231,30 +229,30 @@
} }
} }
}, },
"puzzleMap": { "puzzleMap" : {
"type":"object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"required" : [ "prefix", "pieces" ], "required" : [ "prefix", "pieces" ],
"description": "Puzzle map from obelisks for this town. Must contain 48 pieces", "description" : "Puzzle map from obelisks for this town. Must contain 48 pieces",
"properties":{ "properties" : {
"pieces": { "pieces" : {
"type":"array", "type" : "array",
"description": "Lits of pieces definitions", "description" : "Lits of pieces definitions",
"minItems" : 48, "minItems" : 48,
"maxItems" : 48, "maxItems" : 48,
"items": { "items" : {
"type":"object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"properties":{ "properties" : {
"index": { "type":"number", "description" : "Order in which images will be opened" }, "index" : { "type" : "number", "description" : "Order in which images will be opened" },
"x": { "type":"number", "description" : "X coordinate on screen" }, "x" : { "type" : "number", "description" : "X coordinate on screen" },
"y": { "type":"number", "description" : "X coordinate on screen" } "y" : { "type" : "number", "description" : "X coordinate on screen" }
} }
} }
}, },
"prefix": { "prefix" : {
"type":"string", "type" : "string",
"description": "Prefix for image names, e.g. \"PUZCAS\" for name \"PUZCAS12.png\"" "description" : "Prefix for image names, e.g. \"PUZCAS\" for name \"PUZCAS12.png\""
} }
} }
}, },

View File

@@ -1,10 +1,9 @@
{ {
"type":"object", "type" : "object",
"$schema": "http://json-schema.org/draft-04/schema", "$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI hero format", "title" : "VCMI hero format",
"description" : "Format used to define new heroes in VCMI", "description" : "Format used to define new heroes in VCMI",
"required": [ "class", "army", "skills", "texts" ], "required" : [ "class", "army", "skills", "texts" ],
"oneOf" : [ "oneOf" : [
{ {
"required" : [ "images" ] "required" : [ "images" ]
@@ -13,105 +12,104 @@
"required" : [ "index" ] "required" : [ "index" ]
} }
], ],
"additionalProperties" : false, "additionalProperties" : false,
"properties":{ "properties" : {
"special": { "special" : {
"type":"boolean", "type" : "boolean",
"description": "Marks this object as special and not available by default" "description" : "Marks this object as special and not available by default"
}, },
"class": { "class" : {
"type":"string", "type" : "string",
"description": "Hero class, e.g. knight or battleMage" "description" : "Hero class, e.g. knight or battleMage"
}, },
"female": { "female" : {
"type":"boolean", "type" : "boolean",
"description": "This hero is female (changeable via editor)" "description" : "This hero is female (changeable via editor)"
}, },
"battleImage": { "battleImage" : {
"type":"string", "type" : "string",
"description": "Custom def used on battle", "description" : "Custom def used on battle",
"format" : "defFile" "format" : "defFile"
}, },
"images": { "images" : {
"type":"object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"description": "images", "description" : "images",
"required": [ "large", "small", "specialtyLarge", "specialtySmall" ], "required" : [ "large", "small", "specialtyLarge", "specialtySmall" ],
"properties":{ "properties" : {
"large": { "large" : {
"type":"string", "type" : "string",
"description": "Large version of portrait for use in hero screen", "description" : "Large version of portrait for use in hero screen",
"format" : "imageFile" "format" : "imageFile"
}, },
"small": { "small" : {
"type":"string", "type" : "string",
"description": "Small version of portrait for use on adventure map", "description" : "Small version of portrait for use on adventure map",
"format" : "imageFile" "format" : "imageFile"
}, },
"specialtyLarge": { "specialtyLarge" : {
"type":"string", "type" : "string",
"description": "Large image of hero specilty, used in hero screen", "description" : "Large image of hero specilty, used in hero screen",
"format" : "imageFile" "format" : "imageFile"
}, },
"specialtySmall": { "specialtySmall" : {
"type":"string", "type" : "string",
"description": "Small image of hero specialty for use in exchange screen", "description" : "Small image of hero specialty for use in exchange screen",
"format" : "imageFile" "format" : "imageFile"
} }
} }
}, },
"army": { "army" : {
"type":"array", "type" : "array",
"description": "Initial hero army when recruited in tavern", "description" : "Initial hero army when recruited in tavern",
"minItems" : 1, "minItems" : 1,
"maxItems" : 3, "maxItems" : 3,
"items": { "items" : {
"type":"object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"required" : [ "creature", "min", "max" ], "required" : [ "creature", "min", "max" ],
"properties":{ "properties" : {
"creature": { "creature" : {
"type":"string", "type" : "string",
"description": "creature" "description" : "creature"
}, },
"max": { "max" : {
"type":"number", "type" : "number",
"description": "max", "description" : "max",
"minimum" : 1 "minimum" : 1
}, },
"min": { "min" : {
"type":"number", "type" : "number",
"description": "min", "description" : "min",
"minimum" : 1 "minimum" : 1
} }
} }
} }
}, },
"skills": { "skills" : {
"type":"array", "type" : "array",
"description": "List of skills initially known by hero", "description" : "List of skills initially known by hero",
"maxItems" : 8, "maxItems" : 8,
"items": { "items" : {
"type":"object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"required" : [ "level", "skill" ], "required" : [ "level", "skill" ],
"properties":{ "properties" : {
"level": { "level" : {
"type":"string", "type" : "string",
"description": "level", "description" : "level",
"enum" : [ "basic", "advanced", "expert" ] "enum" : [ "basic", "advanced", "expert" ]
}, },
"skill": { "skill" : {
"type":"string", "type" : "string",
"description": "skill" "description" : "skill"
} }
} }
} }
}, },
"specialty": { "specialty" : {
"type" : "object", "type" : "object",
"description": "Description of hero specialty using bonus system", "description" : "Description of hero specialty using bonus system",
"additionalProperties" : false, "additionalProperties" : false,
"properties" : { "properties" : {
"base" : { "base" : {
@@ -129,42 +127,42 @@
} }
} }
}, },
"spellbook": { "spellbook" : {
"type":"array", "type" : "array",
"description": "List of starting spells, if available. This entry (even empty) will also grant spellbook", "description" : "List of starting spells, if available. This entry (even empty) will also grant spellbook",
"items": { "type":"string" } "items" : { "type" : "string" }
}, },
"texts": { "texts" : {
"type":"object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"description": "All translatable texts related to hero", "description" : "All translatable texts related to hero",
"required" : [ "name", "biography", "specialty" ], "required" : [ "name", "biography", "specialty" ],
"properties":{ "properties" : {
"name": { "name" : {
"type":"string", "type" : "string",
"description": "Hero name" "description" : "Hero name"
}, },
"biography": { "biography" : {
"type":"string", "type" : "string",
"description": "Hero biography" "description" : "Hero biography"
}, },
"specialty": { "specialty" : {
"type":"object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"description": "Hero specialty information", "description" : "Hero specialty information",
"required" : [ "name", "description", "tooltip" ], "required" : [ "name", "description", "tooltip" ],
"properties":{ "properties" : {
"name": { "name" : {
"type":"string", "type" : "string",
"description": "Name of the specialty" "description" : "Name of the specialty"
}, },
"description": { "description" : {
"type":"string", "type" : "string",
"description": "Description visible when hovering over specialty icon" "description" : "Description visible when hovering over specialty icon"
}, },
"tooltip": { "tooltip" : {
"type":"string", "type" : "string",
"description": "Tooltip visible on clicking icon." "description" : "Tooltip visible on clicking icon."
} }
} }
} }

View File

@@ -1,6 +1,6 @@
{ {
"type":"object", "type" : "object",
"$schema": "http://json-schema.org/draft-04/schema", "$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI hero class format", "title" : "VCMI hero class format",
"description" : "Format used to define classes of heroes in VCMI", "description" : "Format used to define classes of heroes in VCMI",
"required" : [ "required" : [
@@ -8,46 +8,45 @@
"primarySkills", "secondarySkills", "lowLevelChance", "highLevelChance", "primarySkills", "secondarySkills", "lowLevelChance", "highLevelChance",
"defaultTavern", "tavern" "defaultTavern", "tavern"
], ],
"additionalProperties" : false, "additionalProperties" : false,
"properties":{ "properties" : {
"name": { "name" : {
"type":"string", "type" : "string",
"description": "Translatable name of hero class" "description" : "Translatable name of hero class"
}, },
"faction": { "faction" : {
"type":"string", "type" : "string",
"description": "Faction this hero class belongs to" "description" : "Faction this hero class belongs to"
}, },
"affinity" : { "affinity" : {
"type" : "string", "type" : "string",
"description" : "Affinity of hero class, might or magic", "description" : "Affinity of hero class, might or magic",
"enum" : [ "might", "magic"] "enum" : [ "might", "magic"]
}, },
"commander": { "commander" : {
"type":"string", "type" : "string",
"description": "Identifier of creature that is used as commander by heroes" "description" : "Identifier of creature that is used as commander by heroes"
}, },
"animation": { "animation" : {
"type":"object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"description": "Files related to hero animation", "description" : "Files related to hero animation",
"required": [ "battle" ], "required" : [ "battle" ],
"properties":{ "properties" : {
"battle": { "battle" : {
"type":"object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"description": "Hero animations for battle", "description" : "Hero animations for battle",
"required": [ "female", "male" ], "required" : [ "female", "male" ],
"properties":{ "properties" : {
"female": { "female" : {
"type":"string", "type" : "string",
"description": "Female version", "description" : "Female version",
"format" : "defFile" "format" : "defFile"
}, },
"male": { "male" : {
"type":"string", "type" : "string",
"description": "Male version", "description" : "Male version",
"format" : "defFile" "format" : "defFile"
} }
} }
@@ -62,32 +61,32 @@
} }
} }
}, },
"primarySkills": { "primarySkills" : {
"type":"object", "type" : "object",
"description": "Initial primary skills of heroes", "description" : "Initial primary skills of heroes",
"additionalProperties":{ "additionalProperties" : {
"type":"number" "type" : "number"
} }
}, },
"secondarySkills": { "secondarySkills" : {
"type":"object", "type" : "object",
"description": "Chance to get specific secondary skill on level-up. All missing skills are considered to be banned", "description" : "Chance to get specific secondary skill on level-up. All missing skills are considered to be banned",
"additionalProperties":{ "additionalProperties" : {
"type":"number" "type" : "number"
} }
}, },
"lowLevelChance": { "lowLevelChance" : {
"type":"object", "type" : "object",
"description": "Chance to get specific primary skill on level-up, applicable for levels less than 10", "description" : "Chance to get specific primary skill on level-up, applicable for levels less than 10",
"additionalProperties":{ "additionalProperties" : {
"type":"number" "type" : "number"
} }
}, },
"highLevelChance": { "highLevelChance" : {
"type":"object", "type" : "object",
"description": "Chance to get specific primary skill on level-up, applicable for levels starting from 10", "description" : "Chance to get specific primary skill on level-up, applicable for levels starting from 10",
"additionalProperties":{ "additionalProperties" : {
"type":"number" "type" : "number"
} }
}, },
"defaultTavern" : { "defaultTavern" : {
@@ -95,11 +94,11 @@
"description" : "Default chance for hero to appear in tavern, used only when value vas not set in tavern field", "description" : "Default chance for hero to appear in tavern, used only when value vas not set in tavern field",
"minimum" : 0 "minimum" : 0
}, },
"tavern": { "tavern" : {
"type":"object", "type" : "object",
"description": "Chance for this hero to appear in tavern of this factions. Reversed version of field \"tavern\" from town format", "description" : "Chance for this hero to appear in tavern of this factions. Reversed version of field \"tavern\" from town format",
"additionalProperties":{ "additionalProperties" : {
"type":"number", "type" : "number",
"minimum" : 0 "minimum" : 0
} }
}, },

View File

@@ -1,23 +1,22 @@
{ {
"type":"object", "type" : "object",
"$schema": "http://json-schema.org/draft-04/schema", "$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI map header format", "title" : "VCMI map header format",
"description" : "Part of map in json format, defines core settings of the map", "description" : "Part of map in json format, defines core settings of the map",
"required": [ "victoryIconIndex", "victoryString", "defeatIconIndex", "defeatString" ], "required" : [ "victoryIconIndex", "victoryString", "defeatIconIndex", "defeatString" ],
"additionalProperties" : false, "additionalProperties" : false,
"properties":{ "properties" : {
"victoryIconIndex": { "victoryIconIndex" : {
"type":"number" "type" : "number"
}, },
"victoryString": { "victoryString" : {
"type":"string" "type" : "string"
}, },
"defeatIconIndex": { "defeatIconIndex" : {
"type":"number" "type" : "number"
}, },
"defeatString": { "defeatString" : {
"type":"string" "type" : "string"
}, },
"triggeredEvents" : { "triggeredEvents" : {
"type" : "object", "type" : "object",

View File

@@ -1,94 +1,94 @@
{ {
"type":"object", "type" : "object",
"$schema": "http://json-schema.org/draft-04/schema", "$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI mod file format", "title" : "VCMI mod file format",
"description" : "Format used to define main mod file (mod.json) in VCMI", "description" : "Format used to define main mod file (mod.json) in VCMI",
"required" : [ "name", "description", "modType", "version", "author", "contact" ], "required" : [ "name", "description", "modType", "version", "author", "contact" ],
"definitions" : { "definitions" : {
"localizable" : { "localizable" : {
"type":"object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"required" : [ "name", "description" ], "required" : [ "name", "description" ],
"properties":{ "properties" : {
"name": { "name" : {
"type":"string", "type" : "string",
"description": "Short name of your mod. No more than 2-3 words" "description" : "Short name of your mod. No more than 2-3 words"
}, },
"description": { "description" : {
"type":"string", "type" : "string",
"description": "More lengthy description of mod. No hard limit" "description" : "More lengthy description of mod. No hard limit"
}, },
"author" : { "author" : {
"type":"string", "type" : "string",
"description": "Author of the mod. Can be nickname, real name or name of team" "description" : "Author of the mod. Can be nickname, real name or name of team"
}, },
"changelog" : { "changelog" : {
"type":"object", "type" : "object",
"description": "List of changes/new features in each version", "description" : "List of changes/new features in each version",
"additionalProperties" : { "additionalProperties" : {
"type" : "array", "type" : "array",
"items" : { "type":"string" } "items" : { "type" : "string" }
} }
}, },
"skipValidation" : { "skipValidation" : {
"type":"boolean", "type" : "boolean",
"description": "If set to true, vcmi will skip validation of current translation json files" "description" : "If set to true, vcmi will skip validation of current translation json files"
}, },
"translations":{ "translations" : {
"type":"array", "type" : "array",
"description": "List of files with translations for this language", "description" : "List of files with translations for this language",
"items": { "type":"string", "format" : "textFile" } "items" : { "type" : "string", "format" : "textFile" }
} }
} }
} }
}, },
"additionalProperties" : false, "additionalProperties" : false,
"properties":{ "properties" : {
"name": { "name" : {
"type":"string", "type" : "string",
"description": "Short name of your mod. No more than 2-3 words" "description" : "Short name of your mod. No more than 2-3 words"
}, },
"description": { "description" : {
"type":"string", "type" : "string",
"description": "More lengthy description of mod. No hard limit" "description" : "More lengthy description of mod. No hard limit"
}, },
"modType" : { "modType" : {
"type":"string", "type" : "string",
"enum" : [ "Translation", "Town", "Test", "Templates", "Spells", "Music", "Sounds", "Skills", "Other", "Objects", "Mechanics", "Interface", "Heroes", "Graphical", "Expansion", "Creatures", "Artifacts", "AI" ], "enum" : [ "Translation", "Town", "Test", "Templates", "Spells", "Music", "Sounds", "Skills", "Other", "Objects", "Mechanics", "Interface", "Heroes", "Graphical", "Expansion", "Creatures", "Artifacts", "AI" ],
"description": "Type of mod, e.g. Town, Artifacts, Graphical." "description" : "Type of mod, e.g. Town, Artifacts, Graphical."
}, },
"author" : { "author" : {
"type":"string", "type" : "string",
"description": "Author of the mod. Can be nickname, real name or name of team" "description" : "Author of the mod. Can be nickname, real name or name of team"
}, },
"contact" : { "contact" : {
"type":"string", "type" : "string",
"description": "Home page of mod or link to forum thread" "description" : "Home page of mod or link to forum thread"
}, },
"licenseName" : { "licenseName" : {
"type":"string", "type" : "string",
"description": "Name of the license, recommended is Creative Commons Attribution-ShareAlike" "description" : "Name of the license, recommended is Creative Commons Attribution-ShareAlike"
}, },
"licenseURL" : { "licenseURL" : {
"type":"string", "type" : "string",
"description": "Url to license text, e.g. http://creativecommons.org/licenses/by-sa/4.0/deed" "description" : "Url to license text, e.g. http://creativecommons.org/licenses/by-sa/4.0/deed"
}, },
"version" : { "version" : {
"type":"string", "type" : "string",
"description": "Current mod version, up to 3 numbers, dot-separated. Format: A.B.C" "description" : "Current mod version, up to 3 numbers, dot-separated. Format: A.B.C"
}, },
"changelog" : { "changelog" : {
"type":"object", "type" : "object",
"description": "List of changes/new features in each version", "description" : "List of changes/new features in each version",
"additionalProperties" : { "additionalProperties" : {
"type" : "array", "type" : "array",
"items" : { "type":"string" } "items" : { "type" : "string" }
} }
}, },
"compatibility" : { "compatibility" : {
"type":"object", "type" : "object",
"description": "Supported versions of vcmi engine", "description" : "Supported versions of vcmi engine",
"additionalProperties" : false, "additionalProperties" : false,
"properties" : { "properties" : {
"min" : { "min" : {
@@ -103,23 +103,23 @@
} }
} }
}, },
"depends": { "depends" : {
"type":"array", "type" : "array",
"description": "List of mods that are required to run this one", "description" : "List of mods that are required to run this one",
"items": { "type":"string" } "items" : { "type" : "string" }
}, },
"conflicts": { "conflicts" : {
"type":"array", "type" : "array",
"description": "List of mods that can't be enabled in the same time as this one", "description" : "List of mods that can't be enabled in the same time as this one",
"items": { "type":"string" } "items" : { "type" : "string" }
}, },
"keepDisabled" : { "keepDisabled" : {
"type":"boolean", "type" : "boolean",
"description": "If set to true, mod will not be enabled automatically on install" "description" : "If set to true, mod will not be enabled automatically on install"
}, },
"settings" : { "settings" : {
"type":"object", "type" : "object",
"description": "List of changed game settings by mod", "description" : "List of changed game settings by mod",
"additionalProperties" : { "additionalProperties" : {
"type" : "object", "type" : "object",
"properties" : { "properties" : {
@@ -127,21 +127,21 @@
} }
} }
}, },
"filesystem": { "filesystem" : {
"type":"object", "type" : "object",
"description": "Optional, description on how files are organized in your mod. In most cases you do not need to use this field", "description" : "Optional, description on how files are organized in your mod. In most cases you do not need to use this field",
"additionalProperties":{ "additionalProperties" : {
"type":"array", "type" : "array",
"description" : "list of data sources attached to this mount point", "description" : "list of data sources attached to this mount point",
"items": { "items" : {
"type":"object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"properties":{ "properties" : {
"path": { "path" : {
"type":"string", "type" : "string",
"description": "Path to data source" "description" : "Path to data source"
}, },
"type": { "type" : {
"type" : "string", "type" : "string",
"enum" : [ "dir", "lod", "snd", "vid", "map", "zip" ], "enum" : [ "dir", "lod", "snd", "vid", "map", "zip" ],
"description" : "Type of data source" "description" : "Type of data source"
@@ -151,8 +151,8 @@
} }
}, },
"language" : { "language" : {
"type":"string", "type" : "string",
"description": "Base language of the mod, before applying localizations. By default vcmi assumes English", "description" : "Base language of the mod, before applying localizations. By default vcmi assumes English",
"enum" : [ "chinese", "english", "korean", "german", "polish", "russian", "spanish", "ukrainian" ] "enum" : [ "chinese", "english", "korean", "german", "polish", "russian", "spanish", "ukrainian" ]
}, },
"chinese" : { "chinese" : {
@@ -179,90 +179,90 @@
"ukrainian" : { "ukrainian" : {
"$ref" : "#/definitions/localizable" "$ref" : "#/definitions/localizable"
}, },
"translations":{ "translations" : {
"type":"array", "type" : "array",
"description": "List of files with translations for this language", "description" : "List of files with translations for this language",
"items": { "type":"string", "format" : "textFile" } "items" : { "type" : "string", "format" : "textFile" }
}, },
"factions": { "factions" : {
"type":"array", "type" : "array",
"description": "List of configuration files for towns/factions", "description" : "List of configuration files for towns/factions",
"items": { "type":"string", "format" : "textFile" } "items" : { "type" : "string", "format" : "textFile" }
}, },
"heroClasses": { "heroClasses" : {
"type":"array", "type" : "array",
"description": "List of configuration files for hero classes", "description" : "List of configuration files for hero classes",
"items": { "type":"string", "format" : "textFile" } "items" : { "type" : "string", "format" : "textFile" }
}, },
"heroes": { "heroes" : {
"type":"array", "type" : "array",
"description": "List of configuration files for heroes", "description" : "List of configuration files for heroes",
"items": { "type":"string", "format" : "textFile" } "items" : { "type" : "string", "format" : "textFile" }
}, },
"skills": { "skills" : {
"type":"array", "type" : "array",
"description": "List of configuration files for skills", "description" : "List of configuration files for skills",
"items": { "type":"string", "format" : "textFile" } "items" : { "type" : "string", "format" : "textFile" }
}, },
"creatures": { "creatures" : {
"type":"array", "type" : "array",
"description": "List of configuration files for creatures", "description" : "List of configuration files for creatures",
"items": { "type":"string", "format" : "textFile" } "items" : { "type" : "string", "format" : "textFile" }
}, },
"artifacts": { "artifacts" : {
"type":"array", "type" : "array",
"description": "List of configuration files for artifacts", "description" : "List of configuration files for artifacts",
"items": { "type":"string", "format" : "textFile" } "items" : { "type" : "string", "format" : "textFile" }
}, },
"spells": { "spells" : {
"type":"array", "type" : "array",
"description": "List of configuration files for spells", "description" : "List of configuration files for spells",
"items": { "type":"string", "format" : "textFile" } "items" : { "type" : "string", "format" : "textFile" }
}, },
"objects": { "objects" : {
"type":"array", "type" : "array",
"description": "List of configuration files for objects", "description" : "List of configuration files for objects",
"items": { "type":"string", "format" : "textFile" } "items" : { "type" : "string", "format" : "textFile" }
}, },
"bonuses":{ "bonuses" : {
"type":"array", "type" : "array",
"description": "List of configuration files for bonuses", "description" : "List of configuration files for bonuses",
"items": { "type":"string", "format" : "textFile" } "items" : { "type" : "string", "format" : "textFile" }
}, },
"terrains":{ "terrains" : {
"type":"array", "type" : "array",
"description": "List of configuration files for terrains", "description" : "List of configuration files for terrains",
"items": { "type":"string", "format" : "textFile" } "items" : { "type" : "string", "format" : "textFile" }
}, },
"roads":{ "roads" : {
"type":"array", "type" : "array",
"description": "List of configuration files for roads", "description" : "List of configuration files for roads",
"items": { "type":"string", "format" : "textFile" } "items" : { "type" : "string", "format" : "textFile" }
}, },
"rivers":{ "rivers" : {
"type":"array", "type" : "array",
"description": "List of configuration files for rivers", "description" : "List of configuration files for rivers",
"items": { "type":"string", "format" : "textFile" } "items" : { "type" : "string", "format" : "textFile" }
}, },
"battlefields":{ "battlefields" : {
"type":"array", "type" : "array",
"description": "List of configuration files for battlefields", "description" : "List of configuration files for battlefields",
"items": { "type":"string", "format" : "textFile" } "items" : { "type" : "string", "format" : "textFile" }
}, },
"obstacles":{ "obstacles" : {
"type":"array", "type" : "array",
"description": "List of configuration files for obstacles", "description" : "List of configuration files for obstacles",
"items": { "type":"string", "format" : "textFile" } "items" : { "type" : "string", "format" : "textFile" }
}, },
"templates":{ "templates" : {
"type":"array", "type" : "array",
"description": "List of configuration files for RMG templates", "description" : "List of configuration files for RMG templates",
"items": { "type":"string", "format" : "textFile" } "items" : { "type" : "string", "format" : "textFile" }
}, },
"scripts": { "scripts" : {
"type":"array", "type" : "array",
"description": "List of configuration files for scripts", "description" : "List of configuration files for scripts",
"items": { "type":"string", "format" : "textFile" } "items" : { "type" : "string", "format" : "textFile" }
} }
} }
} }

View File

@@ -1,30 +1,30 @@
{ {
"type":"object", "type" : "object",
"$schema": "http://json-schema.org/draft-04/schema", "$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI map object format", "title" : "VCMI map object format",
"description" : "Description of map object class", "description" : "Description of map object class",
"required": [ "name", "handler" ], "required" : [ "name", "handler" ],
"additionalProperties" : false, "additionalProperties" : false,
"properties":{ "properties" : {
"name": { "name" : {
"type":"string" "type" : "string"
}, },
"index": { "index" : {
"type":"number" "type" : "number"
}, },
"lastReservedIndex" : { "lastReservedIndex" : {
"type":"number" "type" : "number"
}, },
"handler": { "handler" : {
"type":"string" "type" : "string"
}, },
"base": { "base" : {
"type" : "object" "type" : "object"
}, },
"types": { "types" : {
"type":"object", "type" : "object",
"additionalProperties": { "additionalProperties" : {
"$ref" : "objectType.json" "$ref" : "objectType.json"
} }
} }

View File

@@ -1,46 +1,45 @@
{ {
"type":"object", "type" : "object",
"$schema": "http://json-schema.org/draft-04/schema", "$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI map object template format", "title" : "VCMI map object template format",
"description" : "Description of map object tempate that describes appearence of object instance", "description" : "Description of map object tempate that describes appearence of object instance",
"required": [ "animation", "mask" ], "required" : [ "animation", "mask" ],
"additionalProperties" : false, "additionalProperties" : false,
"properties":{ "properties" : {
"animation": { "animation" : {
"type" : "string", "type" : "string",
"description": "Path to def file with animation of this object", "description" : "Path to def file with animation of this object",
"format" : "defFile" "format" : "defFile"
}, },
"editorAnimation":{ "editorAnimation" : {
"type" : "string", "type" : "string",
"description": "Optional path to def file with animation of this object to use in map editor", "description" : "Optional path to def file with animation of this object to use in map editor",
"format" : "defFile" "format" : "defFile"
}, },
"visitableFrom": { "visitableFrom" : {
"type":"array", "type" : "array",
"description": "Directions from which this object is visible", "description" : "Directions from which this object is visible",
"minItems" : 3, "minItems" : 3,
"maxItems" : 3, "maxItems" : 3,
"items": { "items" : {
"type": "string", "type" : "string",
"minLength" : 3, "minLength" : 3,
"maxLength" : 3 "maxLength" : 3
} }
}, },
"mask" : { "mask" : {
"type":"array", "type" : "array",
"items": { "type": "string" }, "items" : { "type" : "string" },
"description": "Object mask that describes on which tiles object is visible/blocked/activatable" "description" : "Object mask that describes on which tiles object is visible/blocked/activatable"
}, },
"zIndex" : { "zIndex" : {
"type":"number", "type" : "number",
"description": "Defines order in which objects on same tile will be blit." "description" : "Defines order in which objects on same tile will be blit."
}, },
"allowedTerrains" : { "allowedTerrains" : {
"type":"array", "type" : "array",
"items": { "type": "string" }, "items" : { "type" : "string" },
"description": "List of terrain on which this object can be placed" "description" : "List of terrain on which this object can be placed"
} }
} }
} }

View File

@@ -1,53 +1,52 @@
{ {
"type":"object", "type" : "object",
"$schema": "http://json-schema.org/draft-04/schema", "$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI map object type format", "title" : "VCMI map object type format",
"description" : "Description of map object type, used only as sub-schema of object", "description" : "Description of map object type, used only as sub-schema of object",
"required": [ ], "required" : [ ],
"additionalProperties" : true, // may have type-dependant properties "additionalProperties" : true, // may have type-dependant properties
"properties" : {
"properties":{ "index" : {
"index": { "type" : "number"
"type":"number"
}, },
"aiValue": { "aiValue" : {
"type":"number" "type" : "number"
}, },
"base": { "base" : {
"type" : "object" "type" : "object"
}, },
"templates": { "templates" : {
"type":"object", "type" : "object",
"additionalProperties": { "additionalProperties" : {
"$ref" : "objectTemplate.json" "$ref" : "objectTemplate.json"
} }
}, },
"sounds": { "sounds" : {
"type":"object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"description": "Sounds used by this object", "description" : "Sounds used by this object",
"properties" : { "properties" : {
"ambient": { "ambient" : {
"type":"array", "type" : "array",
"description": "Background sound of an object", "description" : "Background sound of an object",
"items": { "items" : {
"type": "string", "type" : "string",
"format" : "soundFile" "format" : "soundFile"
} }
}, },
"visit": { "visit" : {
"type":"array", "type" : "array",
"description": "Sound that played on object visit", "description" : "Sound that played on object visit",
"items": { "items" : {
"type": "string", "type" : "string",
"format" : "soundFile" "format" : "soundFile"
} }
}, },
"removal": { "removal" : {
"type":"array", "type" : "array",
"description": "Sound that played on object removal", "description" : "Sound that played on object removal",
"items": { "items" : {
"type": "string", "type" : "string",
"format" : "soundFile" "format" : "soundFile"
} }
} }

View File

@@ -1,50 +1,49 @@
{ {
"type":"object", "type" : "object",
"$schema": "http://json-schema.org/draft-04/schema", "$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI obstacle format", "title" : "VCMI obstacle format",
"description" : "Format used to define new obstacles in VCMI", "description" : "Format used to define new obstacles in VCMI",
"required" : [ "animation" ], "required" : [ "animation" ],
"additionalProperties" : false, "additionalProperties" : false,
"properties":{ "properties" : {
"allowedTerrains": { "allowedTerrains" : {
"type": "array", "type" : "array",
"description": "Obstacles can be place on specified terrains only", "description" : "Obstacles can be place on specified terrains only",
"items": { "type" : "string" } "items" : { "type" : "string" }
}, },
"specialBattlefields": { "specialBattlefields" : {
"type": "array", "type" : "array",
"description": "Obstacles can be placed on specified specified battlefields", "description" : "Obstacles can be placed on specified specified battlefields",
"items": { "type" : "string" } "items" : { "type" : "string" }
}, },
"absolute": { "absolute" : {
"type": "boolean", "type" : "boolean",
"description": "Should be used absolute or relative coordinates for obstacle. There is possible only one absolute obstacle" "description" : "Should be used absolute or relative coordinates for obstacle. There is possible only one absolute obstacle"
}, },
"width": { "width" : {
"type": "number", "type" : "number",
"description": "Width ob obstacle" "description" : "Width ob obstacle"
}, },
"height": { "height" : {
"type": "number", "type" : "number",
"description": "height if obstacle" "description" : "height if obstacle"
}, },
"blockedTiles": { "blockedTiles" : {
"type": "array", "type" : "array",
"description": "Blocked hexes - absolute or relative hex id", "description" : "Blocked hexes - absolute or relative hex id",
"items": { "type" : "number" } "items" : { "type" : "number" }
}, },
"animation": { "animation" : {
"type": "string", "type" : "string",
"description": "Image resource", "description" : "Image resource",
"anyOf" : [ "anyOf" : [
{ "format" : "defFile" }, { "format" : "defFile" },
{ "format" : "imageFile" } { "format" : "imageFile" }
] ]
}, },
"unknown": { "unknown" : {
"type": "number", "type" : "number",
"description": "Unknown field" "description" : "Unknown field"
} }
} }
} }

View File

@@ -1,37 +1,36 @@
{ {
"type":"object", "type" : "object",
"$schema": "http://json-schema.org/draft-04/schema", "$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI river format", "title" : "VCMI river format",
"description" : "Format used to define new rivers in VCMI", "description" : "Format used to define new rivers in VCMI",
"required" : [ "shortIdentifier", "text", "tilesFilename", "delta" ], "required" : [ "shortIdentifier", "text", "tilesFilename", "delta" ],
"additionalProperties" : false, "additionalProperties" : false,
"properties":{ "properties" : {
"shortIdentifier": "shortIdentifier" :
{ {
"type": "string", "type" : "string",
"description": "Two-letters unique indentifier for this road. Used in map format" "description" : "Two-letters unique indentifier for this road. Used in map format"
}, },
"text": "text" :
{ {
"type": "string", "type" : "string",
"description": "Human-readable name of the river" "description" : "Human-readable name of the river"
}, },
"tilesFilename": "tilesFilename" :
{ {
"type": "string", "type" : "string",
"description": "Name of file with river graphics", "description" : "Name of file with river graphics",
"format": "defFile" "format" : "defFile"
}, },
"delta": "delta" :
{ {
"type": "string", "type" : "string",
"description": "Name of file with river delta graphics" "description" : "Name of file with river delta graphics"
}, },
"index" : "index" :
{ {
"type": "number", "type" : "number",
"description": "Internal, do not use" "description" : "Internal, do not use"
} }
} }
} }

View File

@@ -1,37 +1,36 @@
{ {
"type":"object", "type" : "object",
"$schema": "http://json-schema.org/draft-04/schema", "$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI road format", "title" : "VCMI road format",
"description" : "Format used to define new roads in VCMI", "description" : "Format used to define new roads in VCMI",
"required" : [ "shortIdentifier", "text", "tilesFilename", "moveCost" ], "required" : [ "shortIdentifier", "text", "tilesFilename", "moveCost" ],
"additionalProperties" : false, "additionalProperties" : false,
"properties":{ "properties" : {
"shortIdentifier": "shortIdentifier" :
{ {
"type": "string", "type" : "string",
"description": "Two-letters unique indentifier for this road. Used in map format" "description" : "Two-letters unique indentifier for this road. Used in map format"
}, },
"text": "text" :
{ {
"type": "string", "type" : "string",
"description": "Human-readable name of the road" "description" : "Human-readable name of the road"
}, },
"tilesFilename": "tilesFilename" :
{ {
"type": "string", "type" : "string",
"description": "Name of file with road graphics", "description" : "Name of file with road graphics",
"format": "defFile" "format" : "defFile"
}, },
"moveCost": "moveCost" :
{ {
"type": "number", "type" : "number",
"description": "How many movement points needed to move hero" "description" : "How many movement points needed to move hero"
}, },
"index" : "index" :
{ {
"type": "number", "type" : "number",
"description": "Internal, do not use" "description" : "Internal, do not use"
} }
} }
} }

View File

@@ -6,13 +6,13 @@
"required" : ["source"], "required" : ["source"],
"properties" : { "properties" : {
"source" : { "source" : {
"type": "string", "type" : "string",
"description": "Full VFS path to script source (extension required)" "description" : "Full VFS path to script source (extension required)"
}, },
"implements" :{ "implements" : {
"type": "string", "type" : "string",
"enum": ["ANYTHING", "BATTLE_EFFECT"], "enum" : ["ANYTHING", "BATTLE_EFFECT"],
"description": "" "description" : ""
} }
} }
} }

View File

@@ -2,7 +2,7 @@
// Any new settings should be added in this file for correct serialization and initialization // Any new settings should be added in this file for correct serialization and initialization
{ {
"type" : "object", "type" : "object",
"$schema": "http://json-schema.org/draft-04/schema", "$schema" : "http://json-schema.org/draft-04/schema",
"required" : [ "general", "video", "adventure", "pathfinder", "battle", "server", "logging", "launcher", "gameTweaks" ], "required" : [ "general", "video", "adventure", "pathfinder", "battle", "server", "logging", "launcher", "gameTweaks" ],
"definitions" : { "definitions" : {
"logLevelEnum" : { "logLevelEnum" : {
@@ -11,11 +11,11 @@
} }
}, },
"additionalProperties" : false, "additionalProperties" : false,
"properties": "properties" :
{ {
"general" : { "general" : {
"type" : "object", "type" : "object",
"default": {}, "default" : {},
"additionalProperties" : false, "additionalProperties" : false,
"required" : [ "required" : [
"playerName", "playerName",
@@ -35,7 +35,7 @@
], ],
"properties" : { "properties" : {
"playerName" : { "playerName" : {
"type":"string", "type" : "string",
"default" : "Player" "default" : "Player"
}, },
"music" : { "music" : {
@@ -59,21 +59,21 @@
"default" : false "default" : false
}, },
"lastMap" : { "lastMap" : {
"type":"string", "type" : "string",
"default" : "Maps/Arrogance" "default" : "Maps/Arrogance"
}, },
"language" : { "language" : {
"type":"string", "type" : "string",
"enum" : [ "english", "chinese", "german", "polish", "russian", "spanish", "ukrainian" ], "enum" : [ "english", "chinese", "german", "polish", "russian", "spanish", "ukrainian" ],
"default" : "english" "default" : "english"
}, },
"gameDataLanguage" : { "gameDataLanguage" : {
"type":"string", "type" : "string",
"enum" : [ "auto", "english", "chinese", "german", "korean", "polish", "russian", "spanish", "ukrainian", "other_cp1250", "other_cp1251", "other_cp1252" ], "enum" : [ "auto", "english", "chinese", "german", "korean", "polish", "russian", "spanish", "ukrainian", "other_cp1250", "other_cp1251", "other_cp1252" ],
"default" : "auto" "default" : "auto"
}, },
"lastSave" : { "lastSave" : {
"type":"string", "type" : "string",
"default" : "NEWGAME" "default" : "NEWGAME"
}, },
"lastSettingsTab" : { "lastSettingsTab" : {
@@ -81,7 +81,7 @@
"default" : 0 "default" : 0
}, },
"lastCampaign" : { "lastCampaign" : {
"type":"string", "type" : "string",
"default" : "" "default" : ""
}, },
"saveFrequency" : { "saveFrequency" : {
@@ -109,7 +109,7 @@
"video" : { "video" : {
"type" : "object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"default": {}, "default" : {},
"required" : [ "required" : [
"resolution", "resolution",
"bitsPerPixel", "bitsPerPixel",
@@ -133,15 +133,15 @@
"height" : { "type" : "number" }, "height" : { "type" : "number" },
"scaling" : { "type" : "number" } "scaling" : { "type" : "number" }
}, },
"default": {"width" : 800, "height": 600, "scaling" : 100 } "default" : {"width" : 800, "height" : 600, "scaling" : 100 }
}, },
"bitsPerPixel" : { "bitsPerPixel" : {
"type" : "number", "type" : "number",
"default" : 32 "default" : 32
}, },
"fullscreen": { "fullscreen" : {
"type": "boolean", "type" : "boolean",
"default": false "default" : false
}, },
"realFullscreen" : { "realFullscreen" : {
"type" : "boolean", "type" : "boolean",
@@ -160,7 +160,7 @@
"type" : "boolean", "type" : "boolean",
"default" : true "default" : true
}, },
"driver":{ "driver" : {
"type" : "string", "type" : "string",
"default" : "opengl", "default" : "opengl",
"description" : "preferred graphics backend driver name for SDL2" "description" : "preferred graphics backend driver name for SDL2"
@@ -182,7 +182,7 @@
"adventure" : { "adventure" : {
"type" : "object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"default": {}, "default" : {},
"required" : [ "heroMoveTime", "enemyMoveTime", "scrollSpeedPixels", "heroReminder", "quickCombat", "objectAnimation", "terrainAnimation", "alwaysSkipCombat" ], "required" : [ "heroMoveTime", "enemyMoveTime", "scrollSpeedPixels", "heroReminder", "quickCombat", "objectAnimation", "terrainAnimation", "alwaysSkipCombat" ],
"properties" : { "properties" : {
"heroMoveTime" : { "heroMoveTime" : {
@@ -222,13 +222,13 @@
"pathfinder" : { "pathfinder" : {
"type" : "object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"default": {}, "default" : {},
"required" : [ "teleports", "layers", "oneTurnSpecialLayersLimit", "originalMovementRules", "lightweightFlyingMode" ], "required" : [ "teleports", "layers", "oneTurnSpecialLayersLimit", "originalMovementRules", "lightweightFlyingMode" ],
"properties" : { "properties" : {
"layers" : { "layers" : {
"type" : "object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"default": {}, "default" : {},
"required" : [ "sailing", "waterWalking", "flying" ], "required" : [ "sailing", "waterWalking", "flying" ],
"properties" : { "properties" : {
"sailing" : { "sailing" : {
@@ -248,7 +248,7 @@
"teleports" : { "teleports" : {
"type" : "object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"default": {}, "default" : {},
"required" : [ "twoWay", "oneWay", "oneWayRandom", "whirlpool", "castleGate" ], "required" : [ "twoWay", "oneWay", "oneWayRandom", "whirlpool", "castleGate" ],
"properties" : { "properties" : {
"twoWay" : { "twoWay" : {
@@ -290,7 +290,7 @@
"battle" : { "battle" : {
"type" : "object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"default": {}, "default" : {},
"required" : [ "speedFactor", "mouseShadow", "cellBorders", "stackRange", "movementHighlightOnHover", "showQueue", "queueSize", "touchscreenMode" ], "required" : [ "speedFactor", "mouseShadow", "cellBorders", "stackRange", "movementHighlightOnHover", "showQueue", "queueSize", "touchscreenMode" ],
"properties" : { "properties" : {
"speedFactor" : { "speedFactor" : {
@@ -298,7 +298,7 @@
"default" : 2 "default" : 2
}, },
"mouseShadow" : { "mouseShadow" : {
"type":"boolean", "type" : "boolean",
"default" : true "default" : true
}, },
"cellBorders" : { "cellBorders" : {
@@ -331,11 +331,11 @@
"server" : { "server" : {
"type" : "object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"default": {}, "default" : {},
"required" : [ "server", "port", "localInformation", "playerAI", "friendlyAI","neutralAI", "enemyAI", "reconnect", "uuid", "names" ], "required" : [ "server", "port", "localInformation", "playerAI", "friendlyAI","neutralAI", "enemyAI", "reconnect", "uuid", "names" ],
"properties" : { "properties" : {
"server" : { "server" : {
"type":"string", "type" : "string",
"default" : "127.0.0.1" "default" : "127.0.0.1"
}, },
"port" : { "port" : {
@@ -373,7 +373,7 @@
"names" : { "names" : {
"type" : "array", "type" : "array",
"default" : [], "default" : [],
"items": "items" :
{ {
"type" : "string", "type" : "string",
"default" : "" "default" : ""
@@ -457,7 +457,7 @@
}, },
"launcher" : { "launcher" : {
"type" : "object", "type" : "object",
"default": {}, "default" : {},
"additionalProperties" : false, "additionalProperties" : false,
"required" : [ "setupCompleted", "repositoryURL", "enableInstalledMods", "extraResolutionsModPath", "autoCheckRepositories", "updateOnStartup", "updateConfigUrl", "lobbyUrl", "lobbyPort", "lobbyUsername", "connectionTimeout" ], "required" : [ "setupCompleted", "repositoryURL", "enableInstalledMods", "extraResolutionsModPath", "autoCheckRepositories", "updateOnStartup", "updateConfigUrl", "lobbyUrl", "lobbyPort", "lobbyUsername", "connectionTimeout" ],
"properties" : { "properties" : {
@@ -517,10 +517,10 @@
} }
}, },
"gameTweaks" : { "gameTweaks" : {
"type": "object", "type" : "object",
"default": {}, "default" : {},
"additionalProperties": false, "additionalProperties" : false,
"required": [ "required" : [
"showGrid", "showGrid",
"forceMovementInfo", "forceMovementInfo",
"numericCreaturesQuantities", "numericCreaturesQuantities",
@@ -529,18 +529,18 @@
"infoBarPick", "infoBarPick",
"skipBattleIntroMusic" "skipBattleIntroMusic"
], ],
"properties": { "properties" : {
"showGrid": { "showGrid" : {
"type": "boolean", "type" : "boolean",
"default": false "default" : false
}, },
"forceMovementInfo": { "forceMovementInfo" : {
"type": "boolean", "type" : "boolean",
"default": false "default" : false
}, },
"numericCreaturesQuantities": { "numericCreaturesQuantities" : {
"type": "boolean", "type" : "boolean",
"default": false "default" : false
}, },
"availableCreaturesAsDwellingLabel" : { "availableCreaturesAsDwellingLabel" : {
"type" : "boolean", "type" : "boolean",

View File

@@ -46,20 +46,20 @@
"required" : ["name", "basic", "advanced", "expert"], "required" : ["name", "basic", "advanced", "expert"],
"properties" : { "properties" : {
"name" : { "name" : {
"type": "string", "type" : "string",
"description": "localizable skill name" "description" : "localizable skill name"
}, },
"index" : { "index" : {
"type": "number", "type" : "number",
"description": "numeric id of skill, required for existing skills" "description" : "numeric id of skill, required for existing skills"
}, },
"obligatoryMajor":{ "obligatoryMajor" : {
"type": "boolean", "type" : "boolean",
"description": "This skill is major obligatory (like H3 Wisdom)" "description" : "This skill is major obligatory (like H3 Wisdom)"
}, },
"obligatoryMinor":{ "obligatoryMinor" : {
"type": "boolean", "type" : "boolean",
"description": "This skill is minor obligatory (like H3 Magic school)" "description" : "This skill is minor obligatory (like H3 Magic school)"
}, },
"gainChance" : { "gainChance" : {
"description" : "Chance for the skill to be offered on level-up (heroClass may override)", "description" : "Chance for the skill to be offered on level-up (heroClass may override)",

View File

@@ -1,310 +1,310 @@
{ {
"type":"object", "type" : "object",
"$schema": "http://json-schema.org/draft-04/schema", "$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI spell format", "title" : "VCMI spell format",
"description" : "Format used to define new spells in VCMI", "description" : "Format used to define new spells in VCMI",
"definitions" : { "definitions" : {
"animationQueue":{ "animationQueue" : {
"type": "array", "type" : "array",
"items":{ "items" : {
"anyOf":[ "anyOf" :[
{ {
//dummy animation, pause, Value - frame count //dummy animation, pause, Value - frame count
"type": "number" "type" : "number"
}, },
{ {
//assumed verticalPosition: top //assumed verticalPosition: top
"type": "string", "type" : "string",
"format": "defFile" "format" : "defFile"
}, },
{ {
"type": "object", "type" : "object",
"properties":{ "properties" : {
"verticalPosition": {"type":"string", "enum":["top","bottom"]}, "verticalPosition" : {"type" : "string", "enum" :["top","bottom"]},
"defName": {"type":"string", "format": "defFile"} "defName" : {"type" : "string", "format" : "defFile"}
}, },
"additionalProperties" : false "additionalProperties" : false
} }
] ]
} }
}, },
"animation":{ "animation" : {
"type": "object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"properties":{ "properties" : {
"affect":{"$ref" : "#/definitions/animationQueue"}, "affect" : {"$ref" : "#/definitions/animationQueue"},
"hit":{"$ref" : "#/definitions/animationQueue"}, "hit" : {"$ref" : "#/definitions/animationQueue"},
"cast":{"$ref" : "#/definitions/animationQueue"}, "cast" : {"$ref" : "#/definitions/animationQueue"},
"projectile":{ "projectile" : {
"type":"array", "type" : "array",
"items":{ "items" : {
"type": "object", "type" : "object",
"properties":{ "properties" : {
"defName": {"type":"string", "format": "defFile"}, "defName" : {"type" : "string", "format" : "defFile"},
"minimumAngle": {"type":"number", "minimum" : 0} "minimumAngle" : {"type" : "number", "minimum" : 0}
}, },
"additionalProperties" : false "additionalProperties" : false
} }
} }
} }
}, },
"flags" :{ "flags" : {
"type" : "object", "type" : "object",
"additionalProperties" : { "additionalProperties" : {
"type":"boolean" "type" : "boolean"
} }
}, },
"levelInfo":{ "levelInfo" : {
"type": "object", "type" : "object",
"required":["range", "description", "cost", "power", "aiValue"], "required" :["range", "description", "cost", "power", "aiValue"],
"additionalProperties" : false, "additionalProperties" : false,
"properties":{ "properties" : {
"description":{ "description" : {
"type": "string", "type" : "string",
"description": "Localizable description. Use {xxx} for formatting" "description" : "Localizable description. Use {xxx} for formatting"
}, },
"cost":{ "cost" : {
"type": "number", "type" : "number",
"description":"Cost in mana points" "description" : "Cost in mana points"
}, },
"power":{ "power" : {
"type": "number" "type" : "number"
}, },
"range":{ "range" : {
"type": "string", "type" : "string",
"description": "spell range description in SRSL" "description" : "spell range description in SRSL"
}, },
"aiValue":{ "aiValue" : {
"type": "number" "type" : "number"
}, },
"effects":{ "effects" : {
"type": "object", "type" : "object",
"description": "Timed effects (updated by prolongation)", "description" : "Timed effects (updated by prolongation)",
"additionalProperties" : { "additionalProperties" : {
"$ref" : "bonus.json" "$ref" : "bonus.json"
} }
}, },
"cumulativeEffects":{ "cumulativeEffects" : {
"type": "object", "type" : "object",
"description": "Timed effects (updated by unique bonus)", "description" : "Timed effects (updated by unique bonus)",
"additionalProperties" : { "additionalProperties" : {
"$ref" : "bonus.json" "$ref" : "bonus.json"
} }
}, },
"battleEffects":{ "battleEffects" : {
"type": "object", "type" : "object",
"additionalProperties" : { "additionalProperties" : {
"type": "object" "type" : "object"
} }
}, },
"targetModifier":{ "targetModifier" : {
"type": "object", "type" : "object",
"additionalProperties": false, "additionalProperties" : false,
"properties":{ "properties" : {
"smart":{ "smart" : {
"type": "boolean", "type" : "boolean",
"description": "true: friendly/hostile based on positiveness; false: all targets" "description" : "true: friendly/hostile based on positiveness; false: all targets"
}, },
"clearTarget": "clearTarget" :
{ {
"type": "boolean", "type" : "boolean",
"description": "LOCATION target only. Target hex/tile must be clear" "description" : "LOCATION target only. Target hex/tile must be clear"
}, },
"clearAffected": "clearAffected" :
{ {
"type": "boolean", "type" : "boolean",
"description": "LOCATION target only. All affected hexes/tile must be clear" "description" : "LOCATION target only. All affected hexes/tile must be clear"
} }
} }
} }
} }
}, },
"texts":{ "texts" : {
"type": "object", "type" : "object",
"additionalProperties" : false "additionalProperties" : false
} }
}, },
"required" : ["type", "name", "school", "level", "power","gainChance","flags","levels"], "required" : ["type", "name", "school", "level", "power","gainChance","flags","levels"],
"additionalProperties" : false, "additionalProperties" : false,
"properties": { "properties" : {
"index":{ "index" : {
"type": "number", "type" : "number",
"description": "numeric id of spell required only for original spells, prohibited for new spells" "description" : "numeric id of spell required only for original spells, prohibited for new spells"
}, },
"name":{ "name" : {
"type": "string", "type" : "string",
"description": "Localizable name" "description" : "Localizable name"
}, },
"type":{ "type" : {
"type": "string", "type" : "string",
"enum": ["adventure", "combat", "ability"], "enum" : ["adventure", "combat", "ability"],
"description":"Spell type" "description" : "Spell type"
}, },
"school":{ "school" : {
"type": "object", "type" : "object",
"description": "Spell schools", "description" : "Spell schools",
"additionalProperties": false, "additionalProperties" : false,
"properties":{ "properties" : {
"air":{"type": "boolean"}, "air" : {"type" : "boolean"},
"fire":{"type": "boolean"}, "fire" : {"type" : "boolean"},
"earth":{"type": "boolean"}, "earth" : {"type" : "boolean"},
"water":{"type": "boolean"} "water" : {"type" : "boolean"}
} }
}, },
"level":{ "level" : {
"type": "number", "type" : "number",
"description": "Spell level", "description" : "Spell level",
"minimum" : 0, "minimum" : 0,
"maximum" : 5 "maximum" : 5
}, },
"power":{ "power" : {
"type": "number", "type" : "number",
"description": "Base power" "description" : "Base power"
}, },
"defaultGainChance":{ "defaultGainChance" : {
"type": "number", "type" : "number",
"description": "Gain chance by default for all factions" "description" : "Gain chance by default for all factions"
}, },
"gainChance":{ "gainChance" : {
"type": "object", "type" : "object",
"description": "Chance in % to gain for faction. NOTE: this field is merged with faction config", "description" : "Chance in % to gain for faction. NOTE: this field is merged with faction config",
"additionalProperties" : { "additionalProperties" : {
"type": "number", "type" : "number",
"minimum" : 0 "minimum" : 0
} }
}, },
"targetType":{ "targetType" : {
"type": "string", "type" : "string",
"description": "NO_TARGET - instant cast no aiming, default; CREATURE - target is unit; OBSTACLE - target is OBSTACLE; LOCATION - target is location", "description" : "NO_TARGET - instant cast no aiming, default; CREATURE - target is unit; OBSTACLE - target is OBSTACLE; LOCATION - target is location",
"enum": ["NO_TARGET","CREATURE","OBSTACLE","LOCATION"] "enum" : ["NO_TARGET","CREATURE","OBSTACLE","LOCATION"]
}, },
"counters":{ "counters" : {
"$ref" : "#/definitions/flags", "$ref" : "#/definitions/flags",
"description": "Flags structure ids of countering spells" "description" : "Flags structure ids of countering spells"
}, },
"flags":{ "flags" : {
"type": "object", "type" : "object",
"description": "Various flags", "description" : "Various flags",
"additionalProperties" : false, "additionalProperties" : false,
"properties":{ "properties" : {
"indifferent": { "indifferent" : {
"type":"boolean", "type" : "boolean",
"description": "Spell is indifferent for target" "description" : "Spell is indifferent for target"
}, },
"negative": { "negative" : {
"type":"boolean", "type" : "boolean",
"description": "Spell is negative for target" "description" : "Spell is negative for target"
}, },
"positive": { "positive" : {
"type":"boolean", "type" : "boolean",
"description": "Spell is positive for target" "description" : "Spell is positive for target"
}, },
"damage": { "damage" : {
"type":"boolean", "type" : "boolean",
"description": "Spell does damage (direct or indirect)" "description" : "Spell does damage (direct or indirect)"
}, },
"offensive": { "offensive" : {
"type":"boolean", "type" : "boolean",
"description": "Spell does direct damage (implicitly sets damage and negative)" "description" : "Spell does direct damage (implicitly sets damage and negative)"
}, },
"rising":{ "rising" : {
"type":"boolean", "type" : "boolean",
"description": "Rising spell (implicitly sets positive)" "description" : "Rising spell (implicitly sets positive)"
}, },
"special":{ "special" : {
"type": "boolean", "type" : "boolean",
"description": "Special spell. Can be given only by BonusType::SPELL" "description" : "Special spell. Can be given only by BonusType::SPELL"
}, },
"nonMagical":{ "nonMagical" : {
"type": "boolean", "type" : "boolean",
"description": "Non-magical ability. Usually used by some creatures. Should not be affected by sorcery and generic magic resistance. School resistances apply. Examples: dendroid bind, efreet fire shield." "description" : "Non-magical ability. Usually used by some creatures. Should not be affected by sorcery and generic magic resistance. School resistances apply. Examples: dendroid bind, efreet fire shield."
} }
} }
}, },
"immunity":{ "immunity" : {
"$ref" : "#/definitions/flags", "$ref" : "#/definitions/flags",
"description": "flags structure of bonus names, any one of these bonus grants immunity" "description" : "flags structure of bonus names, any one of these bonus grants immunity"
}, },
"absoluteImmunity":{ "absoluteImmunity" : {
"$ref" : "#/definitions/flags", "$ref" : "#/definitions/flags",
"description": "flags structure of bonus names. Any one of these bonus grants immunity, can't be negated" "description" : "flags structure of bonus names. Any one of these bonus grants immunity, can't be negated"
}, },
"limit":{ "limit" : {
"$ref" : "#/definitions/flags", "$ref" : "#/definitions/flags",
"description": "flags structure of bonus names, presence of all bonuses required to be affected by." "description" : "flags structure of bonus names, presence of all bonuses required to be affected by."
}, },
"absoluteLimit":{ "absoluteLimit" : {
"$ref" : "#/definitions/flags", "$ref" : "#/definitions/flags",
"description": "flags structure of bonus names, presence of all bonuses required to be affected by, can't be negated." "description" : "flags structure of bonus names, presence of all bonuses required to be affected by, can't be negated."
}, },
"targetCondition":{ "targetCondition" : {
"type": "object", "type" : "object",
"additionalProperties" : true "additionalProperties" : true
}, },
"animation":{"$ref": "#/definitions/animation"}, "animation" : {"$ref" : "#/definitions/animation"},
"graphics":{ "graphics" : {
"type": "object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"properties":{ "properties" : {
"iconBook":{ "iconBook" : {
"type": "string", "type" : "string",
"description":"Resourse path of icon for spellbook" , "description" : "Resourse path of icon for spellbook" ,
"format" : "imageFile" "format" : "imageFile"
}, },
"iconScroll":{ "iconScroll" : {
"type": "string", "type" : "string",
"description": "Resourse path of icon for spell scrolls", "description" : "Resourse path of icon for spell scrolls",
"format": "imageFile" "format" : "imageFile"
}, },
"iconEffect":{ "iconEffect" : {
"type": "string", "type" : "string",
"description": "Resourse path of icon for spell effects during battle" , "description" : "Resourse path of icon for spell effects during battle" ,
"format" : "imageFile" "format" : "imageFile"
}, },
"iconImmune":{ "iconImmune" : {
"type": "string", "type" : "string",
"description": "Resourse path of icon for SPELL_IMMUNITY bonus (relative to DATA or SPRITES)", "description" : "Resourse path of icon for SPELL_IMMUNITY bonus (relative to DATA or SPRITES)",
"format" : "imageFile" "format" : "imageFile"
}, },
"iconScenarioBonus":{ "iconScenarioBonus" : {
"type": "string", "type" : "string",
"description": "Resourse path of icon for scenario bonus" , "description" : "Resourse path of icon for scenario bonus" ,
"format" : "imageFile" "format" : "imageFile"
} }
} }
}, },
"sounds":{ "sounds" : {
"type": "object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"properties":{ "properties" : {
"cast":{ "cast" : {
"type": "string", "type" : "string",
"description": "Resourse path of cast sound" "description" : "Resourse path of cast sound"
} }
} }
}, },
"levels":{ "levels" : {
"type": "object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"required" : ["none", "basic", "advanced", "expert"], "required" : ["none", "basic", "advanced", "expert"],
"properties":{ "properties" : {
"base":{ "base" : {
"type": "object", "type" : "object",
"description": "will be merged with all levels", "description" : "will be merged with all levels",
"additionalProperties": true "additionalProperties" : true
}, },
"none":{ "none" : {
"$ref" : "#/definitions/levelInfo" "$ref" : "#/definitions/levelInfo"
}, },
"basic":{ "basic" : {
"$ref" : "#/definitions/levelInfo" "$ref" : "#/definitions/levelInfo"
}, },
"advanced":{ "advanced" : {
"$ref" : "#/definitions/levelInfo" "$ref" : "#/definitions/levelInfo"
}, },
"expert":{ "expert" : {
"$ref" : "#/definitions/levelInfo" "$ref" : "#/definitions/levelInfo"
} }
} }

View File

@@ -1,84 +1,84 @@
{ {
"type":"object", "type" : "object",
"$schema": "", "$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI random map template format", "title" : "VCMI random map template format",
"description" : "Format used to define random map templates in VCMI", "description" : "Format used to define random map templates in VCMI",
"definitions" : "definitions" :
{ {
"zone":{ "zone" : {
"type": "object", "type" : "object",
"required" : ["type", "monsters", "size"], "required" : ["type", "monsters", "size"],
"properties":{ "properties" : {
"type":{"$ref" : "#/definitions/type"}, "type" : {"$ref" : "#/definitions/type"},
"size":{"$ref" : "#/definitions/size"}, "size" : {"$ref" : "#/definitions/size"},
"playerTowns":{"$ref" : "#/definitions/playerTowns"}, "playerTowns" : {"$ref" : "#/definitions/playerTowns"},
"neuralTowns":{"$ref" : "#/definitions/neuralTowns"}, "neuralTowns" : {"$ref" : "#/definitions/neuralTowns"},
"townsAreSameType":{"$ref" : "#/definitions/townsAreSameType"}, "townsAreSameType" : {"$ref" : "#/definitions/townsAreSameType"},
"monsters":{"$ref" : "#/definitions/monsters"}, "monsters" : {"$ref" : "#/definitions/monsters"},
"mines":{"$ref" : "#/definitions/mines"}, "mines" : {"$ref" : "#/definitions/mines"},
"treasure":{ "treasure" : {
"type":"array", "type" : "array",
"items":{ "items" : {
"type": "object", "type" : "object",
"properties":{ "properties" : {
"min": {"type":"number", "minimum" : 0}, "min" : {"type" : "number", "minimum" : 0},
"max": {"type":"number", "minimum" : 0}, "max" : {"type" : "number", "minimum" : 0},
"density": {"type":"number", "minimum" : 1} "density" : {"type" : "number", "minimum" : 1}
}, },
"additionalProperties" : false "additionalProperties" : false
} }
} }
} }
}, },
"type" :{ "type" : {
"type":"string", "type" : "string",
"additionalProperties" : false, "additionalProperties" : false,
"enum": ["playerStart", "cpuStart", "treasure", "junction"] "enum" : ["playerStart", "cpuStart", "treasure", "junction"]
}, },
"size":{ "size" : {
"type": "number", "type" : "number",
"minimum": 1, "minimum" : 1,
"additionalProperties" : false "additionalProperties" : false
}, },
"connection": "connection" :
{ {
"required": ["a", "b", "guard"], "required" : ["a", "b", "guard"],
"properties":{ "properties" : {
"a":{ "a" : {
"type" : "string" "type" : "string"
}, },
"b":{ "b" : {
"type" : "string" "type" : "string"
}, },
"guard": "guard" :
{ {
"type": "number", "type" : "number",
"minimum" : 0 "minimum" : 0
} }
} }
}, },
"waterContent": "waterContent" :
{ {
"enum": ["none", "normal", "islands"], "enum" : ["none", "normal", "islands"],
"additionalProperties" : false, "additionalProperties" : false,
"type": "string" "type" : "string"
} }
}, },
"properties": "properties" :
{ {
"required" : ["zones", "connections"], "required" : ["zones", "connections"],
"additionalProperties" : false, "additionalProperties" : false,
"zones":{ "zones" : {
"type": "object", "type" : "object",
"additionalProperties":{"$ref" : "#/definitions/zone" } "additionalProperties" : {"$ref" : "#/definitions/zone" }
}, },
"connections":{ "connections" : {
"type": "array", "type" : "array",
"items":{"$ref" : "#/definitions/connection"} "items" : {"$ref" : "#/definitions/connection"}
}, },
"allowedWaterContent": { "allowedWaterContent" : {
"type": "array", "type" : "array",
"items": {"$ref" : "#/definitions/waterContent"} "items" : {"$ref" : "#/definitions/waterContent"}
} }
} }
} }

View File

@@ -1,143 +1,143 @@
{ {
"type":"object", "type" : "object",
"$schema": "http://json-schema.org/draft-04/schema", "$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI terrain format", "title" : "VCMI terrain format",
"description" : "Format used to define new terrains in VCMI", "description" : "Format used to define new terrains in VCMI",
"required" : [ "text", "moveCost", "minimapUnblocked", "minimapBlocked", "music", "tiles", "type", "horseSound", "horseSoundPenalty", "shortIdentifier", "battleFields" ], "required" : [ "text", "moveCost", "minimapUnblocked", "minimapBlocked", "music", "tiles", "type", "horseSound", "horseSoundPenalty", "shortIdentifier", "battleFields" ],
"additionalProperties" : false, "additionalProperties" : false,
"properties":{ "properties" : {
"text": "text" :
{ {
"type": "string", "type" : "string",
"description": "Human-readable name of this terrain" "description" : "Human-readable name of this terrain"
}, },
"shortIdentifier": "shortIdentifier" :
{ {
"type": "string", "type" : "string",
"description": "Two-letters unique indentifier for this terrain. Used for map format" "description" : "Two-letters unique indentifier for this terrain. Used for map format"
}, },
"type": "type" :
{ {
"type": "array", "type" : "array",
"description": "Type of this terrain. Can be land, water, subterranean or rock", "description" : "Type of this terrain. Can be land, water, subterranean or rock",
"items": "items" :
{ {
"enum": ["LAND", "WATER", "SUB", "ROCK", "SURFACE"], "enum" : ["LAND", "WATER", "SUB", "ROCK", "SURFACE"],
"type": "string" "type" : "string"
} }
}, },
"moveCost": "moveCost" :
{ {
"type": "number", "type" : "number",
"description": "How many movement points needed to move hero" "description" : "How many movement points needed to move hero"
}, },
"tiles": "tiles" :
{ {
"type": "string", "type" : "string",
"description": "Name of file with graphicks", "description" : "Name of file with graphicks",
"format": "defFile" "format" : "defFile"
}, },
"rockTerrain": "rockTerrain" :
{ {
"type": "string", "type" : "string",
"description": "The name of rock type terrain which will be used as borders in the underground" "description" : "The name of rock type terrain which will be used as borders in the underground"
}, },
"river": "river" :
{ {
"type": "string", "type" : "string",
"description": "River type which should be used for that terrain" "description" : "River type which should be used for that terrain"
}, },
"battleFields": "battleFields" :
{ {
"type": "array", "type" : "array",
"description": "array of battleFields for this terrain", "description" : "array of battleFields for this terrain",
"items": "items" :
{ {
"type": "string" "type" : "string"
} }
}, },
"minimapUnblocked": "minimapUnblocked" :
{ {
"type": "array", "type" : "array",
"description": "Color of terrain on minimap without unpassable objects", "description" : "Color of terrain on minimap without unpassable objects",
"minItems": 3, "minItems" : 3,
"maxItems": 3, "maxItems" : 3,
"items": "items" :
{ {
"type": "number" "type" : "number"
} }
}, },
"minimapBlocked": "minimapBlocked" :
{ {
"type": "array", "type" : "array",
"description": "Color of terrain on minimap with unpassable objects", "description" : "Color of terrain on minimap with unpassable objects",
"minItems": 3, "minItems" : 3,
"maxItems": 3, "maxItems" : 3,
"items": "items" :
{ {
"type": "number" "type" : "number"
} }
}, },
"music": "music" :
{ {
"type": "string", "type" : "string",
"description": "Music filename to play on this terrain on adventure map", "description" : "Music filename to play on this terrain on adventure map",
"format": "musicFile" "format" : "musicFile"
}, },
"sounds": "sounds" :
{ {
"type": "object", "type" : "object",
"description": "list of sounds for this terrain", "description" : "list of sounds for this terrain",
"additionalProperties" : false, "additionalProperties" : false,
"properties": "properties" :
{ {
"ambient" : "ambient" :
{ {
"type": "array", "type" : "array",
"description": "list of ambient sounds for this terrain", "description" : "list of ambient sounds for this terrain",
"items": "items" :
{ {
"type": "string", "type" : "string",
"format": "soundFile" "format" : "soundFile"
} }
} }
} }
}, },
"horseSound": "horseSound" :
{ {
"type": "string", "type" : "string",
"description": "Hero movement sound for this terrain, version for moving on tiles with road", "description" : "Hero movement sound for this terrain, version for moving on tiles with road",
"format": "soundFile" "format" : "soundFile"
}, },
"horseSoundPenalty": "horseSoundPenalty" :
{ {
"type": "string", "type" : "string",
"description": "Hero movement sound for this terrain, version for moving on tiles without road", "description" : "Hero movement sound for this terrain, version for moving on tiles without road",
"format": "soundFile" "format" : "soundFile"
}, },
"prohibitTransitions": "prohibitTransitions" :
{ {
"type": "array", "type" : "array",
"description": "array or terrain names, which is prohibited to make transition from/to", "description" : "array or terrain names, which is prohibited to make transition from/to",
"items": "items" :
{ {
"type": "string" "type" : "string"
} }
}, },
"transitionRequired": "transitionRequired" :
{ {
"type": "boolean", "type" : "boolean",
"description": "If sand/dirt transition required from/to other terrains" "description" : "If sand/dirt transition required from/to other terrains"
}, },
"terrainViewPatterns": "terrainViewPatterns" :
{ {
"type": "string", "type" : "string",
"description": "Can be normal, dirt, water, rock" "description" : "Can be normal, dirt, water, rock"
}, },
"index" : "index" :
{ {
"type": "number", "type" : "number",
"description": "Internal, do not use" "description" : "Internal, do not use"
} }
} }
} }

View File

@@ -1,7 +1,7 @@
{ {
"type":"object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"$schema": "http://json-schema.org/draft-04/schema", "$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI town building format", "title" : "VCMI town building format",
"description" : "Format used to define town buildings in VCMI", "description" : "Format used to define town buildings in VCMI",
"definitions" : "definitions" :
@@ -21,9 +21,9 @@
} }
} }
}, },
"properties":{ "properties" : {
"id": { "id" : {
"type":"number", "type" : "number",
"description" : "Numeric identifier of this building" "description" : "Numeric identifier of this building"
}, },
"name" : { "name" : {
@@ -34,57 +34,57 @@
"description" : "Full decsription of this building", "description" : "Full decsription of this building",
"type" : "string" "type" : "string"
}, },
"type": { "type" : {
"type":"string", "type" : "string",
"description" : "Subtype for some special buildings" "description" : "Subtype for some special buildings"
}, },
"mode": { "mode" : {
"type":"string", "type" : "string",
"enum" : [ "normal", "auto", "special", "grail" ], "enum" : [ "normal", "auto", "special", "grail" ],
"description" : "Mode in which this building will be built" "description" : "Mode in which this building will be built"
}, },
"height": { "height" : {
"type":"string", "type" : "string",
"enum" : [ "skyship", "high", "average", "low"], "enum" : [ "skyship", "high", "average", "low"],
"description" : "Height for lookout towers and some grails" "description" : "Height for lookout towers and some grails"
}, },
"requires": { "requires" : {
"$ref" : "#/definitions/buildingRequirement", "$ref" : "#/definitions/buildingRequirement",
"description" : "List of town buildings that must be built before this one" "description" : "List of town buildings that must be built before this one"
}, },
"upgrades": { "upgrades" : {
"description" : "If this building is upgrade, identifier of base building", "description" : "If this building is upgrade, identifier of base building",
"type":"string" "type" : "string"
}, },
"cost": { "cost" : {
"type":"object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"description": "Cost to build this building", "description" : "Cost to build this building",
"properties":{ "properties" : {
"gold": { "type":"number"}, "gold" : { "type" : "number"},
"wood": { "type":"number"}, "wood" : { "type" : "number"},
"ore": { "type":"number"}, "ore" : { "type" : "number"},
"mercury": { "type":"number"}, "mercury" : { "type" : "number"},
"sulfur": { "type":"number"}, "sulfur" : { "type" : "number"},
"crystal": { "type":"number"}, "crystal" : { "type" : "number"},
"gems": { "type":"number"} "gems" : { "type" : "number"}
} }
}, },
"produce": { "produce" : {
"type":"object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"description": "Resources this building produce each day", "description" : "Resources this building produce each day",
"properties":{ "properties" : {
"gold": { "type":"number"}, "gold" : { "type" : "number"},
"wood": { "type":"number"}, "wood" : { "type" : "number"},
"ore": { "type":"number"}, "ore" : { "type" : "number"},
"mercury": { "type":"number"}, "mercury" : { "type" : "number"},
"sulfur": { "type":"number"}, "sulfur" : { "type" : "number"},
"crystal": { "type":"number"}, "crystal" : { "type" : "number"},
"gems": { "type":"number"} "gems" : { "type" : "number"}
} }
}, },
"overrides": { "overrides" : {
"type" : "array", "type" : "array",
"items" : [ "items" : [
{ {
@@ -93,15 +93,15 @@
} }
] ]
}, },
"bonuses": { "bonuses" : {
"type":"array", "type" : "array",
"description": "Bonuses, provided by this special building on build using bonus system", "description" : "Bonuses, provided by this special building on build using bonus system",
"items": { "$ref" : "bonus.json" } "items" : { "$ref" : "bonus.json" }
}, },
"onVisitBonuses": { "onVisitBonuses" : {
"type":"array", "type" : "array",
"description": "Bonuses, provided by this special building on hero visit and applied to the visiting hero", "description" : "Bonuses, provided by this special building on hero visit and applied to the visiting hero",
"items": { "$ref" : "bonus.json" } "items" : { "$ref" : "bonus.json" }
} }
} }
} }

View File

@@ -1,140 +1,140 @@
{ {
"type":"object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"$schema": "http://json-schema.org/draft-04/schema", "$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI siege screen format", "title" : "VCMI siege screen format",
"description" : "Format used to define town siege screen in VCMI", "description" : "Format used to define town siege screen in VCMI",
"required" : [ "required" : [
"shooter", "towerIconLarge", "towerIconSmall", "imagePrefix", "shooter", "towerIconLarge", "towerIconSmall", "imagePrefix",
"static", "towers", "walls", "gate", "moat" "static", "towers", "walls", "gate", "moat"
], ],
"definitions" : "definitions" :
{ {
"point" : { "point" : {
"type" : "object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"required" : [ "x", "y" ], "required" : [ "x", "y" ],
"properties":{ "properties" : {
"x": { "type":"number" }, "x" : { "type" : "number" },
"y": { "type":"number" } "y" : { "type" : "number" }
} }
}, },
"tower" : { "tower" : {
"type" : "object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"required" : [ "battlement", "creature", "tower" ], "required" : [ "battlement", "creature", "tower" ],
"properties":{ "properties" : {
"tower": { "tower" : {
"description" : "Location of main segment of tower", "description" : "Location of main segment of tower",
"$ref" : "#/definitions/point" "$ref" : "#/definitions/point"
}, },
"battlement": { "battlement" : {
"description" : "Location of battlement, part of tower that covers shooter", "description" : "Location of battlement, part of tower that covers shooter",
"$ref" : "#/definitions/point" "$ref" : "#/definitions/point"
}, },
"creature": { "creature" : {
"description" : "Location of shooter in tower", "description" : "Location of shooter in tower",
"$ref" : "#/definitions/point" "$ref" : "#/definitions/point"
} }
} }
} }
}, },
"properties":{ "properties" : {
"shooter": { "shooter" : {
"type":"string", "type" : "string",
"description" : "Identifier of creature that will be used as tower shooter" "description" : "Identifier of creature that will be used as tower shooter"
}, },
"towerIconSmall": { "towerIconSmall" : {
"type":"string", "type" : "string",
"description": "Small icon for tower, used in battle queue", "description" : "Small icon for tower, used in battle queue",
"format" : "imageFile" "format" : "imageFile"
}, },
"towerIconLarge": { "towerIconLarge" : {
"type":"string", "type" : "string",
"description": "Large icon for tower, used in battle queue", "description" : "Large icon for tower, used in battle queue",
"format" : "imageFile" "format" : "imageFile"
}, },
"imagePrefix": { "imagePrefix" : {
"type":"string", "type" : "string",
"description" : "Prefix to all images related to siege screen" "description" : "Prefix to all images related to siege screen"
}, },
"static": { "static" : {
"type":"object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"description" : "Static sections of walls", "description" : "Static sections of walls",
"properties":{ "properties" : {
"background": { "background" : {
"description" : "Very top section of the wall located above hero", "description" : "Very top section of the wall located above hero",
"$ref" : "#/definitions/point" "$ref" : "#/definitions/point"
}, },
"top": { "top" : {
"description" : "Top section located between destructible sections", "description" : "Top section located between destructible sections",
"$ref" : "#/definitions/point" "$ref" : "#/definitions/point"
}, },
"bottom": { "bottom" : {
"description" : "Bottom section located between destructible sections", "description" : "Bottom section located between destructible sections",
"$ref" : "#/definitions/point" "$ref" : "#/definitions/point"
} }
} }
}, },
"towers": { "towers" : {
"type":"object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"description" : "Decription of towers", "description" : "Decription of towers",
"properties":{ "properties" : {
"top": { "$ref" : "#/definitions/tower", "description" : "Top tower" }, "top" : { "$ref" : "#/definitions/tower", "description" : "Top tower" },
"keep": { "$ref" : "#/definitions/tower", "description" : "Central keep" }, "keep" : { "$ref" : "#/definitions/tower", "description" : "Central keep" },
"bottom": { "$ref" : "#/definitions/tower", "description" : "Bottom tower" } "bottom" : { "$ref" : "#/definitions/tower", "description" : "Bottom tower" }
} }
}, },
"walls": { "walls" : {
"type":"object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"description" : "Destructible sections of the walls", "description" : "Destructible sections of the walls",
"properties":{ "properties" : {
"upper": { "upper" : {
"description" : "Topmost section located near top tower", "description" : "Topmost section located near top tower",
"$ref" : "#/definitions/point" "$ref" : "#/definitions/point"
}, },
"upperMid": { "upperMid" : {
"description" : "Second from top section located near gates", "description" : "Second from top section located near gates",
"$ref" : "#/definitions/point" "$ref" : "#/definitions/point"
}, },
"bottomMid": { "bottomMid" : {
"description" : "Second from bottom section located near gates", "description" : "Second from bottom section located near gates",
"$ref" : "#/definitions/point" "$ref" : "#/definitions/point"
}, },
"bottom": { "bottom" : {
"description" : "Bottommost section located near bottom tower", "description" : "Bottommost section located near bottom tower",
"$ref" : "#/definitions/point" "$ref" : "#/definitions/point"
} }
} }
}, },
"gate": { "gate" : {
"type":"object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"description" : "Town gates", "description" : "Town gates",
"properties":{ "properties" : {
"arch": { "arch" : {
"description" : "Static, top part of gates", "description" : "Static, top part of gates",
"$ref" : "#/definitions/point" "$ref" : "#/definitions/point"
}, },
"gate": { "gate" : {
"description" : "Main section of gates", "description" : "Main section of gates",
"$ref" : "#/definitions/point" "$ref" : "#/definitions/point"
} }
} }
}, },
"moat": { "moat" : {
"type":"object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"description" : "Castle moat description", "description" : "Castle moat description",
"properties":{ "properties" : {
"bank": { "bank" : {
"description" : "Small section with bank of the moat", "description" : "Small section with bank of the moat",
"$ref" : "#/definitions/point" "$ref" : "#/definitions/point"
}, },
"moat": { "moat" : {
"description" : "Main section of the moat", "description" : "Main section of the moat",
"$ref" : "#/definitions/point" "$ref" : "#/definitions/point"
} }

View File

@@ -1,44 +1,44 @@
{ {
"type":"object", "type" : "object",
"$schema": "http://json-schema.org/draft-04/schema", "$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI town structures format", "title" : "VCMI town structures format",
"description" : "Format used to define structures visible on town screen in VCMI", "description" : "Format used to define structures visible on town screen in VCMI",
"required": [ "animation", "x", "y"], "required" : [ "animation", "x", "y"],
"additionalProperties" : false, "additionalProperties" : false,
"properties":{ "properties" : {
"builds": { "builds" : {
"type" : "string", "type" : "string",
"description" : "" "description" : ""
}, },
"hidden": { "hidden" : {
"type":"boolean", "type" : "boolean",
"description" : "If upgrade, this building will replace parent animation but will not alter its behaviour" "description" : "If upgrade, this building will replace parent animation but will not alter its behaviour"
}, },
"animation": { "animation" : {
"type":"string", "type" : "string",
"description" : "Main animation file for this building", "description" : "Main animation file for this building",
"format" : "animationFile" "format" : "animationFile"
}, },
"area": { "area" : {
"type":"string", "type" : "string",
"description" : "Area that indicate when building is selected. Must be 8-bit image", "description" : "Area that indicate when building is selected. Must be 8-bit image",
"format" : "imageFile" "format" : "imageFile"
}, },
"border": { "border" : {
"type":"string", "type" : "string",
"description" : "Golden border around building, displayed when building is selected", "description" : "Golden border around building, displayed when building is selected",
"format" : "imageFile" "format" : "imageFile"
}, },
"x": { "x" : {
"type":"number", "type" : "number",
"description" : "Position on screen" "description" : "Position on screen"
}, },
"y": { "y" : {
"type":"number", "type" : "number",
"description" : "Position on screen" "description" : "Position on screen"
}, },
"z": { "z" : {
"type":"number", "type" : "number",
"description" : "Position on screen. Buildings with higher value will be drawn on top of other buildings" "description" : "Position on screen. Buildings with higher value will be drawn on top of other buildings"
} }
} }