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",
"$schema": "http://json-schema.org/draft-04/schema",
"type" : "object",
"$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,51 +19,53 @@
}
}
},
"additionalProperties" : false,
"properties":{
"bonuses": {
"type":"array",
"description": "Bonuses provided by this artifact using bonus system",
"items": { "$ref" : "bonus.json" }
"properties" : {
"warMachine" :
{
"type" : "string",
"description" : "Creature id to use on battle field. If set, this artifact is war machine"
},
"class": {
"type":"string",
"enum" : [ "SPECIAL", "TREASURE", "MINOR", "MAJOR", "RELIC" ],
"description": "Artifact class, treasure, minor, major or relic"
},
"index" : {
"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"
}
"type" : {
"type" : "array",
"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"
},
"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" : {
"type" : "object",
"additionalProperties" : false,
@@ -73,56 +74,52 @@
"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",
"graphics" : {
"type" : "object",
"additionalProperties" : false,
"description": "Texts associated with artifact",
"required" : [ "description", "event", "name" ],
"properties":{
"description": {
"type":"string",
"description": "Long description of this artifact"
"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"
},
"event": {
"type":"string",
"description": "Text that visible on picking this artifact on map"
"large" : {
"type" : "string",
"description" : "Large image, used for drag-and-drop and popup messages",
"format" : "imageFile"
},
"name": {
"type":"string",
"description": "Name of the artifact"
"map" : {
"type" : "string",
"description" : ".def file for adventure map",
"format" : "defFile"
}
}
},
"type": {
"type":"array",
"description": "Type of this artifact - creature, hero or commander",
"items": {
"type":"string",
"enum" : [ "HERO", "CREATURE", "COMMANDER" ]
"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"
},
"event" : {
"type" : "string",
"description" : "Text that visible on picking this artifact on map"
}
}
},
"value": {
"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"
"index" : {
"type" : "number",
"description" : "Private field to break things, do not use."
}
}
}

View File

@@ -1,35 +1,34 @@
{
"type":"object",
"$schema": "http://json-schema.org/draft-04/schema",
"type" : "object",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI battlefield format",
"description" : "Format used to define new battlefields in VCMI",
"required" : [ "graphics" ],
"additionalProperties" : false,
"properties":{
"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",
"graphics" : {
"type" : "string",
"format" : "imageFile",
"description": "BMP battleground resource"
"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)",
"items": {
"type":"number"
"impassableHexes" : {
"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",
"$schema": "http://json-schema.org/draft-04/schema",
"type" : "object",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI bonus system format",
"description" : "Subsection of several formats, used to add generic bonuses to objects",
"required": ["type"],
"required" : ["type"],
"definitions" :
{
"nestedLimiter" : {
@@ -38,55 +37,42 @@
]
}
},
"additionalProperties" : false,
"properties":{
"addInfo": {
"properties" : {
"type" : {
"type" : "string",
"description" : "type"
},
"subtype" : {
"anyOf" : [
{ "type" : "string" },
{ "type" : "number" },
{
"type" : "array",
"items" : {
"anyof" : [
{ "type" : "string" },
{ "type" : "number" }
]
}
}
{ "type" : "number" }
],
"description": "addInfo"
"description" : "subtype"
},
"description": {
"type":"string",
"description": "description"
"sourceID" : {
"type" : "number",
"description" : "sourceID"
},
"duration": {
"anyOf" : [
{ "type": "string"},
{ "type": "array", "items": {"type": "string"} }
],
"description": "duration"
"sourceType" : {
"type" : "string",
"description" : "sourceType"
},
"effectRange": {
"type":"string",
"description": "effectRange"
"targetSourceType" : {
"type" : "string",
"description" : "targetSourceType"
},
"limiters" : {
"$ref" : "#/definitions/nestedLimiter",
"description" : "limiter"
},
"propagator": {
"description": "propagator",
"propagator" : {
"description" : "propagator",
"anyOf" : [
{
"type" : "string"
},
{
"type":"array",
"items": {
"type":"string",
"description": "0"
"type" : "array",
"items" : {
"type" : "string",
"description" : "0"
}
}
]
@@ -106,7 +92,7 @@
"type" : "string",
"description" : "type"
},
"parameters": {
"parameters" : {
"type" : "array",
"description" : "parameters",
"additionalItems" : true
@@ -130,7 +116,7 @@
"type" : "string",
"description" : "type"
},
"parameters": {
"parameters" : {
"type" : "array",
"description" : "parameters",
"additionalItems" : true
@@ -139,44 +125,56 @@
}
]
},
"sourceID": {
"type":"number",
"description": "sourceID"
"limiters" : {
"$ref" : "#/definitions/nestedLimiter",
"description" : "limiter"
},
"sourceType": {
"type":"string",
"description": "sourceType"
"effectRange" : {
"type" : "string",
"description" : "effectRange"
},
"targetSourceType": {
"type":"string",
"description": "targetSourceType"
"val" : {
"type" : "number",
"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" : {
"type" : "string",
"description" : "stacking"
},
"subtype": {
"anyOf" : [
{ "type" : "string" },
{ "type" : "number" }
],
"description": "subtype"
},
"turns": {
"type":"number",
"description": "turns"
},
"type": {
"type":"string",
"description": "type"
},
"val": {
"type":"number",
"description": "val"
},
"valueType": {
"type":"string",
"description": "valueType"
"description" : {
"type" : "string",
"description" : "description"
}
}
}

View File

@@ -1,8 +1,8 @@
{
"type":"object",
"$schema": "http://json-schema.org/draft-04/schema",
"type" : "object",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI creature format",
"description": "Json format for defining new creatures in VCMI",
"description" : "Json format for defining new creatures in VCMI",
"required" : [ "faction" ],
"anyOf" : [
{
@@ -10,35 +10,290 @@
},
{
"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":{
"name": {
"type":"object",
"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,
"description": "Translatable names for this creature",
"description" : "Translatable names for this creature",
"required" : [ "singular", "plural" ],
"properties":{
"singular": {
"type":"string",
"description": "Singular version"
"properties" : {
"singular" : {
"type" : "string",
"description" : "Singular version"
},
"plural": {
"type":"string",
"description": "Plural version"
"plural" : {
"type" : "string",
"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" : {
"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" : [
"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" : {
"type" : "number",
"description" : "Private field to break things, do not use."
@@ -47,265 +302,6 @@
"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"
},
"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" : {
"type":"object",
"type" : "object",
"additionalProperties" : false,
"required" : [ "normal", "built" ],
"properties": {
"built": {
"properties" : {
"built" : {
"$ref" : "#/definitions/townIcon",
"description": "Icon used after player build something in town"
"description" : "Icon used after player build something in town"
},
"normal": {
"normal" : {
"$ref" : "#/definitions/townIcon",
"description": "Icon used normally"
"description" : "Icon used normally"
}
}
}
},
"type":"object",
"$schema": "http://json-schema.org/draft-04/schema",
"type" : "object",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI faction format",
"description": "Json format for defining new faction (aka towns) in VCMI",
"required" : [ "name", "alignment", "creatureBackground", "nativeTerrain" ],
"description" : "Json format for defining new faction (aka towns) in VCMI",
"required" : [ "name", "alignment", "nativeTerrain", "creatureBackground" ],
"dependencies" : {
"town" : [ "puzzleMap" ]
},
"additionalProperties" : false,
"properties":{
"properties" : {
"name" : {
"type" : "string",
"description" : "Translatable name of town"
},
"index" : {
"type" : "number",
"description" : "Private field to break things, do not use."
},
"alignment": {
"type":"string",
"alignment" : {
"type" : "string",
"enum" : [ "good", "neutral", "evil" ],
"description": "Town alignment, good, neutral or evil"
"description" : "Town alignment, good, neutral or evil"
},
"creatureBackground": {
"type":"object",
"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,
"required" : [ "120px", "130px" ],
"description": "Backgrounds for creature info card",
"properties":{
"120px": {
"type":"string",
"description": "Version that is 120 pixels in height",
"description" : "Backgrounds for creature info card",
"properties" : {
"120px" : {
"type" : "string",
"description" : "Version that is 120 pixels in height",
"format" : "imageFile"
},
"130px": {
"type":"string",
"description": "Version that is 130 pixels in height",
"130px" : {
"type" : "string",
"description" : "Version that is 130 pixels in height",
"format" : "imageFile"
}
}
},
"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."
},
"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",
"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":{
"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" }
}
},
"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" : {
@@ -121,13 +179,28 @@
}
}
},
"guildSpells" : {
"structures" : {
"type" : "object",
"description" : "Spells available in mage guild. Value indicates chance for this spell to appear",
"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" : {
"type" : "number",
"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
}
},
"tavernVideo" : {
"type" : "string",
"description" : "Video for tavern window",
"format" : "videoFile"
"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" }
},
"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",
"$schema": "http://json-schema.org/draft-04/schema",
"type" : "object",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI hero format",
"description" : "Format used to define new heroes in VCMI",
"required": [ "army", "class", "skills", "texts" ],
"required" : [ "class", "army", "skills", "texts" ],
"oneOf" : [
{
"required" : [ "images" ]
@@ -13,109 +12,104 @@
"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
}
}
}
"properties" : {
"special" : {
"type" : "boolean",
"description" : "Marks this object as special and not available by default"
},
"index" : {
"type" : "number",
"description" : "Private field to break things, do not use."
"class" : {
"type" : "string",
"description" : "Hero class, e.g. knight or battleMage"
},
"special": {
"type":"boolean",
"description": "Marks this object as special and not available by default"
"female" : {
"type" : "boolean",
"description" : "This hero is female (changeable via editor)"
},
"class": {
"type":"string",
"description": "Hero class, e.g. knight or battleMage"
},
"female": {
"type":"boolean",
"description": "This hero is female (changeable via editor)"
},
"battleImage": {
"type":"string",
"description": "Custom def used on battle",
"battleImage" : {
"type" : "string",
"description" : "Custom def used on battle",
"format" : "defFile"
},
"images": {
"type":"object",
"images" : {
"type" : "object",
"additionalProperties" : false,
"description": "images",
"required": [ "large", "small", "specialtyLarge", "specialtySmall" ],
"properties":{
"large": {
"type":"string",
"description": "Large version of portrait for use in hero screen",
"description" : "images",
"required" : [ "large", "small", "specialtyLarge", "specialtySmall" ],
"properties" : {
"large" : {
"type" : "string",
"description" : "Large version of portrait for use in hero screen",
"format" : "imageFile"
},
"small": {
"type":"string",
"description": "Small version of portrait for use on adventure map",
"small" : {
"type" : "string",
"description" : "Small version of portrait for use on adventure map",
"format" : "imageFile"
},
"specialtyLarge": {
"type":"string",
"description": "Large image of hero specilty, used in hero screen",
"specialtyLarge" : {
"type" : "string",
"description" : "Large image of hero specilty, used in hero screen",
"format" : "imageFile"
},
"specialtySmall": {
"type":"string",
"description": "Small image of hero specialty for use in exchange screen",
"specialtySmall" : {
"type" : "string",
"description" : "Small image of hero specialty for use in exchange screen",
"format" : "imageFile"
}
}
},
"skills": {
"type":"array",
"description": "List of skills initially known by hero",
"maxItems" : 8,
"items": {
"type":"object",
"army" : {
"type" : "array",
"description" : "Initial hero army when recruited in tavern",
"minItems" : 1,
"maxItems" : 3,
"items" : {
"type" : "object",
"additionalProperties" : false,
"required" : [ "level", "skill" ],
"properties":{
"level": {
"type":"string",
"description": "level",
"enum" : [ "basic", "advanced", "expert" ]
"required" : [ "creature", "min", "max" ],
"properties" : {
"creature" : {
"type" : "string",
"description" : "creature"
},
"skill": {
"type":"string",
"description": "skill"
"max" : {
"type" : "number",
"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",
"description": "Description of hero specialty using bonus system",
"description" : "Description of hero specialty using bonus system",
"additionalProperties" : false,
"properties" : {
"base" : {
@@ -133,46 +127,50 @@
}
}
},
"spellbook": {
"type":"array",
"description": "List of starting spells, if available. This entry (even empty) will also grant spellbook",
"items": { "type":"string" }
"spellbook" : {
"type" : "array",
"description" : "List of starting spells, if available. This entry (even empty) will also grant spellbook",
"items" : { "type" : "string" }
},
"texts": {
"type":"object",
"texts" : {
"type" : "object",
"additionalProperties" : false,
"description": "All translatable texts related to hero",
"required" : [ "biography", "name", "specialty" ],
"properties":{
"biography": {
"type":"string",
"description": "Hero biography"
"description" : "All translatable texts related to hero",
"required" : [ "name", "biography", "specialty" ],
"properties" : {
"name" : {
"type" : "string",
"description" : "Hero name"
},
"name": {
"type":"string",
"description": "Hero name"
"biography" : {
"type" : "string",
"description" : "Hero biography"
},
"specialty": {
"type":"object",
"specialty" : {
"type" : "object",
"additionalProperties" : false,
"description": "Hero specialty information",
"required" : [ "description", "name", "tooltip" ],
"properties":{
"description": {
"type":"string",
"description": "Description visible when hovering over specialty icon"
"description" : "Hero specialty information",
"required" : [ "name", "description", "tooltip" ],
"properties" : {
"name" : {
"type" : "string",
"description" : "Name of the specialty"
},
"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."
"tooltip" : {
"type" : "string",
"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",
"$schema": "http://json-schema.org/draft-04/schema",
"type" : "object",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI hero class format",
"description" : "Format used to define classes of heroes in VCMI",
"required" : [
"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":{
"animation": {
"type":"object",
"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,
"description": "Files related to hero animation",
"required": [ "battle" ],
"properties":{
"battle": {
"type":"object",
"description" : "Files related to hero animation",
"required" : [ "battle" ],
"properties" : {
"battle" : {
"type" : "object",
"additionalProperties" : false,
"description": "Hero animations for battle",
"required": [ "female", "male" ],
"properties":{
"female": {
"type":"string",
"description": "Female version",
"description" : "Hero animations for battle",
"required" : [ "female", "male" ],
"properties" : {
"female" : {
"type" : "string",
"description" : "Female version",
"format" : "defFile"
},
"male": {
"type":"string",
"description": "Male version",
"male" : {
"type" : "string",
"description" : "Male version",
"format" : "defFile"
}
}
@@ -45,53 +61,32 @@
}
}
},
"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"
"primarySkills" : {
"type" : "object",
"description" : "Initial primary skills of heroes",
"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"
"secondarySkills" : {
"type" : "object",
"description" : "Chance to get specific secondary skill on level-up. All missing skills are considered to be banned",
"additionalProperties" : {
"type" : "number"
}
},
"name": {
"type":"string",
"description": "Translatable name of hero class"
},
"primarySkills": {
"type":"object",
"description": "Initial primary skills of heroes",
"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"
}
},
"secondarySkills": {
"type":"object",
"description": "Chance to get specific secondary skill on level-up. All missing skills are considered to be banned",
"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" : {
@@ -99,14 +94,17 @@
"description" : "Default chance for hero to appear in tavern, used only when value vas not set in tavern field",
"minimum" : 0
},
"tavern": {
"type":"object",
"description": "Chance for this hero to appear in tavern of this factions. Reversed version of field \"tavern\" from town format",
"additionalProperties":{
"type":"number",
"tavern" : {
"type" : "object",
"description" : "Chance for this hero to appear in tavern of this factions. Reversed version of field \"tavern\" from town format",
"additionalProperties" : {
"type" : "number",
"minimum" : 0
}
},
"index" : {
"type" : "number",
"description" : "Private field to break things, do not use."
}
}
}

View File

@@ -1,44 +1,37 @@
{
"type":"object",
"$schema": "http://json-schema.org/draft-04/schema",
"type" : "object",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI map header format",
"description" : "Part of map in json format, defines core settings of the map",
"required": [ "defeatIconIndex", "defeatString", "victoryIconIndex", "victoryString" ],
"required" : [ "victoryIconIndex", "victoryString", "defeatIconIndex", "defeatString" ],
"additionalProperties" : false,
"properties":{
"defeatIconIndex": {
"type":"number"
"properties" : {
"victoryIconIndex" : {
"type" : "number"
},
"defeatString": {
"type":"string"
"victoryString" : {
"type" : "string"
},
"victoryIconIndex": {
"type":"number"
"defeatIconIndex" : {
"type" : "number"
},
"victoryString": {
"type":"string"
"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

@@ -1,108 +1,94 @@
{
"type":"object",
"$schema": "http://json-schema.org/draft-04/schema",
"type" : "object",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI mod file format",
"description" : "Format used to define main mod file (mod.json) in VCMI",
"required" : [ "name", "description", "version", "author", "contact", "modType" ],
"required" : [ "name", "description", "modType", "version", "author", "contact" ],
"definitions" : {
"localizable" : {
"type":"object",
"type" : "object",
"additionalProperties" : false,
"required" : [ "name", "description" ],
"properties":{
"name": {
"type":"string",
"description": "Short name of your mod. No more than 2-3 words"
"properties" : {
"name" : {
"type" : "string",
"description" : "Short name of your mod. No more than 2-3 words"
},
"description": {
"type":"string",
"description": "More lengthy description of mod. No hard limit"
"description" : {
"type" : "string",
"description" : "More lengthy description of mod. No hard limit"
},
"author" : {
"type":"string",
"description": "Author of the mod. Can be nickname, real name or name of team"
},
"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" }
"type" : "string",
"description" : "Author of the mod. Can be nickname, real name or name of team"
},
"changelog" : {
"type":"object",
"description": "List of changes/new features in each version",
"type" : "object",
"description" : "List of changes/new features in each version",
"additionalProperties" : {
"type" : "array",
"items" : { "type":"string" }
"items" : { "type" : "string" }
}
},
"skipValidation" : {
"type" : "boolean",
"description" : "If set to true, vcmi will skip validation of current translation json files"
},
"translations" : {
"type" : "array",
"description" : "List of files with translations for this language",
"items" : { "type" : "string", "format" : "textFile" }
}
}
}
},
"additionalProperties" : false,
"properties":{
"name": {
"type":"string",
"description": "Short name of your mod. No more than 2-3 words"
"properties" : {
"name" : {
"type" : "string",
"description" : "Short name of your mod. No more than 2-3 words"
},
"description": {
"type":"string",
"description": "More lengthy description of mod. No hard limit"
"description" : {
"type" : "string",
"description" : "More lengthy description of mod. No hard limit"
},
"modType" : {
"type":"string",
"type" : "string",
"enum" : [ "Translation", "Town", "Test", "Templates", "Spells", "Music", "Sounds", "Skills", "Other", "Objects", "Mechanics", "Interface", "Heroes", "Graphical", "Expansion", "Creatures", "Artifacts", "AI" ],
"description": "Type of mod, e.g. Town, Artifacts, Graphical."
"description" : "Type of mod, e.g. Town, Artifacts, Graphical."
},
"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"
"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"
"type" : "string",
"description" : "Home page of mod or link to forum thread"
},
"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" ],
"licenseName" : {
"type" : "string",
"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": {
"type":"array",
"description": "List of mods that can't be enabled in the same time as this one",
"items": { "type":"string" }
"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",
"items" : { "type" : "string" }
}
},
"compatibility" : {
"type":"object",
"description": "Supported versions of vcmi engine",
"type" : "object",
"description" : "Supported versions of vcmi engine",
"additionalProperties" : false,
"properties" : {
"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" : {
"type":"boolean",
"description": "If set to true, mod will not be enabled automatically on install"
"type" : "boolean",
"description" : "If set to true, mod will not be enabled automatically on install"
},
"settings" : {
"type" : "object",
"description" : "List of changed game settings by mod",
"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"
@@ -146,137 +179,90 @@
"ukrainian" : {
"$ref" : "#/definitions/localizable"
},
"translations":{
"type":"array",
"description": "List of files with translations for this language",
"items": { "type":"string", "format" : "textFile" }
"translations" : {
"type" : "array",
"description" : "List of files with translations for this language",
"items" : { "type" : "string", "format" : "textFile" }
},
"artifacts": {
"type":"array",
"description": "List of configuration files for artifacts",
"items": { "type":"string", "format" : "textFile" }
"factions" : {
"type" : "array",
"description" : "List of configuration files for towns/factions",
"items" : { "type" : "string", "format" : "textFile" }
},
"bonuses":{
"type":"array",
"description": "List of configuration files for bonuses",
"items": { "type":"string", "format" : "textFile" }
"heroClasses" : {
"type" : "array",
"description" : "List of configuration files for hero classes",
"items" : { "type" : "string", "format" : "textFile" }
},
"creatures": {
"type":"array",
"description": "List of configuration files for creatures",
"items": { "type":"string", "format" : "textFile" }
"heroes" : {
"type" : "array",
"description" : "List of configuration files for heroes",
"items" : { "type" : "string", "format" : "textFile" }
},
"factions": {
"type":"array",
"description": "List of configuration files for towns/factions",
"items": { "type":"string", "format" : "textFile" }
"skills" : {
"type" : "array",
"description" : "List of configuration files for skills",
"items" : { "type" : "string", "format" : "textFile" }
},
"heroClasses": {
"type":"array",
"description": "List of configuration files for hero classes",
"items": { "type":"string", "format" : "textFile" }
"creatures" : {
"type" : "array",
"description" : "List of configuration files for creatures",
"items" : { "type" : "string", "format" : "textFile" }
},
"heroes": {
"type":"array",
"description": "List of configuration files for heroes",
"items": { "type":"string", "format" : "textFile" }
"artifacts" : {
"type" : "array",
"description" : "List of configuration files for artifacts",
"items" : { "type" : "string", "format" : "textFile" }
},
"objects": {
"type":"array",
"description": "List of configuration files for objects",
"items": { "type":"string", "format" : "textFile" }
"spells" : {
"type" : "array",
"description" : "List of configuration files for spells",
"items" : { "type" : "string", "format" : "textFile" }
},
"scripts": {
"type":"array",
"description": "List of configuration files for scripts",
"items": { "type":"string", "format" : "textFile" }
"objects" : {
"type" : "array",
"description" : "List of configuration files for objects",
"items" : { "type" : "string", "format" : "textFile" }
},
"spells": {
"type":"array",
"description": "List of configuration files for spells",
"items": { "type":"string", "format" : "textFile" }
"bonuses" : {
"type" : "array",
"description" : "List of configuration files for bonuses",
"items" : { "type" : "string", "format" : "textFile" }
},
"skills": {
"type":"array",
"description": "List of configuration files for skills",
"items": { "type":"string", "format" : "textFile" }
"terrains" : {
"type" : "array",
"description" : "List of configuration files for terrains",
"items" : { "type" : "string", "format" : "textFile" }
},
"templates":{
"type":"array",
"description": "List of configuration files for RMG templates",
"items": { "type":"string", "format" : "textFile" }
"roads" : {
"type" : "array",
"description" : "List of configuration files for roads",
"items" : { "type" : "string", "format" : "textFile" }
},
"battlefields":{
"type":"array",
"description": "List of configuration files for battlefields",
"items": { "type":"string", "format" : "textFile" }
"rivers" : {
"type" : "array",
"description" : "List of configuration files for rivers",
"items" : { "type" : "string", "format" : "textFile" }
},
"obstacles":{
"type":"array",
"description": "List of configuration files for obstacles",
"items": { "type":"string", "format" : "textFile" }
"battlefields" : {
"type" : "array",
"description" : "List of configuration files for battlefields",
"items" : { "type" : "string", "format" : "textFile" }
},
"terrains":{
"type":"array",
"description": "List of configuration files for terrains",
"items": { "type":"string", "format" : "textFile" }
"obstacles" : {
"type" : "array",
"description" : "List of configuration files for obstacles",
"items" : { "type" : "string", "format" : "textFile" }
},
"roads":{
"type":"array",
"description": "List of configuration files for roads",
"items": { "type":"string", "format" : "textFile" }
"templates" : {
"type" : "array",
"description" : "List of configuration files for RMG templates",
"items" : { "type" : "string", "format" : "textFile" }
},
"rivers":{
"type":"array",
"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" : {
"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"
}
}
}
}
"scripts" : {
"type" : "array",
"description" : "List of configuration files for scripts",
"items" : { "type" : "string", "format" : "textFile" }
}
}
}

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,37 +1,36 @@
{
"type":"object",
"$schema": "http://json-schema.org/draft-04/schema",
"type" : "object",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI river format",
"description" : "Format used to define new rivers in VCMI",
"required" : [ "text", "shortIdentifier", "tilesFilename", "delta" ],
"required" : [ "shortIdentifier", "text", "tilesFilename", "delta" ],
"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" :
{
"type": "number",
"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"
"type" : "number",
"description" : "Internal, do not use"
}
}
}

View File

@@ -1,37 +1,36 @@
{
"type":"object",
"$schema": "http://json-schema.org/draft-04/schema",
"type" : "object",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI road format",
"description" : "Format used to define new roads in VCMI",
"required" : [ "text", "shortIdentifier", "tilesFilename", "moveCost" ],
"required" : [ "shortIdentifier", "text", "tilesFilename", "moveCost" ],
"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" :
{
"type": "number",
"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"
"type" : "number",
"description" : "Internal, do not use"
}
}
}

View File

@@ -1,22 +1,18 @@
{
"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",
"description": "Full VFS path to script source (extension required)"
"type" : "string",
"description" : "Full VFS path to script source (extension required)"
},
"implements" :{
"type": "string",
"enum": ["ANYTHING", "BATTLE_EFFECT"],
"description": ""
"implements" : {
"type" : "string",
"enum" : ["ANYTHING", "BATTLE_EFFECT"],
"description" : ""
}
}
}

View File

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

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,27 +42,24 @@
}
}
}
},
"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"
"type" : "string",
"description" : "localizable skill name"
},
"obligatoryMajor":{
"type": "boolean",
"description": "This skill is major obligatory (like H3 Wisdom)"
"index" : {
"type" : "number",
"description" : "numeric id of skill, required for existing skills"
},
"obligatoryMinor":{
"type": "boolean",
"description": "This skill is minor obligatory (like H3 Magic school)"
"obligatoryMajor" : {
"type" : "boolean",
"description" : "This skill is major obligatory (like H3 Wisdom)"
},
"obligatoryMinor" : {
"type" : "boolean",
"description" : "This skill is minor obligatory (like H3 Magic school)"
},
"gainChance" : {
"description" : "Chance for the skill to be offered on level-up (heroClass may override)",

View File

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

View File

@@ -1,89 +1,84 @@
{
"type":"object",
"$schema": "",
"type" : "object",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI random map template format",
"description" : "Format used to define random map templates in VCMI",
"definitions" :
{
"zone":{
"type": "object",
"zone" : {
"type" : "object",
"required" : ["type", "monsters", "size"],
"properties":{
"type":{"$ref" : "#/definitions/type"},
"size":{"$ref" : "#/definitions/size"},
"playerTowns":{"$ref" : "#/definitions/playerTowns"},
"neuralTowns":{"$ref" : "#/definitions/neuralTowns"},
"townsAreSameType":{"$ref" : "#/definitions/townsAreSameType"},
"monsters":{"$ref" : "#/definitions/monsters"},
"mines":{"$ref" : "#/definitions/mines"},
"treasure":{
"type":"array",
"items":{
"type": "object",
"properties":{
"min": {"type":"number", "minimum" : 0},
"max": {"type":"number", "minimum" : 0},
"density": {"type":"number", "minimum" : 1}
"properties" : {
"type" : {"$ref" : "#/definitions/type"},
"size" : {"$ref" : "#/definitions/size"},
"playerTowns" : {"$ref" : "#/definitions/playerTowns"},
"neuralTowns" : {"$ref" : "#/definitions/neuralTowns"},
"townsAreSameType" : {"$ref" : "#/definitions/townsAreSameType"},
"monsters" : {"$ref" : "#/definitions/monsters"},
"mines" : {"$ref" : "#/definitions/mines"},
"treasure" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"min" : {"type" : "number", "minimum" : 0},
"max" : {"type" : "number", "minimum" : 0},
"density" : {"type" : "number", "minimum" : 1}
},
"additionalProperties" : false
}
}
}
},
"type" :{
"enum": ["playerStart", "cpuStart", "treasure", "junction"],
"type" : {
"type" : "string",
"additionalProperties" : false,
"type":"string"
"enum" : ["playerStart", "cpuStart", "treasure", "junction"]
},
"size":{
"type": "number",
"minimum": 1,
"additionalProperties" : false,
"size" : {
"type" : "number",
"minimum" : 1,
"additionalProperties" : false
},
"connection":
"connection" :
{
"required": ["a", "b", "guard"],
"properties":{
"a":{
"required" : ["a", "b", "guard"],
"properties" : {
"a" : {
"type" : "string"
},
"b":{
"b" : {
"type" : "string"
},
"guard":
"guard" :
{
"type": "number",
"type" : "number",
"minimum" : 0
}
}
},
"waterContent":
"waterContent" :
{
"enum": ["none", "normal", "islands"],
"enum" : ["none", "normal", "islands"],
"additionalProperties" : false,
"type": "string"
"type" : "string"
}
},
"properties":
"properties" :
{
"zones":{
"type": "object",
"additionalProperties":{"$ref" : "#/definitions/zone" }
},
"connections":{
"type": "array",
"items":{"$ref" : "#/definitions/connection"}
},
"allowedWaterContent": {
"type": "array",
"items": {"$ref" : "#/definitions/waterContent"}
},
"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",
"$schema": "http://json-schema.org/draft-04/schema",
"type" : "object",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI terrain format",
"description" : "Format used to define new terrains in VCMI",
"required" : [ "text", "moveCost", "minimapUnblocked", "minimapBlocked", "music", "tiles", "type", "horseSound", "horseSoundPenalty", "shortIdentifier", "battleFields" ],
"additionalProperties" : false,
"properties":{
"index" :
"properties" : {
"text" :
{
"type": "number",
"description": "Internal, do not use"
"type" : "string",
"description" : "Human-readable name of this terrain"
},
"text":
"shortIdentifier" :
{
"type": "string",
"description": "Human-readable name of this terrain"
"type" : "string",
"description" : "Two-letters unique indentifier for this terrain. Used for map format"
},
"moveCost":
"type" :
{
"type": "number",
"description": "How many movement points needed to move hero"
},
"minimapUnblocked":
{
"type": "array",
"description": "Color of terrain on minimap without unpassable objects",
"minItems": 3,
"maxItems": 3,
"items":
"type" : "array",
"description" : "Type of this terrain. Can be land, water, subterranean or rock",
"items" :
{
"type": "number"
"enum" : ["LAND", "WATER", "SUB", "ROCK", "SURFACE"],
"type" : "string"
}
},
"minimapBlocked":
"moveCost" :
{
"type": "array",
"description": "Color of terrain on minimap with unpassable objects",
"minItems": 3,
"maxItems": 3,
"items":
"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": "number"
"type" : "string"
}
},
"music":
"minimapUnblocked" :
{
"type": "string",
"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":
"type" : "array",
"description" : "Color of terrain on minimap without unpassable objects",
"minItems" : 3,
"maxItems" : 3,
"items" :
{
"enum": ["LAND", "WATER", "SUB", "ROCK", "SURFACE"],
"type": "string"
"type" : "number"
}
},
"rockTerrain":
"minimapBlocked" :
{
"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" : "array",
"description" : "Color of terrain on minimap with unpassable objects",
"minItems" : 3,
"maxItems" : 3,
"items" :
{
"type": "string"
"type" : "number"
}
},
"sounds":
"music" :
{
"type": "object",
"description": "list of sounds for this terrain",
"type" : "string",
"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,
"properties":
"properties" :
{
"ambient" :
{
"type": "array",
"description": "list of ambient sounds for this terrain",
"items":
"type" : "array",
"description" : "list of ambient sounds for this terrain",
"items" :
{
"type": "string",
"format": "soundFile"
"type" : "string",
"format" : "soundFile"
}
}
}
},
"prohibitTransitions":
"horseSound" :
{
"type": "array",
"description": "array or terrain names, which is prohibited to make transition from/to",
"items":
"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",
"description" : "array or terrain names, which is prohibited to make transition from/to",
"items" :
{
"type": "string"
"type" : "string"
}
},
"transitionRequired":
"transitionRequired" :
{
"type": "boolean",
"description": "If sand/dirt transition required from/to other terrains"
"type" : "boolean",
"description" : "If sand/dirt transition required from/to other terrains"
},
"terrainViewPatterns":
"terrainViewPatterns" :
{
"type": "string",
"description": "Can be normal, dirt, water, rock"
"type" : "string",
"description" : "Can be normal, dirt, water, rock"
},
"index" :
{
"type" : "number",
"description" : "Internal, do not use"
}
}
}

View File

@@ -1,10 +1,9 @@
{
"type":"object",
"type" : "object",
"additionalProperties" : false,
"$schema": "http://json-schema.org/draft-04/schema",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI town building format",
"description" : "Format used to define town buildings in VCMI",
"definitions" :
{
"buildingRequirement" : {
@@ -22,34 +21,11 @@
}
}
},
"properties":{
"id": {
"type":"number",
"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,35 +34,57 @@
"description" : "Full decsription of this building",
"type" : "string"
},
"cost": {
"type":"object",
"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":{
"wood": { "type":"number"},
"mercury": { "type":"number"},
"ore": { "type":"number"},
"sulfur": { "type":"number"},
"crystal": { "type":"number"},
"gems": { "type":"number"},
"gold": { "type":"number"}
"description" : "Cost to build this building",
"properties" : {
"gold" : { "type" : "number"},
"wood" : { "type" : "number"},
"ore" : { "type" : "number"},
"mercury" : { "type" : "number"},
"sulfur" : { "type" : "number"},
"crystal" : { "type" : "number"},
"gems" : { "type" : "number"}
}
},
"produce": {
"type":"object",
"produce" : {
"type" : "object",
"additionalProperties" : false,
"description": "Resources this building produce each day",
"properties":{
"wood": { "type":"number"},
"mercury": { "type":"number"},
"ore": { "type":"number"},
"sulfur": { "type":"number"},
"crystal": { "type":"number"},
"gems": { "type":"number"},
"gold": { "type":"number"}
"description" : "Resources this building produce each day",
"properties" : {
"gold" : { "type" : "number"},
"wood" : { "type" : "number"},
"ore" : { "type" : "number"},
"mercury" : { "type" : "number"},
"sulfur" : { "type" : "number"},
"crystal" : { "type" : "number"},
"gems" : { "type" : "number"}
}
},
"overrides": {
"overrides" : {
"type" : "array",
"items" : [
{
@@ -95,15 +93,15 @@
}
]
},
"bonuses": {
"type":"array",
"description": "Bonuses, provided by this special building on build using bonus system",
"items": { "$ref" : "bonus.json" }
"bonuses" : {
"type" : "array",
"description" : "Bonuses, provided by this special building on build using bonus system",
"items" : { "$ref" : "bonus.json" }
},
"onVisitBonuses": {
"type":"array",
"description": "Bonuses, provided by this special building on hero visit and applied to the visiting hero",
"items": { "$ref" : "bonus.json" }
"onVisitBonuses" : {
"type" : "array",
"description" : "Bonuses, provided by this special building on hero visit and applied to the visiting hero",
"items" : { "$ref" : "bonus.json" }
}
}
}

View File

@@ -1,147 +1,144 @@
{
"type":"object",
"type" : "object",
"additionalProperties" : false,
"$schema": "http://json-schema.org/draft-04/schema",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI siege screen format",
"description" : "Format used to define town siege screen in VCMI",
"required" : [
"gate", "imagePrefix", "moat", "shooter",
"towerIconLarge", "towerIconSmall",
"static", "towers", "walls"
],
"shooter", "towerIconLarge", "towerIconSmall", "imagePrefix",
"static", "towers", "walls", "gate", "moat"
],
"definitions" :
{
"point" : {
"type" : "object",
"additionalProperties" : false,
"required" : [ "x", "y" ],
"properties":{
"x": { "type":"number" },
"y": { "type":"number" }
"properties" : {
"x" : { "type" : "number" },
"y" : { "type" : "number" }
}
},
"tower" : {
"type" : "object",
"additionalProperties" : false,
"required" : [ "battlement", "creature", "tower" ],
"properties":{
"battlement": {
"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"
},
"creature": {
"creature" : {
"description" : "Location of shooter in tower",
"$ref" : "#/definitions/point"
},
"tower": {
"description" : "Location of main segment of tower",
"$ref" : "#/definitions/point"
}
}
}
},
"properties":{
"gate": {
"type":"object",
"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,
"description" : "Town gates",
"properties":{
"arch": {
"properties" : {
"arch" : {
"description" : "Static, top part of gates",
"$ref" : "#/definitions/point"
},
"gate": {
"gate" : {
"description" : "Main section of gates",
"$ref" : "#/definitions/point"
}
}
},
"imagePrefix": {
"type":"string",
"description" : "Prefix to all images related to siege screen"
},
"moat": {
"type":"object",
"moat" : {
"type" : "object",
"additionalProperties" : false,
"description" : "Castle moat description",
"properties":{
"bank": {
"properties" : {
"bank" : {
"description" : "Small section with bank of the moat",
"$ref" : "#/definitions/point"
},
"moat": {
"moat" : {
"description" : "Main section of the moat",
"$ref" : "#/definitions/point"
}
}
},
"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",
"$schema": "http://json-schema.org/draft-04/schema",
"type" : "object",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI town structures format",
"description" : "Format used to define structures visible on town screen in VCMI",
"required": [ "animation", "x", "y"],
"required" : [ "animation", "x", "y"],
"additionalProperties" : false,
"properties":{
"animation": {
"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": {
"properties" : {
"builds" : {
"type" : "string",
"description" : ""
},
"hidden": {
"type":"boolean",
"hidden" : {
"type" : "boolean",
"description" : "If upgrade, this building will replace parent animation but will not alter its behaviour"
},
"x": {
"type":"number",
"animation" : {
"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"
},
"y": {
"type":"number",
"y" : {
"type" : "number",
"description" : "Position on screen"
},
"z": {
"type":"number",
"z" : {
"type" : "number",
"description" : "Position on screen. Buildings with higher value will be drawn on top of other buildings"
}
}