[MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

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

Moderators: orzelek, Dark

iGi
Burner Inserter
Burner Inserter
Posts: 12
Joined: Sat Nov 22, 2014 2:50 pm
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by iGi »

That would be great if you could post your config, Cheata.

I don't play any of those mods (actually i'm not even playing Factorio at all right now...) and I would just choose some arbitrary numbers for those resources myself...

User avatar
Cheata
Long Handed Inserter
Long Handed Inserter
Posts: 78
Joined: Sun Aug 17, 2014 6:46 am
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by Cheata »

iGi wrote:That would be great if you could post your config, Cheata.

I don't play any of those mods (actually i'm not even playing Factorio at all right now...) and I would just choose some arbitrary numbers for those resources myself...

check your git

iGi
Burner Inserter
Burner Inserter
Posts: 12
Joined: Sat Nov 22, 2014 2:50 pm
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by iGi »

Thanks for the config Cheata, i've added it and fixed some other stuff.

RSO should now work with shadows modpack.
Changes
Download:
rso-mod_1.0.9.zip
RSO v1.0.9
(23.2 KiB) Downloaded 230 times

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

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by orzelek »

iGi wrote:Thanks for the config Cheata, i've added it and fixed some other stuff.

RSO should now work with shadows modpack.
Thanks for the changes - I'll try to test it sometime soon to see how it works :D

callmewoof
Inserter
Inserter
Posts: 27
Joined: Fri Apr 24, 2015 3:46 am
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by callmewoof »

So maybe I'm not doing it right, but can someone tell me if I can or what I should be doing to config this? I'm using 1.8 and my game has been a bit of a mess. My starting area bleed dry pretty quick, I barely hit laser turrets before depleted. I had to turret creep past camps that would have 10-20 spawners just to get to a small area that would have like, 5-10 individual tiles with 2k ore in them. The game has been an uphill battle because by the time I get that setup (trains), I'm out of iron. Turret creep my way there, out of copper. Get more copper, out of oil. Rinse and repeat. Sure, I'm able to tech up a small amount each time, and I'm gaining speed in clearing the camps, but nothing in my factory can be automated

Basically, I never have a supply of resources last long enough to actually have a factory that runs as a whole factory. For a while, no circuits, but I get lots of iron and steel backlog, but then I get copper but my iron is dry, now I need some oil, and I fight 100+ camps to get to a whopping 1-3 oil slicks that go from 2.2/s to 0.1/s in a very, very short amount of time. Am I doing something wrong? Is there a way to work with this? Basically, I want a "I have to expand" but when I expand for trains, I'd like to actually get enough to make it worth my time (fighting 100 spawners to open up 10k ore is just... no value at all). Thanks!

User avatar
Cheata
Long Handed Inserter
Long Handed Inserter
Posts: 78
Joined: Sun Aug 17, 2014 6:46 am
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by Cheata »

callmewoof wrote:So maybe I'm not doing it right, but can someone tell me if I can or what I should be doing to config this? I'm using 1.8 and my game has been a bit of a mess. My starting area bleed dry pretty quick, I barely hit laser turrets before depleted. I had to turret creep past camps that would have 10-20 spawners just to get to a small area that would have like, 5-10 individual tiles with 2k ore in them. The game has been an uphill battle because by the time I get that setup (trains), I'm out of iron. Turret creep my way there, out of copper. Get more copper, out of oil. Rinse and repeat. Sure, I'm able to tech up a small amount each time, and I'm gaining speed in clearing the camps, but nothing in my factory can be automated

Basically, I never have a supply of resources last long enough to actually have a factory that runs as a whole factory. For a while, no circuits, but I get lots of iron and steel backlog, but then I get copper but my iron is dry, now I need some oil, and I fight 100+ camps to get to a whopping 1-3 oil slicks that go from 2.2/s to 0.1/s in a very, very short amount of time. Am I doing something wrong? Is there a way to work with this? Basically, I want a "I have to expand" but when I expand for trains, I'd like to actually get enough to make it worth my time (fighting 100 spawners to open up 10k ore is just... no value at all). Thanks!
ouch... if you want to stick with your current game you will just need to prioritize production... cut out everything that is unnecessary and focus on combat(turrets/walls) and getting enough research to get your power armor mk2 and destroyer combat drones

as for configuring the resource spawner overhaul... well the settings are in the config.lua which is commented to tell you whats what (at least the iron section is)

What settings should you use? well thats really up to you and how you like to play you will just need to tweak them and start a few games to work out what suits you best

in particular its probably worth focusing on the following settings

override_type = (i perfer full override so im not relying on the in game spawner at all)
override_normal_spawn = (set this to true or the normal spawns will continue to occur as well as the rso... unless you want that)

region_size= (the default is 8 but if you set it lower to say 4 you will get more resources spawning closer together). remember that reducing region size will also increase biter base density

richness_distance_factor = (the higher this number the faster resource per patch will increase as you get further from starting point)

Within each individual ore
allotment = (rarity of resource, higher number is more common ..i think)
spawns_per_region = (density of resource per region)
richness= (the default richness of a spawn)
starting={} increase the size and richness to give you more resources in your staring area

basically just get in there and have a play.

iv also found that a good way to judge how well the resources spawn is to generate a map then use
"/c game.forces.player.chart({lefttop={x=-1024,y=-1024},rightbottom={x=1024,y=1024}})"
this will reveal a large section of the map (it may take a while to generate, this can be speed up slightly with "/c game.speed=10" change to 1 for normal speed) you will then be able to see the general distribution of the resources and decided if your settings are correct.

for a closer view use "/c game.player.character=god" then you can zip around the map and inspect each patch individually, i also like to "/c game.player.insert{name="basic-mining-drill",count=1}" when doing this to get an average idea of how long a drill will last in a particular patch. ("/c game.player.character=game.players[1].character" to get back... i think its 1... might be 0)

when you've decided you like the way the resources are spawning then generate a map and go for it without the cheats


on a side note you might also like to look at the endless resource mod, that way you will always have at least some production even if its really slow

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

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by orzelek »

I was working on the mod a bit and I'm attaching new version here.

I rebalanced it a bit esp for use with other mods - it's still very preliminary since it's quite hard to figure out how distribution works out.
There should be more basic resources in starting area and early bases should not have heavy defense turrets.

I also added preliminary integration with Bob's Enemies which makes mod fully usable with it and Shadow's mod pack.

Thanks for the tips on checking stuff out Cheata I'll play with some of those instead of driving in uber debug car around :D

I could use feedback about resource distribution - I like changed resource generation and will tweak it as needed.
Attachments
rso-mod_1.0.10.zip
(22.99 KiB) Downloaded 190 times

callmewoof
Inserter
Inserter
Posts: 27
Joined: Fri Apr 24, 2015 3:46 am
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by callmewoof »

Thanks Cheeta for the info. And orzelek, I'm trying your version. I don't use bob's or dytech so I mostly play vanilla with a few things added. I tried generating a couple maps and used the scan chart console thing, and noticed a pattern: While ore distribution was pretty nice, and I saw the "more away from starting zone", I found that oil was everywhere. While my starting zone had about 4-6, within a few "zones" I would see clusters of 10-15 oil patches regularly. Now, don't get me wrong, I love more oil, and its the weakest part of the game (in my opinion... no matter how much you have, you will always end up with dozens of oil rigs pumping at 0.1/s and Speed modules. Rich deposit of oil? Who cares? It won't be for long!). So, yeah, I'm undecided. I like your version, but I can't really say if its "better" since you were tweaking it for the other mods that I don't use. But I love the starting zone, it feels "just right". Enough of everything but not too much or too close to resources.

User avatar
darkshadow1809
Filter Inserter
Filter Inserter
Posts: 306
Joined: Thu Jan 15, 2015 10:13 pm
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by darkshadow1809 »

orzelek wrote:I was working on the mod a bit and I'm attaching new version here.

I rebalanced it a bit esp for use with other mods - it's still very preliminary since it's quite hard to figure out how distribution works out.
There should be more basic resources in starting area and early bases should not have heavy defense turrets.

I also added preliminary integration with Bob's Enemies which makes mod fully usable with it and Shadow's mod pack.

Thanks for the tips on checking stuff out Cheata I'll play with some of those instead of driving in uber debug car around :D

I could use feedback about resource distribution - I like changed resource generation and will tweak it as needed.

Thanks! Credits with your name will be added :D Uploading to modpacks now!
ShadowsModpackDevelopment

Beric
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Apr 27, 2015 5:26 pm
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by Beric »

Unfortunately, I have determined that this mod is the cause of constant desyncs in multiplayer (every few minutes or less). My friend and I have tried enabling this this mod alone, as well as in combination with other mods, as well as trying all of the versions of this mod in this thread. The only combination that results in desyncs is when the RSO mod is enabled - other mods are absolutely stable and we can play for hours on end. Any ideas on what might be happening? We have tried playing with game version 11.20 and 11.22.

Please note that singleplayer seems to work fine.

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

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by orzelek »

Sadly can't help you there.
I imagine there are few things that this mod does that will execute differently on clients.

There is some convoluted way of generating random seed in the mod and also built it random number generator. Technically according to author's comments it was meant to provide deterministic resources generation. Without some help from developers I have no idea what I could change to make it work properly in MP.

On the other hand - I seen that there was a multiplayer game played with previous version of the mod and Marathon mod in one of the threads. So I guess it was working before but not working now. Can you try to grab the 1.0.2 from first post and check with it ?

Beric
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Apr 27, 2015 5:26 pm
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by Beric »

orzelek wrote:Sadly can't help you there.
I imagine there are few things that this mod does that will execute differently on clients.

There is some convoluted way of generating random seed in the mod and also built it random number generator. Technically according to author's comments it was meant to provide deterministic resources generation. Without some help from developers I have no idea what I could change to make it work properly in MP.

On the other hand - I seen that there was a multiplayer game played with previous version of the mod and Marathon mod in one of the threads. So I guess it was working before but not working now. Can you try to grab the 1.0.2 from first post and check with it ?
Thanks for your reply!

Unfortunately the 1.02 version of the game does not seem to run on the latest version of Factorio. The game refuses to launch when I put this version in the mods folder.

iGi
Burner Inserter
Burner Inserter
Posts: 12
Joined: Sat Nov 22, 2014 2:50 pm
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by iGi »

Beric wrote:Unfortunately, I have determined that this mod is the cause of constant desyncs in multiplayer (every few minutes or less). My friend and I have tried enabling this this mod alone, as well as in combination with other mods, as well as trying all of the versions of this mod in this thread. The only combination that results in desyncs is when the RSO mod is enabled - other mods are absolutely stable and we can play for hours on end. Any ideas on what might be happening? We have tried playing with game version 11.20 and 11.22.

Please note that singleplayer seems to work fine.
Can you try to do the following:
Open the control.lua and remove or comment the line with "checkConfigForInvalidResources()"
It's on line 632 in RSO 1.0.9.

Code: Select all

local function init()
  if not glob.regions then glob.regions = {} end
	--checkConfigForInvalidResources()
  prebuild_config_data()
  generate_seed()
  calculate_spawner_ratio()
  spawn_starting_resources()
  ...
At least the constant desyncs were fixed by this change for me, there may be more...

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

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by orzelek »

iGi wrote:*cut other quote*
Can you try to do the following:
Open the control.lua and remove or comment the line with "checkConfigForInvalidResources()"
It's on line 632 in RSO 1.0.9.

Code: Select all

local function init()
  if not glob.regions then glob.regions = {} end
	--checkConfigForInvalidResources()
  prebuild_config_data()
  generate_seed()
  calculate_spawner_ratio()
  spawn_starting_resources()
  ...
At least the constant desyncs were fixed by this change for me, there may be more...
This one shouldn't be causing a problem now - it had other nasty side effects and I guarded it by flag. It seems that for some reason init is called after each save action (seems that oninit or on load event is triggered after save). It was causing mod to disable itself with lots of errors after first save.

callmewoof
Inserter
Inserter
Posts: 27
Joined: Fri Apr 24, 2015 3:46 am
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by callmewoof »

Edit: Game errors out on me when starting a new game fairly quickly with something about "unknown something bob_spitter_spawner line 528" or something. I forgot to save the exact error. It happened just while in the middle of play, hadn't really explored this new map much or put down a radar or anything.

Edit-Edit: This error is with the 1.0.10 version, and after clicking OK on the error box, it crashes the map and takes me back to main menu.

Is there a way to lower the amount of oil fields? Like I said, I'm getting spawns of 10+ a time in a spot, but almost every "zone" has them just outside my starting zones. I saw in one of the lua files it said oil field was .0005 chance or something, but they're still WAY too common. Well, maybe not... you never have enough oil, hmm. I don't know.

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

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by orzelek »

callmewoof wrote:Edit: Game errors out on me when starting a new game fairly quickly with something about "unknown something bob_spitter_spawner line 528" or something. I forgot to save the exact error. It happened just while in the middle of play, hadn't really explored this new map much or put down a radar or anything.

Edit-Edit: This error is with the 1.0.10 version, and after clicking OK on the error box, it crashes the map and takes me back to main menu.

Is there a way to lower the amount of oil fields? Like I said, I'm getting spawns of 10+ a time in a spot, but almost every "zone" has them just outside my starting zones. I saw in one of the lua files it said oil field was .0005 chance or something, but they're still WAY too common. Well, maybe not... you never have enough oil, hmm. I don't know.
Are you using any mods?
Error you are getting would implicate that it detected Bob's enemies mod and tried to spawn it's version of spitter spawner.

I generated few games and it's not spamming oil fields that badly for me. Actually had few in starting area as they should be and none in quite big range. That might simply be rng "luck" of draw.
Edit: ok got the oil field farm. It's... nice. I'm looking into it.

Trev_lite
Inserter
Inserter
Posts: 43
Joined: Sat Mar 28, 2015 9:20 pm
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by Trev_lite »

Could there be an option for peace mod with biters. I want to use peace mod for the alien ore but configured so that biters and military are still there. Could this be added as an option to the config file.

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

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by orzelek »

Trev_lite wrote:Could there be an option for peace mod with biters. I want to use peace mod for the alien ore but configured so that biters and military are still there. Could this be added as an option to the config file.
I'm affraid you'd need to go to peace mod thread to get answer for this one.

User avatar
Cheata
Long Handed Inserter
Long Handed Inserter
Posts: 78
Joined: Sun Aug 17, 2014 6:46 am
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by Cheata »

with the liquid field spawns be aware that:
size determines the number of fields placed in a grouping
spawns_per_region may need to be reduced as well as or instead of the probability of spawn(this affects the number of cluster in a region that spawns oil)

try removing the multi spawns for oil from other resources (eg stone and coal)

and finally when liquid resources are placed by the rso the richness_distance_factor affects the size (number of wells in a cluster) instead of actual resource content (see lines 831 through 833 of the control.lua)
this means that the further you get from the starting point the larger the fields will get

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

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by orzelek »

New version attached here.

Resource generation reduced a bit - and for oil a lot (previous one could spawn more then 20 in one region - this one up to 8).
I fixed the potential crash when mod was thinking that Bob's enemies were present but there was no spawner entity - it won't crash now just print a warning message.

And I have no idea about potential desync - I generated and regenerated few seeds in SP without visible problems. Ore layout and values is matching - same with biters.
Attachments
rso-mod_1.0.11.zip
(23.04 KiB) Downloaded 188 times

Post Reply

Return to “Resource Spawner Overhaul”