How to achieve personalized scene in multiplayer game?

As my knowledge of ue4 multiplayer replication, it enable all the players to have their own personal status, and live in the same world. How to let the world differ according to player setting? Just like scenery style selection in dota, playerA choose styleA while playerB choose styleB, but they are still in the same game world

I post this thread mostly because I am trying to achieve an RTS fog of war for multiplayer, but I have no idea how to show/hide Specific actors according to player faction in a multiplayer game, and spectator even able to switch visions.

I’ve never done it myself but Unreal does index the player count so I imagine you can get the player pawn index and change based on that?

i belive that would be done locally tho. The map itself would have the fog of war, the map, would be done locally. The updates would be from the player location on that map (pulled from the server, or locally). The fog would then be “lifted” locally as well. The fog of war (per player) is done locally, at least, from my experience. If it was server sided, you would have the entire player base using 1 shared map and fog of war …

Hi Angrytoilet,
Maybe it’s a silly question, but how to make fog locally? As my thought, the base theory should be setup the visibility of army units per player, but no matter how I tried, the visibility is always replicated

Sadly, i dont have that answer - not for an RTS.

So - are you looking to have a fog that is always on the map except where you are - or - is this for like the mini map?
Is this a fog sheet that just “removes” when the player has explored the area and always is removed, or, something that sticks around … foggy where the player isnt?

Here is my guess:
Mini map would be 2 maps - one with fog, one without. then it would be a “blend” of the 2 depending where the player is, or, has been.
the always there fog would simply be based on the start distance for the fog itself.

check out thee posts about it:

My desire fog effect is “always on the map except where you are”, I thought is to use bounding sphere in each of friend unit to toggle the visibility of enemy units. This is not hard in a single player game, the problem is how to do this locally in a multiplayer game, As I tried, the visibility of actors is always replicated

And turning off replication doesn’t resolve? I am not sure it should be something replicated to all players.

It doesn’t

I used a 3rd person example to test, put a bounding sphere on the character, toggle the visibility of an actor I made which contains only 1 sphere staticmesh

the sphere actor use the default replication setting
001.png

and below is the function to toggle visibility

In server-client mode, if I set my custom event “setupv” to run on owning client, the client can work locally, but the server’s action of “setupv” still replicate

In Dedicated server mode, both the 2 clients’ action of “setupv” replicate to each other

I would then assume the issue lies in the controlling player. Like are you using Player0 or controlling pawn for the bp

sorry i was answering from my phone and the pics didnt display …
i would go from TARGET SELF to using the owning character as target

It seems overlap event itself is designed to be called on both server and client, so this is not replication’s problem. I add a check branch below, it works locally.

This is an easy case as I use controlled character to check distance. If have to use multi units or a fog manager to do the job, then each of these will need to have an ref to pawn0 for checking local

I assume it replicated the “first player on the server” correct?
Like who ever creates the game, is the one it replicates? I ask because I had this issue with Ark when i was modding for it. Using “Player 0” as reference always defaults the replication to the first person on the server (or the one that created it).

I would assume it worked perfectly locally, the setup looks good in that respect. I think the resolution, in my case (same issue result, different situation), was to replace “Player 0” with “owning player”. Its been about a year, so, my memory is a little foggy on the resolution, but, i do remember the effect i was getting was exactly the same.

From my knowledge and the result of this case, Player Controller 0 should be the controller that user actually controlling, and this is eXi’s tutorial about this

and I didn’t find the proper node about “owning player”, all my node search result about owning is about hud and camera, what is the exact node or nodes?

I’m going back and trying to pull my old data to see what it was exactly that i used here

  • i do know that i was running into the exact same issues you are having … i will report back once i find the solution i have

I don’t know if you want your Fog of War have line of sight vision but you might be interested in my latest pack: Classic RTS Fog of War