2013-04-02 20:06:43 +03:00
|
|
|
{
|
|
|
|
"type":"object",
|
|
|
|
"$schema": "http://json-schema.org/draft-04/schema",
|
|
|
|
"title" : "VCMI artifact format",
|
|
|
|
"description" : "Format used to define new artifacts in VCMI",
|
2013-04-22 22:51:22 +03:00
|
|
|
"required" : [ "class", "text", "type", "value" ],
|
2013-04-11 22:24:14 +03:00
|
|
|
|
|
|
|
"definitions" : {
|
|
|
|
"growingBonusList" : {
|
|
|
|
"type" : "array",
|
|
|
|
"items" : {
|
|
|
|
"type" : "object",
|
|
|
|
"additionalProperties" : false,
|
|
|
|
"properties" : {
|
|
|
|
"level" : {
|
|
|
|
"type" : "number"
|
|
|
|
},
|
|
|
|
"bonus" : { "$ref" : "vcmi:bonus" }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
"additionalProperties" : false,
|
2013-04-02 20:06:43 +03:00
|
|
|
"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"
|
|
|
|
},
|
2013-04-21 15:49:26 +03:00
|
|
|
"index" : {
|
2013-04-11 22:24:14 +03:00
|
|
|
"type" : "number",
|
|
|
|
"description" : "Private field to break things, do not use."
|
|
|
|
},
|
2013-04-02 20:06:43 +03:00
|
|
|
"components": {
|
|
|
|
"type":"array",
|
|
|
|
"description": "Optional, list of components for combinational artifacts",
|
|
|
|
"items": { "type":"string" }
|
|
|
|
},
|
|
|
|
"graphics": {
|
|
|
|
"type":"object",
|
2013-04-11 22:24:14 +03:00
|
|
|
"additionalProperties" : false,
|
2013-04-02 20:06:43 +03:00
|
|
|
"description": "Graphical files associated with the artifact",
|
2013-04-22 22:51:22 +03:00
|
|
|
"required" : [ "image", "map" ],
|
2013-04-02 20:06:43 +03:00
|
|
|
"properties":{
|
|
|
|
"image": {
|
|
|
|
"type":"string",
|
2013-10-26 22:33:34 +03:00
|
|
|
"description": "Base image for this artifact, used for example in hero screen",
|
|
|
|
"format" : "imageFile"
|
2013-04-02 20:06:43 +03:00
|
|
|
},
|
|
|
|
"large": {
|
|
|
|
"type":"string",
|
2013-10-26 22:33:34 +03:00
|
|
|
"description": "Large image, used for drag-and-drop and popup messages",
|
|
|
|
"format" : "imageFile"
|
2013-04-02 20:06:43 +03:00
|
|
|
},
|
|
|
|
"map": {
|
|
|
|
"type":"string",
|
2013-10-26 22:33:34 +03:00
|
|
|
"description": ".def file for adventure map",
|
|
|
|
"format" : "defFile"
|
2013-04-02 20:06:43 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2013-04-11 22:24:14 +03:00
|
|
|
"growing" : {
|
|
|
|
"type" : "object",
|
|
|
|
"additionalProperties" : false,
|
|
|
|
"properties" : {
|
|
|
|
"bonusesPerLevel" : { "$ref" : "#/definitions/growingBonusList"},
|
|
|
|
"thresholdBonuses" : { "$ref" : "#/definitions/growingBonusList"}
|
|
|
|
}
|
|
|
|
},
|
2013-04-02 20:06:43 +03:00
|
|
|
"slot": {
|
2013-04-11 22:24:14 +03:00
|
|
|
"description": "Slot to which this artifact can be put, if applicable",
|
|
|
|
"oneOf" : [
|
|
|
|
{
|
|
|
|
"type":"string"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type" : "array",
|
|
|
|
"minItems" : 1,
|
|
|
|
"additionalItems" : { "type" : "string" }
|
|
|
|
}
|
|
|
|
]
|
2013-04-02 20:06:43 +03:00
|
|
|
},
|
|
|
|
"text": {
|
|
|
|
"type":"object",
|
2013-04-11 22:24:14 +03:00
|
|
|
"additionalProperties" : false,
|
2013-04-02 20:06:43 +03:00
|
|
|
"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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|