Skip to content
Plugin 1.0 · Unreal Engine 5.8Version details

Multiplayer and prediction ​

The server owns the authoritative inventory. Replication sends its state to clients, while additional prediction components let the local player see inventory changes immediately. The supplied UI already uses this layer; you do not need to rebuild its networking graphs.

1. Components and ownership ​

Follow Set up an inventory. The demo places these components on BP_DemoPlayerState:

  • Ric Container Manager: authoritative containers, items, and nested storage; replicated by default.
  • Ric Item Operations RPCs: sends inventory requests to the server; replicated by default.
  • Ric Client Predicted Inventory: local inventory copies and predicted operations; not replicated by default.
  • Ric Quick Slots: authoritative quick-slot assignments; replicated by default.
  • Ric Client Predicted Quick Slots: local predicted quick-slot assignments; not replicated by default.

Keep these components on the same player-owned actor when following the demo. A Character or Player Controller can also be used, with the supplied integration adapted to that owner.

Client-to-server requests require the RPC component's actor to have the player's owning connection. Enabling replication alone does not establish that ownership. See Epic's Actor Owner and Owning Connection.

2. Enable replication ​

  1. Open the inventory owner's Blueprint and select Class Defaults. Under Replication, enable Replicates.
  2. For the default registered-list path, also enable Replicate Using Registered Sub Object List on the owning actor. Expand the advanced replication settings or search for the property.
  3. Select Ric Container Manager and keep Component Replicates and Replicate Using Registered Sub Object List enabled. Both are enabled by the component's C++ defaults.
  4. Keep Component Replicates enabled on Ric Item Operations RPCs and, when used, Ric Quick Slots. Leave the prediction components at their non-replicated defaults.
  5. Create the authoritative containers and starting items on the server, using Switch Has Authority as in the setup guide. Spawn replicated world inventory actors on the server too.

The actor must be relevant to the client that needs its inventory. The manager handles replication of its container and item UObjects, including nested storage, through that actor. You do not need to mark each runtime item for replication manually.

3. New and legacy subobject replication ​

The plugin supports two ways of replicating inventory subobjects. The manager's Replicate Using Registered Sub Object List setting (bReplicateUsingRegisteredSubObjectList) selects its path.

Registered subobject list: default ​

The manager registers containers and items with Unreal's replicated subobject list. Normal inventory operations maintain that registration when objects are created, transferred, removed, or restored from a save.

Use this with the registered-list setting enabled on both the owning actor and manager. It works with Unreal's existing replication system and is required for Iris.

Legacy ReplicateSubobjects ​

For a project using the existing replication system, the older path is also implemented. Disable Replicate Using Registered Sub Object List on the owner and manager to use this setup. The manager's ReplicateSubobjects implementation traverses the inventory tree and replicates its containers and items, skipping duplicate object references.

These are two subobject-replication paths; client prediction is provided by the same additional components in either case. Epic documents the engine-side distinction in Object Replication.

Iris support ​

The core module includes Iris build support, and item and container UObjects register their Iris replication fragments. When the manager becomes ready for replication and detects an Iris net driver, it forces its registered-list path on. The owning actor must also use the registered list.

The plugin supports Iris without enabling it globally for the project. To select Iris as your project's replication system, follow Epic's Introduction to Iris. Keep the registered-list configuration above when using it.

4. How client prediction works ​

Ric Client Predicted Inventory provides the prediction layer separately from Ric Container Manager:

  1. On a remote client, it builds local copies of the replicated inventory, preserving item and container IDs.
  2. A predicted operation updates these local copies so the UI can respond immediately.
  3. Ric Item Operations RPCs sends the request to the server through reliable server RPCs.
  4. The server executes the authoritative operation, and its resulting state replicates to clients. The prediction component uses replicated source data and IDs for synchronization.

On authority, including standalone play and a listen-server host, the component works with source inventory objects instead of a separate predicted copy. Its client-copy initialization is skipped on a dedicated server.

For custom Blueprint interactions, call the prediction component's operations and use its item/container lookups. Adding the component alone does not turn direct client edits of the manager into server requests. A successful local result describes the predicted operation, not a server acknowledgement.

Sync and Sync Container by ID refresh local copies from source data already available on that client. They do not force an immediate network update from the server.

Quick-slot prediction ​

Ric Client Predicted Quick Slots updates the local assignment immediately and sends the request through the same RPC component. Ric Quick Slots stores and replicates the authoritative assignments. Keep both quick-slot components and the inventory prediction component for the supplied quick-slot UI.

5. Observe another inventory ​

A chest or world inventory needs its own replicated actor and Ric Container Manager. For custom UI logic, call Set Observed Container Manager on the player's Ric Client Predicted Inventory and pass the external manager. Clear it with an empty reference when observation ends.

Observed containers must already be replicated and relevant to the player. Requests still travel through the player's RPC component. Use Is Observed on the supplied container widgets to display this inventory source, as described in Inventory UI and input.

6. Check the multiplayer setup ​

Run Play in Editor with a server and a remote client. On the client, move and rotate an item, transfer it into nested storage, and assign a quick slot. Check the resulting contents and assignments on the server too. Test an observed chest and, if used by your game, a dedicated server.

Simulated network latency helps confirm that local prediction responds immediately while server state still reaches the client. Repeat the check with the replication path used by your project.