Written as more reliable replacement of MultiTanks with other set of features.
This plugin spawns tank:
on first map after delay specified in ConVar when the first player leave safe area (see ConVars: l4d_tank_on_spawn_fm_chance, l4d_tank_on_spawn_add_tanks_firstmap)
duplicate tanks on the next maps each time when director spawn the tank
Tanks count to spawn can be adjusted:
directly by ConVar
by vote menu in any time
using balancer (based on current players count + game difficulty: see l4d_tank_on_spawn_players_X and l4d_tank_on_spawn_add_tanks_X ConVars).
Tanks spawn one by one with an interval defined in l4d_tank_on_spawn_interval ConVar.
Tank HP can be adjusted by:
ConVar
vote menu
autobalancer (players count + game difficulty)
or disable controlling hp at all
(if l4d_tank_on_spawn_countmode == 1, vote menu hp is preserved for all maps, otherwise it is preserved for current map only)
All votes are logged to logs/vote_tanks.log
By default, vote can be started by admin with StartVote "k" flag (adjusted by ConVar)
Features:
- spawn tank next to director's tank
- spawn tank on the first map
- autobalancer of hp and count
- max tanks control
- menu
- vote
- access levels
Compitibility:
- L4D1
- L4D2
Languages:
- Russian
- English
Settings:
Spoiler
in cfg/sourcemod/l4d_tank_on_spawn.cfg (ConVars):
- l4d_tank_on_spawn_enabled - def.: 1 - Enable plugin (1 - On / 0 - Off)
- l4d_tank_on_spawn_fm_chance - def.: 15 - Chance the tank is appear on first map (1 to 100), 0 - to disable
- l4d_tank_on_spawn_delay_min - def.: 30.0 - Minimum delay tank spawn on first map after survivors left safe area
- l4d_tank_on_spawn_delay_max - def.: 80.0 - Maximum delay tank spawn on first map after survivors left safe area
- l4d_tank_on_spawn_interval - def.: 5.0 - Number of seconds between each new tank spawn
- l4d_tank_on_spawn_countmode - def.: 1 - 1 - set tank count based on convar + menu / 2 - set tank count based on number of players
- l4d_tank_on_spawn_count - def.: 2 - Number of tanks to spawn (for mode = 1)
- l4d_tank_on_spawn_countlimit - def.: 16 - Maximum number of tanks allowed simultaneously exist on the map (other will be moved in spawn queue)
- l4d_tank_on_spawn_control_hp - def.: 1 - Do we need to control tank HP ? ( 0 - No / 1 - Yes, 2 - Auto-balancer hp, based on players count)
- l4d_tank_on_spawn_hp - def.: 10000 - HP of tank to set
- l4d_tank_on_spawn_voteaccess - def.: "k" - Flag(s) required to start the vote (leave empty to allow vote access for everybody)
- l4d_tank_on_spawn_announcedelay - def.: 2.0 - Delay (in sec.) between announce and vote menu appearing
- l4d_tank_on_spawn_vote_timeout - def.: 10 - How long (in sec.) does the vote last
- l4d_tank_on_spawn_vote_delay - def.: 60 - Minimum delay (in sec.) allowed between identical vote types
- l4d_tank_on_spawn_vote_maxcount - def.: 4 - Maximum count of votes allowed to do for each player per 1 round
- l4d_tank_on_spawn_log - def.: 1 - Use logging? (1 - Yes / 0 - No)
- l4d_tank_on_spawn_players_1 - def.: 1 - How many tanks should be in wave when count of players is: 1
- l4d_tank_on_spawn_players_2 - def.: 1 - How many tanks should be in wave when count of players is: 2
- l4d_tank_on_spawn_players_3 - def.: 2 - How many tanks should be in wave when count of players is: 3
- l4d_tank_on_spawn_players_4 - def.: 2 - How many tanks should be in wave when count of players is: 4
- l4d_tank_on_spawn_players_5 - def.: 3 - How many tanks should be in wave when count of players is: 5
- l4d_tank_on_spawn_players_6 - def.: 3 - How many tanks should be in wave when count of players is: 6
- l4d_tank_on_spawn_players_7 - def.: 3 - How many tanks should be in wave when count of players is: 7
- l4d_tank_on_spawn_players_8 - def.: 3 - How many tanks should be in wave when count of players is: 8
- l4d_tank_on_spawn_players_9 - def.: 4 - How many tanks should be in wave when count of players is: 9
- l4d_tank_on_spawn_players_10 - def.: 4 - How many tanks should be in wave when count of players is: 10
- l4d_tank_on_spawn_players_11 - def.: 4 - How many tanks should be in wave when count of players is: 11
- l4d_tank_on_spawn_players_12 - def.: 4 - How many tanks should be in wave when count of players is: 12
- l4d_tank_on_spawn_players_13 - def.: 4 - How many tanks should be in wave when count of players is: 13
- l4d_tank_on_spawn_players_14 - def.: 4 - How many tanks should be in wave when count of players is: 14
- l4d_tank_on_spawn_players_15 - def.: 4 - How many tanks should be in wave when count of players is: 15
- l4d_tank_on_spawn_players_16 - def.: 4 - How many tanks should be in wave when count of players is: 16
- l4d_tank_on_spawn_add_tanks_easy - def.: 0 - How many tanks should be added on difficulty: easy
- l4d_tank_on_spawn_add_tanks_normal - def.: 0 - How many tanks should be added on difficulty: normal
- l4d_tank_on_spawn_add_tanks_hard - def.: 0 - How many tanks should be added on difficulty: hard
- l4d_tank_on_spawn_add_tanks_expert - def.: 0 - How many tanks should be added on difficulty: impossible
- l4d_tank_on_spawn_add_tanks_firstmap - def.: 0 - How many tanks should be added on first map
- l4d_tank_on_spawn_ignore_rush - def.: 1 - Do not double tank if somebody rushed when previous tank wave is not yet killed? (1 - Yes / 2 - No)
- l4d_tank_on_spawn_hpfactor_1 - def.: 1.0 - Multiplier of HP when count of players is: 1
- l4d_tank_on_spawn_hpfactor_2 - def.: 1.0 - Multiplier of HP when count of players is: 2
- l4d_tank_on_spawn_hpfactor_3 - def.: 1.5 - Multiplier of HP when count of players is: 3
- l4d_tank_on_spawn_hpfactor_4 - def.: 1.5 - Multiplier of HP when count of players is: 4
- l4d_tank_on_spawn_hpfactor_5 - def.: 2.0 - Multiplier of HP when count of players is: 5
- l4d_tank_on_spawn_hpfactor_6 - def.: 2.2 - Multiplier of HP when count of players is: 6
- l4d_tank_on_spawn_hpfactor_7 - def.: 2.5 - Multiplier of HP when count of players is: 7
- l4d_tank_on_spawn_hpfactor_8 - def.: 3.0 - Multiplier of HP when count of players is: 8
- l4d_tank_on_spawn_hpfactor_9 - def.: 3.5 - Multiplier of HP when count of players is: 9
- l4d_tank_on_spawn_hpfactor_10 - def.: 4.0 - Multiplier of HP when count of players is: 10
- l4d_tank_on_spawn_hpfactor_11 - def.: 4.5 - Multiplier of HP when count of players is: 11
- l4d_tank_on_spawn_hpfactor_12 - def.: 5.0 - Multiplier of HP when count of players is: 12
- l4d_tank_on_spawn_hpfactor_13 - def.: 5.0 - Multiplier of HP when count of players is: 13
- l4d_tank_on_spawn_hpfactor_14 - def.: 5.0 - Multiplier of HP when count of players is: 14
- l4d_tank_on_spawn_hpfactor_15 - def.: 5.0 - Multiplier of HP when count of players is: 15
- l4d_tank_on_spawn_hpfactor_16 - def.: 5.0 - Multiplier of HP when count of players is: 16
- l4d_tank_on_spawn_hpfactor_easy - def.: 0.3 - Additional multiplier of HP on difficulty: easy
- l4d_tank_on_spawn_hpfactor_normal - def.: 0.5 - Additional multiplier of HP on difficulty: normal
- l4d_tank_on_spawn_hpfactor_hard - def.: 1.0 - Additional multiplier of HP on difficulty: hard
- l4d_tank_on_spawn_hpfactor_expert - def.: 2.5 - Additional multiplier of HP on difficulty: impossible
- l4d_tank_on_spawn_add_tanks_easy - def.: 0 - How many tanks should be added on difficulty: easy
- l4d_tank_on_spawn_add_tanks_normal - def.: 0 - How many tanks should be added on difficulty: normal
- l4d_tank_on_spawn_add_tanks_hard - def.: 0 - How many tanks should be added on difficulty: hard
- l4d_tank_on_spawn_add_tanks_expert - def.: 0 - How many tanks should be added on difficulty: impossible
- l4d_tank_on_spawn_add_tanks_firstmap - def.: 0 - How many tanks should be added on first map
- l4d_tank_on_spawn_add_finale_tanks - def.: 0 - How many tanks should be added on finale (negative values are allowed)
- l4d_tank_on_spawn_ignore_rush - def.: 1 - Do not double tank if somebody rushed when previous tank wave is not yet killed? (1 - Yes / 0 - No)
- l4d_tank_on_spawn_announcement - def.: 1 - Make announcement in chat when the tank is about to appear? (1 - Yes / 0 - No)
- l4d_tank_on_spawn_create_tank_flag - def: s - Admin flag required to spawn a tank via the menu
- l4d_tank_on_spawn_director_waves_interval_fin - def.: 0 - (for finale) Minimum time (in sec.) required before allowing director to spawn a new tank wave after the last tank died
- l4d_tank_on_spawn_director_waves_interval_min - def.: 0 - (before finale) Minimum random start time (in sec.) required before allowing director to spawn a new tank wave after the last tank died
- l4d_tank_on_spawn_director_waves_interval_max - def.: 0 - (before finale) Minimum random end time (in sec.) required before allowing director to spawn a new tank wave after the last tank died
- l4d_tank_on_spawn_mapstart_relax_time - def.: 0 - Prevent director from spawning tanks within this number of seconds after map started
- l4d_tank_on_spawn_info_level - def.: 3 - Duplicate service (vote) information? 0 - No, 1 - In console, 2 - In server. (Can be combined)
If you want to enable balancer, you must setup such values:
Game director should work properly - If it doesn't spawn tank, this plugin doesn't append tank as well (excepting first map if you set l4d_tank_on_spawn_fm_chance > 0).
SourceMod v1.10+
Credits:
- Joshe Gatito (Aya Supai) - for some requests and tests
Conflicts:
- Supertanks and any plugin that hooks "z_max_player_zombies" ConVar and reset (lock) it immediately on its own (LOL, ask their authors why they do it).
* Note: "Mutant tanks" are supported since v8.66
ChangeLog
Spoiler
1.0 (15-Jun-2018 )
- Initial release
1.1 (31-Dec-2018 )
- Added min/max delay ConVars
- Added count of tanks ConVar
- Added tank spawn chance ConVar
- Added some cache
1.2 (05-Jan-2019)
- Added ability to spawn tank on first mission only
1.3 (12-Feb-2019)
- Prevented "Infected team is full" error when spawning the tank.
1.4 (16-Mar-2019)
- Reworked logic.
- Added balancer + removed tank count ConVar.
- Ensure tank is really spawned.
1.5 (11-May-2019)
- Added ConVar to control the tanks count mode (based on players number or based on ConVar + menu)
- Added menu to control the number of tanks and HP (request by Joshe Gatito)
- Added ability to change HP
1.6 (11-May-2019)
- Plugin is simplified / optimized.
- Fixed menu.
- Menu is now can be applied for "l4d_tank_on_spawn_countmode == 2" too (for current round only).
- Fixed bug when tanks continue to replicate when mission lost (thanks Joshe Gatito for report).
- Added ConVar to control delay between each tank spawning.
1.7 (12-May-2019)
- Added preserving HP and Count convars for the next map.
- Fixed the case where tanks are not duplicated when you manually spawn tank on the first map before exiting the safe area.
- Added spawn tank menu item.
1.8 (15-May-2019)
- Added vote for HP / tank count, new ConVars to set vote access, new commands: !veto, !votepass
- Added translation into Russian with color support.
1.9 (27-May-2019)
- Added changing tank count depending on game difficulty.
1.10 (01-June-2019)
- Fixed infinite tank spawn.
- Fixed veto/votepass
- added new ConVars to control the vote
- added vote logging
1.11 (07-July-2019)
- Added L4D2 support, though not tested
1.12 (22-July-2019)
- Balancer is moved to ConVars.
1.13 (10-Aug-2019)
- When l4d_tank_on_spawn_chance == 0, if director accidentally spawn tank on the 1st map, it will be kicked (exception: l4d_river01_docks map,
where tank is spawned in container).
You still able manually spawn tank with sm_tank_spawn
1.14 (27-Sep-2019)
- Fixed "A vote is already in progress" error and a rare menu handle mem leak.
1.15 (27-Apr-2020)
- Small optimizations.
- "sm_tank_spawn" command renamed with "sm_tank"
- "sm_tanks" is a new alias for "sm_tank"
- added L4D2 support for 1st maps.
- added first maps support for custom maps.
- New dependency: <left4dhooks>.
- Fixed tank count counted incorrectly when one is about to die.
- Added ability to set tank hp more than 65536.
- Minimal sm version is now: 1.10
1.17 (11-May-2020)
- Fixed "tank count '50'" option is not worked correctly.
- Added "tank hp balancer":
* New value "2" is added to "l4d_tank_on_spawn_control_hp" ConVar.
* New ConVars added "l4d_tank_on_spawn_hpfactor_X" where X - is a number of players up to 16.
* New ConVar: "l4d_tank_on_spawn_hpfactor_easy"
* New ConVar: "l4d_tank_on_spawn_hpfactor_normal"
* New ConVar: "l4d_tank_on_spawn_hpfactor_hard"
* New ConVar: "l4d_tank_on_spawn_hpfactor_expert"
- Added ConVar "l4d_tank_on_spawn_add_tanks_firstmap" to have ability to modify basic tanks count on first maps.
- "Left4DHooks Direct" plugin dependency is now optional, SM v.1.10+ is no more required.
- Added displaying tank number and total number to be spawned.
- Fixed some issues when tank forcibly spawn by director on first map.
- Corrected tank counting by including tank pre-dead state identifying.
1.19 (19-May-2020)
- Added ConVar "l4d_tank_on_spawn_vote_delay" - def.: 60 - Minimum delay (in sec.) allowed between identical vote types
- Added ConVar "l4d_tank_on_spawn_vote_maxcount" - def.: 4 - Maximum count of votes allowed to do for each player per 1 round
1.20 (22-Jul-2020)
- Added exclusion for tank in container - kick feature (L4D2).
1.21 (06-Sep-2020)
- Added ConVar "l4d_tank_on_spawn_add_finale_tanks" - Allows to add/remove some number of tanks on finale maps (for decreasing, use negative numbers).
- Translation formatting fix
1.22 (15-Sep-2020)
- Improved detection of Finale map (thanks to Timocop & SilverShot).
- Overriding max tank limits in L4D2 (thanks to Merudo).
- Added ConVar "l4d_tank_on_spawn_announcement" - Make announcement in chat when the tank is about to appear? (1 - Yes / 0 - No)
- Fixed tank does not keep distance during spawn (L4D2).
- Removed "kick" feature at all.
1.23 (31-Oct-2020) (unfinished)
- (TODO) Convar for failspawn
- Added ConVar "l4d_tank_on_spawn_create_tank_flag" - Admin flag required to spawn a tank via the menu
1.24 (29-May-2021)
- Prevented tank duplication on vehicle leaving.
1.25 (05-Jun-2021)
- Some ConVars are added to help combatting with weird director behaviour when tank waves spawns too often:
* l4d_tank_on_spawn_director_waves_interval_fin - def.: 0 - (for finale) Minimum time (in sec.) required before allowing director to spawn a new tank wave after the last tank died
* l4d_tank_on_spawn_director_waves_interval_min - def.: 0 - (before finale) Minimum random start time (in sec.) required before allowing director to spawn a new tank wave after the last tank died
* l4d_tank_on_spawn_director_waves_interval_max - def.: 0 - (before finale) Minimum random end time (in sec.) required before allowing director to spawn a new tank wave after the last tank died
Default: disabled. (optionally) Recommended values to fix problems (when only they take place): 30 / 60 / 180 respectively.
- Added ConVar "l4d_tank_on_spawn_enable_duplicate" - Enable tanks duplication (1 - On / 0 - Off, in this case plugin will only control tank's hp)
- Made ConVar "l4d_tank_on_spawn_enabled" to be dynamically tracked.
- Tank spawn check (and hp assigning) is 0.1 sec. delayed now to give more flexibility for 3rd party plugins.
1.28 (06-Feb-2022)
- Changed many ConVar's default values to prevent misunderstanding like "why the number of tanks spawned is different to the one I voted":
* Autobalancer is disabled by default. Read "Settings" section carefully to understand how to enable.
- Added ConVar "l4d_tank_on_spawn_mapstart_relax_time" - Prevent director from spawning tanks within this number of seconds after map started
- Added ConVar "l4d_tank_on_spawn_info_level" - Duplicate service (vote) information? 0 - No, 1 - In console, 2 - In server. (Can be combined)
- Added compatiblity with listen servers (thanks to @Marttt).
- Added translation into Hungarian (thanks to @KasperH).
- Corrected some translation colors.
1.30 (21-Feb-2022)
- Removed privately hardcoded decreasing tank count on 2 maps of L4D1.
- Fixed menu selected values aren't preserved for the next campaign (conflicting with ConVars Anomaly Fixer's "Round Start" enforcer).
- Make "left4dhooks" to be really optional.
Donate
Donates are very appreciated and welcomed for further inspiration, make me happy, and make next updates came out more often:
- Patreon (Paypal)
- BitCoin
- Ю.Money
1.17 (11-May-2020)
- Fixed "tank count '50'" option is not worked correctly.
- Added "tank hp balancer":
* New value "2" is added to "l4d_tank_on_spawn_control_hp" ConVar.
* New ConVars added "l4d_tank_on_spawn_hpfactor_X" where X - is a number of players up to 16.
* New ConVar: "l4d_tank_on_spawn_hpfactor_easy"
* New ConVar: "l4d_tank_on_spawn_hpfactor_normal"
* New ConVar: "l4d_tank_on_spawn_hpfactor_hard"
* New ConVar: "l4d_tank_on_spawn_hpfactor_expert"
- Added ConVar "l4d_tank_on_spawn_add_tanks_firstmap" to have ability to modify basic tanks count on first maps.
- "Left4DHooks Direct" plugin dependency is now optional, SM v.1.10+ is no more required.
- Added displaying tank number and total number to be spawned.
- Fixed some issues when tank forcibly spawn by director on first map.
- Corrected tank counting by including tank pre-dead state identifying.
Hungarian translation is refused. Required to update compatibility with new update.
Just an FYI: Mutant Tanks no longer modifies the "z_max_player_zombies" cvar since v8.66. I forgot MT even modified that cvar until I found this plugin. MT should be fully compatible with this plugin now, aside from the "sm_tank" command, but MT provides an "sm_tank2" command as an alias so it should be all good.