Maliki's Item Durability EX ver 1.9

● ARCHIVED · READ-ONLY
Started by Maliki79 96 posts Page 2 of 5 View original ↗
  1. I've been thinking about the gameplay involve the need to buy new equipments sometimes because of rotten/destruction.
    So if the equipment was broken once (0 durability) it have 3% chance of become useless (unrepairable),then if it continuously get destroyed by usage the chance of disappearing dramatically increases. Something like this or instead of desappearing alone it becomes an scrap-item. Is that something reasonable/possible? Btw, thanks a lot for your reply and attention. :kaothx:
  2. The scrap item idea would be far easier to implement than the random permanent breaking idea, but technically, both ideas can be done.
  3. Then i'll wait anxious for this. If you can do it, i'll be very thankful and glad. :kaojoy:
  4. Hi, I've encountered two problems when using this plugin:
    1. All equipment remains equipped once broken, even if Destroy Equip Mode type 0 or 2 is selected.
    2. Durability Adjust only takes effect once an item reaches 0 durability, at which point any stat boosts granted by the equipment disappear completely - essentially all equipment behaves in an 'all or nothing' fashion, regardless of the adjust threshold I've actually entered.
    Any suggestions as to what might be causing this? I've already tried using the plugin alongside just the required Yanfly ones (thinking that there may have been a compatibility issue somewhere), but I still get the same problems. If you had any other ideas I'd appreciate hearing them.
  5. Change the name of the plugin back to the original name.
    ( Mal_Durability_EX )
  6. Thanks, works perfectly now. In case you weren't aware, the first i in 'durability' is missing from the current plugin name, which I think may have contributed to the problem.
  7. Glad you got it working.
  8. Is it possible with this plugin to repair armor with a an NPC Plugin Command? Like Repair all items 30%? etc?
  9. Solis said:
    Is it possible with this plugin to repair armor with a an NPC Plugin Command? Like Repair all items 30%? etc?
    The Script call
    Code:
    $gameParty.fixAllDurability();
    will repair all party equipment to 100%.
    It doesn't do smaller percentages, but if you need that, I could see about adding it.
  10. Maliki79 said:
    The Script call
    Code:
    $gameParty.fixAllDurability();
    will repair all party equipment to 100%.
    It doesn't do smaller percentages, but if you need that, I could see about adding it.
    Yes, I might have a need for that, as I'm planning to have a "repair-over-time" effect.
  11. And done!

    You can now add a number to the fixAllDurability call that will add a percentage amount of the item's MAX durablity to the
    current amount.
    (You can make the number a negative to damage.)
    Ex: $gameParty.fixAllDurability(15) will restore 30 points of an item's Dur if the item had 200 Max Dur.
  12. Hey Maliki,

    Fantastic plugin - I've played around with it a little and it seems to work exactly as you've written on the box, so well done.

    The thing is, I didn't actually want to use it quite as intended.

    I've noticed that there isn't currently an "Evolving Weapons" plugin available for MV, and I had thought that maybe Yanfly's Durability plugin could be retrofitted to do the job. I was initially disappointed when I realised that all of the items just got deleted from your inventory whenevery they broke, so that stopped me in my tracks until I found your plugin. I wonder if you might be able to help me take it the rest of the way.

    My idea is that we can simply use the durability value as an experience value instead (so you could have breakable weapons with the plugin in its original state, OR you could have evolving weapons with an edited plugin, but not both). I figured that the next step would be to simply find the break trigger in the plugin code and change it from 0 to max durability and then use the custom break effects along with Yanfly's Item Upgrade Slots plugin to do the following:

    * Increase the number of upgrade slots on the weapon.
    * Give the player a selection of upgrade items.
    * change the name of the item to "itemName (Upgrade Available)" and highlight it in the inventory so the player knows it's ready to be upgraded.

    Unfortunately, I'm no wiz at javascript, and I couldn't even find the break trigger in Yanfly's script, so I'm hoping you can help me out with that.


    Also, if this needs to be put in a different topic or something to that effect, please let me know. I don't want to step on any toes.


    Thanks so much.
  13. I figured that the next step would be to simply find the break trigger in the plugin code and change it from 0 to max durability

    This is doable, but you'd also have to change the plugin's way of dealing with durability damage. Almost all durability changes are set to decrease. My plugin does not change the trigger, but instead, what happens to the item once the trigger is hit.
    (The "break Trigger" is fairly easy to find. Just look up any function that calls durabilityBreakItem and you'll have your triggers. There's more than one.)

    I would suggest instead of trying to rework the durability to increase, find a story reason why decreasing is desired.
    For example, every weapon has a "Temperance Resistance" level and they can only evolve once that resistance is eroded.

    Scott1710 said:
    * Increase the number of upgrade slots on the weapon.
    * Give the player a selection of upgrade items.
    * change the name of the item to "itemName (Upgrade Available)" and highlight it in the inventory so the player knows it's ready to be upgraded.

    From within the custom break tags:
    item.upgradeSlots += x; (x is the amount of slots you want to increase)
    item.name = item.name + " (Upgrade Available)"; (Note the space near the beginning of the quotes.)

    The item selection is beyond the scope of both mine and YFs plugin, so you'd have to do edits or have someone make that part for you.
    That said, if you want the weapon to change into another predetermined one, you can do that with the notetag
    <DurabilityScrap: a, b, c, d>
    on weapon/armor notes.

    a is the type. (1 = item. 2 = weapon. 3 = armor)
    b is the item's id in the database.
    c is the amount of the salvaged item.
    d is the percentage chance from 0 to 100.

    I know this isn't fully the answer you wanted, but I hope it can get you going in the right direction.

    If you need more that, again, you'll need to seek assistance.
  14. Hey Maliki
    can you explain to me how I can return the value for the durability of a certain item using script calls? I want the game to tell me the durability during Combat.

    I want the game to Display the durability of the weapons equipped by the main character. Its a one man Party and my main character has 2 weapon Slots.
    Can the Plugin differenciate between first and second equip?
  15. Xaygon said:
    Hey Maliki
    can you explain to me how I can return the value for the durability of a certain item using script calls? I want the game to tell me the durability during Combat.

    I want the game to Display the durability of the weapons equipped by the main character. Its a one man Party and my main character has 2 weapon Slots.
    Can the Plugin differenciate between first and second equip?
    Typically, you could refer to an object's durability by just referencing it directly.

    Object.durability

    The trick is figuring out how your equip menus or wherever you plan to display the info references the equips.
  16. Maliki79 said:
    Typically, you could refer to an object's durability by just referencing it directly.

    Object.durability

    The trick is figuring out how your equip menus or wherever you plan to display the info references the equips.

    Hey thank you for the quick Reply.

    Hope it is not too much to ask in this Topic but would you be so Kind and tell me how I would go and make a script that would Show me the durability of lets say the first equipped weapon.

    I simply want to avoid to force the Player to remember the durability of each weapon so I wanted to make a skill or add a hud element that will simply Show the value to the Player. You already had the script call for all weapons and Equipments $gameParty.totalDurability(); and I was wondering if it would be easy to do that for individual weapons.
  17. Xaygon said:
    Hey thank you for the quick Reply.

    Hope it is not too much to ask in this Topic but would you be so Kind and tell me how I would go and make a script that would Show me the durability of lets say the first equipped weapon.

    I simply want to avoid to force the Player to remember the durability of each weapon so I wanted to make a skill or add a hud element that will simply Show the value to the Player. You already had the script call for all weapons and Equipments $gameParty.totalDurability(); and I was wondering if it would be easy to do that for individual weapons.

    Doing it for equips wouldn't be hard. But displaying them might be.
    One of the reasons I don't do menu edits is that it rarely is useful for more than a handful of users. So while the means to reference the info is fairly straightforward, making it show in a menu is not.
  18. Maliki79 said:
    Doing it for equips wouldn't be hard. But displaying them might be.
    One of the reasons I don't do menu edits is that it rarely is useful for more than a handful of users. So while the means to reference the info is fairly straightforward, making it show in a menu is not.

    I tried to return the durability value using Object.durability with $gameParty.members()[0].equips[1].object.durability
    but that did not work unfortunately.
    As you might notice my level in JS is dabbling at best. Could you tell me why the script I used did not work?
  19. Xaygon said:
    I tried to return the durability value using Object.durability with $gameParty.members()[0].equips[1].object.durability
    but that did not work unfortunately.
    As you might notice my level in JS is dabbling at best. Could you tell me why the script I used did not work?
    Try
    $gameParty.members()[0].equips[1].durability
  20. Gives me the following error in the console when I try to return the value:

    TypeError: Cannot read property 'durability' of undefined
    at eval (eval at Game_Interpreter.command122 (YEP_CoreEngine.js:1831), <anonymous>:1:34)
    at Game_Interpreter.command122 (YEP_CoreEngine.js:1831)
    at Game_Interpreter.executeCommand (rpg_objects.js:8930)
    at Game_Interpreter.update (rpg_objects.js:8838)
    at Game_Troop.updateInterpreter (rpg_objects.js:5226)
    at Function.BattleManager.updateEventMain (rpg_managers.js:2281)
    at Function.BattleManager.updateEvent (YEP_BattleEngineCore.js:1962)
    at Function.BattleManager.update (YEP_BattleEngineCore.js:1920)
    at Scene_Battle.updateBattleProcess (rpg_scenes.js:2265)
    at Scene_Battle.update (rpg_scenes.js:2257)
    Yanfly.Util.displayError @ YEP_EquipCore.js:1147