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

@@ -3,8 +3,7 @@
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI artifact format",
"description" : "Format used to define new artifacts in VCMI",
"required" : [ "class", "text", "type", "value" ],
"required" : [ "type", "class", "value", "text" ],
"definitions" : {
"growingBonusList" : {
"type" : "array",
@@ -20,28 +19,61 @@
}
}
},
"additionalProperties" : false,
"properties" : {
"bonuses": {
"warMachine" :
{
"type" : "string",
"description" : "Creature id to use on battle field. If set, this artifact is war machine"
},
"type" : {
"type" : "array",
"description": "Bonuses provided by this artifact using bonus system",
"items": { "$ref" : "bonus.json" }
"description" : "Type of this artifact - creature, hero or commander",
"items" : {
"type" : "string",
"enum" : [ "HERO", "CREATURE", "COMMANDER" ]
}
},
"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"
},
"index" : {
"value" : {
"type" : "number",
"description" : "Private field to break things, do not use."
"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" : {
"type" : "object",
"additionalProperties" : false,
"properties" : {
"bonusesPerLevel" : { "$ref" : "#/definitions/growingBonusList"},
"thresholdBonuses" : { "$ref" : "#/definitions/growingBonusList"}
}
},
"graphics" : {
"type" : "object",
"additionalProperties" : false,
@@ -65,33 +97,16 @@
}
}
},
"growing" : {
"type" : "object",
"additionalProperties" : false,
"properties" : {
"bonusesPerLevel" : { "$ref" : "#/definitions/growingBonusList"},
"thresholdBonuses" : { "$ref" : "#/definitions/growingBonusList"}
}
},
"slot": {
"description": "Slot to which this artifact can be put, if applicable",
"oneOf" : [
{
"type":"string"
},
{
"type" : "array",
"minItems" : 1,
"additionalItems" : { "type" : "string" }
}
]
},
"text" : {
"type" : "object",
"additionalProperties" : false,
"description" : "Texts associated with artifact",
"required" : [ "description", "event", "name" ],
"properties" : {
"name" : {
"type" : "string",
"description" : "Name of the artifact"
},
"description" : {
"type" : "string",
"description" : "Long description of this artifact"
@@ -99,30 +114,12 @@
"event" : {
"type" : "string",
"description" : "Text that visible on picking this artifact on map"
},
"name": {
"type":"string",
"description": "Name of the artifact"
}
}
},
"type": {
"type":"array",
"description": "Type of this artifact - creature, hero or commander",
"items": {
"type":"string",
"enum" : [ "HERO", "CREATURE", "COMMANDER" ]
}
},
"value": {
"index" : {
"type" : "number",
"description": "Cost of this artifact, in gold"
},
"warMachine":
{
"type":"string",
"description": "Creature id to use on battle field. If set, this artifact is war machine"
}
"description" : "Private field to break things, do not use."
}
}
}

View File

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

View File

@@ -4,7 +4,6 @@
"title" : "VCMI bonus system format",
"description" : "Subsection of several formats, used to add generic bonuses to objects",
"required" : ["type"],
"definitions" :
{
"nestedLimiter" : {
@@ -38,43 +37,30 @@
]
}
},
"additionalProperties" : false,
"properties" : {
"addInfo": {
"type" : {
"type" : "string",
"description" : "type"
},
"subtype" : {
"anyOf" : [
{ "type" : "string" },
{ "type" : "number" },
{
"type" : "array",
"items" : {
"anyof" : [
{ "type" : "string" },
{ "type" : "number" }
]
}
}
],
"description": "addInfo"
"description" : "subtype"
},
"description": {
"sourceID" : {
"type" : "number",
"description" : "sourceID"
},
"sourceType" : {
"type" : "string",
"description": "description"
"description" : "sourceType"
},
"duration": {
"anyOf" : [
{ "type": "string"},
{ "type": "array", "items": {"type": "string"} }
],
"description": "duration"
},
"effectRange": {
"targetSourceType" : {
"type" : "string",
"description": "effectRange"
},
"limiters" : {
"$ref" : "#/definitions/nestedLimiter",
"description" : "limiter"
"description" : "targetSourceType"
},
"propagator" : {
"description" : "propagator",
@@ -139,36 +125,13 @@
}
]
},
"sourceID": {
"type":"number",
"description": "sourceID"
"limiters" : {
"$ref" : "#/definitions/nestedLimiter",
"description" : "limiter"
},
"sourceType": {
"effectRange" : {
"type" : "string",
"description": "sourceType"
},
"targetSourceType": {
"type":"string",
"description": "targetSourceType"
},
"stacking" : {
"type" : "string",
"description" : "stacking"
},
"subtype": {
"anyOf" : [
{ "type" : "string" },
{ "type" : "number" }
],
"description": "subtype"
},
"turns": {
"type":"number",
"description": "turns"
},
"type": {
"type":"string",
"description": "type"
"description" : "effectRange"
},
"val" : {
"type" : "number",
@@ -177,6 +140,41 @@
"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" : {
"type" : "string",
"description" : "stacking"
},
"description" : {
"type" : "string",
"description" : "description"
}
}
}

View File

@@ -10,15 +10,21 @@
},
{
"required" : [
"name", "cost", "level", "fightValue", "aiValue",
"attack", "defense", "hitPoints", "speed", "damage", "advMapAmount",
"graphics", "sound"
"name", "level", "cost", "speed", "hitPoints", "attack", "defense", "damage",
"fightValue", "aiValue", "advMapAmount", "graphics", "sound"
]
}
],
"additionalProperties" : false,
"properties" : {
"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"
},
"name" : {
"type" : "object",
"additionalProperties" : false,
@@ -35,46 +41,51 @@
}
}
},
"abilityText" : {
"type" : "string",
"description" : "Text version of creature abilities. Used only with original creature window"
},
"index" : {
"type" : "number",
"description" : "Private field to break things, do not use."
},
"extraNames" : {
"type" : "array",
"items" : { "type" : "string" },
"description" : "Private field to break things, do not use."
},
"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"},
"mercury": { "type":"number"},
"ore" : { "type" : "number"},
"mercury" : { "type" : "number"},
"sulfur" : { "type" : "number"},
"crystal" : { "type" : "number"},
"gems": { "type":"number"},
"gold": { "type":"number"}
"gems" : { "type" : "number"}
}
},
"special": {
"type":"boolean",
"description": "Marks this object as special and not available by default"
"speed" : { "type" : "number" },
"hitPoints" : { "type" : "number" },
"attack" : { "type" : "number" },
"defense" : { "type" : "number" },
"damage" : {
"type" : "object",
"additionalProperties" : false,
"properties" : {
"max" : { "type" : "number" },
"min" : { "type" : "number" }
}
},
"disabled": {
"type":"boolean",
"description": "Object is competely disabled and may not be even loaded in-game"
"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"
},
"level": { "type":"number"},
"fightValue" : {
"type" : "number",
"description" : " \"value\" of creature, used to determine for example army strength"
@@ -91,24 +102,6 @@
"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,
@@ -118,15 +111,6 @@
"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"
@@ -138,37 +122,38 @@
"$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" } }
]
}
}
}
"abilityText" : {
"type" : "string",
"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" : [
"animationTime", "animation", "timeBetweenFidgets"
"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,
@@ -189,27 +174,6 @@
}
}
},
"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,
@@ -306,6 +270,38 @@
"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" : {
"type" : "number",
"description" : "Private field to break things, do not use."
},
"extraNames" : {
"type" : "array",
"items" : { "type" : "string" },
"description" : "Private field to break things, do not use."
}
}
}

View File

@@ -26,31 +26,33 @@
}
}
},
"type" : "object",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI faction format",
"description" : "Json format for defining new faction (aka towns) in VCMI",
"required" : [ "name", "alignment", "creatureBackground", "nativeTerrain" ],
"required" : [ "name", "alignment", "nativeTerrain", "creatureBackground" ],
"dependencies" : {
"town" : [ "puzzleMap" ]
},
"additionalProperties" : false,
"properties" : {
"name" : {
"type" : "string",
"description" : "Translatable name of town"
},
"index" : {
"type" : "number",
"description" : "Private field to break things, do not use."
},
"alignment" : {
"type" : "string",
"enum" : [ "good", "neutral", "evil" ],
"description" : "Town alignment, good, neutral or evil"
},
"nativeTerrain" : {
"type" : "string",
"description" : "Native terrain for creatures. Creatures fighting on native terrain receive several bonuses"
},
"preferUndergroundPlacement" : {
"type" : "boolean",
"description" : "Random map generator places player/cpu-owned towns underground if true is specified and on the ground otherwise. Parameter is unused for maps without underground. False by default."
},
"creatureBackground" : {
"type" : "object",
"additionalProperties" : false,
@@ -69,13 +71,163 @@
}
}
},
"nativeTerrain": {
"type":"string",
"description": "Native terrain for creatures. Creatures fighting on native terrain receive several bonuses"
"town" : {
"type" : "object",
"additionalProperties" : false,
"required" : [
"mapObject", "buildingsIcons", "buildings", "creatures", "guildWindow", "names",
"hallBackground", "hallSlots", "horde", "mageGuild", "moatAbility", "defaultTavern", "tavernVideo", "guildBackground", "musicTheme", "siege", "structures", "townBackground", "warMachine"
],
"description" : "town",
"properties" : {
"creatures" : {
"type" : "array",
"minItems" : 7,
"maxItems" : 7,
"description" : "List of creatures available for recruitment on each level",
"items" : {
"type" : "array",
"items" : { "type" : "string" }
}
},
"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."
"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" : {
"properties" : {
"filters" : {
"type" : "object",
"additionalProperties" : { "type" : "array" }
}
}
},
"structures" : {
"type" : "object",
"additionalProperties" : {
"$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" : {
"type" : "number",
"description" : "Default chance for hero to appear in tavern, used only when value vas not set in tavern field",
"minimum" : 0
},
"tavern" : {
"type" : "object",
"description" : "Hero classes available in tavern. Value indicates chance for hero of this class to appear",
"additionalProperties" : {
"type" : "number",
"minimum" : 0
}
},
"guildSpells" : {
"type" : "object",
"description" : "Spells available in mage guild. Value indicates chance for this spell to appear",
"additionalProperties" : {
"type" : "number"
}
},
"names" : {
"type" : "array",
"description" : "Names for towns on adventure map",
"minItems" : 1,
"items" : { "type" : "string" }
}
}
},
"puzzleMap" : {
"type" : "object",
@@ -104,164 +256,9 @@
}
}
},
"town": {
"type":"object",
"additionalProperties" : false,
"required" : [
"mapObject", "buildingsIcons", "buildings", "creatures", "guildWindow", "names",
"hallBackground", "hallSlots", "horde", "mageGuild", "moatAbility", "defaultTavern", "tavernVideo", "guildBackground", "musicTheme", "siege", "structures", "townBackground", "warMachine"
],
"description": "town",
"properties":{
"mapObject" : {
"properties" : {
"filters" : {
"type" : "object",
"additionalProperties" : { "type" : "array" }
}
}
},
"guildSpells" : {
"type" : "object",
"description" : "Spells available in mage guild. Value indicates chance for this spell to appear",
"additionalProperties" : {
"type" : "number"
}
},
"defaultTavern" : {
"index" : {
"type" : "number",
"description" : "Default chance for hero to appear in tavern, used only when value vas not set in tavern field",
"minimum" : 0
},
"tavern" : {
"type" : "object",
"description" : "Hero classes available in tavern. Value indicates chance for hero of this class to appear",
"additionalProperties" : {
"type" : "number",
"minimum" : 0
}
},
"tavernVideo" : {
"type" : "string",
"description" : "Video for tavern window",
"format" : "videoFile"
},
"names" : {
"type" : "array",
"description" : "Names for towns on adventure map",
"minItems" : 1,
"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"
}
}
"description" : "Private field to break things, do not use."
}
}
}

View File

@@ -3,8 +3,7 @@
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI hero format",
"description" : "Format used to define new heroes in VCMI",
"required": [ "army", "class", "skills", "texts" ],
"required" : [ "class", "army", "skills", "texts" ],
"oneOf" : [
{
"required" : [ "images" ]
@@ -13,40 +12,8 @@
"required" : [ "index" ]
}
],
"additionalProperties" : false,
"properties" : {
"army": {
"type":"array",
"description": "Initial hero army when recruited in tavern",
"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" : {
"type" : "number",
"description" : "Private field to break things, do not use."
},
"special" : {
"type" : "boolean",
"description" : "Marks this object as special and not available by default"
@@ -92,6 +59,33 @@
}
}
},
"army" : {
"type" : "array",
"description" : "Initial hero army when recruited in tavern",
"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
}
}
}
},
"skills" : {
"type" : "array",
"description" : "List of skills initially known by hero",
@@ -142,30 +136,30 @@
"type" : "object",
"additionalProperties" : false,
"description" : "All translatable texts related to hero",
"required" : [ "biography", "name", "specialty" ],
"required" : [ "name", "biography", "specialty" ],
"properties" : {
"biography": {
"type":"string",
"description": "Hero biography"
},
"name" : {
"type" : "string",
"description" : "Hero name"
},
"biography" : {
"type" : "string",
"description" : "Hero biography"
},
"specialty" : {
"type" : "object",
"additionalProperties" : false,
"description" : "Hero specialty information",
"required" : [ "description", "name", "tooltip" ],
"required" : [ "name", "description", "tooltip" ],
"properties" : {
"description": {
"type":"string",
"description": "Description visible when hovering over specialty icon"
},
"name" : {
"type" : "string",
"description" : "Name of the specialty"
},
"description" : {
"type" : "string",
"description" : "Description visible when hovering over specialty icon"
},
"tooltip" : {
"type" : "string",
"description" : "Tooltip visible on clicking icon."
@@ -173,6 +167,10 @@
}
}
}
},
"index" : {
"type" : "number",
"description" : "Private field to break things, do not use."
}
}
}

View File

@@ -4,13 +4,29 @@
"title" : "VCMI hero class format",
"description" : "Format used to define classes of heroes in VCMI",
"required" : [
"animation", "faction", "highLevelChance", "lowLevelChance",
"name", "primarySkills", "secondarySkills", "tavern", "defaultTavern",
"affinity", "commander", "mapObject"
"name", "faction", "affinity", "commander", "animation", "mapObject",
"primarySkills", "secondarySkills", "lowLevelChance", "highLevelChance",
"defaultTavern", "tavern"
],
"additionalProperties" : false,
"properties" : {
"name" : {
"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,
@@ -45,41 +61,6 @@
}
}
},
"index" : {
"type" : "number",
"description" : "Private field to break things, do not use."
},
"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"
},
"highLevelChance": {
"type":"object",
"description": "Chance to get specific primary skill on level-up, applicable for levels starting from 10",
"additionalProperties":{
"type":"number"
}
},
"lowLevelChance": {
"type":"object",
"description": "Chance to get specific primary skill on level-up, applicable for levels less than 10",
"additionalProperties":{
"type":"number"
}
},
"name": {
"type":"string",
"description": "Translatable name of hero class"
},
"primarySkills" : {
"type" : "object",
"description" : "Initial primary skills of heroes",
@@ -94,12 +75,25 @@
"type" : "number"
}
},
"lowLevelChance" : {
"type" : "object",
"description" : "Chance to get specific primary skill on level-up, applicable for levels less than 10",
"additionalProperties" : {
"type" : "number"
}
},
"highLevelChance" : {
"type" : "object",
"description" : "Chance to get specific primary skill on level-up, applicable for levels starting from 10",
"additionalProperties" : {
"type" : "number"
}
},
"defaultTavern" : {
"type" : "number",
"description" : "Default chance for hero to appear in tavern, used only when value vas not set in tavern field",
"minimum" : 0
},
"tavern" : {
"type" : "object",
"description" : "Chance for this hero to appear in tavern of this factions. Reversed version of field \"tavern\" from town format",
@@ -107,6 +101,10 @@
"type" : "number",
"minimum" : 0
}
},
"index" : {
"type" : "number",
"description" : "Private field to break things, do not use."
}
}
}

View File

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

View File

@@ -3,7 +3,7 @@
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI mod file format",
"description" : "Format used to define main mod file (mod.json) in VCMI",
"required" : [ "name", "description", "version", "author", "contact", "modType" ],
"required" : [ "name", "description", "modType", "version", "author", "contact" ],
"definitions" : {
"localizable" : {
"type" : "object",
@@ -22,6 +22,14 @@
"type" : "string",
"description" : "Author of the mod. Can be nickname, real name or name of team"
},
"changelog" : {
"type" : "object",
"description" : "List of changes/new features in each version",
"additionalProperties" : {
"type" : "array",
"items" : { "type" : "string" }
}
},
"skipValidation" : {
"type" : "boolean",
"description" : "If set to true, vcmi will skip validation of current translation json files"
@@ -30,14 +38,6 @@
"type" : "array",
"description" : "List of files with translations for this language",
"items" : { "type" : "string", "format" : "textFile" }
},
"changelog" : {
"type":"object",
"description": "List of changes/new features in each version",
"additionalProperties" : {
"type" : "array",
"items" : { "type":"string" }
}
}
}
}
@@ -53,52 +53,38 @@
"type" : "string",
"description" : "More lengthy description of mod. No hard limit"
},
"modType" : {
"type" : "string",
"enum" : [ "Translation", "Town", "Test", "Templates", "Spells", "Music", "Sounds", "Skills", "Other", "Objects", "Mechanics", "Interface", "Heroes", "Graphical", "Expansion", "Creatures", "Artifacts", "AI" ],
"description" : "Type of mod, e.g. Town, Artifacts, Graphical."
},
"version" : {
"type":"string",
"description": "Current mod version, up to 3 numbers, dot-separated. Format: A.B.C"
},
"author" : {
"type" : "string",
"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" : {
"type" : "string",
"description" : "Home page of mod or link to forum thread"
},
"language" : {
"licenseName" : {
"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" ],
"description" : "Name of the license, recommended is Creative Commons Attribution-ShareAlike"
},
"depends": {
"type":"array",
"description": "List of mods that are required to run this one",
"items": { "type":"string" }
"licenseURL" : {
"type" : "string",
"description" : "Url to license text, e.g. http://creativecommons.org/licenses/by-sa/4.0/deed"
},
"conflicts": {
"version" : {
"type" : "string",
"description" : "Current mod version, up to 3 numbers, dot-separated. Format: A.B.C"
},
"changelog" : {
"type" : "object",
"description" : "List of changes/new features in each version",
"additionalProperties" : {
"type" : "array",
"description": "List of mods that can't be enabled in the same time as this one",
"items" : { "type" : "string" }
}
},
"compatibility" : {
"type" : "object",
@@ -117,11 +103,58 @@
}
}
},
"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" : {
"type" : "boolean",
"description" : "If set to true, mod will not be enabled automatically on install"
},
"settings" : {
"type" : "object",
"description" : "List of changed game settings by mod",
"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" : {
"$ref" : "#/definitions/localizable"
},
@@ -151,22 +184,6 @@
"description" : "List of files with translations for this language",
"items" : { "type" : "string", "format" : "textFile" }
},
"artifacts": {
"type":"array",
"description": "List of configuration files for artifacts",
"items": { "type":"string", "format" : "textFile" }
},
"bonuses":{
"type":"array",
"description": "List of configuration files for bonuses",
"items": { "type":"string", "format" : "textFile" }
},
"creatures": {
"type":"array",
"description": "List of configuration files for creatures",
"items": { "type":"string", "format" : "textFile" }
},
"factions" : {
"type" : "array",
"description" : "List of configuration files for towns/factions",
@@ -182,14 +199,19 @@
"description" : "List of configuration files for heroes",
"items" : { "type" : "string", "format" : "textFile" }
},
"objects": {
"skills" : {
"type" : "array",
"description": "List of configuration files for objects",
"description" : "List of configuration files for skills",
"items" : { "type" : "string", "format" : "textFile" }
},
"scripts": {
"creatures" : {
"type" : "array",
"description": "List of configuration files for scripts",
"description" : "List of configuration files for creatures",
"items" : { "type" : "string", "format" : "textFile" }
},
"artifacts" : {
"type" : "array",
"description" : "List of configuration files for artifacts",
"items" : { "type" : "string", "format" : "textFile" }
},
"spells" : {
@@ -197,26 +219,14 @@
"description" : "List of configuration files for spells",
"items" : { "type" : "string", "format" : "textFile" }
},
"skills": {
"objects" : {
"type" : "array",
"description": "List of configuration files for skills",
"description" : "List of configuration files for objects",
"items" : { "type" : "string", "format" : "textFile" }
},
"templates":{
"bonuses" : {
"type" : "array",
"description": "List of configuration files for RMG templates",
"items": { "type":"string", "format" : "textFile" }
},
"battlefields":{
"type":"array",
"description": "List of configuration files for battlefields",
"items": { "type":"string", "format" : "textFile" }
},
"obstacles":{
"type":"array",
"description": "List of configuration files for obstacles",
"description" : "List of configuration files for bonuses",
"items" : { "type" : "string", "format" : "textFile" }
},
"terrains" : {
@@ -234,49 +244,25 @@
"description" : "List of configuration files for rivers",
"items" : { "type" : "string", "format" : "textFile" }
},
"changelog" : {
"type":"object",
"description": "List of changes/new features in each version",
"additionalProperties" : {
"battlefields" : {
"type" : "array",
"items" : { "type":"string" }
}
"description" : "List of configuration files for battlefields",
"items" : { "type" : "string", "format" : "textFile" }
},
"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":{
"obstacles" : {
"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"
"description" : "List of configuration files for obstacles",
"items" : { "type" : "string", "format" : "textFile" }
},
"type": {
"type" : "string",
"enum" : [ "dir", "lod", "snd", "vid", "map", "zip" ],
"description" : "Type of data source"
}
}
}
}
"templates" : {
"type" : "array",
"description" : "List of configuration files for RMG templates",
"items" : { "type" : "string", "format" : "textFile" }
},
"scripts" : {
"type" : "array",
"description" : "List of configuration files for scripts",
"items" : { "type" : "string", "format" : "textFile" }
}
}
}

View File

@@ -3,10 +3,13 @@
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI map object format",
"description" : "Description of map object class",
"required": [ "handler", "name" ],
"required" : [ "name", "handler" ],
"additionalProperties" : false,
"properties" : {
"name" : {
"type" : "string"
},
"index" : {
"type" : "number"
},
@@ -19,9 +22,6 @@
"base" : {
"type" : "object"
},
"name": {
"type":"string"
},
"types" : {
"type" : "object",
"additionalProperties" : {

View File

@@ -4,7 +4,6 @@
"title" : "VCMI map object template format",
"description" : "Description of map object tempate that describes appearence of object instance",
"required" : [ "animation", "mask" ],
"additionalProperties" : false,
"properties" : {
"animation" : {
@@ -24,16 +23,10 @@
"maxItems" : 3,
"items" : {
"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" : {
"type" : "array",
"items" : { "type" : "string" },
@@ -42,6 +35,11 @@
"zIndex" : {
"type" : "number",
"description" : "Defines order in which objects on same tile will be blit."
},
"allowedTerrains" : {
"type" : "array",
"items" : { "type" : "string" },
"description" : "List of terrain on which this object can be placed"
}
}
}

View File

@@ -5,7 +5,6 @@
"description" : "Description of map object type, used only as sub-schema of object",
"required" : [ ],
"additionalProperties" : true, // may have type-dependant properties
"properties" : {
"index" : {
"type" : "number"
@@ -13,6 +12,15 @@
"aiValue" : {
"type" : "number"
},
"base" : {
"type" : "object"
},
"templates" : {
"type" : "object",
"additionalProperties" : {
"$ref" : "objectTemplate.json"
}
},
"sounds" : {
"type" : "object",
"additionalProperties" : false,
@@ -43,16 +51,6 @@
}
}
}
},
"base": {
"type" : "object"
},
"templates": {
"type":"object",
"additionalProperties": {
"$ref" : "objectTemplate.json"
}
}
}
}

View File

@@ -4,7 +4,6 @@
"title" : "VCMI obstacle format",
"description" : "Format used to define new obstacles in VCMI",
"required" : [ "animation" ],
"additionalProperties" : false,
"properties" : {
"allowedTerrains" : {
@@ -17,6 +16,10 @@
"description" : "Obstacles can be placed on specified specified battlefields",
"items" : { "type" : "string" }
},
"absolute" : {
"type" : "boolean",
"description" : "Should be used absolute or relative coordinates for obstacle. There is possible only one absolute obstacle"
},
"width" : {
"type" : "number",
"description" : "Width ob obstacle"
@@ -41,10 +44,6 @@
"unknown" : {
"type" : "number",
"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

@@ -3,25 +3,19 @@
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI river format",
"description" : "Format used to define new rivers in VCMI",
"required" : [ "text", "shortIdentifier", "tilesFilename", "delta" ],
"required" : [ "shortIdentifier", "text", "tilesFilename", "delta" ],
"additionalProperties" : false,
"properties" : {
"index" :
"shortIdentifier" :
{
"type": "number",
"description": "Internal, do not use"
"type" : "string",
"description" : "Two-letters unique indentifier for this road. Used in map format"
},
"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",
@@ -32,6 +26,11 @@
{
"type" : "string",
"description" : "Name of file with river delta graphics"
},
"index" :
{
"type" : "number",
"description" : "Internal, do not use"
}
}
}

View File

@@ -3,25 +3,19 @@
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI road format",
"description" : "Format used to define new roads in VCMI",
"required" : [ "text", "shortIdentifier", "tilesFilename", "moveCost" ],
"required" : [ "shortIdentifier", "text", "tilesFilename", "moveCost" ],
"additionalProperties" : false,
"properties" : {
"index" :
"shortIdentifier" :
{
"type": "number",
"description": "Internal, do not use"
"type" : "string",
"description" : "Two-letters unique indentifier for this road. Used in map format"
},
"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",
@@ -32,6 +26,11 @@
{
"type" : "number",
"description" : "How many movement points needed to move hero"
},
"index" :
{
"type" : "number",
"description" : "Internal, do not use"
}
}
}

View File

@@ -1,13 +1,9 @@
{
"type" : "object",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI script format",
"description" : "Format used to configure script environment",
"required" : ["source"],
"properties" : {
"source" : {
"type" : "string",

View File

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

View File

@@ -1,12 +1,8 @@
{
"type" : "object",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI spell format",
"description" : "Format used to define new spells in VCMI",
"definitions" : {
"animationQueue" : {
"type" : "array",
@@ -44,8 +40,8 @@
"items" : {
"type" : "object",
"properties" : {
"minimumAngle": {"type":"number", "minimum" : 0},
"defName": {"type":"string", "format": "defFile"}
"defName" : {"type" : "string", "format" : "defFile"},
"minimumAngle" : {"type" : "number", "minimum" : 0}
},
"additionalProperties" : false
}
@@ -60,7 +56,7 @@
},
"levelInfo" : {
"type" : "object",
"required":["range","description","cost","power","aiValue","range"],
"required" :["range", "description", "cost", "power", "aiValue"],
"additionalProperties" : false,
"properties" : {
@@ -75,14 +71,13 @@
"power" : {
"type" : "number"
},
"aiValue":{
"type": "number"
},
"range" : {
"type" : "string",
"description" : "spell range description in SRSL"
},
"aiValue" : {
"type" : "number"
},
"effects" : {
"type" : "object",
"description" : "Timed effects (updated by prolongation)",
@@ -125,46 +120,37 @@
}
}
},
"texts" : {
"type" : "object",
"additionalProperties" : false
}
},
"required" : ["type", "name", "school", "level", "power","gainChance","flags","levels"],
"additionalProperties" : false,
"properties" : {
"index" : {
"type" : "number",
"description" : "numeric id of spell required only for original spells, prohibited for new spells"
},
"name" : {
"type" : "string",
"description" : "Localizable name"
},
"type" : {
"type" : "string",
"enum" : ["adventure", "combat", "ability"],
"description" : "Spell type"
},
"name":{
"type": "string",
"description": "Localizable name"
},
"school" : {
"type" : "object",
"description" : "Spell schools",
"additionalProperties" : false,
"properties" : {
"air" : {"type" : "boolean"},
"fire" : {"type" : "boolean"},
"earth" : {"type" : "boolean"},
"water" : {"type" : "boolean"}
}
},
"level" : {
"type" : "number",
@@ -172,18 +158,15 @@
"minimum" : 0,
"maximum" : 5
},
"power" : {
"type" : "number",
"description" : "Base power"
},
"defaultGainChance" : {
"type" : "number",
"description" : "Gain chance by default for all factions"
},
"gainChance" : {
"type" : "object",
"description" : "Chance in % to gain for faction. NOTE: this field is merged with faction config",
@@ -261,26 +244,10 @@
"additionalProperties" : true
},
"animation" : {"$ref" : "#/definitions/animation"},
"graphics" : {
"type" : "object",
"additionalProperties" : false,
"properties" : {
"iconImmune":{
"type": "string",
"description": "Resourse path of icon for SPELL_IMMUNITY bonus (relative to DATA or SPRITES)",
"format" : "imageFile"
},
"iconScenarioBonus":{
"type": "string",
"description": "Resourse path of icon for scenario bonus" ,
"format" : "imageFile"
},
"iconEffect":{
"type": "string",
"description": "Resourse path of icon for spell effects during battle" ,
"format" : "imageFile"
},
"iconBook" : {
"type" : "string",
"description" : "Resourse path of icon for spellbook" ,
@@ -290,11 +257,24 @@
"type" : "string",
"description" : "Resourse path of icon for spell scrolls",
"format" : "imageFile"
}
}
},
"iconEffect" : {
"type" : "string",
"description" : "Resourse path of icon for spell effects during battle" ,
"format" : "imageFile"
},
"iconImmune" : {
"type" : "string",
"description" : "Resourse path of icon for SPELL_IMMUNITY bonus (relative to DATA or SPRITES)",
"format" : "imageFile"
},
"iconScenarioBonus" : {
"type" : "string",
"description" : "Resourse path of icon for scenario bonus" ,
"format" : "imageFile"
}
}
},
"sounds" : {
"type" : "object",
"additionalProperties" : false,
@@ -305,12 +285,10 @@
}
}
},
"levels" : {
"type" : "object",
"additionalProperties" : false,
"required" : ["none", "basic", "advanced", "expert"],
"properties" : {
"base" : {
"type" : "object",

View File

@@ -1,12 +1,8 @@
{
"type" : "object",
"$schema": "",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI random map template format",
"description" : "Format used to define random map templates in VCMI",
"definitions" :
{
"zone" : {
@@ -35,14 +31,14 @@
}
},
"type" : {
"enum": ["playerStart", "cpuStart", "treasure", "junction"],
"type" : "string",
"additionalProperties" : false,
"type":"string"
"enum" : ["playerStart", "cpuStart", "treasure", "junction"]
},
"size" : {
"type" : "number",
"minimum" : 1,
"additionalProperties" : false,
"additionalProperties" : false
},
"connection" :
{
@@ -68,9 +64,10 @@
"type" : "string"
}
},
"properties" :
{
"required" : ["zones", "connections"],
"additionalProperties" : false,
"zones" : {
"type" : "object",
"additionalProperties" : {"$ref" : "#/definitions/zone" }
@@ -82,8 +79,6 @@
"allowedWaterContent" : {
"type" : "array",
"items" : {"$ref" : "#/definitions/waterContent"}
},
"required" : ["zones", "connections"],
"additionalProperties" : false
}
}
}

View File

@@ -4,24 +4,58 @@
"title" : "VCMI terrain format",
"description" : "Format used to define new terrains in VCMI",
"required" : [ "text", "moveCost", "minimapUnblocked", "minimapBlocked", "music", "tiles", "type", "horseSound", "horseSoundPenalty", "shortIdentifier", "battleFields" ],
"additionalProperties" : false,
"properties" : {
"index" :
{
"type": "number",
"description": "Internal, do not use"
},
"text" :
{
"type" : "string",
"description" : "Human-readable name of this terrain"
},
"shortIdentifier" :
{
"type" : "string",
"description" : "Two-letters unique indentifier for this terrain. Used for map format"
},
"type" :
{
"type" : "array",
"description" : "Type of this terrain. Can be land, water, subterranean or rock",
"items" :
{
"enum" : ["LAND", "WATER", "SUB", "ROCK", "SURFACE"],
"type" : "string"
}
},
"moveCost" :
{
"type" : "number",
"description" : "How many movement points needed to move hero"
},
"tiles" :
{
"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" : "string"
}
},
"minimapUnblocked" :
{
"type" : "array",
@@ -50,58 +84,6 @@
"description" : "Music filename to play on this terrain on adventure map",
"format" : "musicFile"
},
"tiles":
{
"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": "string"
}
},
"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"
},
"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"
}
},
"sounds" :
{
"type" : "object",
@@ -121,6 +103,18 @@
}
}
},
"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"
},
"prohibitTransitions" :
{
"type" : "array",
@@ -139,6 +133,11 @@
{
"type" : "string",
"description" : "Can be normal, dirt, water, rock"
},
"index" :
{
"type" : "number",
"description" : "Internal, do not use"
}
}
}

View File

@@ -4,7 +4,6 @@
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI town building format",
"description" : "Format used to define town buildings in VCMI",
"definitions" :
{
"buildingRequirement" : {
@@ -22,34 +21,11 @@
}
}
},
"properties" : {
"id" : {
"type" : "number",
"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" : {
"description" : "Name of this building",
"type" : "string"
@@ -58,18 +34,40 @@
"description" : "Full decsription of this building",
"type" : "string"
},
"type" : {
"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,
"description" : "Cost to build this building",
"properties" : {
"gold" : { "type" : "number"},
"wood" : { "type" : "number"},
"mercury": { "type":"number"},
"ore" : { "type" : "number"},
"mercury" : { "type" : "number"},
"sulfur" : { "type" : "number"},
"crystal" : { "type" : "number"},
"gems": { "type":"number"},
"gold": { "type":"number"}
"gems" : { "type" : "number"}
}
},
"produce" : {
@@ -77,13 +75,13 @@
"additionalProperties" : false,
"description" : "Resources this building produce each day",
"properties" : {
"gold" : { "type" : "number"},
"wood" : { "type" : "number"},
"mercury": { "type":"number"},
"ore" : { "type" : "number"},
"mercury" : { "type" : "number"},
"sulfur" : { "type" : "number"},
"crystal" : { "type" : "number"},
"gems": { "type":"number"},
"gold": { "type":"number"}
"gems" : { "type" : "number"}
}
},
"overrides" : {

View File

@@ -5,11 +5,9 @@
"title" : "VCMI siege screen format",
"description" : "Format used to define town siege screen in VCMI",
"required" : [
"gate", "imagePrefix", "moat", "shooter",
"towerIconLarge", "towerIconSmall",
"static", "towers", "walls"
"shooter", "towerIconLarge", "towerIconSmall", "imagePrefix",
"static", "towers", "walls", "gate", "moat"
],
"definitions" :
{
"point" : {
@@ -26,6 +24,10 @@
"additionalProperties" : false,
"required" : [ "battlement", "creature", "tower" ],
"properties" : {
"tower" : {
"description" : "Location of main segment of tower",
"$ref" : "#/definitions/point"
},
"battlement" : {
"description" : "Location of battlement, part of tower that covers shooter",
"$ref" : "#/definitions/point"
@@ -33,16 +35,81 @@
"creature" : {
"description" : "Location of shooter in tower",
"$ref" : "#/definitions/point"
}
}
}
},
"tower": {
"description" : "Location of main segment of tower",
"properties" : {
"shooter" : {
"type" : "string",
"description" : "Identifier of creature that will be used as tower shooter"
},
"towerIconSmall" : {
"type" : "string",
"description" : "Small icon for tower, used in battle queue",
"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,
@@ -58,10 +125,6 @@
}
}
},
"imagePrefix": {
"type":"string",
"description" : "Prefix to all images related to siege screen"
},
"moat" : {
"type" : "object",
"additionalProperties" : false,
@@ -76,72 +139,6 @@
"$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

@@ -6,6 +6,14 @@
"required" : [ "animation", "x", "y"],
"additionalProperties" : false,
"properties" : {
"builds" : {
"type" : "string",
"description" : ""
},
"hidden" : {
"type" : "boolean",
"description" : "If upgrade, this building will replace parent animation but will not alter its behaviour"
},
"animation" : {
"type" : "string",
"description" : "Main animation file for this building",
@@ -21,14 +29,6 @@
"description" : "Golden border around building, displayed when building is selected",
"format" : "imageFile"
},
"builds": {
"type" : "string",
"description" : ""
},
"hidden": {
"type":"boolean",
"description" : "If upgrade, this building will replace parent animation but will not alter its behaviour"
},
"x" : {
"type" : "number",
"description" : "Position on screen"