How to integrate Advanced Sessions (and fix Steam on 4.27)

So it would seem that UE4 4.27 is suffering from a critical issue regarding Steam lobbies, it has been reported here, here and here is another example, in any case, at the time of writing this, it’s still not fixed, in one of the links there is a workaround which does seem to work, but because over on Discord a lot of people asked me about integrating Advanced Sessions, I decided to deal with both problems simultaneously, fix Steam for 4.27 and at the same time integrate Advanced Sessions.

NOTE: If you already know how to integrate Advanced Sessions into a project or followed a different tutorial on how to do it, skip to step 11 and 12, those two are the only required changes.

1. Create a new FPS Game Starter Kit project

2. Go to https://vreue4.com/advanced-sessions-binaries and download Advanced Sessions for 4.27

3. Extract the content of the zip file into your projects plugins folder (if there is none, create it)

NOTE: The project in the image is called “FPSGame_SteamFix”, yours is probably named differently.

4. In the editor, go to plugins and make sure they’re enabled

Advanced Sessions, Advanced Steam Sessions, Online Subsystem Steam

5. Add a new C++ class (NOTE: this step cannot be reversed, so make sure you have a backup of your project)

6. It doesn’t really matter what class you’ll create, in this tutorial I created a Blueprint Function Library one, it’s not gonna be used anyway, it’s just to convert the project from a Blueprints one to a C++ one.

7. Once that is done, in visual studio set it to Shipping and x64, then right click on your project and Rebuild

8. Back in the editor, go to Project Settings and set Packaging to Shipping too

9. Save All and close both UE4 and Visual Studio (we don’t need it anymore)

10. Locate your project folder, and inside the Config folder, open DefaultEngine.ini and add this into it

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

[OnlineSubsystem]
DefaultPlatformService=Steam

[OnlineSubsystemSteam]
bEnabled=true
SteamDevAppId=480

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

NOTE: The 480 part is the free steam_appid one, if you have an actual steam id, use that instead of 480

11. Open the project and in BP_GameInstance where the Host event is, replace the old Create Session node with the new one from Advanced Sessions

12. Do the same with the Find Sessions node inside W_MultiplayerMenu

NOTE: Advanced Sessions has a lot of other nodes that you can use, but in this tutorial we’ll just fix host/join in 4.27, but feel free to experiment with whatever else it has to offer (friend lists, avatars, etc. check out its documentation for more details)

13. Build as usual

14. Locate the folder where you build it and inside the Binaries folder add a new text file named steam_appid.txt that contains only the number 480

15. Double check the path… it needs to be inside the BINARIES folder, where that .exe is, not the other .exe two folders before.. it’s a common mistake.

That’s it!