thedivergentai/godot-inventory-system
Expert blueprint for inventory systems (Diablo, Resident Evil, Minecraft) covering slot-based containers, stacking logic, weight limits, equipment systems, and drag-drop UI. Use when building RPG inventories, survival item management, or loot systems. Keywords inventory, slot, stack, equipment, crafting, item, Resource, drag-drop.
npx skills add https://github.com/thedivergentai/GD-Agentic-Skills --skill godot-inventory-system
Resource-first slots, stacking, weight, equipment, and loot — scripts are source of truth (no duplicated Inventory/Equipment/Crafting dumps in this body).
| Scenario | Open |
|---|---|
| Slot bag (WoW-style stacks) | inventory_data_resource.gd + item_slot_data.gd + inventory_ui_controller.gd |
| Tetris grid (Diablo/RE footprint) | grid_inventory_logic.gd / inventory_grid.gd |
| Equipment | Item Resources + RPG stats complement; drag via drag_and_drop_slot.gd |
| Loot table | loot_table_resource.gd + item_pickup_node.gd |
| Persist | inventory_persistence.gd (ids + amounts, not nested Resources) |
| Consumables | consumable_item_logic.gd |
| DB lookup | item_database_loader.gd |
Item extends Resource.float for quantities — int stacks.inventory_updated after the loop.queue_free + recreate all slots every refresh — reuse slot widgets (see UI controller)._process.duplicate(true) on stack/slot instances so one pickup cannot corrupt every copy of that .tres..icon on a null slot item — guard with is_instance_valid() before drawing UI.inventory_updateditem_id / resource_path + amount only — inventory_persistence.gd| Topic | Reference / script |
|-------|-------------------|
| Resource item model | core-architecture.md + inventory_item_resource.gd |
| Two-pass stack add | inventory-manager.md + inventory_data_resource.gd |
| Tetris grid footprint | elite-technical-patterns.md + grid_inventory_logic.gd |
| Equipment & crafting | equipment-system.md / crafting-integration.md |
| Reactive UI & save ids | ui-integration.md + inventory_persistence.gd |
> Progressive disclosure: open Official Documentation links only when researching a specific API; load Related Skills when routing to a peer domain — do not preload the whole lattice.
Resource data (not Nodes) so stacks stay lightweight and shareable as .tres databases.duplicate(true) for runtime stack/slot instances so mutating quantity never corrupts the shared item blueprint.@export / @export_group power Inspector-authored ids, icons, max_stack, weight, and loot weights on item Resources.inventory_changed / slot signals so UI reflects data; never let slot widgets mutate arrays silently.GridContainer / container sizing is the baseline for slot grids before custom Tetris footprints._get_drag_data / _can_drop_data / _drop_data and set_drag_preview implement inventory drag-swap without a custom input stack.Controls that draw icons/counts and participate in drag-and-drop.resource_path / id at load time instead of embedding textures in every save blob.path/id + amount) for FileAccess save files without bloating nested Resource graphs.randf() sprinkled in UI code.inventory_updated / slot signals keep reactive UI in sync without per-item spam or ghost connections.has_item and grant rewards through the same inventory add/remove APIs.Take thedivergentai/godot-inventory-system from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.