Equipment Durability

I tried that and it didn't change anything. Misses still don't decrease durability.
View attachment 253009
Could it be based on the fact that the weapon DIDN'T HIT anything in the first place?
So why should it experiment any decreased durability issues.
Could it be based on the fact that the weapon DIDN'T HIT anything in the first place?
So why should it experiment any decreased durability issues.
The main weapons in the game are firearms, so they still experience wear and tear even if you miss.
The main weapons in the game are firearms, so they still experience wear and tear even if you miss.
So you mean they're the same you posted in your status recently, don't you?
Perhaps you'd love to make them even more realistic as to feature a stuck bullet. XD
So you mean they're the same you posted in your status recently, don't you?
Perhaps you'd love to make them even more realistic as to feature a stuck bullet. XD
Believe it or not, already done! I also have various ammunition types.
Bump, any updates as far as help goes? I could be mistaken on what I can edit to get the effect I want.
Bump, any updates as far as help goes?
Did you try the code I posted?
Did you try the code I posted?
Sorry, I must have missed that. Do I just add that in some seperate area in the script, or add it as a totally new script?

EDIT: I tried adding it after the "successful damage" code, it crashes. I'll try it separate later.
1676906707419.png

1676906681060.png
I tried adding it after the "successful damage" code, it crashes. I'll try it separate later.
You can either add it into that class or a a separate script.
Take care though.
You missed an end from the code I posted, but you copied class Game_Battler into class Game_Battler.
that can't be done.
either copy it in and leave out the class line and the last end line or make it it's own script slot with the final end.
I added it as it's own script, but it crashes whenever I use an item or a skill. I tried keeping in the original section in the original script, as well as deleting it.
1676939807444.png

1676939860008.png
Oh I think it's a small mistake.
it crashes
take the ? off of missed
Oh I think it's a small mistake.

take the ? off of missed
It works, thank you!
Is it possible to use the durability of equips in a damage formula?
For instance, if your armor durability is 50/100, only 0.5 of the equip's base DEF and/or MDF is factored in to the formula?
Another example is an attack skill that is affected by the durability of a weapon. Same idea applies, only it affects ATK or MAT.

Edit: something like base_damage * (weapon_durability / max_durability)
something like base_damage * (weapon_durability / max_durability)
Yes that's possible, but you will need to use a script to change what attacks actors use since enemies use attack 1 as well. unless you change every enemy to not use skill 1.
You can do something like this
w = a.equips[0]; (w.durability.to_f / w.max_durability) * (a.atk * 4 - b.def * 2)
Is it possible to adjust the durability of a weapon (using a script call)? My idea is to have a "whetstone" item that would repair/reset a weapons durability to max. I guess it would have to work for whatever character it gets applied to. If that's even possible 😅
equip = $game_actors[1].equips[0]equip.durability -= 1But it doesn't update the suffix in the menu. It updates after I go into battle, however, and by setting a variable to equip.durability I figured out that it is working. Also, the weapon won't break. If I add:
So I tried this but it crashed my game and gives me this error message.

1710419033984.png

I'll keep troubleshooting but if anyone has the answer to my question, I'd much appreciate it! Thanks y'all!
Is it possible to adjust the durability of a weapon (using a script call)? My idea is to have a "whetstone" item that would repair/reset a weapons durability to max. I guess it would have to work for whatever character it gets applied to. If that's even possible 😅

So I tried this but it crashed my game and gives me this error message.

View attachment 298428
I'll keep troubleshooting but if anyone has the answer to my question, I'd much appreciate it! Thanks y'all!
I am also interested in this, as well as "partial repairs" where an item would repair a portion of the durability.
Probably it should have been written like this:

Ruby:
equip = $game_actors[1].equips[0].equip_durability -= 1

The main reason is that equips is an array and it's picking its first element, usually a weapon. I suspect it should include the equip_durability and equip_durability= methods, either by defining them manually or via attr_accessor :equip_durability ...

If it still fails, you'd have to take a look at the actual method name yourself.

Original thread: https://forums.rpgmakerweb.com/threads/equipment-durability.22011/