Item Metadata / Modifiers

Hey folks,

I'm implementing a system for item quality in my game (much like Stardew Valley). I've achieved this by having a copy of each item in the database for each quality of item with their own different sell prices, and everything in-game that checks for say, wheat, will check for any of the 4 quality versions. This includes crafting recipes using CGMZ Crafting, which allows for "generic" material groups to be set up, so I have one for each crop, fish, etc.

As you can imagine, this is pretty time consuming to set up, and every new item I add means a lot of work (not to mention, it fills up the item database pretty fast).

The next system I am adding will be a "preserving" system, again like Stardew Valley. Players put an item into the preserving device, wait X days, and then get some preserves out, which will have a sell value which is double the sell price of whatever they put into it.

With each item having 4 different quality levels, that means that if there are, say, 20 items that can be preserved, I need to set up 80 "Preserves" items to account for every item type and quality level.

This is do-able, but obviously not ideal (especially if I need to check for the "preserves" item, which would mean checking 80 different possible items.

This got me thinking.... item metadata? Is it even possible in RPG Maker?

I'd love some ability to say, use a "give item" command but with a modifier, so the item given has some kind of metadata that makes it unique (such as +100% sell price). Only items with the same metadata could stack, and all that. I know this is a standard feature of most modern games, so I was wondering if there was some way to do it in RPG Maker (either with a plugin or not).

I am also open to any better approaches for setting something like this up!

(Also, I know that VisuStella has an item inheritance plugin, but it really doesn't do anything helpful. I would still have to do the same amount of work to use that plugin (set up 80 items, configure them all, check for them all).)
I know there is pre-fixes/suffixes in MV for weapons/armor that needs
all modifiers as armor/weapon I think, and set the meta data for a chance.

while this works, I believe something similar could be built for items alone,
but I have no idea how, but it's doable.

the cons however that may raise is that crafting wont work if it gives an different
id, than in the database, so the plugin also have to be altered or a mod made for it.

as there are con's and pro's, would it be worth it?
This got me thinking.... item metadata? Is it even possible in RPG Maker?
Yes, but the easiest way I can think of going about everything you want to do would require an independent items plugin. independent item plugin options are limited for mz though.

Yanfly's item core for mv does it and is free, but would need fossil and might not work well with VS plugins. I know there's a couple plugin options for adding independent items to mz made for mz, but like the previous option, no idea how VS will interact with them
In order to approach anything like this, you'd have to use a plugin for independent items. By default, any item information is not actually stored in the game on the item; it's stored in the database where you entered it in the editor, then that's referenced every time you look at the item in-game.

So it's impossible to change one item without changing all instances of it.

Dungeonmind made an Independent Items plugin for MZ, so that would allow you to change just one item to, say, have a higher price. However, I don't think I know of any further plugins that take advantage of it, so you'd either need to figure out how to code your own system for what you're talking about, or commission someone for it.
Thanks for the replies, folks!

The independent item route doesn't seem too helpful tbh, as it only tackles a small part of the problem. The real issue seems to be making items that are not just independent, but that have some kind of modifier.

I think I probably will go the route of just making, say, 80 unique items for a preserves item. It's a little clunky, but once it's set up it won't be too hard to add to I suppose.
The real issue seems to be making items that are not just independent, but that have some kind of modifier.
The modifier in that case could be a property of the individual item. and then other properties like price could then be altered based on that modifier property.

What youre trying to do sounds like it would ideally be done with independent items, but as said before - It'll require someone to write out more of the system past the items being independent, and you'll likely need edits to your current plugins to support them
The independent item route doesn't seem too helpful tbh, as it only tackles a small part of the problem. The real issue seems to be making items that are not just independent, but that have some kind of modifier.
That...is the whole point of independent items. As I explained in my previous post, if you aren't using a plugin to make items independent you can't give them any kind of modifier.

Changing something on an item is easy.

Make an event that gives you a weapon in your party inventory (or just unequip one of your actors).

Press F8 in a playtest, go to the Console tab, and paste in
Code:
$gameParty.weapons()[0].price *= 2;

Go check that weapon in the store - you just doubled its price. Piece of lemon meringue pie.

Modifying items is simple, you can use events or a plugin or whatever to execute commands like that. The problem, as I said before, is that changing one changes them all.

But whatever works for you does.

Original thread: https://forums.rpgmakerweb.com/threads/item-metadata-modifiers.169809/