The plugin will try to balance the infected limit and interval spawn of the special infected, depending on the number of survivor players in the game.
This is accomplished by editing the Director Scripts through one of these 3 methods
Changing only the variables Base DirectorOptions table(*).
Changing the variables Script Scope Director Script(*).
Changing the variables Director Script by forward(*).
// 0: Edit only director, 1: Override director and vscripts, 2: Override forward director scripts(require left4dhooks)
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "2.000000"
balancer_spawn_mode "0"
// 0: Check all players survivor, 1: Not check survivor bots, 2: Not check survivors dead, 3: Select all Not check modes
// -
// Default: "2"
// Minimum: "0.000000"
// Maximum: "3.000000"
balancer_spawn_check "2"
// Set survivor players base config
// -
// Default: "4"
// Minimum: "1.000000"
balancer_spawn_check_base "4"
// Set limit specials to players base config, -1:Disable limit balancer
// -
// Default: "4"
// Minimum: "-1.000000"
balancer_spawn_limit_si_base "4"
// Set limit to decrease for each 1 player less than players base config, -1:Disable limit decrement
// -
// Default: "1"
balancer_spawn_limit_si_dec "1"
// Set limit to increase for each 1 player more than players base config, -1:Disable limit increment
// -
// Default: "1"
balancer_spawn_limit_si_inc "1"
// Set max limit for all special infected, -1:Disable limit max
// -
// Default: "-1"
balancer_spawn_limit_si_max "-1"
// Set min limit for all special infected, -1:Disable limit min
// -
// Default: "1"
balancer_spawn_limit_si_min "1"
// Set interval special respawn for players base config, -1:Disable interval balancer
// -
// Default: "45.0"
// Minimum: "-1.000000"
balancer_spawn_interval_si_base "45.0"
// Set interval to decrease for each 1 player less than players base config, 0:Disable interval decrement
// -
// Default: "0.0"
balancer_spawn_interval_si_dec "0.0"
// Set interval to increase for each 1 player more than players base config, 0:Disable interval increment
// -
// Default: "-5.0"
balancer_spawn_interval_si_inc "-5.0"
// Set max interval respawn for all special infected, -1:Disable interval max
// -
// Default: "60.0"
balancer_spawn_interval_si_max "60.0"
// Set min interval respawn for all special infected, -1:Disable interval min
// -
// Default: "3.0"
balancer_spawn_interval_si_min "3.0"
CFG Infected Limit:
PHP Code:
//"-1": Disable config value
"InfectedLimit"
{
"CommonLimit"
{
"base" "30"//set amount base infecteds commons for amount survivors checkeds equals in cvar(balancer_spawn_check_base)
"decrement" "5"//set infecteds commons amount to decrease for each survivor less in the check base(balancer_spawn_check_base)
"increment" "5"//set infecteds commons amount to increase for each survivor more in the check base(balancer_spawn_check_base)
"minimun" "10"//sets the minimum amount of common infected allowed
"maximun" "50"//sets the maximun amount of common infected allowed
}
"SmokerLimit"
{
"base" "1"
"decrement" "-1"
"increment" "1"
"minimun" "1"
"maximun" "4"
}
"BoomerLimit"
{
"base" "1"
"decrement" "-1"
"increment" "1"
"minimun" "1"
"maximun" "4"
}
"HunterLimit"
{
"base" "1"
"decrement" "-1"
"increment" "1"
"minimun" "1"
"maximun" "4"
}
"SpitterLimit"
{
"base" "1"
"decrement" "-1"
"increment" "1"
"minimun" "1"
"maximun" "4"
}
"JockeyLimit"
{
"base" "1"
"decrement" "-1"
"increment" "1"
"minimun" "1"
"maximun" "4"
}
"ChargerLimit"
{
"base" "1"
"decrement" "-1"
"increment" "1"
"minimun" "1"
"maximun" "4"
}
"WitchLimit"
{
"base" "-1"
"decrement" "-1"
"increment" "-1"
"minimun" "-1"
"maximun" "-1"
}
"TankLimit"
{
"base" "-1"
"decrement" "-1"
"increment" "-1"
"minimun" "-1"
"maximun" "-1"
}
}
v1.1 (28/04/2020)
-Removed cvars to limit special infected classes and changed to CFG file(l4d2_balancer_spawn_infectedlimit.cfg).
-Added AdminCmd(sm_bs_reload) to reload CFG balancer of infected limit classes.
-Required plugin(left4dhooks) now is optional.
v1.0.1 (19/04/2020)
-Changed EntityOutput "OnGameplayStart" to "round_start" Event.
v1.0 (18/04/2020)
-Initial Release
credits
Timocop: for his useful method to editing Director variables Silvers: for his great work on Left 4 Dhooks
Last edited by xZk; 05-10-2020 at 21:22.
Reason: v1.1