Mods / Saplings Grow Resin/Moss/Vines
- Tags:
- Author:
- iamevn
- Side:
- Both
- Created:
- Jun 29th at 2:49 AM
- Last modified:
- Jul 21st at 7:18 AM
- Downloads:
- 656
-
Latest release (for Vintage Story 1.20.0 - 1.22.4, potentially outdated):
saplingsgrowresinmossvines_1.0.3.zip 1-click install
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.
| Mod Version | Mod Identifier | For Game version | Downloads | Released | Changelog | Download | 1-click mod install* |
|---|---|---|---|---|---|---|---|
| 1.0.3 | saplingsgrowresinmossvines | 467 | Jul 2nd at 7:32 AM | saplingsgrowresinmossvines_1.0.3.zip | 1-click install | ||
|
bump version, the v1.0.2 tag ended up on an old build with an outdated artifact, these were missing from v1.0.2 and are in v1.0.3:
| |||||||
| 1.0.2 | saplingsgrowresinmossvines | 16 | Jul 2nd at 6:15 AM | saplingsgrowresinmossvines_1.0.2.zip | 1-click install | ||
| |||||||
| 1.0.1 | saplingsgrowresinmossvines | 60 | Jul 1st at 8:00 AM | saplingsgrowresinmossvines_1.0.1.zip | 1-click install | ||
|
Swap calculation for moss/vines to use climate's WorldgenRainfall/WorldGenTemperature and properly scale rain value from 0-1 to 0-255 as calculation expects
Keeping an eye on our server's debug logs I was seeing vine/moss probabilities that looked way off from what I expected. Realized that the rain value I was using was 255x too small compared to the value used for worldgen and also that I should be using the worldgen rainfall/temperature and not the current rainfall/temperature | |||||||
| 1.0.0 | saplingsgrowresinmossvines | 113 | Jun 29th at 2:51 AM | Empty | saplingsgrowresinmossvines_1.0.0.zip | 1-click install | |
1.7.2026 17:53:48 [Error] [saplingsgrowresinmossvines] An exception was thrown when trying to load assembly:
1.7.2026 17:53:48 [Error] [saplingsgrowresinmossvines] Exception: Could not load file or assembly '0Harmony, Version=2.4.2.0, Culture=neutral, PublicKeyToken=null'. Assembly with same name is already loaded
sorry about that! should be fixed in v1.0.2. I shouldn't have been packaging 0Harmony.dll with my mod, it now uses the game's copy that other mods use
please do let me know if it seems like they generate way too much now, I'm planning on adding some configuration for adjusting these odds next
good mod!