Mods / Mount destroy leaves

Tags: #QoL
Author: Akkuku
Side: Both
Created: May 29th at 10:53 PM
Last modified: Jun 11th at 5:14 PM
Downloads: 1643
Follow Unfollow 73

Recommended download (for Vintage Story 1.20.11 - 1.20.12):
mountDestroyLeaves_1.1.3.zip  1-click install


Finally, you can speed through overgrown forests on your elk with ease!

Thanks to this mod, your speedy mount will knock down any branches that get in its way!

 

I was frustrated by how difficult it was to traverse thick forests, so I created this mod for myself. However, I still decided to upload it anyway.

Chat commands

(for users with server control priviliges)

/mdl inflictdamage [true | false | on | off] - Enable or disable inflicting damage to the mount after destroying leaf block
/mdl reloadConfig - Reload mod configurations for every game client connected to the server after manually changing the config file

Server-side configuration

Config file located at VintagestoryData/ModConfig/MountDestroyLeaves.json

SlowSpeedThreshold - horizontal speed above which mount will destroy the leaves
LeavesSlowdownRate - speed multiplayer after leaves block is destroyed
ShouldInflictDamage - flag to enable inflicting damage to mount
ProbabilityOfDamagePercent - percent probability of receiving damage
DamageInflicted - damage inflicted to mount
After changing any value, you can run /mdl reloadConfig to reload configurations for every game client connected to server (not tested, please let me know if you have any problems on multiplayer server).
On single-player world, you can also do that, or just restart the game.

 

Changelog

1.1.2, 1.1.3

  • Error fixes

1.1.1

1.1.0

  • Allow mount to randomly receive damage after destroying leaf block
  • Allow to configure mod via the json config file
  • Add chat command to enable or disable inflicting damage to the mount
  • Add chat command to reload configurations for every client after editing the config file

 

 Disclaimer

Please keep in mind that this is my first mod for Vintage Story as well as my first mod ever. Furthermore, I created it after spending just a few hours of learning how to mod this game.

With that in mind, the code is probably not optimal, the behavior may be imperfect, and compatibility may be limited. I didn't encounter any compatibility issues in a single-player world with multiple mods, and it worked okay when I tested it.

If you encounter any problems or have suggestions for improvements, please let me know in the comments.

Mod Version For Game version Downloads Release date Changelog Download 1-click mod install*
1.1.3
1.20.11 - 1.20.12
936 Jun 7th at 9:45 PM mountDestroyLeaves_1.1.3.zip 1-click install

Fix error resolving VintageStoryLib

1.1.2 102 Jun 6th at 7:48 PM mountDestroyLeaves_1.1.2.zip 1-click install

Fix error when trying to edit saved world

1.1.1 258 May 30th at 7:13 PM mountDestroyLeaves_1.1.1.zip 1-click install

Added Equus: Wild Horses compatibility

1.1.0 265 May 30th at 6:24 PM mountDestroyLeaves_1.1.0.zip 1-click install

Add configuration via config file.

Allow mount to reveive damage after destroying a block of leaves.

Add chat command to enable or disable inflicting damage after destroying leaves.

Add chat command to reload configuration for every game client connected to server, after manually editing the config file.

1.0.0 82 May 29th at 10:55 PM Empty mountDestroyLeaves_1.0.0.zip 1-click install

20 Comments (oldest first | newest first)

💬 Akkuku , Jun 11th at 9:02 PM

Nephelangelo Im not planning to. I considered this approach, but destroying the leaves seemed more realistic, even though it could be exploited for fast stick farming.
Please check Passable Branches, it might be the mod you want

💬 Nephelangelo, Jun 11th at 8:05 PM

Could you do a version of this that just lets your elk move through branchy leaves, but slow them down a bit, instead of break the blocks?

💬 Akkuku , Jun 9th at 5:20 PM

LunaGore
It appears to be the same error that @Maniacpsycho experienced a few comments below. It probably means that your world contains cached configuration of this mod from a version prior to 1.1.2. While I'm not sure, since I don't have access to your save, but a potential solution might be to:

  1. Make sure you have the latest version of the mod. As evidenced by the error log, you should have it, but please verify
  2. Start the world you had issues with, to fix the configuration (it will happen automatically)
  3. Save and exit the world

The error should be gone after that.


Please let me know it this solves your problem.

💬 LunaGore, Jun 9th at 4:54 PM

Getting a crash when attempting to edit a save (I want to copy the world config) with or without the mod loaded:

Checked the comments and was able to resolve it.

Spoiler!
💬 Akkuku , Jun 8th at 1:05 PM

Alikat I'm glad you like it 😊

💬 Alikat, Jun 8th at 9:54 AM

Thank you so much for creating and sharing this mod. I really hate getting stuck on bushes while traveling with the elk.

💬 Akkuku , Jun 7th at 9:47 PM

WickedSchnitzel Please try with the new version 1.1.3. It should work now

💬 WickedSchnitzel, Jun 7th at 4:32 PM

Latest version is throwing an error in the console:

Spoiler!

 

💬 Akkuku , Jun 6th at 11:09 PM

MrGr33n it only destroy leaves and not berry bushes

💬 MrGr33n, Jun 6th at 8:37 PM

PLease tell me it only destroy leaves and not berry bushes

💬 Akkuku , Jun 6th at 7:57 PM

Maniacpsycho Thanks for letting me know. It seems that there was an issue with the config format.

To fix your issue, please do the following:
1. Download the newest version 1.1.2
2. Start the world you had issues with to fix the configuration
3. Save and exit the world

The error should be gone after that

💬 Maniacpsycho, Jun 6th at 6:32 AM

tried to copy world settings to make a new save but upon touching the button on the save file game crashes with this error

this only happens on a world that was created with MDL active

Running on 64 bit Windows 10.0.26100.0 with 32661 MB RAM
Game Version: v1.20.11 (Stable)
06/06/2025 07:29:34: Critical error occurred
Loaded Mods: aculinaryartillery@1.2.5, angelbelt@1.6.0, backpackpackplusfg@1.3.0, bettercrates@1.8.0, bettertraders@0.0.10, biggerpockets@1.0.0, bloomeryfulldrops@1.0.0, buzzwords@1.7.0, chiseltools@1.14.18, craftablecompanion@1.2.1, crockmod@1.0.0, extrachests@1.9.0, fixedpaths@1.0.2, hangingoillamps@1.0.3, immersivecorpsedrop@1.0.3, instantpickup@1.0.3, juicyores@1.0.0, makesaltnmore@1.0.1, mastodontrunk@1.0.1, molds@0.1.7, nailsmold@1.0.2, nightwatcher@2.2.0, nmfw@1.0.0, noisybears@1.1.0, offlinefoodnospoil@1.4.0, pancassiterite@1.0.1, primitivesurvival@3.7.7, propickfix@1.1.1, prospecttogether@2.0.5, repairablelocust@1.4.1, serverpausemod@1.0.1, simplysmokeychimneys@1.0.0, temporal_gears_stack@1.0.0, torchholdersmithingplus@1.0.0, translocatormap@1.0.0, upgradeablelocust@1.0.3, Vanilla_PlusWorldGen@1.3.5, game@1.20.11, vsimgui@1.1.8, wildcultivation@1.1.2, Xcore@0.0.5, zoombuttonreborn@2.0.0, accessibilitytweaks@3.8.5, animalcages@3.2.2, awearablelight@1.1.31, betterfirepit@1.1.6, betterruins@0.4.12, betterstonepath@1.0.4, bowinlefthand@1.0.0, carryon@1.8.1, chestorganizer@1.2.3, commonlib@2.6.1, configlib@1.5.3, configureeverything@2.1.3, cooperativecombat@1.1.1, danatweaks@3.4.1, darkui@1.0.2, egocaribautomapmarkers@4.0.2, emotemenupatched@1.0.6, expandedfoods@1.7.4, extrainfo@1.9.9, flowerfarming@1.1.0, foodshelves@2.2.1, fromgoldencombs@1.8.12, globalplayermapmarker@1.2.1, handbookbookmarkbutton@0.1.1, healthbar@1.0.7, highfert@1.0.2, hit@2.2.0, hudclockpatch@1.0.3, improvedhandbookrecipes@1.1.3, itempickupnotifier@1.7.0, JustTrapdoors@1.0.2, knapster@2.14.4, makemeleakplus@1.0.0, minimalcompass@1.1.3, mobsradar@2.1.7, morefluxes@0.1.0, morepiles@2.1.4, mountDestroyLeaves@1.1.1, ndlwoodentorchholder@1.4.3, nooffhandtgear@1.0.1, onebedsleeping@2.5.4, oneroof@1.10.0, petai@3.4.3, projectiletracker@1.0.3, roomtools@1.3.1, sealevelfix@1.0.10, simplefootstepsredux@1.0.3, solidirondoor@1.0.1, stepupcontinued@0.0.1, stonebakeoven@1.1.6, storagecontroller@1.1.5, storageoptions@1.0.2, tentbag@2.2.0, creative@1.20.11, survival@1.20.11, vtpp@1.1.1, warpnetwork@1.0.0, weatherthestorm@1.1.0, xblood@1.6.5, xlib@0.8.16, autoconfiglib@2.0.6, campaigncartographer@4.6.7, fastbreeding@0.0.16, moreblueclay@1.0.1, onestick@1.0.1, playercorpse@1.11.1, stonequarry@3.4.3, wolftaming@3.0.6, xskills@0.8.19
Newtonsoft.Json.JsonReaderException: After parsing a value an unexpected character was encountered: S. Path 'MountDestroyLeaves', line 1, position 3601.
at Newtonsoft.Json.JsonTextReader.ParsePostValue(Boolean ignoreComments)
at Newtonsoft.Json.JsonTextReader.Read()
at Newtonsoft.Json.Linq.JContainer.ReadContentFrom(JsonReader r, JsonLoadSettings settings)
at Newtonsoft.Json.Linq.JContainer.ReadTokenFrom(JsonReader reader, JsonLoadSettings options)
at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings)
at Newtonsoft.Json.Linq.JToken.ReadFrom(JsonReader reader, JsonLoadSettings settings)
at Newtonsoft.Json.Linq.JToken.Load(JsonReader reader, JsonLoadSettings settings)
at Newtonsoft.Json.Linq.JToken.Parse(String json, JsonLoadSettings settings)
at Newtonsoft.Json.Linq.JToken.Parse(String json)
at Vintagestory.Common.WorldConfig.loadFromSavegame(SaveGame savegame) in VintagestoryLib\Common\Config\WorldConfig.cs:line 57
at Vintagestory.Client.GuiScreenSingleplayerModify.initGui(SaveGame savegame) in VintagestoryLib\Client\MainMenu\Screens\Singleplayer\GuiScreenSingleplayerModify.cs:line 44
at Vintagestory.Client.GuiScreenSingleplayerModify.OnScreenLoaded() in VintagestoryLib\Client\MainMenu\Screens\Singleplayer\GuiScreenSingleplayerModify.cs:line 171
at Vintagestory.Client.ScreenManager.LoadScreen(GuiScreen screen) in VintagestoryLib\Client\ScreenManager.cs:line 969
at Vintagestory.Client.GuiScreenSingleplayer.OnClickCellRight(Int32 cellIndex) in VintagestoryLib\Client\MainMenu\Screens\Singleplayer\GuiScreenSingleplayer.cs:line 153
at Vintagestory.API.Client.GuiElementMainMenuCell.OnMouseUpOnElement(MouseEvent args, Int32 elementIndex) in VintagestoryApi\Client\UI\Elements\Impl\Misc\GuiElementMainMenuCell.cs:line 319
at Vintagestory.API.Client.GuiElementCellList`1.OnMouseUpOnElement(ICoreClientAPI api, MouseEvent args) in VintagestoryApi\Client\UI\Elements\Impl\Interactive\GuiElementCellList.cs:line 241
at Vintagestory.API.Client.GuiElement.OnMouseUp(ICoreClientAPI api, MouseEvent args) in VintagestoryApi\Client\UI\Elements\Impl\GuiElement.cs:line 719
at Vintagestory.API.Client.GuiComposer.OnMouseUp(MouseEvent mouse) in VintagestoryApi\Client\UI\GuiComposer.cs:line 447
at GuiScreen.OnMouseUp(MouseEvent e) in VintagestoryLib\Client\MainMenu\Screens\Special\GuiScreen.cs:line 204
at Vintagestory.Client.ScreenManager.OnMouseUp(MouseEvent e) in VintagestoryLib\Client\ScreenManager.cs:line 914
at Vintagestory.Client.NoObf.ClientPlatformWindows.Mouse_ButtonUp(MouseButtonEventArgs e) in VintagestoryLib\Client\ClientPlatform\Input.cs:line 211
at OpenTK.Windowing.Desktop.NativeWindow.OnMouseUp(MouseButtonEventArgs e)
at OpenTK.Windowing.Desktop.NativeWindow.MouseButtonCallback(Window* window, MouseButton button, InputAction action, KeyModifiers mods)
--- End of stack trace from previous location ---
at OpenTK.Windowing.Desktop.NativeWindow.RethrowCallbackExceptionsIfNeeded()
at OpenTK.Windowing.Desktop.NativeWindow.ProcessWindowEvents(Boolean waitForEvents)
at OpenTK.Windowing.Desktop.GameWindow.Run()
at Vintagestory.Client.ClientProgram.Start(ClientProgramArgs args, String[] rawArgs) in VintagestoryLib\Client\ClientProgram.cs:line 334
at Vintagestory.Client.ClientProgram.<>c__DisplayClass10_0.<.ctor>b__1() in VintagestoryLib\Client\ClientProgram.cs:line 130
at Vintagestory.ClientNative.CrashReporter.Start(ThreadStart start) in VintagestoryLib\Client\ClientPlatform\ClientNative\CrashReporter.cs:line 93

💬 Akkuku , Jun 1st at 9:03 PM

TheDude by default the mount will receive 0.5 damage 20% of the times, both values are configurable in the json file

💬 TheDude, Jun 1st at 2:00 AM

Do you have any idea how much damage the mount will take and whether the percentage chance of it being injured can be modified by a server command?

💬 Akkuku , May 30th at 7:15 PM

safwyl sure! I patched OnEntityCollide of LeavesBlock with HarmonyPrefix.

I just looked into your mod, and the main reason why our mods are not compatible is the "wildhorse" entity code. Currently, I check if the entity is a tamed mount using the code path, I could not find a better way. Therefore, if the entity code path does not start with "tameddeer" it will not use my patch. I made a test, and a one-line code change fixes that.

The new version 1.1.1 should now be compatible with Equus

💬 safwyl, May 30th at 6:45 PM

Akkuku would you be willing to share which classes you modified for this? I'd like to see about making it compatible with Equus: Wild Horses

💬 Akkuku , May 30th at 6:41 PM

TheDude Amarillo in the new version 1.1.0, your mount will now randomly receive damage (by default 20% of the time) after destroying a leaf block. You can disable this feature with a chat command or via the config file. See the mod description for more information.

💬 Akkuku , May 30th at 2:27 PM

Thanks for your interest! I will certainly try to implement your suggestions when I have some free time.

💬 Amarillo, May 30th at 9:52 AM

Hey! this is a clever mod to deal with that annoyance of traversing thick forests. I agree with Akkuku. In order to balance it a little bit, to deal a bit of damage when traversing through the branches. Keep it up!!

💬 TheDude, May 30th at 6:39 AM

Akkuku
Great mod, but would it be possible to have, for example, a 5% chance that we and our mount will suffer between 1% and 25% damage with each broken leaf block, with an admin command that enables or disables the feature ?

 (edit comment delete)