Subsurface - build your base underground!

by Natha

While everyone is looking up to space, other planets and the rest of the universe, there is a whole world buried directly underneath us. Use this opportunity to declutter your factory logistics by routing it under your base and explore the underground!

Content
13 days ago
1.1 - 2.1
8.07K
Transportation Logistics Trains Environment Mining

b [Fixed] Crash when sealing entrances

a month ago

Error while running event Subsurface::on_object_destroyed (ID 178)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
[C]: in function 'index'
__Subsurface
/control.lua:809: in function <Subsurface/control.lua:800>

This happens when I try to use cave sealant on an entrance. When I use it from the surface it doesn't crash but it still appears bugged. I can no longer use the entrance and it loses a wire connection but the entity is still there visually and it blocks my path.

a month ago

On further testing, it only happens if the entrance is clear of any walls. I could safely seal one by building the walls into it. By the way, how does this mod handle modded planets and resources? It seems fine with rabbasca and Nauvis underground, but it crashes with Vulcanus underground.

a month ago
(updated a month ago)

Did you seal the upper or the lower part of the entrance?
There is no special handling of modded planets. Modded resources spawn udnerground if they are spawning overground.
Is it the same error message for volcanus? Could you send a savegame right before you seal the entrance that produces the error? (Please with only relevant mods)

a month ago

Error while running event Subsurface::on_object_destroyed (ID 178)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
[C]: in function 'index'
__Subsurface
/control.lua:809: in function <Subsurface/control.lua:800>

Here's the crash message I got from sealing it from underground. It was done on vanilla + subsurface only. I'm not sure how to share save files so I'll post that in a second. I learned a few more things when I drilled a second hole (my last report only involved one entrance. So here's what happens: If I try to seal either from the surface it works partially. It doesn't remove the graphics but it does remove the underground entrance and it works on both. But when I try to seal from underground I can cause the crash. Specifically, if I try to seal the first entrance I made, it crashes. If I try to seal the second, it doesn't. But if I seal the first from the top, it now crashes when I seal the second one from underground. I guess it doesn't like when I remove the last/only entrance?
As for the case with volcanus underground I get a different error message like this:
Error while running event Subsurface::on_built_entity (ID 6)
Subsurface/scripts/resources.lua:114: bad argument #1 of 2 to 'pairs' (table expected, got nil)
stack traceback:
[C]: in function 'pairs'
Subsurface/scripts/resources.lua:114: in function 'copy_resource_data'
Subsurface/control.lua:210: in function 'get_subsurface'
Subsurface/control.lua:517: in function 'replace_surface_drill_dummy'
Subsurface/control.lua:572: in function <Subsurface/control.lua:560>

It works with Nauvis underground and of course, vanilla vulcanus. I assume this is a problem with subterranio, but is there a way I can fix it on my end? I don't feel like waiting for the mod to update.

a month ago

https://www.dropbox.com/scl/fi/kdhpu3b5ts5c0umcntevg/Test.zip?rlkey=q917vld1ix1fdxlhv1l5oku81&st=24c941q9&dl=0

I think that should work. The file is cheated and on nauvis but the problem seems to apply to all subsurfaces

a month ago

This is a side tangent but I ran into it during testing. If I remove every entrance and don't have a logistic network on the surface, do I have any way to leave?

a month ago
(updated a month ago)

Fixed it. Please try if it works now on all other planets.

I can no longer use the entrance and it loses a wire connection but the entity is still there visually and it blocks my path.

When you seal the entrance multiple times, it becomes unblocked (but still visible).

If I remove every entrance and don't have a logistic network on the surface, do I have any way to leave?

No, youre stuck.

a month ago

The fix worked, no more crashing when sealing entrances. Still getting the crash when putting a drill in vulcanus underground. Is that something subterranio needs to fix? I'm hoping I can just give it the table it's looking for.

a month ago

You can download the file scripts/resources.lua from github which contains the fix.
I think of how to make my mod and subterranio work with each other...either prevent playing both or ensuring that subsurfaces can only be accessed from subterranio...

15 days ago

It's the latter I'm thinking. I imagine that first you drill down to the lowest surface, then the next drill takes you to the subterranio location. Then you can keep digging a few more layers from there. It's kinda goofy to bring them from the caves to the surface just to send them back underground.

15 days ago

I just tested and the script fix works in all underground sections.

New response