Raised This Month: $51 Target: $400
 12% 

[L4D2] Balancer Spawn Infected


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author
xZk
Senior Member
Join Date: Nov 2017
Location: cl
Plugin ID:
7048
Plugin Version:
1.1
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
Servers with this Plugin:
13 
Plugin Description:
Balances the spawn of Infected, depending on the number of Survivor players in game
Old 04-18-2020 , 16:02   [L4D2] Balancer Spawn Infected
Reply With Quote #1

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(*).

This plugin is inspired by [L4D, L4D2] Common Infected Regulator and [L4D2] Director Settings Loader

Cvars:
PHP Code:
// 0: Disable, 1: Enable Plugin
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
balancer_spawn "1"

// 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"
    
}

Admin Commands:
PHP Code:
"sm_bs_reload" //reload config infected limit 
Requirements
-[L4D & L4D2] Left 4 DHooks Direct(optional)
Notes:
Rant:
-put l4d2_balancer_spawn_infectedlimit.cfg in "/addons/sourcemod/data/" folder if this file is not autocreated.
-the configs "TankLimit" and "WitchLimit" only allows more tanks and witches to spawn simultaneously, it will not spawn these.
-if config key "base" is set to "-1" or is commented, all settings for your class will be disabled.


Changelog


credits
Attached Files
File Type: sp Get Plugin or Get Source (l4d2_balancer_spawn.sp - 2616 views - 16.1 KB)

Last edited by xZk; 05-10-2020 at 21:22. Reason: v1.1
xZk is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:14.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode