Concepts

Game Integration

Integrating the inventory with your game logic.

The whole point of an inventory system managing items is so that those items can be used. Of course, what "using an item" means is very specific to your game.

Using Items

The GGInventory component provides an item_use_requested signal, which is emitted when the player attempts to use an item. It is then up to your game to decide what should happen.

A potion may be consumed, a weapon may be equipped, a note may be read, while a quest item may be inspected. The demo project includes examples that show how to use items for different purposes.

Dropping Items

When a player drops an item from the inventory, it'll emit the items_dropped signal. Your game should handle this, so the dropped items don't just vanish.

Character/Object Interaction

When a character interacts with another entity to open its inventory, the interactable's GGInteractable2DStrategyInventory tells the GGInventorySystem" to make it happen. The Inventory System's Dialog Strategy handles permission checks and displaying the inventory screens.

GGInteractable2D
GGInteractable2D
Storage Box Scene
(StaticBody2D)
Storage Box Scene...
GGInventory
(Node)
GGInventory...
GGInteractor2D
GGInteractor2D
"use" action
"use" action
Player Scene
(CharacterBody2D)
Player Scene...
manipulate
manipulate
GGInventory
(Node)
GGInventory...
interacts with
interacts with
open_context()
open_context()
show inventory screen
show inventory screen
GGInventorySystem
(Singleton/Autoload)
GGInventorySystem...
open_transfer()
open_transfer()
GGInventoryTransferUI
(Control)
GGInventoryTransferUI...
context_opened signal
context_opened signal
context_opened signal
context_opened signal
GGEntityAccessManager
(Node)
GGEntityAccessManager...
GGEntityAccessManager
(Node)
GGEntityAccessManager...

© 2023 — 2025 GodotBuilder. All rights reserved.