Modify global generator settings

Replaces resource spawning system, so that the distances between resources are much bigger. Railway is needed then.

Moderators: orzelek, Dark

Post Reply
User avatar
cybel
Manual Inserter
Manual Inserter
Posts: 3
Joined: Mon Jun 05, 2017 3:04 pm
Contact:

Modify global generator settings

Post by cybel »

Hey guys. First, I'd like to apologize if this is the wrong place to ask this question, however I believe it should be relatively appropriate due to being due to the interaction of RSO with setup.

Skip down for tl;dr edition...

Basically I've got a map which I've been adding mods to as I've played (please reserve your judgment on the wisdom of such behaviour :lol:), and recently I've added RSO and Bob's Ores to the mix. Now, early on when generating the world I configured it for a vanilla rail-world type experience - so frequency is "very low" on everything. Enter RSO, that remains a non-issue. Add Bob's Ores, and they get defaulted to "Normal". Now, I've got more tin and diamonds (from what I believe is the somewhat unusual "relative frequency" behaviour of RSO) then I could possibly need, and a potentially deadly future shortage of basic materials.

Now, since the part of the map I've already explored conforms to my expectations (via Vanilla generator), regenerating would cause more pain than gain (I did give it a shot, and it had an unfortunate effect on my mining operations :lol:). It also wouldn't solve the underlying problem since the configuration would remain botched. I certainly could rid myself of Bob's Ores at this point - but I'd like to avoid that if all possible.

Is there a method to modify the generator configuration for an existing save file? I've tinkered around with a few things like poking at game.player.surface and so on (read-only :roll:), but to no avail. If it would require hex editing or anything, that is perfectly acceptable. Also, any artifacts that may be caused are pretty much acceptable, clipped fields and the sort.

Thanks for your time.

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Modify global generator settings

Post by orzelek »

There are two possible solutions none of them involve editing map settings of save since thats not possible (unless you could edit save file itself which might be doable but tricky).

One would be to edit config.lua of RSO and ask it to ignore map settings. It would behave as everything set to defaults in map settings. If you modified richness there you could update the factors in mod settings.

Second solution would be me finally adding regen that skips biter bases but that would leave you with a lot less biters and ores in new places most likely.

User avatar
cybel
Manual Inserter
Manual Inserter
Posts: 3
Joined: Mon Jun 05, 2017 3:04 pm
Contact:

Re: Modify global generator settings

Post by cybel »

I've seen mention of it before, but mostly for cheating purposes. It would be nifty if the format was documented some.

I'll check that out. Feeling pretty dumb for not assuming that would be possible. If there are problems, I'll certainly alert you.

That kind of tool would be very nifty. I might suggest, in the per-map config tab, add an entry for each ore to change how it goes about generating them. It would be great for people like myself who are late to the game, or even just wanna change things up mid-stride. I'm not sure how flexible it is, since it would in theory have to play nice with generation-modifying mods like Bob's Ores.

Anyways, thanks for your assistance! I'll be sure to provide a bug report if anything goes sideways.

[edit]

Works like a charm. You're a life-saver. Great job on this mod, keep up the fine work!

[/edit]

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Modify global generator settings

Post by orzelek »

I'm not sure which solution you used from your post but good that it works ;)

As for making settings out of ores - it's not possible. When creating settings game knows nothing about ores and if theya re defined or not. So it would need to be either limited list with some not available or full list of supported ores. That would be a bit confusing and etend config menu a lot.

User avatar
cybel
Manual Inserter
Manual Inserter
Posts: 3
Joined: Mon Jun 05, 2017 3:04 pm
Contact:

Re: Modify global generator settings

Post by cybel »

I switched off reading the map's config through config.lua .

Oh, ya that kinda stinks. Maybe leave it up to other mods to support interop, the community seems pretty on board with that sort of thing as it is. I kinda hope they'll make it read/write eventually, since that would be a pretty powerful addition. The side-effects honestly don't seem too devastating (I counted all of two fields getting a little clipped in my tests).

Post Reply

Return to “Resource Spawner Overhaul”