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.
== Terms of Use ==
- Free for use in non-commercial projects with credits
- Free for use in commercial projects, but it would be nice to let me know
- Please provide credits to HimeWorks
== Change Log ==
1.0 - Mar 28, 2016
- initial release
== Usage ==
-- Multiple Inventories --
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
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.
== For Developers ==
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
Game_Inventory
Game_Inventories
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.