Resource spawn size not as expected

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:

Resource spawn size not as expected

Post by FuryoftheStars »

See attached image.

Using mods that add resources, the Lead resource (from bzlead) is much larger in size than expected. I have RSO's global size modifier set for 0.5, all size sliders from the map gen screen set for 100%, and I see that in the resource config files Lead is set to the same size as Iron/Copper for the starting area (but you can clearly see they are significantly smaller than the Lead).

Outside of the starting area they appear to spawn in expected and consistent sizes to Iron/Copper.

Not sure what happened?
Attachments
Large Lead patch.jpg
Large Lead patch.jpg (248.53 KiB) Viewed 383 times

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

Re: Resource spawn size not as expected

Post by FuryoftheStars »

Ok, it looks like it may have been specific to that seed. Another one did not have that issue.

Relevant mods and map exchange string can be found here: viewtopic.php?p=559087#p559087
I'm using about 200 mods, some of which are not on the portal, so I don't want to provide a save and make you have to deal with all of that. :lol:

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

Re: Resource spawn size not as expected

Post by orzelek »

Sizes are not guaranteed and code has a lot of room to go around them. Or my math is messed up somewhere in code that tires to make them not go crazy big.

If you are curious (for one case I won't be playing the save game game I think) you can enable debug in config.lua and then logs will contain information about what was actually generated.

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

Re: Resource spawn size not as expected

Post by FuryoftheStars »

Hmm, so even the starting ores that have a single size number designated have a lot of wiggle room around that?

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

Re: Resource spawn size not as expected

Post by orzelek »

FuryoftheStars wrote:
Tue Jan 04, 2022 6:44 pm
Hmm, so even the starting ores that have a single size number designated have a lot of wiggle room around that?
That code is old and not entirely mine even. And parts I changed are old..ish. I can see at least 25% modifier applied as max but I don't guarantee that size limiting algorithm is fool proof. This is lua we are talking about and it's a strange creature.

Post Reply

Return to “Resource Spawner Overhaul”