I’ve looked at various guides, including the excellent Wiki on how to build the dedicated server. I have successfully done this and tested it outside of Steam and it all works perfectly.
I want to now distribute the dedicated server in Steam as a separate tool to the main game (i.e. you go to library->tools and install from there). I have looked at the following guides on how to achieve this:
I have created a second application of type “tool”, and under the installation options I selected the Steam Dedicated Server packages to be included. I created a depot for it and configured the Content Builder script files accordingly.
The problem now is that from what I understand, with UE4 the dedicated server only works when the GameServer.exe file is placed in the binaries folder alongside the main installation folder. My game is currently 6.5gb in size, so I want to avoid a situation where I have to effectively duplicate the app on Steam and just change the exe being called when launched, otherwise someone who wants to host a dedicated server and play the game on the same machine will have to basically install the game twice. A huge waste when the only difference is which executable is run.
The second guide implies that you only need to distribute the dedicated server binaries in the second app that I created, but if I do this then the program fails to start because I’m basically running the server exe without any game files available (it installs to a different directory entirely).
I have tried searching to see if there is a way to have it drop the dedicated server exe into the existing game directory and run it from there if you choose to install and launch it, but I can’t seem to find any information, just loads of guides on how to change where Steam installs your games. The problem here is that it treats the dedicated server as a completely separate installation with its own directory, with no dependencies on having the main game installed.
What I want to know is:
Does anyone know how to configure my app/depot so that it deploys the dedicated server binaries in the main game directory instead of its own? Would the dependency on the main game being installed be flagged in Steam as well?
Alternatively, is there a way to create a minimalist, special dedicated server build of the game which cuts down the content so it’s much smaller? Other dedicated servers I see in the tools list are only 500mb in size, presumably they have some cut-down version of the game without the assets you don’t need to run a dedicated server. The first guide above ends up building the complete version of the game which seems wasteful
Thanks for any advice!