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

L4D2 how do I remove chainsaw or object on all maps


Post New Thread Reply   
 
Thread Tools Display Modes
Tonblader
Senior Member
Join Date: Jul 2011
Location: Peru
Old 08-10-2021 , 02:16   Re: L4D2 how do I remove chainsaw or object on all maps
Reply With Quote #31

Quote:
Originally Posted by JLmelenchon View Post
Did not work in c8m5.
What exactly are you looking for? be more specific
Tonblader is offline
dumbnoobisdumb
New Member
Join Date: Feb 2017
Location: California
Old 07-24-2022 , 04:16   Re: L4D2 how do I remove chainsaw or object on all maps
Reply With Quote #32

Been trying to specifically remove tier 2 shotguns using stripper for a while now, and man, it just... does not work. Could use some help if anyone's got any ideas.

Problem is, spas and auto shotguns can be spawned through several values of "weapon_selection" (any, any_primary, tier2_any, any_shotgun, tier2_shotgun, and their own names). What I've found through like a million stripper dumps is that "tier2_any" is very prevalent across a lot of maps. So while replacing it with tier1_any would remove the t2 shotguns, it would also drastically reduce the number of rifle and sniper spawns (and on some maps eliminate them entirely).

I'm not at all a coder (hence the name), so forgive me if these are stupid questions, but here goes:

1) Is it possible to give "weapon_selection" multiple values to randomly select from? I found that for replacing melee weapons, a comma-delineated list seemed to work fine (i.e. "melee_weapon" "katana,fireaxe,machete").

2) Alternatively, is it possible to... define a new category? Like rather than "tier2_any", create a list that's essentially "tier2_sans_auto"?

3) Am I going about this entirely wrong and there's some other much more efficient method I should be utilizing? Frankly, I'm a little shocked at how complex it is to pull two guns from the game lol. But that's on me haha

Thanks for any help.

-nicole
dumbnoobisdumb is offline
moschinovac
Member
Join Date: Mar 2019
Location: Vietnam
Old 07-24-2022 , 12:39   Re: L4D2 how do I remove chainsaw or object on all maps
Reply With Quote #33

if u mind to use VScript. Put this into scripts/vscripts/(gamemode).nut (coop.nut, realism.nut, versus.nut etc…)

Code:
DirectorOptions <-
{	
	weaponsToRemove =
	{
		weapon_autoshotgun = 0
                weapon_shotgun_spas = 0
	}

	function AllowWeaponSpawn( classname )
	{
		if ( classname in weaponsToRemove )
			return false;
		
		return true;
	}
}
if u want convert Shotgun tier 2 to Tier 1
Code:
DirectorOptions <-
{
	weaponsToConvert =
 	{
		weapon_autoshotgun         =	"weapon_pumpshotgun_spawn"
		weapon_shotgun_spas	=	"weapon_shotgun_chrome_spawn"
 	}

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

Last edited by moschinovac; 07-24-2022 at 13:38.
moschinovac is offline
dumbnoobisdumb
New Member
Join Date: Feb 2017
Location: California
Old 07-25-2022 , 17:19   Re: L4D2 how do I remove chainsaw or object on all maps
Reply With Quote #34

Oh wow, thank you. I don't know much about vscript, but I'll try this. Thanks!
dumbnoobisdumb is offline
Reply



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 13:15.


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