How expressobits/inventory-system works
Expresso Inventory System is a Godot C++ plugin providing reusable inventory, item, crafting, loot, and editor tooling. A typical gameplay flow stores item stacks in an inventory, optionally applies constraints or grid placement, and exposes supporting hotbar, loot-generation, and crafting capabilities. The editor plugin manages database resources for items, categories, recipes, stations, and loot. Relationships below are limited to README statements and SOURCE INDEX references; unsampled implementations are represented by their known source paths without inferred call chains.
Main entry points: inventory_database.h Inventory database · inventory.h Inventory · craft_station.h Craft station · node_inventories.h Node inventories
Components 22
Item resources
- Item definitions
src/base/item_definition.h - Item categories
src/base/item_category.h - Item stacks
src/base/item_stack.h - Recipes
src/base/recipe.h - Station types
src/base/craft_station_type.h - Loot resources
src/base/loot.h - Inventory database
src/base/inventory_database.h
Inventory runtime
- Inventory
src/core/inventory.h - Inventory constraints
src/constraints/inventory_constraint.h - Grid inventory
src/core/grid_inventory.h - Grid constraints
src/constraints/grid_inventory_constraint.h - Grid spatial index
src/core/quad_tree.h - Node inventories
src/base/node_inventories.h
Gameplay systems
- Hotbar
src/core/hotbar.h - Loot generator
src/core/loot_generator.h - Craft station
src/craft/craft_station.h
Database editor
- Inventory editor
src/editor/inventory_editor_plugin.cpp - Item editor
src/editor/item_definition_editor.cpp - Recipe editor
src/editor/recipe_editor.cpp - Loot item editor
src/editor/loot_item_editor.cpp - Stack selector
src/editor/item_stack_selector.h
Other components
- Game logic
Connections 31
- Game logic → Inventory: manages items
- Inventory → Item stacks: stores stacks
src/core/inventory.h - Inventory → Inventory constraints: checks rules
src/core/inventory.h - Grid inventory → Inventory: extends
src/core/grid_inventory.h - Grid inventory → Grid spatial index: indexes spaces
src/core/grid_inventory.h - Grid inventory → Grid constraints: checks placement
src/core/grid_inventory.h - Node inventories → Inventory database: references
src/base/node_inventories.h - Node inventories → Item definitions: references
src/base/node_inventories.h - Hotbar → Inventory: uses inventory
src/core/hotbar.h - Hotbar → Node inventories: uses node inventories
src/core/hotbar.h - Inventory database → Item definitions: catalogs
src/base/inventory_database.h - Inventory database → Item categories: catalogs
src/base/inventory_database.h - Inventory database → Recipes: catalogs
src/base/inventory_database.h - Inventory database → Station types: catalogs
src/base/inventory_database.h - Inventory database → Loot resources: catalogs
src/base/inventory_database.h - Recipes → Station types: identifies station
src/base/recipe.h - Recipes → Item stacks: uses stacks
src/base/recipe.h - Loot resources → Loot item editor: edited by
- Craft station → Station types: uses type
src/craft/craft_station.h - Craft station → Inventory database: uses database
src/craft/craft_station.h - Craft station → Node inventories: inherits
src/craft/craft_station.h - Craft station → Inventory: uses inventories
src/craft/craft_station.h - Inventory editor → Inventory database: manages
src/editor/inventory_editor_plugin.cpp - Inventory editor → Recipe editor: opens editor
src/editor/inventory_editor_plugin.cpp - Inventory editor → Item editor: opens editor
src/editor/inventory_editor_plugin.cpp - Item editor → Inventory database: edits resources
src/editor/item_definition_editor.cpp - Item editor → Stack selector: uses selector
src/editor/item_definition_editor.cpp - Recipe editor → Inventory database: edits resources
src/editor/recipe_editor.cpp - Recipe editor → Stack selector: uses selector
src/editor/recipe_editor.cpp - Loot item editor → Inventory database: edits loot
src/editor/loot_item_editor.cpp - Loot item editor → Stack selector: uses selector
src/editor/loot_item_editor.cpp