Godot Awesome Inventory
A downloadable Addon
Awesome Inventory System
This is a simple and extensible framework for handling items and storage in Godot 4.3. It probably works in 4.2 and 4.1 too but I haven't tested.
There are four major classes, all of them extending Resource:
1. Inventory
2. InventoryItemType: defines a kind of item
3. InventoryItem: defines a "real" item that exists in the game. References a InventoryItemType.
4. InventorySlot: defines a slot in the inventory. Can hold 1 item, or can hold mulitple items of the same type if that type is stackable.
It may seem overkill at first glance, but it's more flexible this way.
One constraint as you may notice is that *all* items are real objects. I.E, there's no "stack" counter that virtually signify an amount of some item.
It's just easier this way.
Usage
Given, for example a Player class, simply add:
@export var inventory:Inventory
and in the inspector, create a new Inventory resource, set its capacity and optionally initial items to populate the inventory with.
You can create a directory containing all your item types by creating InventoryItemType resources.
Status | Released |
Category | Assets |
Rating | Rated 5.0 out of 5 stars (1 total ratings) |
Author | Pelatho |
Genre | Role Playing |
Tags | Godot, inventory, item-management |
Download
Click download now to get access to the following files:
Development log
- Version 1.1: Bugfixes56 days ago
Comments
Log in with itch.io to leave a comment.
Looks awesome!
I think 4.2 and 4.1 should work fine cause they dont have big different in code, unless you dont use new feature of 4.3 like @export_custom and @export_default
I don't use those features :)