Advanced Sessions Plugin

[quote=“gon, post:2028, topic:30020”]

I have noticed something very weird. Im using Advanced Sessions to get SteamAvatar, SteamName and SteamID and set those variables inside PlayerState. Then I can save all that and use it for Scoreboard list and NamePlate with Avatar and SteamNames. The thing is that SteamAvatar and SteamID fails. I finally got SteamID using my own C++ Class I found on Youtube and it works really fine but SteamAvatar still fails. I tried to get it using SlateBrush, Texture2D and UniqueNetID.

I keep trying things and have seen that Server can set and print a real NetUniqueID so I get the Avatar.
But when a client join the server, NetUniqueID in server and in new client change to ERROR: BAD UNIQUE NET ID and Avatar is not loaded.

What could be doing that ERROR BAD UNIQUE NET ID?

Its kind of hard to read that paragraph, but you can pull unique net ids out of the player state array that is replicated in, it takes a bit for the replication to complete so you need to check if it is valid yet before loading an avatar from the id in it.

[quote=“, post:2025, topic:30020”]

You don’t need to do any of that.

Hey thanks for the response. The reason I think I do need to edit OnlineSessionAsyncServerSteam.cpp. Here’s a source that tells me I have to do that.

(Fyi i am doing a dedicated server)

what do you think about this? I’m pretty sure this is what’s needed to have your game show up when searching servers, and you need to do it to have your game match what you set your dedicated steam server’s name as… right?

[quote=“Ethan_Sherr, post:2031, topic:30020”]

Hey thanks for the response. The reason I think I do need to edit OnlineSessionAsyncServerSteam.cpp. Here’s a source that tells me I have to do that.
https://wiki.unrealengine.com/Dedica…er_Guide_Steam
(Fyi i am doing a dedicated server)

what do you think about this? I’m pretty sure this is what’s needed to have your game show up when searching servers, and you need to do it to have your game match what you set your dedicated steam server’s name as… right?

You are talking about dedicated servers, my setup is for general servers, its pretty much an entirely different thing, but yes, for dedicated servers you should edit that to match your steam settings.

[quote=“, post:2010, topic:30020”]

Mute should also be functional, but unregistering them is fine and stops checking them a bit earlier.

Unfortunately both muting and unregistering a remote player is not working, I can still hear people talking. Where is the best place to do such a thing? Right now I’m doing it in the GameState when game starts, on every single machine… Do I need to to something with Local User Num?

[quote=“ostinelli, post:2033, topic:30020”]

Unfortunately both muting and unregistering a remote player is not working, I can still hear people talking. Where is the best place to do such a thing? Right now I’m doing it in the GameState when game starts, on every single machine… Do I need to to something with Local User Num?

You shouldn’t no, not if there is only one, you do need to make sure that the UniqueNetID of the remote talker is valid though, if it hasn’t replicated in from the player array yet then it won’t do anything.

Are you not getting any console logs when you call it? You should be seeing one of the following log entries


        UE_LOG_ONLINE_VOICE(Log, TEXT("Muting remote talker (%s)"), *PlayerId.ToDebugString());
        UE_LOG_ONLINE_VOICE(Verbose, TEXT("Unknown remote talker (%s) specified to MuteRemoteTalker()"), *PlayerId.ToDebugString());
        UE_LOG_ONLINE_VOICE(Warning, TEXT("Invalid user specified in MuteRemoteTalker(%d)"), LocalUserNum);

You can add

DefaultEngine.ini


[Core.Log]
LogOnlineVoice=Verbose

To show the full log entries for it (IE: Unknown remote talker).

[quote=“, post:2034, topic:30020”]

You shouldn’t no, not if there is only one, you do need to make sure that the UniqueNetID of the remote talker is valid though, if it hasn’t replicated in from the player array yet then it won’t do anything.

Even if the node returns True? Anyway I do this when the game starts, after player have slotted, when everything is fully replicated…

Unfortunately I don’t see in the console because for some reason Steam does not run in the editor, no matter what I do, even when I use a Standalone mode (I’m on 4.21 now). When I do a proper build, though, everything works (steam interface, inviting to game, voice chat). I need to enable the logs for shipped builds, try it out and come back to you.

Thank you for your help…

[quote=“ostinelli, post:2035, topic:30020”]

Even if the node returns True? Anyway I do this when the game starts, after player have slotted, when everything is fully replicated…

Unfortunately I don’t see in the console because for some reason Steam does not run in the editor, no matter what I do, even when I use a Standalone mode (I’m on 4.21 now). When I do a proper build, though, everything works (steam interface, inviting to game, voice chat). I need to enable the logs for shipped builds, try it out and come back to you.

Thank you for your help…

I’ll run some tests over the weekend to verify everything again, there were some changes to allow the Voip talker to work with steam but it shouldn’t have effected that any.

Hey, I’m currently troubling with getting a running connection with steam and some strange behaviour.
Setup:
UE4.19
2 PC
2 Steam Accounts (both in the same LAN)
Steam OSS enabled
The game is late join. The server is already within the game, client shall be able to join into the running game. Server is already in the correct map while client tries to connect from MainMenu.
Presence is set to false as that only seems to create a Lobby.

When opening a server from one PC, with LAN=false


The client is able to find the server, but only when looking for LAN sessions (FindSessions LAN=true). The log also shows the LAN IP of the other computer for the found session. Trying to join that session, I only get a log spam of SetActiveLevelCollection attempted to use an out of date NetDriver: GameNetDriver until it finally times out and crashes.
The log originates from

UWorld::SetActiveLevelCollection


  
    ...
    GameState = ActiveLevelCollection->GetGameState();
    NetDriver = ActiveLevelCollection->GetNetDriver();
    DemoNetDriver = ActiveLevelCollection->GetDemoNetDriver();

    // TODO: START TEMP FIX FOR UE-42508
    if (NetDriver && NetDriver->NetDriverName != NAME_None)
    {
        UNetDriver* TempNetDriver = GEngine->FindNamedNetDriver(this, NetDriver->NetDriverName);
        if (TempNetDriver != NetDriver)
        {
            UE_LOG(LogWorld, Warning, TEXT("SetActiveLevelCollection attempted to use an out of date NetDriver: %s"), *(NetDriver->NetDriverName.ToString()));
            NetDriver = TempNetDriver;
        }
    }
    ...


The piece of code exchanges the NetDriver of the world, which seems to be an obvious issue when trying to use the SteamNetDriver to connect …

The config setup ( https://docs.unrealengine.com/en-us/…g/Online/Steam )



[/Script/Engine.GameEngine]
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")

[OnlineSubsystem]
DefaultPlatformService=Steam

[OnlineSubsystemSteam]
bEnableSteam=true
bEnabled=true
SteamAppID=924770
SteamDevAppId=924770
GameServerQueryPort=27015
bRelaunchInSteam=true
GameVersion=1.0.0.0
bVACEnabled=1
bAllowP2PPacketRelay=true
P2PConnectionTimeout=90

[/Script/OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName="OnlineSubsystemSteam.SteamNetConnection"


Other scenario:
When disabling stuff in the config:



;    [/Script/Engine.GameEngine]
;    +NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")

[OnlineSubsystem]
DefaultPlatformService=Steam

[OnlineSubsystemSteam]
bEnableSteam=true
bEnabled=true
SteamAppID=924770
SteamDevAppId=924770
GameServerQueryPort=27015
bRelaunchInSteam=true
GameVersion=1.0.0.0
bVACEnabled=1
bAllowP2PPacketRelay=true
P2PConnectionTimeout=90

;   [/Script/OnlineSubsystemSteam.SteamNetDriver]
;   NetConnectionClassName="OnlineSubsystemSteam.SteamNetConnection"


The Internet server still displays as LAN. The client tries to connect, but fails and loads the MainMenu map again. Here is the client log of this scenario:



**   // found session**
[2018.11.21-19.11.43:980][334]LogOnline: Warning: STEAM: Server response IP:192.168.1.188    ** // local IP**
[2018.11.21-19.11.44:077][340]LogOnline: Warning: STEAM: Rules response GameName_s None
[2018.11.21-19.11.44:077][340]LogOnline: Warning: STEAM: Rules response OWNINGID 76561198154464056
[2018.11.21-19.11.44:077][340]LogOnline: Warning: STEAM: Rules response OWNINGNAME xxxxxxx
[2018.11.21-19.11.44:077][340]LogOnline: Warning: STEAM: Rules response P2PADDR 76561198154464056
[2018.11.21-19.11.44:078][340]LogOnline: Warning: STEAM: Rules response P2PPORT 7777
[2018.11.21-19.11.44:078][340]LogOnline: Warning: STEAM: Rules response SESSIONFLAGS 643
[2018.11.21-19.11.44:078][340]LogOnline: Warning: STEAM: Rules refresh complete
[2018.11.21-19.11.45:964][457]LogScriptCore: Script Msg: Found a session. Ping is 22


** // trying to connect to session**
[2018.11.21-19.12.00:060][330]LogNet: Browse: steam.76561198154464056//Game/PaintWorld/Maps/MainMenu/MainMenu
[2018.11.21-19.12.00:061][330]LogTemp: Display: ParseSettings for GameNetDriver
[2018.11.21-19.12.00:061][330]LogTemp: Display: ParseSettings for IpNetDriver_1
[2018.11.21-19.12.00:061][330]LogTemp: Display: ParseSettings for PendingNetDriver
[2018.11.21-19.12.00:061][330]LogInit: SteamSockets: Socket queue 32768 / 32768
[2018.11.21-19.12.00:061][330]LogNet: Warning: Failed to init net driver ConnectURL: steam.76561198154464056//Game/PaintWorld/Maps/MainMenu/MainMenu: SteamSockets: binding to port 0 failed (0)
[2018.11.21-19.12.00:061][330]LogNet: Warning: error initializing the network stack
[2018.11.21-19.12.00:061][330]LogNet: DestroyNamedNetDriver IpNetDriver_1 [PendingNetDriver]
[2018.11.21-19.12.00:062][330]LogExit: PendingNetDriver IpNetDriver_1 shut down
[2018.11.21-19.12.00:062][330]LogNet: Warning: Travel Failure: [PendingNetGameCreateFailure]: SteamSockets: binding to port 0 failed (0)
[2018.11.21-19.12.00:062][330]LogNet: TravelFailure: PendingNetGameCreateFailure, Reason for Failure: 'SteamSockets: binding to port 0 failed (0)'
[2018.11.21-19.12.00:062][330]UtilityFunctionLibrary: WriteToLog:[None] BP_PaintProjectGameInstance_C_0: Travel error: Pending Net Game Create Failure
[2018.11.21-19.12.00:064][330]LogNet: Warning: Travel Failure: [ClientTravelFailure]:
[2018.11.21-19.12.00:064][330]LogNet: TravelFailure: ClientTravelFailure, Reason for Failure: ''
[2018.11.21-19.12.00:064][330]UtilityFunctionLibrary: WriteToLog:[None] BP_PaintProjectGameInstance_C_0: Travel error: Client Travel Failure
[2018.11.21-19.12.00:077][331]LogNet: Browse: /Game/PaintWorld/Maps/MainMenu/MainMenu?closed
[2018.11.21-19.12.00:077][331]LogNet: Failed; returning to Entry
[2018.11.21-19.12.00:078][331]LogLoad: LoadMap: /Game/PaintWorld/Maps/MainMenu/MainMenu?closed?listen


  • I found that steam requires seamless travel to be enabled in the GameMode, which is set to true. The game mode is set in the maps.
  • Trying to host a LAN game, the session does not even show up. Is it even possible to host a LAN game with steam as OSS?
  • Also tried to connect one PC to a different network with a devices that establishes a mobile network connection. Not able to find the session in this scenario.

[quote=“Rumbleball, post:2037, topic:30020”]

Hey, I’m currently troubling with getting a running connection with steam and some strange behaviour.
Setup:
UE4.19
2 PC
2 Steam Accounts (both in the same LAN)
Steam OSS enabled
The game is late join. The server is already within the game, client shall be able to join into the running game. Server is already in the correct map while client tries to connect from MainMenu.
Presence is set to false as that only seems to create a Lobby.

You need to specify lan match in the level loading, not just listen

[QUOTE]
?listen?bIsLanMatch=1

[quote=“, post:2036, topic:30020”]

I’ll run some tests over the weekend to verify everything again, there were some changes to allow the Voip talker to work with steam but it shouldn’t have effected that any.

Thank you very much. I am not using VOIPTalker yet, I want to solve this before I start using it (the point being that I want to add walkie-talkie EQ on sound). Let me know if I can help.

[quote=“, post:2038, topic:30020”]

You need to specify lan match in the level loading, not just listen

thanks will try that.

The main question though would be why the online session does not work and why it shows up as LAN. It might show up as LAN as both computers are in the same network, but not sure about that.

[quote=“Rumbleball, post:2040, topic:30020”]

thanks will try that.

The main question though would be why the online session does not work and why it shows up as LAN. It might show up as LAN as both computers are in the same network, but not sure about that.

No, I test most of my remote servers on steam across two local computers. From your post I had assumed that LAN was your goal, not the side effect?

[quote=“, post:2041, topic:30020”]

No, I test most of my remote servers on steam across two local computers. From your post I had assumed that LAN was your goal, not the side effect?

LAN was just a side question. Having trouble with Online session that shows as LAN.

[quote=“Rumbleball, post:2042, topic:30020”]

LAN was just a side question. Having trouble with Online session that shows as LAN.

Well I have the perfect article to sort this out for you and it will explain far better (and with better formatting) than I can in here.

I really should have linked to it a long time ago as questions related to it keep popping up.

TL;DR though, turn on Presence on the session.

http://www.aclockworkberry.com/ping-…ssion-results/

[quote=“, post:2032, topic:30020”]

You are talking about dedicated servers, my setup is for general servers, its pretty much an entirely different thing, but yes, for dedicated servers you should edit that to match your steam settings.

Ok fair enough I guess!

Is there anyone who knows how to check the mic of mine?
I can check which talker is speaking except me by is remote player talking.
However is local player talking with index 0 is not working.

Please help me nice guys!

Hello. I have one question. Does the UE4 network system allow creating sessions on in dedicated server on custom remote server(not Steam,Player host, etc.). I want connect to dedicated server which run on my remote PC(server) and create various sessions.That is, I want to run dedicated server on my remote computer and open sessions on it. Can I do this in one running instance of the dedicated server or will I have to launch a new dedicated server instance for each session. I looked at a lot of information but did not find an example of this , everywhere either creating a session as a player host, or an example of on Steam subsystem. I will be grateful for any lesson or tutorial related to this. As far as I understand, the Advanced Sessin plugin cannot help with this either, it creates sessions either as steam or as host.Thanks!!!

[quote=“Grant, post:2046, topic:30020”]

Hello. I have one question. Does the UE4 network system allow creating sessions on in dedicated server on custom remote server(not Steam,Player host, etc.). I want connect to dedicated server which run on my remote PC(server) and create various sessions.That is, I want to run dedicated server on my remote computer and open sessions on it. Can I do this in one running instance of the dedicated server or will I have to launch a new dedicated server instance for each session. I looked at a lot of information but did not find an example of this , everywhere either creating a session as a player host, or an example of on Steam subsystem. I will be grateful for any lesson or tutorial related to this. As far as I understand, the Advanced Sessin plugin cannot help with this either, it creates sessions either as steam or as host.Thanks!!!

Dedicated servers are built into the engine yes, but you have to compile off of a source copy of the engine to do them.

You also don’t need any subsystem besides the default NULL to run servers but they won’t be “detectable” over the internet unless you set up a master server to provide and register the servers for you.

[quote=“, post:2036, topic:30020”]

I’ll run some tests over the weekend to verify everything again, there were some changes to allow the Voip talker to work with steam but it shouldn’t have effected that any.

On the previous build (which didn’t have verbose set yet), I saw the following.

On boot:


[2018.11.27-07.22.04:454]  0]LogVoiceEngine: Error: STEAM: StopLocalVoiceProcessing: Ignoring stop request for non-owning user
[2018.11.27-07.22.04:454]  0]LogOnlineVoice: OSS: StopLocalVoiceProcessing(0) returned 0xFFFFFFFF
[2018.11.27-07.22.04:454] 0]LogOnlineVoice: OSS: Stopping networked voice for user: 0

...]

[2018.11.27-07.22.52:790][983]LogVoiceEngine: Error: STEAM: StartLocalVoiceProcessing(): Device is currently owned by another user
[2018.11.27-07.22.52:790][983]LogOnlineVoice: OSS: StartLocalProcessing(0) returned 0xFFFFFFFF
[2018.11.27-07.22.52:790][983]LogOnlineVoice: OSS: Starting networked voice for user: 0
[2018.11.27-07.22.52:790][983]LogOnlineVoice: OSS: RegisterLocalTalker(0) returned 0x00000000

I don’t do anything specific in my setup, do you know what I might look into here? Might it be related to the impossibility to mute remote players?

[quote=“, post:2043, topic:30020”]

Well I have the perfect article to sort this out for you and it will explain far better (and with better formatting) than I can in here.

I really should have linked to it a long time ago as questions related to it keep popping up.

TL;DR though, turn on Presence on the session.

http://www.aclockworkberry.com/ping-…ssion-results/

Thank you for your fast replys. Did not come to try it yet, hopefully next week.