Steam Dedicated Server FindSessions/Direct-Ip Join Fail
I'm in need of help with getting my dedicated server searchable on Steam. I populated the Application->Dedicated Server tab in the base game, and I created a dedicated server tool under my base game in Steamworks, but I do not see it the master Servers list when launched. If I populate the Application->Dedicated Server tab of the dedicated server tool itself, I WILL see it in the list, but it is still not joinable/findable by the base game (when running on another machine/steam account). Furthermore, If I check the server with https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=**MY_IP**&format=json, I see it listed, but the appid is the app id of the tool, not the base game, which is incorrect, no?
If I create a listen server from the base game launched on steam, it works as expected, and is searchable by other players. Its just the dedicated server tool that seems not to work.
Not only can I not search for the dedicated server, but I also cannot join it by direct IP either.
Note: The steam_appid.txt I add to beside the dedicated server executable holds the ID of the base game. I've been at this for over a week. Any and all helps/hint would be greatly appreciated!
asked Nov 05 '18 at 09:08 PM in Packaging & Deployment
So with the help of Psychonic in the Steamworks development Discussion group, I learned that my problem could be solved with a hack of setting the environment variables for SteamAppId and SteamGameId to the base game before initializing the Steam API (on the dedicated server). I did this by putting the following code snippet at the top of void FOnlineSubsystemSteamModule::LoadSteamModules() in OnlineSubsystemModuleSteam.cpp, ~line 118.
This allowed me to launch the dedicated server tool such that it would "spoof" (so to speak) the base game, allowing for connections to it. He mentioned that this is a technique used on some of Valve's own games. So its nasty, but it works.
answered Nov 06 '18 at 11:54 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here