Guide
Changelog v1.x
Changelog and release notes for the inventory system.
Version 1.18.2
Added the "Why Godot Engine", "New Developer Roadmap", and "Goals" chapters.
Version 1.18.1
A small update to the PDF architecture guide.
Version 1.18
This version adds multiplayer-compatible crafting placing structures.
Features
- Implements multiplayer crafting with crafting user interface for SDI Game UI.
- Adds placing items as structures into the game world.
Bug Fixes
- crafting status ui correctly displays item #134 (ff3b680)
- crafting status ui type hints (cf52be4)
- game ui integration docs corrections (742bd21)
- move MyGameUISelector script to component scene location in /game_ui (4298c10)
Version 1.17
A new version of the Inventory System is available. This release includes various refinements to existing systems to flesh out more combat-related functionality.
Inventory Ammo Provider
The GGAmmoProvider component is responsible for providing ammunition to equipped weapons.
Previously, it only had a “simple” strategy:
Creating ammunition out of thin air.
The new GGAmmoProviderInventoryStrategy pulls ammunition from items in the inventory it’s connected to.
This allows players to pick up ammunition from loot boxes and item spawns
Weapon and Combat Refinements
The MyRangedWeapon2D class, which powers the two example guns in the Multiplayer Interaction Demo has received some ammo consumption refinements to go with the Inventory Ammo Provider mechanic and now emits signals when firing/reloading.
Melee weapons and projectiles now use the GGHurtBox component to deal damage.
The HurtBox applies damages to a HitBox, which is then processed by a DamageCalculator strategy to update the HealthStats component.
The new Ghost “Enemy” spawns as part of the Multiplayer Interaction Demo, and can receive damage from both melee and ranged weapons. When taking hits, the amount of damage floats above the character/object, which is all handled on the server and replicated to clients for multiplayer by a new set of classes.
Changelog
Features:
- Added a new configurable MyEntitySpawner2D to spawn the Ghost
- Added the GGAmmoProviderInventoryStrategy, along with some ammo and projectile rework.
- Added configurable target (defaults to “_blank”) for the GGRichTextURLOpener.
- Added GGFloatingNotifier component to inform the GGFloatingDisplay component to display floating numbers for server and clients.
- Melee Weapons now each have dedicated scenes.
- Ranged Weapons were reworked for improved ammo handling and signal emission when firing and reloading.
Bug fixes:
- Corrected the Drag-and-Drop configuration for the Inventory In-Game Menu UI integration.
- Ensure damage calculation only runs server-side.
- Various corrections to the netfox implementation of the character scene.
- The Tour instructions now correctly show that CMD (instead of CTRL) is the drag-and-drop modifier on Mac.
Version 1.16
A new version of the Inventory System is available. This version requires Godot Engine 4.3 and includes many refinements.
New Drag and Drop system
The Drag-and-Drop component has received a major overhaul. The previous system was quite complex and the separation of the classes that implemented the click-and-drag and click-and-release approaches had so much overlap that it made more sense to offer the two drag-and-drop modes through simpler, more streamlined configuration.
Inventory Popovers
The inventory system now also has a new popover feature. While hovering over an inventory item, a popover will show details about the item, much like a fancy tooltip. The presentation and behavior are customizable, and popover configuration is also included in the Inventory System Tour.
RPCs with Typed Arrays
Godot 4.3 now supports RPCs with typed arrays, which previously required a workaround:
Theoretically, that section in the guide can now be simplified. However, instead of removing that knowledge, I’ve updated the section to explain why the workaround existed and is no longer needed. I believe there’s more value in understanding what changed, than not mentioning it at all.
Features:
- Replaced Drag-and-Drop strategies with the more refined Dragon Drop implementation
- New Inventory Popovers that show details when hovering over items
- New Inventory Item Filter
- Inventory Item Weights
- Replaced
TileMapwithTileMapLayer
Bug fixes:
- Add game_ui node group to SDIGameUI in the inventory tour
- Audio handling correction related to the Godot 4.3 audio changes
- Drag-and-Drop modifier keys use CMD on Mac instead of CTRL
- Drag-and-Drop now uses groups to determine draggable item controls
- GGItemType.image data type changed to Texture2D instead of Resource
- Inventory UI search box text alignment correction
- Corrections to Multiplayer Demo transfer dialog context handling
- Prevent UIContainer from setting input as handled
- GGResizableControl sets input as handled to prevent UI interactions from leaking into character controller
Version 1.15
This inventory system release refines a lot of architecture guide sections based on customer feedback and adds over 100 additional pages to the PDF guide.
Features:
- More detailed architecture guide sections for character interaction, permissions, and game UI integration.
- Split interaction demos to showcase interaction components and strategies incrementally.
- Inventory now supports an allow_slot_focus setting to disable slot focus entirely.
Bug fixes:
- Correction to Game UI demo CanvasLayer configuration.
- Remove “game_ui” group from SDIGameUI scene and set default per demo instead.
- Restore crafting demo focus switching configuration.
Version 1.14
A new version of the Inventory System is available with more multiplayer-related features. The Multiplayer Interaction Demo can now run in multiple modes, through two separate implementations of the Character scene: The simple character scene leverages the MultiplayerSynchronizer and can either let the client have authority and move the character, or have the client send inputs to the server, which then applies the movement logic server-side. A separate netfox character scene leverages the netfox addon to implement client-side prediction and server reconciliation.
Features:
- Added a “drop all items” to the GGInventoryUI toolbar.
- Added a GGAccessTestPolicy to the access manager for delay and failure testing of policies.
- Added crafting to the main tour.
- Added crafting recipe collection.
- Added MyMultiplayerSpawner, which reads scenes from a directory to populate its auto spawn list.
- Added hotbar access policy.
- Hotbar tracks item when its moved around in the inventory.
- The GGInventory’s items_changed signal now supports batching.
- The GGInventory’s swap_items() method now atomic/emits a single items_changed signal.
- Added reusable MyItemDropHandler to drop items near character within configurable distance.
- Multiplayer Interaction demo inventory uses per-item audio bindings.
- Multiplayer Interaction demo character now includes two versions; A “simple” version, and a “netfox” version for client-side prediction.
- Added Multiplayer Lobby demo; similar to the Multiplayer Interaction demo, but uses WebRTC with a lobby server that allows clients to join via lobby code.
- Added window management examples to main tour.
- Added link to multiplayer lobby demo to main tour for web build.
- The main tour theme selector now uses the resource name as the theme name.
- Multiplayer interaction demo character can equip tools and weapons, with hotbar integration.
- Weapon types and item serialization enhancements.
Bug fixes:
- The inventory controller default action strategy handles touchscreen double-tap as double-click.
- Camera callback in physics process for smoother ux.
- Correction to sequencer action strategy method name.
- Correctly apply inventory search filter to inventory UI.
- Crafting component gdmaim enum compatibility.
- Disable project allow_hidpi and remove tour autoscaling via content_scale_factor due to issue with Godot’s drag-and-drop handling.
- Don’t export GGItemData active property.
- Don’t show sequencer’s save button on web.
- Adjust drag-and-drop order of operations to batch items_changed correctly.
- Drop filtered items compatibility with allow_gaps set to false.
- Enable access manager’s open access policy delay timer.
- Ensure GGInventorySlotItemUI follows theme variant naming convention.
- Proper GGInventoryUI slot_scene handling when in list view.
- Inventory UI’s grid and list view allow for grid columns configuration.
- Correct architecture guide references to demos.
- Hide sort menu’s clip_text at label breakpoint.
- Inventory expirations updates item quantity via LUT.
- Fix for simple inventory UI support.
- Inventory transfer stacking strategy batches items_changed so items can unequip correctly during transfer.
- Inventory UI passes slot_scene to controller even when outside tree.
- Larger Multiplayer Interaction demo character client scope shape to avoid Godot 4.2.2 MultiplayerSpawner’s visibility regression issue.
- Main menu eats/handles inputs when visible.
- MDI Game UI allows interactions while inventory is open.
- Correct minimum inventory browse and transfer UI sizes.
- Correction to main tour overlay layer.
- Prevent dropping items from multiplayer interaction demo loot bag.
- Properly clean up access manager’s pending contexts.
- React to hotbar actions when button is released.
- SDI Game UI inventory browse UI focus handling.
- SDI Inventory transfer UI handles input events while open.
- SessionManager only reacts to server-side join/leave signals.
- Show WebRTC warning when in web mode.
- Open window with noopener option on web to preview separate Godot instance smashing ArrayBufferView.
- Splitting inventory items fills slots to the left, if the right side is full.
- Splitting items resets the TTL to item type expiration.
Version 1.13
It’s been a while, but it was worth the wait. The latest version of the Inventory System is now available, with a long list of features, improvements, fixes, and documentation. This time the focus is on multiplayer.
Let’s cover the features first:
- Added a
GGNetworkManagerwith pluggable strategies for ENet and WebSocket. - Added a Multiplayer Interaction demo that works with ENet or WebSocket via the
GGNetworkManager. - The Multiplayer Interaction demo can either trust the client for character movement or handle all movement server-side.
- Added audio theme support to the inventory manager and inventory transfer UI.
- The main tour now has a fullscreen toggle button.
- The
SimpleInventoryPersistencecomponent now also supports JSON. - Added a tabbed inventory UI.
- Added an inventory item filter strategy to allow for per-inventory item configuration without relying on the inventory access policy.
- Added ability to cancel pending contexts to the access manager component.
GGUIManagernow spawns new dialogs centered on screen.- Added GameUI demo.
- Added access manager policy group logic for “any” and “all” combination of access policies.
- Added dynamic inventory serialization strategy, which serializes item types and defers serialization of each item to the item’s script.
- The multiplayer storage box reflects its open/closed state based on open access manager contexts.
- The interaction demo now has a team-based access policy to show off team-based access.
- The interactor/interactable components now have enter/exit range signals for proximity detection.
- The Inventory UI exposes ScrollContainer modes.
- The inventory UI now supports custom icons via theming.
- The multiplayer interaction demo character can browse their own inventory with TAB, or access other objects with E.
- The multiplayer interaction demo allows players to drop items individually, or collectively as loot bags.
- The multiplayer interaction demo’s dropped “loot bags” have expiration timers.
- The multiplayer interaction demo supports spawns random lootable chests.
- The multiplayer interaction demo supports saving and loading multiplayer games for the host.
- Added simple inventory drag-and-drop strategy that only swaps items.
Bug fixes:
- The abstract inventory controller implements
get_item()for correct mouse, focus, and dnd signaling. - Access manager cleans up await handlers, game UI concurrency locking.
- Access manager type hint correction when syncing with all clients.
- Access manager passes nonce, game UI rework to manage dialog state.
- Corrected a
GGInteractor2Dregression. - Basic actions guide doc link correction.
- Rebuild inventory lookup table when assigning contents property.
- Click-to-pickup drag-and-drop strategy allows dropping while quantity modifier key is held.
- Inventory controller’s inventory_resized signal passes slot count.
- Corrected GGInventoryTransferStackingStrategy’s
transfer_item_to_inventoryquantity handling. - Correction to main tour inventory actions.
- Correction to crafting; status UI shows crafted item until idle.
- Default action strategy only follows mouse focus when slot is focusable.
- Drag-and-drop correction: Don’t allow the same item stacking on itself.
- Drag-and-drop pickup with half-modifier correctly picks up 1 item from a stack of 1.
- Drag-and-drop strategy uses drag data’s actor property for client-side “preview” permission check.
- Drag-and-dropping item onto itself correctly restores control modulation.
- Ensure inventory is valid before refreshing slot.
- focus_control default focus gdmaim annotation.
- Single-dialog interface Game UI corrections.
- Game UI cleans up dialog if object vanishes.
- Handle inventory component’s stacking_strategy not set.
- Handle invalid drag and drop data on client after inventory is yanked.
- Handle multiplayer client leaving with open access context.
- Handle item transfer within inventory.
- Correctly update character label per Interactor signal.
- Inventory controller refreshes UI if inventory property changes.
- Inventory no longer erroneously sends contents to clients when host opens context.
- Multiplayer interaction demo visibility per peer works for all peers.
- Prevent duplicate game UI menus.
- Sequencer track properly builds LUT by calling parent ready method.
- Set theme for the WebSocket demo inventory manager.
- Transfer strategy stacking fix.
- Miscellaneous type hints and code doc blocks.
Version 1.12
Crafting is here! The latest inventory system version is now available with the following features:
- Introducing the crafting component
- Added the crafting demo
- Added crafting chapter to the architecture guide
- The inventory component now internally uses a lookup table to find items by type more efficiently
- The main tour’s
InventoryItemGivernow uses managed-items controller with a transfer strategy
The bug fixes:
- Added a camera to the interaction demo.
GGEntityAccessManager.context_count()no longer breaks while iterating overcontext_ids.- Inventory persistence typed-array handling.
- Correction to stacking strategy’s quantity handling.
- Inventory transfer strategies obey inventory access policies.
Version 1.11
The latest inventory system is now available and it focuses on multiplayer permissions. The new Access Manager component validates client requests to ensure players can't cheat and interact with inventories they're not supposed to be able to have access to.
New features:
- The new
GGEntityAccessManagercomponent allows permissions handling for multiple components in the same object. - WebSocket demo improved with access manager component
- Separate inventory controller scenes for “managed-slots” vs “assigned-slots” controller.
Bug fixes:
- Removed typed arrays from RPC-enabled methods.
- Inventory expiration extension no longer interferes with drag-and-drop on multiplayer client
- Correction to multiplayer stacking strategy properly emitting signal
- Multiplayer-compatible use and drop item actions
- Remove type hinting from potentially freed object
- Remove unnecessary/stray assert
- Addresses typed-array incompatibilities via
Array.assign().
Version 1.10
We're excited about this release, which includes a range of quality-of-life additions and refinements. Drag-and-drop support has been improved with a second strategy: Click-and-release: Simply clicking (and releasing) an item will pick it up. This leverages Godot's force-drag functionality and approximates the drag-and-drop behavior that games like Valheim and Palworld use in their inventory items. Switching between click-and-release and click-and-hold strategies is possible by configuring the GGInventoryUI with the respective strategy resource.
New features:
- The Window Manager and Inventory UI demos now allow switching focus via controller
- Focus switching now sorts dialog (from left to right), greatly improving the user experience.
- Added the click-and-release drag-and-drop strategy.
- Added Interaction demo with inventory item transfers.
- The Inventory UI demo toolbar now uses an item collection to configure the SimpleItemGiver's items.
And of course, lots of bug fixes:
- Add missing drag_item to project input map.
- Allow dropping items into list item container.
- Container drag signal handled in the inventory controller.
- The refined Inventory UI demo defines item collections.
- The inventory manager (window manager demo) sets inventory UI's action and drag-and-drop strategy.
- The InventoryUI demo reuses the ItemUseDebugger.
- Corrected the GGInventoryUI scene
mouse_filterconfiguration. - The multiplayer demo uses the inventory controller for local inventory state.
- Renamed the default action strategy's move_item action to drag_item.
- Correction to the sequencer demo action strategy's focus handling.
- Set missing transfer and drag-and-drop strategies for various demos.
- The stacking strategy uses multiplayer-friendly
items_changedcallback. - Inventory transfer button quantity correction.
- WebSocket demo action and drag-and-drop strategy correction.
- Workaround for
Array.map()incompatibility withArray[int].
Version 1.9
Another quick inventory system update. The Resizable Container Demo now includes preliminary support for controllers.
Features:
- The Resizable Container demo includes focus switching between UI dialogs with a controller.
Additional bug fixes:
- The Sequencer demo's spectrum analyzer is now scrollable, with an improved audio bus setup.
- Corrected the sequencer demo's TFX guitar configuration.
- Setting the
GGUIContainer's content property allows for replacing scene content.
Version 1.8.1
A quick update to yesterday's release with a few fixes:
- Small correction to the sequencer's data model.
- The Window Manager demo now has the correct
sorting_strategiesattached.
Version 1.8
The latest version includes a few new enhancements, and an experiment: The sequencer demo uses inventory instances to hold music notes, which can be played back. This was inspired by music trackers that were popular in the 90s, such as Scream Tracker and Impulse Tracker. The sequencer isn't meant to be a production-ready digital audio workstation replacement. It's a proof of concept, but it does show off the flexibility of the inventory system.
I've transcribed a section of a track I created in Ableton Live about a decade ago. This is included in the Inventory System demo project.
This release includes new features:
- Added a
GGInventorySimpleUIwith fewer bells and whistles. GGInventorynow supports multiple sorting strategies, which the UI automatically picks up.- Stack splitting with middle mouse button or action input.
- A new sequencer demo that uses inventories to hold track notes in item data.
Of course, we also have bug fixes:
- Expiration extension handles scenes without an owner (such as dynamically assembled scenes).
- Inventory allows setting the scroll container's custom minimum size.
- The Inventory UI correctly selects the configured view upon start.
Version 1.7
A couple of corrections and a new feature:
- Added inventory saving and loading to the main tour.
Bug fixes:
- The drag-and-drop state is shared via static property.
- Inventory controller filtering no longer accesses item index out-of-bounds.
- Inventory serialization strategy order of operations for slightly improved performance.
- Prevent the
GGInventoryControllerfrom using empty slots. - Miscellaneous static typing corrections.
Version 1.6
Per feedback, we've exposed more inventory user interface component signals to make it easier to react to slot/item interactions with custom logic.
New features:
- Item-level focus signals are exposed via the
GGInventoryUIcomponent. - Print information when inventory was saved in the simple inventory persistence script.
In addition, these bug fixes are included:
- Correction to dropping items from the inventory due to resizing.
- The inventory controller only sets the
custom_minimum_sizeon the slot if the property is present.
Version 1.5
The latest version of the inventory system is available and includes refinements for the interaction demo and the main tour.
New features:
- The action strategy now handles
use_item()action and defaults to use for double-clicks. - The interaction demo now includes expirations for the various storage boxes.
- The tour has a notification UI that shows item use and drops.
- In the inventory transfer view, double-click defaults to
transfer_item, instead ofuse_item. - Inventory Item quantity prefixed with
x.
We've also got a handful of bug fixes:
- When switching the inventory's item_scene, all previous slots are removed (so different slot scenes don't end up together).
- The expiration extension waits for scene owner to be ready before starting to apply expirations.
- The inventory's drop_item() call no longer attempts to drop empty slots.
- Removed debug output from Inventory UI demo.
- Added default drag-and-drop and filter strategies to Inventory UI.
- Removed extra
_refresh_slots()call from inventory controller for minor performance gains.
Version 1.4.1
This small update addresses inventory serialization to persist the allow_gaps and expiration_multiplier settings.
These were previously ignored.
Version 1.4
The inventory components now have custom icons to make it easier to tell them apart. This release also includes additional bug fixes:
- A correction to multiplayer sync for gapless inventories.
- The
InventoryUIControlsdebounce timer is set to one-shot. - Renamed the inventory interaction strategy to be aligned with the naming convention.
Version 1.3
This version adds support for persistence through serialization of inventory data.
Features:
- Inventories can now be serialized/deserialized for saving/loading.
- The InventoryUIControls in the tour debounce when setting the inventory size to reduce node churn when adjusting settings wildly.
Bug fixes:
- Expiration extension now supports inventories without gaps
- The ItemUseDebugger handles null items properly
- Assigning a new
GGItemCollectionto an inventory properly results in theitems_changedsignal being emitted.
Version 1.2
A few new features:
- The new ContentAnimator component reveals tour slide content with tweens.
- The inventory now supports grid view and list view.
Bug fixes:
- When resizing the inventory (via max_items), extra items are correctly dropped when the allow_gaps setting is disabled.
- The item expiration time is "humanized" by formatting it with s, m, h, and d suffixes. E.g. Instead of "600s", it'll now show "10m".
Version 1.1
Hot on the heels of 1.0, version 1.1 allows for gaps in the inventory. This release also correctly displays the release version in the PDF Guide.
Version 1.0
Version 1.0 of the Inventory System is now available. It includes a few new additions since the closed beta:
- Audio Themes
- A toolbar button to auto-stack items
- Support added for partial item stacking
- Transferring items now takes the search filter into account
Lots of fixes found their way into this release as well:
- Addresses several issues with expiring items related to inventory resizing.
- Drag-and-drop now handles expired items.
- Drag-and-drop preview z-index set to max.
- When building the UI, the InventorySlotUI nodes have a consistent naming convention.
- The
GGFocusControlclass usesgrab_click_focus(). - Corrected node type in the GGTour class.
- Inventory grid scroll container follows focus.
- Inventory sort strategy method format changes.
- Addresses an issue with refreshing last item slot.
- Snappier inventory item consumption.
- Web export compatibility improvements.