2013-04-02 17:06:43 +00:00
|
|
|
{
|
2023-05-19 21:14:01 +03:00
|
|
|
"type" : "object",
|
2013-04-11 19:24:14 +00:00
|
|
|
"additionalProperties" : false,
|
2023-05-19 21:14:01 +03:00
|
|
|
"$schema" : "http://json-schema.org/draft-04/schema",
|
2013-04-02 17:06:43 +00:00
|
|
|
"title" : "VCMI town building format",
|
|
|
|
"description" : "Format used to define town buildings in VCMI",
|
2013-12-04 10:36:39 +00: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",
|
2023-09-18 00:30:04 +03:00
|
|
|
"$ref" : "#/definitions/buildingRequirement"
|
2013-12-04 10:36:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2023-05-19 21:14:01 +03:00
|
|
|
"properties" : {
|
|
|
|
"id" : {
|
|
|
|
"type" : "number",
|
2013-04-02 17:06:43 +00:00
|
|
|
"description" : "Numeric identifier of this building"
|
|
|
|
},
|
2023-05-19 21:04:31 +03:00
|
|
|
"name" : {
|
2023-09-12 15:52:45 +03:00
|
|
|
"description" : "Localizable name of this building",
|
2023-05-19 21:04:31 +03:00
|
|
|
"type" : "string"
|
|
|
|
},
|
|
|
|
"description" : {
|
2023-09-12 15:52:45 +03:00
|
|
|
"description" : "Localizable decsription of this building",
|
2023-05-19 21:04:31 +03:00
|
|
|
"type" : "string"
|
|
|
|
},
|
2023-05-19 21:14:01 +03:00
|
|
|
"type" : {
|
|
|
|
"type" : "string",
|
2020-10-03 00:55:46 +03:00
|
|
|
"description" : "Subtype for some special buildings"
|
|
|
|
},
|
2023-05-19 21:14:01 +03:00
|
|
|
"mode" : {
|
|
|
|
"type" : "string",
|
2013-04-02 17:06:43 +00:00
|
|
|
"enum" : [ "normal", "auto", "special", "grail" ],
|
|
|
|
"description" : "Mode in which this building will be built"
|
|
|
|
},
|
2023-05-19 21:14:01 +03:00
|
|
|
"height" : {
|
|
|
|
"type" : "string",
|
2023-05-19 21:04:31 +03:00
|
|
|
"enum" : [ "skyship", "high", "average", "low"],
|
|
|
|
"description" : "Height for lookout towers and some grails"
|
|
|
|
},
|
2023-05-19 21:14:01 +03:00
|
|
|
"requires" : {
|
2013-12-04 10:36:39 +00:00
|
|
|
"$ref" : "#/definitions/buildingRequirement",
|
|
|
|
"description" : "List of town buildings that must be built before this one"
|
2013-04-02 17:06:43 +00:00
|
|
|
},
|
2023-05-19 21:14:01 +03:00
|
|
|
"upgrades" : {
|
2023-09-12 15:52:45 +03:00
|
|
|
"description" : "Optional, indicates that this building upgrades another base building",
|
2023-05-19 21:14:01 +03:00
|
|
|
"type" : "string"
|
2013-04-02 17:06:43 +00:00
|
|
|
},
|
2023-05-19 21:14:01 +03:00
|
|
|
"cost" : {
|
|
|
|
"type" : "object",
|
2013-04-11 19:24:14 +00:00
|
|
|
"additionalProperties" : false,
|
2023-09-12 15:52:45 +03:00
|
|
|
"description" : "Resources needed to build building",
|
2023-05-19 21:14:01 +03:00
|
|
|
"properties" : {
|
|
|
|
"gold" : { "type" : "number"},
|
|
|
|
"wood" : { "type" : "number"},
|
|
|
|
"ore" : { "type" : "number"},
|
|
|
|
"mercury" : { "type" : "number"},
|
|
|
|
"sulfur" : { "type" : "number"},
|
|
|
|
"crystal" : { "type" : "number"},
|
|
|
|
"gems" : { "type" : "number"}
|
2013-04-02 17:06:43 +00:00
|
|
|
}
|
2023-09-12 15:52:45 +03:00
|
|
|
},
|
2023-05-19 21:14:01 +03:00
|
|
|
"produce" : {
|
|
|
|
"type" : "object",
|
2014-04-26 18:23:35 +04:00
|
|
|
"additionalProperties" : false,
|
2023-09-12 15:52:45 +03:00
|
|
|
"description" : "Resources produced each day by this building",
|
2023-05-19 21:14:01 +03:00
|
|
|
"properties" : {
|
|
|
|
"gold" : { "type" : "number"},
|
|
|
|
"wood" : { "type" : "number"},
|
|
|
|
"ore" : { "type" : "number"},
|
|
|
|
"mercury" : { "type" : "number"},
|
|
|
|
"sulfur" : { "type" : "number"},
|
|
|
|
"crystal" : { "type" : "number"},
|
|
|
|
"gems" : { "type" : "number"}
|
2014-04-26 18:23:35 +04:00
|
|
|
}
|
2021-01-14 01:02:13 +03:00
|
|
|
},
|
2023-05-19 21:14:01 +03:00
|
|
|
"overrides" : {
|
2021-01-14 01:02:13 +03:00
|
|
|
"type" : "array",
|
|
|
|
"items" : [
|
|
|
|
{
|
|
|
|
"description" : "The buildings which bonuses should be overridden with bonuses of the current building",
|
|
|
|
"type" : "string"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2023-05-19 21:14:01 +03:00
|
|
|
"bonuses" : {
|
|
|
|
"type" : "array",
|
|
|
|
"description" : "Bonuses, provided by this special building on build using bonus system",
|
|
|
|
"items" : { "$ref" : "bonus.json" }
|
2021-01-14 01:02:13 +03:00
|
|
|
},
|
2023-05-19 21:14:01 +03:00
|
|
|
"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 17:06:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|