Hey all, it has come to this, asking for help haha.
I have followed some tutorials to get started, and from there I have read all the docs I can find, but I just cannot get join session to work when using Advanced Session Plugin with the OnlineSubsystemSteam.
Let me lay out what I have done so far.
Advanced Session Plugin, downloaded from here, for unreal 5.3.2 (the version I am using)
https://vreue4.com/advanced-sessions-binaries
Advanced sessions and Advanced Steam Session plugins are enabled and accessible in the editor.
Added these settings (and more, will get to that later) to begin with to defaultengine.ini.
[/Script/Engine.GameEngine]
+NetDriverDefinitions=(DefName="GameNetDriver", DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")
[OnlineSubsystem]
DefaultPlatformService=Steam
PollingIntervalInMs=20
[OnlineSubsystemSteam]
bEnableSteam=true
SteamDevAppId=480
[/Script/OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName="OnlineSubsystemSteam.SteamNetConnection"
Additionally, adding
OnlineSubsystem
OnlineSubsystemUtils
To PublicDependencyModuleNames
and
OnlineSubsystemSteam
To DynamicallyLoadedModuleNames
in build.cs
With the above complete, when running standalone mode from the editor, I can see and interact with the steam overlay.
From there, I went ahead and hooked up the session functionality to my menu system.
When a user creates a lobby, the blueprint looks as such:
When a user clicks to open the lobby browser, it looks like this:
Now up to this point, everything works fantastically.
Inside the lobby, the host can open a steam friends list dialog, and send invites (and the recipient actually gets the invite, and the blueprints that accepts the invite in game on the client is run [but join session fails there]).
Inside the lobby browser, the client can see the session, including every single one of my āExtra Settingsā parameters. So that data is send entirely correctly.
And lastly, where is all falls apart, is the actual āJoin Sessionā node.
Alright, so from what I understand, this is all pretty much correct, but join lobby simply does nothing.
This all works when running 2 āplay standaloneā PIE mode games are launched, although without steam. It will use the fallback net driver.
Just to add some clarity to my methods:
I am running the editor by launching it via my visual studio solution.
I have visual studio, and all my project files on 2 separate PCās using 2 separate steam accounts, both of which are logged in.
Both PCās can make a lobby, and see their steam friends, and their own steam nickname and avatar in game.
Both PCās have windows firewall entirely OFF for testing this.
I have found sparse information about this topic, everyone with problems seems to find different solutions, and I have tried pretty much all of them. Other things I have tried:
Random defaultengine.ini settings, from various discussions, including the following:
[/Script/Engine.GameEngine]
+NetDriverDefinitions=(DefName="GameNetDriver", DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")
[OnlineSubsystem]
DefaultPlatformService=Steam
PollingIntervalInMs=20
[URL]
Port=27015
PeerPort=27015
QueryPort=27015
[OnlineSubsystemSteam]
bUseSessionPresenceAttribute=True
bEnableSteam=true
bEnabled=true
SteamDevAppId=480
SteamAppId=480
GameServerQueryPort=27015
GameVersion=1.0.0.0
bRelaunchInSteam=false
P2PConnectionTimeout=30
bInitServerOnClient=true
bUseSteamNetworking=true
bAllowP2PPacketRelay=true
[SystemSettings]
net.CurrentHandshakeVersion=2
net.MinHandshakeVersion=2
net.VerifyNetSessionID=0
net.VerifyNetClientID=0
[ConsoleVariables]
net.CurrentHandshakeVersion=2
net.MinHandshakeVersion=2
[/Script/OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName="OnlineSubsystemSteam.SteamNetConnection"
[OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName="OnlineSubsystemSteam.SteamNetConnection"
The settings
[ConsoleVariables]
net.CurrentHandshakeVersion=2
net.MinHandshakeVersion=2
come from this stackoverflow page
I have not tried the other suggestion, but honestly, its not even clear to me if steam subsystem in unreal is using steam sockets, isnāt that a different plugin entirely? It seems this issue was corrected in 5.4. Upgrading is an option to see if it fixes this problem.
Other things I have looked over, include this page from reddit:
https://www.reddit.com/r/unrealengine/comments/h9rl7o/my_unsuccessful_experience_so_far_trying_to_setup/
This details much the same issue, however this problem seemed to only be with dedicated servers. I am not using dedicated servers.
In this post they mention āSetting up steam subsystemā, including downloading the steam SDK - I donāt feel this is relevant anymore, I believe the advanced session plugin handle this, at least from what I have seen on tutorials I have followed. Can anyone confirm?
Additionally, trying to debug this on my own, using logs to track the flow through the FOnlineSessionSteam class, it considers the session valid, and adds it to its AsyncQueue system
FOnlineAsyncTaskSteamJoinLobby* NewTask = new FOnlineAsyncTaskSteamJoinLobby(SteamSubsystem, Session->SessionName, *SteamSessionInfo->SessionId);
SteamSubsystem->QueueAsyncTask(NewTask);
I have tried more things, but I did not start documenting things until I realized just how stuck I was getting.
To summarize,
Steam works inside both games on both PCs for hosting and browsing sessions, including sending and receiving of the extra settings structure array, which is viewable on the client.
After creating a session, the game transitions to a new level with the listen option.
Join session returns successful, but doesnāt actually do anything.
I have pretty much exhausted my google fu on this matter. I really hope someone can help me.
Thanks in advance <3