2013-04-02 20:06:43 +03:00
|
|
|
{
|
|
|
|
"type":"object",
|
2013-04-11 22:24:14 +03:00
|
|
|
"additionalProperties" : false,
|
2013-04-02 20:06:43 +03:00
|
|
|
"$schema": "http://json-schema.org/draft-04/schema",
|
|
|
|
"title" : "VCMI town building format",
|
|
|
|
"description" : "Format used to define town buildings in VCMI",
|
2013-12-04 13:36:39 +03:00
|
|
|
|
|
|
|
"definitions" :
|
|
|
|
{
|
|
|
|
"buildingRequirement" : {
|
|
|
|
"type" : "array",
|
|
|
|
"items" : [
|
|
|
|
{
|
|
|
|
"description" : "First item that indicates type of following expression",
|
|
|
|
"type" : "string"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"additionalItems" :
|
|
|
|
{
|
|
|
|
"description" : "Following items that contain expression elements",
|
|
|
|
"$ref" : "#/definitions/buidingRequirement"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2013-04-02 20:06:43 +03:00
|
|
|
"properties":{
|
|
|
|
"id": {
|
|
|
|
"type":"number",
|
|
|
|
"description" : "Numeric identifier of this building"
|
|
|
|
},
|
2020-10-02 23:55:46 +02:00
|
|
|
"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"
|
|
|
|
},
|
2013-04-02 20:06:43 +03:00
|
|
|
"mode": {
|
|
|
|
"type":"string",
|
|
|
|
"enum" : [ "normal", "auto", "special", "grail" ],
|
|
|
|
"description" : "Mode in which this building will be built"
|
|
|
|
},
|
|
|
|
"requires": {
|
2013-12-04 13:36:39 +03:00
|
|
|
"$ref" : "#/definitions/buildingRequirement",
|
|
|
|
"description" : "List of town buildings that must be built before this one"
|
2013-04-02 20:06:43 +03:00
|
|
|
},
|
|
|
|
"upgrades": {
|
|
|
|
"description" : "If this building is upgrade, identifier of base building",
|
2013-12-04 13:36:39 +03:00
|
|
|
"type":"string"
|
2013-04-02 20:06:43 +03:00
|
|
|
},
|
|
|
|
"name" : {
|
|
|
|
"description" : "Name of this building",
|
|
|
|
"type" : "string"
|
|
|
|
},
|
|
|
|
"description" : {
|
|
|
|
"description" : "Full decsription of this building",
|
|
|
|
"type" : "string"
|
|
|
|
},
|
|
|
|
"cost": {
|
|
|
|
"type":"object",
|
2013-04-11 22:24:14 +03:00
|
|
|
"additionalProperties" : false,
|
2013-04-02 20:06:43 +03:00
|
|
|
"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"}
|
|
|
|
}
|
2014-04-26 17:23:35 +03:00
|
|
|
},
|
|
|
|
"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"}
|
|
|
|
}
|
2021-01-14 00:02:13 +02:00
|
|
|
},
|
|
|
|
"overrides": {
|
|
|
|
"type" : "array",
|
|
|
|
"items" : [
|
|
|
|
{
|
|
|
|
"description" : "The buildings which bonuses should be overridden with bonuses of the current building",
|
|
|
|
"type" : "string"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"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" }
|
2013-04-02 20:06:43 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|