[L4D2] Medkit Density
This plugin can remove, replace, change the amount of medkits at the start of a campaign in coop, at start of every map in versus, at safehouses and in the outdoors. When opting to replaced medkits, they can be replaced with either pills or defibrillators.
This plugin can be enabled in Versus/TeamVersus only or in Coop/Realism/Versus/TeamVersus alltogether for multicoop server that welcome more than the default 4 kits per safe area.
If you need different settings per gamemode, use
Thraka's
Game Mode Config Loader to change the settings accordingly, though make sure sm_medkitdensity_versusonly is set to 0 then.
The default configuration is ideal for an 8coop game, where the survivors start out with 8 medkits at start and 12 medkits in each saferoom and each medkit found outdoors will contain 2 medkits. (12 in saferoom because the first 4 survivors to arrive in the saferoom usually heal up and take a 2nd healthkit)
This has been tested as working on L4D2 in coop gamemode. It is not tested in a versus game, but should work fine. Please report if you experience any issues.
Installation
Download the "l4d2medkitdensity.smx" and drop into your addons\sourcemod\plugins directory.
Once the plugin is loaded for the first time, it will create a "l4d2medkitdensity.cfg" file in left4dead2\cfg\sourcemod directory where you can change the ConVars noted below.
Prior to installing newer version, delete the old files.
ConVars
// Should the plugin be on? 1[on] 2[off]
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_md_enabled "1"
// What to do with each medkit outdoors? 0[do nothing] 1[use sm_md_outdoors_medkitcount] 2[remove medkits] 3[replace with pills] 4[replace with defibrillators] 5[infinite]
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "5.000000"
sm_md_outdoors "1"
// With how many medkits should each medkit in the outdoors be replaced?
// -
// Default: "2"
// Minimum: "2.000000"
// Maximum: "10.000000"
sm_md_outdoors_medkitcount "2"
// What to do with medkits in saferooms? 0[do nothing] 1[use sm_md_checkpoint_medkitcount] 2[remove medkits] 3[replace with pills] 4[replace with defibrillators] 5[infinite] 6[replace 1 medkit with 1 defibrillator]
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "6.000000"
sm_md_saferoom "1"
// In saferooms, replace medkits with how many medkits?
// -
// Default: "12"
// Minimum: "4.000000"
// Maximum: "20.000000"
sm_md_saferoom_medkitcount "12"
// What to do with medkits at the start? (coop: start of campaign)(versus: start of every map) 0[do nothing] 1[use sm_md_start_medkitcount] 2[remove medkits] 3[replace with pills] 4[replace with defibrillators] 5[infinite medkits] 6[change 1 medkit to 1 def
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "6.000000"
sm_md_start "1"
// At start, replace medkits with how many medkits?
// -
// Default: "8"
// Minimum: "4.000000"
// Maximum: "20.000000"
sm_md_start_medkitcount "8"
// Change medkit density in versus games only? 0[coop,realism,versus,teamversus] 1[versus,teamversus]
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_md_versusonly "0"
start: the 4 medkits at start of campaign in coop, or start of every map in versus
saferoom: the 4 medkits in the saferoom
outdoors: all medkits spread accross the map (that are not at start and not in a saferoom)
Changelog:
v1.5
- added FCVAR_NOTIFY cvar flags to all cvars
- added ability to have infite medkits at start, saferoom and outdoors
- removed round_freeze_end event, applied different method
v1.4 (636 views)
- remove abilities to double, tripple or quadruple medkitcount at start, checkpoints and outdoors
- added ability to set a specified amount of medkits at start and checkpoints
- added ability to replace each outdoor medkit with specified amount of medkits
- fixed case where random outdoor medkit was treated like a saferoom medkit
- changed method of spawning saferoom medkits to gradually spawning
- changed the method of finding entities
- sm_md_start now effects every medkit at start of every map in versus games
v1.3.2 (204 views)
- fixed a bug where a survivor has his medkit removed from him/her
- other minor changes
v1.3.1 (24 views)
- applied another way to carry over the correct amount of medkits at checkpoint to next map
- added a reset on closest medkit location on mapchange
- changed convar limits for tripple, quadruple and 1defib+3medkits to work
v1.3 (18 views)
- really fixed carrying over the correct amount of medkits at checkpoint to next map
- fixed replacing some outdoor medkits that the director spawned late into the game
- added the abilities to tripple or quadruple medkitcount at start, checkpoints and outdoors
- added the ability to replace 1 of 4 medkits with 1 defibrillator at start and checkpoints
v1.2 (25 views)
- fixed carrying over the correct amount of medkits at checkpoint to next map
v1.1 (12 views)
- set convar min and max limits
- fixed issue with spawning too many medkits
v1.0 (6 views)
- Initial Release