Advertisement
Guest User

Stationeers Launcher

a guest
Feb 18th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.44 KB | None | 0 0
  1. @echo off
  2. REM Variables for starting the server with preferred settings
  3. REM Assumes you have 7Zip installed for backup.
  4. set WORLD=Stationeer.MP.World
  5. set SAVEINT=300
  6. set GAMEFOLDER=e:\SteamCMD\stationeers
  7. set GAMEEXE=e:\SteamCMD\stationeers\rocketstation_DedicatedServer.exe
  8. set STEAM=e:\SteamCMD\steamcmd.exe
  9. set SAVES=e:\SteamCMD\stationeers\saves
  10. set stamp=%date:~4,2%%date:~7,2%%date:~10,4%%time:~0,2%%time:~3,2%%time:~6,2%
  11. set ZIP="c:\Program Files\7-zip\7z.exe"
  12. set BAKDIR=z:\
  13.  
  14. REM Kills the task if it's running then checks for updates and starts the game back up.
  15. REM If the game isn't running, it checks for updates and then launches.
  16. taskkill /f /im "rocketstation_DedicatedServer.exe" && goto UPDATEGAME
  17. if errorlevel 128 (
  18. goto UPDATEGAME
  19. )
  20.  
  21. :UPDATEGAME
  22. REM First line makes a quick backup of the world files and config file to a mapped drive in this case.
  23. REM Change 7zip flags as needed immediately following %ZIP%
  24. REM Script then proceeds to validate server files against SteamCMD then updates if necessary.
  25. REM Once done, sends off to start the game.
  26. %ZIP% a -mx9 %BAKDIR%%WORLD%-%stamp%.zip "%SAVES%" %GAMEFOLDER%\default.ini
  27. start %STEAM% +login anonymous +force_install_dir "%GAMEFOLDER%" +app_update 600760 validate +quit
  28. goto START
  29.  
  30. :START
  31. REM Simple.  Starts the game using the variables set above.
  32. start %GAMEEXE% -autostart -nographics -batchmode -worldname=%WORLD% -autosaveinterval=%SAVEINT% -loadworld=%WORLD%
  33. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement