Because a long time ago I needed a reliable add-on to dynamically control the health of special infecteds, now I decided to create this plugin and share it.
This complement will try to balance the health of the special infected, depending on the number of survivor players in the game. All this through the Cvars that has by default the game, in which these will be changed before your spawn and assigned with the values obtained by checking the survivor players.
// Set survivor players default to set hp base
// -
// Default: "4"
// Minimum: "0.000000"
balancer_hp_players_base "4"
// 0: Check all players survivor in game, 1: Ignore check idle survivors, 2: Ignore check survivors bot, 4: Ignore check dead survivors, 7: Set all ignore check modes
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "7.000000"
balancer_hp_check_mode "0"
// 0: Set Default value for cvar(z_health_boomer), Value > 0 : Set Custom HP Base
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_base_boomer "0"
// 0: Set Default value for cvar(z_health_charger), Value > 0 : Set Custom HP Base
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_base_charger "0"
// 0: Set Default value for cvar(z_health_hunter), Value > 0 : Set Custom HP Base
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_base_hunter "0"
// 0: Set Default value for cvar(z_health_jockey), Value > 0 : Set Custom HP Base
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_base_jockey "0"
// 0: Set Default value for cvar(z_health_smoker), Value > 0 : Set Custom HP Base
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_base_smoker "0"
// 0: Set Default value for cvar(z_health_spitter), Value > 0 : Set Custom HP Base
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_base_spitter "0"
// 0: Set Default value for cvar(z_health_tank), Value > 0 : Set Custom HP Base
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_base_tank "0"
// 0: Set Default value for cvar(z_health_witch), Value > 0 : Set Custom HP Base
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_base_witch "0"
// 0: Disable boomer increment/decrement balance HP, (Value < 1): Set factor percent of HP base [example:0.1 = 1] to increment/decrement per players), (Value >= 1): Set HP value to increment/decrement per players
// -
// Default: "0.1"
// Minimum: "0.000000"
balancer_hp_factor_boomer "0.1"
// 0: Disable charger increment/decrement balance HP, (Value < 1): Set factor percent of HP base [example:0.1 = 1] to increment/decrement per players), (Value >= 1): Set HP value to increment/decrement per players
// -
// Default: "0.1"
// Minimum: "0.000000"
balancer_hp_factor_charger "0.1"
// 0: Disable hunter increment/decrement balance HP, (Value < 1): Set factor percent of HP base [example:0.1 = 1] to increment/decrement per players), (Value >= 1): Set HP value to increment/decrement per players
// -
// Default: "0.1"
// Minimum: "0.000000"
balancer_hp_factor_hunter "0.1"
// 0: Disable jockey increment/decrement balance HP, (Value < 1): Set factor percent of HP base [example:0.1 = 1] to increment/decrement per players), (Value >= 1): Set HP value to increment/decrement per players
// -
// Default: "0.1"
// Minimum: "0.000000"
balancer_hp_factor_jockey "0.1"
// 0: Disable smoker increment/decrement balance HP, (Value < 1): Set factor percent of HP base [example:0.1 = 1] to increment/decrement per players), (Value >= 1): Set HP value to increment/decrement per players
// -
// Default: "0.1"
// Minimum: "0.000000"
balancer_hp_factor_smoker "0.1"
// 0: Disable spitter increment/decrement balance HP, (Value < 1): Set factor percent of HP base [example:0.1 = 1] to increment/decrement per players), (Value >= 1): Set HP value to increment/decrement per players
// -
// Default: "0.1"
// Minimum: "0.000000"
balancer_hp_factor_spitter "0.1"
// 0: Disable tank increment/decrement balance HP, (Value < 1): Set factor percent of HP base [example:0.1 = 1] to increment/decrement per players), (Value >= 1): Set HP value to increment/decrement per players
// -
// Default: "0.1"
// Minimum: "0.000000"
balancer_hp_factor_tank "0.1"
// 0: Disable witch increment/decrement balance HP, (Value < 1): Set factor percent of HP base [example:0.1 = 1] to increment/decrement per players), (Value >= 1): Set HP value to increment/decrement per players
// -
// Default: "0.1"
// Minimum: "0.000000"
balancer_hp_factor_witch "0.1"
// 0: Disable boomer limit max HP, (Value > 0): Set increment limit HP
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_max_boomer "0"
// 0: Disable charger limit max HP, (Value > 0): Set increment limit HP
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_max_charger "0"
// 0: Disable hunter limit max HP, (Value > 0): Set increment limit HP
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_max_hunter "0"
// 0: Disable jockey limit max HP, (Value > 0): Set increment limit HP
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_max_jockey "0"
// 0: Disable smoker limit max HP, (Value > 0): Set increment limit HP
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_max_smoker "0"
// 0: Disable spitter limit max HP, (Value > 0): Set increment limit HP
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_max_spitter "0"
// 0: Disable tank limit max HP, (Value > 0): Set increment limit HP
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_max_tank "0"
// 0: Disable witch limit max HP, (Value > 0): Set increment limit HP
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_max_witch "0"
// 0: Disable boomer decrement HP(min HP = HP base) , (Value > 0): Set decrement limit HP
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_min_boomer "0"
// 0: Disable charger decrement HP(min HP = HP base) , (Value > 0): Set decrement limit HP
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_min_charger "0"
// 0: Disable hunter decrement HP(min HP = HP base) , (Value > 0): Set decrement limit HP
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_min_hunter "0"
// 0: Disable jockey decrement HP(min HP = HP base) , (Value > 0): Set decrement limit HP
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_min_jockey "0"
// 0: Disable smoker decrement HP(min HP = HP base) , (Value > 0): Set decrement limit HP
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_min_smoker "0"
// 0: Disable spitter decrement HP(min HP = HP base) , (Value > 0): Set decrement limit HP
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_min_spitter "0"
// 0: Disable tank decrement HP(min HP = HP base) , (Value > 0): Set decrement limit HP
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_min_tank "0"
// 0: Disable witch decrement HP(min HP = HP base) , (Value > 0): Set decrement limit HP
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_min_witch "0"
Great plugin, I'm going to test this.
It would be perfect if it could include the amount of epecials and spawning time according to the amount of players.
like this,
// The max amount of special infected at once per 2 our 4 players
// Default: "3"
// Minimum: "1.000000"
// Maximum: "28.000000"
l4d2_limit "3"
// The amount of special infected spawned at each spawn interval per 2 our 4 players
// Default: "1"
// Minimum: "1.000000"
// Maximum: "28.000000"
l4d2_spawn_size "6"
// The maximum auto spawn time (seconds) for infected
// Default: "60.0"
// Minimum: "1.000000"
l4d2_time_max "30.0"
// The minimum auto spawn time (seconds) for infected
// -
// Default: "0.0"
// Minimum: "0.000000"
l4d2_time_min "5.0"
What would be the configuration to increase 1000 life per player? thanks
Quote:
Originally Posted by xZk
Intro
Because a long time ago I needed a reliable add-on to dynamically control the health of special infecteds, now I decided to create this plugin and share it.
This complement will try to balance the health of the special infected, depending on the number of survivor players in the game. All this through the Cvars that has by default the game, in which these will be changed before your spawn and assigned with the values obtained by checking the survivor players.
// Set survivor players default to set hp base
// -
// Default: "4"
// Minimum: "0.000000"
balancer_hp_players_base "4"
// 0: Check all players survivor in game, 1: Ignore check idle survivors, 2: Ignore check survivors bot, 4: Ignore check dead survivors, 7: Set all ignore check modes
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "7.000000"
balancer_hp_check_mode "0"
// 0: Set Default value for cvar(z_health_boomer), Value > 0 : Set Custom HP Base
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_base_boomer "0"
// 0: Set Default value for cvar(z_health_charger), Value > 0 : Set Custom HP Base
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_base_charger "0"
// 0: Set Default value for cvar(z_health_hunter), Value > 0 : Set Custom HP Base
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_base_hunter "0"
// 0: Set Default value for cvar(z_health_jockey), Value > 0 : Set Custom HP Base
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_base_jockey "0"
// 0: Set Default value for cvar(z_health_smoker), Value > 0 : Set Custom HP Base
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_base_smoker "0"
// 0: Set Default value for cvar(z_health_spitter), Value > 0 : Set Custom HP Base
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_base_spitter "0"
// 0: Set Default value for cvar(z_health_tank), Value > 0 : Set Custom HP Base
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_base_tank "0"
// 0: Set Default value for cvar(z_health_witch), Value > 0 : Set Custom HP Base
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_base_witch "0"
// 0: Disable boomer increment/decrement balance HP, (Value < 1): Set factor percent of HP base [example:0.1 = 1] to increment/decrement per players), (Value >= 1): Set HP value to increment/decrement per players
// -
// Default: "0.1"
// Minimum: "0.000000"
balancer_hp_factor_boomer "0.1"
// 0: Disable charger increment/decrement balance HP, (Value < 1): Set factor percent of HP base [example:0.1 = 1] to increment/decrement per players), (Value >= 1): Set HP value to increment/decrement per players
// -
// Default: "0.1"
// Minimum: "0.000000"
balancer_hp_factor_charger "0.1"
// 0: Disable hunter increment/decrement balance HP, (Value < 1): Set factor percent of HP base [example:0.1 = 1] to increment/decrement per players), (Value >= 1): Set HP value to increment/decrement per players
// -
// Default: "0.1"
// Minimum: "0.000000"
balancer_hp_factor_hunter "0.1"
// 0: Disable jockey increment/decrement balance HP, (Value < 1): Set factor percent of HP base [example:0.1 = 1] to increment/decrement per players), (Value >= 1): Set HP value to increment/decrement per players
// -
// Default: "0.1"
// Minimum: "0.000000"
balancer_hp_factor_jockey "0.1"
// 0: Disable smoker increment/decrement balance HP, (Value < 1): Set factor percent of HP base [example:0.1 = 1] to increment/decrement per players), (Value >= 1): Set HP value to increment/decrement per players
// -
// Default: "0.1"
// Minimum: "0.000000"
balancer_hp_factor_smoker "0.1"
// 0: Disable spitter increment/decrement balance HP, (Value < 1): Set factor percent of HP base [example:0.1 = 1] to increment/decrement per players), (Value >= 1): Set HP value to increment/decrement per players
// -
// Default: "0.1"
// Minimum: "0.000000"
balancer_hp_factor_spitter "0.1"
// 0: Disable tank increment/decrement balance HP, (Value < 1): Set factor percent of HP base [example:0.1 = 1] to increment/decrement per players), (Value >= 1): Set HP value to increment/decrement per players
// -
// Default: "0.1"
// Minimum: "0.000000"
balancer_hp_factor_tank "0.1"
// 0: Disable witch increment/decrement balance HP, (Value < 1): Set factor percent of HP base [example:0.1 = 1] to increment/decrement per players), (Value >= 1): Set HP value to increment/decrement per players
// -
// Default: "0.1"
// Minimum: "0.000000"
balancer_hp_factor_witch "0.1"
// 0: Disable boomer limit max HP, (Value > 0): Set increment limit HP
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_max_boomer "0"
// 0: Disable charger limit max HP, (Value > 0): Set increment limit HP
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_max_charger "0"
// 0: Disable hunter limit max HP, (Value > 0): Set increment limit HP
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_max_hunter "0"
// 0: Disable jockey limit max HP, (Value > 0): Set increment limit HP
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_max_jockey "0"
// 0: Disable smoker limit max HP, (Value > 0): Set increment limit HP
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_max_smoker "0"
// 0: Disable spitter limit max HP, (Value > 0): Set increment limit HP
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_max_spitter "0"
// 0: Disable tank limit max HP, (Value > 0): Set increment limit HP
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_max_tank "0"
// 0: Disable witch limit max HP, (Value > 0): Set increment limit HP
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_max_witch "0"
// 0: Disable boomer decrement HP(min HP = HP base) , (Value > 0): Set decrement limit HP
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_min_boomer "0"
// 0: Disable charger decrement HP(min HP = HP base) , (Value > 0): Set decrement limit HP
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_min_charger "0"
// 0: Disable hunter decrement HP(min HP = HP base) , (Value > 0): Set decrement limit HP
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_min_hunter "0"
// 0: Disable jockey decrement HP(min HP = HP base) , (Value > 0): Set decrement limit HP
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_min_jockey "0"
// 0: Disable smoker decrement HP(min HP = HP base) , (Value > 0): Set decrement limit HP
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_min_smoker "0"
// 0: Disable spitter decrement HP(min HP = HP base) , (Value > 0): Set decrement limit HP
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_min_spitter "0"
// 0: Disable tank decrement HP(min HP = HP base) , (Value > 0): Set decrement limit HP
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_min_tank "0"
// 0: Disable witch decrement HP(min HP = HP base) , (Value > 0): Set decrement limit HP
// -
// Default: "0"
// Minimum: "0.000000"
balancer_hp_min_witch "0"
int client = event.GetInt("tankid");
if(IsTank(client)){
// Note that, there are other things that can modify Tank's health which this plugin will end up overwriting, like VScript's "ZombieTankHealth" (Tank Run mutation uses it)
// There might be a better way, but I don't have a good one yet - mac
char difficultyname[12];
GetConVarString(cvar_difficulty, difficultyname, sizeof difficultyname);
if(StrEqual(difficultyname, "Impossible", false) ) {
SetPlayerHealth(client, cvar_tank_hp.IntValue * 2);
}
else if(StrEqual(difficultyname, "Hard", false) ) {
SetPlayerHealth(client, cvar_tank_hp.IntValue + (cvar_tank_hp.IntValue / 2));
}
else {
SetPlayerHealth(client, cvar_tank_hp.IntValue);
}
// PrintToChatAll("\x04[DEBUG] \x05Tank \x03HP \x05is set to: \x03%d", GetEntProp(client, Prop_Send, "m_iHealth") );
}
}
Mimics the x1.5 / x2 Tank HP bonus for Advanced and Expert respectively, hope you don't mind
I dont really understand this plugin. Im setting up all the cvars but sometimes my tank has 7590 HP, sometimes 8000, sometimes 7200 and ... i dont really get it. Can i maybe get a .cfg file which doubles the HP of all special infected? because i cant do it myself xd
Hi xZk, I had try setting cvar on my server
balancer_hp_base_tank "20000"
balancer_hp_factor_tank "10000"
balancer_hp_players_base "4"
When I had 6+ players, tank must have 40000+ but it increase into 100000+ ... i dont know get it
Hi xZk, I had try setting cvar on my server
balancer_hp_base_tank "20000"
balancer_hp_factor_tank "10000"
balancer_hp_players_base "4"
When I had 6+ players, tank must have 40000+ but it increase into 100000+ ... i dont know get it
balancer_hp_factor_tank "0.5" mean x5 base HP of Tank. You should set something like "10000" or "0.05" maybe... not sure about 0.05 but sure about 10000. Set to "10000" then