Crucial Parts Sentry Limiter
Description:
This plugin limits the way engineers can construct and upgrade their sentries. The original idea was to prevent turtling in Capture the Flag modes, which can quickly become frustrating due to the nature of some maps. Players have to overcome a fortified sentry defense, only to face a respawning wave after having exhausted most of their resources. This prevents the enemy from fortifying such a defense through sentry guns, which can be easy.
Teams are provided a certain number of crucial parts. By default, this value is three. Each level of sentry gun requires a different amount of crucial parts. By default, level 1 sentries require zero crucial parts, level 2 sentries require one crucial part, and level 3 sentries require two crucial parts. This means by default, a team can only have one level 3 sentry and a level 2 sentry, or three level 2 sentries; each team can have unlimited level 1 sentries. All these values can be changed through convars.
A text HUD displays to all engineers, indicating how many team parts are available to them to use. After the engineer's first death, the cost of the sentry levels disappears to minimize the hud to just the available team parts. Through optional convars, users can hide this HUD, or add the values of each level sentry to the display.
Convars:
- sm_sl_version: This provides you the version number of your sentry limiter plugin.
- sm_sl_enable [0/1]: This enables or disables the plugin (Default 0).
- sm_sentry_value [level sentry] [new integer value] (Admins with Cheat Access Only): This changes the number of parts a certain level sentry costs (Default 1 costs 0, 2 costs 1, and 3 costs 2).
- sm_max_parts [new integer value] (Admins with Cheat Access Only): This changes the number of parts teams have available to them (Default 3).
- sm_upgrade_limit [new integer value] (Admins with Cheat Access Only): This changes the upgrade metal limit for guns that cannot be upgraded (Default 100).
- show_sentry_values [0/1]: This determines whether or not to show the values of each sentry level to the client engineer.
- show_sentry_hud [0/1]: This determines whether or not to show the entire hud including the number of team parts available to the client engineer.
Known Issues and Future Plans:
- Upgrading a gun such that you put metal in it, and it goes over the limit, will not provide a refund (eg, gun is at 90 metal, engi has 25 metal, engi hits the gun, the gun stays at 100, engi doesn't get a 15 metal refund, he stays at 0). Implementing this will require keeping track of every gun's metal, which is possible. But as of right now, it is in a fairly stable state, and I'd like to see how well it fairs in a real environment. Besides, this is an issue that does not arise often, and hasn't even been noticeable in all the testing so far.
- Option for vote-destroying sentries that griefing engineers construct to waste team parts would be nice, waiting to see reception.