Mineshafts - Underground Mining


Explore procedurally generated underground mines beneath ore patches! Fight biter-infested dark caverns, discover boss rooms with treasure, navigate poison gas chambers, and mine rich ore deposits with tiered underground miners. Features multi-level mines, dynamic biter waves, ambient cave sounds, vault rooms, and rare ore deposits. Each mine is a unique dungeon with organic cave layouts scaling in difficulty with distance from spawn.

Content
7 days ago
2.0
232
Combat Enemies Environment Mining

Changelog

Version: 0.2.3
Date: 2026-04-14
  Changes:
    - Doubled biter counts for all wave types (scout, swarm, siege, elite, boss).
    - Wave escalation scaling increased from 15% to 20% per wave.
    - Minimum unit counts per group raised from 1 to 2.
    - Boss wave spiderling count increased (3 + tier*2, was 2 + tier).
    - Waves now spawn in 6 groups over 30 seconds instead of all at once.
    - Only one arrival message per wave (no repeated messages per group).
Version: 0.2.2
Date: 2026-04-14
  Features:
    - Craftable Mine Entrance Kits (T1-T4): Players can now build their own mine entrances!
    - Place entrance kits near ore patches on the surface to create custom mines.
    - Automatically detects the dominant ore type within 32 tiles.
    - New endgame technology chain: "Mine Entrance Construction" Mk1→Mk2→Mk3→Mk4 (each tier has its own research, all require space science, 1500/2000/3000/5000 packs).
    - Extremely expensive recipes — true endgame content:
      - T1: 50 processing units, 25 low-density structures, 50 steel plates
      - T2: 100 processing units, 50 low-density structures, 20 rocket control units
      - T3: 200 processing units, 100 low-density structures, 50 rocket control units
      - T4: 500 processing units, 200 low-density structures, 100 rocket control units, 20 nuclear fuel
    - Entrance kits can only be placed on the surface (not inside mines).
    - Crafted mines spawn without surface guard biters (you earned it!).
Version: 0.2.1
Date: 2026-04-14
  Features:
    - Completely overhauled biter wave system with 5 escalating wave types:
      - Scout: small recon group (wave 1)
      - Swarm: large number of small biters (waves 2-3)
      - Siege: mixed biters + ore-type spitters (waves 4-5)
      - Elite: small group of big/behemoth biters (waves 6-7)
      - Boss: strong biters + broodmother spiderlings (wave 8+, T2+ mines)
    - Wave warnings: 30-second rumble + message, 5-second imminent alert before each wave.
    - Wave escalation: interval decreases from 3 min down to 1 min minimum. Each wave spawns ~15% more enemies.
    - First wave now starts after 3 minutes underground (was 5 minutes).
    - Ore-type spitters now included in siege/elite/boss waves (ember-spitters, ferrite-spitters, etc.).
    - Wave mine lookup now uses O(1) surface_to_mine cache instead of iterating all mines.
Version: 0.2.0
Date: 2026-04-13
  Changes:
    - All 5 biter mods (Ember, Ironhide, Ferrite, Voltaic, Radiant) and Broodmother Boss are now required dependencies. Players must install all sub-mods for the full experience.
  Optimisations:
    - Teleportation: entrance triggers now use chunk-based spatial index instead of iterating all entrances (O(9) instead of O(n)).
    - Teleportation: exit/deep triggers now use O(1) surface-to-mine cache instead of iterating all mines.
    - Mine generation: split compute_caves phase into 3 sub-phases (grid init, room carving, tunnel carving) across 3 ticks to prevent 100ms spikes on large T3/T4 mines.
    - Chunk generation: optimised out-of-map tile array creation with direct indexing instead of table.insert.
    - Migration: automatically builds spatial lookup caches (surface_to_mine, entrance_chunks) for existing saves.
Version: 0.1.9
Date: 2026-04-13
  Optimisations:
    - Ore transfer system now skips mines on surfaces without players present (no wasted belt processing on hibernated mines).
    - Migration: on mod update, automatically destroys old abandoned structure entities (inserters, furnaces, drills, poles, lamps, transport belts, assemblers) from existing mine surfaces. Preserves ore transfer belt infrastructure.
Version: 0.1.8
Date: 2026-04-13
  Optimisations:
    - Reduced mine spawn frequency: only 40% of qualifying ore patches now generate a mine entrance (was 100%).
    - Increased minimum ore threshold default from 30 to 80 entities per chunk.
    - Increased minimum distance between mine entrances from 30 to 50 tiles.
    - Raised tier distance thresholds: T1 0-800, T2 800-1600, T3 1600-2400, T4 2400+ (was 500 per tier).
    - Removed abandoned structure entities (furnaces, poles, drills, inserters, assemblers, belts, lamps) from lost bases — only loot chests remain.
    - Broodmother spiderling count now scoped to 40-tile radius around boss (was global surface count).
    - Ferrite magnetic rally: single find_nearest_enemy call + 30-tile radius spiderling scan with limit 20 (was per-spiderling enemy search across entire surface).
  Features:
    - Added "Enable multi-layer mines" setting (default OFF). Deep mine levels are now disabled by default to reduce surface/entity count.
    - Multi-layer belt connections: deep mine levels now chain their underground belts to the parent mine's feeder belts, so resources flow upward through all levels to the surface.
  Bugfixes:
    - Fixed Factorio 2.0 API crash: Broodmother spiderlings and magnetic rally now use entity.commandable.set_command() instead of deprecated entity.set_command().
  Info:
    - Mine entrances are confirmed immune to all damage (blocked: 100% resistance; open: indestructible).
Version: 0.1.7
Date: 2026-04-13
  Bugfixes:
    - Fixed extreme entity growth on the overworld caused by native biter-spawner nests placed around mine entrances. Spawners continuously produced biters without any cap, leading to 100k+ entities per entrance over time.
    - Replaced overworld biter-spawner nests with static guard biters (4-12 per entrance, scaled by tier). Guards use ore-infused variants when biter sub-mods are installed.
    - Fixed non-recoverable error "Unknown virtual-signal name: signal-danger" in Broodmother enrage alert (replaced with signal-red).
    - Fixed Factorio 2.0 API change: guard biters now use entity.commandable.set_command() instead of deprecated entity.set_command().
  Optimisations:
    - Corpses are now cleaned up when mine surfaces hibernate (no player present), preventing entity accumulation on frozen surfaces.
    - On mod update all enemy units and corpses are purged from mine surfaces. Spawner nests repopulate naturally, keeping entity counts healthy.
Version: 0.1.6
Date: 2026-04-13
  Features:
    - Added The Broodmother spider boss — a massive 8-legged spider that spawns in boss rooms (4 tiers scaling with mine tier).
    - Added Spiderlings — small 5-legged spider adds that the Broodmother spawns only when attacked (max 15 active).
    - Broodmother Enrage Phase: below 30% HP (50% for Ember), the boss doubles spiderling spawn rate and creates fire.
    - Ore-type Broodmother variants with unique abilities:
      - Ember Broodmother (Coal): Fire aura in combat, enrages at 50% HP, fire burst on death.
      - Ironhide Broodmother (Stone): +75% HP, 3x passive regen, rock armor heals 15% of damage taken.
      - Ferrite Broodmother (Iron): +3 spiderlings per wave, max 20 active, magnetic rally focuses all spiderlings on nearest player.
      - Voltaic Broodmother (Copper): Electric discharge damages nearby players every 5s, spark visual effects.
      - Radiant Broodmother (Uranium): +50% HP, radiation aura poisons nearby players, poison cloud burst on death.
    - Boss death announces variant name with colored text to all players.
    - Broodmother and Spiderlings excluded from mine entity cap and hibernation cleanup.
  Changes:
    - Extracted Broodmother spider boss prototypes into separate mod: Mineshafts-Broodmother.
    - Broodmother now has 5 ore-infused variants with unique prototype stats, resistances, tints, and damage types.
    - Each variant has 4 tiers of broodmother and a unique spiderling type (20 boss + 5 spiderling entities total).
    - Added Mineshafts-Broodmother as optional dependency.
    - Mineshafts works without the Broodmother mod installed (boss rooms will simply be empty).
  Compatibility:
    - Added autoplace_settings to mineshaft planet prototypes for compatibility with DeepMine2 and other mods that iterate over planet map_gen_settings.
Version: 0.1.5
Date: 2026-04-12
  Features:
    - Added "Allow ore biters on surface" runtime setting (default off). When enabled, ore-infused biters also spawn on the surface near matching ore patches.
    - Biter sub-mods are now optional dependencies — Mineshafts works without them (falls back to vanilla biters in mines).
  Bugfixes:
    - Fixed crash "LuaEntity doesn't contain key set_command" when biter sub-mods are not installed. Biter wave spawning now validates prototype existence and entity type before issuing commands.
    - Fixed extreme entity growth (1M+ entities) caused by spawner nests producing biters indefinitely on unoccupied mine surfaces.
  Changes:
    - Mine building restrictions changed from whitelist to blacklist: players can now place any entity in mines except standard miners (burner/electric mining drill). Use underground miners instead.
    - Mine generation now gracefully falls back to vanilla biters/spawners if an ore biter mod is not installed.
    - Mine surfaces now hibernate when no players and no underground miners are present — all enemy units are removed and spawners deactivated.
    - Mine surfaces automatically reactivate spawners when a player enters or underground miners are detected.
    - Active mine surfaces enforce an enemy unit cap (200) to prevent runaway entity growth while keeping biters threatening to miners.
Version: 0.1.4
Date: 2026-04-12
  Bugfixes:
    - Fixed remote view teleportation bug: Players could enter mineshafts via map view (remote view / radar) by hovering over entrance triggers while using WASD to scroll the map. Teleportation is now blocked when the player is in chart or chart-zoomed-in render mode.
  Changes:
    - Rare ore deposits are now smaller and spawn further from the mine entrance (max 1 per mine, only beyond 40% of the mine's max room distance, 5% chance instead of 10%).
    - Reduced rare ore richness: pure uranium ×1.0 (was ×2.0), mixed ×0.8 (was ×1.5).
Version: 0.1.3
Date: 2026-04-11
  Features:
    - Added unique ore-infused biter variants: Ember (coal), Ironhide (stone), Ferrite (iron), Voltaic (copper), Radiant (uranium).
    - Each variant includes 4 biter sizes, 4 spitter sizes, 4 worm sizes, and 2 spawner types.
    - Ore-specific biters now spawn in mines matching their ore type.
    - Ember Biters: +25% speed, fire death effect.
    - Ironhide Biters: +40% HP, -15% speed, +60% physical resistance.
    - Ferrite Biters: +30% damage, +25% physical resistance.
    - Voltaic Biters: +20% attack speed.
    - Radiant Biters: +50% HP, +35% damage, poison cloud death effect.
  Changes:
    - Biter variants split into 5 separate companion mods for modularity.
Version: 0.1.2
Date: 2026-04-10
  Features:
    - Multi-level mines with deep entrance triggers.
    - Dynamic biter wave system scaling with mine depth and distance.
    - Ambient cave sound system with planet association.
    - Vault rooms with loot chests (T2+ mines).
    - Boss rooms with behemoth worms and spawner clusters.
    - Cave gas hazard rooms with poison clouds.
    - Rare uranium ore deposits in deep rooms.
    - Runtime mod settings for wave frequency, gas, and sounds.
  Bugfixes:
    - Fixed missing cave sounds by using planet.associate_surface() for mine surfaces.