UE 4.27 Steam multiplayer game
Steamworks v1.51
Matchmaking and servers with PlayFab
(Using both PlayFab GSDK and PlayFab Marketplace plugins, primarily blueprints)
I am trying to create a quick play / casual matchmaking setup for our game, where the server will constantly be sending out backfill tickets to fill in the extra slots, and switching to new maps at the end of a match, so players can freely join and quit the server as it goes on. It is mostly functional right now.
Currently working:
Client sign into PlayFab using Steam
Matchmaking and server allocation
Connect to server with “open ip:port”
GSDK controlling server status Stand By → Active → Shut down
Server backfill tickets
Currently not working:
Steam online subsystem on server (fails to initialize and defaults to null)
Server travel (clients kicked on travel, incompatible unique net ids)
Is there a way to get the steam OSS working on a dedicated server with PlayFab? I am able to get it working locally with their debug tool (local multiplayer agent), or just outside of PlayFab in general, where Steam initializes and shows the correct appid. Because the server defaults to null OSS, I have to use a workaround to bypass the check on unique net ids in the game mode function PreLogin , shown here: Connecting to playfab server with steam - Playfab Community. It works for getting clients connected despite the OSS mismatch, however it doesn’t seem to work for server travel. Ideally I would like to not use this workaround and have Steam OSS on both server and client, which I imagine would fix the server travel issue, and would also allow players to join with presence and send out invites.
I tried including steam_api64.dll and steam_appid.txt with server package, but to no luck. I have ports 27015 UDP/TCP open in the server settings on PlayFab.
Any ideas on how to get this working?
(Server log)
LogSteamShared: Display: Loading Steam SDK 1.51
LogSteamShared: Steam SDK Loaded!
LogOnline: OSS: Creating online subsystem instance for: Steam
LogSteamShared: Warning: Steam Dedicated Server API failed to initialize.
LogOnline: STEAM: [AppId: 0] Game Server API initialized 0
LogOnline: Warning: STEAM: Failed to initialize Steam, this could be due to a Steam server and client running on the same machine. Try running with -NOSTEAM on the cmdline to disable.
LogOnline: Display: STEAM: OnlineSubsystemSteam::Shutdown()
LogOnline: Warning: STEAM: Steam API failed to initialize!
LogOnline: Display: STEAM: OnlineSubsystemSteam::Shutdown()
LogOnline: OSS: Unable to create OnlineSubsystem module Steam
LogOnline: OSS: Creating online subsystem instance for: NULL
I’m guessing only the first two dlls are required as I’ve seen them often referenced with Steam servers, but I added all 4 to the server package regardless. The location I put them in was "<project_name>\Binaries\Win64". I wrongfully assumed these would be wrapped up into the prerequisites when packaging with Unreal. I had to copy them over from my Steam directory (C:\Program Files (x86)\Steam).
Hi, thanks for sharing the solution. I have same issue, but I have Linux server. Do you know how can add .dll’s to linux build? And unlike you, I can’t connect the server via command line.
LogHandshake: Stateless Handshake: NetDriverDefinition 'GameNetDriver' CachedClientID: 3
LogNet: Game client on port 30000, rate 500000
LogNet: Initial Connect Diagnostics: Sent '9' packets in last '10.005468' seconds, no packets received yet.
LogNet: Initial Connect Diagnostics: Sent '10' packets in last '10.000215' seconds, no packets received yet.
LogNet: Initial Connect Diagnostics: Sent '10' packets in last '10.000233' seconds, no packets received yet.
Since I don’t know anything about Linux, I need to learn somehow
I’m getting this error on Linux Server which is same problem as you’ve mentioned.
{"log":"sh: 1: xdg-user-dir: not found\n","stream":"stderr","time":"2023-01-09T14:25:57.076360344Z"}
{"log":"dlopen failed trying to load:\n","stream":"stderr","time":"2023-01-09T14:25:57.195763422Z"}
{"log":"steamclient.so\n","stream":"stderr","time":"2023-01-09T14:25:57.195782922Z"}
{"log":"with error:\n","stream":"stderr","time":"2023-01-09T14:25:57.195787222Z"}
{"log":"steamclient.so: cannot open shared object file: No such file or directory\n","stream":"stderr","time":"2023-01-09T14:25:57.195827922Z"}
{"log":"dlopen failed trying to load:\n","stream":"stderr","time":"2023-01-09T14:25:57.196123524Z"}
{"log":"/home/ue/.steam/sdk64/steamclient.so\n","stream":"stderr","time":"2023-01-09T14:25:57.196130524Z"}
{"log":"with error:\n","stream":"stderr","time":"2023-01-09T14:25:57.196133824Z"}
{"log":"/home/ue/.steam/sdk64/steamclient.so: cannot open shared object file: No such file or directory\n","stream":"stderr","time":"2023-01-09T14:25:57.196136624Z"}
{"log":"[S_API] SteamAPI_Init(): Sys_LoadModule failed to load: /home/ue/.steam/sdk64/steamclient.so\n","stream":"stderr","time":"2023-01-09T14:25:57.196139724Z"}
{"log":"dlopen failed trying to load:\n","stream":"stderr","time":"2023-01-09T14:25:57.692564425Z"}
{"log":"steamclient.so\n","stream":"stderr","time":"2023-01-09T14:25:57.692601325Z"}
{"log":"with error:\n","stream":"stderr","time":"2023-01-09T14:25:57.692605425Z"}
{"log":"steamclient.so: cannot open shared object file: No such file or directory\n","stream":"stderr","time":"2023-01-09T14:25:57.692608825Z"}
{"log":"dlopen failed trying to load:\n","stream":"stderr","time":"2023-01-09T14:25:57.692660826Z"}
{"log":"/home/ue/.steam/sdk64/steamclient.so\n","stream":"stderr","time":"2023-01-09T14:25:57.692665826Z"}
{"log":"with error:\n","stream":"stderr","time":"2023-01-09T14:25:57.692669026Z"}
{"log":"/home/ue/.steam/sdk64/steamclient.so: cannot open shared object file: No such file or directory\n","stream":"stderr","time":"2023-01-09T14:25:57.692671926Z"}
{"log":"[S_API] SteamAPI_Init(): Sys_LoadModule failed to load: /home/ue/.steam/sdk64/steamclient.so\n","stream":"stderr","time":"2023-01-09T14:25:57.692675126Z"}