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