Enchanted weapon attack decay rates

Forum where closed and resolved bug reports live
Post Reply
Mousus6
Posts: 67
Joined: Fri Mar 07, 2025 9:55 am

Enchanted weapon attack decay rates

Post by Mousus6 »

Finally made enough attacks with my enchanted cryptchill carbine to have statistical evidence rather than just a vague sensation that it decays a lot.

The wiki says weapon attacks are a 2% decay rate, over the last 496 attacks my carbine has decayed 19 times a rate of 3.8%. Over that data set it my bad stat analysis gives an over 95% chance that I haven't just got unlucky.

My best theories are:
  • The event weapons have a higher decay rate for some reason. I don't have any data to disprove this one.
  • The wiki is wrong about weapon decay rates, though that one actively made its way into patch notes at some point so seems unlikely. Might be the case that it's a value stored in lots of places and the ones that were changed weren't the ones the rng actually calls.
  • Enchanted weapons call decay twice, once for the main hit, once for the supplemental damage. Was my favourite default theory. When I get the last few cold enchants off the carbine and swap it to accuracy I'll start collecting data to see if it's different.
Feels worth having a bit of a look at the decay code to see why the rate is near double, even if largely only fallen actually care about non-innates at T3.
User avatar
Kandarin
Site Admin
Posts: 1653
Joined: Sat Aug 07, 2021 12:10 am
Location: Theater of the Air

Re: Enchanted weapon attack decay rates

Post by Kandarin »

The code on this is pretty concise and says it works like this:
  • The base weapon decay rate is a game-wide setting defined by dev tools. Currently this is 2%. Prior to April 19, 2025 it was 3%. The code handles this in only one place.
  • The code and database does not store separate decay rates for different weapons.
  • If the weapon is melee, hand-to-hand, or a throwing weapon that isn't a Sling and the target has the Parry skill, the chance is increased by 6%.
  • The chance is reduced by a percentage equal to the number of Durability enchants on the weapon, potentially down to zero.
  • The Prayer result Weapon Turning and the Elementalist's Wind Wall each increase the chance of an attacking weapon degrading by 5% if the target has it active.
  • The Prayer result Unbroken Bond negates all chance of weapon decay if the attacker has it active.
However, there's a pretty significant bug that came up here - the linking of decay chance to a game setting (currently 2%) in 2025 was done only for attack code vs players and pets. It wasn't properly incorporated into attack code vs structures or target shooting - those were still hardcoded to the old 3% number. So that'll be resolved in the next patch. If your attacks included bashing and target shooting, I think it's safe to assume that this is the cause of your observed anomalies.
Post Reply