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

[l4d2] Removing certain items like defibrillators


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
spaghettipastaman
Member
Join Date: May 2021
Old 05-16-2021 , 15:19   [l4d2] Removing certain items like defibrillators
Reply With Quote #1

I've been trying to find a way to remove defibrillators in L4D2, because I use a ragdoll mod that looks really weird when it's revived from like 20 meters away. Anybody know a way to remove them from the game? (Including scripted defib spawns)
spaghettipastaman is offline
GoGetSomeSleep
Senior Member
Join Date: Dec 2018
Location: Miami/Florida
Old 05-18-2021 , 15:45   Re: [l4d2] Removing certain items like defibrillators
Reply With Quote #2

you can use stripper or vscript i can give you some codes.

for stripper:
left4dead2/addons/stripper/global_filters.cfg

PHP Code:
modify:
{
    
match:
    {
        
"classname" "weapon_item_spawn"
    
}
    
replace:
    {
        
"item12" "0"
    
}
}
filter:
{
    
"classname" "weapon_defibrillator_spawn"
}
{
    
"classname" "weapon_defibrillator"


for vscript
left4dead2/scripts/vscripts/versus(or coop?).nut

PHP Code:
MutationOptions <-
{

// convert defibs to ammo, start

    
weaponsToConvert =
    {
        
weapon_defibrillator            "ammo_spawn" // changes defibs to ammo, if yo don't wanna than remove
    
}

    function 
ConvertWeaponSpawnclassname )
    {
        if ( 
classname in weaponsToConvert )
        {
            return 
weaponsToConvert[classname];
        }
        return 
0;
    }

// convert defibs to ammo, stop
    
    
weaponsToRemove =
    {
        
weapon_defibrillator 0
    
}

    function 
AllowWeaponSpawnclassname )
    {
        if ( 
classname in weaponsToRemove )
        {
            return 
false;
        }
        return 
true;
    }
    
    function 
ShouldAvoidItemclassname )
    {
        if ( 
classname in weaponsToRemove )
        {
            return 
true;
        }
        return 
false;
    }


Last edited by GoGetSomeSleep; 05-18-2021 at 18:03.
GoGetSomeSleep is offline
spaghettipastaman
Member
Join Date: May 2021
Old 05-18-2021 , 16:49   Re: [l4d2] Removing certain items like defibrillators
Reply With Quote #3

Quote:
Originally Posted by GoGetSomeSleep View Post
you can use stripper or vscript i can give you some codes.

for stripper:
left4dead2/addons/stripper/global_filters.cfg

PHP Code:
modify:
{
    
match:
    {
        
"classname" "weapon_item_spawn"
    
}
    
replace:
    {
        
"item12" "0"
    
}
}
filter:
{
    
"classname" "weapon_defibrillator_spawn"
}
{
    
"classname" "weapon_defibrillator"


for vscript (with vslib)
left4dead2/scripts/vscripts/versus(or coop?).nut

PHP Code:
MutationOptions <-
{

// convert defibs to ammo, start

    
weaponsToConvert =
    {
        
weapon_defibrillator            "ammo_spawn" // changes defibs to ammo, if yo don't wanna than remove
    
}

    function 
ConvertWeaponSpawnclassname )
    {
        if ( 
classname in weaponsToConvert )
        {
            return 
weaponsToConvert[classname];
        }
        return 
0;
    }

// convert defibs to ammo, stop
    
    
weaponsToRemove =
    {
        
weapon_defibrillator 0
    
}

    function 
AllowWeaponSpawnclassname )
    {
        if ( 
classname in weaponsToRemove )
        {
            return 
false;
        }
        return 
true;
    }
    
    function 
ShouldAvoidItemclassname )
    {
        if ( 
classname in weaponsToRemove )
        {
            return 
true;
        }
        return 
false;
    }

I can't seem to find VScripts, but i can find VSlib,
other than that thanks for the help
spaghettipastaman is offline
GoGetSomeSleep
Senior Member
Join Date: Dec 2018
Location: Miami/Florida
Old 05-18-2021 , 17:05   Re: [l4d2] Removing certain items like defibrillators
Reply With Quote #4

i can send you a zip if you don't wanna use stripper for some reason
GoGetSomeSleep is offline
spaghettipastaman
Member
Join Date: May 2021
Old 05-18-2021 , 17:13   Re: [l4d2] Removing certain items like defibrillators
Reply With Quote #5

Sure
spaghettipastaman is offline
GoGetSomeSleep
Senior Member
Join Date: Dec 2018
Location: Miami/Florida
Old 05-18-2021 , 17:22   Re: [l4d2] Removing certain items like defibrillators
Reply With Quote #6

vslib is not required for basics like remove defibs but if you use vscript, vslib is needed in some cases for things you want. you can add on top when you setup vslib: IncludeScript("vslib");

i am not including vslib on zip not required.

Download left4dead2 vscripts for remove defibs.zip
GoGetSomeSleep is offline
spaghettipastaman
Member
Join Date: May 2021
Old 05-18-2021 , 17:30   Re: [l4d2] Removing certain items like defibrillators
Reply With Quote #7

thanks, it works like a charm
spaghettipastaman is offline
a2121858
Member
Join Date: Sep 2020
Old 01-01-2022 , 11:52   Re: [l4d2] Removing certain items like defibrillators
Reply With Quote #8

Can someone help me replace sniper_awp with sniper_scout?

I use stripper, which removes the fixed AWP on c1m2, but for some maps, the AWP is still generated in the safe house. How should I configure it to replace sniper_awp with sniper_scout on all maps? Can anyone help me?

This is the configuration I am using:

global_filters.cfg
PHP Code:
modify:
{
    
match:
    {
        
"weapon_selection" "weapon_sniper_awp"
    
}
    
replace:
    {
        
"weapon_selection" "weapon_sniper_scout"
    
}
}

modify:
{
    
match:
    {
        
"classname" "weapon_sniper_awp_spawn"
    
}
    
replace:
    {
        
"classname" "weapon_sniper_scout_spawn"
    
}

a2121858 is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 01-02-2022 , 11:26   Re: [l4d2] Removing certain items like defibrillators
Reply With Quote #9

probably they are a "weapon_spawn" entity.

https://developer.valvesoftware.com/wiki/Weapon_spawn

You need to change the weapon_sniper_awp option.

PHP Code:
modify:
{
    
match:
    {
        
"classname" "weapon_spawn"
        "weapon_selection" "weapon_sniper_awp"
    
}
    
replace:
    {
        
"weapon_selection" "weapon_sniper_scout"
    
}

__________________
Marttt is offline
a2121858
Member
Join Date: Sep 2020
Old 01-03-2022 , 03:38   Re: [l4d2] Removing certain items like defibrillators
Reply With Quote #10

Quote:
Originally Posted by Marttt View Post
probably they are a "weapon_spawn" entity.

https://developer.valvesoftware.com/wiki/Weapon_spawn

You need to change the weapon_sniper_awp option.

PHP Code:
modify:
{
    
match:
    {
        
"classname" "weapon_spawn"
        "weapon_selection" "weapon_sniper_awp"
    
}
    
replace:
    {
        
"weapon_selection" "weapon_sniper_scout"
    
}

Thank you, Mr. Marttt.
I do it in your way, but there is no effect.
AWP still generated in the safety house.

PHP Code:
modify:
{
    
match:
    {
        
"classname" "weapon_spawn"
        "weapon_selection" "weapon_sniper_awp"
    
}
    
replace:
    {
        
"weapon_selection" "weapon_sniper_scout"
    
}


modify:
{
    
match:
    {
        
"classname" "weapon_sniper_awp_spawn"
    
}
    
replace:
    {
        
"classname" "weapon_sniper_scout_spawn"
    
}


Last edited by a2121858; 01-03-2022 at 03:39.
a2121858 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 07:43.


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