The Cave


⛏️ Dig, explore, loot, and survive in a vast underground world. Discover hidden treasures, special caverns, dangerous enemies, and depth-based progression from Easy to Nightmare. Experience reworked digging, balanced ore and oil progression, 8-level resource scaling, optional challenge modes, Train Interiors, research upgrades, and a balanced coin market. Enter the optional Dark Zones, where you have only 30 seconds to place lights before the darkness becomes dangerous.

Content
5 hours ago
2.0
1.01K
Factorio: Space Age Icon Space Age Mod
Enemies Environment Mining

b Belt Crashing

11 days ago

Not certain why, but on the latest patch I am getting this error when I place a belt, splitter, or underground.

Error while running event the-cave::on_built_entity (ID 6)
Unknown entity name: the-cave-turbo-loader
stack traceback:
[C]: in function 'find_entities_filtered'
the-cave/scripts/industrial_loaders.lua:81: in function 'snap_adjacent_loaders'
the-cave/scripts/industrial_loaders.lua:96: in function 'on_built'
the-cave/control.lua:752: in function <the-cave/control.lua:717>

I am also being attacked while under the big light posts. Attacks stop under the normal one.

11 days ago

let me check

11 days ago

Thanks for your patience. I found and fixed both issues in version 2.7.2. They were two separate bugs.

Belt, Splitter and Underground Belt crash

The Underground Belt itself was not actually broken. The error came from The Cave’s automatic Loader-snapping system.

Whenever a Belt, Splitter or Underground Belt was placed, the mod checked both sides of it for an adjacent The Cave Loader. The old search used a list of specific Loader entity names, including the-cave-turbo-loader.

However, the Turbo Loader prototype only exists when Turbo Belts are available, normally with Space Age. In a game where that prototype did not exist, Factorio rejected the entire entity search and produced this error:

Unknown entity name: the-cave-turbo-loader

That is why placing an ordinary Belt, Splitter or Underground Belt could cause an error even though you were not placing a Turbo Loader.

I changed the search to look for the valid Loader entity types—loader and loader-1x1—instead of querying every possible Loader name. After finding nearby entities, the mod checks whether they are one of The Cave’s actual available Loaders before applying the automatic direction and input/output snapping.

This keeps the Loader-snapping behaviour working while making it safe both with and without Space Age or Turbo Belts.

Lamp Post and Darkness Infestation

The Lamp Post issue was caused by an incorrect fixed power threshold in the Darkness Infestation protection check.

The old code required a lamp to have more than 50 joules of stored energy before it counted as powered. A normal Small Lamp uses 5 kW and usually remained above that threshold. The integrated Lamp Post uses only 3 kW and holds approximately 50 joules per tick even when it is fully supplied.

Because the old check required the value to be strictly greater than 50, a fully powered Lamp Post could sometimes be treated as unpowered. The problem became even more noticeable during a brownout or when the electrical network could not provide full power. This is why Darkness Infestation could attack you underneath the large Lamp Post while protection under a normal Small Lamp still worked.

The check now accepts any lamp that is receiving electrical power:

  • Energy above zero: the lamp protects the player.
  • Energy equal to zero: the lamp is genuinely unpowered and the normal 30-second Darkness Infestation grace period begins.
  • A lamp disabled through its circuit condition still does not provide protection.

This change does not modify the Lamp Post’s power usage, light radius, visual behaviour, recipe or circuit-network functionality. It only corrects how Darkness Infestation determines whether the lamp is powered.

The protection ranges remain:

  • Small Lamp: 12 tiles
  • Lamp Post: 30 tiles

Both fixes are included in The Cave 2.7.2.
Please install 2.7.2 and restart Factorio before testing. If either problem still happens in 2.7.2, please send me the new error message and I will investigate it further.

New response