Shields & Armor - Rumsfield/konquest GitHub Wiki
Konquest Town Shields & Armor
Town Shields and Town Armor are similar to upgrades that protect a town from enemy attacks:
- Block breaks/placements
- Animal damage
- Piston extensions/retractions
- Explosions
- Fire spread
- All monument damage
Both town lords and knights can apply shields and armors, when enabled. A town's active armor and/or shields are displayed on a separate bar beneath the town name bar at the top of the screen while standing within town land.
Note that town shields and armor persist over server restarts. Shields continue to count down even while the server is offline. Armor block counts remain the same while the server is offline.
Town Shield/Armor bar display with both armor and shields active
Town Shields
Town Shields protect towns from all enemy damage for a period of time. Shields can be applied by using an inventory menu with the "/k town (name) shields" command, first page. Each shield option has a time duration and a cost based on the town's population. Once you choose a shield option, the shield/armor bar will display at the remaining shield time, which counts down to 0. Once the shield time reaches 0, the shield is depleted, leaving the town open to enemy attacks. There are several configuration options to control how shields work:
core.towns.enable_shields
- Enable players to use the town shields feature.core.towns.shields_while_attacked
- Allow players to apply shields while a town is under attack.core.towns.shields_add
- Allow players to apply shields while a town's shield is already active, increasing the countdown timer.core.towns.max_shields
- The maximum limit of the shield countdown timer, in seconds.
Town Shield menu options
Town Shield/Armor bar display with only shields active
Town Armor
Town Armor protects towns from all enemy damage for a limited number of block breaks. Armor can be applied by using an inventory menu with the "/k town (name) shields" command, second page. Each armor option has a block count and a cost based on the town's population. Once you choose an armor option, the shield/armor bar will display at the remaining armor points. When enemies break blocks or detonate TNT, the armor points decrease. Once the armor reaches 0, the armor is depleted, leaving the town open to enemy attacks. There are several configuration options to control how armor works:
core.towns.enable_armor
- Enable players to use the town armor feature.core.towns.armor_tnt_damage
- The amount of armor points to subtract when a TNT explodes within a town.core.towns.armor_while_attacked
- Allow players to apply armor while a town is under attack.core.towns.armor_add
- Allow players to apply more armor while a town's armor is already active, increasing the armor points.core.towns.max_armor
- The maximum limit of the armor points, in blocks.
Town Armor menu options
Town Shield/Armor bar display with only armor active
Shield & Armor Customization
You can set up any number of shield and armor options, in the shields.yml configuration file. Both shields and armors are defined in this file. Simply modify existing "charge" and "cost" values, add your own options, or remove the defaults and customize all new options. The default file is shown below. You must not remove the "shields:" and "armors:" lines. DO NOT use tabs, only spaces.
shields:
Short:
charge: 1800
cost: 100
Intermediate:
charge: 7200
cost: 200
Long:
charge: 28800
cost: 300
armors:
Light:
charge: 50
cost: 100
Medium:
charge: 200
cost: 200
Heavy:
charge: 800
cost: 300
This default setup creates 3 shield options (Short, Intermediate and Long) as well as 3 armor options (Light, Medium and Heavy). An example non-default setup is shown below:
shields:
Hour:
charge: 3600
cost: 50
Twelve Hour:
charge: 43200
cost: 500
Day:
charge: 86400
cost: 5000
armors:
Light:
charge: 50
cost: 100
Medium:
charge: 200
cost: 200
Heavy:
charge: 800
cost: 300
Ultra Heavy:
charge: 2000
cost: 400
This setup replaces the default shield options with 3 new ones (Hour, Twelve Hour and Day), as well as keep the 3 default armors plus adds a new armor option, Ultra Heavy.