瀏覽代碼

Fixed white spaces

krs 2 年之前
父節點
當前提交
105dcf5a9f

+ 1 - 6
config/schemas/battlefield.json

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

+ 47 - 49
config/schemas/bonus.json

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

+ 1 - 2
config/schemas/creature.json

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

+ 102 - 104
config/schemas/faction.json

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

+ 89 - 91
config/schemas/hero.json

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

+ 53 - 54
config/schemas/heroClass.json

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

+ 12 - 13
config/schemas/mapHeader.json

@@ -1,23 +1,22 @@
 {
-	"type":"object",
-	"$schema": "http://json-schema.org/draft-04/schema",
+	"type" : "object",
+	"$schema" : "http://json-schema.org/draft-04/schema",
 	"title" : "VCMI map header format",
 	"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,
-	"properties":{
-		"victoryIconIndex": {
-			"type":"number"
+	"properties" : {
+		"victoryIconIndex" : {
+			"type" : "number"
 		},
-		"victoryString": {
-			"type":"string"
+		"victoryString" : {
+			"type" : "string"
 		},
-		"defeatIconIndex": {
-			"type":"number"
+		"defeatIconIndex" : {
+			"type" : "number"
 		},
-		"defeatString": {
-			"type":"string"
+		"defeatString" : {
+			"type" : "string"
 		},
 		"triggeredEvents" : {
 			"type" : "object",

+ 155 - 155
config/schemas/mod.json

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

+ 15 - 15
config/schemas/object.json

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

+ 21 - 22
config/schemas/objectTemplate.json

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

+ 30 - 31
config/schemas/objectType.json

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

+ 30 - 31
config/schemas/obstacle.json

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

+ 18 - 19
config/schemas/river.json

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

+ 18 - 19
config/schemas/road.json

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

+ 6 - 6
config/schemas/script.json

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

+ 41 - 41
config/schemas/settings.json

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

+ 10 - 10
config/schemas/skill.json

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

+ 183 - 183
config/schemas/spell.json

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

+ 46 - 46
config/schemas/template.json

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

+ 81 - 81
config/schemas/terrain.json

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

+ 45 - 45
config/schemas/townBuilding.json

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

+ 50 - 50
config/schemas/townSiege.json

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

+ 19 - 19
config/schemas/townStructure.json

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