๐Ÿ‘ทBuilds

Building and deploying to a server OS

Like what you're seeing?

Support us as a GitHub Sponsor and get instant access to all our assets, exclusive tools and assets, escalated support and issue tracking and our gratitude. These articles are made possible by our GitHub Sponsors ... become a sponsor today!

Introduction

With Heathen's Steamworks Complete, there is no special code you need to write for your server build.

Heathen's assets use Unity's standard script to conditionally compile for server vs. client builds. That is when you change your build target to a Dedicated Server build our code will compile the appropriate Steam Game Server interfaces and use them in place of client interfaces.

Once you have your build you should be able to run it on your local workstation, Don't forget to put a steam_appid.txt in the root of the build next to the executable. Assuming you have configured the server settings correctly and are initializing correctly you will see output in the console describing the initialization and finally the logon of your Steam Game Server. Migrating this to a server operating system requires a few more steps.

Dependencies

Original notes from Facepunch Steam Wiki.

You will need to grab the following .dll for your build

  • steam_api64.dll

  • steamclient64.dll

  • tier0_s64.dll

  • vstdlib_s64.dll

If you are shipping your server build or using Steam CMD you can include App ID 1007 "Steamworks SDK Redist" in the depot and theoretically, that should bring in the proper dependencies based on platform.

Alternatively, you can use Steam CMD to pull these down locally to a specified install directory.

Where to find them?

You can use SteamCMD to grab them using the Steamworks SDK Redist app.

To do so simply create a text file with some commands in it that we will pass over to Steam CMD to run.

In the example below replace the <platform> with windows or linux depending on what target platform you downloading for. Finally, replace <directory with the relative path you would like the results to be installed to e.g. ../sdk_files would put the results in a file next to the context in a folder named sdk_files.

@ShutdownOnFailedCommand 1
@NoPromptForPassword 1
@sSteamCmdForcePlatformType <platform>
login anonymous
force_install_dir <directory>
app_update 1007 validate
quit

To run the files you can open a command line or create yet another bat file with the following command. Replace the <sdk_script> with the relative path for your bat file.

"SteamCmd.exe" +runscript <sdk_script>
Windows Example

sdk_script.txt

@ShutdownOnFailedCommand 1
@NoPromptForPassword 1
@sSteamCmdForcePlatformType windows
login anonymous
force_install_dir ../sdk_files
app_update 1007 validate
quit

command

"SteamCmd.exe" +runscript ../sdk_script.txt
Linux Example

sdk_script.txt

@ShutdownOnFailedCommand 1
@NoPromptForPassword 1
@sSteamCmdForcePlatformType linux
login anonymous
force_install_dir ../sdk_files
app_update 1007 validate
quit

command

"SteamCmd.exe" +runscript ../sdk_script.txt

Last updated