1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-28 23:06:24 +02:00
vcmi/config/schemas/artifact.json
Ivan Savenko 3285f1910b - finally, solution for imageIndex fields. All image lists will be generated in runtime
- iconIndex fields from json are no longer used
- simple check for missing icons on startup
2013-04-22 19:51:22 +00:00

120 lines
2.9 KiB
JSON

{
"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" ],
"definitions" : {
"growingBonusList" : {
"type" : "array",
"items" : {
"type" : "object",
"additionalProperties" : false,
"properties" : {
"level" : {
"type" : "number"
},
"bonus" : { "$ref" : "vcmi:bonus" }
}
}
}
},
"additionalProperties" : false,
"properties":{
"bonuses": {
"type":"array",
"description": "Bonuses provided by this artifact using bonus system",
"items": { "$ref" : "vcmi:bonus" }
},
"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"
},
"large": {
"type":"string",
"description": "Large image, used for drag-and-drop and popup messages"
},
"map": {
"type":"string",
"description": ".def file for adventure map"
}
}
},
"growing" : {
"type" : "object",
"additionalProperties" : false,
"properties" : {
"bonusesPerLevel" : { "$ref" : "#/definitions/growingBonusList"},
"thresholdBonuses" : { "$ref" : "#/definitions/growingBonusList"}
}
},
"slot": {
"description": "Slot to which this artifact can be put, if applicable",
"oneOf" : [
{
"type":"string"
},
{
"type" : "array",
"minItems" : 1,
"additionalItems" : { "type" : "string" }
}
]
},
"text": {
"type":"object",
"additionalProperties" : false,
"description": "Texts associated with artifact",
"required" : [ "description", "event", "name" ],
"properties":{
"description": {
"type":"string",
"description": "Long description of this artifact"
},
"event": {
"type":"string",
"description": "Text that visible on picking this artifact on map"
},
"name": {
"type":"string",
"description": "Name of the artifact"
}
}
},
"type": {
"type":"array",
"description": "Type of this artifact - creature, hero or commander",
"items": {
"type":"string",
"enum" : [ "HERO", "CREATURE", "COMMANDER" ]
}
},
"value": {
"type":"number",
"description": "Cost of this artifact, in gold"
}
}
}