[0.12.x] RSO Discussion thread

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

Moderators: orzelek, Dark

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

Re: [0.12.x] RSO Discussion thread

Post by orzelek »

yeganer wrote:there is a cap on maximum amount per tile. if a tile would exceed 4k i think it would be reduced to a random value between 3 and 4k.
This cap is only applied in starting area - anything outside of it has no limits currently.
orzelek
Smart Inserter
Smart Inserter
Posts: 3924
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: [0.12.x] RSO Discussion thread

Post by orzelek »

Codec wrote:I can say that the global_size_mult and size_distance_factor have no effect what so ever. I've tried from 1 to 9,999,999 and everything is still the same size. I've tried making new maps, using /c remote.call("RSO", "regenerate") and /c remote.call("RSO", "regenerate", true). Can anyone confirm that its working? The only way I've been able to tell that is doing anything at all is if i set to 0.1 then regen the ores, things get about 30% smaller then they where on any value large than 1. All I'm looking to do is make ores even rarer but massive in size once you find them. But I cant seem to make them any larger.


Edit: Seems there is a cap of 1.24 for global_size_mult, anything over than that has no effect. size_distance_factor is effected by this as well, you can never have nodes bigger than they would be at 1.24 global size.
It seems you are right.

After a bit of searching I found code that artificially limits size of resource field to be 32 at max. I'm not sure what is the reason behind it - I will take a look later to see if I can up the limit. I will need to leave it at some sane value still.
Also please note that starting resources are not affected by any size multipliers.
yeganer
Long Handed Inserter
Long Handed Inserter
Posts: 74
Joined: Mon Jul 06, 2015 12:07 pm
Contact:

Re: [0.12.x] RSO Discussion thread

Post by yeganer »

the limit is there because dark did some chunk checking and i think he only checked in a 32 radius if one can spawn there.
orzelek
Smart Inserter
Smart Inserter
Posts: 3924
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: [0.12.x] RSO Discussion thread

Post by orzelek »

I'm not sure if I will try to increase it - fields larger then a chunk are generated properly now in theory so it should work.
But there will be no guarantees and if it breaks the gen then no fixing of it for now.

Unless you can figure out some trick for new version yeganer.
orzelek
Smart Inserter
Smart Inserter
Posts: 3924
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: [0.12.x] RSO Discussion thread

Post by orzelek »

Codec wrote:I can say that the global_size_mult and size_distance_factor have no effect what so ever. I've tried from 1 to 9,999,999 and everything is still the same size. I've tried making new maps, using /c remote.call("RSO", "regenerate") and /c remote.call("RSO", "regenerate", true). Can anyone confirm that its working? The only way I've been able to tell that is doing anything at all is if i set to 0.1 then regen the ores, things get about 30% smaller then they where on any value large than 1. All I'm looking to do is make ores even rarer but massive in size once you find them. But I cant seem to make them any larger.


Edit: Seems there is a cap of 1.24 for global_size_mult, anything over than that has no effect. size_distance_factor is effected by this as well, you can never have nodes bigger than they would be at 1.24 global size.
Take a look at 1.3.3.

You should be able to get what you want now by increasing both size and richness multiplier (need to boost richness or fields are on minimum values due to balancer working). With reduced chance for the fields - those 4-5 chunks wide resource fields look really nice. They can fail to generate if they roll on un-generated chunks - thats hard to work around for now.
tsunami
Burner Inserter
Burner Inserter
Posts: 13
Joined: Sat Aug 15, 2015 5:36 pm
Contact:

Re: [0.12.x] RSO Discussion thread

Post by tsunami »

Is there any way to generate decent resource patches in the start and then spread out the rest? I tried the vanilla very low frequency to try to spread out the map but it kept leaving out key resources (IE Iron or Coal) in the starting area and then none to be found before finding biters. I tried RSO and ran into similar problems. The stupid world generation no matter what gives me tons of tiny pockets of resources (on default setting) or large but more rare resources but I am always missing one of the 4 main ore. I had to add in Galactic Trade and Dark Matter Replicators to guarantee I could get all the main resources.

I tried several dozen attempts with and without RSO to generate maps that were not stupid. Not sure what happened with the world generator between 0.11 and 0.12 but it went to hell!
User avatar
Align
Fast Inserter
Fast Inserter
Posts: 217
Joined: Sun Aug 10, 2014 5:17 pm
Contact:

Re: [0.12.x] RSO Discussion thread

Post by Align »

tsunami wrote:Is there any way to generate decent resource patches in the start and then spread out the rest? I tried the vanilla very low frequency to try to spread out the map but it kept leaving out key resources (IE Iron or Coal) in the starting area and then none to be found before finding biters. I tried RSO and ran into similar problems. The stupid world generation no matter what gives me tons of tiny pockets of resources (on default setting) or large but more rare resources but I am always missing one of the 4 main ore. I had to add in Galactic Trade and Dark Matter Replicators to guarantee I could get all the main resources.
Just checked with a fresh download of the latest RSO version (no config changes). It seemed to consistently generate worlds with all vanilla resources in the starting area as far as I could tell...
User avatar
Align
Fast Inserter
Fast Inserter
Posts: 217
Joined: Sun Aug 10, 2014 5:17 pm
Contact:

Re: [0.12.x] RSO Discussion thread

Post by Align »

After messing around with the settings for a bit, I get the feeling that the "size" variable produces half as big fields as in early versions of RSO. Maybe it used to be radius but is now interpreted as diameter? In any case, doubling the values given to it in vanilla.lua gives me the large sprawling fields I remember, though the shapes might still be different.

EDIT: hrm, just got two oil fields right next to each other within walking distance of spawn, all the wells had near 1000% yield... that can't be right.

EDIT2: Say, does the starting area have the same chance to spawn an additional resource as any other chunk? I've set oil to size 1 but just got a start with two fields (multi-resource-chance unchanged). I think that was different too?

EDIT4: Messed some more with the oil settings, thanks to determinism I could effectively reroll the same field with new variables. Richness min=2000, max=3000 produced wells around 400% yield. 500-1500 a more reasonable 160%.

EDT5: Well, managed to produce some config settings that I like, though they still need tweaking to be entirely like older versions of RSO; attached.
Attachments
rso align values.zip
(2.63 KiB) Downloaded 181 times
orzelek
Smart Inserter
Smart Inserter
Posts: 3924
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: [0.12.x] RSO Discussion thread

Post by orzelek »

I'm not really sure what are you trying to achieve. What is a tiny pocket for you - it seems for me that you want fields that have areas of dozen of chunks. And you want them in starting area or near it?

You can mess with map gen settings for size to make fields larger and it should work.
And if I understand correctly those big sprawling fields were not intentional - they would exceed the size parameters more then twice sometimes. So it's either them or actually respecting whats in the config files. You can always set resource size multiplier to 2 and get similar effects. Might need to boost richness also to prevent bigger fields generation with minimum values.

Oil fields for me are mostly around 50% in starting area. It's by design - you are meant to go and find some for bigger industry.
I found that further ones do get very large %-age differences and some get quite high.
tsunami
Burner Inserter
Burner Inserter
Posts: 13
Joined: Sat Aug 15, 2015 5:36 pm
Contact:

Re: [0.12.x] RSO Discussion thread

Post by tsunami »

Align wrote:Just checked with a fresh download of the latest RSO version (no config changes). It seemed to consistently generate worlds with all vanilla resources in the starting area as far as I could tell...
The only change I did was disable the "donut" shape in the RSO config. I am not going to pretend to understand all of the config but I looked in it to try to figure out what was going on. My experience with RSO in 0.11 was AMAZING! I loved the need to explore and expand and defend more territory. I am not blaming RSO for missing 1 or more necessary resources near the start. I even tried exploring a world very thoroughly that only spawned coal and oil in my starting area, all the other resources were at least 5 minute walking distance with 8-20 spawners sitting on top of them. Coal would be great if I didn't need copper, iron, or stone to actually build anything.
orzelek wrote:I'm not really sure what are you trying to achieve. What is a tiny pocket for you - it seems for me that you want fields that have areas of dozen of chunks. And you want them in starting area or near it?

You can mess with map gen settings for size to make fields larger and it should work.
And if I understand correctly those big sprawling fields were not intentional - they would exceed the size parameters more then twice sometimes. So it's either them or actually respecting whats in the config files. You can always set resource size multiplier to 2 and get similar effects. Might need to boost richness also to prevent bigger fields generation with minimum values.

Oil fields for me are mostly around 50% in starting area. It's by design - you are meant to go and find some for bigger industry.
I found that further ones do get very large %-age differences and some get quite high.
I just want a starting area with one medium sized patch of coal, copper, iron, and stone. That way I can start the game. I don't want fields that seem endless. I want to have to explore, but not if it means I can't build anything at all because I can't kill a dozen spawners to find my first patch of iron or copper. I don't want dozens of patches of 1-5 spots of an ore with a value of 300 either. If you get those you have to mine all the resources then place buildings down to actually build your factory. Trust me when you can't even build a furnace assembly longer than 4 double sided because the miners block everything, then you are basically stuck doing everything by hand until you get a large enough area cleared. That is far too tedious and annoying.
User avatar
Align
Fast Inserter
Fast Inserter
Posts: 217
Joined: Sun Aug 10, 2014 5:17 pm
Contact:

Re: [0.12.x] RSO Discussion thread

Post by Align »

tsunami wrote:I am not blaming RSO for missing 1 or more necessary resources near the start.
It's supposed to deliberately include all of them in the starting area though, so if it didn't for you that's some kind of bug.
orzelek wrote:You can mess with map gen settings for size to make fields larger and it should work.
And if I understand correctly those big sprawling fields were not intentional - they would exceed the size parameters more then twice sometimes. So it's either them or actually respecting whats in the config files. You can always set resource size multiplier to 2 and get similar effects. Might need to boost richness also to prevent bigger fields generation with minimum values.

Oil fields for me are mostly around 50% in starting area. It's by design - you are meant to go and find some for bigger industry.
I found that further ones do get very large %-age differences and some get quite high.
You can mess with the settings alright, but I think the default configuration should be more like previous versions of RSO, with large but not too rich fields spread around enough to make trains viable; that's what I was going for with my uploaded settings. A good guideline is the campaign mission that introduces trains.

The oil fields in the starting area were about right in yield, though there were sometimes an awful lot of them - I just discovered that the default settings produce ridiculously huge yields for fields outside the starting area (was 100-300% in older versions of RSO, and that was a lot - 1000% is way too much for standard settings). Probably a bug, but I fixed it anyway in my uploaded config.
DRBLN
Filter Inserter
Filter Inserter
Posts: 411
Joined: Sat Mar 23, 2013 12:44 pm
Contact:

Re: [0.12.x] RSO Discussion thread

Post by DRBLN »

Does it work with 12.04?
User avatar
Align
Fast Inserter
Fast Inserter
Posts: 217
Joined: Sun Aug 10, 2014 5:17 pm
Contact:

Re: [0.12.x] RSO Discussion thread

Post by Align »

Yes.
DRBLN
Filter Inserter
Filter Inserter
Posts: 411
Joined: Sat Mar 23, 2013 12:44 pm
Contact:

Re: [0.12.x] RSO Discussion thread

Post by DRBLN »

We started to have desyncs on our map after re-enabling RSO :(
Bisa
Filter Inserter
Filter Inserter
Posts: 450
Joined: Fri Jul 17, 2015 3:22 pm
Contact:

Re: [0.12.x] RSO Discussion thread

Post by Bisa »

DRBLN wrote:We started to have desyncs on our map after re-enabling RSO :(
I'm pretty sure it's connected with "discovering" new chunks of the map after some testing, I don't have the time to debug this so I'll just generate a new map to play on for now :p
Hosting a factorio server? Take a look at this || init script ||.
orzelek
Smart Inserter
Smart Inserter
Posts: 3924
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: [0.12.x] RSO Discussion thread

Post by orzelek »

Bisa wrote:
DRBLN wrote:We started to have desyncs on our map after re-enabling RSO :(
I'm pretty sure it's connected with "discovering" new chunks of the map after some testing, I don't have the time to debug this so I'll just generate a new map to play on for now :p
I'm not aware of any changes that would lead to descyns - tbh I have only vague idea what might cause them in the mods.
If it persists it might be worth reporting as a bug.
orzelek
Smart Inserter
Smart Inserter
Posts: 3924
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: [0.12.x] RSO Discussion thread

Post by orzelek »

tsunami wrote: <cut>

I just want a starting area with one medium sized patch of coal, copper, iron, and stone. That way I can start the game. I don't want fields that seem endless. I want to have to explore, but not if it means I can't build anything at all because I can't kill a dozen spawners to find my first patch of iron or copper. I don't want dozens of patches of 1-5 spots of an ore with a value of 300 either. If you get those you have to mine all the resources then place buildings down to actually build your factory. Trust me when you can't even build a furnace assembly longer than 4 double sided because the miners block everything, then you are basically stuck doing everything by hand until you get a large enough area cleared. That is far too tedious and annoying.
Please post me a save like this including any changes you made to the mod.
I made few changes on last version that were intended to make fields a bit larger - it's possible that something backfired.

Alternatively go into config file and enable the debug option at the top and then post log that can be found in script-output.
User avatar
Align
Fast Inserter
Fast Inserter
Posts: 217
Joined: Sun Aug 10, 2014 5:17 pm
Contact:

Re: [0.12.x] RSO Discussion thread

Post by Align »

Recently been experimenting with doubling region size while increasing resource spawn probability; fields are now further apart while still being about as common, so seeing multiple fields near each other is much rarer, excepting sub-spawns. Hard to compensate for the effect this has on the starting area, but reducing the size of it works well enough.
1920x1080 map image
Attachments
rso big regions.zip
(3.26 KiB) Downloaded 174 times
orzelek
Smart Inserter
Smart Inserter
Posts: 3924
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: [0.12.x] RSO Discussion thread

Post by orzelek »

Added new version.
Thanks to Align for the modified config - looks interesting so I applied it in a bit lighter form.
Lets see how it will work - should be closer to RSO experience from early versions.
GopherAtl
Fast Inserter
Fast Inserter
Posts: 177
Joined: Sat Jan 31, 2015 7:54 pm
Contact:

Re: [0.12.x] RSO Discussion thread

Post by GopherAtl »

With forces having been more fully implemented in 0.12.x and pvp, or any mp modes with multiple teams with separate tech etc - becoming viable (see klonan's start on a pvp mod here), the question of multiple starting areas has begun to come up in earnest.

Last night I decided to start poking at RSO, to see how hard it would be to make it generate multiple starting areas. The answer, not hugely. Mostly it was straightforward, the one tricky bit was I had to delay generating starting area resources, since only the vanilla starting area's chunks can be counted on to be generated when on_init is called. Because it can't generate starting area resources until the chunks are generated, it requests the chunks to generate on init, watches chunk generation, and generates each starting area as their chunks are all generated. Players are currently informed by a message "Starting area generated for force <name>"


The latest version of my fork, which I've tested only in sp, seems to be working. The source can be found on my github, and a usable zip of the mod can be obtained here

words are wordy, so I'll pause for a screenshot of the map with it generating 4 starting areas with separation 2
Image


The relevant info on using it currently:

Config Settings
There are two new config settings, starting_area_forces and starting_area_separation.

starting_area_forces is a list of strings, which are the names of the forces that should get their own starting areas. For normal single player this would just be {"player" } and the mod should work as before; for pvp it might be, say, {"blue","red"}, and it will create two starting areas (as well as forces "red" and "blue" if they don't exist already) equidistant from 0,0. All starting areas will be arranged on a circle centered on {0,0}, equal angles separating them (so 2 will be directly opposite 0,0; 4 will be arranged in a square, etc), but the rotation is offset by a random angle so they are not entirely predictable.

starting_area_separation is a factor that scales the radius of the circle on which the bases are placed. The radius of the circle will be starting_area_size * starting_area_separation, so the actual distance between bases will depend on the number of bases.


Remote methods
There are also some remote methods added, intended for use by pvp mods but usable in the console directly as well.

get_forces will return the starting_area_forces config value, just an array of the names of forces with starting areas.

get_force_spawn takes the name of a force as a parameter and returns the center of the starting area for that force, as {x=x,y=y}

------------------------

Now that I got it working, I thought I'd share it here; orzelek, you are of course welcome, encouraged even, to integrate this kind of functionality into the main RSO, whether you use my actual code or not. If you're not interested in doing so, I will likely maintain my fork, which I will try to keep sync'd with your latest main release, to provide this functionality.
My Mods:
Nixie Tubes - numeric displays for your circuit networks!
Logistic Combinators - use logistics values in circuit logic! -
Autowire - automate red/green wire connections
Locked

Return to “Resource Spawner Overhaul”