Raised This Month: $81 Target: $400
 20% 

Solved [L4D2] Disable Gauntlet Event


Post New Thread Reply   
 
Thread Tools Display Modes
Maur0
Senior Member
Join Date: Aug 2020
Old 09-13-2021 , 00:05   Re: [L4D2] Disable Gauntlet Event
Reply With Quote #11

Austin - Oh perfect. Anyway, I think I already have exactly what I need, what's more, I think there was a Silvers plugin that allowed you to add weapons and items, place them in places on each map where you want them to always appear and save them in the data file.

Even so, for now I am more compliant with the previous methods of eliminating the endless horde. Thanks.

Too bad it is not easy to modify almost the entire event of each map on the infinite horde. But at least you managed to help me on the L4D1 maps to make the L4D1 original. Good job!
Maur0 is offline
Austin
Senior Member
Join Date: Oct 2005
Old 09-13-2021 , 03:48   Re: [L4D2] Disable Gauntlet Event
Reply With Quote #12

Great!
Glad I could help.

Can you edit your post?
Edit / (bottom right) Go Advanced / (upper left) Title / [Solved]

Last edited by Austin; 09-13-2021 at 03:49.
Austin is offline
raptor777777
New Member
Join Date: Nov 2023
Old 11-10-2023 , 15:14   Re: [L4D2] Disable Gauntlet Event
Reply With Quote #13

Alright, since this is the only resource on the internet on how to disable gauntlets, I'll add my alternative solution, with functioning examples for the L4D1 maps. Basically you write a custom mutation and use vscript to remove gauntlets - the L4D1 mutation already contains a bunch of example code. The benefit is that you don't need -insecure, and you don't need addons.

- In Steam\steamapps\common\Left 4 Dead 2\left4dead2\modes create a file called 'mutationname.txt', with the following code:
Code:
"mutationname"
{
	"base"		"coop"

	"maxplayers"	"4"
	"hasdifficulty"	"1"
	"singlechapter"	"0"

	"DisplayTitle"	"Some suitable name to display when loading"
	"Description"	"Some suitable description"
	"Image"		"maps/any"
	"Author"	"Your name goes here"
	

}
"base" determines which gamemode to inherit settings from. This is important because some map components rely on this to function (e.g. some finales). You can use coop/versus/survival/scavenge/realism, or an existing mutation.

singlechapter should be set to 1 for e.g. scavenge/survival, 0 for coop/versus.

hasdifficulty sets the default difficulty, one of 0/1/2/3. Can still be changed in-game.

-In C:\Program Files\Steam\steamapps\common\Left 4 Dead 2\left4dead2\scripts\vscripts create a file named 'mutationname.nut' with the following code:

Code:
MutationOptions <-
{

}
DirectorOptions <-
{	

	
}

function OnGameEvent_round_start_post_nav( params )
{
   if ( SessionState.MapName == "c10m4_mainstreet" )
				{
					local relay = Entities.FindByName( null, "forklift_relay" );
					if ( relay )
					{
						EntityOutputs.RemoveOutput( relay, "OnTrigger", "director", "BeginScript", "c10m4_onslaught" );
						EntityOutputs.AddOutput( relay, "OnTrigger", "director", "ForcePanicEvent", "", 9.0, -1 );
					}
					EntFire( "onslaught1", "Kill" );
				}
				else if ( SessionState.MapName == "c11m4_terminal" )
				{
					local van = Entities.FindByName( null, "van_button" );
					if ( van )
					{
						EntityOutputs.RemoveOutput( van, "OnPressed", "@director", "", "" );
						EntityOutputs.AddOutput( van, "OnPressed", "@director", "ForcePanicEvent", "", 3.0, -1 );
					}
					local relay = Entities.FindByName( null, "alarm_on_relay" );
					if ( relay )
					{
						EntityOutputs.RemoveOutput( relay, "OnTrigger", "@director", "", "" );
						EntityOutputs.RemoveOutput( relay, "OnTrigger", "alarm_safety_relay", "", "" );
						EntityOutputs.AddOutput( relay, "OnTrigger", "@director", "ForcePanicEvent", "", 0.0, -1 );
						EntityOutputs.AddOutput( relay, "OnTrigger", "alarm_off_relay", "Trigger", "", 15.0, -1 );
					}
					EntFire( "van_follow_trigger", "Kill" );
					EntFire( "van_endscript_relay", "Kill" );
					EntFire( "onslaught_hint_trigger", "Kill" );
				}
				else if ( SessionState.MapName == "c12m3_bridge" )
				{
					
					local relay = Entities.FindByName( null, "train_engine_relay" );
					printl(relay) //([0] logic_relay: train_engine_relay)
					if ( relay )
					{
						EntityOutputs.RemoveOutput( relay, "OnTrigger", "director", "BeginScript", "c12m3_onslaught" );
						EntityOutputs.AddOutput( relay, "OnTrigger", "director", "ForcePanicEvent", "", 2.0, -1 );
					}
					EntFire( "zombie_spawn1", "Kill" );
					EntFire( "onslaught_hint_template", "Kill" );
				}
				else if ( SessionState.MapName == "c12m4_barn" )
				{
					EntFire( "window_trigger", "Kill" );
				}
}
The function OnGameEvent_round_start_post_nav is executed on map load.

Entities.FindByName finds an entity. This is where stripper is useful - in the stripper dump file, look for the "targetname" field, e.g. "targetname" "forklift_relay" for c10m4_mainstreet. In there there's a line that says "OnTrigger" "director BeginScript c10m4_onslaught 7 -1". If you want to remove this using vscript, you get
EntityOutputs.RemoveOutput( relay, "OnTrigger", "director", "BeginScript", "c10m4_onslaught" );

If you want to replace the gauntlet with a regular horde you can add EntityOutputs.AddOutput( relay, "OnTrigger", "director", "ForcePanicEvent", "", 9.0, -1 ); The first number is the delay in seconds before it starts.

For other gauntlets it's a bit of a puzzle so let me know if anyone figures anything out. E.g. the corn field in Blood Harvest has a gauntlet, and I had to use

Code:
local relay = Entities.FindByName(null, "cornfield_trigger");
					if ( relay )
					{
						EntFire("@director","Kill");
					}
However, I haven't managed to spawn a horde there instead.

To play your mutation simply use the following console command:

Code:
map mapname mutationname difficulty
Where mapname is the name of the map, e.g. c12m1_hilltop, mutationname is the name of the mutation, and difficulty is one of Easy, Normal, Hard, Impossible.



EDIT:

I've finished the mutation and uploaded the files here. To run them:
-Place nogauntlets.txt in ~\Steam\steamapps\common\Left 4 Dead 2\left4dead2\modes.
-Rename nogauntlets.nut.txt to nogauntlets.nut and place it in ~\Steam\steamapps\common\Left 4 Dead 2\left4dead2\scripts\vscripts.
-Start L4D2, open a console, type the command 'map mapname nogauntlets difficulty', and hit enter.
---Here, mapname should be the filename of the map you want to play (e.g. c12m1_hilltop - if you just type 'map c' it'll try to autocomplete and you can use the arrow keys to search through the maps).
---difficulty should be the difficulty level you want, where you can choose from Easy/Normal/Hard/Impossible.
---So, for example, to play Dark Carnival without gauntlets on advanced, use the command 'map c2m1_highway nogauntlets Hard'.

NOTE! This does not remove the gauntlet finales - the hordes in the Dead Center and Cold Stream finales will still be endless (otherwise they're a horde followed by a long, boring, walk). However, you can remove them by adding the following to the script:

Code:
function Update()
{
   director_panic_forever = 0
}
EDIT2: The code for c12m4_barn doesn't work. It needs to be this:

Code:
				else if ( SessionState.MapName == "c12m4_barn" )
				{
					local relay = Entities.FindByName( null, "window_trigger" );
					if ( relay )
					{

						EntityOutputs.RemoveOutput( relay, "OnTrigger", "director", "BeginScript", "c12m4_onslaught" );
						EntityOutputs.RemoveOutput( relay, "OnTrigger", "zombie_spawn_relay", "Trigger", "" );
						EntityOutputs.RemoveOutput( relay, "OnTrigger", "onslaught", "GenerateGameEvent", "" );
						//EntityOutputs.AddOutput( relay, "OnTrigger", "director", "ForcePanicEvent", "", 4.0, -1 );
					}
					local relay2 = Entities.FindByName( null, "zombie_spawn_relay" );
					if ( relay2 )
					{

						EntityOutputs.RemoveOutput( relay2, "OnTrigger", "spawn_zombie_run", "SpawnZombie", "" );
						EntityOutputs.RemoveOutput( relay2, "OnTrigger", "spawn_zombie_end", "SpawnZombie", "" );
					}
					local relay3 = Entities.FindByModel( null, "*173" );
					if ( relay3 )
					{
						EntityOutputs.RemoveOutput( relay3, "OnTrigger", "director", "BeginScript", "c12m4_reserved_wanderers" );
					}
				}
Remove the comment tag // if you want a regular mob to appear.
Attached Files
File Type: txt nogauntlets.txt (292 Bytes, 14 views)
File Type: txt nogauntlets.nut.txt (9.0 KB, 11 views)

Last edited by raptor777777; 11-12-2023 at 08:14. Reason: fix to c12m4_barn
raptor777777 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 11:36.


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