Geothermals

by RiCZrd

Geothermal energy

Content
12 days ago
2.0
164
Mining

i for all planet

13 days ago

Hi, can you add geothermals for all planet with Space Age DLC?

13 days ago
(updated 12 days ago)

Unfortunately I don't have the Space Age DLC, so I can't test and release the new version. You can try this:

Open geothermals.lua in notepad and find:

data.raw.planet.nauvis.map_gen_settings.autoplace_controls["geothermals"] = {}
data.raw.planet.nauvis.map_gen_settings.autoplace_settings.entity.settings["geothermals"] = {}

Replace with:

data.raw.planet["nauvis"].map_gen_settings.autoplace_controls["geothermals"] = {}
data.raw.planet["nauvis"].map_gen_settings.autoplace_settings.entity.settings["geothermals"] = {}

data.raw.planet["vulcanus"].map_gen_settings.autoplace_controls["geothermals"] = {}
data.raw.planet["vulcanus"].map_gen_settings.autoplace_settings.entity.settings["geothermals"] = {}

data.raw.planet["gleba"].map_gen_settings.autoplace_controls["geothermals"] = {}
data.raw.planet["gleba"].map_gen_settings.autoplace_settings.entity.settings["geothermals"] = {}

data.raw.planet["fulgora"].map_gen_settings.autoplace_controls["geothermals"] = {}
data.raw.planet["fulgora"].map_gen_settings.autoplace_settings.entity.settings["geothermals"] = {}

data.raw.planet["aquilo"].map_gen_settings.autoplace_controls["geothermals"] = {}
data.raw.planet["aquilo"].map_gen_settings.autoplace_settings.entity.settings["geothermals"] = {}

Open info.json in notepad and find & add DLC:

"dependencies": [
"base >= 2.0.0",
"space-age"
]

12 days ago
(updated 12 days ago)

You can iterate over all planets rather than hardcoding,

In data-final-fixes.lua as planets would need to be added before your mod,

Something like the following should do it:

for _, planet in pairs(data.raw.planet) do
    if planet.map_gen_settings then
        planet.map_gen_settings.autoplace_controls = planet.map_gen_settings.autoplace_controls or {}
        planet.map_gen_settings.autoplace_controls["geothermals"] = {}

        planet.map_gen_settings.autoplace_settings = planet.map_gen_settings.autoplace_settings or {}
        planet.map_gen_settings.autoplace_settings.entity = planet.map_gen_settings.autoplace_settings.entity or {}
        planet.map_gen_settings.autoplace_settings.entity.settings = planet.map_gen_settings.autoplace_settings.entity.settings or {}
        planet.map_gen_settings.autoplace_settings.entity.settings["geothermals"] = {}
    end
end
12 days ago

RiCZrd Can I use your graphics and code to write my own mod?

12 days ago

Now supports Space Age DLC.

8 days ago

BTW this change (adding it to all planets) is absolutely amazing/wonderful. The default distribution makes them relatively small in impact, but gives a very nice starting edge. Especially on non-solar planets and non-water planets, it's a very nice extra boost.

New response