A universal inventory system for the Godot game engine (version 4.4 and newer).
Features
Inventory Item Class
The InventoryItem class represents an item stack. All item stacks have a default stack size (and maximum stack size) of 1. Items can also have other properties that are based on item prototypes from a prototype tree.
Item Prototypes and Prototrees
Prototypes define common properties for inventory items and items based on a prototype have the same properties as the prototype. They can also override some of those properties or define completely new ones that are not present in the prototype.
Prototypes can inherit other prototypes, forming a tree-like structure, i.e. a Prototree. Prototrees are defined in JSON format and are stored as a JSON resource.
Inventory Class
The Inventory class represents a basic inventory with basic inventory operations (adding, removing, transferring items etc.) and can be configured by adding various inventory constraints.
Inventory Constraints
GridConstraint- Limits the inventory to a 2d grid of a given width and height.WeightConstraint- Limits the inventory to a given weight capacity (the default unit weight of an item is 1).ItemCountConstraint- Limits the inventory to a given item count.
Item Slots
The ItemSlot class represents an item slot that can hold one inventory item.
UI Controls
User interfaces are usually unique for each project, but it often helps to have some basic UI elements ready for earlier development phases and testing. The following controls offer some basic interaction with various inventories:
CtrlInventory- Control node for displaying inventories as anItemList.CtrlInventoryCapacity- Control node for displaying inventory capacity as a progress bar (in case aWeightConstraintor anItemCountConstraintis attached to the inventory).CtrlInventoryGrid- Control node for displaying inventories with aGridConstrainton a 2d grid.CtrlItemSlot- A control node representing an inventory slot (ItemSlot).
More Information
Visit the GitHub page for more information.
Changelog for version v3.0.1
No changelog provided for this version.