Resource Spawner Overhaul - Old discussion thread

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

Moderators: orzelek, Dark

User avatar
Lime
Inserter
Inserter
Posts: 34
Joined: Tue Dec 23, 2014 1:50 pm
Contact:

Re: Resource Spawner Overhaul - Discussion thread

Post by Lime »

Oh come oooon. Started yesterday new game. Richness/size - 0.8/0.7, vanilla resources amount in spawn area decreased by 20-30%, playing with bob's modpack. I've already researched few tier-3 research, built 2km railroad, and I still have 255k iron, 227k copper, 347k coal, 86k stone on the base. That's just ridiculous!
Image

User avatar
Takezu
Fast Inserter
Fast Inserter
Posts: 247
Joined: Sun May 10, 2015 5:46 pm
Contact:

Re: Resource Spawner Overhaul - Discussion thread

Post by Takezu »

i'm pretty sure you should update from 1.1.0 to 1.1.1 ...

User avatar
Lime
Inserter
Inserter
Posts: 34
Joined: Tue Dec 23, 2014 1:50 pm
Contact:

Re: Resource Spawner Overhaul - Discussion thread

Post by Lime »

That's actually with 1.1.1
Image

User avatar
Takezu
Fast Inserter
Fast Inserter
Posts: 247
Joined: Sun May 10, 2015 5:46 pm
Contact:

Re: Resource Spawner Overhaul - Discussion thread

Post by Takezu »

Then your really economical. I'm about to tap oil field 4 and 5 because i've run out again. Haven't even got araound to Modules 3.
My Iron and Copper reservesare almost empyt round about 20K at most. would be empty long ago if i've put Speed modules in the miners.
the only thing left is coal and stone but thats expectet due to the fact i've only used it for plastics most times and stone is well stone, not much used anyways.
my multipliers are slightly higher as well, 1.1 Richness 1.05 Size. so i don't know what you're doing but feeding of my factory from the strting area wouldn't brought me very far. Better said didn't brought me very far. And thats only my vanilla map, my other maps (Dytech/bobs mods) are far more demanding, there the starting resscources last for some hours, then goes nothing without trains.

User avatar
Lime
Inserter
Inserter
Posts: 34
Joined: Tue Dec 23, 2014 1:50 pm
Contact:

Re: Resource Spawner Overhaul - Discussion thread

Post by Lime »

@orzelek: What does the "force" variables in the control.lua means? What does that value correspond to?

Second question:

Code: Select all

starting={richness=12000, size=20, probability=1},
Is size == radius of ore spot?
What does the richness here means?
Are these two values affected by global_richness_mult & global_size_mult?
Image

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

Re: Resource Spawner Overhaul - Discussion thread

Post by orzelek »

Lime wrote:Oh come oooon. Started yesterday new game. Richness/size - 0.8/0.7, vanilla resources amount in spawn area decreased by 20-30%, playing with bob's modpack. I've already researched few tier-3 research, built 2km railroad, and I still have 255k iron, 227k copper, 347k coal, 86k stone on the base. That's just ridiculous!
I'm not sure what to say other then please provide a save and mod list and I can check if thats intended.
Alternatively you can enable debug mode in config and restart the game using same seed which should produce the log of generated ores in script output directory.

Other thing is that it depends on play style a lot and I'm not planning and gui for difficulty level so it's possible that it will be to generous for you and you need to drop the richness :D

Main question would be - whats the good amount of starting ores? Thats kind of difficult to answer for me.

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

Re: Resource Spawner Overhaul - Discussion thread

Post by orzelek »

Lime wrote:@orzelek: What does the "force" variables in the control.lua means? What does that value correspond to?

Second question:

Code: Select all

starting={richness=12000, size=20, probability=1},
Is size == radius of ore spot?
What does the richness here means?
Are these two values affected by global_richness_mult & global_size_mult?
Not sure what do you mean about force values - there is a metaball generator there and it's using a bit abstract force to decide how much influence in given point is produced to decided how much ore to put there. Final values there spawn ore when > 0 and they reach up to 1.
For the more curious description of those is here: gamedev link

Starting settings richness currently determines how much ore will be in the deposit (semi accurate and a bit randomized). Size will influence amount of ore and starting point for generation of deposit - actual deposit size might vary wildly depending on rng and terrain. Both of those are affected by global richness and size when spawning.

User avatar
Lime
Inserter
Inserter
Posts: 34
Joined: Tue Dec 23, 2014 1:50 pm
Contact:

Re: Resource Spawner Overhaul - Discussion thread

Post by Lime »

Well, I've deleted the save in anger, but I've made a screenshot somewhat after getting T1/T2 packs automated: here.

As for the modlist:
AlphaMod_0.0.8
BeltBlocker_1.0.0
Belts+_0.0.2
BetterElectricPole_0.0.2
Force Fields_1.0.1
Landfill_2.1.2
Lane Splitters_1.2.2
MoarInserters_1.2.0
Power-Switch-Mod_0.2.0
RailTanker_0.0.7
Resource-Monitor-Mod_0.5.2
Slipstream_1.0.2
SmartSplitters_0.0.2
Treefarm-AC_0.1.5
Treefarm-Lite_0.1.5
UpGrade_0.0.5
UraniumPower_0.3.0
bobassembly_0.1.8
bobelecoveride_0.1.3
bobenemies_0.1.2
boblogistics_0.1.7
bobmodules_0.2.9
bobores_0.6.7
bobplates_0.7.11
bobpower_0.1.8
bobwarfare_0.1.4
floors_0.0.2
fort-mod_0.2.0
hydrogen-fuel_0.0.1
moskin_1.0.6
rso-mod_1.1.1
tree_collision_health_0.1.0
As for optimal amount - for me, for example, that would be just about enough to research and build a train with a few km of railroad, about 10-30 turrets with some ammo, walls, gates, and an infrastructure to get T1 and T2 research packs going. Maybe get a car/tank, though not necessary. And this is the milestone where you should be expanding beyond your cute and safe nest.

Do i understand right, that richness - is total amount in deposit? Or it's an abstract number?
Image

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

Re: Resource Spawner Overhaul - Discussion thread

Post by orzelek »

Without a save there is no seed value to go on sadly.

As for the things you mentioned - it's still very random how much you would actually need for all this things. And if rng shows it's bad side you might need to search for copper for 100's of tiles. If you want scarce resources I'd recommend to leave size multiplier alone since it has other implications and drop the main global mod to 0.2 for example.

User avatar
Takezu
Fast Inserter
Fast Inserter
Posts: 247
Joined: Sun May 10, 2015 5:46 pm
Contact:

Re: Resource Spawner Overhaul - Discussion thread

Post by Takezu »

Well coulden'T you implement something like Hardcore mode, in which you get all your starting ressources divided by 2 in the config.
I need atlest one of my ressources almost complete until i'm really ready to go out and build a big multitrainnetwork.
But if someone really thinks he can make it with less there would be the option in the configs for those.
With a warning use on own responsibility ;)

User avatar
Lime
Inserter
Inserter
Posts: 34
Joined: Tue Dec 23, 2014 1:50 pm
Contact:

Re: Resource Spawner Overhaul - Discussion thread

Post by Lime »

Well, actually, if starting resources would be affected by global size/richness settings, that would be enough. Or an extra config, like, "resource multiplier for starting area".

I've done some testing on a new map, with ResourceMonitor, and I guess optimal amount of resources in the starting area would be: 60-80k iron, 10-20k stone, 20-30k copper, 10-20k coal, 1-2 oil wells. That would get you going with the T1/T2 researches, few km of the railroad and some decent defence. And about 10k surplus on each of the resources. As on screenshot, basically.

@orzelek: size - is roughly a radius of ore deposit, right? Can you, please, explain a bit more, what is richness and how does it play with size?

If I change the size but keep the richness - how exactly it will affect the deposit generated?
Image

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

Re: Resource Spawner Overhaul - Discussion thread

Post by orzelek »

Here is the actual formula:

Code: Select all

local minSize = richness * math.pi * (size / 6) * (size / 6)
local maxSize = richness * math.pi * (size / 4) * (size / 4)
local approxDepositSize = rgen:random(minSize, maxSize)
It's a bit bugged since it should use radius and have bigger multipliers potentially. I will fix it with next update.
Size used here is multiplied by the global multiplier. Amount multiplier is applied later.
It's a bit randomized to make for more varied deposits.

Size decrease comes with another risk - very small deposits might get dropped. Basically if size/4 gets lower then 2 there is a chance that spawn will be discarded.

User avatar
Lime
Inserter
Inserter
Posts: 34
Joined: Tue Dec 23, 2014 1:50 pm
Contact:

Re: Resource Spawner Overhaul - Discussion thread

Post by Lime »

Omg! So if richness is 15k and size is 20 (default starting iron) then amount of iron is somewhere between 420k and 1.1mil? By default!? But that's freaking insane amounts!! You don't even have to leave your base with that for, like, ever! omfg... fshhh….
Image

User avatar
Takezu
Fast Inserter
Fast Inserter
Posts: 247
Joined: Sun May 10, 2015 5:46 pm
Contact:

Re: Resource Spawner Overhaul - Discussion thread

Post by Takezu »

Well if the patch is in the size of an pingpong ball all the richness is for naught, not enough space for miners ><
I had patches with over 200K but barly space for 3 miners, thats just mocking RNG.
And the number of miners is importend if you try to get 2.2K Iron per minute through your factory ^^.

It's not only the force to expand by runnig out it's also the force to expand to grow.
See it like this, if you only get 5 miners on the patch that thing can last into the next millenia, it does you no good.
It will last but you won't get the needed throughput. And thts the other Way in which RSO kicks in, the next patch is most certainly not in belt rang.
And even if it is in seldom cases those patches aren't great either.
The really good patches are far out best reached by train.

User avatar
Lime
Inserter
Inserter
Posts: 34
Joined: Tue Dec 23, 2014 1:50 pm
Contact:

Re: Resource Spawner Overhaul - Discussion thread

Post by Lime »

Current size of 20 allows you to fit more than 20 miners on a single iron patch. Growth also should be limited - you don't want to "win the round" in a couple of hours, do you? Go too fast - and it's a one-evening game.
Image

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

Re: Resource Spawner Overhaul - Discussion thread

Post by orzelek »

Lime wrote:Current size of 20 allows you to fit more than 20 miners on a single iron patch. Growth also should be limited - you don't want to "win the round" in a couple of hours, do you? Go too fast - and it's a one-evening game.
Size of 20 means.. not that. It means that at max given deposit will have diameter of 20. This is far from 20 miners and it happens like Takezu wrote - it's not the amount but the throughput that forces you to expand.

I will reduce the standard deposit size - main issue is that I can't find good consensus on how much it should be. And vanilla ore generation doesn't help with some kind of estimation for that. I might opt for significant overall reduction with increased distance factor. That would promote going far to get your ores.
Starting values seem to be to much - will get dropped also.

I would like to get more feedback on initial and overall resource spawns in general to see how people see their current ore amounts.
One other approach would be to gen significant amount of vanilla maps and see how much ore rng gives there on average.

One more thing: I have no idea how vanilla game plays. I'm only doing heavily modded games and there you need a lot more ore so my view is a bit skewed. I admit I needed to expand first because of throughput issues. Some time after that ore patch started to dry up and when it happens it's very quick.

PiggyWhiskey
Filter Inserter
Filter Inserter
Posts: 252
Joined: Wed May 13, 2015 5:28 am
Contact:

Re: Resource Spawner Overhaul - Discussion thread

Post by PiggyWhiskey »

PiggyWhiskey wrote:
orzelek wrote:Those settings are not really supported and I have no idea what happens after scenario load with RSO.
Override setting disables standard generation in a way that might be stored in the save itself.

Did you try to run RSO's resource regen? It should omit starting area and rebuild all resources around it. Setting starting_area_size to 8-9 should give you about 1kx1k tiles starting area. Instructions for that are in description thread first post under usage.
Well it turns out that it generates the ores on creating a new game, not during the Map Editor.
I created a patch of resources all lined up and then the RNG put more resources around the place. I guess I can work with that :)
So I changed the starting_area_size to 8 and region_size to 8 (if I was reading the comments in config.lua that means 8 chunks of 32x32) with Bob's Mods and Straight World enabled in the config and decided to explore to pre-plan my factory and train system.
But I ran into some trouble. I couldn't find anything.
So I decided to use game.forces.player.chart with an area of 4096x4096 and this is what I got
Big Picture
It chopped off the right hand side, so you may need to view in Imgur,
Thats a Very Big starting area with water in starting area only.
And in the far bottom left is some copper. And the far top left is some iron.
They are very close to the edge of the charted area.

I guess I need to build ALOT of rails :)

And I shouldn't have any issues with biters for quite a while now.

Not that it's bad orzelek but what did I do wrong to make it that far out? The starting_area_size of 8?

User avatar
Takezu
Fast Inserter
Fast Inserter
Posts: 247
Joined: Sun May 10, 2015 5:46 pm
Contact:

Re: Resource Spawner Overhaul - Discussion thread

Post by Takezu »

Well never fiddelt with the starting area but the region size wasn't the cause. You have set the starting area to 8 regions (the starting area is in regions and iirc it stands in the comment for the option), and a region to eight which equates to 32by32 chunks by 8 regions, well 8200 chunks of space for your factory ;)

I hope you have enough iron and stone for kilometers of rails at least.

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

Re: Resource Spawner Overhaul - Discussion thread

Post by orzelek »

Yep it's the starting area size - it's in regions so as Takezu wrote.
Current to generous ore amounts mean you might be able to pull this off :D

I'd get FARL tho or it will be painful.

n9103
Smart Inserter
Smart Inserter
Posts: 1067
Joined: Wed Feb 20, 2013 12:09 am
Contact:

Re: Resource Spawner Overhaul - Discussion thread

Post by n9103 »

Welp. You wanted ores to be rarer. Enjoy! :P
Colonel Failure wrote:You can lose your Ecologist Badge quite quickly once you get to the point of just being able to murder them willy-nilly without a second care in the world.

Locked

Return to “Resource Spawner Overhaul”