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
| Field | Type | Default | Notes |
|---|---|---|---|
isEnabled | bool | true | Disabling here also disables the level that depends on this file |
baseMobAmount | int | 20 | Default amount used when an entry doesn't specify amount= |
waveEntities | string list | required | Wave-by-wave enemy entries |
suddenDeathWaveEntities | string list | optional | Optional cyclic wave pool that runs after the configured waves are exhausted |
prewaveMessages | list of maps | optional | Messages shown before a specific wave starts |
waveMessages | list of maps | optional | Messages 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
| Key | Type | Notes |
|---|---|---|
wave | int | Required. Wave number this entry belongs to |
entityType | enum | Required. Bukkit EntityType enum value |
healthMultiplier | double | Optional. Multiplies the entity's max health |
amount | int | Optional. Overrides baseMobAmount for this entry |
name | string | Optional. Custom name string |
resist | flag | Marks the entity as slow-immune |
fast | flag | Increases movement speed |
treasure | flag | Doubles the gold bounty on kill |
boss | flag | Spawns as a single boss with scaled health and a boss bar |
horde | flag | Doubles amount and halves health |
air | flag | Entity spawns 4 blocks above the path and ignores ground walls |
Internal Quantity Math
amountis incremented bywave / 10before spawning.bossentries overrideamounttomax(1, floor(wave / 10)).hordeentries double the finalamount.- 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 towaveNumber - 1times. 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 startfor 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 * 10gold. - 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:
| Combination | Resulting fusion |
|---|---|
| Fire + Earth | Magma |
| Fire + Air | Blast |
| Water + Air | Storm |
| Water + Earth | Sludge |
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.5on 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 fortreasureentries. 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 areSILVERFISH. Otherwise they areCAVE_SPIDER. - Splitterlings spawn at
wave / 2of 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.