1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-14 10:12:59 +02:00
vcmi/config/schemas/townBuilding.json

113 lines
3.6 KiB
JSON
Raw Normal View History

{
2023-05-19 20:14:01 +02:00
"type" : "object",
"additionalProperties" : false,
2023-05-19 20:14:01 +02:00
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI town building format",
"description" : "Format used to define town buildings in VCMI",
"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/buildingRequirement"
}
}
},
2023-05-19 20:14:01 +02:00
"properties" : {
"id" : {
"type" : "number",
"description" : "Numeric identifier of this building"
},
"name" : {
"description" : "Localizable name of this building",
"type" : "string"
},
"description" : {
"description" : "Localizable description of this building",
"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" ],
"description" : "Subtype for some special buildings"
},
2023-05-19 20:14:01 +02:00
"mode" : {
"type" : "string",
"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",
"enum" : [ "skyship", "high", "average", "low"],
"description" : "Height for lookout towers and some grails"
},
2023-05-19 20:14:01 +02:00
"requires" : {
"$ref" : "#/definitions/buildingRequirement",
"description" : "List of town buildings that must be built before this one"
},
2023-05-19 20:14:01 +02:00
"upgrades" : {
"description" : "Optional, indicates that this building upgrades another base building",
2023-05-19 20:14:01 +02:00
"type" : "string"
},
"configuration" : {
"description" : "Configuration of building. Only used if 'type' is set to 'configurable'",
"$ref" : "rewardable.json"
},
2023-05-19 20:14:01 +02:00
"cost" : {
"type" : "object",
"additionalProperties" : false,
"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"}
}
},
2023-05-19 20:14:01 +02:00
"produce" : {
"type" : "object",
"additionalProperties" : false,
"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"}
}
},
2023-05-19 20:14:01 +02:00
"overrides" : {
"type" : "array",
"items" : [
{
"description" : "The buildings which bonuses should be overridden with bonuses of the current building",
"type" : "string"
}
]
},
2023-05-19 20:14:01 +02:00
"bonuses" : {
"type" : "array",
"description" : "Bonuses, provided by this special building on build using bonus system",
"items" : { "$ref" : "bonus.json" }
},
2023-05-19 20:14:01 +02:00
"onVisitBonuses" : {
"type" : "array",
"description" : "Bonuses, provided by this special building on hero visit and applied to the visiting hero",
"items" : { "$ref" : "bonus.json" }
}
}
}