Feedback

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: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Feedback

Post by orzelek »

yeganer wrote:i'm not 100% sure but 0,0 should be the point where the 4 innermost regions touch, so you should aim for multiplies of 2 of the regionsize for the mapheight.

in general i think region size isn't necessaryly linked to chunksize. in theory any value should be possible.
I'll experiment with that in my rewrite.
I'm mostly coming from the fact that region size is currently direct factor in deciding about actual ore density. Assumption that it's based on chunks is used in few places I think.

yeganer
Long Handed Inserter
Long Handed Inserter
Posts: 74
Joined: Mon Jul 06, 2015 12:07 pm
Contact:

Re: Feedback

Post by yeganer »

but region size determines the number of chunks in a region.

what i wanted to say is that one could specify that one region is 128 tiles instead of 4 chunks for example. if it's changed to tiles instead of chunks one could use any number for chunksize (like 100 for example)

SirRichie
Fast Inserter
Fast Inserter
Posts: 244
Joined: Wed Feb 25, 2015 4:50 pm
Contact:

Re: Feedback

Post by SirRichie »

This creates a lot of effort and inefficiency, compared to little benefit, I think.

RSO hooks into the "chunk generated" event. There is no "tile generated" event. Now if you were to define a region size that is not a multiple of the chunk size, then you would suddenly have to do a lot of internal bookkeeping around the regions. Because the generation of one chunk could trigger two regions and it would suddenly not be so easy to calculate the region coordinates from chunk coordinates.

In the end: what would be the benefit of having this fine-grained control? a chunk is not that large...

yeganer
Long Handed Inserter
Long Handed Inserter
Posts: 74
Joined: Mon Jul 06, 2015 12:07 pm
Contact:

Re: Feedback

Post by yeganer »

it wouldn't be that difficult. assuming regionsize > chunksize one would only need to check which region the 4 corners belong to.

But you are right, it wouldn't give any meaningful benefit.

For my rewrite i'm rethinking the whole region approach. There should be a way to create some kind of "grid" without using hard borders like with regions. But i haven't put much thought into that. If you have an innovative idea how to distribute resource spawns without regions but rather a mathematical function?

If you know a "good" two dimensional periodic function. This would allow some cool stuff.

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

Re: Feedback

Post by orzelek »

yeganer wrote:it wouldn't be that difficult. assuming regionsize > chunksize one would only need to check which region the 4 corners belong to.

But you are right, it wouldn't give any meaningful benefit.

For my rewrite i'm rethinking the whole region approach. There should be a way to create some kind of "grid" without using hard borders like with regions. But i haven't put much thought into that. If you have an innovative idea how to distribute resource spawns without regions but rather a mathematical function?

If you know a "good" two dimensional periodic function. This would allow some cool stuff.
Let's see... how about a noise function... oh we have it already ;)
Basically using a function will make it similar to vanilla generation. Might give more control over how stuff gets generated over vanilla one.
But Perlin noise will be hard to beat as a distribution function.

SirRichie
Fast Inserter
Fast Inserter
Posts: 244
Joined: Wed Feb 25, 2015 4:50 pm
Contact:

Re: Feedback

Post by SirRichie »

The problem with Perlin noise is that you cannot go for RSO's more distance --> bigger patches approach.
The fact that you have no true control is the strength of Perlin, generating organic looking landscapes.

I wrote an RSO-similar mod for 11.x, because I didn't like how RSO distributed resources / wanted to have a multiplayer-capable version (so there was definitely some development in parallel).

If you do a rewrite, then you can think about getting rid of regions, by simply using chunks as the only distance metric.

Whenever a chunk gets generated, you would generate numbers to see if there should be a resource patch. The distance to 0,0 could control the size/richness of the patch. Obviously since this is chunk-based, the numbers would have to be adjusted.
You could then define minimum distances for each resource (e.g., minimum iron-iron distance and minimum iron-others distance). If you want to go fancy, you could allow a tiny chance (I'd estimate ~2%) to ignore this distance, which would effectively emulate multi resource regions.

I am happy to provide more details/info on this idea. Or even an algorithm.

Btw: in my rewrite, I did not use the rather complex library for actually placing resource patches but rather generated random polygons and used rasterization techniques - also happy to provide input here.

Peter34
Smart Inserter
Smart Inserter
Posts: 1100
Joined: Mon Nov 10, 2014 12:44 pm
Contact:

Re: Feedback

Post by Peter34 »

SirRichie wrote:If you do a rewrite, then you can think about getting rid of regions, by simply using chunks as the only distance metric.
I'm all in favour of the switch from regions to chunks, because the regions system seems to produce slightly wonky results in "tall_ribbon"-style maps. I've tried with both a height of 3 regions and 4 regions, and in both cases it looks as if I'm missing out on resources, relative to a world that's infinite in both directions.

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

Re: Feedback

Post by orzelek »

Peter34 wrote:
SirRichie wrote:If you do a rewrite, then you can think about getting rid of regions, by simply using chunks as the only distance metric.
I'm all in favour of the switch from regions to chunks, because the regions system seems to produce slightly wonky results in "tall_ribbon"-style maps. I've tried with both a height of 3 regions and 4 regions, and in both cases it looks as if I'm missing out on resources, relative to a world that's infinite in both directions.
I've run 512 high map and I don't think resources were missing. You will need to travel further for them thats for sure.
Switching to chunks will be tricky if you want to have multi-chunk resource fields generated. Also regions have quite important role in making ore generation deterministic so will need to be careful there.

SirRichie
Fast Inserter
Fast Inserter
Posts: 244
Joined: Wed Feb 25, 2015 4:50 pm
Contact:

Re: Feedback

Post by SirRichie »

regions are not a major problem. Resources are sparse in RSO, but it is not due to using regions.
RSO seems to not place resources across region borders, so with large patches you sometimes end up with unnaturally long, hard edges, but I think that is only a minor flaw.

I think the tricky part when not using regions is not multi-resources, but losing a mechanism for minimum distance. And I have worked through the code of RSO ;)

Anyway... this conversation drifts away from "Feedback". So here is my suggestion: I am happy to help with the re-write. I have played with a lot of RSO's parameters and I know how to code and design (I have a PhD in Computer Science). If you guys would like me to help, let's discuss what we actually want to have and how I can help, be it coding, analysis or whatever else. If you'd rather not have me help, that's fine too.

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

Re: Feedback

Post by orzelek »

SirRichie wrote:regions are not a major problem. Resources are sparse in RSO, but it is not due to using regions.
RSO seems to not place resources across region borders, so with large patches you sometimes end up with unnaturally long, hard edges, but I think that is only a minor flaw.
...
This would be probably my code trying to estimate the required area for calculations and failing at it.
Spawning of ore has no idea about regions. I'm not sure if the hard cut is not happening because it tries to put ore on chunk that has not been charted yet - it would be tricky to fix I think.

As for the rewrite - yeganer is handling that and from what I understand it won't be RSO any more :D

SirRichie
Fast Inserter
Fast Inserter
Posts: 244
Joined: Wed Feb 25, 2015 4:50 pm
Contact:

Re: Feedback

Post by SirRichie »

orzelek wrote: Spawning of ore has no idea about regions. I'm not sure if the hard cut is not happening because it tries to put ore on chunk that has not been charted yet - it would be tricky to fix I think.
Placing resources in not-yet-charted chunks works - tested this myself. It may also be the polygon-generator, but I more often than not see hard edges.

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

Re: Feedback

Post by orzelek »

SirRichie wrote:
orzelek wrote: Spawning of ore has no idea about regions. I'm not sure if the hard cut is not happening because it tries to put ore on chunk that has not been charted yet - it would be tricky to fix I think.
Placing resources in not-yet-charted chunks works - tested this myself. It may also be the polygon-generator, but I more often than not see hard edges.
I've seen them also from time to time - the problem is that full debug that could show me that is quite verbose currently. I'm not trying to fix it - larger areas are slowing the mod down so it's a bit of compromise. Recent collision avoidance for spawns also costs quite a bit of time to execute esp. in worst case scenario - trying in middle of water and failing on all 9 tries.

Peter34
Smart Inserter
Smart Inserter
Posts: 1100
Joined: Mon Nov 10, 2014 12:44 pm
Contact:

Re: Feedback

Post by Peter34 »

orzelek wrote:
SirRichie wrote:
orzelek wrote: Spawning of ore has no idea about regions. I'm not sure if the hard cut is not happening because it tries to put ore on chunk that has not been charted yet - it would be tricky to fix I think.
Placing resources in not-yet-charted chunks works - tested this myself. It may also be the polygon-generator, but I more often than not see hard edges.
I've seen them also from time to time - the problem is that full debug that could show me that is quite verbose currently. I'm not trying to fix it - larger areas are slowing the mod down so it's a bit of compromise. Recent collision avoidance for spawns also costs quite a bit of time to execute esp. in worst case scenario - trying in middle of water and failing on all 9 tries.
Why not place the water last, after the ore/coal/stone?

Come to think of it, I think even the vanilla game's settings are bugged, so that I end up getting "water only in starting area" even if I select "Small" or "Very Small" instead of "Only in Starting Area". If RSO could fix that vanilla game flaw, by making sure there are just tiny lakes in other parts of the map too, that would be nice.

(I use the Landfill mod, which has expensive bombs that can be used to create tiny lakes, but not everyone uses that mod, and for such people it's annoying to play on maps where there is water nowhere apart from the starting area.)

SirRichie
Fast Inserter
Fast Inserter
Posts: 244
Joined: Wed Feb 25, 2015 4:50 pm
Contact:

Re: Feedback

Post by SirRichie »

Peter34 wrote:
orzelek wrote:
SirRichie wrote:
orzelek wrote: Spawning of ore has no idea about regions. I'm not sure if the hard cut is not happening because it tries to put ore on chunk that has not been charted yet - it would be tricky to fix I think.
Placing resources in not-yet-charted chunks works - tested this myself. It may also be the polygon-generator, but I more often than not see hard edges.
I've seen them also from time to time - the problem is that full debug that could show me that is quite verbose currently. I'm not trying to fix it - larger areas are slowing the mod down so it's a bit of compromise. Recent collision avoidance for spawns also costs quite a bit of time to execute esp. in worst case scenario - trying in middle of water and failing on all 9 tries.
Why not place the water last, after the ore/coal/stone?

Come to think of it, I think even the vanilla game's settings are bugged, so that I end up getting "water only in starting area" even if I select "Small" or "Very Small" instead of "Only in Starting Area". If RSO could fix that vanilla game flaw, by making sure there are just tiny lakes in other parts of the map too, that would be nice.

(I use the Landfill mod, which has expensive bombs that can be used to create tiny lakes, but not everyone uses that mod, and for such people it's annoying to play on maps where there is water nowhere apart from the starting area.)
This is entirely impossible in the current state.
The way RSO works is by disabling resource placement by the game engine and then running its own resource generation. The generation, however, happens only AFTER the game world has been created. In fact, as a mod, your scripts (not entity definitions!) only start to work, after the game world has been created.

Also, placing water where resources are afterwards, will just make the resources be "in" the water (=inaccessible). You'd have to remove the resoures. But then you can as well check for a collission and try another spot.

Finally, I fail to see why it would be RSO's job to fix world generation bugs (if they truly are bugs). If you think water generation is buggy, then report and have the devs fix it.

Anomoly2012
Long Handed Inserter
Long Handed Inserter
Posts: 64
Joined: Wed Sep 16, 2015 7:14 pm
Contact:

Re: Feedback

Post by Anomoly2012 »

i am in no way criticising this mod... I follow several LP's that use this mod and for them things seem to work just fine... that being said...

I have tried many versions from 1.0.3 which from what i have read and seen and heard is supposed to be spread out to the point of concern in finding that next patch.. NegativeRoot's break the game LP staring Colonelwill , Xeteth and a dev.. sorry if i forgot anyone... ive been going at this for the last 6hrs trying to find a solution...

So.. i use several helper mods with only a few game changing mods.. Crafted Artifacts and Alien Oil maybe 1 or 2 more but nothing that would add a new gen to ore.. and i think i saw they were compatible with some version or another... But anyhow.. I seem to find maps that for some reason are just not doing the gen that i think in my limited understanding this mod is supposed to do... example.. i have 2 smallish patches of copper on a map that while they each can support say 10 miners for full coverage each have maybe 1-2k per tile of resource... or say a total of 8 oil patches in the area exposed by Initial map scan.. I do not think this is working as intended...

I have a save i play with i started back when .12 was first released and mistaking put in RSO 1.4.1 OK yeah this is almost as bad as base settings... And while most comment just go change the lua wtf its called to this and it should help... um, i use this mod because i dont want to have to strain my failing eye sight to go read through code that in all honesty makes chineese look easy to read and write... atleast that makes sense to me anyhow... are these versions working as intended? or are the base values not set at what i would consider the Oh shit my copper just ran out and I cant find anything anywhere... Like NegativeRoot was feeling way back in the early episodes of his current LP...

is there a better way to fix this? or is the only option i have to go and try to understand what i need to do to make changes in the LUA? because honestly if thats the case i may as well just fiddle with the base game settings...

I really like the idea of this mod...and i in no way want to make you think its a crap mod... quit the opposite... i think it adds to the fact that I want to have an extensive rail network running around my base that while not on the level of ColonelWill or the other Youtuber's but something I can look at and say... WoW that got pritty big... i think i did a desent job running all these tracks... FARL baby... when it doesnt crash your game... lol But anyhow.. if anyone knows what i can do to fix this issue i would be greatful.. as I am looking at my 100+hr save and just not really interested in waitng for my base to burn through a bunch of shit that in all honestly i didnt think it would be this much... or go the other route and stock pile a couple hundred million of each resource and spend idk several months slowly grinding away at it...

any thoughts, ideas, suggestions are welcome and appreicated... i basically just spent all of my play time today trolling everything i could find to figure out wtf is going on... and i damn near came close to starting a new save withough RSO installed... and that... would have made me very un happy...

Thanks... and again i appologize if i made you feel your mod was crap... Infact quit the opposite I hope, when you see that all I want is to have to use ALOT of trains to move resources around... i built 20 1-4-1 trains and have barely needed 11 running at any give time.. 2 iron 2 copper 1 coal 1 stone 1 oil 1 farl 1 engineering 1 pax and 1 de construction train... hell i am no running iron and copper on 1 each 2-6-2 and yeah im ripping through outposts... but within 2 hrs i have to pull everything up to move less then 100 tiles to the next patch...

ccik
Inserter
Inserter
Posts: 39
Joined: Sun Mar 16, 2014 11:46 am
Contact:

Re: Feedback

Post by ccik »

Are you by any chance playing with Factorio version 0.12.13?

I started a new game with 0.12.12, and all the ressources were spread out nicely. But after i upgraded to 0.12.13, new discovered ressources looked a lot like the ones generated by the basegame. So i assume that the mod breaking LUE deserialization bug in 0.12.13 also affects RSO.

I'm not sure if i should donwgrade to 0.12.12, or just wat for 0.12.15, but either way, it seems my game is now broken in regards to ressources.

Anomoly2012
Long Handed Inserter
Long Handed Inserter
Posts: 64
Joined: Wed Sep 16, 2015 7:14 pm
Contact:

Re: Feedback

Post by Anomoly2012 »

Nope.. This save was created when .12 was released a carefully upgraded to .12.10 and has remained as such.. It has come to my attention that infact it could have been RSO 1.4.1 and not the desired 1.0.3. As previously thought.. As i had been following negativeroot's break the game lp in preprations for .13 and what i had hpoed would be my first attempt at a much bigger scale base.. I am looking into finding out if theres a way to find the exact mods that were used in a saves creation other than what is shown when loading a save.. As that says 1.0.3 but i remember at 1 poi t i removed 1.4.1 after hearing root and will discussing the prefered 1.0.3 and its more lean patches as you expand...

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

Re: Feedback

Post by orzelek »

Anomoly2012 wrote:Nope.. This save was created when .12 was released a carefully upgraded to .12.10 and has remained as such.. It has come to my attention that infact it could have been RSO 1.4.1 and not the desired 1.0.3. As previously thought.. As i had been following negativeroot's break the game lp in preprations for .13 and what i had hpoed would be my first attempt at a much bigger scale base.. I am looking into finding out if theres a way to find the exact mods that were used in a saves creation other than what is shown when loading a save.. As that says 1.0.3 but i remember at 1 poi t i removed 1.4.1 after hearing root and will discussing the prefered 1.0.3 and its more lean patches as you expand...
One quite important thing - switching version of RSO during running game might cause some issues with ore generation. And result will not be visible instantly since some ore is already pre-generated for chunks that don't yet exist. New version will generate only for stuff discovered after it's added.

I don't follow any lp's so I have no idea what is the expectation for resource fields that they create. I had some changes done in 1.4.2 that were meant to increase amount of ores in fields far away from center significantly. It's still in progress - I don't get a lot of feedback from people playing mega bases. And when RSO creates ore fields with a lot of ore in them people start to say it's to easy so it's a bit hard to balance stuff.

Anomoly2012
Long Handed Inserter
Long Handed Inserter
Posts: 64
Joined: Wed Sep 16, 2015 7:14 pm
Contact:

Re: Feedback

Post by Anomoly2012 »

orzelek wrote:
Anomoly2012 wrote:Nope.. This save was created when .12 was released a carefully upgraded to .12.10 and has remained as such.. It has come to my attention that infact it could have been RSO 1.4.1 and not the desired 1.0.3. As previously thought.. As i had been following negativeroot's break the game lp in preprations for .13 and what i had hpoed would be my first attempt at a much bigger scale base.. I am looking into finding out if theres a way to find the exact mods that were used in a saves creation other than what is shown when loading a save.. As that says 1.0.3 but i remember at 1 poi t i removed 1.4.1 after hearing root and will discussing the prefered 1.0.3 and its more lean patches as you expand...
One quite important thing - switching version of RSO during running game might cause some issues with ore generation. And result will not be visible instantly since some ore is already pre-generated for chunks that don't yet exist. New version will generate only for stuff discovered after it's added.

I don't follow any lp's so I have no idea what is the expectation for resource fields that they create. I had some changes done in 1.4.2 that were meant to increase amount of ores in fields far away from center significantly. It's still in progress - I don't get a lot of feedback from people playing mega bases. And when RSO creates ore fields with a lot of ore in them people start to say it's to easy so it's a bit hard to balance stuff.

thanks for your reply.. it was sorted out... i found the notes made in regards to setting up mods and builds and such and realized i had both 1.0.3 which seems to balance out the way i am looking for and the newer 1.4.1 more generous rso were both installed but only 1 was active... i have a feeling from my current map and the deposits i am seeing in the area i have explored thanks to RSO radar that it is 1.4.1.. thanks for both really... basic game settings were a bit difficult to adjust to give the bigger more dense deposits the further out you go but you cannot be a specific to select this desired effect... RSO fits this desire exceptionally well...

my choices are limited and my desire to re start is not so great that i am putting things into works that will soon have things sorted an me back to playing again...probably 50 hrs or more grinding through all the deposits and oil that is present... if infact the code works and regens the ore past the point of current exploration and makes it the way i want i can then use allien artifact to balance out the abundance of deposits to a more realistic ammount... having 10 spots rought 150-300 % is imho a bit much... as i have yet to have any real oil issues running my starter base at full tilt... but anyhow i tend to go on and on... i will once things all aspects are considered post how the new gen works out and my findings as such...

thanks

A++

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

Re: Feedback

Post by orzelek »

Two things:
1. Do take the 1.4.3 - it's for Factorio up to 0.12.10 and will be more generous when you travel far so outposts should run longer.
2. If you feel like fun and don't want to change the save then back it up, put new RSO into it and run this command from console:

Code: Select all

/c remote.call("RSO", "regenerate")
This will respawn both ore and biters with new generation rules. With big base and lots of outpost might be a lot of work after to clean up first then reposition stuff.

Post Reply

Return to “Resource Spawner Overhaul”