Steam Sockets: Which ini to edit?

In the ‘documentation’ for Steam Socket implementation, the instructions say to edit an ini file with the following:

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

The instructions say to edit an engine.ini file, but then says to edit a windowsengine.ini file. Windowsengine.ini does exist in a temp folder, but it is overridden when the game is packaged. To further the confusion, the defaultengine.ini file also contains an extremely similar script, after setting up steam implementation.

Without any mention of a filepath, i’m not sure what file i’m meant to be editing to get steam sockets to work.

2 Likes

Hi Ray_Unreal,

To answer your question directly, you should create a folder in your games’ Config folder named “Windows”, and create a file in that folder named “WindowsEngine.ini”. Example /MyGame/Config/Windows/WindowsEngine.ini.

For more context, when your game is cooked (or run in the editor), it combines the configurations from many Engine ini files into one (and does the same for Game, Editor, etc ini files). Your DefaultEngine.ini will be combined with values in your WindowsEngine.ini, but only for Windows builds. If you have Mac, Linux, or any other platform, it will not get the values that are defined in your WindowsEngine.ini file.

It’s ideal to keep your Steam configuration in the Windows/Mac/Linux Engine inis, in case you ever need to bring your game to another platform, like Xbox One, PS4, or the Nintendo Switch, for example, as you won’t be using Steam on those platforms.

Let me know if you have any more questions about this, maybe I’ll be able to help!

2 Likes

Thank you for the concise answer, Maide. The official documentation made no mention of having to create the file and folder.

I implemented your instructions yesterday and got continuous timeouts when I tried to join my server from another computer/account. Running a version of my game without the Steam Sockets plugin worked flawlessly, however, leaving me in a state of miserable distress.

But I tried again today and managed to get into the game! I don’t know why it suddenly works now…

I’ll mark this is answered. Thank you very much for your help!

1 Like