Project Zomboid

Project Zomboid

Tree Chop Bug Fix
32 Comments
pepperoni 19 May @ 8:53am 
this fuckass mod wasted 2 hours of my life trying to start a server with my friend, do not download this mod if you want to play multiplayuer:steamhappy:
Darnexx 10 Jan @ 9:55am 
Works, thanks! I didn't noticed it until I saw your Mod and checked without it and with ingame.
Breno 7 Nov, 2024 @ 12:41pm 
on game folder Project Zomboid\media\scripts\items_weapons.txt
search for Axe or ChopTree on notepad and modify this lines as you want
ConditionLowerChanceOneIn = xx,
ConditionMax = xx,
TreeDamage = xx,
IndustryStandard 23 Oct, 2024 @ 11:32am 
Yes it's still valid. The game hasn't had an update in like 2 years.
Vorshim 23 Oct, 2024 @ 7:19am 
Is this mod still valid or has it been fixed in vanilla?
Zefiruz 11 Jan, 2024 @ 12:20pm 
Mods que deberían ser vanilla.
shu307 25 Oct, 2023 @ 7:58am 
No, it's not fixed and have another bug: more endurance is used than normal.
The pseudo code is as follows:


-- java ConnectSwing
-- twoHand = handWeapon.isTwoHandWeapon() and ((handWeapon.getWeight() / 1.5f) / 10.0f) or 0
-- ((handWeapon.getWeight() * 0.18f * handWeapon.getFatigueMod(isoGameCharacter) * isoGameCharacter.getFatigueMod() * handWeapon.getEnduranceMod() * 0.3f) + twoHand) * 0.04f
-- 0.00216 * f + 0.0027 * weight

-- lua choptree
-- use = self.axe:getWeight() * self.axe:getFatigueMod(self.character) * self.character:getFatigueMod() * self.axe:getEnduranceMod() * 0.1 * 0.041
-- if isTwoHandWeapon() then use = use + self.axe:getWeight() / 1.5 / 10 / 20
-- 0.0041 * f + 0.0033 * weight


My advice is don not use the "Cut Down Tree", just swing your weapon manually.
Tsunpi 28 Jul, 2023 @ 6:54pm 
I tried using the stone ax with the logging command about 10 times in debug mode, but it worked about 30 times, so I think the bug has been fixed.
IndustryStandard 22 Jun, 2023 @ 8:49am 
Assuming the mod is still relevant since I don't recall any tree bug fixes. But if they do patch it will you update the post to say it's no longer needed?
Hyper 18 May, 2023 @ 3:35pm 
Okay to install mid-game?
San 2 May, 2023 @ 2:07am 
I use your mod in every game. Thank you.
404_coffee.exe 17 Apr, 2023 @ 6:14am 
thanks for the fix!!
vel 4 Apr, 2023 @ 6:16am 
This is safe to add on existing files right?
Farsigt 19 Mar, 2023 @ 10:38am 
@Sanctus Demon
Yes it does! :) Noticed the difference right away. Added it yesterday on dedicated server mid save.
Sanctus Demon 18 Mar, 2023 @ 7:55pm 
i didnt even know this was a thing or that u could even chop them down manually im soo bad. lol does this mod still work and fix the issue mentioned?
Farsigt 17 Mar, 2023 @ 1:59pm 
My curiosity got the better of me when scrolling through the workshop and yet again it did not disappoint lol. Incredible work finding this bug, was very interesting to read that thread. Adding this to my server immediately.
Thanks :spiffo:
Space Sprout 22 Jan, 2023 @ 12:12pm 
Hello! I’m Kai reaching out on behalf of the Day’s End Roleplay server. We use your mod in our server and have loved it. We were hoping to make it part of our permanent mod pack.

This would include you extending your creative license to us, allowing our mod team to add/edit/use your mod to suit our server. As such we would not publish our edits to the workshop. We will include credit to you as the original creator of the mod, of course.

If this is agreeable to you or would like to discuss this further, please let us know. Thank you for all your effort.

Kai, Day’s End Mod Team
Woodland 16 Jan, 2023 @ 8:53pm 
Can this mod be used in multiplayer and can it be added to an already existing game?
BOT [Mr. Krabs] 1 Nov, 2022 @ 7:06am 
Was any analysis done to other factors when chopping trees using the option vs manually? Like endurance or anything? It's probably the same but regardless, I'd have never thought of that. That's cool as hell man, good work.
Naked Buffalo 1 Nov, 2022 @ 12:11am 
Yeah this explains why all of a sudden I have to actually look out for a wood axe. Every other axe was being destroyed after like barely any wood processing, made zero sense. The wood axe seems immune to the bug.
witch[bb] 31 Oct, 2022 @ 1:20pm 
Thank you so much I was wondering why a wood axe would degrade that quickly.
J6 30 Oct, 2022 @ 8:11pm 
@fturhan38 hellcase:com Praid yes because it is not like creating an entire game is it, you fucking dipshit
Toroic 29 Oct, 2022 @ 9:39am 
This explains why stone axes can't even chop down a whole tree early on, glad this exists and that there's a manual chop workaround!
fturhan38 29 Oct, 2022 @ 1:16am 
this man is better than the entire fucking development team for project zomboid
AstrayCuriosity 28 Oct, 2022 @ 11:56pm 
holy fuck I always thought axes break too fast when you do that
Undefined  [author] 27 Oct, 2022 @ 12:48pm 
@Thrandisher: Thank you for the reward and kind words!

@Vanaukas: Thank you for the kind words!
Undefined  [author] 27 Oct, 2022 @ 12:47pm 
@MyNameisMati: I've only dabbled a slight bit in it, but here's what I know.

Inside your game files in "media\lua," you can find files like ISInventoryPaneContextMenu.lua, ISContextMenu.lua, ISWorldObjectContextMenu.lua, etc, and this is where the game handles context menus.

There's also events that the game emits when the user is accessing context menus. In the link below, do a search for "context." Note that there's a new function parameter that was included in some (if not all) these events and it's the first parameter. This new parameter isn't shown in the wiki. When you add the parameter, you can name it "guid."

https://pzwiki.net/wiki/Modding:Lua_Events

With that said, I highly recommend that you find a mod that offers similar functionality of what you're trying to accomplish and look at the code to see how that modder did it.

Also, head over to the game's official Discord server and ask in the modding section.
Ullatec 26 Oct, 2022 @ 11:57pm 
Great find. i do remember the old days when that option wasnt in game. Now that im lazy, i need the auto chop, lol.

A extra reward for you also
Vanaukas 26 Oct, 2022 @ 4:00pm 
I looked on the thread, this is a really rare catch, nice one mate, kudos
MyNameis_Mati 26 Oct, 2022 @ 3:26pm 
Hi! em...you seem like you kind of know code lua and stuff...will you lend me a hand? we are trying to figure out how to enable/create a contextual menu...and we are you having any luck...
Undefined  [author] 26 Oct, 2022 @ 1:10pm 
Now your weapons will feel like strong doge instead of weak doge when chopping down a tree. :)