Skip to content

Making wave portals

Rémi Verschelde edited this page Feb 8, 2016 · 1 revision

Wave portals are a new kind of Room object since OpenDungeons 0.6.0 that can spawn waves of enemies at a predefined interval. They can be placed in levels from within the editor, however there is as of OpenDungeons 0.7.0 no in-editor feature to configure them.

Therefore level modders have to edit the .level file manually (after having saved it and closed the editor) using a text editor. This page describes what each parameter refers too.

Overview

A configured wave portal would typically look like that (without the explanatory comments):

[Room]
10 PortalWave1 5 9   # RoomType RoomName SeatID NbOfTiles
28 28                # TileX TileY
28 29
28 30
29 28
29 29
29 30
30 28
30 29
30 30
9 250 1 0 -          # ClaimedValue TurnsBetweenWaves Strategy RangeInTiles TeamIDs
[Waves]
[Wave]               # Define a specific wave, several types of waves can be defined
SpawnTurnMin 0       # When should this wave start
SpawnTurnMax 1000    # When should this wave stop
[Creatures]          # Creatures spawned at each wave
DwarfWorker 7        # CreatureType Level
Adventurer 4
Adventurer 3
Wizard 4
Knight 3
[/Creatures]
[/Wave]
[/Waves]
[/Room]

In the following sections, we'll go in detail over each section of this Room definition.

Room configuration

The first section is about the Room configuration. All lines but the last one are common to most other Room types, and would typically be generated when placing the wave portal in the editor:

[Room]
10 PortalWave1 5 9   # RoomType RoomName SeatID NbOfTiles
28 28                # TileX TileY
28 29
28 30
29 28
29 29
29 30
30 28
30 29
30 30
9 250 1 0 -          # ClaimedValue TurnsBetweenWaves Strategy RangeInTiles TeamIDs
[/Room]

The RoomType argument should be 10 to indicate a wave portal. The name can be anything but should be unique among other level entities. The SeatID refers to the ID of the player that owns the portal (typically a rogue AI player), and the NbOfTiles argument should tell how many tiles the portal is composed of (and thus determines how many TileX TileY lines should follow).

The last line is more specific to wave portals:

  • ClaimedValue is the number of "claimed tiles" that the whole building is worth. It would typically be the same number as the number of tiles, but not forcefully.
  • TurnsBetweenWaves indicates how often a wave will be spawned by the portal, defined as a number of turns between two waves.
  • Strategy can take one of three values:
    • 0: attack closest dungeon in range
    • 1: attack a random player in range at each wave
    • 2: attack only the teams listed in TeamIDs, non limited by the range
  • RangeInTiles defines the range radius (in number of tiles) that the portal will consider to select a target. A range of 0 means unlimited range, while any other value would limit the portal range. It does not affect Strategy 2.
  • TeamIDs can be used in combination with Strategy 2. Multiple IDs have to be listed separated by slashes, e.g. 2 or 1/3 are valid parameters. A value of - (dash) means "any team ID", i.e. Strategy 2 with - would be the same as Strategy 1, apart from the removed range limitation.

Waves configuration

A given wave portal can spawn different types of waves based on specific parameters:

[Waves]
[Wave]               # Define a specific wave, several types of waves can be defined
SpawnTurnMin 0       # When should this wave start
SpawnTurnMax 1000    # When should this wave stop
[Creatures]          # Creatures spawned at each wave
DwarfWorker 7        # CreatureType Level
Adventurer 4
Adventurer 3
Wizard 4
Knight 3
[/Creatures]
[/Wave]
[/Waves]

Several [Wave] definitions can be stacked together within the [Waves] section, to define different wave types.

Each wave is then defined by three parameters:

  • SpawnTurnMin defines the turn at which the first wave will be issued.
  • SpawnTurnMax defines the turn at which the last wave will be issued, it should thus be greater than SpawnTurnMin. In between, it's the global TurnsBetweenWaves parameter that will define the frequency of waves issued.
  • [Creatures] defines the creatures that will be spawned in each wave. Each creature should be defined on its own line with two parameters: Creature type and creature level. A given live can be duplicated to spawn several creatures of a given type and level.
You can’t perform that action at this time.