Project Zomboid

Project Zomboid

Dragons Simple Weapon Durability
71 Comments
DragonKing  [author] 1 May @ 2:05am 
@Damo Martin - not in the way you probably mean. The durability changes affect everything that is chosen to be affected, but you can't change the durability per category directly.
Damo Martin 28 Apr @ 8:59pm 
are there settings for melee weapons separately to ranged weapons
DragonKing  [author] 14 Nov, 2024 @ 8:15pm 
@MooseJuice - so you say some things work, and some don't? Consider creating a discussion where you share what other mods you added, otherwise I can't really do anything about it.
MooseJuice 11 Nov, 2024 @ 8:32pm 
the mod was working as intended for a day or so on my multiplayer server, then I added another handful of mods after it and now some aspects of the mod settings wont work. The x100 multiplier to the durability just doesn't work and the decrease to durability loss probability wont change as needed, but the additional 50 base durability works fine. I even put the mod to the top of the load order list. Not sure how to make it work again
DragonKing  [author] 27 Sep, 2024 @ 4:08pm 
@juskom95 explain what contradictions.
juskom95 27 Sep, 2024 @ 1:49pm 
You might want to put up an explanation as to what your options do, because those settings are clear as mud. You have contradictions in there.
Kyu 7 May, 2024 @ 4:03pm 
@DragonKing - The only thing I can think of is you having changed the timing of when item changes are injected. I remember having theoretical concerns when looking at all the different events when it came to when I modified the item attributes, mostly in fear of stacking changes as someone quits and loads into their saves.

I think that's why I ended up injecting on game start. Maybe quit and load your save a whole bunch of times and see if something weird happens?
DragonKing  [author] 15 Apr, 2024 @ 4:21am 
@MrCat thanks for the testing. Odd that it happens to your melee weapons, as I have played a long while with the mod, without that happening. The thing that strikes me the most, is that the mod shouldn't be running any code after you load into your save, which is why it is so difficult to track down why the durability suddenly goes to 0 :(
MrCat 13 Apr, 2024 @ 7:54pm 
and now the weapons are broken...
MrCat 13 Apr, 2024 @ 6:01pm 
I was doing a test run and the weapons were spawning in broken. So then i played around with "flat" settings because i dont know what they mean to be honest. Then the weapons were spawning in fine. So i kept playing and when i went out of my house for a loot run i come back to some broken.. Im now using 0 and 0 for the flat and nothing seems to be broken for now.
DragonKing  [author] 13 Apr, 2024 @ 3:17am 
@MrCat oh... that is interesting. So they spawn in broken, or does it happen with time? might be another mod conflict?
MrCat 12 Apr, 2024 @ 5:20pm 
its melee weapons not fire arms. Thank you for responding !
DragonKing  [author] 12 Apr, 2024 @ 4:37pm 
@MrCat read known issues :)
MrCat 12 Apr, 2024 @ 4:17pm 
Weapons are spawning in broken?
Quilava 19 Oct, 2023 @ 7:48pm 
That mod i use is "PrettyDerby Trait", it give lot of boost in return of faster hunger and weapon is more likely to break. For now, i just use max "condition lower change" at x100 and x11 at flat, it work well if i just use that

Incase you cant by pass the code load order, then just add more in flat like x50 instead of just x11 then it would be fine
DragonKing  [author] 19 Oct, 2023 @ 9:36am 
Sounds like the order in which code is executed when loading the world is causing a problem... I would have to do some extensive testing to test this though. Can you share the mod you are using maybe? It might help give me a clue on what is going wrong.
Quilava 18 Oct, 2023 @ 8:26pm 
No, it melee, not ranged, im noticed normally my frying pan will break with 6 time duration loss, when using this mod with x100 durable, it only lose 6 and still have like 70+ left, but after u quit the game and go back, it will break, i test it with 3 time break, then it lose like 50% with just 30+ durable left
DragonKing  [author] 18 Oct, 2023 @ 5:15pm 
@Quilava you talking about ranged or melee weapon?

There is a bug rn with ranged weapons randomly losing all durability. I recommend disabling modifying ranged weapon durability.
Quilava 17 Oct, 2023 @ 9:31pm 
I having a problem rn, i set durable to max, it run well for the whole time, but when im come back today, the weapon i have use yesterday just break completely. Last time if im remember correct they only lose like 6-10 condition over 160-220, how the hecc that happen?

Also how can i reset the setting to normal durable?
Quilava 17 Oct, 2023 @ 4:13am 
Thank you for clear that out for me, im using a trait mod that make weapon break faster in turn for some point, but it just breaking too quick i need this to combat that or else a crowbar will break after 20 zombie kill
DragonKing  [author] 17 Oct, 2023 @ 3:24am 
@Quilava "lower chance" is the chance that the durability gets lowered by 1. So for example, a lower chance of 1:25, would be 4%. 1:10 would be 10%.

You simply divide 1 by the lower chance to get the percentage.

This is why something like a fork breaks really easily, since I think it has like a 1:4 = 25% chance to lower the durability each hit, and only 4 HP max.

I personally recommend adjusting the HP max more than the lower chance, as the lower chance can quickly make items last for an entire playthrough. Crowbars also already have a really "high" lower chance number, so combined with the high max durability, and you get something that takes ages to break. It is one of the reasons why it is one of the most popular weapons in the base game.
Quilava 16 Oct, 2023 @ 3:34am 
This mod work perfectly well for me, configurable with mod option is another good point, how the heck this mod only have like 1,2k subscribe? while the other have like 10k-20k? This is so underrated

One thing tho, the "condition max " i can understand that increase the number mean more durable/HP for the weapon, but the "condition lower chance"? is it mean more change to break? So i have to decrease it for less change of it get reduce durable, correct? I just want MORE durable weapon

Other than that, pls take my :steamthumbsup:, this mod need more sub and like, fr fr
DragonKing  [author] 2 Oct, 2023 @ 8:38am 
@PattyFuckinRick nice, let me know if you encounter any issues running it on a server. Been testing it mainly in sp playthrough, and only a few tests on a server.
Veloquix 2 Oct, 2023 @ 7:12am 
@DragonKing lDCCl Yep i read there was some issues with firearms on dedicated servers, So far no problem having the durability modded on a hosted server. WIll update if that ever happens and then ill just disable firearms for future playthroughs
DragonKing  [author] 2 Oct, 2023 @ 4:23am 
@PattyFuckinRick thanks. Can't take credit for the method used though. I picked it up from the Arsenal 2.0 mod, since I had a hard time figuring out my own work-around ^^'

I have heard experiences with firearms losing durability when they get modified though, so just be aware of that. Haven't had the chance to fix it yet, since I don't even know where to look or how to debug it.
Veloquix 30 Sep, 2023 @ 4:01am 
@DragonKing lDCCl Got it, Even thought he Mod options show up for a hosted server they have no effect. Good thinking and great mod! Makes scrap weapons useful
DragonKing  [author] 29 Sep, 2023 @ 4:46pm 
@PattyFuckinRick not quite how it works... Mod options does not work on server, period. The way I have implemented the settings is a work-around to allow users to use mod options for singleplayer, while still being able to configure a server.

Otherwise, the server would just be force-locked to some preset settings I decided for.
Veloquix 29 Sep, 2023 @ 2:27pm 
@DragonKing lDCCl So it will overwrite? Im assuming we are not suppose to enable Mod Options on a local hosted server so things cant be changed client side?
DragonKing  [author] 29 Sep, 2023 @ 2:24pm 
@PattyFuckinRick Sandbox settings are ONLY used for multiplayer. The options menu will only affect your singleplayer game.
Veloquix 29 Sep, 2023 @ 9:41am 
Question, How does this mod work with a local hosted server? does the sandbox settings still take over? Cause i notice there is still options on the clients side of things
Ortus 28 Aug, 2023 @ 7:28pm 
2. First I killed zombies. After spending a couple of magazines and killing a few zombies with a melee weapon attack, I rejoined the server. When I plugged back in, I always got a broken weapon in my inventory.
3. Then I did the same, but without using weapons, just restarted the server several times. The weapon still broke. Between these two points, I turned off various mods for a long time and looked at which of them caused what, until I found that the breakdown occurs when using your mod.
4. I hope I helped in some way. Thanks again, and good luck with your problems.
Ortus 28 Aug, 2023 @ 7:28pm 
Regarding how I found that the bug is related to your particular mod:
1. I created a new server with the following mods: Mod Options. Mod Manager, Mod Manager Enhanced Load Order + Server Load order,, More Traits, Evolving Traits World, Insurgent - Black Ops Profession, CJ Firearms, Universal Gun Repair, Ammo Maker, Gun Stock Attack, Better Gun Jam, EasySpareMagazineReload, Ammo Loot Drop Zombie Drop Ammo, Ammo Box Loot Drop Zombie Drop Ammo Box, Weapon Modifiers + Your mod.
Ortus 28 Aug, 2023 @ 7:27pm 
What can I say at the moment:
1. Thanks for your mod, apart from this bug, it's a great mod and you did a great job.
2. The mod you were inspired by: Simple Weapon Durability - works with my mod pack flawlessly.
3. I will have to submit my full answer with a few comments.
DragonKing  [author] 28 Aug, 2023 @ 3:56pm 
At a first glance, I have literally no idea why this happens, since the code should only run once when the map is initialized. And even more bizarre, why only ranged weapons? I will re-iterate. If someone can find an easy way to re-create the bug, I will likely get a good idea on where to look, and what might be causing it. Right now though, I think the best approach is to just disable the durability change for ranged weapons, it seems.

I have also been recovering from surgery and other personal stuff, so I have not had the biggest motivation to look for a fix yet. But please, let me know if anyone figures out anything useful.
DragonKing  [author] 28 Aug, 2023 @ 3:56pm 
@ShinUon I have had reports of it being very inconsistent. So much so, that I think some of the ranged weapons in my own playthrough will be fine at one point, but then suddenly be broken. Running the game in debug mode, and you can't force trigger it with any spawned in items it seems. It also seems to be triggered when an area with the weapon is unloaded/loaded.
Ortus 28 Aug, 2023 @ 3:37pm 
The only thing I changed was durability from x2 to x4. I didn't touch anything else
ShinUon 28 Aug, 2023 @ 2:35pm 
@Ortus, @DragonKing
Could this potentially be a bug based on settings?

I didn't notice it when I did a quick test, but I also am not running the mod's default settings. Are @Ortus or @GreatBandWrench running default?
Ortus 28 Aug, 2023 @ 11:52am 
@DragonKing

Yes, I read the comments, and mostly I wrote here to show that the conflict is not only with Brita's weapons.

In any case, 90% of the time in my game with friends we use firearms, and now I need to find another mod that would increase the durability of our weapons from CJ that we use.
DragonKing  [author] 28 Aug, 2023 @ 11:45am 
@Ortus there is a known issue, but I have no idea what is causing it. You can disable ranged weapon durability for now, as it has been reported to only happen with ranged weapons, for some reason.
Ortus 28 Aug, 2023 @ 11:25am 
after a couple of hours of testing, I found out that this mod for some reason, when re-entering the game, it breaks the weapon that I had equipped

I use the CJ weapon mod https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2874163136&searchtext=CJ

keep that in mind
GreatBadWrench 13 Aug, 2023 @ 9:25am 
Glad to find I'm not the only one having this issue, as far as i know it only happens to my ranged weapons.
DragonKing  [author] 12 Aug, 2023 @ 5:26pm 
@Jow thank you for your input. Makes it really hard to figure out why this is happening though. I would like to figure out if it is only guns, or also melee weapons, and if it only affects Brita's weapons.
Jow 11 Aug, 2023 @ 9:10am 
I am having the same issue of the britas' weapons breaking. I had 2 guns, droped both at home to train some mechanics (literally parcell next door) and came back with both of them broken, prior to that i found twice broken guns in survivor homes, so no need to have taken them in the inventory
GreatBadWrench 1 Aug, 2023 @ 2:00pm 
I have a mod that affects consumption of items, could that be causing the issue?
DragonKing  [author] 1 Aug, 2023 @ 3:49am 
Just tested the same mod setup in a server setting, and still can't reproduce. Do you have any other mods that affect durability enabled in parallel? something that changes the actual items? Feel free to open a discussion for your issue, then we can take it from there :)
DragonKing  [author] 1 Aug, 2023 @ 3:41am 
Also, updated the description because I forgot about some incompatibility issues with certain UI mods that display the actual HP stat and such. I personally switched to this one: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2883603166 - as it works with my mod.
DragonKing  [author] 1 Aug, 2023 @ 3:39am 
@GreatBadWrench I was unable to reproduce in single player as well. I was using Arsenal 2, and would like to ask you to make sure you do not have the old Arsenal enabled along Arsenal 2. I also use a lot of mods, and recently found out that some of the "fixes" on the workshop, force-enable the old legacy version of Arsenal, which resulted in a bunch of weird behavior.

Other than that, I am personally loading this mod after any mods that add content, such as brita's weapon pack, or say, scrap weapons etc.
DragonKing  [author] 1 Aug, 2023 @ 2:51am 
Odd, one of the mods I have enabled when testing is arsenal and brita's weapon pack. I will poke around a bit and see if I can reproduce.

As far as load order is concerned, I don't see how it should matter. The code that collects all items and adjusts the durability triggers when the game world is initialized, but that is exactly my main suspect for the issue at the moment.
GreatBadWrench 31 Jul, 2023 @ 6:38pm 
I've done some more testing, and as far as i can tell it's still happening, it's frustrating, because this is a cool mod, but i have to choose between this or Brita's.
GreatBadWrench 31 Jul, 2023 @ 4:55pm 
It could just be my load order as i have many mods, but as soon as i turned this mod of the issue was fixed, it may also be that the map mod i was using didn't like having this mod and Brita's on at the same time, but that wouldn't explain how the weapon i had on my back broke.