Any Planet Start


Start on any of the first three planets: Vulcanus, Gleba, or Fulgora. Choose your planet in the startup mod settings before starting a new game. Compatible with many modded planets!

Content
12 days ago
2.0 - 2.1
40.7K
Factorio: Space Age Icon Space Age Mod
Planets Environment

i ✅ Reset Nauvis map settings when new mod installed?

14 days ago

I hit a strange interaction between mods I suspect is best fixed in this mod?

I started a playthrough using this mod, but then later wanted to install a mod to change Nauvis map settings.

Unfortunately, I think the Nauvis surface is already created even if there are no chunks generated, so a naive approach to changing map generation settings doesn't work for Nauvis (in the way it seems to work with other planets).

I suspect there is a relatively simple fix: I think its possible to reset Nauvis map settings when new mods are installed if no terrain has been generated, so its map generation is more consistent with other planets?

I've tested this patch and think it works, if it helps!

[code]
--- a/control.lua
+++ b/control.lua
@@ -64,6 +64,16 @@
game.print({"", "[Any Planet Start]: ", {"any-planet-start.mod-setting-changed"}})
end
correct_space_locations()
+ if storage.planet == "none" then return end
+
+ local nauvis = game.get_surface("nauvis") --[[@as LuaSurface]]
+ for chunk in nauvis.get_chunks() do
+ if nauvis.is_chunk_generated(chunk) then return end
+ end
+
+ -- Nauvis already exists when starting elsewhere, so refresh its settings
+ -- to pick up mod changes before any terrain is generated.
+ game.planets.nauvis.reset_map_gen_settings()
end)
script.on_event(e.on_technology_effects_reset, correct_space_locations)
script.on_event(e.on_research_reversed, correct_space_locations)
[/code]

(btw -- huge ♥ for this mod, it worked great!)

13 days ago

I did it a slightly different way, but as of version 1.2.3 Nauvis map gen settings should reset.
Thanks for the suggestion!

New response