Feature requests

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

Moderators: Dark, orzelek

Post Reply
FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 1196
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Feature requests

Post by FuryoftheStars »

Only if not too much trouble. I realize my reasoning for these is rather niche to me. :)
  1. A minimum spawn range for resources, either on a resource by resource basis that may require editing of a config file to adjust (so settings don't become swamped), or with resources lumped into categories (early/mid/late, though only mid and late would need settings). While spawn location is less than set minimum, it should treat these resources as if their Allotment value was 0 or simply reroll (whichever way makes more sense) until it gets a resource that is allowed to spawn there.
    My use case: I have a mod that adds Fluorine ore (SigmaOneNuclear) that is required for use with Uranium ore. Both I consider advanced/late stage ores. I'd rather them not be spawning in the first round of ore spawns where iron/copper/etc would be of more value. The inclusion of a way to reroll (and export/import) the spawn seed (from my other thread) may make this moot, but it may still find usefulness.
  2. In cases where the spawn rolls success, but the tiles it would place the resource on are water (and the resource cannot be spawned on water), have a probability setting that it'll add land under the resource tiles (essentially creating a small island). Maybe even have it a general it'll change the tile under the resource to the required type, so water only resources would get small ponds, etc.
    My use case: I like having to work for some things and actually consider these nice little easter eggs, sometimes. Would give a use for landfill/Cargo Ships mod, and not just simply ignoring the center of a large lake if exploring around the edge doesn't show anything. Could also help with resource spawn rates on large water maps....
  3. I suppose this is less of a feature and more of a mod compatibility request: The mod Change Map Settings allows the editing of all map gen settings post start. From limited experimenting, it seems like RSO does not pick up changes to resource values using this mod. My assumption (without actually looking into the code) is that RSO is simply caching the map gen settings from start under the assumption they are immutable. I'd like to ask that, at the least if this mod is detected, that RSO would check and update its values.
Thanks for your time and consideration!

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

Re: Feature requests

Post by orzelek »

This is a mixed bag of requests.
1. This is a pain tbh. It would require recreating resource config pretty much every time code has to spawn something. I think it might be a bit to much for a feature like this. Currently enemies have this but ores are counted once or on mod updates.
2. Adding land under ore tiles sounds like a nice option for starts that have lots of water. I would need to play around and see if it's feasible (I'm not sure if I can ask factorio nicely if resource collision failed if there is water on this tile).
3. This has been asked about and it's available as a remote interface. There is a regenConfig API that does the internal clear on config and recreates it again. Mod that changes map settings would need to call that after changing surface settings.

FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 1196
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: Feature requests

Post by FuryoftheStars »

  1. Hmm, well, I have an idea, but it adds more settings (4 total for this suggestion).
    Aside from the 2 settings for the ranges, add 2 more string-settings that are user populated to designate which resources they want in which category (avoids redoing all of the resource config files).
    These two new string-settings can default blank, and then the end user fills in with the internal names of the resources they want affected.
    So, there'd be a mid-tier (or whatever) resource text field and range number, and a late-tier (or whatever) resource text field and range number.
    Or really, I guess you could simplify it further if you really wanted and just have 1 and 1, no mid/late, just a single "resources that won't spawn before set range" string-setting and the range int-setting.
  2. Oh, ok. I remembered seeing somewhere in your code where you were counting failures and aborting if the ratio of failures was too high (> 0.75) and I thought this was in relation to spawning the individual resource tiles, but maybe I was mistaken. :P
  3. Ah, ok. I'll double check to see if that mod author is still active and see if they'll implement it. If not, is this something I could fire off manually from the console when needed? (Or, if I'm motivated, I may just edit their mod for personal use to include it.)
Thanks for the feedback!

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

Re: Feature requests

Post by orzelek »

1. Sorry but thats even worse and original proposition is hard to do nicely. Stringly typed settings are a no go for sure.
2. This is a collision detection code - it works for ores and water due to using entity create check API. So it would need to be taught that water is ok and plop land there after the fact. It's not straightforward and performance cost might be significant (AFAIK I'd need to ask through API again to grab the type of tile on that location to check for water).
3. You can run it yourself it's doing a global config reload so context is not important.

Post Reply

Return to “Resource Spawner Overhaul”