X Tutup

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
20,732
Reaction score
20,710
First Language
English
Primarily Uses
RMMV
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.5
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:

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.

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>

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

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.

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

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.
 

Attachments

  • TUR_ItemSuite.js
    47.2 KB · Views: 19
Last edited:

TheAM-Dol

The Loud Ignorant
Regular
Joined
Feb 26, 2022
Messages
2,648
Reaction score
5,968
First Language
English
Primarily Uses
RMMV
Not every hero wears a cape, but I like to believe Turan does.
 

jimmyshmo

Regular
Regular
Joined
Feb 14, 2024
Messages
78
Reaction score
15
First Language
English
Primarily Uses
RMMZ
This is awesome thank you!
 

ShadowDragon

Realist
Regular
Joined
Oct 8, 2018
Messages
11,982
Reaction score
5,546
First Language
Dutch
Primarily Uses
RMMV
are you sure it isn't "Turan Suite"?

Keep up the good work =)
 

Kaimi

Regular
Regular
Joined
Aug 18, 2012
Messages
104
Reaction score
98
First Language
Polish
Primarily Uses
RMMZ
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.
 

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
20,732
Reaction score
20,710
First Language
English
Primarily Uses
RMMV
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.
 

orgint

Regular
Regular
Joined
Jul 3, 2016
Messages
49
Reaction score
10
First Language
English
Primarily Uses
RMMZ
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
 

orgint

Regular
Regular
Joined
Jul 3, 2016
Messages
49
Reaction score
10
First Language
English
Primarily Uses
RMMZ
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
 

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
20,732
Reaction score
20,710
First Language
English
Primarily Uses
RMMV
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.
 

orgint

Regular
Regular
Joined
Jul 3, 2016
Messages
49
Reaction score
10
First Language
English
Primarily Uses
RMMZ
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!
 
Last edited:

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
20,732
Reaction score
20,710
First Language
English
Primarily Uses
RMMV
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.
 
Last edited:

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
20,732
Reaction score
20,710
First Language
English
Primarily Uses
RMMV
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).
 

orgint

Regular
Regular
Joined
Jul 3, 2016
Messages
49
Reaction score
10
First Language
English
Primarily Uses
RMMZ
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.
 

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
20,732
Reaction score
20,710
First Language
English
Primarily Uses
RMMV
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.
 

Latest Threads

Latest Profile Posts

Twitch stream is live with Resident Evil 9! Feel free to drop by!
1000207302.png
All of the skill/system icons: Done
Pepper hopped up on my bed to snuggle earlier... and now there's grains of kitty litter all over the foot of my bed. Now she's in her own bed fast asleep. Sometimes, I like to wonder what Pepper dreams about... does she dream of chasing her toys? Pouncing on the lizards she sees on her patio? Purring in a sunny window? Receiving pets and scritchies?
Oh no... she's back in my bed.
Really interesting seeing the public be so okay with the placeholder art in Slay the Spire 2. I guess they trust in the potential of the final product, but it would be cool if the general consumer had a better understanding of dev pipelines.
Haven't updated my status in awhile. I'm taking a short break from working on my game because I have a sliiiight burnout,,

Forum statistics

Threads
154,253
Messages
1,407,562
Members
209,652
Latest member
SoapH
Top
X Tutup