Left 4 Dead 2/Scripting/Director Scripts: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (→‎Gauntlet Specific/Related: CustomTankKiteDistance)
(Various parts reworded, and various keyvalues have extra info.... Preview the changes to see the whole thing)
Line 4: Line 4:
|zh-cn=L4D2_Director_Scripts:zh-cn
|zh-cn=L4D2_Director_Scripts:zh-cn
}}
}}


{{toc-right}}{{sq}}{{l4d2}} '''Left 4 Dead 2 Director scripts''' are [[L4D2_Vscripts|vscripts]] that are primarily used to influence the behavior of the AI Director. They are extensively used for custom finales and gauntlet events.  
{{toc-right}}{{sq}}{{l4d2}} '''Left 4 Dead 2 Director scripts''' are [[L4D2_Vscripts|vscripts]] that are primarily used to influence the behavior of the AI Director. They are extensively used for custom finales and gauntlet events.  
== Usage ==
== Usage ==
Director scripts typically contain a table named [[#DirectorOptions|<i>DirectorOptions</i>]], which contains variables that change up the decision making of the Director. They can be ran / stopped with the following inputs to the [[info_director]] entity:
{{IO|BeginScript|Run a Director script, and parse its DirectorOptions table once. If a Director script is already running and this input is called, the previous Director script automatically stops running.|param=string}}
{{IO|EndScript|Ends the running script and resets the Director options to either the map's DirectorOption values, or the default settings.}}
{{IO|ScriptedPanicEvent|With the script name given it'll be ran as a Scripted Panic Event, which is like a mini finale, so the script should be structured as a finale script.|param=string}}


Director scripts are executed with inputs to the [[info_director]] entity. A [[#DirectorOptions|<code>DirectorOptions</code>]] table is used to give new temporary values for the variables the director uses for decision making. Additional commands can be accessed through the [[List_of_L4D2_Script_Functions#CDirector|<code>Director</code>]] object. Only one Director script can be running at a time.
{{note|Scripts used with <code>ScriptedPanicEvent</code> will not work if they are in a subdirectory under the<code>vscripts</code>folder, even though you can use subdirectories in other script contexts. If they don't reside under the vscripts folder, they will simply act as a 1 stage 1 second delay Panic Event.}}
 
=== Inputs ===
;<code>BeginScript <''script name''></code>
:Executes a generic Director script, for example for onslaught events or changing spawning behavior.
;<code>EndScript</code>
:Ends the running script and resets the Director options to the map specific values.
;<code>BeginScriptedPanicEvent <''script name''></code>
:Begins a Scripted Panic Event.
 
{{note|Scripts used with <code>BeginScriptedPanicEvent</code> will not work if they are in a subdirectory, even though you can use subdirectories in other script contexts. They must reside under the vscripts folder, or they will simply act as a 1 stage 1 second delay.}}


There is too, a [[List_of_L4D2_Script_Functions#CDirector|<i>CDirector</i>]] object for VScripts, which its extra functions can be paired for customizing your Director scripts.


== General scripts and Onslaughts ==
== General scripts and Onslaughts ==
Line 29: Line 22:


<code>c2m4_barns_onslaught.nut</code> (with annotations):
<code>c2m4_barns_onslaught.nut</code> (with annotations):
{{ScrollBox|<source lang=cpp>
{{ScrollBox|<source lang=js>
Msg("Initiating Onslaught\n");
Msg("Initiating Onslaught\n");


Line 77: Line 70:
Finales and Scripted Panic Events consist of a number of different kind of stages set in <code>DirectorOptions</code>.  
Finales and Scripted Panic Events consist of a number of different kind of stages set in <code>DirectorOptions</code>.  


The Director script for the finale is always loaded from <code><''map name''>_finale.nut</code>. Scripted panic events are launched from the [[info_director]] <code>BeginScriptedPanicEvent</code> input.  
The Director script for the finale is always loaded from <code><''map name''>_finale.nut</code>. Scripted panic events are initiated from the [[info_director]] <code>ScriptedPanicEvent</code> input.  
{{bug|While the trigger_finale entity has an option to specify a script, it is non-functional.}}
{{bug|While the trigger_finale entity has an option to specify a script, it is non-functional.}}


A stage can be one of 4 types (other values will break the finale and go right to ESCAPE):
A stage can be one of 4 types (other values will break the finale and go right to ESCAPE):
Line 86: Line 78:
*DELAY - A delay, the value is the number of seconds to wait before proceeding to the next stage.
*DELAY - A delay, the value is the number of seconds to wait before proceeding to the next stage.
*SCRIPTED (also called ONSLAUGHT) - The value should be the name of a VScript to call or "" (which will do nothing), any bad value here will crash you to the desktop. Your script is responsible for sending an <code>EndCustomScriptedStage</code> input to the director (a goal of your choice, like a certain trigger volume, timer, random value, etc.). [[trigger_finale]] input <code>AdvanceFinaleState</code> may also work. Otherwise, the '''onslaught will not end.'''
*SCRIPTED (also called ONSLAUGHT) - The value should be the name of a VScript to call or "" (which will do nothing), any bad value here will crash you to the desktop. Your script is responsible for sending an <code>EndCustomScriptedStage</code> input to the director (a goal of your choice, like a certain trigger volume, timer, random value, etc.). [[trigger_finale]] input <code>AdvanceFinaleState</code> may also work. Otherwise, the '''onslaught will not end.'''
{{bug|In Scripted Panic Events, sending an <code>EndCustomScriptedStage</code> input ends it immediately.}}
:{{bug|Sending an <code>EndCustomScriptedStage</code> input ends the Scripted Panic Event immediately.}}
:{{bug|After a Scripted Panic Events ends, the last stage of the event will repeat itself with the lowest valid value. So with PANIC and TANK stages, they will repeat once again with 1x spawn wave / spawn count, while for DELAY and SCRIPTED stages, nothing undesired will happen.}}


An example custom finale script:
An example custom finale script:
Line 99: Line 92:
{
{
//-----------------------------------------------------
//-----------------------------------------------------
A_CustomFinale_StageCount = 8 // Number of stages. Used for calculating the Versus score.
A_CustomFinale_StageCount = 4 // Number of stages. Used for calculating the Versus score.
B_CustomFinale_StageCount = 4 // Number of stages for the alternate B finale type
A_CustomFinale1 = PANIC
A_CustomFinaleValue1 = 2   // Two panic waves.
A_CustomFinale1 = PANIC
A_CustomFinaleValue1 = 2 // Two panic waves.
A_CustomFinale2 = DELAY
A_CustomFinaleValue2 = 12 // Delay for twelve seconds in addition to stage delay.
A_CustomFinale2 = DELAY
A_CustomFinaleValue2 = 12 // Delay for twelve seconds in addition to stage delay.
A_CustomFinale3 = TANK
A_CustomFinaleValue3 = 3 // 3 tanks!
A_CustomFinale3 = TANK
A_CustomFinaleValue3 = 3 // 3 tanks!
A_CustomFinale4 = DELAY
A_CustomFinaleValue4 = 12 // Wait some more.
A_CustomFinale4 = DELAY
A_CustomFinaleValue4 = 6 // Wait some more... and its rescue for Finale Type A!
A_CustomFinale5 = SCRIPTED
A_CustomFinaleValue5 = "my_scripted_stage.nut" // Run a custom scripted stage using a separate script.
B_CustomFinale1 = SCRIPTED
B_CustomFinaleValue1 = "my_challenging_scripted_stage" // Start of with running a custom scripted stage using a separate script.
A_CustomFinale6 = DELAY
A_CustomFinaleValue6 = 15 // Wait 15 seconds.
B_CustomFinale2 = DELAY
B_CustomFinaleValue2 = 15 // Wait 15 seconds.
A_CustomFinale7 = TANK
A_CustomFinaleValue7 = 1 // One more tank.
B_CustomFinale3 = TANK
 
B_CustomFinaleValue3 = 1 // One more tank.
A_CustomFinale8 = DELAY
A_CustomFinaleValue8 = 10 // Wait ten seconds ... rescue!


B_CustomFinale4 = DELAY
B_CustomFinaleValue4 = 10 // Wait ten seconds ... rescue for Finale Type B!


//-----------------------------------------------------
//-----------------------------------------------------


CommonLimit = 10
CommonLimit = 10
SpecialRespawnInterval = 25
SpecialRespawnInterval = 25
}
}


function OnBeginCustomFinaleStage( num, type ) // This function is run at the beginning of every stage.
function OnBeginCustomFinaleStage( num, type ) // This function is run at the beginning of every stage.
{
{
      printl( "Beginning custom finale stage #" + num + " of type: " + type )
printl( "Beginning custom finale stage #" + num + " of type: " + type )
      DirectorOptions.CommonLimit = num * 5 // Increase commons by 5 linearly with stages.
if( num != 1 && DirectorOptions.CommonLimit < 30 )
}</source>}}
DirectorOptions.CommonLimit = num * 5 // Increase commons by 5 linearly with stages.
}
</source>}}


== Adaptive Dramatic Pacing ==
== Adaptive Dramatic Pacing ==
Line 149: Line 144:
*'''<code>void OnBeginCustomFinaleStage(int ''num'', int ''type'')</code>'''
*'''<code>void OnBeginCustomFinaleStage(int ''num'', int ''type'')</code>'''
:If defined, will be called on every stage change with the number, and type, this is how you would change director options between stages (spawn directions, etc). <code>num</code> refers to the finale stage number passed by the director and <code>type</code> is the stage type (PANIC, TANK, etc.).
:If defined, will be called on every stage change with the number, and type, this is how you would change director options between stages (spawn directions, etc). <code>num</code> refers to the finale stage number passed by the director and <code>type</code> is the stage type (PANIC, TANK, etc.).
:{{bug|The [[List_of_L4D2_Script_Functions#CEntities|<i>CEntities</i>]] object will not work properly in this callback, always returning the default value ''null'' every tick until Squirrel terminates the script.}}


*'''<code>function OnChangeFinaleMusic()</code>'''  
*'''<code>function OnChangeFinaleMusic()</code>'''  
Line 313: Line 309:
|int
|int
|
|
|When a mob gets to this size we think about stopping the mob music.
|When a mob gets to this size, the Director thinks about stopping the mob music.
|-
|-
|<code>NumReservedWanderers</code>  
|<code>NumReservedWanderers</code>  
Line 339: Line 335:
|
|
|Valid flags are: <code>SPAWN_ABOVE_SURVIVORS, SPAWN_ANYWHERE, SPAWN_BEHIND_SURVIVORS, SPAWN_FAR_AWAY_FROM_SURVIVORS, SPAWN_IN_FRONT_OF_SURVIVORS, SPAWN_LARGE_VOLUME, SPAWN_NEAR_IT_VICTIM, SPAWN_NO_PREFERENCE</code>  
|Valid flags are: <code>SPAWN_ABOVE_SURVIVORS, SPAWN_ANYWHERE, SPAWN_BEHIND_SURVIVORS, SPAWN_FAR_AWAY_FROM_SURVIVORS, SPAWN_IN_FRONT_OF_SURVIVORS, SPAWN_LARGE_VOLUME, SPAWN_NEAR_IT_VICTIM, SPAWN_NO_PREFERENCE</code>  
{{note|<code>SPAWN_NEAR_IT_VICTIM</code> does not exist before a finale and will cause an error, so I'm assuming the director picks someone as IT when the finale starts. <code>SPAWN_LARGE_VOLUME</code> is what makes you be a mile away on DC finale.}}
{{note|<code>SPAWN_NEAR_IT_VICTIM</code> does not exist before a finale and will cause an error, so I'm assuming the director picks someone as IT when the finale starts.}}
{{note|<code>SPAWN_LARGE_VOLUME</code>is what makes infected be a considerable distance away, like on Dead Center finale. For technically familiar people thinking its too vague,<code>SPAWN_LARGE_VOLUME</code> makes infected spawning use a big imaginary box, having its bounds set by commands. The Director also prefers to spawn the infected in multiple spawn areas, and always ensures its at least quite a distance away from the survivors.}}
|-
|-
|<code>PreferredMobPosition</code>  
|<code>PreferredMobPosition</code>  
Line 359: Line 356:
|<code>ProhibitBosses</code>  
|<code>ProhibitBosses</code>  
|bool
|bool
|
|false
|Prohibits tanks and witches from being spawned by the Director. Only functional in coop mode.
|Prohibits tanks and witches from being spawned by the Director. Campaign modes only.
|-
|-
|<code>RelaxMaxFlowTravel</code>  
|<code>RelaxMaxFlowTravel</code>  
Line 379: Line 376:
|<code>ShouldAllowMobsWithTank</code>  
|<code>ShouldAllowMobsWithTank</code>  
|bool
|bool
|
|false
|Whether to spawn mobs when a tank is in play. {{todo|confirm category/working; possibly finale specific}}
|Whether to allow spawning of infected mobs (except Boomer / Bile Bomb spawned mobs) when a tank is in play. Campaign modes only.
|-
|-
|<code>ShouldAllowSpecialsWithTank</code>  
|<code>ShouldAllowSpecialsWithTank</code>  
|bool
|bool
|
|false
|Whether to spawn Special Infected when a tank is in play. {{todo|confirm category/working; possibly finale specific}}
|Whether to allow spawning of Special Infected when a tank is in play. Campaign modes only.
|-
|-
|<code>ShouldConstrainLargeVolumeSpawn</code>  
|<code>ShouldConstrainLargeVolumeSpawn</code>  
|bool
|bool
|
|false
|{{todo|confirm category/working}}
|<code>SPAWN_LARGE_VOLUME</code> only. Makes the Director have a bias for spawning infected closer to the survivors, instead of a considerable distance away.
|-
|-
|<code>ShouldIgnoreClearStateForSpawn</code>  
|<code>ShouldIgnoreClearStateForSpawn</code>  
Line 403: Line 400:
|-
|-
|<code>SpecialInfectedAssault</code>  
|<code>SpecialInfectedAssault</code>  
|
|bool
|
|
|{{todo|confirm category/working}}
|{{todo|confirm category/working}}
Line 409: Line 406:
|<code>SpecialInitialSpawnDelayMax</code>  
|<code>SpecialInitialSpawnDelayMax</code>  
|float
|float
|
|60.0
|
|Specials cannot spawn for this many time maximum after the survivors exited the saferoom. Campaign modes only.
|-
|-
|<code>SpecialInitialSpawnDelayMin</code>  
|<code>SpecialInitialSpawnDelayMin</code>  
|float
|float
|
|30.0
|
|Specials cannot spawn for this many time minimum after the survivors exited the saferoom. Campaign modes only.
|-
|-
|<code>SpecialRespawnInterval</code>  
|<code>SpecialRespawnInterval</code>  
|float
|float
|
|45 in Campaign, 20 in Versus
|Time in seconds before a Special Infected slot can respawn an infected.
|Time in seconds before a Special Infected slot can respawn an infected.
|-
|-
Line 440: Line 437:
|float
|float
|1.0
|1.0
|(mutation1.nut Last Man on Earth) {{todo|confirm category}}
|Modifies the damage dealt by Tanks.
|-
|-
|<code>TankRunSpawnDelay</code>  
|<code>TankRunSpawnDelay</code>  
Line 459: Line 456:
|<code>ZombieDiscardRange</code>  
|<code>ZombieDiscardRange</code>  
|int
|int
|
|2500
|{{todo|possibly range for despawning wanderers}}
|Any CI beyond this point will be deleted, while any AI-controlled SI will suicide.
|-
|-
|<code>ZombieDontClear</code>  
|<code>ZombieDontClear</code>  
Line 692: Line 689:
! Description
! Description
|-
|-
|<code>''A''_CustomFinale_StageCount</code>  
|<code>''[A-Z]''_CustomFinale_StageCount</code>  
|int
|int
|
|
|Number of stages. Needs to be set for Versus scoring to function properly.
|Number of stages. Needs to be set for Versus scoring to function properly.
|-
|-
|<code>''A''_CustomFinale''X''</code>  
|<code>''[A-Z]''_CustomFinale''X''</code>  
|int
|int
|
|
|Stage type (enumerated PANIC, SCRIPTED (AKA ONSLAUGHT), DELAY, TANK), where X is the stage number. Also used in scripted panic events.
|Stage type (enumerated PANIC, SCRIPTED (AKA ONSLAUGHT), DELAY, TANK), where X is the corresponding stage number. Usable in scripted panic events.
|-
|-
|<code>''A''_CustomFinaleValue''X''</code>  
|<code>''[A-Z]''_CustomFinaleValue''X''</code>  
|*
|*
|
|
|Value depends on the stage type above. Also used in scripted panic events. Please see the example above.
|Value depends on the stage type above. Usable in scripted panic events.
|-
|-
|<code>''A''_CustomFinaleMusic''X''</code>  
|<code>''[A-Z]''_CustomFinaleMusic''X''</code>  
|string
|string
|
|
|[[Soundscript]] entry to play. For instance, <code>A_CustomFinaleMusic1 = "C2M5.BadManTank2"</code>. Note that c2m5_concert_finale.nut does not use this method and instead opted to use entities within the map instead. In the c2m5 script <code>A_CustomFinaleMusic4 = ""</code>, suggesting that no song is actually played automatically via script.
|[[Soundscript]] entry to play. For instance, <code>A_CustomFinaleMusic1 = "C2M5.BadManTank2"</code>. Note, Dark Carnival - Concert finale does not use this method! It instead opted to use entities ([[ambient_music]], [[math_counter]] and [[info_director]]) within the map instead for playing music. In the <code>c2m5_concert_finale.nut</code>, You can see lines such as<code>A_CustomFinaleMusic4 = ""</code>, suggesting that no song is played automatically via script.
|-
|-
|<code>EnforceFinaleNavSpawnRules</code>  
|<code>EnforceFinaleNavSpawnRules</code>  
Line 730: Line 727:
|int
|int
|
|
|The minimum amount of time a SCRIPTED stage is allowed to run before ending.
|The minimum amount of time a SCRIPTED stage is allowed to run before ending. Unavailable for Scripted Panic Events when it should been, unfortunately.
|}
|}


Line 761: Line 758:
|<code>GauntletMovementThreshold</code>  
|<code>GauntletMovementThreshold</code>  
|float
|float
|
|500.0
|The amount of flow units the survivors can advance before the Movement Bonus is reset.
|The amount of flow units the survivors can advance before the Movement Bonus is reset.
|-
|-
|<code>GauntletMovementTimerLength</code>  
|<code>GauntletMovementTimerLength</code>  
|float
|float
|
|5.0
|The interval between each Movement Bonus increase, in seconds.
|The interval between each Movement Bonus increase, in seconds.
|-
|-
|<code>GauntletMovementBonus</code>  
|<code>GauntletMovementBonus</code>  
|float
|float
|
|2.0
|The initial value, and the amount the movement Bonus increases each interval, in seconds.
|The initial value, and the amount the movement Bonus increases each interval, in seconds.
|-
|-
|<code>GauntletMovementBonusMax</code>  
|<code>GauntletMovementBonusMax</code>  
|float
|float
|
|30.0
|The maximum value that the Movement Bonus can reach.
|The maximum value that the Movement Bonus can reach.
|}
|}

Revision as of 08:54, 23 March 2021

Template:Otherlang2

SquirrelLeft 4 Dead 2 Left 4 Dead 2 Director scripts are vscripts that are primarily used to influence the behavior of the AI Director. They are extensively used for custom finales and gauntlet events.

Usage

Director scripts typically contain a table named DirectorOptions, which contains variables that change up the decision making of the Director. They can be ran / stopped with the following inputs to the info_director entity:

BeginScript <stringRedirectInput/string>
Run a Director script, and parse its DirectorOptions table once. If a Director script is already running and this input is called, the previous Director script automatically stops running.
EndScript
Ends the running script and resets the Director options to either the map's DirectorOption values, or the default settings.
ScriptedPanicEvent <stringRedirectInput/string>
With the script name given it'll be ran as a Scripted Panic Event, which is like a mini finale, so the script should be structured as a finale script.
Note.pngNote:Scripts used with ScriptedPanicEvent will not work if they are in a subdirectory under thevscriptsfolder, even though you can use subdirectories in other script contexts. If they don't reside under the vscripts folder, they will simply act as a 1 stage 1 second delay Panic Event.

There is too, a CDirector object for VScripts, which its extra functions can be paired for customizing your Director scripts.

General scripts and Onslaughts

Scripts launched with the BeginScript Director input run until a different script is launched, or the script is manually ended with the EndScript input. Unless new Director Options are set, the gameplay continues on as normally.

Onslaught events are created by manipulating the pacing and spawn limits of mobs and special infected.

c2m4_barns_onslaught.nut (with annotations):

Msg("Initiating Onslaught\n");

DirectorOptions <-
{
	// This turns off tanks and witches (when true).
	ProhibitBosses = false
	
	//LockTempo = true

	// Sets the time between mob spawns. Mobs can only spawn when the pacing is in the BUILD_UP state.
	MobSpawnMinTime = 1
	MobSpawnMaxTime = 1

	// How many zombies are in each mob.
	MobMinSize = 30
	MobMaxSize = 30
	MobMaxPending = 30

	// Modifies the length of the SUSTAIN_PEAK and RELAX states to shorten the time between mob spawns.
	SustainPeakMinTime = 5
	SustainPeakMaxTime = 10
	IntensityRelaxThreshold = 0.99
	RelaxMinInterval = 1
	RelaxMaxInterval = 5
	RelaxMaxFlowTravel = 50

	//Special infected options
	SpecialRespawnInterval = 1.0
        SmokerLimit = 2
        JockeyLimit = 0
        BoomerLimit = 0
        HunterLimit = 2
        ChargerLimit = 1

	// Valid spawn locations
	PreferredMobDirection = SPAWN_NO_PREFERENCE
	ZombieSpawnRange = 2000
}

Director.ResetMobTimer()		// Sets the mob spawn timer to 0.
Director.PlayMegaMobWarningSounds()	// Plays the incoming mob sound effect.


Finales and Scripted Panic Events

Finales and Scripted Panic Events consist of a number of different kind of stages set in DirectorOptions.

The Director script for the finale is always loaded from <map name>_finale.nut. Scripted panic events are initiated from the info_director ScriptedPanicEvent input.

Icon-Bug.pngBug:While the trigger_finale entity has an option to specify a script, it is non-functional.  [todo tested in ?]

A stage can be one of 4 types (other values will break the finale and go right to ESCAPE):

  • PANIC - A panic event, the value is the number of waves of infected.
  • TANK - Spawn a tank(s), the value is the number of tanks to spawn.
  • DELAY - A delay, the value is the number of seconds to wait before proceeding to the next stage.
  • SCRIPTED (also called ONSLAUGHT) - The value should be the name of a VScript to call or "" (which will do nothing), any bad value here will crash you to the desktop. Your script is responsible for sending an EndCustomScriptedStage input to the director (a goal of your choice, like a certain trigger volume, timer, random value, etc.). trigger_finale input AdvanceFinaleState may also work. Otherwise, the onslaught will not end.
Icon-Bug.pngBug:Sending an EndCustomScriptedStage input ends the Scripted Panic Event immediately.  [todo tested in ?]
Icon-Bug.pngBug:After a Scripted Panic Events ends, the last stage of the event will repeat itself with the lowest valid value. So with PANIC and TANK stages, they will repeat once again with 1x spawn wave / spawn count, while for DELAY and SCRIPTED stages, nothing undesired will happen.  [todo tested in ?]

An example custom finale script:

const ERROR = -1
const PANIC = 0
const TANK = 1
const DELAY = 2
const SCRIPTED = 3 

DirectorOptions <-
{
	//-----------------------------------------------------
	A_CustomFinale_StageCount = 4 // Number of stages. Used for calculating the Versus score.
	B_CustomFinale_StageCount = 4 // Number of stages for the alternate B finale type
	
	A_CustomFinale1 = PANIC
	A_CustomFinaleValue1 = 2	// Two panic waves.
	
	A_CustomFinale2 = DELAY
	A_CustomFinaleValue2 = 12 	// Delay for twelve seconds in addition to stage delay.
	
	A_CustomFinale3 = TANK
	A_CustomFinaleValue3 = 3 	// 3 tanks!
	
	A_CustomFinale4 = DELAY
	A_CustomFinaleValue4 = 6	// Wait some more... and its rescue for Finale Type A!
	
	B_CustomFinale1 = SCRIPTED
	B_CustomFinaleValue1 = "my_challenging_scripted_stage"	// Start of with running a custom scripted stage using a separate script.
	
	B_CustomFinale2 = DELAY
	B_CustomFinaleValue2 = 15	// Wait 15 seconds.
	
	B_CustomFinale3 = TANK
	B_CustomFinaleValue3 = 1 	// One more tank.

	B_CustomFinale4 = DELAY
	B_CustomFinaleValue4 = 10	// Wait ten seconds ... rescue for Finale Type B!

	//-----------------------------------------------------

	CommonLimit = 10
	SpecialRespawnInterval = 25
}

function OnBeginCustomFinaleStage( num, type ) // This function is run at the beginning of every stage.
{
	printl( "Beginning custom finale stage #" + num + " of type: " + type )
	if( num != 1 && DirectorOptions.CommonLimit < 30 )
		DirectorOptions.CommonLimit = num * 5 // Increase commons by 5 linearly with stages.
}

Adaptive Dramatic Pacing

Todo: Add info from [1]


Callbacks

  • float GetCustomScriptedStageProgress(float defvalue)
Will be called during FINALE_CUSTOM_SCRIPTED stages. The function should return a value from 0-1 to indicate the completion percentage of the stage. The default time-based completion percentage is passed in as a parameter.
  • void OnBeginCustomFinaleStage(int num, int type)
If defined, will be called on every stage change with the number, and type, this is how you would change director options between stages (spawn directions, etc). num refers to the finale stage number passed by the director and type is the stage type (PANIC, TANK, etc.).
Icon-Bug.pngBug:The CEntities object will not work properly in this callback, always returning the default value null every tick until Squirrel terminates the script.  [todo tested in ?]
  • function OnChangeFinaleMusic()
Todo: confirm category/working
  • function OnChangeFinaleStage(?)
Todo: confirm category/working

DirectorOptions

The DirectorOptions table is used for overriding various Director variables that govern among other things, infected spawning, finale stages and more.

Note.pngNote:In mode and map scripts, use the SessionOptions table to influence the director instead, or the MutationOptions/MapOptions tables for initial values. The DirectorOptions table can get overwritten or cleared by map events, and writing a new DirectorOptions on a finale will erase the finale script.


Information about some of the Director Options found in the Steam Forums.


Warning: The Fields interact a lot
For instance, SpecialRespawnInterval is "how long after a special of type X dies can we spawn another one." Setting this fairly high (the default) makes a lot of sense in a flow based movement. Whereas if you are building a mutation where you stay in a single place, or where you want a ton of boomers, keeping it set high means that whenever you kill a boomer there will be a long wait until the Director is allowed to spawn a new one. So you'd want to set this value very low if your mod wants to do that.
This brings up the main point: often things don't work as expected, because the DirectorOptions have been set in ways that conflict, causing unexpected behaviors. You can set 3 variables to get what you want, but a 4th may default to something that thwarts you. So it is worth learning about all the options, because it is very easy to over-constrain the Director. When you see odd behavior, think about what other variables and settings might be interfering with your plans.


Warning: NEVER use the = operator when trying to influence the director. Use <-. The difference is semantics. If you use =, it will throw an error if the table slot isn't defined (like if a previous script didn't define it). <-, on the other hand, will create the variable if it does not exist.


Note.pngNote:The default values are for reference of the values set elsewhere in-game, and do NOT mean that the DirectorOption is set by default.

General

Name Type Default value Description
AddToSpawnTimer
AllowCrescendoEvents bool
AllowWitchesInCheckpoints bool
AlwaysAllowWanderers bool
BuildUpMinInterval
ClearedWandererRespawnChance int Percent chance (0-100) that cleared nav areas will get re-populated with wanderers.
DisallowThreatType int Disallows boss types from being spawned in threat areas in coop mode. Valid flags are: ZOMBIE_WITCH, ZOMBIE_TANK
FallenSurvivorPotentialQuantity int How many fallen survivors can spawn in total.
Todo: Confirm if this still works (in all modes) and is not an obsolete key.
FallenSurvivorSpawnChance float [0...1]
Todo: Confirm if this still works (in all modes) and is not an obsolete key.
FarAcquireRange int 2500 The maximum range common infected can spot survivors.
NearAcquireRange int 200 The range where common infected can spot survivors in the least amount of time.
FarAcquireTime float 5.0 The time it takes for an infected to acquire the survivor after spotting them at maximum range.
NearAcquireTime float 0.5 The time it takes for an infected to acquire the survivor after spotting them at minimum range.
GasCansOnBacks bool Puts the Hard Rain diesel cans on the survivors backs.
IgnoreNavThreatAreas bool Likely prevents bosses from spawning along the nav.
Todo: confirm category/working
InfectedFlags int Applies flags to newly spawned infected. Valid flags are: INFECTED_FLAG_CANT_SEE_SURVIVORS, INFECTED_FLAG_CANT_HEAR_SURVIVORS, INFECTED_FLAG_CANT_FEEL_SURVIVORS
IntensityRelaxAllowWanderersThreshold float
IntensityRelaxThreshold float All survivors must be below this intensity before a Peak is allowed to switch to Relax (in addition to the normal peak timer)
JournalString string
Todo: Used in holdout, seems to build some kind of table.
LockTempo bool false The horde spawning pacing consists of: BUILD_UP -> spawn horde -> SUSTAIN_PEAK -> RELAX -> BUILD_UP again. Setting LockTempo = true removes the "SUSTAIN_PEAK -> RELAX -> BUILD_UP" bit making your hordes spawn constantly without a delay.
MobRechargeRate int Guessing it's the speed at which a mob regenerates (i.e. next mob).
MobSpawnMaxTime int 180-240 Maximum time in seconds between mob spawns. Default value depends on difficulty.
MobSpawnMinTime int 90-120 Minimum time in seconds between mob spawns. Default value depends on difficulty.
MusicDynamicMobScanStopSize int When fewer than this many of a mob are in play, the mob music stops.
MusicDynamicMobSpawnSize int 25 Spawning a mob this large will play the mob music.
MusicDynamicMobStopSize int When a mob gets to this size, the Director thinks about stopping the mob music.
NumReservedWanderers int The number of wandering infected that cannot be despawned for mobs.
NoMobSpawns bool false Prevents new mobs from spawning. Does not reset the timer, and already pending infected still spawn.
PanicForever int This seems to only work in gauntlets.
PausePanicWhenRelaxing bool
Todo: confirm category/working
PreferredMobDirection int Valid flags are: SPAWN_ABOVE_SURVIVORS, SPAWN_ANYWHERE, SPAWN_BEHIND_SURVIVORS, SPAWN_FAR_AWAY_FROM_SURVIVORS, SPAWN_IN_FRONT_OF_SURVIVORS, SPAWN_LARGE_VOLUME, SPAWN_NEAR_IT_VICTIM, SPAWN_NO_PREFERENCE
Note.pngNote:SPAWN_NEAR_IT_VICTIM does not exist before a finale and will cause an error, so I'm assuming the director picks someone as IT when the finale starts.
Note.pngNote:SPAWN_LARGE_VOLUMEis what makes infected be a considerable distance away, like on Dead Center finale. For technically familiar people thinking its too vague,SPAWN_LARGE_VOLUME makes infected spawning use a big imaginary box, having its bounds set by commands. The Director also prefers to spawn the infected in multiple spawn areas, and always ensures its at least quite a distance away from the survivors.
PreferredMobPosition Vector
Todo: confirm category/working; used in dash
PreferredMobPositionRange int
Todo: confirm category/working; used in dash
PreferredSpecialDirection int
Note.pngNote:The same values for PreferredMobDirection appear to work, BUT the following have also been seen, it is unknown if it's just redundancy. SPAWN_SPECIALS_ANYWHERE, SPAWN_SPECIALS_IN_FRONT_OF_SURVIVORS
ProhibitBosses bool false Prohibits tanks and witches from being spawned by the Director. Campaign modes only.
RelaxMaxFlowTravel float How far the survivors can advance along the flow before transitioning from RELAX to BUILD_UP.
RelaxMaxInterval float Maximum seconds to spend in the RELAX tempo.
RelaxMinInterval float Minimum seconds to spend in the RELAX tempo.
ShouldAllowMobsWithTank bool false Whether to allow spawning of infected mobs (except Boomer / Bile Bomb spawned mobs) when a tank is in play. Campaign modes only.
ShouldAllowSpecialsWithTank bool false Whether to allow spawning of Special Infected when a tank is in play. Campaign modes only.
ShouldConstrainLargeVolumeSpawn bool false SPAWN_LARGE_VOLUME only. Makes the Director have a bias for spawning infected closer to the survivors, instead of a considerable distance away.
ShouldIgnoreClearStateForSpawn bool
Todo: confirm category/working
SpawnBehindSurvivorsDistance Appears to require PreferredSpecialDirection = SPAWN_BEHIND_SURVIVORS
SpecialInfectedAssault bool
Todo: confirm category/working
SpecialInitialSpawnDelayMax float 60.0 Specials cannot spawn for this many time maximum after the survivors exited the saferoom. Campaign modes only.
SpecialInitialSpawnDelayMin float 30.0 Specials cannot spawn for this many time minimum after the survivors exited the saferoom. Campaign modes only.
SpecialRespawnInterval float 45 in Campaign, 20 in Versus Time in seconds before a Special Infected slot can respawn an infected.
SurvivorMaxIncapacitatedCount int Maximum amount of survivor incapacitating before dying.
SustainPeakMaxTime float in minutes
SustainPeakMinTime float in minutes
TankHitDamageModifierCoop float 1.0 Modifies the damage dealt by Tanks.
TankRunSpawnDelay float 15 in seconds (mutation19.nut Taaannnkk!)
Todo: confirm category
TempHealthDecayRate float 0.27 0.27 is the pain_pills_decay_rate default, higher values equals quicker decay.
WanderingZombieDensityModifier float 1.0 Multiplier for the amount of wandering infected.
ZombieDiscardRange int 2500 Any CI beyond this point will be deleted, while any AI-controlled SI will suicide.
ZombieDontClear
ZombieSpawnInFog bool false Allows zombies to spawn in in line-of-sight of survivors in fogged areas.
ZombieSpawnRange float Maximum distance from the survivors that the infected can spawn.
ZombieTankHealth int Sets the amount of health a tank spawns with.

Spawning limits

Name Type Default value Description
BileMobSize int Number of commons that spawn when a bile bomb is thrown or a survivor is hit by vomit. Only works if scripted mode is enabled, a custom finale is active, or a scavenge finale is active. Found in Dead Center and The Sacrifice finales.
BoomerLimit int 1 Maximum number of Boomers allowed to be in play simultaneously.
ChargerLimit int 1 Maximum number of chargers allowed to be in play simultaneously.
CommonLimit int 30 Maximum number of commons allowed to be in play simultaneously.
DominatorLimit int Maximum number of Hunters, Smokers, Jockeys and Chargers allowed to be in play simultaneously.
HunterLimit int 1 Maximum number of Hunters allowed to be in play simultaneously.
JockeyLimit int 1 Maximum number of Jockeys allowed to be in play simultaneously.
MaxSpecials int 2 Maximum number of Director spawned Special Infected allowed to be in play simultaneously.
MegaMobSize int The amount of total infected spawned during a panic event.
MobMaxPending int How many infected can be left pending to spawn when the mob size is larger than CommonLimit.
MobMaxSize int 30 Maximum amount of infected that can spawn in a mob.
MobMinSize int 10 Minimum amount of infected that can spawn in a mob.
MobSpawnSize int Static amount of infected in a mob. Likely overrides MobMinSize and MobMinSize.
PreTankMobMax int
Todo: confirm category/working; possibly gauntlet finale specific
SmokerLimit bool 1 Maximum number of Smokers allowed to be in play simultaneously.
SpitterLimit int 1 Maximum number of Spitters allowed to be in play simultaneously.
TankLimit int 1 Maximum number of Tanks allowed to be in play simultaneously.
WitchLimit int 1 Maximum number of Witches allowed to be in play simultaneously.1

EMS Stage Specific

[Todo]

See L4D2_EMS/Appendix:_Spawning_Infected


Name Type Default value Description
PanicSpecialsOnly bool The Panic should end when we finish with Specials, not wait for the MegaMob.
PanicWavePauseMax float
Todo: confirm category/working
PanicWavePauseMin float
Todo: confirm category/working
ScriptedStageType int The type of stage to run next. See L4D2_EMS/StageTypeAppendix for a description of stage types.
ScriptedStageValue int Dependant on the stage type.
SpawnDirectionCount
Todo: confirm category/working
SpawnDirectionMask int A bitfield (using SPAWNDIR_N, _NE, _E, etc) of directors to spawn from _relative to_ a map entity named Compass in your map. Designed for Survival-like game modes. See L4D2_EMS/Appendix:_Spawning_Infected.
SpawnSetPosition Vector The center point of the area infected can spawn in, when SpawnSetRule is set to SPAWN_POSITIONAL.
SpawnSetRadius int How far from the center point infected can spawn, when SpawnSetRule is set to SPAWN_POSITIONAL.
SpawnSetRule int Overrides the mode of spawning used. Seems to be non-functional in finales. Valid flags are: SPAWN_ANYWHERE, SPAWN_FINALE, SPAWN_BATTLEFIELD, SPAWN_SURVIVORS, SPAWN_POSITIONAL
TotalBoomers int Number of Boomers allowed in a wave.
TotalChargers int Number of Chargers allowed in a wave.
TotalHunters int Number of Hunters allowed in a wave.
TotalJockeys int Number of Jockeys allowed in a wave.
TotalSmokers int Number of Smokers allowed in a wave.
TotalSpecials int Total number of Special Infected allowed in a wave.
TotalSpitters int Number of Spitters allowed in a wave.
  • function void g_ModeScript::GetNextStage()
Called by the director when it wants a new stage. It can be forced with Director.ForceNextStage()

Finale Specific/Related

A normal finale consists of X number of stages. Some variables in DirectorOptions can only be used during finales. Multiple staged events can be defined in the same script, with the Options starting with A_, B_, C_ etc.

Name Type Default value Description
[A-Z]_CustomFinale_StageCount int Number of stages. Needs to be set for Versus scoring to function properly.
[A-Z]_CustomFinaleX int Stage type (enumerated PANIC, SCRIPTED (AKA ONSLAUGHT), DELAY, TANK), where X is the corresponding stage number. Usable in scripted panic events.
[A-Z]_CustomFinaleValueX * Value depends on the stage type above. Usable in scripted panic events.
[A-Z]_CustomFinaleMusicX string Soundscript entry to play. For instance, A_CustomFinaleMusic1 = "C2M5.BadManTank2". Note, Dark Carnival - Concert finale does not use this method! It instead opted to use entities (ambient_music, math_counter and info_director) within the map instead for playing music. In the c2m5_concert_finale.nut, You can see lines such asA_CustomFinaleMusic4 = "", suggesting that no song is played automatically via script.
EnforceFinaleNavSpawnRules bool Possibly used to enforce the finale spawning behavior without running a finale.
Todo: confirm category/working
HordeEscapeCommonLimit Number of commons allowed in the escape stage.
EscapeSpawnTanks bool Whether to spawn tanks in the escape sequence.
Todo: possibly EMS stage related
MinimumStageTime int The minimum amount of time a SCRIPTED stage is allowed to run before ending. Unavailable for Scripted Panic Events when it should been, unfortunately.


Gauntlet Specific/Related

These options are specific to Gauntlet finales. Most of these can be found in director_gauntlet.nut

Name Type Default value Description
CustomTankKiteDistance int 3000 Controls when Gauntlet's Tank should appear if a survivor reaches this far, in flow distance.


Movement Bonus related options
The Movement Bonus successively increases the delay between hordes when the survivors are not making progress toward the Gauntlet goal. The Current Bonus value ticks down every second, allows a horde to spawn when it reaches 0. When a horde spawns the Current Bonus is reset to the Movement Bonus value. The Movement Bonus increases at set intervals, and is reset when the survivors cross the Movement Threshold, which is then incremented. Use director_debug 1 to see the values.
Name Type Default value Description
GauntletMovementThreshold float 500.0 The amount of flow units the survivors can advance before the Movement Bonus is reset.
GauntletMovementTimerLength float 5.0 The interval between each Movement Bonus increase, in seconds.
GauntletMovementBonus float 2.0 The initial value, and the amount the movement Bonus increases each interval, in seconds.
GauntletMovementBonusMax float 30.0 The maximum value that the Movement Bonus can reach.

Versus Specific

Name Type Default value Description
TankHitDamageModifierVersus float 1.0
ZombieGhostDelayMax int 30 Maximum time in seconds until allowing player infected to respawn.
ZombieGhostDelayMin int 20 Minimum time in seconds until allowing player infected to respawn.


Scavenge Specific/Related

Name Type Default value Description
ScavengeClusterBonusTime float
Todo: confirm category/working
ScavengeRoundInitialTime float
Todo: confirm category/working
ScavengeScoreBonusTime float (used in mutation13.nut Follow the Liter)


Survival Specific/Related

Name Type Default value Description
SurvivalSetupTime float (Used in mutation15.nut for Survival Versus with setup time of 90 seconds)


Mutation Specific/Related

Some of these values are mutation specific values of the global ones (cm_CommonLimit,cm_MaxSpecials, etc.), so use them if you are making a mutation, in case any map scripts are changing the global values.

Name Type Default value Description
cm_AggressiveSpecials bool true
cm_AllowPillConversion bool true Allows pills to be converted to health kits.
cm_AllowSurvivorRescue bool
cm_AllowTeamSwap bool true Allows swapping teams.
Note.pngNote:Appears to be non-functional.
cm_AutoReviveFromSpecialIncap bool false Instantly revives a survivor when incapacitated by a Special Infected.
Icon-Bug.pngBug:Doesn't work if a player isn't incapacitated by being dominated.  [todo tested in ?]
cm_AutoSpawnInfectedGhosts bool
cm_BaseCommonAttackDamage
cm_BaseSpecialLimit int
cm_CommonLimit int
cm_DominatorLimit int
cm_FirstManOut int false Ends the escape when the first survivor reaches the escape vehicle.
cm_frustrationTimer
cm_HeadshotOnly
cm_HealingGnome
cm_InfiniteFuel (mutation7.nut Chainsaw Massacre)
cm_MaxSpecials
cm_NoRescueClosets
cm_NoSurvivorBots
cm_ProhibitBosses
cm_ShouldEscortHumanPlayers
cm_ShouldHurry
cm_SingleScavengeCluster Used for scavenge cans to spawn one-by-one.
cm_SpecialRespawnInterval
cm_SpecialSlotCountdownTime
cm_SpecialsRetreatToCover
cm_TankLimit
cm_TankRun Used in Taaank! mutation (mutation19.nut).
cm_TempHealthOnly
cm_VIPTarget
cm_WanderingZombieDensityModifier
cm_WitchLimit

Defunct options

These don't seem to be read by the director.

Name Type Default value Description
ActiveChallenge bool false Activates mutation mode. Seems to be obsolete with the EMS update.
MegaMobMaxSize int Maximum amount of total infected spawned during a panic event. Doesn't work 2014.04.29
MegaMobMinSize int Minimum amount of total infected spawned during a panic event. Doesn't work 2014.04.29


Hook Functions

These functions are placed in the DirectorOptions table, and get called at map load.

Function Signature Description
AllowFallenSurvivorItem bool AllowFallenSurvivorItem(string classname) Returns true or false if Fallen Survivors are allowed to carry the given classname.
AllowWeaponSpawn bool AllowWeaponSpawn(string classname) Returns true or false if the given classname is allowed to spawn, used by several mutations.
ConvertWeaponSpawn string ConvertWeaponSpawn(string classname) Converts a weapon spawn of given classname to another, used by several mutations.
ConvertZombieClass int ConvertZombieClass(infectedClass) Converts one spawn into another, used by the Taaannnk!! mutation (mutation19.nut).
GetDefaultItem string GetDefaultItem(index) Repeatedly called with incrementing indices. Return a string of a weapon name to make it a default item for survivors, or 0 to end the iteration.
ShouldAvoidItem bool ShouldAvoidItem(string classname)
Todo: Probably a bot related function or spawn related
ShouldPlayBossMusic bool ShouldPlayBossMusic(index) Returns true or false if the music index is allowed to play.

Enumerations

  • Director Enumerations
    Note.pngNote:These are (or some are) script specific, hence the duplicate values.
    • ALLOW_BASH_ALL = 0
    • ALLOW_BASH_NONE = 2
    • ALLOW_BASH_PUSHONLY = 1
    • BOT_CANT_FEEL = 4
    • BOT_CANT_HEAR = 2
    • BOT_CANT_SEE = 1
    • BOT_CMD_ATTACK = 0
    • BOT_CMD_MOVE = 1
    • BOT_CMD_RESET = 3
    • BOT_CMD_RETREAT = 2
    • BOT_QUERY_NOTARGET = 1
    • DMG_BLAST = 64
    • DMG_BLAST_SURFACE = 134217728
    • DMG_BUCKSHOT = 536870912
    • DMG_BULLET = 2
    • DMG_BURN = 8
    • DMG_HEADSHOT = 1073741824
    • DMG_MELEE = 2097152
    • DMG_STUMBLE = 33554432
    • FINALE_CUSTOM_CLEAROUT = 11
    • FINALE_CUSTOM_DELAY = 10
    • FINALE_CUSTOM_PANIC = 7
    • FINALE_CUSTOM_SCRIPTED = 9
    • FINALE_CUSTOM_TANK = 8
    • FINALE_FINAL_BOSS = 5
    • FINALE_GAUNTLET_1 = 0
    • FINALE_GAUNTLET_2 = 3
    • FINALE_GAUNTLET_BOSS = 16
    • FINALE_GAUNTLET_BOSS_INCOMING = 15
    • FINALE_GAUNTLET_ESCAPE = 17
    • FINALE_GAUNTLET_HORDE = 13
    • FINALE_GAUNTLET_HORDE_BONUSTIME = 14
    • FINALE_GAUNTLET_START = 12
    • FINALE_HALFTIME_BOSS = 2
    • FINALE_HORDE_ATTACK_1 = 1
    • FINALE_HORDE_ATTACK_2 = 4
    • FINALE_HORDE_ESCAPE = 6
    • HUD_FAR_LEFT = 7
    • HUD_FAR_RIGHT = 8
    • HUD_FLAG_ALIGN_CENTER = 512
    • HUD_FLAG_ALIGN_LEFT = 256
    • HUD_FLAG_ALIGN_RIGHT = 768
    • HUD_FLAG_ALLOWNEGTIMER = 128
    • HUD_FLAG_AS_TIME = 16
    • HUD_FLAG_BEEP = 4
    • HUD_FLAG_BLINK = 8
    • HUD_FLAG_COUNTDOWN_WARN = 32
    • HUD_FLAG_NOBG = 64
    • HUD_FLAG_NOTVISIBLE = 16384
    • HUD_FLAG_POSTSTR = 2
    • HUD_FLAG_PRESTR = 1
    • HUD_FLAG_TEAM_INFECTED = 2048
    • HUD_FLAG_TEAM_MASK = 3072
    • HUD_FLAG_TEAM_SURVIVORS = 1024
    • HUD_LEFT_BOT = 1
    • HUD_LEFT_TOP = 0
    • HUD_MID_BOT = 3
    • HUD_MID_BOX = 9
    • HUD_MID_TOP = 2
    • HUD_PRINTNOTIFY = 1
    • HUD_PRINTCONSOLE = 2
    • HUD_PRINTTALK = 3
    • HUD_PRINTCENTER = 4
    • HUD_RIGHT_BOT = 5
    • HUD_RIGHT_TOP = 4
    • HUD_SCORE_1 = 11
    • HUD_SCORE_2 = 12
    • HUD_SCORE_3 = 13
    • HUD_SCORE_4 = 14
    • HUD_SCORE_TITLE = 10
    • HUD_SPECIAL_COOLDOWN = 4
    • HUD_SPECIAL_MAPNAME = 6
    • HUD_SPECIAL_MODENAME = 7
    • HUD_SPECIAL_ROUNDTIME = 5
    • HUD_SPECIAL_TIMER0 = 0
    • HUD_SPECIAL_TIMER1 = 1
    • HUD_SPECIAL_TIMER2 = 2
    • HUD_SPECIAL_TIMER3 = 3
    • HUD_TICKER = 6
    • INFECTED_FLAG_CANT_FEEL_SURVIVORS = 32768
    • INFECTED_FLAG_CANT_HEAR_SURVIVORS = 16384
    • INFECTED_FLAG_CANT_SEE_SURVIVORS = 8192
    • IN_ATTACK = 1
    • IN_ATTACK2 = 2048
    • IN_BACK = 16
    • IN_CANCEL = 64
    • IN_DUCK = 4
    • IN_FORWARD = 8
    • IN_JUMP = 2
    • IN_LEFT = 512
    • IN_RELOAD = 8192
    • IN_RIGHT = 1024
    • IN_USE = 32
    • SCRIPTED_SPAWN_BATTLEFIELD = 2
    • SCRIPTED_SPAWN_FINALE = 0
    • SCRIPTED_SPAWN_POSITIONAL = 3
    • SCRIPTED_SPAWN_SURVIVORS = 1
    • SCRIPT_SHUTDOWN_EXIT_GAME = 4
    • SCRIPT_SHUTDOWN_LEVEL_TRANSITION = 3
    • SCRIPT_SHUTDOWN_MANUAL = 0
    • SCRIPT_SHUTDOWN_ROUND_RESTART = 1
    • SCRIPT_SHUTDOWN_TEAM_SWAP = 2
    • SPAWNDIR_E = 4
    • SPAWNDIR_N = 1
    • SPAWNDIR_NE = 2
    • SPAWNDIR_NW = 128
    • SPAWNDIR_S = 16
    • SPAWNDIR_SE = 8
    • SPAWNDIR_SW = 32
    • SPAWNDIR_W = 64
    • SPAWN_ABOVE_SURVIVORS = 6
    • SPAWN_ANYWHERE = 0
    • SPAWN_BATTLEFIELD = 2
    • SPAWN_BEHIND_SURVIVORS = 1
    • SPAWN_FAR_AWAY_FROM_SURVIVORS = 5
    • SPAWN_FINALE = 0
    • SPAWN_IN_FRONT_OF_SURVIVORS = 7
    • SPAWN_LARGE_VOLUME = 9
    • SPAWN_NEAR_IT_VICTIM = 2
    • SPAWN_NEAR_POSITION = 10
    • SPAWN_NO_PREFERENCE = -1
    • SPAWN_POSITIONAL = 3
    • SPAWN_SPECIALS_ANYWHERE = 4
    • SPAWN_SPECIALS_IN_FRONT_OF_SURVIVORS = 3
    • SPAWN_SURVIVORS = 1
    • SPAWN_VERSUS_FINALE_DISTANCE = 8
    • STAGE_CLEAROUT = 4
    • STAGE_DELAY = 2
    • STAGE_ESCAPE = 7
    • STAGE_NONE = 9
    • STAGE_PANIC = 0
    • STAGE_RESULTS = 8
    • STAGE_SETUP = 5
    • STAGE_TANK = 1
    • TIMER_COUNTDOWN = 2
    • TIMER_COUNTUP = 1
    • TIMER_DISABLE = 0
    • TIMER_SET = 4
    • TIMER_STOP = 3
    • TRACE_MASK_ALL = -1
    • TRACE_MASK_NPC_SOLID = 33701899
    • TRACE_MASK_PLAYER_SOLID = 33636363
    • TRACE_MASK_SHOT = 1174421507
    • TRACE_MASK_VISIBLE_AND_NPCS = 33579137
    • TRACE_MASK_VISION = 33579073
    • UPGRADE_EXPLOSIVE_AMMO = 1
    • UPGRADE_INCENDIARY_AMMO = 0
    • UPGRADE_LASER_SIGHT = 2
    • ZOMBIE_BOOMER = 2
    • ZOMBIE_CHARGER = 6
    • ZOMBIE_HUNTER = 3
    • ZOMBIE_JOCKEY = 5
    • ZOMBIE_NORMAL = 0
    • ZOMBIE_SMOKER = 1
    • ZOMBIE_SPITTER = 4
    • ZOMBIE_TANK = 8
    • ZOMBIE_WITCH = 7
    • ZSPAWN_MOB = 10
    • ZSPAWN_MUDMEN = 12
    • ZSPAWN_WITCHBRIDE = 11

See also