Zum Hauptinhalt springen

Subsystem API

All methods below belong to UInventorySubSystem. Operations are local synchronous calls; BlueprintCallable does not provide network transport. The Header Reference includes exact parameter types and reflection metadata.

Queries​

MethodResult and behavior
GetInventoryCompByTag(TargetPlayer, IdentityTag)Component on Pawn or its PlayerState, exact tag match; null on failure
GetItemByID(ItemID)Indexed PDA_InventoryMaster or null
GetDatabaseByItemID(ItemID)Indexed database for the item or null

Inventory Operations​

MethodOutputsCurrent behavior
AddAmount(Pawn, ItemID, Amount)Master, bSuccess, OutAddedAmountDefault database target; full or partial add
RemoveAmount(Pawn, ItemID, Amount)Master, bSuccessDefault database target; checks total available amount
AddAmountToSpecificInventory(Pawn, IdentityTag, ItemID, Amount)Master, bSuccess, OutAddedAmountExplicit target; full or partial add
RemoveAmountFromSpecificInventory(Pawn, IdentityTag, ItemID, Amount)Master, bSuccessExplicit target resolved first, but execution uses default route: defect

Slot Operations​

MethodOutputsCurrent behavior
AddToSlot(Pawn, IdentityTag, SlotID, Amount)bool, OutAddedAmountAdds the existing slot's item; clamps to slot/inventory capacity
RemoveFromSlot(Pawn, IdentityTag, SlotID, Amount)boolRemoves slot quantity; over-request may remove first then fail
TransferOwnSlot(Pawn, FromTag, ToTag, FromSlotID, ToSlotID)boolSwap wrapper blocked by zero RequestedAmount
TransferExternalSlot(Pawn, OtherPawn, FromTag, ToTag, SlotID, Amount)boolPulls from OtherPawn/ToTag into Pawn/FromTag; names suggest the opposite direction

TransferExternalSlot's helper interprets its first tag as the requesting player's destination and second tag as the other player's source. The context resolves those same components but labels them SourceInventory and TargetInventory in the opposite direction. The labels do not by themselves make different tags fail; the two exact tags must exist on the corresponding Pawns. Do not infer a push operation from the parameter names. Capacity/rollback limitations still apply.


UI Helpers and Delegates​

GetFastInteractInputMap and GetFastInteractWidgetMap return configured values or empty structures. GetInventoryEntryClassFromSettings returns the configured soft entry class. GetToolTipWidgetClass needs a present ToolTipMap key for non-None types. LoadSlotDataAssetAsync broadcasts OnSlotDataAssetLoaded(SlotID, LoadedAsset) after a successful load. GetPayloadClass is UFUNCTION without BlueprintCallable.

OnDropAccepted(TargetIdentityTag, Operation) and OnDropInSlotAccepted(TargetSlotID, TargetIdentityTag, Operation) report local UI intent, not server mutation completion. OnWidgetLoaded carries a loaded widget class; it is not a general operation or database-ready result.


Native Context Execution​

UInventoryManager::RunOperation(FInventoryOpContext&) is reflected but not a BlueprintCallable node. Native users can construct contexts for active tags, but must enforce authority and operation-specific validation. Split/Merge have no subsystem convenience node. Reserved enum states/tags do not implement additional features.