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

Merge pull request #2171 from krs0/feature/schema_updates

Rearranging Schemas
This commit is contained in:
Ivan Savenko
2023-05-29 15:37:50 +03:00
committed by GitHub
24 changed files with 1743 additions and 1832 deletions

View File

@@ -1,10 +1,9 @@
{ {
"type":"object", "type" : "object",
"$schema": "http://json-schema.org/draft-04/schema", "$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI artifact format", "title" : "VCMI artifact format",
"description" : "Format used to define new artifacts in VCMI", "description" : "Format used to define new artifacts in VCMI",
"required" : [ "class", "text", "type", "value" ], "required" : [ "type", "class", "value", "text" ],
"definitions" : { "definitions" : {
"growingBonusList" : { "growingBonusList" : {
"type" : "array", "type" : "array",
@@ -20,51 +19,53 @@
} }
} }
}, },
"additionalProperties" : false, "additionalProperties" : false,
"properties":{ "properties" : {
"bonuses": { "warMachine" :
"type":"array", {
"description": "Bonuses provided by this artifact using bonus system", "type" : "string",
"items": { "$ref" : "bonus.json" } "description" : "Creature id to use on battle field. If set, this artifact is war machine"
}, },
"class": { "type" : {
"type":"string", "type" : "array",
"enum" : [ "SPECIAL", "TREASURE", "MINOR", "MAJOR", "RELIC" ], "description" : "Type of this artifact - creature, hero or commander",
"description": "Artifact class, treasure, minor, major or relic" "items" : {
}, "type" : "string",
"index" : { "enum" : [ "HERO", "CREATURE", "COMMANDER" ]
"type" : "number",
"description" : "Private field to break things, do not use."
},
"components": {
"type":"array",
"description": "Optional, list of components for combinational artifacts",
"items": { "type":"string" }
},
"graphics": {
"type":"object",
"additionalProperties" : false,
"description": "Graphical files associated with the artifact",
"required" : [ "image", "map" ],
"properties":{
"image": {
"type":"string",
"description": "Base image for this artifact, used for example in hero screen",
"format" : "imageFile"
},
"large": {
"type":"string",
"description": "Large image, used for drag-and-drop and popup messages",
"format" : "imageFile"
},
"map": {
"type":"string",
"description": ".def file for adventure map",
"format" : "defFile"
}
} }
}, },
"slot" : {
"description" : "Slot to which this artifact can be put, if applicable",
"oneOf" : [
{
"type" : "string"
},
{
"type" : "array",
"minItems" : 1,
"additionalItems" : { "type" : "string" }
}
]
},
"class" : {
"type" : "string",
"enum" : [ "SPECIAL", "TREASURE", "MINOR", "MAJOR", "RELIC" ],
"description" : "Artifact class, treasure, minor, major or relic"
},
"value" : {
"type" : "number",
"description" : "Cost of this artifact, in gold"
},
"components" : {
"type" : "array",
"description" : "Optional, list of components for combinational artifacts",
"items" : { "type" : "string" }
},
"bonuses" : {
"type" : "array",
"description" : "Bonuses provided by this artifact using bonus system",
"items" : { "$ref" : "bonus.json" }
},
"growing" : { "growing" : {
"type" : "object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
@@ -73,56 +74,52 @@
"thresholdBonuses" : { "$ref" : "#/definitions/growingBonusList"} "thresholdBonuses" : { "$ref" : "#/definitions/growingBonusList"}
} }
}, },
"slot": { "graphics" : {
"description": "Slot to which this artifact can be put, if applicable", "type" : "object",
"oneOf" : [
{
"type":"string"
},
{
"type" : "array",
"minItems" : 1,
"additionalItems" : { "type" : "string" }
}
]
},
"text": {
"type":"object",
"additionalProperties" : false, "additionalProperties" : false,
"description": "Texts associated with artifact", "description" : "Graphical files associated with the artifact",
"required" : [ "description", "event", "name" ], "required" : [ "image", "map" ],
"properties":{ "properties" : {
"description": { "image" : {
"type":"string", "type" : "string",
"description": "Long description of this artifact" "description" : "Base image for this artifact, used for example in hero screen",
"format" : "imageFile"
}, },
"event": { "large" : {
"type":"string", "type" : "string",
"description": "Text that visible on picking this artifact on map" "description" : "Large image, used for drag-and-drop and popup messages",
"format" : "imageFile"
}, },
"name": { "map" : {
"type":"string", "type" : "string",
"description": "Name of the artifact" "description" : ".def file for adventure map",
"format" : "defFile"
} }
} }
}, },
"type": { "text" : {
"type":"array", "type" : "object",
"description": "Type of this artifact - creature, hero or commander", "additionalProperties" : false,
"items": { "description" : "Texts associated with artifact",
"type":"string", "required" : [ "description", "event", "name" ],
"enum" : [ "HERO", "CREATURE", "COMMANDER" ] "properties" : {
"name" : {
"type" : "string",
"description" : "Name of the artifact"
},
"description" : {
"type" : "string",
"description" : "Long description of this artifact"
},
"event" : {
"type" : "string",
"description" : "Text that visible on picking this artifact on map"
}
} }
}, },
"value": { "index" : {
"type":"number", "type" : "number",
"description": "Cost of this artifact, in gold" "description" : "Private field to break things, do not use."
},
"warMachine":
{
"type":"string",
"description": "Creature id to use on battle field. If set, this artifact is war machine"
} }
} }
} }

View File

@@ -1,35 +1,34 @@
{ {
"type":"object", "type" : "object",
"$schema": "http://json-schema.org/draft-04/schema", "$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI battlefield format", "title" : "VCMI battlefield format",
"description" : "Format used to define new battlefields in VCMI", "description" : "Format used to define new battlefields in VCMI",
"required" : [ "graphics" ], "required" : [ "graphics" ],
"additionalProperties" : false, "additionalProperties" : false,
"properties":{ "properties" : {
"name" : {
"type" : "string",
"description" : "Name of the battleground"
},
"isSpecial" : {
"type" : "boolean",
"description" : "Shows if this battleground has own obstacles"
},
"bonuses": { "bonuses": {
"type":"array", "type":"array",
"description": "Bonuses provided by this battleground using bonus system", "description": "Bonuses provided by this battleground using bonus system",
"items": { "$ref" : "bonus.json" } "items": { "$ref" : "bonus.json" }
}, },
"name": { "graphics" : {
"type":"string", "type" : "string",
"description": "Name of the battleground"
},
"graphics": {
"type":"string",
"format" : "imageFile", "format" : "imageFile",
"description": "BMP battleground resource" "description" : "BMP battleground resource"
}, },
"isSpecial": { "impassableHexes" : {
"type":"boolean", "type" : "array",
"description": "Shows if this battleground has own obstacles" "description" : "Battle hexes always impassable for this type of battlefield (ship to ship for instance)",
}, "items" : {
"impassableHexes": { "type" : "number"
"type":"array",
"description": "Battle hexes always impassable for this type of battlefield (ship to ship for instance)",
"items": {
"type":"number"
} }
} }
} }

View File

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

View File

@@ -1,8 +1,8 @@
{ {
"type":"object", "type" : "object",
"$schema": "http://json-schema.org/draft-04/schema", "$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI creature format", "title" : "VCMI creature format",
"description": "Json format for defining new creatures in VCMI", "description" : "Json format for defining new creatures in VCMI",
"required" : [ "faction" ], "required" : [ "faction" ],
"anyOf" : [ "anyOf" : [
{ {
@@ -10,35 +10,290 @@
}, },
{ {
"required" : [ "required" : [
"name", "cost", "level", "fightValue", "aiValue", "name", "level", "cost", "speed", "hitPoints", "attack", "defense", "damage",
"attack", "defense", "hitPoints", "speed", "damage", "advMapAmount", "fightValue", "aiValue", "advMapAmount", "graphics", "sound"
"graphics", "sound"
] ]
} }
], ],
"additionalProperties" : false, "additionalProperties" : false,
"properties":{ "properties" : {
"name": { "special" : {
"type":"object", "type" : "boolean",
"description" : "Marks this object as special and not available by default"
},
"disabled" : {
"type" : "boolean",
"description" : "Object is competely disabled and may not be even loaded in-game"
},
"name" : {
"type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"description": "Translatable names for this creature", "description" : "Translatable names for this creature",
"required" : [ "singular", "plural" ], "required" : [ "singular", "plural" ],
"properties":{ "properties" : {
"singular": { "singular" : {
"type":"string", "type" : "string",
"description": "Singular version" "description" : "Singular version"
}, },
"plural": { "plural" : {
"type":"string", "type" : "string",
"description": "Plural version" "description" : "Plural version"
} }
} }
}, },
"faction" : {
"type" : "string",
"description" : "Faction this creature belongs to. Examples: castle, rampart"
},
"level" : { "type" : "number"},
"upgrades" : {
"type" : "array",
"description" : "List of creatures to which this one can be upgraded",
"items" : { "type" : "string" }
},
"cost" : {
"type" : "object",
"additionalProperties" : false,
"description" : "Cost to recruit this creature",
"properties" : {
"gold" : { "type" : "number"},
"wood" : { "type" : "number"},
"ore" : { "type" : "number"},
"mercury" : { "type" : "number"},
"sulfur" : { "type" : "number"},
"crystal" : { "type" : "number"},
"gems" : { "type" : "number"}
}
},
"speed" : { "type" : "number" },
"hitPoints" : { "type" : "number" },
"attack" : { "type" : "number" },
"defense" : { "type" : "number" },
"damage" : {
"type" : "object",
"additionalProperties" : false,
"properties" : {
"max" : { "type" : "number" },
"min" : { "type" : "number" }
}
},
"shots" : { "type" : "number" },
"spellPoints" : {
"type" : "number",
"description" : "Spell points this creature has (usually equal to number of casts)"
},
"doubleWide" : {
"type" : "boolean",
"description" : "If set, creature will be two tiles wide on battlefield"
},
"fightValue" : {
"type" : "number",
"description" : " \"value\" of creature, used to determine for example army strength"
},
"aiValue" : {
"type" : "number",
"description" : "Describes how valuable this creature is to AI. Usually similar to fightValue"
},
"growth" : {
"type" : "number",
"description" : "Basic growth of this creature in town or in external dwellings"
},
"horde" : {
"type" : "number",
"description" : "Bonus growth of this creature from built horde"
},
"advMapAmount" : {
"type" : "object",
"additionalProperties" : false,
"description" : "Initial size of random stacks on adventure map",
"properties" : {
"min" : { "type" : "number" },
"max" : { "type" : "number" }
}
},
"hasDoubleWeek" : {
"type" : "boolean",
"description" : "creature may receive \"week of\" events"
},
"abilities" : {
"description" : "Creature abilities described using Bonus system",
"type" : "object",
"additionalProperties" : {
"$ref" : "bonus.json"
}
},
"abilityText" : { "abilityText" : {
"type" : "string", "type" : "string",
"description" : "Text version of creature abilities. Used only with original creature window" "description" : "Text version of creature abilities. Used only with original creature window"
}, },
"graphics" : {
"type" : "object",
"additionalProperties" : false,
"description" : "Describes how this creature looks like during battles",
"required" : [
"animation", "animationTime", "timeBetweenFidgets"
],
"properties" : {
"animation" : {
"type" : "string",
"description" : ".def file with animation of this creature in battles",
"format" : "defFile"
},
"map" : {
"type" : "string",
"description" : ".def file with animation of this creature on adventure map",
"format" : "defFile"
},
"iconLarge" : {
"type" : "string",
"description" : "Large icon for this creature, used for example in town screen",
"format" : "imageFile"
},
"iconSmall" : {
"type" : "string",
"description" : "Small icon for this creature, used for example in exchange screen",
"format" : "imageFile"
},
"animationTime" : {
"type" : "object",
"additionalProperties" : false,
"required" : [ "attack", "walk", "idle" ],
"description" : "Length of several animations",
"properties" : {
"attack" : {
"type" : "number",
"description" : "attack"
},
"idle" : {
"type" : "number",
"description" : "idle"
},
"walk" : {
"type" : "number",
"description" : "walk"
}
}
},
"missile" : {
"type" : "object",
"additionalProperties" : false,
"required" : [ "frameAngles", "offset", "attackClimaxFrame" ],
"description" : "Missile description for archers",
"properties" : {
"projectile" : {
"type" : "string",
"description" : "Path to projectile animation",
"format" : "defFile"
},
"ray" : {
"type" : "array",
"description" : "Colors of ray projectile animation",
"minItems" : 1,
"items" : {
"type" : "object",
"required" : [ "start", "end" ],
"properties" : {
"start" : {
"type" : "array",
"minItems" : 4,
"maxItems" : 4,
"items" : {
"minimum" : 0,
"maximum" : 255,
"type" : "number"
}
},
"end" : {
"type" : "array",
"minItems" : 4,
"maxItems" : 4,
"items" : {
"minimum" : 0,
"maximum" : 255,
"type" : "number"
}
}
}
}
},
"frameAngles" : {
"type" : "array",
"description" : "Angles of missile images, should go from 90 to -90",
"minItems" : 1,
"items" : {
"minimum" : -90,
"maximum" : 90,
"type" : "number"
}
},
"offset" : {
"type" : "object",
"additionalProperties" : false,
"required" : [ "lowerX", "lowerY", "middleX", "middleY", "upperX", "upperY" ],
"description" : "Position where projectile image appears during shooting in specific direction",
"properties" : {
"lowerX" : { "type" : "number" },
"lowerY" : { "type" : "number" },
"middleX" : { "type" : "number" },
"middleY" : { "type" : "number" },
"upperX" : { "type" : "number" },
"upperY" : { "type" : "number" }
}
},
"attackClimaxFrame" : {
"type" : "number",
"description" : "Frame from attack animation during which creature deals damage"
}
}
},
"timeBetweenFidgets" : {
"type" : "number",
"description" : "How often creature will play idling animation"
},
"troopCountLocationOffset" : {
"type" : "number",
"description" : "Position of troop count label?"
}
}
},
"sound" : {
"type" : "object",
"additionalProperties" : false,
"description" : "Various sound files associated with this creature",
"properties" : {
"attack" : { "type" : "string", "format" : "soundFile" },
"defend" : { "type" : "string", "format" : "soundFile" },
"killed" : { "type" : "string", "format" : "soundFile" },
"startMoving" : { "type" : "string", "format" : "soundFile" },
"endMoving" : { "type" : "string", "format" : "soundFile" },
"move" : { "type" : "string", "format" : "soundFile" },
"shoot" : { "type" : "string", "format" : "soundFile" },
"wince" : { "type" : "string", "format" : "soundFile" }
}
},
"stackExperience" : {
"type" : "array",
"description" : "Stack experience, using bonus system",
"items" : {
"type" : "object",
"additionalProperties" : false,
"required" : [ "bonus", "values" ],
"description" : "0",
"properties" : {
"bonus" : {"$ref" : "bonus.json" },
"values" : {
"type" : "array",
"minItems" : 10,
"maxItems" : 10,
"description" : "Strength of the bonus",
"anyOf" : [
{ "items" : { "type" : "number" } },
{ "items" : { "type" : "boolean" } }
]
}
}
}
},
"index" : { "index" : {
"type" : "number", "type" : "number",
"description" : "Private field to break things, do not use." "description" : "Private field to break things, do not use."
@@ -47,265 +302,6 @@
"type" : "array", "type" : "array",
"items" : { "type" : "string" }, "items" : { "type" : "string" },
"description" : "Private field to break things, do not use." "description" : "Private field to break things, do not use."
},
"faction": {
"type":"string",
"description": "Faction this creature belongs to. Examples: castle, rampart"
},
"cost": {
"type":"object",
"additionalProperties" : false,
"description": "Cost to recruit this creature",
"properties":{
"wood": { "type":"number"},
"mercury": { "type":"number"},
"ore": { "type":"number"},
"sulfur": { "type":"number"},
"crystal": { "type":"number"},
"gems": { "type":"number"},
"gold": { "type":"number"}
}
},
"special": {
"type":"boolean",
"description": "Marks this object as special and not available by default"
},
"disabled": {
"type":"boolean",
"description": "Object is competely disabled and may not be even loaded in-game"
},
"level": { "type":"number"},
"fightValue": {
"type":"number",
"description": " \"value\" of creature, used to determine for example army strength"
},
"aiValue": {
"type":"number",
"description": "Describes how valuable this creature is to AI. Usually similar to fightValue"
},
"growth": {
"type":"number",
"description": "Basic growth of this creature in town or in external dwellings"
},
"horde": {
"type":"number",
"description": "Bonus growth of this creature from built horde"
},
"attack": { "type":"number" },
"defense": { "type":"number" },
"hitPoints": { "type":"number" },
"speed": { "type":"number" },
"shots": { "type":"number" },
"damage": {
"type":"object",
"additionalProperties" : false,
"properties":{
"max": { "type":"number" },
"min": { "type":"number" }
}
},
"spellPoints": {
"type":"number",
"description": "Spell points this creature has (usually equal to number of casts)"
},
"advMapAmount": {
"type":"object",
"additionalProperties" : false,
"description" : "Initial size of random stacks on adventure map",
"properties":{
"min": { "type":"number" },
"max": { "type":"number" }
}
},
"upgrades": {
"type":"array",
"description": "List of creatures to which this one can be upgraded",
"items": { "type":"string" }
},
"doubleWide": {
"type":"boolean",
"description": "If set, creature will be two tiles wide on battlefield"
},
"hasDoubleWeek": {
"type":"boolean",
"description": "creature may receive \"week of\" events"
},
"abilities": {
"description": "Creature abilities described using Bonus system",
"type":"object",
"additionalProperties": {
"$ref" : "bonus.json"
}
},
"stackExperience": {
"type":"array",
"description": "Stack experience, using bonus system",
"items":{
"type":"object",
"additionalProperties" : false,
"required" : [ "bonus", "values" ],
"description": "0",
"properties":{
"bonus": {"$ref" : "bonus.json" },
"values": {
"type":"array",
"minItems" : 10,
"maxItems" : 10,
"description": "Strength of the bonus",
"anyOf" : [
{ "items": { "type" : "number" } },
{ "items": { "type" : "boolean" } }
]
}
}
}
},
"graphics": {
"type":"object",
"additionalProperties" : false,
"description": "Describes how this creature looks like during battles",
"required" : [
"animationTime", "animation", "timeBetweenFidgets"
],
"properties":{
"animationTime": {
"type":"object",
"additionalProperties" : false,
"required" : [ "attack", "walk", "idle" ],
"description": "Length of several animations",
"properties":{
"attack": {
"type":"number",
"description": "attack"
},
"idle": {
"type":"number",
"description": "idle"
},
"walk": {
"type":"number",
"description": "walk"
}
}
},
"iconLarge": {
"type":"string",
"description": "Large icon for this creature, used for example in town screen",
"format" : "imageFile"
},
"iconSmall": {
"type":"string",
"description": "Small icon for this creature, used for example in exchange screen",
"format" : "imageFile"
},
"map": {
"type":"string",
"description": ".def file with animation of this creature on adventure map",
"format" : "defFile"
},
"animation": {
"type":"string",
"description": ".def file with animation of this creature in battles",
"format" : "defFile"
},
"missile": {
"type":"object",
"additionalProperties" : false,
"required" : [ "frameAngles", "offset", "attackClimaxFrame" ],
"description": "Missile description for archers",
"properties":{
"projectile": {
"type":"string",
"description": "Path to projectile animation",
"format" : "defFile"
},
"ray": {
"type":"array",
"description": "Colors of ray projectile animation",
"minItems" : 1,
"items": {
"type":"object",
"required" : [ "start", "end" ],
"properties":{
"start": {
"type":"array",
"minItems" : 4,
"maxItems" : 4,
"items": {
"minimum" : 0,
"maximum" : 255,
"type":"number"
}
},
"end": {
"type":"array",
"minItems" : 4,
"maxItems" : 4,
"items": {
"minimum" : 0,
"maximum" : 255,
"type":"number"
}
}
}
}
},
"frameAngles": {
"type":"array",
"description": "Angles of missile images, should go from 90 to -90",
"minItems" : 1,
"items": {
"minimum" : -90,
"maximum" : 90,
"type":"number"
}
},
"offset": {
"type":"object",
"additionalProperties" : false,
"required" : [ "lowerX", "lowerY", "middleX", "middleY", "upperX", "upperY" ],
"description": "Position where projectile image appears during shooting in specific direction",
"properties":{
"lowerX": { "type":"number" },
"lowerY": { "type":"number" },
"middleX": { "type":"number" },
"middleY": { "type":"number" },
"upperX": { "type":"number" },
"upperY": { "type":"number" }
}
},
"attackClimaxFrame": {
"type":"number",
"description": "Frame from attack animation during which creature deals damage"
}
}
},
"timeBetweenFidgets": {
"type":"number",
"description": "How often creature will play idling animation"
},
"troopCountLocationOffset": {
"type":"number",
"description": "Position of troop count label?"
}
}
},
"sound": {
"type":"object",
"additionalProperties" : false,
"description": "Various sound files associated with this creature",
"properties":{
"attack": { "type":"string", "format" : "soundFile" },
"defend": { "type":"string", "format" : "soundFile" },
"killed": { "type":"string", "format" : "soundFile" },
"startMoving": { "type":"string", "format" : "soundFile" },
"endMoving": { "type":"string", "format" : "soundFile" },
"move": { "type":"string", "format" : "soundFile" },
"shoot": { "type":"string", "format" : "soundFile" },
"wince": { "type":"string", "format" : "soundFile" }
}
} }
} }
} }

View File

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

View File

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

View File

@@ -1,36 +1,52 @@
{ {
"type":"object", "type" : "object",
"$schema": "http://json-schema.org/draft-04/schema", "$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI hero class format", "title" : "VCMI hero class format",
"description" : "Format used to define classes of heroes in VCMI", "description" : "Format used to define classes of heroes in VCMI",
"required" : [ "required" : [
"animation", "faction", "highLevelChance", "lowLevelChance", "name", "faction", "affinity", "commander", "animation", "mapObject",
"name", "primarySkills", "secondarySkills", "tavern", "defaultTavern", "primarySkills", "secondarySkills", "lowLevelChance", "highLevelChance",
"affinity", "commander", "mapObject" "defaultTavern", "tavern"
], ],
"additionalProperties" : false, "additionalProperties" : false,
"properties":{ "properties" : {
"animation": { "name" : {
"type":"object", "type" : "string",
"description" : "Translatable name of hero class"
},
"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"
},
"animation" : {
"type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"description": "Files related to hero animation", "description" : "Files related to hero animation",
"required": [ "battle" ], "required" : [ "battle" ],
"properties":{ "properties" : {
"battle": { "battle" : {
"type":"object", "type" : "object",
"additionalProperties" : false, "additionalProperties" : false,
"description": "Hero animations for battle", "description" : "Hero animations for battle",
"required": [ "female", "male" ], "required" : [ "female", "male" ],
"properties":{ "properties" : {
"female": { "female" : {
"type":"string", "type" : "string",
"description": "Female version", "description" : "Female version",
"format" : "defFile" "format" : "defFile"
}, },
"male": { "male" : {
"type":"string", "type" : "string",
"description": "Male version", "description" : "Male version",
"format" : "defFile" "format" : "defFile"
} }
} }
@@ -45,53 +61,32 @@
} }
} }
}, },
"index" : { "primarySkills" : {
"type" : "number", "type" : "object",
"description" : "Private field to break things, do not use." "description" : "Initial primary skills of heroes",
}, "additionalProperties" : {
"faction": { "type" : "number"
"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"
},
"highLevelChance": {
"type":"object",
"description": "Chance to get specific primary skill on level-up, applicable for levels starting from 10",
"additionalProperties":{
"type":"number"
} }
}, },
"lowLevelChance": { "secondarySkills" : {
"type":"object", "type" : "object",
"description": "Chance to get specific primary skill on level-up, applicable for levels less than 10", "description" : "Chance to get specific secondary skill on level-up. All missing skills are considered to be banned",
"additionalProperties":{ "additionalProperties" : {
"type":"number" "type" : "number"
} }
}, },
"name": { "lowLevelChance" : {
"type":"string", "type" : "object",
"description": "Translatable name of hero class" "description" : "Chance to get specific primary skill on level-up, applicable for levels less than 10",
}, "additionalProperties" : {
"primarySkills": { "type" : "number"
"type":"object",
"description": "Initial primary skills of heroes",
"additionalProperties":{
"type":"number"
} }
}, },
"secondarySkills": { "highLevelChance" : {
"type":"object", "type" : "object",
"description": "Chance to get specific secondary skill on level-up. All missing skills are considered to be banned", "description" : "Chance to get specific primary skill on level-up, applicable for levels starting from 10",
"additionalProperties":{ "additionalProperties" : {
"type":"number" "type" : "number"
} }
}, },
"defaultTavern" : { "defaultTavern" : {
@@ -99,14 +94,17 @@
"description" : "Default chance for hero to appear in tavern, used only when value vas not set in tavern field", "description" : "Default chance for hero to appear in tavern, used only when value vas not set in tavern field",
"minimum" : 0 "minimum" : 0
}, },
"tavern" : {
"tavern": { "type" : "object",
"type":"object", "description" : "Chance for this hero to appear in tavern of this factions. Reversed version of field \"tavern\" from town format",
"description": "Chance for this hero to appear in tavern of this factions. Reversed version of field \"tavern\" from town format", "additionalProperties" : {
"additionalProperties":{ "type" : "number",
"type":"number",
"minimum" : 0 "minimum" : 0
} }
},
"index" : {
"type" : "number",
"description" : "Private field to break things, do not use."
} }
} }
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,22 +1,18 @@
{ {
"type" : "object", "type" : "object",
"$schema" : "http://json-schema.org/draft-04/schema", "$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI script format", "title" : "VCMI script format",
"description" : "Format used to configure script environment", "description" : "Format used to configure script environment",
"required" : ["source"], "required" : ["source"],
"properties" : { "properties" : {
"source" : { "source" : {
"type": "string", "type" : "string",
"description": "Full VFS path to script source (extension required)" "description" : "Full VFS path to script source (extension required)"
}, },
"implements" :{ "implements" : {
"type": "string", "type" : "string",
"enum": ["ANYTHING", "BATTLE_EFFECT"], "enum" : ["ANYTHING", "BATTLE_EFFECT"],
"description": "" "description" : ""
} }
} }
} }

View File

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

View File

@@ -1,18 +1,18 @@
{ {
"type" : "object", "type" : "object",
"$schema" : "http://json-schema.org/draft-04/schema", "$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI skill format", "title" : "VCMI skill format",
"description" : "Format used to replace bonuses provided by secondary skills in VCMI", "description" : "Format used to replace bonuses provided by secondary skills in VCMI",
"definitions" : { "definitions" : {
"skillBonus" : { "skillBonus" : {
"type" : "object", "type" : "object",
"description" : "Set of bonuses provided by skill at given level", "description" : "Set of bonuses provided by skill at given level",
"required" : ["description", "effects"], "required" : ["description", "effects"],
"properties" : { "properties" : {
"description" : {
"type" : "string",
"description" : "localizable description"
},
"images" : { "images" : {
"type" : "object", "type" : "object",
"description" : "skill icons of varying size", "description" : "skill icons of varying size",
@@ -34,10 +34,6 @@
} }
} }
}, },
"description" : {
"type" : "string",
"description" : "localizable description"
},
"effects" : { "effects" : {
"type" : "object", "type" : "object",
"additionalProperties" : { "additionalProperties" : {
@@ -46,27 +42,24 @@
} }
} }
} }
}, },
"required" : ["name", "basic", "advanced", "expert"], "required" : ["name", "basic", "advanced", "expert"],
"properties" : { "properties" : {
"index" : {
"type": "number",
"description": "numeric id of skill, required for existing skills"
},
"name" : { "name" : {
"type": "string", "type" : "string",
"description": "localizable skill name" "description" : "localizable skill name"
}, },
"obligatoryMajor":{ "index" : {
"type": "boolean", "type" : "number",
"description": "This skill is major obligatory (like H3 Wisdom)" "description" : "numeric id of skill, required for existing skills"
}, },
"obligatoryMinor":{ "obligatoryMajor" : {
"type": "boolean", "type" : "boolean",
"description": "This skill is minor obligatory (like H3 Magic school)" "description" : "This skill is major obligatory (like H3 Wisdom)"
},
"obligatoryMinor" : {
"type" : "boolean",
"description" : "This skill is minor obligatory (like H3 Magic school)"
}, },
"gainChance" : { "gainChance" : {
"description" : "Chance for the skill to be offered on level-up (heroClass may override)", "description" : "Chance for the skill to be offered on level-up (heroClass may override)",

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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