1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-06 00:24:11 +02:00
vcmi/config/schemas/artifact.json
krs 2e6cae80a9 Schemas rearranged
Artifact Schema rearranged


Battlefield schema rearanged


Bonus schema rearranged


Faction Schema rearanged


Hero Schema rearranged


HeroClass schema rearranged


MapHeader schema updated, something fishy in events


Mod schema updated. Settings not complete


Object schema rearranged


Object schema rearranged


object type schema rearranged


obstacles schema rearranged


Rivers schema updated


roads schema updated


script schema updated


skill schema updated


spell schema updated


template schema update


terrain schemas updated


town buildings schema update


town siege schema updated


town structure schema updated
2023-05-19 21:04:47 +03:00

126 lines
3.2 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" : [ "type", "class", "value", "text" ],
"definitions" : {
"growingBonusList" : {
"type" : "array",
"items" : {
"type" : "object",
"additionalProperties" : false,
"properties" : {
"level" : {
"type" : "number"
},
"bonus" : { "$ref" : "bonus.json" }
}
}
}
},
"additionalProperties" : false,
"properties" : {
"warMachine" :
{
"type" : "string",
"description" : "Creature id to use on battle field. If set, this artifact is war machine"
},
"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,
"properties" : {
"bonusesPerLevel" : { "$ref" : "#/definitions/growingBonusList"},
"thresholdBonuses" : { "$ref" : "#/definitions/growingBonusList"}
}
},
"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"
}
}
},
"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"
}
}
},
"index" : {
"type" : "number",
"description" : "Private field to break things, do not use."
}
}
}