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

Solved [L4D2] Tank Health Override All difficulties Plugin Request!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SEGA EMPRESS ERIS
Senior Member
Join Date: Sep 2010
Location: THE-MILKY-WAY-GALAXY
Old 01-21-2021 , 22:30   [L4D2] Tank Health Override All difficulties Plugin Request!
Reply With Quote #1

Basically a Plugin that overrides all Tank Health values to a single value across all difficulties & cvars to control how much health the tank has on each difficulty.

Reason: Coop for example has tank health at 4000 Normal (default) 6000 Advanced 8000 Expert 2000 Easy. currently there is no cvar to manually change this in the game. a plugin is needed.

This plugin when enabled, could fix that problem to allow you to set a fixed value across any difficulty in the game in coop and realism and versus to say 6000 or 8000 thats advanced, versus and expert level health value (default) or any value u can think of like 16000 or 24000, etc. or set tank health on any difficulty manually or each difficulty individually.

example for cvars:

Tank Health plugin Enabled 1 On. 0 Off.
Tank Health cvar (Override): "8000" Enabled 1 On. 0 Off. (Overrides Tank health to this value across all difficulties)
Tank Health cvar: (easy): "4000"
Tank Health cvar: (normal): "8000"
Tank Health cvar: (Advanced): "10000"
Tank Health cvar: (Expert): "12000"
Tank Health cvar: (Versus, Override): "8000" Enabled 1 On. 0 Off.

thanks for your time. I hope someone can do this plugin!
__________________

Last edited by SEGA EMPRESS ERIS; 01-31-2021 at 22:01.
SEGA EMPRESS ERIS is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 01-22-2021 , 03:11   Re: [L4D2] Tank Health Override All difficulties Plugin Request!
Reply With Quote #2

Quote:
Originally Posted by XJR15 View Post
currently there is no cvar to manually change this in the game. a plugin is needed.
Wrong. The "z_tank_health" convar controls this and the reason why it's different across the difficulties in Coop and Versus entirely is cuz of a multiplier being applied to the default value.
cravenge is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 01-22-2021 , 08:33   Re: [L4D2] Tank Health Override All difficulties Plugin Request!
Reply With Quote #3

For difficulty cvar based, I use this plugin from Crasher, that works great.

[L4D & L4D2] Difficulty Adjustment System

I just don't remember if you are able to ignore the player count for the difficulty setting.

Try it.
__________________

Last edited by Marttt; 01-22-2021 at 08:33.
Marttt is offline
SEGA EMPRESS ERIS
Senior Member
Join Date: Sep 2010
Location: THE-MILKY-WAY-GALAXY
Old 01-22-2021 , 21:37   Re: [L4D2] Tank Health Override All difficulties Plugin Request!
Reply With Quote #4

I checked all that i need a simple plugin one that makes tank health the same across all coop / realism difficulties.

if someone can do a simple plugin for coop and realism mode that makes tank health persistent across all difficulties that would be great so it doesnt go lower the lower the difficulty or higher the higher the difficulty.

so if i set tank health from 4000 to 6000 it can be 6000 on all difficulties instead of only 6000 on normal or like 9000 on adv. etc.
__________________
SEGA EMPRESS ERIS is offline
SEGA EMPRESS ERIS
Senior Member
Join Date: Sep 2010
Location: THE-MILKY-WAY-GALAXY
Old 01-22-2021 , 21:39   Re: [L4D2] Tank Health Override All difficulties Plugin Request!
Reply With Quote #5

Quote:
Originally Posted by cravenge View Post
Wrong. The "z_tank_health" convar controls this and the reason why it's different across the difficulties in Coop and Versus entirely is cuz of a multiplier being applied to the default value.
yeah i know of that command but what i mean is if i set the health there to say 6000 and i put the game on easy the tank health will lowered and if i set it to expert the tank health will be higher basically i just want the tank health to stay 6000 on all difficulties like any other infected in the game.

is there a simple plugin that does that? if there isnt someone needs to make one.

or is there a console command or simple plugin that turns off the multiplier to the tank?
__________________

Last edited by SEGA EMPRESS ERIS; 01-22-2021 at 21:40.
SEGA EMPRESS ERIS is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 01-22-2021 , 22:54   Re: [L4D2] Tank Health Override All difficulties Plugin Request!
Reply With Quote #6

Well you can try Mutant Tanks plugin, I'm certain that the HP set works.
__________________
Marttt is offline
SEGA EMPRESS ERIS
Senior Member
Join Date: Sep 2010
Location: THE-MILKY-WAY-GALAXY
Old 01-24-2021 , 15:58   Re: [L4D2] Tank Health Override All difficulties Plugin Request!
Reply With Quote #7

mutant tanks was too much how about a simple plugin that removes the tank multiplier so i can set tank health to say 6000

z_tank_health : 6000 : , "sv", "cheat" : Tank Zombie max health

and setting difficulties lower or higher doesnt mess with the tank health?
any simple plugins or commands out there that can do that?

thank you very much so far, u are very helpful Marttt <3
__________________

Last edited by SEGA EMPRESS ERIS; 01-24-2021 at 16:00.
SEGA EMPRESS ERIS is offline
Lux
Veteran Member
Join Date: Jan 2015
Location: Cat
Old 01-24-2021 , 18:10   Re: [L4D2] Tank Health Override All difficulties Plugin Request!
Reply With Quote #8

This is a very old simple plugin that maintains tank hp to be constant from easy to expert will remain the same, can get someone to build off it.

Just set tank hp you want using z_tank_health and it will deal with the changes.

Enjoy.

PHP Code:
#pragma semicolon 1

#include <sourcemod>


public Plugin:myinfo 
{
    
name "Lux",
    
author "TankconstHP",
    
description "",
    
version "0.1",
    
url ""
};

public 
OnPluginStart()
{
    
HookConVarChange(FindConVar("z_tank_health"), eConvarChanged);
    
HookConVarChange(FindConVar("z_difficulty"), eConvarChanged);
    
eCvarsChanged();
}

public 
eConvarChanged(Handle:hCvar, const String:sOldVal[], const String:sNewVal[])
{
    
eCvarsChanged();
}

public 
eCvarsChanged()
{
    static 
bool:bIgnore false;
    if(
bIgnore)
        return;
    
    new 
iTankHealthCvar GetConVarInt(FindConVar("z_tank_health"));
    new 
iTankHealth;
    new 
String:sDiff[64];
    
GetConVarString(FindConVar("z_difficulty"), sDiffsizeof(sDiff));
    if(
StrEqual(sDiff"easy"false))
    {
        
iTankHealth = (iTankHealthCvar 2);
    }
    else if(
StrEqual(sDiff"normal"false))
    {
        
iTankHealth = (iTankHealthCvar 1);
    }
    else if(
StrEqual(sDiff"hard"false))
    {
        
iTankHealth RoundFloat((iTankHealthCvar 0.75));
    }
    else if(
StrEqual(sDiff"impossible"false))
    {
        
iTankHealth RoundFloat((iTankHealthCvar 0.5));
    }
    else 
    {
        
//shrug
        
iTankHealth = (iTankHealthCvar 1);
    }
    
    
bIgnore true;
    
SetConVarInt(FindConVar("z_tank_health"), iTankHealth);
    
bIgnore false;

__________________
Connect
My Plugins: KlickME
[My GitHub]

Commission me for L4D
Lux is offline
SEGA EMPRESS ERIS
Senior Member
Join Date: Sep 2010
Location: THE-MILKY-WAY-GALAXY
Old 01-25-2021 , 12:22   Re: [L4D2] Tank Health Override All difficulties Plugin Request!
Reply With Quote #9

didnt work it would boost tank health to say 12000 on easy 18000 on expert 6000 advanced when i loaded the game when i had tank health set to 8000 to test it out. basically i need it to say keep the value i set in sm_cvar to stay the same say if i set it to 8000 it stays that amount on easy normal advanced expert difficulty also i did set it z_tank_health 8000 in a server.cfg its just on normal it would be that but when i change difficulty the value would still get multiplied.
__________________

Last edited by SEGA EMPRESS ERIS; 01-25-2021 at 12:23.
SEGA EMPRESS ERIS is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 01-25-2021 , 14:22   Re: [L4D2] Tank Health Override All difficulties Plugin Request!
Reply With Quote #10

This is how Mutant Tanks does it:
PHP Code:
#include <sourcemod>

#pragma semicolon 1
#pragma newdecls required

#define CTH_VERSION "1.0"

public Plugin myinfo =
{
    
name "[L4D & L4D2] Consistent Tank HP",
    
author "Psyk0tik (Crasher_3637)",
    
description "Set the Tank's HP consistently throughout all difficulties and game modes.",
    
version CTH_VERSION,
    
url "https://forums.alliedmods.net/showthread.php?t=330134"
};

bool g_bSecondGame;

public 
APLRes AskPluginLoad2(Handle myselfbool latechar[] errorint err_max)
{
    switch (
GetEngineVersion())
    {
        case 
Engine_Left4Deadg_bSecondGame false;
        case 
Engine_Left4Dead2g_bSecondGame true;
        default:
        {
            
strcopy(errorerr_max"This plugin only supports Left 4 Dead 1 & 2.");

            return 
APLRes_SilentFailure;
        }
    }

    return 
APLRes_Success;
}

ConVar g_cvTankHealth;

int g_iTankHealth;

public 
void OnPluginStart()
{
    
g_cvTankHealth CreateConVar("cth_tank_health""4000""The Tank's consistent health."FCVAR_NOTIFYtrue1.0true65535.0);
    
CreateConVar("cth_version"CTH_VERSION"\"Consistent Tank HP\" Plugin Version"FCVAR_NOTIFY|FCVAR_DONTRECORD|FCVAR_REPLICATED|FCVAR_SPONLY);
    
AutoExecConfig(true"l4d_consistent_tank_health");

    
g_cvTankHealth.AddChangeHook(vTankHealthCvar);

    
HookEvent("tank_spawn"vEventTankSpawn);
}

public 
void OnConfigsExecuted()
{
    
g_iTankHealth g_cvTankHealth.IntValue;
}

public 
void vTankHealthCvar(ConVar convar, const char[] oldValue, const char[] newValue)
{
    
g_iTankHealth g_cvTankHealth.IntValue;
}

public 
void vEventTankSpawn(Event event, const char[] namebool dontBroadcast)
{
    
int iTankId event.GetInt("userid"), iTank GetClientOfUserId(iTankId);
    if (
bIsTank(iTank))
    {
        
RequestFrame(vTankSpawnFrameiTankId);
    }
}

public 
void vTankSpawnFrame(int userid)
{
    
int iTank GetClientOfUserId(userid);
    if (
bIsTank(iTank))
    {
        
SetEntProp(iTankProp_Data"m_iHealth"g_iTankHealth);
        
SetEntProp(iTankProp_Data"m_iMaxHealth"g_iTankHealth);
    }
}

stock bool bIsTank(int tank)
{
    
int iClass g_bSecondGame 5;
    return 
tank <= MaxClients && IsClientInGame(tank) && IsPlayerAlive(tank) && GetClientTeam(tank) == && GetEntProp(tankProp_Send"m_zombieClass") == iClass;

Attached Files
File Type: sp Get Plugin or Get Source (l4d_consistent_tank_health.sp - 367 views - 2.2 KB)
__________________
Psyk0tik is offline
Reply


Thread Tools
Display Modes

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 10:51.


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