Resource Spawner Overhaul

by orzelek

Overhauls resource spawning system.

13 days ago
0.14 - 1.1

g How to safely overwrite a resource configuration file?

1 year, 7 months ago

I have edited the resource config file (vanilla.lua), but it will be overwritten every time I update mod. Is it possible to transfer the adjustment to a new, dependent mode?
I mean, I would like to create a new mod and rewrite the fillVanillaConfig() function in it. But I do not know how (control or data.lua and how to connect). It is possible in simple way?
Thank you for this mod.

1 year, 7 months ago

It's not possible currently.
Config files are part of RSO and there is no interface to replace them.
There was a plan at some point to make an external interface for configuration files but it has proven complex and was postponed (most likely indefinitely).

What would you like to change in vanilla config?

1 year, 7 months ago
(updated 1 year, 7 months ago)

Almost everything, sometimes. I like very large maps witch trully sparse rich resources. Sometimes I have nice map, but some basic resource completly missing in 2k5 tiles from 0,0. Or I have 3 uranium ore patches, but too little oil. In resourse config file I can adjust setting to have cca 3 patches of all except uranium and 1 uranium at 4k x 4k. (I check if map is playable witch console command first, then restart witch same setting. So I know that 2k tiles that direction is ore :)

So I didn't need UI configuration options. The possibility to overwrite the function fillVanillaConfig(config) in my new mod would suffice.

P.S. And I always incrase oil size. 2-5 oil puddles in one oil patch is nothing compared to 20M ore patches in similar distance from 0,0.

1 year, 7 months ago

I think you are looking for different method of ore generation.
You are expecting the mod to do things it's not meant to. And your editing of config is only valid for one specific map gen seed that you are using at given moment plus resource settings from map settings menu.

Overwriting config table is not doable currently in easy way. It would be possible to make external interface to provide config data but it's a maintenance nightmare. Main reason for that is that anything provided through that interface can cause bugs and errors that will be listed as coming from RSO.
And table validation in lua is not something I'm willing to write.

I would recommend looking at other mods or trying to make forum request for mod that will generate balanced ore patches per given map area.

1 year, 7 months ago
(updated 1 year, 7 months ago)

Ok, no problem. I will do as before. Unzip, overwrite config and update only when necessary. Thank you for responses.
Actually I begin new map on 1.1 version. Cca 20 resource patches in -8000, 8000 rectangle. True railroad world. :)

1 year, 7 months ago

I'm sorry but your initial post doesn't give an idea you want a true railroad world. It gives impression that you want tightly controlled ideal world.

There is much simplier way to achieve bigger distances between resources (and more oil per swpan too).
If you want to travel further then increase the region size. Default value of 7 means one patch per 226x226 square (7x32 tiles - it's in chunks).
It seems that you would need to put values in range of 20-30 there and/or modify base resource chance per region to get result you prefer. No need to edit configuration file then.

As for amount of oil wells - size parameter from map settings should increase amount of wells per spawn currently. If it doesn't I'd need to check why.

1 year, 7 months ago
(updated 1 year, 7 months ago)

Yes. I have region size 32 and resource probability is 0.2. Sum of resources is OK for me.
Only problem is that random generation sometime create half this few patches as stone and create no coal in miles around origin. Or create too small iron patch in starting base. I know thats allright. Random is random.

And in this case I adjust config file. It's little bit cheaty, but IDC.

New response