L4D2 Level Design/Gauntlet Finale: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
m (→‎director_gauntlet.nuc: Removed redundancy)
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{otherlang2
{{LanguageBar}}
| zh-cn=L4D2 Level Design/Gauntlet Finale:zh-cn}}
{{L4D2 level intro menu}}
{{L4D2 level intro menu}}
{{update}}
{{update}}
Line 11: Line 10:
A gauntlet mainly consists of [[L4D Level Design/Finale Events Part 1|standard finale components]] with a few new additions and modifications:
A gauntlet mainly consists of [[L4D Level Design/Finale Events Part 1|standard finale components]] with a few new additions and modifications:


*trigger_finale set to gauntlet
*The [[trigger_finale]] uses "Gauntlet" as Finale Type setting.
*info_target, targetname "nav_flow_target"
*A [[info_target]], named "nav_flow_target" at the end of the map close to the rescue vehicle, but not on navmesh marked with [[List_of_L4D_Series_Nav_Mesh_Attributes|Rescue_Vehicle]]. Else it will be blocked and Nav Flow won't generate.
*Rescue closets are absent but should work if they are added. Consider adding one if there is combat before reaching the finale area.
*Rescue closets are usually absent but should work if they are added. Consider adding one if there is combat before reaching the finale area.
*Dependency on director_gauntlet.nut vscript
*Finales depend on director_gauntlet.nuc vscript by default, even without setting the "Script File" field.<br>
{{note|Defining a different script in the "Script File" field will first run the default director_gauntlet and second it will launch whatever script you defined.}}


The gauntlet finale structure is not very flexible and workarounds should be taken into consideration. Only one tank is allowed before the escape vehicle is ready. director_debug 1 shows that it is considered an escape sequence by the second time GauntletStopPanic is fired at trigger_finale.
The gauntlet finale structure is not very flexible and workarounds should be taken into consideration. Only one tank is allowed before the escape vehicle is ready. director_debug 1 shows that it is considered an escape sequence by the second time GauntletStopPanic is fired at trigger_finale.


== VScript ==
== director_gauntlet.nuc ==
This is the original Gauntlet Finale script, should you want to tweak it for your own purposes.
<source lang=js>
Msg("Initiating Gauntlet\n");
 
DirectorOptions <-
{
PanicForever = true
PausePanicWhenRelaxing = true
 
IntensityRelaxThreshold = 0.99
RelaxMinInterval = 25
RelaxMaxInterval = 35
RelaxMaxFlowTravel = 400
 
LockTempo = 0
SpecialRespawnInterval = 20
PreTankMobMax = 20
ZombieSpawnRange = 3000
ZombieSpawnInFog = true
 
MobSpawnSize = 5
CommonLimit = 5
 
GauntletMovementThreshold = 500.0
GauntletMovementTimerLength = 5.0
GauntletMovementBonus = 2.0
GauntletMovementBonusMax = 30.0
 
// length of bridge to test progress against.
BridgeSpan = 20000
 
MobSpawnMinTime = 5
MobSpawnMaxTime = 5
 
MobSpawnSizeMin = 5
MobSpawnSizeMax = 20
 
minSpeed = 50
maxSpeed = 200
 
speedPenaltyZAdds = 15
 
CommonLimitMax = 30
 
function RecalculateLimits()
{
//Increase common limit based on progress 
    local progressPct = ( Director.GetFurthestSurvivorFlow() / BridgeSpan )
   
    if ( progressPct < 0.0 ) progressPct = 0.0;
    if ( progressPct > 1.0 ) progressPct = 1.0;
   
    MobSpawnSize = MobSpawnSizeMin + progressPct * ( MobSpawnSizeMax - MobSpawnSizeMin )
 
 
//Increase common limit based on speed 
    local speedPct = ( Director.GetAveragedSurvivorSpeed() - minSpeed ) / ( maxSpeed - minSpeed );
 
    if ( speedPct < 0.0 ) speedPct = 0.0;
    if ( speedPct > 1.0 ) speedPct = 1.0;
 
    MobSpawnSize = MobSpawnSize + speedPct * ( speedPenaltyZAdds );
   
    CommonLimit = MobSpawnSize * 1.5
   
    if ( CommonLimit > CommonLimitMax ) CommonLimit = CommonLimitMax;
   
 
}
}
 
function Update()
{
DirectorOptions.RecalculateLimits();
}
</source>
 
=== Tips ===
==== Bridge Span Value ====
The script has a "BridgeSpan" Setting which determines how long the Gauntlet area will be, which is used to calculate progression in Versus.<br>
This Value is in units, which can easily be taken in [[Hammer]] by just creating a brush entity with one side at the [[trigger_finale]] while the other is where the rescue vehicle will be.<br>
As seen in the picture below, this brush entity will be 20096.0 units wide. So the script is set to 20000 units to make the numbers round.
[[File:Gauntlet bridge span helper.png|1500px|left]]
{{clr}}


A custom vscript seems possible by loading up a different vscript with trigger_finale.
==See also==
==See also==
[[L4D2 Level Design]]
[[L4D2 Level Design]]

Latest revision as of 18:53, 5 August 2025

English (en)中文 (zh)Translate (Translate)
Broom icon.png
This article or section needs to be updated to include current information regarding the subject.
Remember to check for any notes left by the tagger at this article's talk page.

Stub

This article or section is a stub. You can help by expanding it.

Left 4 Dead 2 Gauntlet Finales were introduced in The Parish campaign. Rather than having the player holdout in an enclosed arena, gauntlets force players to run to the end of the level, where the rescue vehicle is already waiting for them. In The Parish, the players must run across a bridge to make it to a rescue helicopter.

You may wish to follow along with the decompiled map this article is based off of, c5m5_bridge.vmf.

Overview

A gauntlet mainly consists of standard finale components with a few new additions and modifications:

  • The trigger_finale uses "Gauntlet" as Finale Type setting.
  • A info_target, named "nav_flow_target" at the end of the map close to the rescue vehicle, but not on navmesh marked with Rescue_Vehicle. Else it will be blocked and Nav Flow won't generate.
  • Rescue closets are usually absent but should work if they are added. Consider adding one if there is combat before reaching the finale area.
  • Finales depend on director_gauntlet.nuc vscript by default, even without setting the "Script File" field.
Note.pngNote:Defining a different script in the "Script File" field will first run the default director_gauntlet and second it will launch whatever script you defined.

The gauntlet finale structure is not very flexible and workarounds should be taken into consideration. Only one tank is allowed before the escape vehicle is ready. director_debug 1 shows that it is considered an escape sequence by the second time GauntletStopPanic is fired at trigger_finale.

director_gauntlet.nuc

This is the original Gauntlet Finale script, should you want to tweak it for your own purposes.

Msg("Initiating Gauntlet\n");

DirectorOptions <-
{
	PanicForever = true
	PausePanicWhenRelaxing = true

	IntensityRelaxThreshold = 0.99
	RelaxMinInterval = 25
	RelaxMaxInterval = 35
	RelaxMaxFlowTravel = 400

	LockTempo = 0
	SpecialRespawnInterval = 20
	PreTankMobMax = 20
	ZombieSpawnRange = 3000
	ZombieSpawnInFog = true

	MobSpawnSize = 5
	CommonLimit = 5

	GauntletMovementThreshold = 500.0
	GauntletMovementTimerLength = 5.0
	GauntletMovementBonus = 2.0
	GauntletMovementBonusMax = 30.0

	// length of bridge to test progress against.
	BridgeSpan = 20000

	MobSpawnMinTime = 5
	MobSpawnMaxTime = 5

	MobSpawnSizeMin = 5
	MobSpawnSizeMax = 20

	minSpeed = 50
	maxSpeed = 200

	speedPenaltyZAdds = 15

	CommonLimitMax = 30

	function RecalculateLimits()
	{
	//Increase common limit based on progress  
	    local progressPct = ( Director.GetFurthestSurvivorFlow() / BridgeSpan )
	    
	    if ( progressPct < 0.0 ) progressPct = 0.0;
	    if ( progressPct > 1.0 ) progressPct = 1.0;
	    
	    MobSpawnSize = MobSpawnSizeMin + progressPct * ( MobSpawnSizeMax - MobSpawnSizeMin )


	//Increase common limit based on speed   
	    local speedPct = ( Director.GetAveragedSurvivorSpeed() - minSpeed ) / ( maxSpeed - minSpeed );

	    if ( speedPct < 0.0 ) speedPct = 0.0;
	    if ( speedPct > 1.0 ) speedPct = 1.0;

	    MobSpawnSize = MobSpawnSize + speedPct * ( speedPenaltyZAdds );
	    
	    CommonLimit = MobSpawnSize * 1.5
	    
	    if ( CommonLimit > CommonLimitMax ) CommonLimit = CommonLimitMax;
	    

	}
}

function Update()
{
	DirectorOptions.RecalculateLimits();
}

Tips

Bridge Span Value

The script has a "BridgeSpan" Setting which determines how long the Gauntlet area will be, which is used to calculate progression in Versus.
This Value is in units, which can easily be taken in Hammer by just creating a brush entity with one side at the trigger_finale while the other is where the rescue vehicle will be.
As seen in the picture below, this brush entity will be 20096.0 units wide. So the script is set to 20000 units to make the numbers round.

Gauntlet bridge span helper.png

See also

L4D2 Level Design