Multiple KSP installations with Steam (Windows)
I know a lot of the people reading r/KerbalSpaceProgram use Steam. A common problem with the Steam version of KSP is keeping multiple copies of KSP to mod it or to still keep an unmodded KSP version. You can simply copy the KSP folder, but then you loose the Steam integration.
I wanted a solution that
- kept track of my played time in Steam in all KSp installation
- allowed me to use the Steam sceenshot function
- Displayed me as "playing Kerbal Space Program" no matter which installation I started
I managed to do all that, and the solution is simple: hard links, or for Windows, junctions.
Setup:
Move your KSP folder from "C:\Program Files (x86)\Steam\SteamApps\common\Kerbal Space Program" to another location, I have mine under "C:\Games\KSP"
Then drop the below batch script into the KSP folder (the folder with the KSP.exe in it) into a file ending with .cmd or .bat, I have mine named RunViaSteam.cmd.
@ECHO off
REM Steam Application ID for Kerbal Space Program. Use 231410 for the KSP Demo.
SET appID=220200
REM Steam installation directory. Change this if necessary.
SET steamDIR=C:\Program Files (x86)\Steam
REM Directory of this KSP installation
SET currentDir=%cd%
SET targetDir=%steamDir%\SteamApps\common\Kerbal Space Program
IF "%currentDir%" == "%targetDir%" (
GOTO run_steam
)
REM Remove KSP folder from Steam
IF EXIST %targetDir% (
rmdir "%targetDir%"
)
mklink /J "%targetDir%" "%currentDir%"
:run_steam
SET steamEXE=%steamDir%\Steam.exe
"%steamEXE%" -applaunch %appID%
Now, whenever you double-click on the RunViaSteam.cmd file, it will set-up that installation of KSp isnide Steam and launch it via Steam. You can have as many installations of KSP on your computer, as long as you run them via that batch file, they will be started with Steam and full Steam integration.
Setting it up in Steam
If you don't want to have to run the batch file, but instead want to run those installations directly from within Steam, you can set that up, too.
- Click "Add a non-Steam game"
- Navigate to the desired KSP installation
- Klick the
KSP.exeand add the game - In your Steam library, search for the now new "KSP" entry, and click "Properties"
- Under "Target", change the path from ending in
KSP.exetoRunViaSteam.cmdor whatever you named the batch script - Click
Change
You can now run that installation from Steam. What happens is that Steam runs the batch script , which in turn integrates that KSP installation into Steam and tells Steam to run it.
Important
If you have multiple KSP installations set up this way, clicking the original "Kerbal Space Program" game in your Library will always run the KSP version you ran last.
You can not keep old versions of KSP this way, as updates are mandatory when using Steam
Note that the new entries for KSP will still give the "Non Steam mod or shortcut" warning, but that can be savely ignored, your time will be tracked and all steam features will be available.
Linux
You can do the same on Linux, you just need to rewrite the above script to shell script. I don't have a running desktop version of Linux with steam, otherwise I'd have done it.
Have fun and mod away!
Posted Oct 18, 2015, 12:50 PM UTC
Pretty large flaw IMO, as an update could irreversibly break a mod installation.
Nice use of junctions to get around disk writes, though.
True, but nothing that you can work-around. If you want to use Steam, that is the deal. You can still keep the old versions, you just can not launch them with Steam.