Dynamic Biter Wave System & Miner Attraction Mechanic
Overview
The Mineshafts mod features two interconnected threat systems that create escalating danger the longer a player stays underground and the more they mine:
- Dynamic Biter Waves — Timed waves that spawn near the player after a threshold
- Miner Nest Spawning — Placing underground miners has a chance to awaken nearby biters
Both systems can be toggled via runtime settings.
1. Dynamic Biter Wave System
How It Works
The game tracks how long each player has spent on a mine surface. After a grace period, periodic biter waves spawn in a ring around the player and immediately attack.
Timing
| Phase |
Duration |
Description |
| Grace Period |
5 minutes (18,000 ticks) |
No waves — player can explore and set up defenses |
| First Wave |
After 5 minutes |
Initial biter attack wave spawns |
| Repeat Waves |
Every 3 minutes (10,800 ticks) |
Subsequent waves keep spawning as long as the player remains underground |
| Check Interval |
Every 5 seconds (300 ticks) |
System checks all connected players |
Wave Scaling (by Mine Tier)
The mine's tier determines which biter types spawn and how many:
| Mine Tier |
Biter Type |
Wave Size |
Example |
| Tier 1 |
Small Biters |
6-10 |
Early game, manageable with basic weapons |
| Tier 2 |
Medium Biters |
9-13 |
Requires red ammo or shotguns |
| Tier 3 |
Big Biters |
12-16 |
Military science tier gear recommended |
| Tier 4 |
Behemoth Biters |
15-19 |
End-game gear required (power armor, lasers) |
Wave Size Formula: 3 + (tier × 3) + random(0-4)
Spawn Behavior
- Biters spawn in a ring 15-30 tiles away from the player
- Each biter is given an immediate attack command targeting the player's character
- Biters have no distraction — they will not stop to attack other entities, only the player
- Waves spawn at random angles around the player (360° coverage)
- The system uses
find_non_colliding_position to avoid spawning inside walls
Resetting
- Leaving the mine resets the timer completely
- Re-entering the mine starts a fresh 5-minute grace period
- Switching between different mine surfaces also resets the timer
Runtime Setting
- Setting:
mineshafts-enable-biter-waves
- Default: Enabled
- Can be toggled during gameplay without restarting
2. Miner Nest Spawn Mechanic (Miners Attract Biters)
Concept
Placing underground miners disturbs the cave ecosystem. Higher-tier miners dig deeper and louder, attracting more dangerous creatures. When a player places a miner, there is a chance a biter spawner nest materializes nearby — representing biters being awakened by the mining vibrations.
Spawn Chances by Miner Tier
| Miner |
Tier |
Nest Spawn Chance |
Description |
| Underground Miner T1 |
1 |
0% |
Basic miner, too quiet to attract attention |
| Underground Miner T2 |
2 |
10% |
Moderate vibrations, slight risk |
| Underground Miner T3 |
3 |
20% |
Heavy drilling, noticeable disturbance |
| Underground Miner T4 |
4 |
35% |
Extreme excavation, high risk of awakening nests |
Spawn Behavior
- On miner placement, a random check is performed against the spawn chance
- If triggered, a biter-spawner is placed 15-30 tiles away from the miner at a random angle
- The spawner is a standard Factorio biter spawner that will continuously produce biters
- Only one spawner can spawn per miner placement (not cumulative)
- The spawner persists permanently — the player must destroy it or deal with ongoing biter production
Placement Restrictions
- Underground miners can only be placed inside mine surfaces
- Attempting to place them on the overworld (Nauvis) will refund the item and show a warning message
- Only whitelisted entity types can be placed inside mines
Strategic Implications
| Strategy |
Description |
| Defensive Mining |
Place turrets before miners to handle potential spawner nests |
| Risk vs. Reward |
Higher-tier miners extract faster but attract more danger |
| Scout First |
Clear existing biters before setting up mining operations |
| Perimeter Defense |
Wall off mining areas to contain spawned biters |
Combined Threat Timeline (Example: Tier 3 Mine)
| Time |
Event |
| 0:00 |
Player enters mine, explores corridors |
| 0:30 |
Player finds ore room, places T3 miners |
| 0:30 |
20% chance: Biter spawner appears near each miner |
| 1:00 |
Spawned nests begin producing biters |
| 5:00 |
First biter wave — 12-16 big biters attack from all sides |
| 8:00 |
Second wave — another 12-16 big biters |
| 11:00 |
Third wave — pressure mounts, spawner nests also producing |
| 14:00+ |
Waves continue every 3 minutes — staying too long becomes dangerous |
Design Philosophy
The wave and attraction systems create a natural risk-reward loop:
- Short raids (under 5 minutes) are safe — grab loot and leave
- Extended mining requires active defense planning
- Higher tiers offer better ore but demand better combat preparation
- The player is never permanently safe underground — the mine fights back
Future Ideas & Expansion Concepts
Everything below is brainstorming only — not yet implemented. These are ideas for what could be added to make the wave and miner systems deeper and more engaging.
Wave System Expansions
Escalating Wave Difficulty
- Each consecutive wave in the same mine visit gets +15% stronger (more biters, tougher types)
- After wave 5, a mini-boss unit joins the wave (e.g. a behemoth biter with 3x HP)
- After wave 10, the mine becomes "Overrun" — constant biter spawning, no more breaks between waves
- Warning message: "The tunnels are collapsing with enemies... You should leave!"
Wave Composition Variety
- Mixed waves — Instead of all one type, waves contain a mix: 60% melee biters, 25% spitters, 15% worms that burrow out of the ground
- Flanking waves — Some waves split into 2-3 groups attacking from different tunnels
- Swarm waves — Rare wave type: 3x the number of biters, but all one tier lower
- Siege waves — Waves that include small worms that deploy themselves as static defenses
Wave Announcements & Audio
- Warning audio cue 10 seconds before each wave (rumbling, screeching in the distance)
- Chat warning: "You hear movement in the tunnels..." (30s before), "They're coming!" (5s before)
- Ground tremor effect — Screen shake before large waves
- Radar ping — Brief unchart/rechart pulse showing incoming biter positions on minimap
Wave Rewards
- Each survived wave spawns a small loot drop where the biters died (ammo, repair packs, rare items)
- Wave streak bonus — Surviving 5 waves without leaving grants a special chest with tier-scaled loot
- Bounty system — Killing X biters in a mine unlocks a "Mine Cleared" bonus on the ore output (+10% yield)
Environmental Wave Triggers
- Explosion trigger — Using explosives (grenades, rockets) in a mine has a 30% chance to trigger an immediate bonus wave
- Light trigger — Placing too many lights or lamps attracts biters faster (reduces grace period)
- Noise level — More active miners in the mine = shorter wave intervals (1 miner = 3 min, 5 miners = 1.5 min)
Miner Attraction Expansions
Vibration Mechanic
- Each active miner generates a "vibration level" that accumulates over time
- Higher vibration = higher chance of spawning nests, shorter wave intervals
- Vibration dampers — New craftable item that reduces vibration from miners (research-gated)
- Vibration level shown as a small GUI indicator when in a mine
Progressive Nest Spawning
- Instead of instant spawner placement, a "nest formation" entity appears first
- The nest formation takes 60 seconds to mature into a full spawner
- Players can destroy it before it matures (200 HP, fragile)
- Visual: A pulsating organic growth that slowly expands
Miner Defense Upgrades
- Fortified Miners — Research upgrade that gives miners a built-in turret (weak, short range)
- Sonic Repeller Module — Module that can be inserted into miners, reduces nest spawn chance by 50%
- Decoy Miners — Fake miners that attract biters away from real mining operations. Cheap to build, explode when attacked (dealing damage)
Biter Adaptation
- If the player always uses the same defense (e.g. only gun turrets), biters evolve resistance to that damage type over subsequent waves
- Forces players to diversify their defensive strategy
- Shown as a buff icon on the wave announcement: "The biters have adapted to physical damage!"
- Resets when the player leaves and re-enters the mine
New Threat Types
Cave-Ins
- Prolonged mining in an area has a small chance to trigger a cave-in event
- A section of tunnel collapses: floor tiles turn to rubble, blocking passage
- Entities (miners, belts) in the collapse zone take heavy damage
- Player caught in a cave-in takes damage and gets slowed
- Cave-ins can be prevented by placing support beams (new craftable structure)
Gas Pockets
- Mining into certain areas releases toxic gas clouds
- Gas deals damage over time and reduces visibility
- Players need gas masks (equipment grid item) or must wait for the gas to dissipate
- Gas is attracted to light sources — lamps pull gas toward them, creating safe/dangerous zones