MP_Inventory
Technologies Used
Plugin Info
Visuals & Demos

Advanced inventory management system with tag-based organization
Managing inventory state in a distributed multiplayer environment traditionally suffers from massive replication overhead. Standard array replication forces the engine to evaluate and transmit full subsets of data upon any change, while persistent TMap caches consume unnecessary memory. MP_Inventory was engineered to solve this by moving the entire architecture onto Unreal Engine's low-level FFastArraySerializer.
By decoupling logical UI slots from physical array indices via an O(1) IndexTracker, the framework ensures absolute state integrity with zero memory bloat. When an item is added, moved, or split, the server executes strict validation logic (checking capacities, weight limits, and slot occupancy) before propagating the change. The FastArray system then transmits only the precise delta bytes across the network, completely neutralizing bandwidth scaling issues.
A major focus of the architecture is visual synchronization and ghost mitigation. The plugin deeply integrates with UMG's UTileView via event dispatchers. Engine-level replication hooks (PostReplicatedReceive) automatically detect logical slot reassignments and instruct the client UI to gracefully mutate or clear abandoned widgets in place, eliminating the replication ghosting bugs that commonly plague multiplayer inventories.
Core Capabilities
O(1) FastArray delta serialization for minimal bandwidth consumption
Stateless memory architecture utilizing a lightweight IndexTracker
Configurable Strict (Grid) and Infinite (List) capacity modes
Live UMG integration with in-place widget mutation
Built-in engine hooks for automated UI ghost mitigation
Server-authoritative validation for stack limits, weights, and secure RPCs
Architectural Implementation
01FastArray Delta Serialization
Wrapped the core inventory payload inside an FFastArraySerializer struct. This restricts the replication graph to processing only specific delta updates, eliminating the O(N) bandwidth scaling inherent to standard array replication.
02Stateless Index Tracking
Engineered an O(1) IndexTracker to instantly resolve logical UI grid slots to physical array indices, bypassing the need for heavy TMap lookups and persistent iteration caches on both the client and server.
Plugin Specifications
Compatibility Matrix
Dependencies
API Documentation
Key Functions
UMP_InventoryComponent::Server_AddItem(...)Server RPC to securely add items with physical state validation and replication.
UMP_InventoryComponent::Server_SwapItems(...)Orchestrates strict slot-to-slot logical swapping while maintaining array integrity.
FMP_InventoryArray::PostReplicatedReceive(...)Engine replication hook that safely rebuilds the IndexTracker mid-delta.
UMP_InventoryComponent::OnInventoryUpdated (Multicast Delegate)Fires locally when the FFastArraySerializer replicates a delta change, driving UTileView updates.
Integration Guide
Attach the MP_InventoryComponent to your target Actor (eg. "Pawn", "PlayerController", "PlayerState", "Actor")
Toggle bUseStrictSlots and configure MaxInventorySlots for your game type
Bind your custom UTileView widgets to the Component Dispatchers
Call Server_AddItem or Server_RemoveItem to safely mutate state
Implement UI drag-and-drop utilizing Server_SwapItems
Production Validation
- Build a highly optimized, fully replicated inventory framework
- Eliminate UI replication ghosting during complex drag-and-drop slot swaps
- Provide a streamlined C++ API that significantly reduces custom Blueprint validation logic