Project Zomboid

Project Zomboid

Simple Weapon Durability
105 Comments
swoonshroom 16 Jan @ 10:57pm 
Thanks, I hate breaking my axe just by chopping trees all day
Kyu  [author] 20 Dec, 2024 @ 2:21am 
I've uploaded a B42 unstable version of this mod here: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3387749540

Please keep in mind this is a temporary version and will not be supported once B42 merges into the main branch of Project Zomboied.

I also should mention that while I did validate that the values were getting updated correctly, I did not test actually playing with the mod as I haven't played Project Zomboid in a while. If you run into issues please post them in the support discussion here: https://steamhost.cn/steamcommunity_com/workshop/filedetails/discussion/2617955054/595135824845113957
Rocky Jet 19 Dec, 2024 @ 12:00pm 
It will show up but as in red meaning it’s probably broken or needs an update.
juskom95 19 Dec, 2024 @ 8:32am 
@Ashleigh
I think all mods are broken, TiS changed the folder format I believe.
Kyu  [author] 19 Dec, 2024 @ 12:43am 
@Rocky Jet - It definitely will if it’s ever needed! Your comment made me notice build 42 currently has an unstable release. Is it broken in that release?
Rocky Jet 18 Dec, 2024 @ 7:58pm 
Will this get updated my frtiend?
Kyu  [author] 10 Dec, 2024 @ 12:56pm 
@Alktimel - This was actually reported when I initially launched the mod. Surprisingly a lot of people liked that clients could adjust it at an individual level so I didn’t adjust it.

Since there wasn’t a lot of demand for a multiplayer version I gave server admins permission to upload a customized version of this mod with the mod options code removed as long as they linked back to this mod. You can see a few out there if you search for Simple Weapon Durability. Feel free to adjust one of those for your server and link back to this mod!
Alktimel 10 Dec, 2024 @ 9:30am 
Every player can change the options on a multiplayer server via modoptions. That made me remove the mod again.
Kyu  [author] 27 Sep, 2024 @ 1:52pm 
Yep. This is coded in a way that I will be very surprised if it ever breaks.
Usko 27 Sep, 2024 @ 10:52am 
still work?
Kyu  [author] 23 Sep, 2024 @ 1:27pm 
Yep! This mod will increase the durability of all weapons.
M4v3r1ck365 22 Sep, 2024 @ 5:58pm 
Can I use this mod to make the M16 more durable? if so, how?
Freddie Konings 18 Apr, 2024 @ 7:39pm 
@Ashleigh I am sorry for answering this late. It could be another mod and I guess the only way to find out is by deleting all my other mods which is quite an annoying process. I was using a pipe wrench and it seemed to be every 10-20 swings. It would sometimes take up more swings and I would say by nearly double so I might just got unlucky with the breaking of my tool.
Kyu  [author] 15 Apr, 2024 @ 5:48pm 
@Fluppe - You could have another mod that's messing with the values, because everything was working for me when I was testing MrCat's request. What weapon were you using, and how many swings did it take to break? Some weapons have an extremely low durability and if you have bad luck with the condition lower chance, they can still break really quick. Spears, forks, butter knives, etc. are all super lower durability and can break super fast if you have bad luck.

If it's not another mod, I'd suggest not playing the lottery anytime soon!
Freddie Konings 15 Apr, 2024 @ 12:43pm 
I put it on x100 which should make my weapons almost unbreakable and it still feels like it is the same as normal durability. Am I doing something wrong?
MrCat 13 Apr, 2024 @ 7:55pm 
Okay, thank you very much for replying !
Kyu  [author] 13 Apr, 2024 @ 11:05am 
@MrCat - Not using the method this mod uses. ConditionLowerChance unfortunately doesn’t accept 0 as a value. You can make the chance really really low by setting the ConditionLowerChance value really really high, but you would still possibly see breakage in low durability items like forks, spears, etc. (if your luck was really really bad).
MrCat 11 Apr, 2024 @ 10:00pm 
Is it possible to add a infinite option?
Kyu  [author] 16 Feb, 2024 @ 10:37am 
@Dr_JOnes - I believe all tool usage calculations utilize condition lower chance. If a mod changes the way said calculation works, it may not though. Try it out and post your results if using modded tools. Vanilla tools should be good, and 99% of mods should be good. I don't think anyone wants to maintain a custom calculation script so most modders would leave it be. :)
Dr_J0nes 16 Feb, 2024 @ 7:57am 
does it involve using the weapon tool? like the crowbar for example
Kyu  [author] 29 Jan, 2024 @ 5:56pm 
@STR1KEStudioz - This mod works in multiplayer but what has been reported is that users can change the mod options configuration / text file in order to get higher durability than server admins intend. I'd only use it with people you trust to play honestly.
Kyu  [author] 29 Jan, 2024 @ 5:53pm 
@STR1KEStudioz - Definitely a conflict with another mod. This doesn't touch propane in any way, even with the mentioned mod installed.
STR1KEStudioz 29 Jan, 2024 @ 2:05am 
This breaks the Propane fix mod :(
STR1KEStudioz 29 Jan, 2024 @ 1:21am 
Does this work in multiplayer
Kyu  [author] 22 Jan, 2024 @ 10:42pm 
Yep!
Jaymaysuu 22 Jan, 2024 @ 2:57pm 
this work with weapons from another mods?
Kyu  [author] 12 Jan, 2024 @ 9:10pm 
A great suggestion! The last time I worked on this, I don't think crafted weapons were tagged differently than non-crafted weapons. If I revisited zomboid modding I'd probably introduce the ability to configure melee and ranged weapons separately.

That would be a new mod though, since this one has been stable for about 3 years.
Styles- 10 Jan, 2024 @ 11:01am 
Just a suggestion, (im fairly new at pz but) I think you should be able to choose the durability change for each - spawned melee weapons, crafted weapons, and ranged weapons - individually. I like the idea that my hammer and crowbar will break a lot slower on some soft gushy headed zombie, but my hunting knife duck taped to a crafted spear should probably be a bit less durable. I would probably go with a 3x spawned melee, 1x crafted melee, 2x gun durability levels - or something.
Argonaut_Jay 4 Dec, 2023 @ 10:09pm 
Great thank you!
Argonaut_Jay 4 Dec, 2023 @ 9:58pm 
Does this work with firearms or only melee?
Kyu  [author] 31 Oct, 2023 @ 10:32pm 
Yep!
Asep 26 Oct, 2023 @ 6:59pm 
Compatible with VFE?
Kyu  [author] 1 Oct, 2023 @ 11:14am 
Yep!
RATO_BR 1 Oct, 2023 @ 7:52am 
Is that compatible with britas?
DragonKing 14 Jul, 2023 @ 5:18am 
Hey @Ashleigh, everything should be in place now. The extended mod is here: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3003693661
Kyu  [author] 12 Jul, 2023 @ 7:28pm 
Awesome! Feel free to leave a link here in the comments once the workshop item is up. I know a few people were looking for a multiplayer friendly version.
DragonKing 12 Jul, 2023 @ 5:22pm 
Obviously I will link back to this. Also, seems like it works on servers too, did a little test earlier today.
Kyu  [author] 12 Jul, 2023 @ 2:21pm 
As long as you give credit and link back to this page I'm perfectly okay with that! You would be surprised how many people don't even ask, so thanks for that!
DragonKing 12 Jul, 2023 @ 11:41am 
@Ashleigh I have been tinkering with a heavily modified and somewhat expanded version of your durability mod. Would you be opposed to me making it public on the workshop?

I expanded the settings so you can also increase the durability Max, to allow flat increases to both Max and Change Chance, an option to exclude all modded items with a setting, changes no longer require a restart of the entire game, just reloading the save, some optimizations for the list of items.

Most importantly, I am also trying to get it to work for multiplayer servers, where owners can make changes, but I need to test if it actually works xD
BlackWater821 1 Jan, 2023 @ 7:15pm 
thanks and will report asap after tested )))
Kyu  [author] 1 Jan, 2023 @ 12:50pm 
Turns out I was looking at a very outdated version of the script. Below changes would be made on line 50, not 37.
Kyu  [author] 1 Jan, 2023 @ 12:36pm 
I haven't looked at this code in a really long time but I know I didn't test adding different item types. I'm not sure if condition lower chance works the same on anything but weapons and the comments I put in were mostly stuff I was figuring out as I dumped the data to look at what was available.

With that said, if you wanted to test adding a different item type you would encapsulate the final AND statement on line 37 with a bunch of OR statements. So on line 37...

(sItemType == "Weapon")

Becomes

((sItemType == "Weapon") or (sItemType == "Drainable"))

In theory that would add (not replace) drainable items, which would in turn have their condition lower chance changed along side Weapon types. As for if it would do what you wanted it to do, you would have to give it a test and see what happens!
BlackWater821 8 Dec, 2022 @ 3:59pm 
Let's say if i wanna add "Drainable" as a new types,not replace.
What should i do? Thanks for ur time.
BlackWater821 8 Dec, 2022 @ 3:56pm 
Love the idea of categories based mods so we don't fuck up even if modder update his less frequently.

Got some question, saw this in your script.

-- Item Types: (Right now the script only includes "Weapon" types. Other types can be manually added.
-- Clothing
-- Container
-- Drainable
-- Food
-- Key
-- KeyRing
-- Literature
-- Normal
-- Weapon
-- WeaponPart
Ratbag 5 Nov, 2022 @ 2:27pm 
Much better compared to Realistic Durability, thanks a lot :spiffo:
Gadwin 22 Jul, 2022 @ 8:13pm 
Thank you for the response! I personally have no idea as to whether or not it would mess with MP server stuff as i'm not that knowledgeable with how the game works, so maybe making its own workshop item would be best so that you'd only have to put in the effort in once.
Kyu  [author] 22 Jul, 2022 @ 7:35pm 
Sure! I’m not sure how multiplayer modding works as far as uploading goes. If I pack it into this mod does that affect server mod lists? Or should I make it it’s own workshop item?

Sorry for the lack of activity and response. I tend to play games more than I mod them which is why I make “Simple” mods. As in I coded this in a way that it shouldn’t need updated for like years which means more gaming time for me!
Gadwin 23 Jun, 2022 @ 9:30pm 
Could you make a version that is locked into 2x rates so that players cannot adjust their own rates when joining servers? Your mod is the only one free of blatant bias and that also includes modded weaponry- it's the most sensible option, but not being able to use it for multiplayer sucks.
Kyu  [author] 13 Jun, 2022 @ 3:36pm 
It should! Unless weapon durability gets fundamentally changed this mod will remain compatible with any newer versions of the game.
Lemur 12 Jun, 2022 @ 8:59am 
This mod work on newest game version?
I dunno if i should risk downloading this