Resource Spawner Overhaul

by orzelek

Makes resources more sparse than base game. You will need to use trains much earlier to get resources. Game will be more difficult especially with higher enemy settings.

Tweaks
2 months ago
0.14 - 2.0
149K
Environment

g I dont know

5 months ago
(updated 5 months ago)

hey - can you see problem ? with all pack of erm mods - in settings global hidden setting use vanila generator of bitters , in map settings hidden use RSO generator of biters - and on map not generate bitters https://mods.factorio.com/mod/enemyracemanager/discussion/67f85a5543421d09d37d2fc5

5 months ago
(updated 5 months ago)

Here are the test on my end. When Nauvis Enemy = "enemy", "mixed race", "2way splits" or "mixed race", they don't spawn. even when I force "rso-vanilla-biter-generation" = true and "rso-biter-generation" = false.

I see that there are multiple issues from RSO's data-final-fixes.lua.

  1. This block "for _, planet in pairs(data.raw.planet) do" set all my custom propertyExpression to 0 on nauvis, this breaks my custom spawn solutions for "2 ways split" and "4 ways split" and "mixed race"

  2. The following limits "rso-vanilla-biter-generation" to only work with bobenemies. So ERM biters' probabilities are set to 0, even when I forced "rso-vanilla-biter-generation" to true.

"if not settings.startup["rso-vanilla-biter-generation"].value and not mods["bobenemies"] then"

  1. It breaks my new minerals on Planet Char and Planet Aiur as well. "for _, resource in pairs(data.raw.resource) do" block is likely the cause.
5 months ago

orzelek you cant fixed it?

5 months ago
(updated 5 months ago)

I thought that I wrote here but it seems I didn't post.
Thanks for investigating this.
I'll try to take a look during weekend or soon after and see about fixing the issues with enemies.
Disabling of resources is intentional - rso needs configs for mods that add resources. Either mod authors can prepare them or I can do that - it depends on size of mod and amount of different resources.

5 months ago
(updated 5 months ago)

Is there any way to opt out of RSO for 3rd party resources or/and for 3rd party planets? The reason I asked for opt out is that I tuned my resources on my planets for aggressive enemy invasions and space logistic. RSO likely change that balance.

I have been using data.custom_attributes to pass values between mods and different data loading stages. Maybe add data.rso_ignore_planets and data.rso_ignore_resource_entities checks for other mods to bypass RSO?

5 months ago
(updated 5 months ago)

RSO works mostly in control stage so passing of data around in data stage won't help.
There is an interface to ignore planets by name:
remote.call("RSO", "ignoreSurface", "name-of-surface")
and it will work for any custom resources.
I'm not fully sure how to make it work with base game resources since they kind of exist globally but are modified on per planet basis and I didn't need to selectively ignore them yet.

5 months ago

Great. That should resolve the resource. I'll give it a shot on my end. My new resources only appears on my new surfaces.

5 months ago

using only Remote API didn't fix it. I had to made some changes and data stage bypass checks to your data-final-fix.lua tho.

https://gist.github.com/heyqule/9821327443a553545105d2928fb87d85

5 months ago

I have a potential idea how to fix it for any planet but I'll need to play with it a bit.
Are the resource names in that gist placeholders?
Like the "geyser_name" ?

5 months ago

Here are the proper names of my new resource.
aiur_mineral, aiur_mineral_2, aiur_geyser
char_mineral, char_mineral_2, char_geyser

5 months ago

Is my understanding correct that planet.lua from the gist is something you would put in your mod?
I'm applying your changes to RSO now and can release it soon.

5 months ago

ya. Planet.lua is for me.

5 months ago

I have released new RSO with your changes. Grab it and let me know if all works as planned.

5 months ago

OK. I'll take a look. Thanks.

5 months ago

Looks good on my end

5 months ago

Thats good and thanks for the help.

4 months ago

NP.

btw you should post the proper implementation of those 2 new variables on main page or FAQ page. In case someone do a bad implementation and override my changes lol.

data.rso_ignore_resource_entities = data.rso_ignore_resource_entities or {}
data.rso_ignore_resource_entities["resource_name1"] = true
data.rso_ignore_resource_entities["resource_name2"] = true
data.rso_ignore_resource_entities["resource_name3"] = true

data.rso_ignore_planets = data.rso_ignore_planets or {}
data.rso_ignore_planets['planet_name1'] = true

New response