Back to NxLabs

NxLabs / Vintage Story

S

Saplings Grow Resin/Moss/Vines

IBy iamevn

Saplings generate resin/moss/vines when they grow similar to probabilities during worldgen

Description

Saplings generate resin/moss/vines when they grow similar to probabilities during worldgen

 

Unmodded, every time saplings call GrowTree, they pass in zeros for otherBlockChance (resin), vinesGrowthChance, and mossGrowthChance which effectively prevent GrowTree from generating a tree with these features.

 

This is a somewhat simple patch to fill out those odds to match the ones that are set during world generation. otherBlockChance is simple because it's just 1.0 but I currently duplicate the logic from WgenTreeSupplier.GetRandomGenForClimate to set vinesGrowthChance, and mossGrowthChance which I'm not super happy with. It should work and it should keep working, but there's a chance it may drift from the probabilities worldgen uses if the logic ever changes.

 

Will need to mess around and see if I can extract and reuse the existing logic somehow without it being a brittle mess.

Download

No download link is available for this entry right now.

Ratings & reviews

No ratings yet

Sign in to leave a rating or comment.