Regarding factorio 0.17.65 infinite ores change

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

Moderators: orzelek, Dark

sidelia
Burner Inserter
Burner Inserter
Posts: 19
Joined: Mon Apr 08, 2019 1:36 am
Contact:

Regarding factorio 0.17.65 infinite ores change

Post by sidelia »

Fixed that infinite item based resources with yield of more then 100% didn't actually mine more. So yield of 260% for example means that it mines 2 resources and 60% probability of 1 extra.
This change makes all sorts of weirdness such as miners potentially spewing out hundreds of ore (each) per second when touching even a single infinite ore tile with a high yield. In RSO (v 5.0.19) control.lua around line 674 you detect the existence of an infinite variant of a resource and replace parts of a patch with it based on ore richness at that location. It appears that the non-infinite richness becomes the infinite yield, and unless the yield of the non-infinite ore that would be generated there is less than the infinite prototype minimum you leave it alone, however that can result in infinite yields far far higher than 100%.

It seems that adding a second logic check to ensure the yield is less than or equal to the infinite prototype normal in addition to greater than or equal to the minimum would allow the infinite prototype to specify it's maximum yield, where currently it cannot if used with RSO.
orzelek
Smart Inserter
Smart Inserter
Posts: 3923
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Regarding factorio 0.17.65 infinite ores change

Post by orzelek »

sidelia wrote: Sun Sep 01, 2019 6:30 pm
Fixed that infinite item based resources with yield of more then 100% didn't actually mine more. So yield of 260% for example means that it mines 2 resources and 60% probability of 1 extra.
This change makes all sorts of weirdness such as miners potentially spewing out hundreds of ore (each) per second when touching even a single infinite ore tile with a high yield. In RSO (v 5.0.19) control.lua around line 674 you detect the existence of an infinite variant of a resource and replace parts of a patch with it based on ore richness at that location. It appears that the non-infinite richness becomes the infinite yield, and unless the yield of the non-infinite ore that would be generated there is less than the infinite prototype minimum you leave it alone, however that can result in infinite yields far far higher than 100%.

It seems that adding a second logic check to ensure the yield is less than or equal to the infinite prototype normal in addition to greater than or equal to the minimum would allow the infinite prototype to specify it's maximum yield, where currently it cannot if used with RSO.
This code was written when determining of %-age that infinite resource will have was not possible at control stage. I haven't played Factorio much recently so I had no idea that those changes end up doing a bit of a mess from infinite stuff. How does the vanilla gen look with those infinite ores?

I wouldn't want to cap them at some arbitrary value but I could sort them out to not go extremely over 100%.
sidelia
Burner Inserter
Burner Inserter
Posts: 19
Joined: Mon Apr 08, 2019 1:36 am
Contact:

Re: Regarding factorio 0.17.65 infinite ores change

Post by sidelia »

orzelek wrote: Sun Sep 01, 2019 7:04 pm
sidelia wrote: Sun Sep 01, 2019 6:30 pm
Fixed that infinite item based resources with yield of more then 100% didn't actually mine more. So yield of 260% for example means that it mines 2 resources and 60% probability of 1 extra.
This change makes all sorts of weirdness such as miners potentially spewing out hundreds of ore (each) per second when touching even a single infinite ore tile with a high yield. In RSO (v 5.0.19) control.lua around line 674 you detect the existence of an infinite variant of a resource and replace parts of a patch with it based on ore richness at that location. It appears that the non-infinite richness becomes the infinite yield, and unless the yield of the non-infinite ore that would be generated there is less than the infinite prototype minimum you leave it alone, however that can result in infinite yields far far higher than 100%.

It seems that adding a second logic check to ensure the yield is less than or equal to the infinite prototype normal in addition to greater than or equal to the minimum would allow the infinite prototype to specify it's maximum yield, where currently it cannot if used with RSO.
This code was written when determining of %-age that infinite resource will have was not possible at control stage. I haven't played Factorio much recently so I had no idea that those changes end up doing a bit of a mess from infinite stuff. How does the vanilla gen look with those infinite ores?

I wouldn't want to cap them at some arbitrary value but I could sort them out to not go extremely over 100%.
Vanilla gen with infinite ore mods is having the same problem so some of those mods have been updated to limit gen to reasonable max values, or limit the normal and minimum to 100% and set them to simply not deplete. Angels infinite ores has not yet been updated to address this, so using it as an example a single miner on an infinite ore patch can easily fill a blue belt.

What I have personally done is make a small mod that in data-final-fixes loops through the resources table looking for resources that are not infinite, which it then will deepcopy an infinite- variant of setting the normal and min values to 100, and the depletion amount to zero. It only works with RSO as there's no tie-in to the vanilla map generator. RSO detects these variants and adds the infinite ore to the patches as needed.

A thought that just occurred to me, why not treat the prototype normal value as a maximum, then for the yield use a random value between the minimum and normal? That still leaves infinite-ore mod authors the ability to set the min and max values in the prototypes and well as depletion amounts.

A small modification that I made on my own version of RSO as follows sets the infinite ore spawns to 100% and is acceptable to me, but is a quick and dirty solution and there is certainly a better way to do it.

Code: Select all

673					spawnName = infiniteOreName
674 -- *** MODIFICATION BY SIDELIA
675 					-- if minimumInfiniteOreAmount and amount <  minimumInfiniteOreAmount then
676					if minimumInfiniteOreAmount then
677 -- *** END MODIFICATION
678						amount = minimumInfiniteOreAmount
679					end
Post Reply

Return to “Resource Spawner Overhaul”