Skip to main content

EternalTD Waves & Enemies

A wave file under plugins/EternalTD/waves/ defines the entire enemy lineup for a level, including normal waves, sudden-death waves, and optional pre-wave or wave messages. Each level config references one wave file through wavesConfigFile:.

Top-Level Fields

FieldTypeDefaultNotes
isEnabledbooltrueDisabling here also disables the level that depends on this file
baseMobAmountint20Default amount used when an entry doesn't specify amount=
waveEntitiesstring listrequiredWave-by-wave enemy entries
suddenDeathWaveEntitiesstring listoptionalOptional cyclic wave pool that runs after the configured waves are exhausted
prewaveMessageslist of mapsoptionalMessages shown before a specific wave starts
waveMessageslist of mapsoptionalMessages shown when a wave begins

If the wave file does not define any sudden-death entries, the level ends as soon as the configured waves are exhausted.

Wave Entity Entry Format

Each line in waveEntities (or suddenDeathWaveEntities) is a colon-separated entry:

- wave=1:entityType=ZOMBIE:healthMultiplier=1.0:amount=10
- wave=2:entityType=SKELETON:fast:treasure
- wave=5:entityType=WITHER_SKELETON:boss
- wave=8:entityType=PHANTOM:air:horde
KeyTypeNotes
waveintRequired. Wave number this entry belongs to
entityTypeenumRequired. Bukkit EntityType enum value
healthMultiplierdoubleOptional. Multiplies the entity's max health
amountintOptional. Overrides baseMobAmount for this entry
namestringOptional. Custom name string
resistflagMarks the entity as slow-immune
fastflagIncreases movement speed
treasureflagDoubles the gold bounty on kill
bossflagSpawns as a single boss with scaled health and a boss bar
hordeflagDoubles amount and halves health
airflagEntity spawns 4 blocks above the path and ignores ground walls

Internal Quantity Math

  • amount is incremented by wave / 10 before spawning.
  • boss entries override amount to max(1, floor(wave / 10)).
  • horde entries double the final amount.
  • On top of the per-entry amount, the wave runtime also clones extra copies of the wave's first, third, fifth, ... entries (every even index 0, 2, 4, ...) up to waveNumber - 1 times. Boss entries are never cloned this way. Higher waves therefore stack more duplicates of the lower-indexed entries.

Message Block Format

Both prewaveMessages and waveMessages accept a list of maps:

prewaveMessages:
- wave: 1
message:
- "&aWelcome! Build a couple of basic towers along the path."
- wave: 5
message:
- "&6Heads up: a boss is coming next wave."

prewaveMessages runs at the start of the construction phase for that wave. waveMessages runs the moment the defensive phase begins.

Wave Lifecycle

A session moves through these states:

  • STARTING — before the player runs /etd start for the first time.
  • CONSTRUCTION_PHASE — 10-second build window between defensive phases.
  • DEFENSIVE_PHASE — enemies are spawning and walking the path.
  • ENDING — player quit, lost, or the level ran out of waves.

The construction phase always lasts 10 seconds unless the tutorial holds it (see Tutorial Level).

Wave end behavior:

  • Completing a wave grants waveNumber * 10 gold.
  • If you took no damage during the wave, you receive a second copy of that bonus as a "Perfect" bonus.
  • The next wave's modifier list is announced after each wave end.

Sudden Death

If suddenDeathWaveEntities is defined, the level keeps running past the configured wave list. The sudden-death counter increments per wave and wraps back to wave 1 of the sudden-death pool whenever it exceeds the pool size.

Elemental Attunement on Wave Entities

Each wave has its own elemental attunement that rotates per wave:

  • Wave 1 → Fire
  • Wave 2 → Air
  • Wave 3 → Water
  • Wave 4 → Earth
  • (then repeats)

When a wave entity spawns, there is a waveNumber / 100 chance that the entity inherits the wave's elemental attunement, displayed as a colored tag floating above the mob.

Elemental damage rules are handled by the tower's DamageTower class:

  • Same attunement attacker vs same attunement target — 0.5× damage (resist).
  • Opposite single elements (Fire vs Water, Air vs Earth) — 2× damage (crit).
  • Fusion attunements (Magma, Blast, Storm, Sludge) follow paired interactions; see source for the full matrix.
  • An unattuned tower deals 1× damage to everyone.

Fusion attunements form when a Basic Tower is touched by support towers with combining elemental attunements:

CombinationResulting fusion
Fire + EarthMagma
Fire + AirBlast
Water + AirStorm
Water + EarthSludge

Conflicting pairs (Fire + Water, Earth + Air) and any 3+ element mix revert the tower to Unattuned.

Health, Armor, and Bounty Scaling

WaveEntity applies these formulas at spawn:

  • health = (currentHealth + ((wave - 1)^1.2) / 2) × healthMultiplier
  • Boss entities have their health multiplied by baseMobAmount × 0.5 on top.
  • Horde entities have their health halved.
  • Air entities have their health halved again.
  • Armor only appears from wave 10 onward, set to maxHealth / 80.
  • Bounty is ceil(health × 1) and doubled for treasure entries. Gold Mine support towers add to bounty on death.

Splitterlings

From wave 20 onward, non-air enemies spawn additional small mobs ("splitterlings") on death.

  • Count: floor(wave / 20) per kill.
  • If the parent was a CAVE_SPIDER, the splitterlings are SILVERFISH. Otherwise they are CAVE_SPIDER.
  • Splitterlings spawn at wave / 2 of the parent's wave, so a deep enough run can still chain a splitterling into more splitterlings on its own death.
  • Splitterlings give 0 gold on death and air enemies never spawn splitterlings.

Tutorial Level Special Case

The bundled tutorial map runs through a hardcoded tutorial wave script:

  • The construction phase does not auto-end until you have placed the exact required towers on the highlighted squares.
  • Hardcoded towers are indicated by colored concrete patches under the targeted grid square and, if FMM is installed, a downward red arrow model floating above it.
  • The tutorial cheats some extra gold into the player's pool on early waves so the scripted tower lineup is always affordable.

Player Lives and Gold

  • Starting lives: 20.
  • Starting gold: 150.
  • Boss mobs cost 5 lives if they reach the end. All other mobs cost 1 life.
  • Cheating (/etd cheat) sets lives and gold to effectively unlimited values and marks the session as cheated for highscore purposes.

Highscore Tracking

Each level config persists highscoreWave and highscorePlayerName. At the end of a non-cheating session, the plugin saves the new wave number into the level file and broadcasts a server-wide message if it beat the previous score.