波次生成器 · WaveSpawners
波次生成器是 CD2 的一个模块,可灵活地创建无宣告潮。下面的示例每 90 秒会在玩家周围的三个位置生成一波难度总点数为 100、仅由战士异虫组成的无宣告潮
英文原文
Wave spawners are a feature of CD2 that allow the creation of unnanounced enemy waves with various degrees of flexibility. The following basic example spawns a wave of difficulty 100 composed of only grunts every 90 seconds in 3 locations around the player:
{
"WaveSpawners":
{
"Enabled": true,
"Interval": 90,
"Enemies": ["ED_Spider_Grunt"],
"Difficulty": 100,
"Distance": 10,
"Locations": 3
}
}以下表格展示了 WaveSpawner 可使用的字段
英文原文
The following table shows the valid fields inside a WaveSpawner:
| Field 字 段 |
Type 类型 |
Description 描述 |
|---|---|---|
| Enabled | Bool 布尔值 |
Whether the wave spawner is active (true) or not (false). 启用与否 |
| Namem 名字 |
String 字符串 |
A description. Doesn't have any effect. 介绍,无影响 |
| Interval 间隔 |
Float 浮点数 |
After the wave is enabled, a time of Interval seconds will pass until the first spawns appear unless SpawnOnEnable (see below) is true. After that the wave will repeat every Interval seconds unless disabled.波次生成器启用后,会等待 “ Interval” 秒才生成首波敌人(除非 SpawnOnEnable[启用即刻生成] 为 true)。之后波次会每间隔“Interval”秒生成一次,直到被禁用。 |
| Enemies 敌人 |
[List] 列表 |
A list of the enemy descriptors that will spawn. To spawn all available enemies in the pool, leave the field out. A blank field ("Enemies: []") will spawn zero enemies. 要生成的敌人列表,若省略此字段则生成怪池中的全部敌人;若设为空列表("Enemies: []")则不会生成任何敌人。 |
| Difficulty 难度点数 |
Float 浮点数 |
Number of points assigned to the wave event, which will be distributed among the enemies in Enemies depending on their DifficultyRating to decide how many will spawn.分配给该波次的总难度点数,依照 Enemies 中各敌人的 DifficultyRating 进行数量分配。 |
| Distance 距离 |
Float 浮点数 |
Distance where the enemies will spawn relative to the player. 敌人相对玩家的生成距离 |
| Diversity 多样性 |
Int 整数 |
If the Enemies field is left empty, the spawner will use all enemies in the pool and the difficulty's diversity. This field allows to specify an independent diversity only for the wavespawner.若 Enemies 留空,Spawner 会使用怪池中所有敌人和该难度的多样性。该字段允许为该无宣告潮单独指定多样性参数。 |
| Locations 刷潮点 |
Int 整数 |
Number of spawn points. 刷潮地点数量 |
| SpawnOnEnable 启用即刻生成 |
Bool 布尔值 |
If true, the wave will start spawning enemies as soon as it is enabled, skipping the initial Interval. Defaults to False.若为 true,Spawner 会在启用的瞬间立即生成敌人,跳过首次 Interval 时间,默认为 False。 |
| UnlockInterval | Bool 布尔值 |
If true, changing the interval will modify the current timer. If false, the time to next spawn is selected once and locked to that time until rerolled (e.g. when enemies spawn). Defaults to False. 若为 true,修改 Interval 会立即更新当前计时器;若为 false,则下一次生成的时间在倒计时开始时即已确定并锁定,直到被重新随机(例如敌人生成时)为止。默认为 false。 |
| PauseOnDisable 禁用后暂停 |
Bool 布尔值 |
If true, the timer for the next spawn is paused while the wavespawner is disabled and resumes when it is enabled. If false, the timer is reset when the spawner is re-enabled. Defaults to False. 若为 true,当 WaveSpawner 被禁用时倒计时暂停,重新启用后再继续计时;若为 false,重新启用 WaveSpawner 后倒计时将重置。默认为 False |
| Alert 敌人是否为警戒状态 |
Bool 布尔值 |
If true, the enemies will spawn aggroed to the player. Defaults to True. 如果为 true,敌人生成时即处于敌对状态。默认为 true |
所有 WaveSpawner 字段都可以被 Mutator 进行动态控制,以下代码展示了一个消灭任务中的实用 wavespawner。当地图中出现无畏异虫时,会生成一个由“Enemies”模块定义的“ED_WeakBulk(削弱大自爆)”。
英文原文
All WaveSpawner fields can be mutated. The following snippet shows a popular spawner useful in Elimination missions, which spawns a bulk detonator with descriptor ED_WeakBulk, defined in the Enemies module, whenever there is a dreadnought on the map:
{
"WaveSpawners": [
{
"Name": "Bulk helper wave during dreads",
"Enabled": {
"Mutate": "IfFloat",
"Value": {
"Mutate": "EnemyCount",
"ED": "XED_WeakBulk"
},
"<": 1,
"Then": {
"Mutate": "DuringDread"
},
"Else": false
},
"Interval": 10,
"Enemies": ["XED_WeakBulk"],
"Difficulty": 250,
"Distance": 1750,
"Locations": 1
}
]}此外还有一组特殊的 触发式 Mutator,可以根据游戏条件启用/禁用波次生成器,请参阅 Mutator 章节底部的相关文档。
英文原文
There are a special group of Trigger mutators that can be used to gain a lot of control on enabling and disabling the wavespawners based on game conditions: please see their docs at the bottom of the mutator section.