2013-04-02 20:06:43 +03:00
{
2023-05-19 20:14:01 +02:00
"type" : "object" ,
2013-04-11 22:24:14 +03:00
"additionalProperties" : false ,
2023-05-19 20:14:01 +02:00
"$schema" : "http://json-schema.org/draft-04/schema" ,
2013-04-02 20:06:43 +03:00
"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" ,
2023-09-17 23:30:04 +02:00
"$ref" : "#/definitions/buildingRequirement"
2013-12-04 13:36:39 +03:00
}
}
} ,
2023-05-19 20:14:01 +02:00
"properties" : {
"id" : {
"type" : "number" ,
2013-04-02 20:06:43 +03:00
"description" : "Numeric identifier of this building"
} ,
2023-05-19 20:04:31 +02:00
"name" : {
2023-09-12 14:52:45 +02:00
"description" : "Localizable name of this building" ,
2023-05-19 20:04:31 +02:00
"type" : "string"
} ,
"description" : {
2024-08-14 13:13:00 +02:00
"description" : "Localizable description of this building" ,
2023-05-19 20:04:31 +02:00
"type" : "string"
} ,
2023-05-19 20:14:01 +02:00
"type" : {
"type" : "string" ,
2024-08-16 14:57:38 +02:00
"enum" : [ "mysticPond" , "artifactMerchant" , "freelancersGuild" , "magicUniversity" , "castleGate" , "creatureTransformer" , "portalOfSummoning" , "ballistaYard" , "lookoutTower" , "library" , "brotherhoodOfSword" , "fountainOfFortune" , "spellPowerGarrisonBonus" , "attackGarrisonBonus" , "defenseGarrisonBonus" , "escapeTunnel" , "lighthouse" , "treasury" , "thievesGuild" , "bank" , "configurable" , "stables" , "manaVortex" , "attackVisitingBonus" , "defenceVisitingBonus" , "spellPowerVisitingBonus" , "knowledgeVisitingBonus" , "experienceVisitingBonus" ] ,
2020-10-02 23:55:46 +02:00
"description" : "Subtype for some special buildings"
} ,
2023-05-19 20:14:01 +02:00
"mode" : {
"type" : "string" ,
2013-04-02 20:06:43 +03:00
"enum" : [ "normal" , "auto" , "special" , "grail" ] ,
"description" : "Mode in which this building will be built"
} ,
2023-05-19 20:14:01 +02:00
"height" : {
"type" : "string" ,
2023-05-19 20:04:31 +02:00
"enum" : [ "skyship" , "high" , "average" , "low" ] ,
"description" : "Height for lookout towers and some grails"
} ,
2023-05-19 20:14:01 +02:00
"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
} ,
2023-05-19 20:14:01 +02:00
"upgrades" : {
2023-09-12 14:52:45 +02:00
"description" : "Optional, indicates that this building upgrades another base building" ,
2023-05-19 20:14:01 +02:00
"type" : "string"
2013-04-02 20:06:43 +03:00
} ,
2024-08-14 13:13:00 +02:00
"configuration" : {
2024-08-16 15:39:36 +02:00
"description" : "Optional, configuration of building that can be activated by visiting hero" ,
2024-08-14 15:39:40 +02:00
"$ref" : "rewardable.json"
} ,
2023-05-19 20:14:01 +02:00
"cost" : {
"type" : "object" ,
2013-04-11 22:24:14 +03:00
"additionalProperties" : false ,
2023-09-12 14:52:45 +02:00
"description" : "Resources needed to build building" ,
2023-05-19 20:14:01 +02: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 20:06:43 +03:00
}
2023-09-12 14:52:45 +02:00
} ,
2023-05-19 20:14:01 +02:00
"produce" : {
"type" : "object" ,
2014-04-26 17:23:35 +03:00
"additionalProperties" : false ,
2023-09-12 14:52:45 +02:00
"description" : "Resources produced each day by this building" ,
2023-05-19 20:14:01 +02: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 17:23:35 +03:00
}
2021-01-14 00:02:13 +02:00
} ,
2023-05-19 20:14:01 +02:00
"bonuses" : {
"type" : "array" ,
2024-08-16 15:39:36 +02:00
"description" : "Bonuses that are provided by this building in any town where this building has been built. Only affects town itself (including siege), to propagate effect to player or team please use bonus propagators" ,
2023-05-19 20:14:01 +02:00
"items" : { "$ref" : "bonus.json" }
2013-04-02 20:06:43 +03:00
}
}
}