As Ravenith suggested, here’s the Item Charges script! What does it do? Well, simply assign a number of charges to consumable items. They will only be really consumed once all their charges are used up. If I recall correctly, this feature existed in RM2k3 so I guess I could have put it within the RM2k3 Goodness release, if I hadn’t forgotten at that time.
The ever-so-glorious notetags are used once again to determine the maximum number of charges. Just put <item_charges: x> into them. Don’t forget: it only works for normal items. Not weapons. Not armors. Not your mom. At least I don’t think so.
Secondly, in the config module, you can change the color of the text used to display charges. Look out for this:
CHARGES_DISPLAY_COLOR = Color.new(40, 255, 120, 255)
And alter it however you want. The format is Color.new(red, green, blue, alpha).
DISABLE_CHARGE_TEXT = false
This will allow you to turn on or off the text to display the charges amount.
MAX_ITEMS = 99
And this is for setting a maximum amount of items (normal method, not with unique items).
If you are using Actor Inventory, things are gonna get real now.
Due to how the Actor Inventory script works, it is very possible to use charges from two different copies of a same item! Which is impossible with the normal way RPG Maker handles item possession. Look at this screen:
As you can see, one of the Thunder Fûda has 3 charges and the other only 2. Normally, if you were to use one, the other would also lose one charge. So, how to do it? That’s simple. Use the config module!
DISABLE_ITEM_STACKING = false
This line. Set it to true. And items with charges will never stack with each other and be treated as completely different items. And this causes several problems:
- If you modify the item database, your save file will never notice the changes. You will have to start a new game.
- Scripts using the item ID will most likely be very confused. For instance, try to assign charges on a Grathnode and Install it: oh boy, this will be weird.
- The Remove Item event command will not work on those items. They can still be sold though.
Unfortunately, as for now, I’m not really sure of how I can fix them. If I find out these will be the first issues to be addressed.