Zombie Panic! Source

Zombie Panic! Source

Not enough ratings
Managing Multiple Builds of the Game
By NeoAssassin
This guide explains how to manage multiple builds of the game through Steam and SteamCMD.
How It Works
Managing multiple builds of a game can be time-consuming and very inconvenient - but it doesn't have to be that way.

You can remove the need to switch branches and re-download things every time you want to play a different version of the game by having several copies of the game and managing them with Steam and SteamCMD. This comes at the cost of disk space, but it saves you time and bandwidth - so you decide which methods best suite you.

You'll have one build of the game that will be installed via the Steam client, which is the one that's visible in your Steam Games Library, and is the one that the Steam client will automatically update. We'll refer to this build of the game as the "main build". You can only have one "main build" installed, all other builds of the game must be managed by using SteamCMD.

For convenience, you'll likely want your main build to be the one that updates the most frequently (unstable branch gets the most updates). However, if you want your screenshots to be connected to the Zombie Panic! Source Community Hub Screenshots (so they're uploaded and viewable by users browsing there) - then you'll want your "main build" to be the build in which you're taking screenshots you want to upload there. You can still take and upload screenshots to Steam for the other builds of the game managed by SteamCMD, but I don't think these pictures will show up in the Zombie Panic! Source Community Hub Screenshots, they will be tagged as the name of the game in your Steam Library.
For the sake of keeping this guide short, I'm not going to go too in-depth about what SteamCMD is, how it works, or how to install it. Because this information is already available online, and you should be able learn how it works from Vavle's Dev Wiki - SteamCMD page.

SteamCMD is a program typically used to install and update dedicated servers, but we can also utilize it for the purpose of updating our extra builds of the game. We have to use SteamCMD to update these builds, because there is no direct link from the Steam client to these extra builds in order to enable the auto-update feature normally available to games installed through the Steam client. Only our main build, installed through the Steam client, will have the auto-update feature.

Follow the instructions on Downloading SteamCMD to install, and Running SteamCMD to update it.
Installing & Updating An Extra Build
After you've installed and updated SteamCMD, you're ready to download the extra build(s). Which we will semi-automate with scripts to make it easier to update whenever necessary.

For this, you'll navigate to your SteamCMD folder and create a new text document named appropriately for the build you're installing/updating (eg; "zps_public_update", or "zps_unstable_update"). Copy and paste the following code into the text document (and make the necessary adjustments explained below);

@ShutdownOnFailedCommand 1 @NoPromptForPassword 1 login username password force_install_dir "C:\Program Files (x86)\Steam\SteamApps\common\Zombie Panic Source Unstable" app_update 17500 -beta unstable quit

For the login, you'll need to change the username and password to the login details of your own account.

This is necessary, you cannot login as anonymous to download these updates - because otherwise it will not allow you to download the required executable file (zps.exe). (You can only download dedicated server files anonymously.)

I've read that using the same account that you're currently logged into could cause you to be logged out or something. So they suggest you use an alternate account as the login for your SteamCMD updates.
The force_install_dir is the directory that this build of ZPS will be located, name the directory appropriately to the version of the game.

This directory should be located within your Steam installation directory if you want workshop to work with your game. If the build is installed anywhere outside of your Steam installation directory, then your game will not be able to detect any workshop items.
The app_update is where you specify the version of the game you wish to download.

All versions of the game will use the base depot - "17500", this is the current public version of the game.

But you can specify a specific branch to download in this field as well, in our case this is the unstable build. Here's what you would input for app_update to install/update the unstable build;

app_update 17500 -beta unstable

In order to run the script we created above, you'll need to create a bat file that executes SteamCMD to use the script. Create a new text document in the same folder (SteamCMD folder) and name it appropriately to the build it's for (ie: "!_ZPS_Unstable_Update.bat"). Then open it up and add the following code, then save and close it;

@echo off steamcmd.exe +runscript zps_unstable_update.txt

Now you can just run this bat file to execute the script and automatically update the build. You can also create a shortcut to this on your desktop by right-clicking it and selecting "Send to -> Desktop (Create Shortcut)".
Validating an Extra Build
For validating your files, you simply just add the word "validate" to the end of the app_update line.

Validating works the same way as verifying game files, this means that any "user-made" changes like configurations are going to be overwritten and you will lose them unless you have a backup. Validating should only be used during the first install, or if you suspect the build is corrupt, or if certain files aren't updating or downloading.

So create your new text document for the script in the SteamCMD folder, and name it appropriately to the build of the game (ie: zps_public_validate.txt, or zps_unstable_validate.txt). Copy/paste the following code into that text document (and make the necessary adjustments);

@ShutdownOnFailedCommand 1 @NoPromptForPassword 1 login username password force_install_dir "C:\Program Files (x86)\Steam\SteamApps\common\Zombie Panic Source Unstable" app_update 17500 -beta unstable validate quit

Then create your bat file in order to execute the script - create a new text document and name it appropriately to the build it's for (ie: "!_ZPS_Unstable_Validate.bat", or "!_ZPS_Public_Validate.bat"). Copy/paste the following code in (make any necessary adjustments to match the file name you created);

@echo off steamcmd.exe +runscript zps_unstable_validate.txt

Now you can run this bat file whenever you need to validate your files.
Creating A Shortcut
The easiest way to create a shortcut to your extra build is to manually add it to your Steam Library.

To do this - open Steam and press the "ADD A GAME" button in the bottom left and select "Add a Non-Steam Game..", or go to the Games drop-down menu at the top and go to "Games - > Add a Non-Steam Game to My Library..."

From there - press the Browse button and navigate to the root folder of your extra build (ie: "C:\Program Files (x86)\Steam\SteamApps\common\Zombie Panic Source Public") and select "zps.exe". Then zps.exe should be listed and selected (checked) in the list, and you can press the "Add Selected Programs" button to add it to your Library.

You should then see it in your list named as "zps". Right-click it and select Properties, then you can name it appropriately to tell what it is (ie: "Zombie Panic! Source [Unstable]").

In order for the game to launch and function properly, you'll also have to set the launch options manually. To do this - right-click the build in your Steam Library and select Properties, then click the "Set Launch Options.." button. In the text box, insert the following text and then press the OK button;

-game zps -secure -steam

You'll need those launch options in order for the game to function properly. You can also set any other launch options you want, as listed and explained on the Steam Support Page - Setting Game Launch Options.

You can also add it to your favorite games by right-clicking the game in your Library and selecting "Add to Favorites".

Now you can play the extra build by selecting it in your Library and pressing "PLAY". Or you can create a desktop shortcut to use by right-clicking the game in your Library and selecting "Create Desktop Shortcut".