Mutable replication

Hello,

I am trying to replicate a duplicate of a Customizable instance object.

The client duplicates an instance and then broadcasts it to all other clients via RPC.

I’ve tried reliable RPCs, setting the component to replicated, using RepNotify, and replicated variables, but no matter what, it doesn’t replicate to the clients.

Is this functionality not supported yet since Mutable is in beta?

Clients do not replicate. Only the server replicates.

  1. Client request changes/actions via RPC to server.
  2. Server validates and Sets the replicated “variables”.
  3. Replication subsystem replicates those variables to other clients.

Customizable instance object, Actor components etc, it is better to replicate variables to drive the customization per client. Repnotify is the preferred approach here.

Last few paragraphs of the section are key here.

Do I need to create local instances for each client when they join?

For example:

  • Client 1: Creates instance A for themselves (local), B for Client 2, and C for Client 3.
  • Client 2: Creates instance D for themselves (local), E for Client 1, and F for Client 3.
  • Client 3: Creates instance G for themselves (local), H for Client 1, and I for Client 2.

When Client 3 changes their CO, on RepNotify, Client 1 updates their C instance, and Client 2 updates their F instance.

This Network Compendium will likely be the best resource you’ll ever find to help multiplayer stuff make sense

Some basic rules:
-If you don’t own the object as a client the server has to do it
-if the change needs to be seen by all clients the server has to do it

Some Examples:
Using “Switch has authority”
only the server will execute the Authority branch
only the clients will execute the Remote Branch

Now with this example we expand on that, only the Server can call a Multicast, which will then run for all

Here if we are the owner of the object, were still a client so the client branch will execute, which will then as the server execute the Multicast

The third mode, which i don’t have a picture of atm, or feel like opening the editor just to take a photo of, is Run on Owning client

This can be run by either the Server or client… but will always execute as client

This chart may help

To try and answer your actual question at hand, not sure exactly what it is your trying to do, some pictures might help it make more sense,

But it would seem based on the information available that the RPCs are being executed by a client, which means when the first RPC is called it’s just dropped by the server

Reliable RPCs will make almost no difference in the editor unless your testing dropped packets and or latency

What happens with this is if its NOT reliable and the network becomes congested waiting to send the packets to the server/client they can sometimes be dropped as the game will assume they are not relevant

When you mark them as Reliable they’ll Que up until they get their chance to be sent and are assumed relevant by the client/server

IE, you’ll get disconnected if these packets take to long to get to the server

These will replicate the value that the server has as unreal uses a Server>Client model ( the server has the one true copy of the world all of it’s information is correct ) the clients use the information they receive to replicate/recreate the nearest copy of that world with the least amount of data possible

Never used Mutable myself, im assuming you get a skeletal mesh out of it and apply it to your character, Ensure ( use “Switch has authority” ) you are setting this skeletal mesh on the server, otherwise only the client will see it

If a plugin is in beta should have nothing to do with replication in the majority of cases, as whatever the plugin does can just be told to run on the server and for each client, ensuring everyone has the same True copy of the world

1 Like