Subsurface - build beneath your base!

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
9 days ago
1.1 - 2.0
4.01K
Environment Mining

b [Fixed] Error when removing mods with resources

17 days ago

Hi, every time I finish researching it and want to build it, I immediately get this message.

Error while running event Subsurface::on_built_entity (ID 6)
Subsurface/scripts/resources.lua:102: attempt to index field '?' (a nil value)
stack traceback:
Subsurface/scripts/resources.lua:102: in function 'make_resource_autoplace_settings'
Subsurface/control.lua:135: in function 'get_subsurface'
Subsurface/control.lua:427: in function <Subsurface/control.lua:411>

You helped me with a similar problem last year. I just can't remember. Thanks in advance!

17 days ago
(updated 17 days ago)

Can you try by replacing the line with:
if (prototypes.entity[name] or {}).type == "resource" then

16 days ago

Oh yes, it's working again! Thank you. I've tested it for a day, and if I run into any issues, I'll let you know.

16 days ago

For me the error occured when I removed a mod that added resources, was that the same for you?

16 days ago

Yes, that's right, I did it on purpose. In the beginning, I really only had time for the DLC, then I tested everything again—everything without your mod. After some time, updates came, and two weeks ago... Then I thought, why not test your mod? I knew that my settings would definitely mess something up. At first, I couldn't even build a tunnel. Only now, with the new patch and adjustments, was I able to play again.

Last year, it was with the Terberium mod—I had changed something with the auto-radar. You helped me back then in a similar way. I'm really impressed and think it's even better than Cargo Ships (just my personal opinion).

In the future, I could definitely see something with bunker doors and a few more technologies to research, like advanced vehicles or enhanced mine demolition power, Geothermal power plants. I was playing around with the Akularis Planet mod—removing it, adding it back in—then I tested your mod again. I probably forgot to do a proper clean-up. But the error didn’t go away—it escalated, and I couldn't enter any vehicles anymore. After some back and forth, I got this message.

New response