Space Exploration - Mod Resource Spawner


Resources added by mods don't spawn on Space Exploration's planets. This fixes that... but at what cost?

Tweaks
5 hours ago
2.0
12
Environment
Owner:
Morganni
Source:
N/A
Homepage:
N/A
License:
MIT
Created:
2 days ago
Latest Version:
1.0.1 (5 hours ago)
Factorio version:
2.0
Downloaded by:
12 users

So what's all this about then?

Currently, when playing a game with Space Exploration and most other mods that add new resources, those new resources only spawn on Nauvis. This is awkward with, for instance, the ATOM modpack, which has many added resources and adds some very high production requirements to complete the game.

Unfortunately, this is impossible to fix externally due to Factorio engine limitations; once the surface is created for a planet (or asteroid belt, or whatever), it's resource generation settings are effectively fixed.

This mod fixes the problem.

No way, that's impossible.

Yes, I did say that. It turns out, there's a workaround. But it's a bit janky.

Every time SE creates a new surface (with certain exceptions), this mod creates an 'echo' surface with identical terrain, but the only entities that spawn are the missing resources. Then it copies them to the real surface. And then the echo surface just sits there, invisible to the player (unless you use editor), nothing much happening.

That sounds scary. Are there any side effects?

Beyond slowing down chunk generation, there shouldn't be. Since only resources that should be on the surface (according to SE's own universe generation process) but are not are spawned, no resource that shouldn't be present will appear, nor will existing resource patches double in size.

(I'm sure you're very disappointed.)

Since biter nests are notably not generated, there should be no performance impacts after generation; save files will grow somewhat, but since there's not much on the echo surfaces it shouldn't be too extreme. And because it isn't allowed to overwrite existing entities, it shouldn't have any impact on $SPOILERS.

You don't sound entirely confident about that last part.

Life is risk.

Sounds like fun. Can I add this to an existing game?

Yes! But there's a catch. Because of how it works, this mod only impacts newly created surfaces - which is to say, either surfaces you've never viewed, or ones that you've deleted and recreated. For planets that you've already got settled down on, you're out of luck, unless you want to dig up or lose everything you've got put down.

(Technically, it would be possible to work around this limitation, but it would be enough of a hassle for marginal gains that I have no interest in doing so. Unless I change my mind.)

And what if this gets a proper fix sometime down the road?

If, when a surface is created, this mod sees that there aren't any resources missing from the original surface, it will recognize that it's not needed and not create an echo surface, while continuing to augment generation for existing surfaces as needed. And should you disable this mod, any newly generated chunks on surfaces with echoes won't have the added resources, but already generated chunks will be unaffected.

Are you sure this is safe?

Mostly? I'm confident in it's behavior under typical circumstances, but there may be edge cases that I'm not aware of. I recommend saving before viewing a surface for the first time.