Casper Gaming Developer Corner
Casper Gaming Developer Corner

Documentation

Back to Plugin


Quick InfoVersion: Alpha R4
Made for RPG Maker MZ 1.9.0

The BasicsThis plugin works by assigning an id to an inventory upon creation, and then swapping the currently active inventory around to various inventory ids. The default inventory will have the id "default" and this can never be deleted, so it will always exist.

In general, the basic flow is to create a new inventory object via the Create Inventory plugin command. After it has been created, you can then switch to using this new inventory via the Switch Inventory plugin command.

Items, weapons, and armors received prior will not be part of this new inventory, instead they will be saved to the previously active inventory. When you receive new items, they will go to the current active inventory.

When done using the new inventory, you can switch back to the default inventory and use the Combine Inventory plugin command to add the items from your new inventory back to the default inventory. Then, use the Remove Inventory plugin command to delete the now-unused multi-inventory.

Note that combining an inventory into the currently active inventory will not remove the items from the inventory, it only adds them to the current inventory. If you also want to clear the old inventory if it might be used again later, you can delete it and then re-create it.

You cannot delete a currently active inventory or the default inventory.

When an inventory is active, the game will function as you would expect if that was your inventory. Checking if an item/weapon/armor exists, the amount of an item, etc. will go only by the active inventory.

Plugin CommandsThis plugin supports the following plugin commands:
Create Inventory - Creates a new multi-inventory object

Remove Inventory - Removes a multi-inventory object

Switch Inventory - Switches the current active inventory to a different inventory

Combine Inventory - Adds the items, weapons, and armors from a multi-inventory to the current active inventory.

Clear Inventory - Removes the items, weapons, armors from an inventory but does not remove the inventory itself

Does Inventory Exist - Check if a given inventory currently exists, stores result in a switch

Get Current Inventory - Store the id of the current inventory in a variable. This will be a string, not a number.

Has Item - Check if any (or specific) inventory has an item in it

Num Items - Check quantity of item in inventory (or all inventories)

View Inventory - View (view only) any inventory in the item scene

Call Collect Scene - Collect items from one inventory into the player's current inventory.

Saved GamesThis plugin is fully compatible with saved games. This means you can:

✓ Add this plugin to a saved game and it will work as expected.
✓ Change any plugin params and changes will be reflected in saved games.
✓ Remove the plugin with no issue to save data.

Filename

The filename for this plugin MUST remain CGMZ_MultipleInventories.js. This is what it comes as when downloaded. The filename is used to load parameters and execute plugin commands. If you change it, things will begin behaving incorrectly and your game will probably crash. Please do not rename the js file.


Known Issues

This plugin currently has no known issues that need to be fixed. If you believe you have encountered a bug, please report it to Casper Gaming.


Compatibility

This plugin currently has no known compatibility issues with other RMMZ plugins. If you believe you have encountered a conflict, please report it to Casper Gaming.


Version HistoryVersion AlphaR2
  • Added plugin command to check if item/wep/armor exists in any inventory
  • Added plugin command to get the total number of items/weapons/armors from an inventory
  • Added plugin command to clear an inventory
  • Added plugin command to check if an inventory exists
  • Added plugin command to get the currently active inventory
Version AlphaR3
  • Added view only scene for any inventory
  • Added plugin command to view any inventory
Version AlphaR4
  • Added a collect item scene and supporting options
  • Added default preset multiple inventories

Back to Plugin