Guide
Changelog v2.x
Changelog and release notes for version 2 of the inventory system.
Version 1 of the inventory system was focused on being an educational deep dive and exploration of inventory management features and architecture.
Version 2 is more focused on a refined developer experience with improved semantic naming conventions, consistency, and Godot editor integration.
Godot Editor Integration
Version 2 now includes Godot editor integrations to more easily manage item types through the item library bottom panel. It also includes a new crafting recipe editor.
Naming Conventions
The inventory system makes extensive use of the strategy pattern.
In v2.x, the naming convention has been updated for improved consistency:
Strategy classes use the base name and append a
strategy-specific suffix.
For example, the access policy base class is GGEntityAccessPolicy.
In v1.x, the open policy was called GGAccessOpenPolicy, while in v2.x it's called GGEntityAccessPolicyOpen.
The goal is to have better sorting and grouping of classes in the Godot editor and makes it easier
to find relevant classes.
A compromise had to be made between using class names that are easy to read, such as MyMultiplayerAccessPolicy
vs a naming convention that results in classes easier to find: MyAccessPolicyMultiplayer.
Permissions
Old class name (v1.x) | New class name (v2.x) |
|---|---|
GGAccessGroupAllPolicy | GGEntityAccessPolicyAll |
GGAccessGroupAnyPolicy | GGEntityAccessPolicyAny |
GGAccessOpenPolicy | GGEntityAccessPolicyOpen |
GGAccessTestPolicy | GGEntityAccessPolicyTest |
DemoAccessTeamPolicy | MyAccessPolicyTeam |
DemoWebsocketAccessPolicy | MyAccessPolicyMultiplayer |
Interaction
Old class name (v1.x) | New class name (v2.x) |
|---|---|
GGInteractableStrategy | GGInteractable2DStrategy |
GGInteractableToggleStrategy | GGInteractable2DStrategyToggle |
GGInteractableUseActorStrategy | GGInteractable2DStrategyUseActor |
MyInteractableInventoryScreenStrategy | MyInteractable2DStrategyInventoryScreen |
InteractableCraftingStrategy | MyInteractable2DStrategyCrafting |
Inventory
Old class name (v1.x) | New class name (v2.x) |
|---|---|
GGInventoryAccessSimplePolicy | GGInventoryAccessPolicySimple |
GGInventoryAccessNodeGroupPolicy | GGInventoryAccessPolicyNodeGroup |
MyInventoryAccessMultiplayerPolicy | MyInventoryAccessPolicyMultiplayer |
GGInventoryActionDefaultStrategy | GGInventoryActionStrategyDefault |
GGInventoryItemFilterAllStrategy | GGInventoryItemFilterStrategyAll |
GGInventoryItemFilterTypeStrategy | GGInventoryItemFilterStrategyItemType |
GGInventoryItemFilterWeightStrategy | GGInventoryItemFilterStrategyWeight |
GGInventorySerializationDynamicStrategy | GGInventorySerializationStrategyDynamic |
GGInventoryStackingDefaultStrategy | GGInventoryStackingStrategyDefault |
GGInventoryTransferSimpleStrategy | GGInventoryTransferStrategySimple |
GGInventoryTransferStackingStrategy | GGInventoryTransferStrategyStacking |
GGInventoryUseMultipleStrategy | GGInventoryUseStrategies |
DemoItemFilterCategoryStrategy | MyItemFilterStrategyCategory |
MyInventoryUseBuildStrategy | MyInventoryUseStrategyStructure |
MyStructureGroundGroupStrategy | MyStructureGroundStrategyNodeInGroup |
MyStructureGroundTileMapStrategy | MyStructureGroundStrategyTileMap |
MyStructurePlacerTileMapStrategy | MyStructurePlacerStrategyTileMap |
GGInteractableInventoryStrategy | GGInteractable2DStrategyInventory |
GGLootSpawnerInventoryStrategy | GGLootSpawnerStrategyInventory |
GGLootSpawnerItemStrategy | GGLootSpawnerStrategyItem |
Network
Old class name (v1.x) | New class name (v2.x) |
|---|---|
GGNetworkENetStrategy | GGMultiplayerStrategyENet |
GGNetworkWebsocketStrategy | GGMultiplayerStrategyWebsocket |
GGNetworkObjectSyncStrategy | GGMultiplayerEntityStrategySync |
ObjectSyncManagerStrategy | MyNetworkObjectStrategySyncManager |
Combat
Old class name (v1.x) | New class name (v2.x) |
|---|---|
GGAmmoProviderInventoryStrategy | GGAmmoProviderStrategyInventory |
GGAmmoProviderSimple | GGAmmoProviderStrategySimple |
Hotbar
Old class name (v1.x) | New class name (v2.x) |
|---|---|
GGHotbarAccessOwnerPolicy | GGHotbarAccessPolicyOwner |
GGHotbarAccessSimplePolicy | GGHotbarAccessPolicySimple |
GGHotbarActionDefaultStrategy | GGHotbarActionStrategyDefault |
GGHotbarSelectStrategy | GGHotbarStrategySelect |
GGHotbarUseStrategy | GGHotbarStrategyUse |
Version 2.0.0-alpha.5
This release addresses an issue that arose due to Godot 4.4 changes in how JSON is deserialized. Relevant Godot issues: #103374 and #61464.
Features
- Multiplayer lobby demo now includes character damage and respawning.
Bug Fixes
- Godot 4.4 borked JSON.parse_string() handling #285 (80ca969)
- add respective groups to GGInventoryUI, GGInventoryBrowseUI, and GGInventoryTransferUI (73b0576)
- Adds several theme type variants to allow for more targeted theming.
- correction to sequencer action strategy (6f3da62)
- hide modal UI when placing structures #282 (52d1f1c)
- The hotbar demo syncs inventory contents when second player connects (9a362a7)
- Use
awaitwithGGUIKit.create_ui()to handle dialog size calculations #281 (ad6c82f)
Version 2.0.0-alpha.4
The Inventory System finally uses Godot Engine 4.4, so this version includes all the .uid files.
In addition, some of the dictionaries are now typed.
The GGInventory component now implements a custom iterator, so you can easily iterate over its items.
For example:
var inventory: GGInventory = $GGInventory
for item: GGItemData in inventory:
if not item:
continue
print(item)
Features
- Crafting is now accessible via the
GGCraftingSystemsingleton, matching theGGInventorySystemconvention. - The new
GGInventorySystemExportPluginnow excludes the inventory and crafting editor integrations addons from exports. This prevents unnecessary files from being exported and reduces the final.pckfile size. - The new
GGInteractable2DStrategyExpressionlets developers write code via Godot'sExpressionclass. - The Crafting Editor nodes now have prefixed titles for easier searching/filtering.
- Implemented the custom iterator for the
GGInventoryclass. - Added an example of language selection in the Inventory UI Demo.
Bug Fixes
- Corrected custom iterator argument types for Godot 4.4.
- Fixed a rare bug in the
GGDialogContextHelperwhere hitting the maximum number of open contexts for multipleGGEntityAccessManagerobjects would result in an error. - Added missing popovers to left inventory in crafting demo.
- Unset
resource_local_to_scenefor some item collection resources.
Version 2.0.0-alpha.3
Features
- add inventory statusbar ui and inventory weight_limit (07b86fe)
Bug Fixes
- add weight to inventories in inventory tour #263 (c4bbe59)
- corrected crafting demo and crafting in tour #261 (7714c41)
- GGInventory.drop_item(), unit tests, misc docs (6bd7945)
- invalid expiration extension reference in tour window manager (ee367d3)
- limit auto-crafting in tour to crafting slide (91c26b6)
- transfer strategy is weight-aware #263 (c569376)
Version 2.0.0-alpha.2
Features
- add crafting policy support #261 (6d5aa5d)
- add multiplayer crafting support #261 (840d77b)
- custom crafting strategy to modify items #261 (a0ee595)
- manual crafting (singleplayer) #261 (5da3bd2)
- multiplayer crafting #261 (c103af6)
- add create library file to crafting editor #260 (7e20f68)
- crafting editor can open multiple files #260 (a75f44d)
- add gg.print() plugin (e901caa)
- Add item edit button and max_slots awareness to collection editor #240 (5a41de2)
- Combine gg_inventory_game_ui_modal addon into gg_inventory addon #255 (95bed13)
- crafting editor recipe collection export #160 (e60bbc3)
- implement VisibilitySyncProxy (362e06c)
- inventory plugin overview (f5e8591)
- item transfer validates that target inventory has context for actor #236 (3b501cc)
- item weight taken into consideration when transferring/swapping items #263 (e4b53d3)
- Refactor per-item audio into GGItemAudio resource #253 (0302d51)
- Rename GGAccessManager to GGEntityAccessManager #252 (97d988d)
- RichTextMetaHandler for #250 (1ae3369)
- ui kit provider configuration tool functional #249 (85dbcd2)
- scene change demo; ensure ui kit dialog canvas is always top-most node #249 (a9223e6)
- Separate default theme from additional themes #256 (185c259)
Bug Fixes
- add item quantity validation against type definition (88f25ef)
- clamp item data quantity to allow 0 (4e2695c)
- clicking gg.print output switches to script editor (a4752d9)
- configure websocket demo entity resolver (fed94ac)
- correct crafting policy and misc refactoring #261 (a0385ff)
- crafting component works with exported recipes from editor #260 (63a4238)
- handle loading library with missing item types #260 (e9626fd)
- rename crafting editor addon and file list handling #260 (45bbc9f)
- update the file menu based on whether a file is edited #260 (31dfe0f)
- default popover UI description and popover theme type variation definitions (ce9f091)
- Dropping items from item library onto the collection editor fails when no collection is defined on the inventory #265 (7b3d99f)
- hide collection editor info box by default #240 (47dff3e)
- item filter weight strategy takes quantity into consideration (50c00be)
MyInteractable2DStrategyInventoryScreenhandles game closing while inventory screen is open #233 (8f29614)- reference to inventory from a poc #237 (3912560)
- set mouse events to pass for inventory browse and transfer ui (6a038a4)
- Use inventory event args in window manager demo #211 (3d260b5)
Version 2.0.0-alpha.1
Features
- Inventory Game UI opens inventories for browse/transfer with proper labels #214 (e005b52)
- add GGCSVReader class (eaf0265)
- add GGInventoryUIConfiguration #210 (c76ecaa)
- Allow configuration injection into InventoryBrowseScreen and InventoryTransferScreen #203 (276fb66)
- add split strategy to inventory ui configuration #210 (9ecb003)
- Add inventory item_added and item_removed signals #218 (8e56e3b)
- add MyItemPickup2D component (d33316a)
- Encapsulate Inventory event params in InventoryEventArg class #211 (514934f)
- encapsulate hotbar event args #211 (175bfc5)
- implement GGInventorySplitStrategy in controller, inventory browse and transfer ui #212 (911d86a)
- prefix default action strategy with "inventory_" #216 (de9548b)
- remove focus control component from GGUIContainer #204 (c05fafa)
- rename inventory game ui integrations from default and mmorpg to modal and windows #204 (e5a905e)
- support dragging item outside inventory to drop item #219 (e4993cb)
Bug Fixes
- add item filter strategy per-slot acceptance check #206 (842a0a8)
- crafting game ui modal #220 (2cd9351)
- ensure main menu is top layer in MP Interaction Demo (6d20cd5)
- handle inventory event args #211 (f38417f)
- in-game menu screen (2440989)
- in-game menu screen exposes inventory_browse_ui property (a6e81e5)
- modal inventory game ui configuration #210 (5a79103)
- reduce character collision to fit onto a tile (546cbab)
- remove crafting logic from GGGameUIInventoryWindows #204 (c809b09)
- set MP Interaction Demo EntityResolver for CraftingGameUI (a3599ba)
Continuous Integration
- support alpha and beta builds (a5996d3)