Skip to content
Inas-07 edited this page Nov 16, 2023 · 4 revisions

NOTE:

This plugin takes full charges of survival wave spawning / stopping via Warden Objective Events. Alarm waves defined in ChainedPuzzleDB are unaffected.

Features of this plugin are introduced in the following. To sum up, this plugin includes:

  1. Spawn survival waves in arbitrary zone, area (which invalidates SurvivalWaveSpawnType: "OnSpawnPoint" by 95%)
  2. Assign waves with name and stop it (them) by warden events (instead of always stopping all waves by vanilla events).

Recall that Warden Objective Events for spawning survival waves is:

{
  "Type": 9,
  "Delay": 0.0,
  "EnemyWaveData": {
    "WaveSettings": ID_1,
    "WavePopulation": ID_2,
    "SpawnDelay": 2.0,
    "IntelMessage": 0,
    "AreaDistance": 2,
    "TriggerAlarm": false
  }
}

And for stopping all waves, it is:

{
  "Type": 10,
  "Delay": 0.0
}

Feature 1: Spawn Survival Wave in arbitrary Zone, and Area, and even Position.

To use this feature, you'll have to:

  1. Change your wave spawning event to:
{
  "Type": 9,
  // Identify the zone, area in which to spawn your wave.
  "DimensionIndex": 0, // dimension
  "Layer": 0, // layer 
  "LocalIndex": 0, // local index
  "Count": 0, // area index, used when spawn type is `InSuppliedCourseNode`
  "Delay": 0.0,
  "Position": { // spawn position, used when spawn type is `InSuppliedCourseNode_OnPosition`
    "x": 0.2332,
    "y": -5.1999,
    "z": 64.5428
  },
  "EnemyWaveData": {
    "WaveSettings": ID_1, 
    "WavePopulation": ID_2,
    "SpawnDelay": 2.0,
    "IntelMessage": 0,
    "AreaDistance": 2,
    "TriggerAlarm": false
  }
}
  1. Change your survival wave settings (i.e. the ID_1 above): Find your survival wave setting, and locate the following fields and modify them accordingly:
"m_overrideWaveSpawnType": false, <------ Set to `true`
"m_survivalWaveSpawnType": 0, <----- change to either 1 (InSuppliedCourseNodeZone), 2 (InSuppliedCourseNode) or 3(InSuppliedCourseNode_OnPosition).

If m_survivalWaveSpawnType is set to 1 (InSuppliedCourseNodeZone), the survival wave would spawn only in the areas in the specified zone.

If it is set to 2 (InSuppliedCourseNode) then it will only spawn in the specified area (which is more superior than spawn type OnSpawnPoint).

If set to 3 (InSuppliedCourseNode_OnPosition) then it will only spawn in the specified position. Note: you'll still have to specify the correct area!

To identify the area in which to spawn, use the field Count as the area index. The acceptable value of it is [0, the number of areas in this zone), in which 0 denotes Area_A, and 1 denotes Area_B, and all that.

Also, vanilla spawn types FromElevatorDirection and OnSpawnPoint are unaffected and should be working fine. But if you find them not working when using this plugin, please let me know.

Feature 2: Assign waves with name, and stop specified waves (instead of all waves) by warden events

To assign a wave with a name, use field WorldEventObjectFilter:

{
  "Type": 9,
  "Delay": 0.0,
  "WorldEventObjectFilter": "T5E1_L1_Z0->Z3_ERROR", // name of this wave
  "EnemyWaveData": {
    "WaveSettings": ID_1,
    "WavePopulation": ID_2,
    "SpawnDelay": 2.0,
    "IntelMessage": 0,
    "AreaDistance": 2,
    "TriggerAlarm": false
  }
}

Note that a name can be shared by multiple waves.

On the other hand, to stop waves with specified name:

{
  "Type": 10,
  "WorldEventObjectFilter": "T5E1_L1_Z0->Z3_ERROR", // stop all waves assigned with this name
  "Delay": 0.0
}

In addition, you can still stop all survival waves via this event (just as in vanilla) - simply drop the field "WorldEventObjectFilter" or leave it empty.