Steam SDK Setup

Hi

Can I please have some guidence on how to properly setup Steam SDK configs

This guide here:

https://dev.epicgames.com/documentation/en-us/unreal-engine/online-subsystem-steam-interface-in-unreal-engine

Uses the old SteamNetDriver so its wrong

I then followed

https://dev.epicgames.com/documentation/en-us/unreal-engine/using-steam-sockets-in-unreal-engine

What is not clear is exactly where I need to put all the config changes

Because if I put them in WindowsEngine or DefaultEngine

The editor will not work properly in client/server mode with PIE. It gets stuck

The rough jist I have is this

[/Script/Engine.GameEngine]
!NetDriverDefinitions=ClearArray
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="/Script/SteamSockets.SteamSocketsNetDriver",DriverClassNameFallback="/Script/SteamSockets.SteamNetSocketsNetDriver")

[OnlineSubsystem]
DefaultPlatformService=Steam

[OnlineSubsystemSteam]
bEnabled=true
SteamDevAppId=480

Needs to go somewhere

But everywhere I put it will end up breaking the editor

Unless I trigger Play as Standalone via the editor (and I can see the Steam overlay popup)

Reading online I understand that the steam subsystem doesn’t work in editor

How am I meant to setup these configs? I was looking at EOS but that looks completely different in how its setup (we are based on Lyra, so I see LyraGameEOS)

How do I set this project up, so

  1. Editor PIE it just works with client/server
  2. Editor Standalone + Editor Server works
  3. Works in actual builds for windows game and windows/linux servers

Confusing with so many conflicting guides online

Thanks

Karl

Hi,

In this case, I believe you may want to try setting the “DriverClassNameFallback” to use the IpNetDriver: “/Script/OnlineSubsystemUtils.IpNetDriver”

In situations where the SteamSocketsNetDriver cannot be used, such as PIE, this should allow the editor to fall back on the default networking behavior, where instances are connected directly via IP. This won’t use the Steam OSS, but it will allow you to test your project’s multiplayer functionality in PIE.

We do have an open task to improve the documentation around the Steam OSS and how it should be set up and configured, and I’ll make a note about the DriverClassNameFallback in the steam sockets page.

Thanks,

Alex

Thanks
I have tried that
but the spawned server instance never replicates the game properly
and I just get stuck on the loading screen (using Lyra, so it just says game hasn’t replicated yet)

It seems to be when I run it *without *Run Under One Process checked
So it spawns a proper separate instance. Then the editor client won’t
connect

Hi,

In that case, it may be that the PIE client instance is using the IpNetDriver and the standalone editor server instance is using Steam Sockets.

You likely will need to launch both as PIE instances (i.e. with Run Under One Process checked) or both as standalone editor instances (i.e. with the “Standalone Game” play mode).

Thanks,

Alex

Right ok
Is this why epic has its own LyraGameEOS target?
Seems like its done so you have to deliberately build a separate target to enable the EOS layer & sockets & networking?

Hi,

Yes, I believe this is part of the reason, as Lyra is designed to be highly configurable and modular. Steam or EOS configs can also be used in editor instances by specifying the appropriate CustomConfig file on the command line: https://dev.epicgames.com/documentation/en\-us/unreal\-engine/common\-user\-plugin\-in\-unreal\-engine\-for\-lyra\-sample\-game\#lyraandcommonuser

Thanks,

Alex

Sorry for delayed response, studio is closed for a week for holiday

I tried the custom config approach

It seems like it does apply it, but at run time it says that the Steam OSS layer can’t be initialised

So it must be trying to init the steam layer which means the config works, but then just can’t actually initialise it

Hi,

To get a better idea as to what is going wrong, could you provide logs from when the initialization fails, with the verbosity increased for the LogNet, LogOnline, LogSockets, LogOnlineSession, LogSteamSocketsAPI, and LogSteamShared categories?

Thanks,

Alex