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:
Spoiler: 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.
Spoiler: Item Slots

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.
Spoiler: Notetags
Weapon and Armor notetags:
Code:
This prevents the item from having any of the generic slots as defined in the Armor Slots or Weapon Slots plugin parameter.
Code:
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:
Code:
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:
Armor notetags:
Code:
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:
Used in combination with, this prevents the item from being placed into generic slots. This means it must use the slot type notetag to be usable.
Code:
Used in combination with, 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 thenotetag.
Example:
Spoiler: Durability
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.

Spoiler: Notetags
Weapon and Armor notetags:
Code:
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:Spoiler: Script Calls[quote] 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:
-----------------------------------------------------------------------------
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
[/quote]
Spoiler: Disassembly
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.
Spoiler: Plugin Command
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.
Spoiler: Notetags[quote]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.
[/quote]
Spoiler: Uses
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.
Spoiler: Notetags
Item notetags:
Code:
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.
Thevariable refers to the item being used. This is executed before the item is removed from inventory.
Spoiler: Script Calls[quote] Code:
You can use this to reference the current or maximum uses of a consumable item.
Example:- $gameParty.items()[0].uses
复制代码
[/quote]
Spoiler: 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.
Thevariable refers to the item being gained.
Terms and Credits
Free for non-commercial and commercial use. Credit ATT_Turan.
本贴来自国际rpgmaker官方论坛作者:ATT_Turan处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:
https://forums.rpgmakerweb.com/threads/item-suite.181588/