Item Suite

● ARCHIVED · READ-ONLY
Started by ATT_Turan 28 posts Page 1 of 2 View original ↗
  1. 1766537455152.png

    I know I'm a couple of days early, but I'm going to be too busy on the actual holiday to post this, so...here you go!

    One of the fairly frequent requests I've seen that - as far as I know - has never really been addressed is the ability to easily manipulate items in MZ. Because the engine doesn't support this by default, everything in this plugin requires the Independent Items plugin by @Dungeonmind.

    I'm aware that various options exist to port Yanfly's Item Core into MZ, but as that is not a native solution, this plugin is not compatible with it.

    So, without further ado, I present:

    Item Suite 1.7
    ATT_Turan

    Introduction
    This plugin has a number of features to give the dev/player new ways to work with and manipulate items in their game.

    All of the functionality has been designed to be modular, so it should be easy to pick and choose which features you want to integrate into your project.

    I have tested the basic functionality, please let me know if you encounter any errors. I will consider making compatibility patches if the other plugin is free to use and unobfuscated. Otherwise, other authors are free to modify this code to make it compatible with theirs so long as I am still credited.


    Features

    Due to the number of features, they've been broken down into their own sections:

    Parameter Randomizing
    Enabling this will cause weapons and armors to have their parameter bonuses randomized when they're created, so that - for example - three longswords will have different stats from each other.
    The plugin parameters control how much the parameters can vary and whether to make that variance be a numeric range or a percentage of the values defined in the database entries.

    Item Slots
    1766538427809.png

    This allows you to have slots in your weapon and armor which you can place other items into, upgrading their parameters or traits. I've not tested it, but the slotted items are considered to be equipped so they should also work with VisuStella passive states.
    A variety of plugin parameters and notetags are provided to customize how slots are generated on items, what can be placed into them, and whether they can be removed or replaced. All upgrades to be placed into slots are defined as Armor in the database.
    One important point is that slots are "generic" unless manually defined otherwise. A generic slot can have any kind of upgrade slotted into it unless notetags are used to say otherwise. Notetags can be used to make slots that are not generic but rather of a specific type, which then can only have upgrades of the appropriate type placed into them.

    Weapon and Armor notetags:

    Code:
    <no generics>

    This prevents the item from having any of the generic slots as defined in the Armor Slots or Weapon Slots plugin parameter.
    Code:
    <slots: number>

    This will force the item to always have this number of generic slots. This is in addition to any defined in the Armor Slots or Weapon Slots plugin parameters, unless you also use the <no generics> notetag.
    Example: <slots: 5>

    Code:
    <slot type: type>

    This adds a slot which can only be filled with a slottable item that has a matching slot type notetag. You may have multiple tags of these on an item, with the same or different types.
    Example: <slot type: Pommel>

    Armor notetags:
    Code:
    <slottable>

    Denotes this item as one that can be put into slots. You usually want this to have an item type that can't be equipped by any characters.
    Code:
    <not generic>

    Used in combination with <slottable>, this prevents the item from being placed into generic slots. This means it must use the slot type notetag to be usable.

    Code:
    <slot type: type>

    Used in combination with <slottable>, this allows the item to be placed into slots also labeled with that type. Note that it can also be placed into any generic slots unless it has the <not generic> notetag.
    Example: <slot type: Pommel>

    Durability
    1766539115141.png

    Weapons and armor with durability will wear out as they're used. Every time a non-magic skill with the type Physical Hit does damage, the weapon will lose a point of durability (if the actor is dual-wielding, both weapons will lose it).

    Similarly, each time an actor is damaged by a non-magic skill of type Physical Hit, all of their equipped armor will lose a point of durability.
    Plugin parameters determine what happens when durability runs out, whether it destroys the item or removes it to inventory so it can still be repaired.
    An interface has been added to the Shop menu for spending gold to repair weapons and armor.

    1766539453024.png

    Weapon and Armor notetags:

    Code:
    <durability: value>

    This will force the item to spawn with the specified durability. It bypasses* any durability and variance specified in the plugin parameters. Note that a durability of 0 makes the item indestructible.

    Example: <durability: 50>

    Code:
    actor.loseDurability("type", value)
    actor.loseDurability(slot number, value)

    This causes the referenced actor to lose the value amount of durability from all equipped items of the specified type (weapon or armor).

    Example: $gameParty.members()[1].loseDurability("weapons", 5)

    If a number is provided, the durability will be lost only by the specific equipment in that equipment slot (if any is equipped).

    Example: b.loseDurability(3, 2);

    -----------------------------------------------------------------------------

    Code:
    item.durability
    item.maxDurability

    You can use this to reference the current or maximum durability of the item equipped in the specified slot.
    Examples from default MZ setup:

    Code:
    $gameParty.members()[1].equips[0].durability
    - durability of party member 2's weapon

    Code:
    $gameActors.actor(4).equips[2].maxDurability
    - maximum durability of actor ID 4's head armor

    Disassembly
    1766540304314.png

    This allows the player to disassemble items, weapons, and armor. The item disassembled will be removed from the party's inventory and they will receive a predetermined list of components in exchange.

    The component items are defined as a list in a notetag, and a plugin command is provided to call the disassembly scene in an event.

    OpenDisassemble

    This opens the scene for the player to see their currently owned items that can be disassembled and what components they will gain from it. Only items in the party inventory are listed.

    Item, Weapons, and Armor notetags:
    Code:
    <disassemble>
    id:quantity
    id:quantity
    </disassemble>

    This defines the items you receive when disassembling the item. You may list as many as you like (although display space in the included disassembly scene is limited to the height of your game window). The id is the ID from the Items tab of the database, and the quantity is how many the party will gain.
    Example:
    Code:
    <disassemble>
    3:4
    2:1
    14:6
    </disassemble>

    Code:
    <On Disassemble Eval>
    code
    </On Disassemble Eval>

    The enclosed code will be run when this item is disassembled. The item variable refers to the item being disassembled. This is executed before the item is removed from inventory.

    Uses
    1766541078685.png

    This allows a single consumable item to have a number of uses. One example would be the Suikoden games, where potions can be used 6 times before the item is removed from inventory.

    Item notetags:
    Code:
    <uses: x>

    Allow a consumable item to be used x times before it is consumed and removed from inventory.
    Code:
    <On Consume Eval>
    code
    </On Consume Eval>

    The code in this notetag is executed when a consumable item is used and consumed from inventory. If the item has multiple uses, per the notetag above, this notetag is only evaluated when it reaches 0 uses and is consumed.

    The item variable refers to the item being used. This is executed before the item is removed from inventory.

    Code:
    item.uses
    item.maxUses

    You can use this to reference the current or maximum uses of a consumable item.

    Example: $gameParty.items()[0].uses

    On Gain Eval
    Item, Weapon, and Armor notetag:

    Code:
    <On Gain Eval>
    code
    </On Gain Eval>

    Executes the contained code each time the item is gained by the party.

    The item variable refers to the item being gained.

    Terms and Credits
    Free for non-commercial and commercial use. Credit ATT_Turan.
  2. Not every hero wears a cape, but I like to believe Turan does.
  3. TheAM-Dol said:
    Not every hero wears a cape, but I like to believe Turan does.
    1766542872163.png
  4. This is awesome thank you!
  5. I really like that idea of giving potions, scrolls, etc. a set number of servings. Thank you, @ATT_Turan and Merry Christmas.
  6. This is actually insane, thank you so much!
  7. are you sure it isn't "Turan Suite"?

    Keep up the good work =)
  8. I'm having difficulties getting Slots to work. I have a weapon with the tag <slot type: Attack Sigil> and it shows correctly on the Slots screen. However the troublesome thing is setting an item to put in the slot. To my undestanding I need to put in an Armor-type object the following tags: <slottable>, <not generic>, and <slot type: Attack Sigil>. Despite doing that it doesn't show on the Slots screen when I select the slot to fill.
    Any help would be greatly appreciated.
  9. Kaimi said:
    undestanding I need to put in an Armor-type object the following tags: <slottable>, <not generic>, and <slot type: Attack Sigil>. Despite doing that it doesn't show on the Slots screen when I select the slot to fill.
    To be clear, you don't have to put the not generic tag, but it shouldn't affect it either way.

    I suspect it comes from having a space between the colon and the word "Attack" - if you take that out, it'll work fine.
    Code:
    <slot type:Attack Sigil>
    I'll add trimming to a future update so that won't matter.

    Edit: it was such a quick fix I stuck it in now. Version 1.1 in the original post will work with your current notetags.
  10. Hi @ATT_Turan ! Thanks for these. Any idea what I might be doing wrong? I can't get any items to show slots? Maybe there's some conflict with another plugin, but everything shows "No Slots" whether I attempt to force slots through a notetag or put them via the plugin parameters.

    1768538086644.png

    1768538102974.png
  11. orgint said:
    Any idea what I might be doing wrong?
    Do you, in fact, have DungeonMind's plugin installed also to make them independent? Your screenshots look correct.

    orgint said:
    Maybe there's some conflict with another plugin
    Have you tested by turning off all other plugins?
  12. ATT_Turan said:
    Do you, in fact, have DungeonMind's plugin installed also to make them independent? Your screenshots look correct.


    Have you tested by turning off all other plugins?
    Hi! Yes, I have DM's plugin installed. I tested with all other plugins off and I still cannot get it to show that the "Socket Hood" has any slots.

    1768586353394.png
  13. orgint said:
    Hi! Yes, I have DM's plugin installed. I tested with all other plugins off and I still cannot get it to show that the "Socket Hood" has any slots.
    Can you duplicate it in a new project? I can't.

    If you're saying this happens in your existing project with no other plugins active - and you started a new game after disabling other plugins - I'll take a look at it if you want to zip it up and send it to me. Otherwise, I can't think of any other general troubleshooting steps.
  14. Hi! Must be something I'm doing wrong. As it was the exact same problem in new project:

    1768675691061.png

    Only two plugins are DM_IndependentItems and TUR_ItemSuite

    I'm on corescript v 1.9.0 not sure if that makes a difference!
  15. orgint said:
    I'm on corescript v 1.9.0 not sure if that makes a difference!
    No, that's the version I developed the plugin on.

    Zip up a project that demonstrates the issue and send me a download link. In my test project, it works fine on weapons and armor, using the plugin parameter and the notetag.

    Your screenshot did make me aware of a bug, though, wherein you can select an item on the slots screen that has no slots. I'll fix that up.
  16. I've uploaded version 1.3, which fixes the bug @orgint found with selecting items with the mouse (in both the socket and disassemble scenes).
  17. Hi @ATT_Turan -- I have no idea what might have done it, but version 1.3 works for me at the moment. I now see slots in slotable items, and can place something in it!

    This might be a stupid question, but if we have "remove slots" enabled in settings, how do we actually go about removing the item in the slot? I don't seem to be able to remove anything.
  18. orgint said:
    This might be a stupid question, but if we have "remove slots" enabled in settings, how do we actually go about removing the item in the slot? I don't seem to be able to remove anything.
    In my test project, it works the same way as removing equipment from an actor.

    In the Slots scene, select the item, then select the slot that has something in it, and you'll get the list of items to go in that slot. Choose an empty section and select it.
  19. Version 1.4 improves some UI functionality in the various windows of the Slots scene.
  20. Updated with a small fix.