[MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

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

Moderators: orzelek, Dark

Post Reply
Dark
Long Handed Inserter
Long Handed Inserter
Posts: 83
Joined: Wed May 07, 2014 12:45 pm
Contact:

[MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by Dark »

.


Attention:
This mod has been replaced by a successor: https://forums.factorio.com/forum/vie ... 14&t=12412




This mod overrides in-game Perlin noise based resource/units spawning system by region divided spawning system.
In short - distances between resources become much longer.
To make up for a distance, resource richness slightly increases with each region further away from the starting area.

RSO also controls spawning of biter bases to make it easier for a player to move further into the wilds, but don't expect resources to be biter-free.

Mod aims to encourage trains and other means of long range transportation, which has little practical use in unmodded game due to abundance of resources.
Checkout recommended mods section.
Features
Usage
Configuration
Compatibility with other mods
Screenshot
Download:
zz-rso.zip
Version 1.0.2
(14.99 KiB) Downloaded 7398 times
Known Issues
changelog
Note: the original idea was from THIS mod by kolli, I planned to do few tweaks for own usage but ended up rewriting the whole thing. _-_
Last edited by ssilk on Wed May 20, 2015 5:38 pm, edited 5 times in total.
Reason: Added link to successor-thread

kolli
Inserter
Inserter
Posts: 27
Joined: Tue Jun 10, 2014 11:23 am
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.0

Post by kolli »

Awesome, nice work!

Rahjital
Filter Inserter
Filter Inserter
Posts: 435
Joined: Thu May 29, 2014 10:44 am
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.0

Post by Rahjital »

This is an excellent mod! Way superior to just meddling the the vanilla autoplace and hoping for the best, as I had been doing until now. I've taken a look at the internal config and it appears to be quite powerful. Using metaballs in generating the resource fields is a very clever idea as well!

I have just a few questions: Is there going to be any more detailed info on how the mod and the config.lua file works? The comments in there do an excellent job in explaining most of the values, but some like richness_distance_factor or the multi_resource table are a bit harder to grasp without having to take a look at the code. Also, is it possible to generate resource fields large enough to cover several chunks? And last but not least, is it possible to configure the resources that appear in the starting area?

Excellent mod overall, I'll be sure to make good use of it.

User avatar
Calico
Fast Inserter
Fast Inserter
Posts: 130
Joined: Sat Feb 08, 2014 6:23 am
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.0

Post by Calico »

I'm kinda worried about having enough starting ressources but.... arhh what the heck, let's give it a try.

Wanted to try Kolli's mod anyway and this is basically the same but a bit more refined.

Dark
Long Handed Inserter
Long Handed Inserter
Posts: 83
Joined: Wed May 07, 2014 12:45 pm
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.0

Post by Dark »

Details...you asked for it :)

You can easily change starting resources, every record of "resource-ore" or "resource-liquid" can have starting field:

Code: Select all

starting={richness=2000, size=17},
The generator tries to make sure that at least (richness * size) amount of ore or (richness/2) amount of liquid is generated at start loc.

"richness_distance_factor" increases amount of resources by multiplying any generated pile of resources by (richness_distance_factor ^ distance_in_regions_from_starting_location), as comments in config explain, by default it is 3% per region, so if resource is generated 20 regions away from the starting location then the resource multiplier for that resource would be 1.03 ^ 20 = ~1,8, in other words 80% increase.

multi_resource is a bit overkill right now, it works like that:
1. If resource is rolled in a region (lets call it primary), we then check if it has multi_resource_chance/multi_resource properties, if it has:
2. Roll for multi_resource_chance and if we lucky roll one of resources from "multi_resource" table, based on allotment.

Code: Select all

["stone"] = 4
^ 4 - is an allotment value, the higher the value the more common resource is. If there are two resources, first having allotment of 4 and second having allotment of 1, than first will be rolled 80% of time, if we add another resource with allotment value of 5, than first resource would show up only 40% of time, second - 10% and 3rd - 50%.
3. Find a chunk neighboring to the rolled primary and queue it there with size and richness multi_resource_size_factor and multiplied by multi_resource_richness_factor.
Size and richness come from "main" record for rolled multi resource.
4. Now funny thing happens, we roll for "multi_resource_chance" again, but this time it multiplied by "multi_resource_chance_diminish"^1, i.e. reduced.
5. We do 2. and 3. again, but this time size and richness are multi_resource_size_factor^2 and multi_resource_richness_factor^2
6. Steps 4-5 continue until roll fails, every successful roll the chance for the next roll is reduced as well as size and richness
Rahjital wrote:is it possible to generate resource fields large enough to cover several chunks?
Mod already trying to do so, the current limits in script are 2x2 chunks, possible 3x3 is the limit with existing script, not exactly sure. It seems that engine sends event about chunk generation only when neighboring chunks are already created.
In any case size limit can be increased if resource generation is delayed until all neighboring chunks in certain radius are created by the game engine.

User avatar
SHiRKiT
Filter Inserter
Filter Inserter
Posts: 706
Joined: Mon Jul 14, 2014 11:52 pm
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.0

Post by SHiRKiT »

Got this error while running the mod:

Error while running the event handler:
.../Factorio/mods/zz-rso|control.lua:312:unknown entity name(sand)

Have quite a few mods installed.
Also, I often get patches that gets generated with only 10 pieces of the metal (literally 10x400ish copper ore).
Mods

Dark
Long Handed Inserter
Long Handed Inserter
Posts: 83
Joined: Wed May 07, 2014 12:45 pm
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.1

Post by Dark »

Thanks for the report! I didn't updated my installation of DyTech for a while, sand was removed from that mod, I've update my mod's config accordingly.

Small patches in chess pattern are by design, they are less rare but you would not get much from them, their purpose is to get you at least small amount if you get stuck without finding bigger deposits.

User avatar
SHiRKiT
Filter Inserter
Filter Inserter
Posts: 706
Joined: Mon Jul 14, 2014 11:52 pm
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.1

Post by SHiRKiT »

Dark wrote:Thanks for the report! I didn't updated my installation of DyTech for a while, sand was removed from that mod, I've update my mod's config accordingly.

Small patches in chess pattern are by design, they are less rare but you would not get much from them, their purpose is to get you at least small amount if you get stuck without finding bigger deposits.
Glad I could help, now I can play the game again (love mods!). Thanks for the heads up about the patches. And as a side note, I strongly suggest to everyone to name their zip files with the version number (zz-rso-1.0.1.zip)

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.1

Post by FreeER »

SHiRKiT wrote:And as a side note, I strongly suggest to everyone to name their zip files with the version number (zz-rso-1.0.1.zip)
The issue with that is Factorio can/will fail to load the mod properly unless the zip is renamed to just the mod name and some people fail to realize that when downloading (occasionally even when it's noted right by the download link) which leads to (multiple) posts regarding loading issues (same with uploading non-zip files).

Dark
Long Handed Inserter
Long Handed Inserter
Posts: 83
Joined: Wed May 07, 2014 12:45 pm
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.1

Post by Dark »

FreeER wrote:The issue with that is Factorio can/will fail to load the mod properly unless the zip is renamed to just the mod name and some people fail to realize that when downloading (occasionally even when it's noted right by the download link) which leads to (multiple) posts regarding loading issues (same with uploading non-zip files).
Exactly, I wish Factorio used name the root folder inside the zip, instead of zip's name. The current behavior leads to 1. loading multiple copies of the same mod 2. loosing saved variables on version switch.

User avatar
SHiRKiT
Filter Inserter
Filter Inserter
Posts: 706
Joined: Mon Jul 14, 2014 11:52 pm
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.1

Post by SHiRKiT »

Didn't know that, I obviously always keep my Zips in another folder, I only place the extracted content in mods folder.

User avatar
SHiRKiT
Filter Inserter
Filter Inserter
Posts: 706
Joined: Mon Jul 14, 2014 11:52 pm
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.1

Post by SHiRKiT »

I've explored this much (almost one hour of trains and cars rolling out there) and still I can't find a single spot of oil. I only have one that's the default one (59% yeild) and one that I tried spawning (with 0% yeild =\) but I can't find any oil in the map. I've found over 10 copper and over 10 iron deposits, LOTS of lava deposits but not single oil deposit =\ The only thing I've changed in the settings was to make bitters spawn even less frequent

http://pastebin.com/Zg1BhGna

http://imageshack.com/a/img538/188/8d7940.png

Dark
Long Handed Inserter
Long Handed Inserter
Posts: 83
Joined: Wed May 07, 2014 12:45 pm
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.1

Post by Dark »

It is possible, ois is supposed to be 4 times rarer than cooper and iron combined and is 1.5 rarer than lava . Lava could produce big number of entities if rolls, but in your game it seem to be too much lava.
Perhaps oil is too rare and lava is too common with all additional mods installed, too many slots are given to rare elements and lava from mods.
Could you please post your save for inspection? If all those red dots are lava then there is a chance that something wrong with RNG.

And thanks for sharing experience, it'll help to balance the mod in the future :)
If you re desperate to get oil then do this
BTW, you can use Alt+PrintScreen to capture just active window.

User avatar
Calico
Fast Inserter
Fast Inserter
Posts: 130
Joined: Sat Feb 08, 2014 6:23 am
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.1

Post by Calico »

So, i managed to playthrough, despite a bumby start without a decent source of Stone. All medium settings. Biters gave me few problems, although late game the spawners covered pretty much the entire perimeter outside my 6 outposts, sometimes even spawning new nests right beside my forward radar arrays (which i have about half a dozen, to keep taps on the region).

I do agree with the above poster that oil was kinda a problem late-game. After over 25 hours of play i had a only found 3 oil fields (2 in base, 4 in a somewhat close outpost, another 4 in a very distant outpost). Still i survived, although i think it was a bit harsh for medium conditions. On the flip side, we wanted "far away" ressources.

Overall, it was a great experience. The need to build outposts arised early midgame, opposed to late mid-game in "normal" games. Had a total of 5 trains providing my main base with everything needed and never felt like the far out ressources strangled me to death (aside from stone early game).

Tyvm for making this mod!

Edit: Only ressource adding mod was roadworks limestone, not using DyTech/F Mod/etc).
Image
Last edited by Calico on Thu Jul 17, 2014 11:47 pm, edited 2 times in total.

User avatar
SHiRKiT
Filter Inserter
Filter Inserter
Posts: 706
Joined: Mon Jul 14, 2014 11:52 pm
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.1

Post by SHiRKiT »

Those red dots are all spawners/bitters/worms, the Lava is actually a purple/gray-ish spots on the map. The save is being uploaded, give me 10 minutes since I've got rubish upload speed.

Edit: Here's the save link, sorry for the delay. https://www.mediafire.com/?tbk1gy1tben82b7

Dark
Long Handed Inserter
Long Handed Inserter
Posts: 83
Joined: Wed May 07, 2014 12:45 pm
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.1

Post by Dark »

Alright, I'll raise oil allotment a little and add to multispawn of some resources.

@SHiRKiT, looks like a normal map, I've found an oil deposit on already explored part of the map @ 1500, -1217, there is a chance that more oil is below nearby biter base.
A tip: explore every inch of the map, don't leave little dark squares.

@Calico, it's not a medium, more like medium-hard :) map settings in the new game menu have almost zero affect on resource and biter generation.
You can make resources more sparse and even more rarer by editing config.lua in mod's folder for "hard" experience.

Dark
Long Handed Inserter
Long Handed Inserter
Posts: 83
Joined: Wed May 07, 2014 12:45 pm
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by Dark »

Posted version 1.0.2

Balancing changes:
1. crude oil is less rare
2. lava is less common

ruskyandrei
Manual Inserter
Manual Inserter
Posts: 3
Joined: Tue Jul 22, 2014 4:41 pm
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by ruskyandrei »

Just registered to say thank you!

This is an awesome mod, finally giving me a great reason to make huge train networks <3

omegasrevenge
Inserter
Inserter
Posts: 45
Joined: Sat Jul 12, 2014 8:54 am
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by omegasrevenge »

Hey!
I have a few problems with this mod. I wanted to try this mod because I was tired of finding about 100x more gold, unicomp and charged chunks than copper+iron combined.
So I install this mod, go to my save and type remote.call("RSO", "regenerate", true) in console. I have to wait for 5 minutes afterwards. So far so good, no errors or anything.

So here begins the deal; afterwards I drive around in my car and try to look at how the ore layout looks now. Turns out I found 2 iron deposits in 10 minutes of constantly driving around in a car and one coal deposit. That is okay, the problem is that after driving 20minutes longer I still had not found a single copper deposit.

And here it gets even worse. This mod does not support Bob's ores and Yuoki Industrial Mod, I have 6 more ore deposits that can spawn (Quartz, Nickel, Unicomp, Charged, Bauxite, Rutile. I was looking through your mod for hours trying to fix this). And these spawn like crazy everywhere, there was probably as much naked ground as there was ground covered by those ores.

It doesn't matter how high I set copper or iron ore spawn chance (allotement), or if I deactivate vanilla ore spawns by setting the variables at the beginning of the config file.

Unfortunately, I cannot use this mod if after using it half the screen is covered by ore that can be generated infinitely by buildings and even after driving around for half an hour I cannot find a single unit of copper. :(

I tried to fix this by adding these ores to the code, but it just ended with only stone, sand, trees and biters spawning and absolutely nothing else.

User avatar
Calico
Fast Inserter
Fast Inserter
Posts: 130
Joined: Sat Feb 08, 2014 6:23 am
Contact:

Re: [MOD 0.10.2] Resource Spawner Overhaul - v1.0.2

Post by Calico »

Dark wrote:Posted version 1.0.2

Balancing changes:
1. crude oil is less rare
2. lava is less common
great! Will start a second playthrough today, hoping the Devs fix logistics tomorrow with a hotfix. May i ask, how much more Oil? 20%? 40%?

Post Reply

Return to “Resource Spawner Overhaul”