UE5 Inventory and Item System
This page is part of the documentaiton for my UE5 Inventory and Item System

Multiplayer

UE5 Inventory and Item System Version: 3.0

    This system comes fully replicated for multiplayer games.

    If you are not familiar with multiplayer replication in Unreal I recommend reading through Cedric Neukirchen’s Multiplayer Network Compendium a few times. This guide helped me out when I was just getting started.

    Naming Convention for Multiplayer Events

    For my Event naming convention I am using the following prefixes to indicate the replication method:

    S_ = Run on Server
    C_ = Run on Client
    M_ = Multicast

    Version 3 Improvements

    For this version two major changes in regards to multiplayer … First and most importantly to help make things a little more efficient for you we no longer send the full contents of the inventory components to the client every time a change to it occurs, instead we are sending data just about the individual slots that were changed. This change reduced the overall bandwidth usage significantly.

    I also reduced the default net culling distance, and included an easy way to debug the cull distance of any interactable. To enable it, just set the value of DebugCullDistance? on the interactable to true. This will create a sphere that shows you the culling distance inside the editor. At runtime this sphere is destroyed.

    Player Identification

    By default this system is using a simple identification process, where the index of the player state in the game state’s player array is the ID assigned to the player. This ID is then used when saving and loading the save file for the player.

    You most likely already have a way to identify your players in your multiplayer game, and you are going to want to change what I am doing and set that value to the MyID variable in the S_GetMyID and C_GetMyID events on the AC_InventoryItemSystem.

    This documentation and asset version are new. If you encounter any bugs or if anything doesn't make sense, please let me know.