L4D2 Level Design/Boss Prohibition: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(undone multipage)
 
(31 intermediate revisions by 6 users not shown)
Line 1: Line 1:
Left4Dead 2 no longer relies on the mission.txt file to prohibit Tanks and Witches on maps. This is now done with a script file that you should place in your '''left4dead2/scripts/vscripts''' folder (you may need to add the '''vscripts''' subfolder yourself).
{{LanguageBar}}
Add the following to a text file:
{{L4D2 level intro menu}}
There are multiple ways to prohibit or control the spawning of boss infected in Left 4 Dead 2, which include mission.txt and vscripts.  


== [[List of L4D2 Missions Files|Mission.txt]] ==
"coop_boss_spawning" and "versus_boss_spawning" were introduced in The Sacrifice update. Known variables include:
{| class="wikitable sortable" border="1" style="font-size: small; text-align: center; width: auto; color:#FFFFFF"
|+ '''coop_boss_spawning and versus_boss_spawning'''
! Variable !! Type !! class="unsortable" | Range !! class="unsortable" | Notes
|-
| spawn_pos_min || float || [0,1] || Percentage flow cleared by survivors?
|-
| spawn_pos_max || float || [0,1] ||
|-
| tank_chance || float || [0,1] ||
|-
| witch_chance || float || [0,1] ||
|-
| witch_and_tank || int || 0/1 ||
|-
| allow_boss_mix || int || 0/1 || {{Confirm|Identical to witch_and_tank?}}
|}
Please see [[List of L4D2 Missions Files]] (using browser text search) for full examples of their use.
{{ModernConfirm|coop_boss_spawning doesn't exist in {{l4d2}}? Seems to be ignored by the mission file, and not used in any official campaigns.}}
== [[L4D2 Vscripts|Vscript]] ==
Vscripts can offer more flexibility in this case. The script file should place in your '''left4dead2/scripts/vscripts''' folder (you may need to add the '''vscripts''' sub-folder yourself).
A basic script would include:


<pre>DirectorOptions <-
<pre>DirectorOptions <-
Line 8: Line 34:
}</pre>
}</pre>


Save the textfile with the extention '''.nut''' in the vscripts folder.
Also available is the director option <code>DisallowThreatType = ZOMBIE_WITCH | ZOMBIE_TANK</code> (as seen in c8m1_apartment.nut).
In your map, place a '''logic_auto''' entity and add an output. The output should target the AI Director entity and make it fire the script by using the BeginScript action. In the parameter field, you set the name of your script (without the '''.nut''' extention)
 
Save the text file with the extension '''.nut''' in the vscripts folder.


{{NavBar|:L4D2_Level_Design/Add-on Notes|L4D2 Level Design}}
In your map, place a '''logic_auto''' entity and add an output. Note that logic_auto is only used here as an example. The output should target the [[info_director|AI Director]] entity and make it fire the script by using the <code>BeginScript</code> input. In the parameter field, you set the name of your script (the '''.nut''' extension is not needed but won't cause any issues). The script will end if the director is told to load another script or if triggered by an output to <code>EndScript</code>.


== See also ==
== See also ==
* [[L4D2 Vscripts]]
=== Intros ===
*[[VScript]]
*[[L4D2_Vscripts|L4D2 VScripts]]
*[[Mutation Gametype (L4D2)]]
*[[L4D2 Gamemodes File]]
=== Documentations ===
*[[VSLib]]
*[[L4D2 Vscript Examples]]
*[[L4D2_Director_Scripts|L4D2 Director Scripts]]
*[[Left 4 Dead 2/Script Functions|L4D2 Script Functions]]
*[[L4D2_Decrypted_mutations|Decrypted Mutation Vscripts]]
*[[L4D2_Level_Design/Custom_Finale|Custom Finales]] ''Contains all original finale scripts as reference.''
*[[L4D2 EMS|Extended Mutation System]]
 
=== Miscelleanous ===
*[[Logic_script|logic_script]]
*[[Trigger_finale|trigger_finale]]
*[[Info_director|info_director]]
*[[List of L4D2 Cvars]]
 
 
{{NavBar|L4D2 Level Design/Add-on Notes|L4D2 Level Design|L4D2 Level Design/Foot Lockers}}


[[Category:Left 4 Dead 2]]
[[Category:Left 4 Dead 2]]

Latest revision as of 06:18, 13 July 2024

English (en)Русский (ru)中文 (zh)Translate (Translate)

There are multiple ways to prohibit or control the spawning of boss infected in Left 4 Dead 2, which include mission.txt and vscripts.

Mission.txt

"coop_boss_spawning" and "versus_boss_spawning" were introduced in The Sacrifice update. Known variables include:

coop_boss_spawning and versus_boss_spawning
Variable Type Range Notes
spawn_pos_min float [0,1] Percentage flow cleared by survivors?
spawn_pos_max float [0,1]
tank_chance float [0,1]
witch_chance float [0,1]
witch_and_tank int 0/1
allow_boss_mix int 0/1
Confirm:Identical to witch_and_tank?

Please see List of L4D2 Missions Files (using browser text search) for full examples of their use.

Confirm:coop_boss_spawning doesn't exist in Left 4 Dead 2? Seems to be ignored by the mission file, and not used in any official campaigns.

Vscript

Vscripts can offer more flexibility in this case. The script file should place in your left4dead2/scripts/vscripts folder (you may need to add the vscripts sub-folder yourself). A basic script would include:

DirectorOptions <-
{
   ProhibitBosses = true
}

Also available is the director option DisallowThreatType = ZOMBIE_WITCH | ZOMBIE_TANK (as seen in c8m1_apartment.nut).

Save the text file with the extension .nut in the vscripts folder.

In your map, place a logic_auto entity and add an output. Note that logic_auto is only used here as an example. The output should target the AI Director entity and make it fire the script by using the BeginScript input. In the parameter field, you set the name of your script (the .nut extension is not needed but won't cause any issues). The script will end if the director is told to load another script or if triggered by an output to EndScript.

See also

Intros

Documentations

Miscelleanous