Skip to content
Plugin 1.0 · Unreal Engine 5.8Source snapshot · Version details

Inventory operations ​

Choose the operation layer ​

Use the manager or container API on authority for gameplay setup, rewards, loot creation, and restoration.

Use URicClientPredictedInventoryComponent for supported player-facing operations. It works with the client view and sends the corresponding server requests. The RPC component is the server gateway, not a replacement for your game's permission rules.

Add items ​

  • Container.AddItemDefinition(Definition, Stack, OutItemsAdded) adds to one container.
  • Manager.AddItemFromDefinition(...) searches managed inventory space.
  • AddItemWithParams and AddItemFromDefinitionWithParams accept FRicAddItemParams.

The manager supports container-tag search and exclusions. Always inspect how many items were added and decide what to do with the remainder.

FRicAddItemParams carries a stack policy and initial tag stacks. FRicAddResult reports AddedItemCount, AddedItemIds, and StackedItemIds. The policies are Auto, ForceNewSlots, and NoStack; test the desired policy against the concrete container implementation.

Move and drop ​

For a specific destination, use MoveItem or MoveItemRotated. In drag-and-drop UI:

  1. Resolve the destination container and slot.
  2. Ask GetDropAction for the proposed action.
  3. Show the placement feedback.
  4. Call ProcessDrop when the player releases the drag.
  5. Observe the resulting inventory refresh.

ERicDropAction distinguishes None, Add, Swap, Stack, Nest, and Return.

Stack and split ​

Use StackItems for compatible stacks and inspect OutItemsAdded. Use SplitItem or SplitItemInOwningContainer to split through the predicted model.

Splitting also needs space for the new stack. A compatible definition does not guarantee that every incoming item will fit.

Remove and discard ​

RemoveItem(Item, Num) removes a quantity. The default Num = -1 requests removal of the entire stack.

Use CallDiscardEvent = true when the RPC/predicted operation should notify OnItemDiscarded. Your game implements the dropped world actor or other discard effect. Inventory removal alone is not a world-pickup system.

Swaps in this snapshot ​

The default buffer strategy's execution methods can mutate slots while returning false. The relocate strategy can return true without completing placement. These are current implementation limitations, not reliable success signals.

Do not use swaps as an example of guaranteed atomic behavior in version 1.0. Validate or repair the strategy used by your game; see Troubleshooting.