[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

Lochar
Inserter
Inserter
Posts: 24
Joined: Mon Mar 14, 2016 4:06 pm
Contact:

Re: [0.12.x] RSO Discussion thread

Post by Lochar »

orzelek wrote:New version (2.2.0) is up with support for multiple starting locations in multiplayer.
Detailed usage instructions are available in description thread.

New feature is a bit experimental so please let me know if it causes issues when used.
So I probably need to not actually update my mods in the middle of a game.

Going from 2.1.0 to 2.2.0 caused my start area to respawn all ore. Previous ore was still there, thankfully, but it added all new ore spawns, plus an additional oil. Running current bob's mods and Factorissimo.

Berkys32
Fast Inserter
Fast Inserter
Posts: 113
Joined: Mon Mar 07, 2016 9:17 am
Contact:

Re: [0.12.x] RSO Discussion thread

Post by Berkys32 »

Lochar wrote:.

Going from 2.1.0 to 2.2.0 caused my start area to respawn all ore. Previous ore was still there, thankfully, but it added all new ore spawns, plus an additional oil. Running current bob's mods and Factorissimo.
Same here. Before i noticed it ores are everywhere. Can I somehow reverse it?

Edit: I tried some commands to respawn ore I found somewhere, but they didnt work. So is there any way how to save my saved game?

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

Re: [0.12.x] RSO Discussion thread

Post by orzelek »

Berkys32 wrote:
Lochar wrote:.

Going from 2.1.0 to 2.2.0 caused my start area to respawn all ore. Previous ore was still there, thankfully, but it added all new ore spawns, plus an additional oil. Running current bob's mods and Factorissimo.
Same here. Before i noticed it ores are everywhere. Can I somehow reverse it?

Edit: I tried some commands to respawn ore I found somewhere, but they didnt work. So is there any way how to save my saved game?
Sadly you'll need to live with those ores. If you updated mod it won't spawn new ones but no clearing up of old ones.
Unless you are ok with removing them with command like this:

Code: Select all

/c local pos = game.player.position  for _, entity in pairs(game.player.surface.find_entities_filtered{area = {{pos.x, pos.y},{pos.x + 32, pos.y + 32}}, type="resource"}) do if entity.valid then entity.destroy() end end
It will remove all resources in chunk to the right and below the player.

Berkys32
Fast Inserter
Fast Inserter
Posts: 113
Joined: Mon Mar 07, 2016 9:17 am
Contact:

Re: [0.12.x] RSO Discussion thread

Post by Berkys32 »

I dont care about achievements, so, your solution is all I need, thank you very much ;)

Demosthenex
Fast Inserter
Fast Inserter
Posts: 144
Joined: Mon Mar 14, 2016 3:51 pm
Contact:

Re: [0.12.x] RSO Discussion thread

Post by Demosthenex »

I'm using Factorio 0.14 with RSO 2.2.3 and Bob's mods. Our MP group had also asked for Reactors. We started the server map and off we went. Now we are getting to the tech level with Reactors was needed, but no one could find the research. We discovered that it was silently disabled because we missed a prerequisite mod. Oops. Adding in the missing mod, now Reactors is present. Unfortunately we have no fields of uranium ore.

I've tried regenerate_entity to see if it spawns in existing chunks, and explored significantly to find it in new chunks. None has been found in either case.

Please confirm this behavior: when adding a mod with a new ore after game creation, RSO will not generate that ore, ever.

I don't want to respawn all the ores on the entire map. If I must I can manually paint in some uranium fields within a kilometer of our different bases. Before I did that I just wanted to confirm RSO wouldn't do it for me somehow.

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

Re: [0.12.x] RSO Discussion thread

Post by orzelek »

Demosthenex wrote:I'm using Factorio 0.14 with RSO 2.2.3 and Bob's mods. Our MP group had also asked for Reactors. We started the server map and off we went. Now we are getting to the tech level with Reactors was needed, but no one could find the research. We discovered that it was silently disabled because we missed a prerequisite mod. Oops. Adding in the missing mod, now Reactors is present. Unfortunately we have no fields of uranium ore.

I've tried regenerate_entity to see if it spawns in existing chunks, and explored significantly to find it in new chunks. None has been found in either case.

Please confirm this behavior: when adding a mod with a new ore after game creation, RSO will not generate that ore, ever.

I don't want to respawn all the ores on the entire map. If I must I can manually paint in some uranium fields within a kilometer of our different bases. Before I did that I just wanted to confirm RSO wouldn't do it for me somehow.
I did not test this case specifically but RSO should spawn those new resources in newly generated regions. Since region is 7 chunks you might need to explore quite a lot.

Demosthenex
Fast Inserter
Fast Inserter
Posts: 144
Joined: Mon Mar 14, 2016 3:51 pm
Contact:

Re: [0.12.x] RSO Discussion thread

Post by Demosthenex »

orzelek wrote: I did not test this case specifically but RSO should spawn those new resources in newly generated regions. Since region is 7 chunks you might need to explore quite a lot.
Ok, I have confirmed even further out it is spawning. So regenerate doesn't trigger creation, but distance does.

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

Re: [0.12.x] RSO Discussion thread

Post by orzelek »

Demosthenex wrote:
orzelek wrote: I did not test this case specifically but RSO should spawn those new resources in newly generated regions. Since region is 7 chunks you might need to explore quite a lot.
Ok, I have confirmed even further out it is spawning. So regenerate doesn't trigger creation, but distance does.
Base game regenerate doesn'twork since RSO disables base game ore spawning.
And RSO's regenerate is full only currently mainly to preserve the ore layout between calls. It works the same if original conditions are not changed (adding new ore will change the layout).

Demosthenex
Fast Inserter
Fast Inserter
Posts: 144
Joined: Mon Mar 14, 2016 3:51 pm
Contact:

Re: [0.12.x] RSO Discussion thread

Post by Demosthenex »

I saw there was a way to remote call RSO to place ores, though as I understand it the behavior is to overwrite all ores, even those that may have already been exhausted.

Is there a way to remote call and tell it only place a specific ore? That way I could have it spawn uranium and leave the others untouched?

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

Re: [0.12.x] RSO Discussion thread

Post by orzelek »

Demosthenex wrote:I saw there was a way to remote call RSO to place ores, though as I understand it the behavior is to overwrite all ores, even those that may have already been exhausted.

Is there a way to remote call and tell it only place a specific ore? That way I could have it spawn uranium and leave the others untouched?
It's a bit tricky so it doesn't exist atm.
To preserve actual ore layout it would need to generate everything but not place those things in the end - it's a bit of potentially tricky code in places.

It depends on how much of map you already went through - starting ores are not respawned.

Demosthenex
Fast Inserter
Fast Inserter
Posts: 144
Joined: Mon Mar 14, 2016 3:51 pm
Contact:

Re: [0.12.x] RSO Discussion thread

Post by Demosthenex »

orzelek wrote: It's a bit tricky so it doesn't exist atm.
To preserve actual ore layout it would need to generate everything but not place those things in the end - it's a bit of potentially tricky code in places.

It depends on how much of map you already went through - starting ores are not respawned.
I think you misunderstood my question. I understand it's difficult to detect if a player has mined a resource, and so if you respawn all resources it will respawn patches that were already mined.

What I asked is could I tell the remote call to only globally respawn one ore type. In my case I would use the uranium we were missing at start, and if it makes patches in existing player areas thats fine. But adding ore would be limited to the type specified.

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

Re: [0.12.x] RSO Discussion thread

Post by orzelek »

Demosthenex wrote:
orzelek wrote: It's a bit tricky so it doesn't exist atm.
To preserve actual ore layout it would need to generate everything but not place those things in the end - it's a bit of potentially tricky code in places.

It depends on how much of map you already went through - starting ores are not respawned.
I think you misunderstood my question. I understand it's difficult to detect if a player has mined a resource, and so if you respawn all resources it will respawn patches that were already mined.

What I asked is could I tell the remote call to only globally respawn one ore type. In my case I would use the uranium we were missing at start, and if it makes patches in existing player areas thats fine. But adding ore would be limited to the type specified.
I did understand the question and what I wrote still holds.
It's not a question of generating one ore - it's a question to generate all the ores but only actually place that one. That requires some additional coding to make partial resource/enemy generation with skip flags and it's not available currently.
Reason behind is that ore generation is using random generator in specific way and to preserve the layout on two regen calls it needs to do complete generation to make sure that random numbers end up the same.

Affly
Burner Inserter
Burner Inserter
Posts: 9
Joined: Mon Aug 15, 2016 12:11 pm
Contact:

Re: [0.12.x] RSO Discussion thread

Post by Affly »

This probably showed up a million times but search doesn't give any related hits.

I was using RSO with 32 size regions with increased field size and more rare but much bigger bitter bases. However, before I started exploring the mod got updated and all my config reset. Sadly I didn't realize this until I had explored a bit and now I have lots of small fields all with like >1000 tiles between them which is what I wanted to avoid.

I tried using the regenerate command but it appears it does nothing, all fields stay where they are. Is there a way to reroll this world or should I just go deleting fields I don't like?

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

Re: [0.12.x] RSO Discussion thread

Post by orzelek »

Affly wrote:This probably showed up a million times but search doesn't give any related hits.

I was using RSO with 32 size regions with increased field size and more rare but much bigger bitter bases. However, before I started exploring the mod got updated and all my config reset. Sadly I didn't realize this until I had explored a bit and now I have lots of small fields all with like >1000 tiles between them which is what I wanted to avoid.

I tried using the regenerate command but it appears it does nothing, all fields stay where they are. Is there a way to reroll this world or should I just go deleting fields I don't like?
Hmm when you use regenerate after changing config file back it doesn't work?
I think it should regenerate everything basaed on new region size. It's not tested by me so there might be some bugs hiding there.
Can you provide save+mods somewhere so I can take a look?

Affly
Burner Inserter
Burner Inserter
Posts: 9
Joined: Mon Aug 15, 2016 12:11 pm
Contact:

Re: [0.12.x] RSO Discussion thread

Post by Affly »

After running around for a bit I found that the command does work, except it only regenerates areas I explore after I changed the config. The areas I found while exploring with the default config don't get changed.

Mod list: https://www.dropbox.com/sh/ggconu57q0yk ... lmvFa?dl=0
Save file: https://www.dropbox.com/s/y4361zlamk2gh ... y.zip?dl=0

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

Re: [0.12.x] RSO Discussion thread

Post by orzelek »

I looked into this and it's working as intended.

You increased region size so it automatically increased starting area size. And stuff in starting area is not touched by regen command.
With region size 32 starting area is from about -2k to 2k tiles - this includes increase from map generation settings.

One thing you can easily do is to go back to config, reduce region size to 7 and then call RSO clear method. That will erase everything around starting area using current region size.
After that call regen with your modified config and it will generate new stuff with new region size.

Affly
Burner Inserter
Burner Inserter
Posts: 9
Joined: Mon Aug 15, 2016 12:11 pm
Contact:

Re: [0.12.x] RSO Discussion thread

Post by Affly »

That would make too much sense since I forgot completely about the starting area increase. I used what you sugested and it worked great.

sonopard
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sun Oct 22, 2017 8:58 pm
Contact:

Re: [0.12.x] RSO Discussion thread - Feature Request

Post by sonopard »

Hello,

we'd like to extend RSO with an option to generate grass under potential resource fields to use RSO with the Water Maze mod. We've spent some time hacking about and found the check and managed to add a single grass tile at the resource patch origin, but we've never done anything with the factorio API before so we're kind of lost.

Maybe this is a trivial change for you, if you could give us a hint how to cover all of the patch area with grass or post a patch and have it in an upcoming version that would be helpful.


Thank you!

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

Re: [0.12.x] RSO Discussion thread - Feature Request

Post by orzelek »

sonopard wrote:Hello,

we'd like to extend RSO with an option to generate grass under potential resource fields to use RSO with the Water Maze mod. We've spent some time hacking about and found the check and managed to add a single grass tile at the resource patch origin, but we've never done anything with the factorio API before so we're kind of lost.

Maybe this is a trivial change for you, if you could give us a hint how to cover all of the patch area with grass or post a patch and have it in an upcoming version that would be helpful.


Thank you!
You get a necro reward for this post :)
It's a bit tricky to do I think unless complete terrain overwrite under ore patch is ok.
It would also need to bypass placement check but that shouldn't be a problem.

I will see what can be done - please use the proper version discussion thread for posting in the future.

Locked

Return to “Resource Spawner Overhaul”