Project Zomboid

Project Zomboid

Simple Weapon Durability
105 kommentarer
swoonshroom 16. jan. kl. 22:57 
Thanks, I hate breaking my axe just by chopping trees all day
Kyu  [ophavsmand] 20. dec. 2024 kl. 2:21 
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
R o c k y J e t 19. dec. 2024 kl. 12:00 
It will show up but as in red meaning it’s probably broken or needs an update.
juskom95 19. dec. 2024 kl. 8:32 
@Ashleigh
I think all mods are broken, TiS changed the folder format I believe.
Kyu  [ophavsmand] 19. dec. 2024 kl. 0:43 
@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?
R o c k y J e t 18. dec. 2024 kl. 19:58 
Will this get updated my frtiend?
Kyu  [ophavsmand] 10. dec. 2024 kl. 12:56 
@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 kl. 9:30 
Every player can change the options on a multiplayer server via modoptions. That made me remove the mod again.
Kyu  [ophavsmand] 27. sep. 2024 kl. 13:52 
Yep. This is coded in a way that I will be very surprised if it ever breaks.
Usko 27. sep. 2024 kl. 10:52 
still work?
Kyu  [ophavsmand] 23. sep. 2024 kl. 13:27 
Yep! This mod will increase the durability of all weapons.
M4v3r1ck365 22. sep. 2024 kl. 17:58 
Can I use this mod to make the M16 more durable? if so, how?
Freddie Konings 18. apr. 2024 kl. 19:39 
@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  [ophavsmand] 15. apr. 2024 kl. 17:48 
@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 kl. 12:43 
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 kl. 19:55 
Okay, thank you very much for replying !
Kyu  [ophavsmand] 13. apr. 2024 kl. 11:05 
@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 kl. 22:00 
Is it possible to add a infinite option?
Kyu  [ophavsmand] 16. feb. 2024 kl. 10:37 
@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 kl. 7:57 
does it involve using the weapon tool? like the crowbar for example
Kyu  [ophavsmand] 29. jan. 2024 kl. 17:56 
@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  [ophavsmand] 29. jan. 2024 kl. 17:53 
@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 kl. 2:05 
This breaks the Propane fix mod :(
STR1KEStudioz 29. jan. 2024 kl. 1:21 
Does this work in multiplayer
Kyu  [ophavsmand] 22. jan. 2024 kl. 22:42 
Yep!
Jaymaysuu 22. jan. 2024 kl. 14:57 
this work with weapons from another mods?
Kyu  [ophavsmand] 12. jan. 2024 kl. 21:10 
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 kl. 11:01 
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 kl. 22:09 
Great thank you!
Argonaut_Jay 4. dec. 2023 kl. 21:58 
Does this work with firearms or only melee?
Kyu  [ophavsmand] 31. okt. 2023 kl. 22:32 
Yep!
Asep 26. okt. 2023 kl. 18:59 
Compatible with VFE?
Kyu  [ophavsmand] 1. okt. 2023 kl. 11:14 
Yep!
RATO_BR 1. okt. 2023 kl. 7:52 
Is that compatible with britas?
DragonKing 14. juli 2023 kl. 5:18 
Hey @Ashleigh, everything should be in place now. The extended mod is here: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3003693661
Kyu  [ophavsmand] 12. juli 2023 kl. 19:28 
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. juli 2023 kl. 17:22 
Obviously I will link back to this. Also, seems like it works on servers too, did a little test earlier today.
Kyu  [ophavsmand] 12. juli 2023 kl. 14:21 
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. juli 2023 kl. 11:41 
@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 kl. 19:15 
thanks and will report asap after tested )))
Kyu  [ophavsmand] 1. jan. 2023 kl. 12:50 
Turns out I was looking at a very outdated version of the script. Below changes would be made on line 50, not 37.
Kyu  [ophavsmand] 1. jan. 2023 kl. 12:36 
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 kl. 15:59 
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 kl. 15:56 
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 kl. 14:27 
Much better compared to Realistic Durability, thanks a lot :spiffo:
Gadwin 22. juli 2022 kl. 20:13 
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  [ophavsmand] 22. juli 2022 kl. 19:35 
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. juni 2022 kl. 21:30 
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  [ophavsmand] 13. juni 2022 kl. 15:36 
It should! Unless weapon durability gets fundamentally changed this mod will remain compatible with any newer versions of the game.
Lemur 12. juni 2022 kl. 8:59 
This mod work on newest game version?
I dunno if i should risk downloading this