mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Support for configurable town fortifications
Removed most of hardcoded checks for fort level or for presence of fort/ citadel/castle buildings. It is now possible to define which parts of town fortifications are provided by town buildings Configuration for H3-like fortifications is provided in buildingsLibrary.json and will be used automatically by mods as long as mods have buidings named "fort", "citadel" and "castle". Alternatively, mods can separately define: - hitpoints of walls (shared value for all sections) - hitpoints of central, upper and lower towers (separate values) - presence of moat - shooters for each tower (separate values)
This commit is contained in:
@@ -157,9 +157,33 @@ These are just a couple of examples of what can be done in VCMI. See vcmi config
|
||||
"produce" : {
|
||||
"sulfur" : 1,
|
||||
"gold" : 2000
|
||||
},
|
||||
},
|
||||
|
||||
// Optional, allows this building to add fortifications during siege
|
||||
"fortifications" : {
|
||||
// Maximum health of destructible walls. Walls are only present if their health is above zero".
|
||||
// Presence of walls is required for all other fortification types
|
||||
"wallsHealth" : 3,
|
||||
|
||||
//determine how this building can be built. Possible values are:
|
||||
// If set to true, moat will be placed in front of the walls. Requires walls presence.
|
||||
"hasMoat" : true
|
||||
|
||||
// Maximum health of central tower or 0 if not present. Requires walls presence.
|
||||
"citadelHealth" : 2,
|
||||
// Maximum health of upper tower or 0 if not present. Requires walls presence.
|
||||
"upperTowerHealth" : 2,
|
||||
// Maximum health of lower tower or 0 if not present. Requires walls presence.
|
||||
"lowerTowerHealth" : 2,
|
||||
|
||||
// Creature ID of shooter located in central keep (citadel). Used only if citadel is present.
|
||||
"citadelShooter" : "archer",
|
||||
// Creature ID of shooter located in upper tower. Used only if upper tower is present.
|
||||
"upperTowerShooter" : "archer",
|
||||
// Creature ID of shooter located in lower tower. Used only if lower tower is present.
|
||||
"lowerTowerShooter" : "archer",
|
||||
},
|
||||
|
||||
//determine how this building can be built. Possible values are:
|
||||
// normal - default value. Fulfill requirements, use resources, spend one day
|
||||
// auto - building appears when all requirements are built
|
||||
// special - building can not be built manually
|
||||
|
||||
Reference in New Issue
Block a user