Generic Inventory System 1.2
Changes since 1.1.1. Equipment is no longer tied to a Pawn. Crafting can use separate inventories, evaluate first, and roll back on failure. Slot collections can add or remove by slot name.
Added
- Hotbars and equipment slots can be addressed by name. A slot collection can create an item from a
GIS.Slotsdefinition, or remove a count from that slot, without walking stacks first. - Vehicles, containers, and other non-Pawn actors can own equipment.
UGIS_EquipmentSystemComponentis aUActorComponent. Initialization looks for inventory on the owner Actor, then the Controller. C++ that searched forUPawnComponentwill miss it. - Mac is allowed for runtime and editor modules. This release targets Unreal Engine 5.8.
Changed
- World drops also broadcast item-info events on a listen server. The authority calls
OnRep_ItemInfoafter writing. UI that only listened on clients can now refresh on the host. - Writes that break slot rules are rejected.
AddItemInternalcallsIsItemFitWithSlot. Tool or cheat writes that only checked occupancy and stacking can now fail. - Currency batch add/remove is all-or-nothing. Crafting commit uses these paths, so a failed craft no longer leaves a half-spent wallet.
- Query-by-definition fills the caller’s array.
GetItemInfosByDefinitionno longer aliases the output. Crafting evaluation sees the full ingredient list. - Removing a non-unique item by StackId will not take a different stack of the same definition. Fallback to “same definition” happens only when StackId is invalid.
- Settings names match the other Generic plugins.
UGIS_InventorySystemSettingsis nowUGIS_DeveloperSettings. Plugin config isDefaultGenericInventorySystem.ini.
Removed
- Equipment ownership is no longer Pawn-centered.
ReceiveOwningPawn/GetOwningPawnand the Pawn attach helpers are gone. Keep patching Pawn-only APIs and vehicles never plug in. - Old crafting query structs and the ingredient cache are gone.
CheckIfEnoughItemIngredientsandSelectedItemsCachewere deleted. Subclasses should use request evaluate / commit / rollback hooks.
Upgrade Notes
Medium risk, partly source-breaking. Equipment lookups, custom equipment instances, overridden crafting components, and slot-write callers need a pass. Skipping it fails to compile, or add/craft calls start being rejected at runtime.
- Change
UGIS_InventorySystemSettingstoUGIS_DeveloperSettings. If the host copiedBaseGenericInventorySystem.ini, confirm it now loadsDefaultGenericInventorySystem.ini. - Look up the equipment component as a
UActorComponent. Custom instances should implementReceiveOwningActor/GetOwningActor. - Existing
Craft/CanCraftcalls usually still work. Overrides of item selection, ingredient removal, orProduceCraftingOutputas the default commit path need the new request hooks. - Code that assumed slot-definition rules were not enforced on write must check callers against those rules.