RSO 0.18 Angel's Natural Gas

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

Moderators: orzelek, Dark

Post Reply
Dregre
Burner Inserter
Burner Inserter
Posts: 14
Joined: Sat Jan 24, 2015 10:59 pm
Contact:

RSO 0.18 Angel's Natural Gas

Post by Dregre »

I've been trying to make RSOs Natural Gas spawns with Angel's Petrochem match up with the new "vanilla" angels spawn amounts. While I get the deposit % down to an approximate value by removing one 0 off the richness and minimum_amount in angelores.lua, this also causes the spawns to be approx 1/10 as common. What would be the appropriate way to reduce the % yield from the spawns in RSO without reducing the number of spawns?

In angels own files it has a richness_post_multiplier value, but I'm unable to find an equivalent feature in RSO. I find the richnessMultiplier in control.lua, but not certain if this is the riht value nor how to use it as it is not used elsewhere as far as I could find (and it is a local anyway)

Dregre
Burner Inserter
Burner Inserter
Posts: 14
Joined: Sat Jan 24, 2015 10:59 pm
Contact:

Re: RSO 0.18 Angel's Natural Gas

Post by Dregre »

Ok, so a minor edit here, it seems like the reduced spawns were a bad set of map rolls. However, gas does seem more rare than oil. The values that I have landed on which roughly get the same proportion of oil to gas as Angel's were:

Code: Select all

minimum_amount=5000,
richness={min=5000, max=15000},
starting={richness=10000, size=2, probability=1},
This is 25% of the current live values.

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

Re: RSO 0.18 Angel's Natural Gas

Post by orzelek »

Chances of spawning are based on allotment only (and the hidden modifiers for having lots of ores defined in game ;) ).
So density of ore spawns is not affected by parameters you changed but that randomness tends to look differnetly in places (it's not truly random because determinism etc.).

One other thing is the size parameter - for resources like oil it literally transfers to amount of spawned spots.
If values you posted match nicely I can add them to RSO soon-ish.

Dregre
Burner Inserter
Burner Inserter
Posts: 14
Joined: Sat Jan 24, 2015 10:59 pm
Contact:

Re: RSO 0.18 Angel's Natural Gas

Post by Dregre »

I'd recommend doing your own tests to see if you feel they fit. But if nothing else it reduces the massive overkill of gas that you tended to get.

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

Re: RSO 0.18 Angel's Natural Gas

Post by orzelek »

Dregre wrote:
Sat Feb 15, 2020 3:20 pm
I'd recommend doing your own tests to see if you feel they fit. But if nothing else it reduces the massive overkill of gas that you tended to get.
Having a tested set of values saves me lots of time - no need to prep empty mod folder, download all the mods and run some generation tests.

Dregre
Burner Inserter
Burner Inserter
Posts: 14
Joined: Sat Jan 24, 2015 10:59 pm
Contact:

Re: RSO 0.18 Angel's Natural Gas

Post by Dregre »

orzelek wrote:
Sun Feb 16, 2020 1:12 am
Having a tested set of values saves me lots of time - no need to prep empty mod folder, download all the mods and run some generation tests.
Any tips for doing a bit more of a comprehensive test? I have some time over the next few days so I'll do some more thorough testing then come back to you-

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

Re: RSO 0.18 Angel's Natural Gas

Post by orzelek »

Dregre wrote:
Sun Feb 16, 2020 10:23 pm
orzelek wrote:
Sun Feb 16, 2020 1:12 am
Having a tested set of values saves me lots of time - no need to prep empty mod folder, download all the mods and run some generation tests.
Any tips for doing a bit more of a comprehensive test? I have some time over the next few days so I'll do some more thorough testing then come back to you-
You can use this command:
/c remote.call("RSO", "runTest", 2000, 2000)

It generates map with given size around 0,0, speeds the game up to speed 2 and switches you to god controller for free exploration.

Dregre
Burner Inserter
Burner Inserter
Posts: 14
Joined: Sat Jan 24, 2015 10:59 pm
Contact:

Re: RSO 0.18 Angel's Natural Gas

Post by Dregre »

orzelek wrote:
Sun Feb 16, 2020 11:07 pm
Dregre wrote:
Sun Feb 16, 2020 10:23 pm
orzelek wrote:
Sun Feb 16, 2020 1:12 am
Having a tested set of values saves me lots of time - no need to prep empty mod folder, download all the mods and run some generation tests.
Any tips for doing a bit more of a comprehensive test? I have some time over the next few days so I'll do some more thorough testing then come back to you-
You can use this command:
/c remote.call("RSO", "runTest", 2000, 2000)

It generates map with given size around 0,0, speeds the game up to speed 2 and switches you to god controller for free exploration.
Appreciate it. Ran about 20 or so tests so far, and the results look promising. Variance aside, the gas spawns are about 3-5 times that of oil, which is about the same ratio as Angel's. While I am personally inclined to reduce it somewhat more, that is not inline with the main mod so I'll refrain from doing so. One thing I would personally prefer, but would like a second opinion about, is to reduce the size of the initial spawn down to the same as the oil one. This is partially to compensate for the lack of a spawn area spawn in Angel's and partially to reduce the chance of a spawn source of gas that negates the need to expand for that resource.

Dregre
Burner Inserter
Burner Inserter
Posts: 14
Joined: Sat Jan 24, 2015 10:59 pm
Contact:

Re: RSO 0.18 Angel's Natural Gas

Post by Dregre »

So, with the current data and using the following script to measure the amount of resources, I feel reasonable confident in saying that the values are about that of Angel's. I did however also end up increasing the oil spawn rate slightly, by allowing for larger deposits(increasing max from 3 to 6). This is due to angels having larger oil patches that RSO currently did and it reduced the gap further. Worth noting that the divisors are approximation based on counting and dividing the values in a limited set, so they may not be entirely accurate. Still, they should provide a decent estimate. An example from the last map I ran the script on: Natural gas: 120, Gas Quantity: 145883, Crude Oil: 242, Oil quantity: 57130.9

Code: Select all

local surface = game.player.surface
local natural_gas = surface.count_entities_filtered{name = 'angels-natural-gas'}
local crude_oil  = surface.count_entities_filtered{name = 'crude-oil'}
local oil_quant = 0
local gas_quant = 0
for _, ore in pairs(surface.find_entities_filtered{name = 'crude-oil'}) do
    oil_quant = oil_quant + ore.amount
end
for _, ore in pairs(surface.find_entities_filtered{name = 'angels-natural-gas'}) do
    gas_quant = gas_quant + ore.amount
end
game.print('Natural gas : ' .. natural_gas)
game.print('Gas quantity: ' .. gas_quant/1.5e1)
game.print('Crude oil   : ' .. crude_oil)
game.print('Oil quantity: ' .. oil_quant/3e3)
As with any of these changes, feel free to modify or incorporate as you wish. The current code after the last set of passes are as follows:
.\resourceconfigs\angelores.lua:ln 112

Code: Select all

   if game.entity_prototypes["angels-natural-gas"] then
   config["angels-natural-gas"] = {
      type="resource-liquid",
      minimum_amount=4000, -- reduced from 10k
      allotment=60,
      spawns_per_region={min=1, max=1},
      richness={min=4000, max=12000}, -- richness per resource spawn --reduced from 10k and 30k
      size={min=2, max=3},
      
      starting={richness=4000, size=1, probability=1}, --reduced from 20k to 4k for spawn are to bring it inline with the oil spawn, reduced size from 2 to 1, now about 1-2x that of the oil spawn
      
      multi_resource_chance=0.20,
      multi_resource={
         ["crude-oil"] = 4,
      }
   }
   
   config["crude-oil"].allotment=60
   config["crude-oil"].spawns_per_region={min=1, max=1}
   config["crude-oil"].size={min=2, max=6} --increased max from 4 to 6
   
   end   
end

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

Re: RSO 0.18 Angel's Natural Gas

Post by orzelek »

Added updated the definitions in 6.0.3 and released it.

Post Reply

Return to “Resource Spawner Overhaul”