Talent/Skill Tree multiplayer replication best ways
How would you make somekind of Talent/Skills Tree in a multiplayer game and replicate variables across the network to all clients? I have been using Multicast/RunonServer System inside Character BP and really works fine but seems to be too complex when you have over 100 variables.
Also I read somewhere Multicasts abuse is a mistake and should be only used for simple things like small events or sounds. Anyway Multicast System seems to break when a new player logs in and join the server but I could fix that.
Have been checking OnRep/RepNotify and PlayerState and would like to know which ways you think is better and why.
asked Jun 23 '18 at 03:29 AM in Blueprint Scripting
the most performant thing I know is to mark a variable as replicated and send a client to server RPC when you want to change it. It will replicate to all clients when the system feels like it. If the client is not within range for the change to be relevant to them, they will miss any effects triggered by the changep. but thats part of why it is so performant.
Multicasts force something to happen inmediately across all clients rather than letting it dish out the info as it deems optimal.
Repnotifies dont necessarily happen immediately but they wait until the replicated actor becomes relevant and then trigger the notify function.
answered Jun 23 '18 at 06:04 AM
If you want to change things anout a material during execution of the game you need a Material Dynamic Instance variable and set it to an MDI you create at runtime using the component it is applied to and the material slot.
I havent figured out if MDIs replicate very well or not but you can make sure the material they are made from has parameter nodes and you can change the values of those params at runtime via MDIs, and the values you feed into the params can be supplied by replicated vars on the playerinfo or pawn.
but maybe you canjust replicate the MDI. If you can get that to work then let me know.
answered Jun 24 '18 at 06:10 AM
For what I want, just store a variable with an independent value associated to each player and loaded always when a new player joins the session with the possibility to let the value keep alive after player death, I decided just to use PlayerState, create a replicated variable and use a custom event Run on Server to set it up in x+2 each time a button is pressed.
Ill continue for now this logic, seems to work fine. Thanks for all and Ill take a look later about the logic for the RandomSkinFunction.
answered Jun 25 '18 at 08:47 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here