[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

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 »

It used to be like 4-6 patches per field in older versions, not sure why it was halved to 2-3 in the default settings
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 »

Align wrote:It used to be like 4-6 patches per field in older versions, not sure why it was halved to 2-3 in the default settings
From what I recall there were voices that it's to much :D
It might have been also affected by some changes for ore scaling since it's using same factors.

I've also noticed recently that if you go far out patches are getting really numerous (15 or so) - this might also look a bit strange.
Not sure yet what to do with those.
hoho
Filter Inserter
Filter Inserter
Posts: 681
Joined: Sat Jan 18, 2014 11:23 am
Contact:

Re: [0.12.x] RSO Discussion thread

Post by hoho »

Align wrote:It used to be like 4-6 patches per field in older versions, not sure why it was halved to 2-3 in the default settings
In my latest game with latest version of RSO at default settings, oil seems to be in patches of 5-6 spouts. Could it perhaps just be the case of bad random results?
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 »

Hm... come to think of it I usually went with the config files rather than the "use in-game settings" mode, so it might just be those. And I haven't actually tested what the results with those are to any major extent, I just saw the "size=2 or 3" and figured it was what it said.
User avatar
SusiQ
Burner Inserter
Burner Inserter
Posts: 5
Joined: Mon Jan 19, 2015 12:45 pm
Contact:

Re: [0.12.x] RSO Discussion thread

Post by SusiQ »

I dont know if you are already aware of this but there is a slight problem with RSO and mapeditor.

If you change the respawn spot in map editor it doesnt actually change where the first resources are put. It leaves them wherever the original spawnspot was.
It doesn't change when you put the flag somewhere else. So then you start the game and you have no resources around you at the start.
Airat9000
Smart Inserter
Smart Inserter
Posts: 1418
Joined: Fri Mar 28, 2014 12:32 am
Contact:

Re: [0.12.x] RSO Discussion thread

Post by Airat9000 »

orzelek wrote:
Align wrote:It used to be like 4-6 patches per field in older versions, not sure why it was halved to 2-3 in the default settings
From what I recall there were voices that it's to much :D
It might have been also affected by some changes for ore scaling since it's using same factors.

I've also noticed recently that if you go far out patches are getting really numerous (15 or so) - this might also look a bit strange.
Not sure yet what to do with those.
hi :) I have an idea.
whether in the config file is the moon, or in another file display the ability to customize the amount of resources
Let's say not all kinds of resources, just change the number and separately
as well as a separate line
let
stone, iron
Rutile and all other resources to change their number in the same cell

рус
привет:) есть идея.
можно ли в файл конфиг луа, или в другой файл вывести возможность настраивать количество ресурса

Допустим не все виды ресурсов сразу менять количество а по отдельности

а отдельной строкой
допустим
камень, железо
рутил и все другие ресурсы менять их количество в одной клетке

Допустим не все виды ресурсов сразу менять количество

а отдельной строкой
допустим
камень, железо
рутил и все другие ресурсы менять их количество в одной клетке
xiaohong
Burner Inserter
Burner Inserter
Posts: 16
Joined: Wed Nov 25, 2015 2:26 am
Contact:

Re: [0.12.x] RSO Discussion thread

Post by xiaohong »

Hi, I am working on my own mod (NESTT, anyone want to guess what it stands for? hint, trains)
I would like for my mod to be compatible with RSO.
The problem I am now having is that RSO calls on_chunk_generated for every chunk generated regardless if the surface is the vanilla one aka "nauvis" or if it is a custom surface.
I would like RSO to ignore the custom surfaces I create in my mod so I made some recommended changes:
I've added about 10 lines to RSO control.lua to add an interface that can be called like this:

remote.call("RSO", "ignoreSurface", "name-of-surface")

this will tell RSO to ignore chuck generation if the surface.name = "name-of-surface"

the function auto adds the name into a global list, so it can be called multiple times for many surfaces.
I've tested it on one of my custom surfaces and it works.
I am quite new to LUA (but not programming) so sorry if anything is wrong.

This is for RSO 1.4.6
the file, control.lua and justTheChanges.txt Dropbox:
https://www.dropbox.com/sh/i00380jyb879 ... fOKLa?dl=0

Hope you will consider adding this to your mod

BTW love RSO, you guys are part of the reason I'm working on my own mod.
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 »

What problem is caused by RSO also being used on those other surfaces?

I do recall someone adjusting RSO to work differently for other surfaces - for Underground mod I think.

I'll see about adding that code in next release.
xiaohong
Burner Inserter
Burner Inserter
Posts: 16
Joined: Wed Nov 25, 2015 2:26 am
Contact:

Re: [0.12.x] RSO Discussion thread

Post by xiaohong »

Fixed a bug in the code, re-uploaded to link above.

The problem is that RSO is called on_chunk_generated, and my mod is also called, the order of these two calls is undetermined(or is there a way to tell the game? Adding RSO as a dependency seems to only affect initial script execution order and not events). My mod clears the chunk of all resources, if RSO is called first, there is no problem, but if my mod is called first, RSO will generate resources over my cleared chunks(which I don't want for my custom surface). I still want RSO to dictate ore gen in the nauvis surface, so the interface above only disables surfaces that other mods tell it to.

The reverse could also work, - an interface that tells RSO to generate for a certain surface, while all other surfaces are ignored. This would make more sense, since if a mod creates a custom surface it is very likely that that mod will handle its own surface gen

And yes I did see the code for the underground mod:

around line 1459
local function IsIgnoreResource(ResourcePrototype)
if string.find( ResourcePrototype.name, "underground-" ) ~= nil then
....

With the interface all future mods can disable ore gen for surfaces instead of you having to add code to make it compatible.
Timeslice
Long Handed Inserter
Long Handed Inserter
Posts: 75
Joined: Thu Aug 13, 2015 7:27 pm
Contact:

Re: [0.12.x] RSO Discussion thread

Post by Timeslice »

A few questions:
1. Does the way RSO handles oregen for tenemaut (Dark Matter Replicators) correctly account for this change in DMR 0.5.5: "Made it so that tenemut is found in small, dense clusters"? Obviously darkmatter.lua hasn't been changed since that update, but I don't know if RSO scales these numbers based on what was going to be generated.

2. I'm using Bob's mods (including Enemies) and Natural Evolution, which I have set to scale and handle things in line with bob's mods. I'd like NE to be authoratative over how bases spawn, rather than RSO. What advice would you give? Will RSO have any impact on NE's alien expansion logic?
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 »

Timeslice wrote:A few questions:
1. Does the way RSO handles oregen for tenemaut (Dark Matter Replicators) correctly account for this change in DMR 0.5.5: "Made it so that tenemut is found in small, dense clusters"? Obviously darkmatter.lua hasn't been changed since that update, but I don't know if RSO scales these numbers based on what was going to be generated.

2. I'm using Bob's mods (including Enemies) and Natural Evolution, which I have set to scale and handle things in line with bob's mods. I'd like NE to be authoratative over how bases spawn, rather than RSO. What advice would you give? Will RSO have any impact on NE's alien expansion logic?
1. There were no changes to tenemaut generation. Can try to edit it a bit to see how it works.
2. I'm not sure I understand. Natural Evolution doesn't change anything with bases spawning as far as I'm aware. RSO is capable of detecting Bob's enemies and will use it's new spawners and turrets in enemy bases.
Timeslice
Long Handed Inserter
Long Handed Inserter
Posts: 75
Joined: Thu Aug 13, 2015 7:27 pm
Contact:

Re: [0.12.x] RSO Discussion thread

Post by Timeslice »

NE changes the number of aliens that spawn around a base. Does RSO do anything with that on initial generation?
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 »

Timeslice wrote:NE changes the number of aliens that spawn around a base. Does RSO do anything with that on initial generation?
Thats a parameter of spawner and it's not modified by RSO.

New version is up.
Timeslice
Long Handed Inserter
Long Handed Inserter
Posts: 75
Joined: Thu Aug 13, 2015 7:27 pm
Contact:

Re: [0.12.x] RSO Discussion thread

Post by Timeslice »

Cool, thanks :)
User avatar
Arch666Angel
Smart Inserter
Smart Inserter
Posts: 1636
Joined: Sun Oct 18, 2015 11:52 am
Contact:

Re: [0.12.x] RSO Discussion thread

Post by Arch666Angel »

Pitched this idea already elsewhere but is there a way to have endless rescources and regular rescource spawns?

Had the idea of ore fields which have something like an endless core. Like have a Donut of regular ore around a core of endless ore of the same type. So you have the regular ore for volume and the endless for sustainability.
But my guess is that you have to create different entities for it to work?
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 »

Arch666Angel wrote:Pitched this idea already elsewhere but is there a way to have endless rescources and regular rescource spawns?

Had the idea of ore fields which have something like an endless core. Like have a Donut of regular ore around a core of endless ore of the same type. So you have the regular ore for volume and the endless for sustainability.
But my guess is that you have to create different entities for it to work?
Due to the way that game works you would need to have separate entities for this.
It's not a place of RSO to add those I think - could be modified to detect presence of them and spawn them properly.
User avatar
Arch666Angel
Smart Inserter
Smart Inserter
Posts: 1636
Joined: Sun Oct 18, 2015 11:52 am
Contact:

Re: [0.12.x] RSO Discussion thread

Post by Arch666Angel »

Is there a way to influence how far/close multi rescources spawn in relation to the original spawn in a given chunk?
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 »

Arch666Angel wrote:Is there a way to influence how far/close multi rescources spawn in relation to the original spawn in a given chunk?
Multi resources (assuming you mean multi spawn feature) are spawned in same region (7 chunks size by default). They don't relate to original spawn in any way.

If you mean resources randomly generating near each other thats a bit tricky to remove.
User avatar
Arch666Angel
Smart Inserter
Smart Inserter
Posts: 1636
Joined: Sun Oct 18, 2015 11:52 am
Contact:

Re: [0.12.x] RSO Discussion thread

Post by Arch666Angel »

I meant the Multi spawn Feature for having multiple spawns in the same Region. Would it help to tweak Region size?
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 »

Arch666Angel wrote:I meant the Multi spawn Feature for having multiple spawns in the same Region. Would it help to tweak Region size?
It depends if you are running with lots of mods. There is a feature that increases amount of ores per region depending on total ore count. They are still independently spawned. Can you describe what is the actuall effect you'd like to have?
Locked

Return to “Resource Spawner Overhaul”