This plugin provides a standard way to manage inventories of items and gold.
It offers multiple inventories so that the party for example can have multiple inventories, which can be swapped depending on your needs.
A new “Inventory” object is available for plugin developers, which allows you to easily provide inventory support for any object that you like.
Additional inventory functionality will be added over-time as they are developed.
Plugin: download here (right-click, save-as)
You will also need this bug fix: Orange Circular Json. Required to address a problem where you can’t save your game.
- Feldherren Inventory Value – calculates the total value (price) of all items in the inventory and stores them in variables.
Download ths plugin and place it in the “plugins” folder in your project’s “js” folder. Then open your Plugin Manager (F10), double-click an empty row, and select the HIME_InventoryCore plugin.
Once it is in your list of plugins, turn the plugin on.
This plugin offers you the ability to manage multiple inventories.
The party, for example, can have multiple inventories.
To create an inventory, use the script call
$gameParty.createInventory( ID )
Where the ID is a name that you will use to reference the inventory throughout the game. For example, you can say things like
$gameParty.createInventory( "Main Inventory" ) $gameParty.createInventory( 1 )
To switch inventories, use the script call
$gameParty.switchInventory( ID )
Assuming the inventory is already created, the party will use the specified inventory as the default inventory. For example, assuming you have a second inventory called “sub”, you could switch to that inventory using
$gameParty.switchInventory( "sub" )
To merge inventories, use the script call
$gameParty.mergeInventory( ID1, ID2 )
This will merge inventory 1 into inventory 2, and delete inventory 1.
Inventory 2 will be set as the default inventory.
The default inventory implementation for parties is no good. The inventory should be abstracted into its own class and an instance of it held by the party. The purpose of this plugin is to provide such an abstraction so that it is easier to work with inventories.
The two objects that you will be interested in are
The Game_Inventory object holds all of the usable items, weapons, armors, and gold. It has the same interface as the party; you can take a look at the methods provided.
The Game_Inventories object is a container that’s used to manage multiple inventories. Any object that can have support for multiple inventories should use this to work with individual inventory objects.
For backwards compatibility, all of the methods that were originally in Game_Party have been replaced with calls to its “current” inventory, which is defined to be the inventory that all items/gold will be sent to. The current inventory may be switched at anytime using script calls.