Page 1 of 1

Resource spawn size not as expected

Posted: Mon Jan 03, 2022 5:21 pm
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?

Re: Resource spawn size not as expected

Posted: Mon Jan 03, 2022 6:27 pm
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:

Re: Resource spawn size not as expected

Posted: Mon Jan 03, 2022 10:27 pm
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.

Re: Resource spawn size not as expected

Posted: Tue Jan 04, 2022 6:44 pm
by FuryoftheStars
Hmm, so even the starting ores that have a single size number designated have a lot of wiggle room around that?

Re: Resource spawn size not as expected

Posted: Tue Jan 04, 2022 9:44 pm
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.