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
a month ago
0.14 - 2.1
154K
Environment

b Angel's: lines that remove iron-ore, copper-ore and stone clear the wrong table level (7.0.26, still in 7.1.4)

10 days ago
(updated 10 days ago)

Versions:
RSO 7.0.26 on Factorio 2.0.77, with Angel's (angelsrefining 2.0.4) and Bob's (bobores 2.1.2) plus MadClown's. Run base only, and again with Space Age 2.0.77. All mod settings at their defaults. The same lines are in 7.1.4.

What happens:
In resourceconfigs/mainconfig.lua, loadResourceConfig() (lines 578 to 587 in 7.0.26, 590 to 599 in 7.1.4):

if script.active_mods["angelsrefining"] then
fillAngelsOresConfig(config)

if not script.active_mods["Atlas_NormalOresForAngels"] then
    -- remove no longer needed ores
    config["copper-ore"] = nil
    config["iron-ore"] = nil
    config["stone"] = nil
end

end
Since 2.0 the per-planet tables live under config.nauvis, config.gleba and so on, set up at the top of the same function. These three assignments therefore clear top-level keys that don't exist, and the Nauvis entries stay in the table.

  • Without Space Age: the only effect is the log. At start-up, control.lua (line 1316 in 7.0.26) logs "Resource not available: iron-ore", then the same for copper-ore, stone and uranium-ore, twice each, and skips them. Nothing is placed under those names. I checked this by generating a map and counting.
  • With Space Age: stone is a real resource, because Space Age keeps it for Gleba. The Nauvis entry is then valid, and RSO places stone on Nauvis although Angel's meant to remove it there. The log then has only iron-ore, copper-ore and uranium-ore.

Measured:
A new map, seed 140140, default settings. Every chunk within 24 chunks of the origin was generated (1,568 x 1,568 tiles), and the resource entities were counted by name. Stone on Nauvis:

  • Without Space Age: 0
  • With Space Age: 1,255

Nothing named iron-ore, copper-ore or uranium-ore was placed in either run.

Smallest change:
Clear the Nauvis entries:

config.nauvis["copper-ore"] = nil
config.nauvis["iron-ore"] = nil
config.nauvis["stone"] = nil

fillBoboresConfig() runs earlier in the same function and adjusts config.nauvis["stone"], so clearing it afterwards is safe. Gleba's stone is in config.gleba and is untouched. uranium-ore is also logged as unavailable with Angel's, so it may belong in the same list. I haven't tested the change.

Separate issue, already reported:
with Space Age, tungsten-ore is also placed on Nauvis. It comes from bobores.lua, not from the lines above, and is the subject of https://mods.factorio.com/mod/rso-mod/discussion/6a8c5245be3ce9d791b494c3

New response