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
11 days ago
1.1 - 2.0
5.35K
Environment Mining

i Damage from pollution

[deleted message]
[deleted message]
6 months ago
(updated 6 months ago)

Thank you for the prompt reply. I did read your footnote just now. I suggest maybe adding in your main description that the subway is only available with certain versions, I spent too many hours trying to get it to work.

Also, I dont know if you can help me but I'm getting random repeated damage even after disabling events, is the collapse thing? How do I turn it off? I just want to play without any additional challenges.

I think a great mod helps clarify functionality and expectations with clear opt-ins.

6 months ago

You get damage from too much pollution.
There is an option to turn challenges off but I'm not sure if that also applies to that, I'll implement that

6 months ago

Thank you! thats interesting, yeah I added like 8 miners underground and they all were taking damage. In this case what am I supposed to do to prevent it?

6 months ago

Place air vents in the surface above them

6 months ago

is there an ideal ratio? like is one enough, or do I need like dozens per 8 miners?

6 months ago

Ehm I dont know tbh, the pollution that can be moved is 128 for active and 64 for passive vents per second (64 ticks). On my todo I have ideas to implement quality and I might add a description (if thats possible dynamically)

6 months ago
(updated 6 months ago)

Hope you dont mind but I quickly threw together changes in the mod (locally) including new configuration settings that seem to do the trick. I didnt bother to try to update the vent vs active vent pollution rate setting and added an override for pollution and suffocation.

Also the attrition due to pollution was completely annoying and I commented that out altogether. Def something that should be a configuration.

My code changes here (temporarily) if you want to use it for your update at all: https://filebin.net/neho1rl2d2mhtqqz

Note this is an auto expiring link but the gist is to add a boolean in the settings.lua for disable-suffocation then in control.lua wrap the logic to enable (or disable) the suffocation update, this version makes it off by default:

    if not settings.global["disable-suffocation"].value then 
    -- player suffocation damage
        for _,p in pairs(game.players) do
            if p.character and is_subsurface(p.surface) and p.surface.get_pollution(p.position) > suffocation_threshold then
                p.character.damage(suffocation_damage, game.forces.neutral, "poison")
                if (event.tick - 1) % 256 == 0 then p.print({"subsurface.suffocation"}, {1, 0, 0}) end
            end
        end
    end

And the same approach for altering pollution values in control.lua

    ...if settings.global["pollution-override"].value then

Just be sure to add a locale for the mod setting name and description for these new fields.

New response