MV Yanfly's ItemDurability; how do I increase the durability of a specific piece of equipment without going above the Durability Max?
Javascript/Plugin SupportYeah - no offense, but it looks like you entered a bunch of script calls without really understanding what the components meant.
You have
I suggest you replace your script calls to reflect what I had above:
the number 5 should be changed in each conditional to be the ID of that specific actor.
We won't use $gameParty.members() because we neither know nor care which position in the party that actor is.
And just double check your Equipment Types in the Types tab of your database to make sure you're looking at the right slot.
In the default setup, Weapon is the first one (and lists in JavaScript start with 0) so this:

would be equips()[0] for the weapon, equips()[1] for the shield, etc.
You have
$gameParty.members()[0] every time, which means it's always looking at the same actor - why would you use all those event conditionals if the code is always the same? For future reference, that should throw a little warning flag for you.I suggest you replace your script calls to reflect what I had above:
Code:
$gameParty.changeItemDurability("armor", $gameActors.actor(5).equips()[1].itemId(), 99);
We won't use $gameParty.members() because we neither know nor care which position in the party that actor is.
And just double check your Equipment Types in the Types tab of your database to make sure you're looking at the right slot.
In the default setup, Weapon is the first one (and lists in JavaScript start with 0) so this:

would be equips()[0] for the weapon, equips()[1] for the shield, etc.
I just tried this, and I got an error message
Did you follow my instructions to make sure you're looking at the right slot?
That error is saying you're trying to reference an item in an empty equipment slot.
Please show a screenshot of the Purse item and the Types tab of your database.
That error is saying you're trying to reference an item in an empty equipment slot.
Please show a screenshot of the Purse item and the Types tab of your database.
Replace itemId() with just id. That's for the Item templates from the database, not actual objects in the running game.
I figured out the issue.
It's because the item is equipped. The checks for max durability were only fixed for party items (the lines Att mentioned.) My fault I'll fix it when I get home in a few hours.
It's because the item is equipped. The checks for max durability were only fixed for party items (the lines Att mentioned.) My fault I'll fix it when I get home in a few hours.
That's incorrect capitalization, I said id, not Id.
I just scanned through Maliki's plugin, didn't realize there were separate functions for party and equipped items. So hopefully that will fix you up - but you still must be precise any time you're typing code.
I just scanned through Maliki's plugin, didn't realize there were separate functions for party and equipped items. So hopefully that will fix you up - but you still must be precise any time you're typing code.
All fixed!
Sorry for the delay there.
Really REALLY need to redo many of those older plugins...
Sorry for the delay there.
Really REALLY need to redo many of those older plugins...
alright, I've just downloaded the updated version of the plugin and it seems to be working! Thanks you guys.