[MOD 0.15.x] Pretty Fair Resources

Topics and discussion about specific mods
MatthewGP
Inserter
Inserter
Posts: 26
Joined: Thu Mar 24, 2016 10:11 pm
Contact:

Re: [MOD 0.15.x] Pretty Fair Resources

Post by MatthewGP »

:( I discovered yesterday that when used with Angel's Infinite Ores, all of the ore patches in the starting area are less than 100%. So your miners only get an ore only once in a great while. Haven't tried it with regular angel's ores as I am trying to do a sparse resource, hard enemies run.

So at this point in time, I wouldn't recommend this mod for use with Angel's mods. It does look like it could be very interesting with just plain Bob's or Vanilla though. Cheers!

danbliss123
Burner Inserter
Burner Inserter
Posts: 15
Joined: Sat Apr 16, 2016 5:10 am
Contact:

Re: [MOD 0.15.x] Pretty Fair Resources

Post by danbliss123 »

Updated for 0.16. Sorry it took me so long. The mathematics seems to have changed a bit and I wanted to keep it balanced identically to vanilla. I am not sure I got it 100% perfect but it is close (and it is much more consistent than the vanilla generation, imho). I also added the ability to specify a minimum radius for ores. I did this to support the exclusion of uranium from the starting area, but it will also work for modded ores that specify it using the mechanism described in the readme. Happy Factorioing!

danbliss123
Burner Inserter
Burner Inserter
Posts: 15
Joined: Sat Apr 16, 2016 5:10 am
Contact:

Re: [MOD 0.15.x] Pretty Fair Resources

Post by danbliss123 »

Thanks for all the detailed feedback about angels fissures and angels ores. I will look into it, but I doubt I can solve in the next few weeks as work is busy right now for me.

User avatar
GeekinaCave
Inserter
Inserter
Posts: 39
Joined: Tue Jun 14, 2016 5:14 pm
Contact:

Re: [MOD 0.15.x] Pretty Fair Resources

Post by GeekinaCave »

i have recently problems to start a game with the recent version of Xander mod; for some reason i just froze, also i hope eventually it get a menu for the resource customization section.

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

Re: [MOD 0.15.x] Pretty Fair Resources

Post by Demosthenex »

We are doing a playthrough with PFR in 0.16, and have been encountering very poor save and catch up performance. Rseding looked at our save on IRC, and identified that our script.dat file in our savegame is 89MB, while our level.dat is only 75MB. On analyzing the data in script.dat, 85MB of it is labelled for PFR.

Code: Select all

factorio@odin3:~/tmp/factorio/saves/megabase$ strings script.dat  | awk '{print length($0),$1}'
5 level
156 do
8 mod-FARL
13060 do
23 mod-IncendiaryMunitions
26 do
18 mod-ModuleInserter
537 do
19 mod-Vehicle-turrets
2812 do
16 mod-Bot
26 do
20 mod-CliffDeconstruct
23531 do
21 mod-DeleteEmptyChunks
26 do
15 mod-EfficienSee
2262903 do
22 mod-Induction
489924 do
20 mod-Inventory
2059 do
25 mod-Logistic_Slot_Manager
2895 do
21 mod-MaxRateCalculator
1421 do
12 mod-Nanobots
37573 do
20 mod-no-hand-crafting
26 do
18 mod-PickerExtended
30065 do
23 mod-prettyfairresources
89839914 do <<<<<<<<<<<<<<<<<<<<<<<<
22 mod-ProgressiveRunning
713 do
16 mod-qol_research
26 do
48 mod-Renamer$do
23 mod-research-kills-bugs
26 do
17 mod-ScoreExtended
3810 do
24 mod-skan-radio-telemetry
1766 do
21 mod-SmartDisplayRedux
30205 do
19 mod-upgrade-planner
2926 do
109 mod-Vehicle
15 mod-VehicleSnap
301 do
17 mod-Vehicle_Radar
12508 do
20 mod-folk-shuttle-016
19026 do
Can you help us figure out what to do next and not break our save?

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

Re: [MOD 0.15.x] Pretty Fair Resources

Post by Demosthenex »

Demosthenex wrote:We are doing a playthrough with PFR in 0.16, and have been encountering very poor save and catch up performance. Rseding looked at our save on IRC, and identified that our script.dat file in our savegame is 89MB, while our level.dat is only 75MB. On analyzing the data in script.dat, 85MB of it is labelled for PFR.

Can you help us figure out what to do next and not break our save?
Looks like removing PFR made our save game size return to normal, but adding it back in makes for very low resource creation.

danbliss123
Burner Inserter
Burner Inserter
Posts: 15
Joined: Sat Apr 16, 2016 5:10 am
Contact:

Re: [MOD 0.15.x] Pretty Fair Resources

Post by danbliss123 »

@Damosthenex, I will look into it, yes.

danbliss123
Burner Inserter
Burner Inserter
Posts: 15
Joined: Sat Apr 16, 2016 5:10 am
Contact:

Re: [MOD 0.15.x] Pretty Fair Resources

Post by danbliss123 »

@Demosthenex Thanks for PMing me your save. I can tell you what is going on. PrettyFairResources generates resources in concentric square "rings". So, when you reveal territory that is far enough out to be in the next square ring, it generates the resources for that square ring, including in ALL directions around the origin. It then stores all of the stuff that is not actually on the map yet in its internal data structure. This seemed like the only way to accomplish the kind of random generation I wanted at the time. (There are better ways I know now, and I am going to upgrade PFR to use them, but that will not help you on this map.)

In your map, you made a ridiculously impressive attempt at manifest destiny. You explored, I estimate, 20,000 tiles to the west. This means that PFR generated all of the resources for a square that big centered on the origin. This is what is taking up the space.

So here is what I can do. I can release an update with a command to delete all of the stored resources. (This will not affect exploration, you can still explore and find new resource patches like normal). The differences is that the random generator will be forced to start back at the beginning, as though you had a much smaller map. You will just need to stay away from your western frontier to avoid having performance problems again. You should look for resources nearer to the origin :-) Is this acceptable as a solution for you?

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

Re: [MOD 0.15.x] Pretty Fair Resources

Post by Demosthenex »

danbliss123 wrote:PrettyFairResources generates resources in concentric square "rings". So, when you reveal territory that is far enough out to be in the next square ring, it generates the resources for that square ring, including in ALL directions around the origin. It then stores all of the stuff that is not actually on the map yet in its internal data structure.
That explains it quite well! Unfortunately with the save time approaching five minutes and with the catch up time around 15 minutes we ended up gutting our save. We removed PFR (which cleared the script.dat data), removed several other mods, and then used Delete Empty Chunks on the map to purge anywhere we had not built in. This dramatically improved performance, and we put in RSO instead.

RSO has a different generation layout, and we're having to explore further to find valuable resources (ie: large patches), but it did not affect our save times.

Sorry to switch, but I'm glad you found the root cause.

As to our destiny, after starting on a deathworld we researched a (modded) virus to kill all the bugs, and now we pursue our dream of making a megabase across the entire planet. ;]

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

Re: [MOD 0.15.x] Pretty Fair Resources

Post by orzelek »

Demosthenex wrote:
danbliss123 wrote:PrettyFairResources generates resources in concentric square "rings". So, when you reveal territory that is far enough out to be in the next square ring, it generates the resources for that square ring, including in ALL directions around the origin. It then stores all of the stuff that is not actually on the map yet in its internal data structure.
That explains it quite well! Unfortunately with the save time approaching five minutes and with the catch up time around 15 minutes we ended up gutting our save. We removed PFR (which cleared the script.dat data), removed several other mods, and then used Delete Empty Chunks on the map to purge anywhere we had not built in. This dramatically improved performance, and we put in RSO instead.

RSO has a different generation layout, and we're having to explore further to find valuable resources (ie: large patches), but it did not affect our save times.

Sorry to switch, but I'm glad you found the root cause.

As to our destiny, after starting on a deathworld we researched a (modded) virus to kill all the bugs, and now we pursue our dream of making a megabase across the entire planet. ;]
Small note:
RSO doesn't behave that much differently. Main difference is that it doesn't try to store all resources per ring - just per region. Storing data per ring will explode quickly when moving out of map center. I'm not sure how much data you are storing per each resource patch but minimizing that might be the key (RSO stores only few strings per patch).

Post Reply

Return to “Mods”