求生之路2关卡设计/终极感染者的禁用

来自Valve Developer Community
跳转至: 导航搜索
English (en)Русский (ru)中文 (zh)
编辑

本简体中文页面由大康翻译于2021年9月20日。最后更新于2021年10月17日。


有多种方法可以禁用或控制求生之路2中终极感染者的生成,包括 Mission.txt 文件和 VScript(脚本)。

通过 Mission.txt 文件禁用/控制

“coop_boss_spawning”和“versus_boss_spawning”是在牺牲更新中新增的变量(参数)。已知变量包括:

coop_boss_spawning 和 versus_boss_spawning
变量 类型 范围 注释
spawn_pos_min float [0,1] 被幸存者清除了的导航流(Flow)的百分比?(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

请参阅 List of L4D2 Missions Files (使用浏览器文本搜索) 了解其使用的完整示例。

通过 Vscript 脚本禁用/控制

如果使用此方法,脚本的范围更广。脚本文件应该放在你的 left4dead2/scripts/vscripts 文件夹中(你可能需要自己添加 vscripts 子文件夹)。

一个基本的脚本包括:

DirectorOptions <-
{
   ProhibitBosses = true
}

还可以使用 Director Options 里的DisallowThreatType = ZOMBIE_WITCH | ZOMBIE_TANK变量(如 c8m1_apartment.nut 中所示)。

将扩展名为 .nut 的文本文件保存在 vscripts 文件夹中。

在你的地图中,放置一个 logic_auto 实体并添加一个输出。请注意,logic_auto 仅在此处用作示例。输出的目标实体应该是AI 导演的实体,并使用BeginScript输入让导演运行脚本。在参数字段中,输入你的脚本名称(不需要 .nut 扩展名,但不会导致任何问题)。如果导演被要求加载另一个脚本或由EndScript的输出触发,本脚本将停止运行。

另请参阅

介绍

文档

其他


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
证实:Identical to witch_and_tank?

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

Confirm.png证实: coop_boss_spawning doesn't exist in 求生之路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