[QUOTE=arbopa;374331]
I looked at the plugin yesterday, and LOADS of tutorials about sessions. Can not figure out how to set server name (vs gamename) or player name… the lack of documention for UE4 is maddening.
When using a compatible subsystem like steam the GetPlayerName node will return the players subsystem name as a value. On the PostLogin event in your gamemode you get the playercontroller reference to the person that logged in. You can pass this in to “GetPlayerName” to get their online subsystem name.
I’ll add a “SetPlayerName” node as well just in case it is useful in the future but for online sub games it would probably be better to let the subsystem control their name changes (Like changing your name through steam). Obviously you can have the player pass in a custom name as well and store it as a replicated variable if there is such a thing as a character name in your game. Getting the UniqueNetId for a player controller and converting it to a string will get you their “network id”, or in the case of steam their 64bit steam id.
I also have a “GetNumNetworkPlayers” that you can use with a Blueprint For loop to loop through each currently connected player controller (using GetPlayerController and passing the integer) and do whatever with them. Personally for my test project I save a list of players and their stats seperate and update it on PostLogin (GameMode) and EventEndPlay (Player Controller).
In short though aside from getting the name from the subsystem for storing it and passing it to the other clients I would suggest you roll your own implementation by making a Struct of player data (score, kills, deaths, name, player controller reference, ect) and replicating it to clients. Getting everything into a single structure and fully controllable by you is probably the way to go.
As was already mentioned for the server name pass in a custom property to stand as your game name and retrieve it when finding the game on the clients end.
The example blueprint that ships with the plugin shows how to do a lot of the operations. Place it in your content folder and open it up in engine.