Work-in-progress page do describe all bonuses provided by town buildings for future configuration.
TODO: This page is outdated and may not represent VCMI 1.3 state
Hardcoded functionalities, selectable but not configurable. In future should be moved to scripting.
Includes:
Function of all of these objects can be enabled by this:
"function" : "castleGates"
Hardcoded functionality for now due to complexity of these objects. Temporary can be handles as unique buildings. Includes:
Buildings that give one or another bonus to visiting hero. All should be handled via configurable objects system.
Includes:
Generic town-specific functions that can be implemented as part of CBuilding class.
"guildLevels" : 1
"allowsHeroPurchase" : true
"allowsShipPurchase" : true
"allowsBuildingPurchase" : true
"dwelling" : { "level" : 1, "creature" : "archer" }
Turn into town bonus? What about creature-specific bonuses from hordes?
"provides" : { "gold" : 500 }
"guildSpells" : [5, 0, 0, 0, 0]
"thievesGuildLevels" : 1
"fortificationLevels" : 1
"warMachine" : "ballista"
Bonuses that can be made part of CBuilding. Note that due to how bonus system works this bonuses won't be stackable.
TODO: how to handle stackable bonuses like Necromancy Amplifier?
Includes:
bonus to player
"bonuses" :
{
"moraleToDefenders" :
{
"type": "MORALE",
"val" : 1,
"propagator" : ["VISITED_TOWN_AND_VISITOR"]
},
"luckToTeam" :
{
"type" : "LUCK",
"val" : 2,
"propagator" : [ "TEAM_PROPAGATOR" ]
}
Some other properties of town building that does not fall under "bonus" category.
Possible issue - with removing of fixed ID's buildings in different town may no longer share same ID. However Capitol must be unique across all town. Should be fixed somehow.
"onePerPlayer" : true
"prebuiltChance" : 75