ARK: Survival Evolved

ARK: Survival Evolved

View Stats:
HopHead Jul 18, 2015 @ 3:28pm
Private Server Auto Update Script w/ in-game notification
So after waiting for a solution I could no longer wait so I made this.
Disclaimer I am not a good programmer but have some knowledge.

You will need the MCRCON program to use this as is. Also this works by monitoring the game acf file in the steam folder (I have the game and the server files on the same PC) so if you are running you server on a dedicated machine this my not work for you.

This is the vbs code for the core of the script. Modify it as you wish.

I used the following directory setup

Ark Server files C:\Arkserver
Steamcmd C:\Steamcmd
Scripts C:\ArkScripts
normal steam install D:\SteamLibrary


Set objFSO = CreateObject("Scripting.FileSystemObject") Set objShell = CreateObject("WScript.Shell") Set objShellApp = CreateObject("Shell.Application") fullfilename = "D:\SteamLibrary\SteamApps\appmanifest_346110.acf" RCon = "C:\ArkScripts\launch.bat" RconPass = "PASSWORD" RconPort = "32330" SteamCMDArkStart = "C:\ArkScripts\SteamCMDArkStart.bat" UpdateCheck() Sub UpdateCheck() objShell.Run Rcon ' Open Command mode Wscript.Sleep(2000) ' Wait for 200 milli-seconds objShell.SendKeys("~") Wscript.Sleep(100) objShell.SendKeys(RconPort & "~") Wscript.Sleep(100) objShell.SendKeys(RconPass & "~") Wscript.Sleep(100) If Minute(now)<10 Then objShell.SendKeys("serverchat " & Hour(now)&":0"& Minute(Now) &" Checking for updates~") Else objShell.SendKeys("serverchat " & Hour(now)&":"& Minute(Now) &" Checking for updates~") End If Wscript.Sleep(500) objShell.SendKeys("Q~") Wscript.Sleep(250) objShell.SendKeys("~") If objFSO.FileExists(fullfilename) then Set filecomp = objFSO.GetFile(fullfilename) moddate = filecomp.DateLastModified ddiff = DateDiff("n",moddate, Now) end if If ddiff <= 30 Then Warnings() else end if End Sub Sub Warnings() objShell.Run Rcon Wscript.Sleep(2000) objShell.SendKeys("~") objShell.SendKeys(RconPort & "~") objShell.SendKeys(RconPass & "~") objShell.SendKeys("broadcast Update detected Server will shutdown in 5 Minutes~") objShell.SendKeys("serverchat Expect aprox. 10 Minutes for restart~") Wscript.Sleep(180000) objShell.SendKeys("broadcast Server will shutdown in 2 Minutes~") Wscript.Sleep(60000) objShell.SendKeys("broadcast Server will shutdown in 1 Minutes~") Wscript.Sleep(30000) objShell.SendKeys("serverchat Server will shutdown in 30 Seconds~") Wscript.Sleep(1000) objShell.SendKeys("serverchat Server will shutdown in 29 Seconds~") Wscript.Sleep(1000) objShell.SendKeys("serverchat Server will shutdown in 28 Seconds~") Wscript.Sleep(1000) objShell.SendKeys("serverchat Server will shutdown in 27 Seconds~") Wscript.Sleep(1000) objShell.SendKeys("serverchat Server will shutdown in 26 Seconds~") Wscript.Sleep(1000) objShell.SendKeys("serverchat Server will shutdown in 25 Seconds~") Wscript.Sleep(1000) objShell.SendKeys("serverchat Server will shutdown in 24 Seconds~") Wscript.Sleep(1000) objShell.SendKeys("serverchat Server will shutdown in 23 Seconds~") Wscript.Sleep(1000) objShell.SendKeys("serverchat Server will shutdown in 22 Seconds~") Wscript.Sleep(1000) objShell.SendKeys("serverchat Server will shutdown in 21 Seconds~") Wscript.Sleep(1000) objShell.SendKeys("serverchat Server will shutdown in 20 Seconds~") Wscript.Sleep(1000) objShell.SendKeys("serverchat Server will shutdown in 19 Seconds~") Wscript.Sleep(1000) objShell.SendKeys("serverchat Server will shutdown in 18 Seconds~") Wscript.Sleep(1000) objShell.SendKeys("serverchat Server will shutdown in 17 Seconds~") Wscript.Sleep(1000) objShell.SendKeys("serverchat Server will shutdown in 16 Seconds~") Wscript.Sleep(1000) objShell.SendKeys("serverchat Server will shutdown in 15 Seconds~") Wscript.Sleep(1000) objShell.SendKeys("serverchat Server will shutdown in 14 Seconds~") Wscript.Sleep(1000) objShell.SendKeys("serverchat Server will shutdown in 13 Seconds~") Wscript.Sleep(1000) objShell.SendKeys("serverchat Server will shutdown in 12 Seconds~") Wscript.Sleep(1000) objShell.SendKeys("serverchat Server will shutdown in 11 Seconds~") Wscript.Sleep(1000) objShell.SendKeys("serverchat Server will shutdown in 10 Seconds~") Wscript.Sleep(1000) objShell.SendKeys("serverchat Server will shutdown in 9 Seconds~") Wscript.Sleep(1000) objShell.SendKeys("serverchat Server will shutdown in 8 Seconds~") Wscript.Sleep(1000) objShell.SendKeys("serverchat Server will shutdown in 7 Seconds~") Wscript.Sleep(1000) objShell.SendKeys("serverchat Server will shutdown in 6 Seconds~") Wscript.Sleep(1000) objShell.SendKeys("serverchat Server will shutdown in 5 Seconds~") Wscript.Sleep(1000) objShell.SendKeys("serverchat Server will shutdown in 4 Seconds~") Wscript.Sleep(1000) objShell.SendKeys("serverchat Server will shutdown in 3 Seconds~") Wscript.Sleep(1000) objShell.SendKeys("serverchat Server will shutdown in 2 Seconds~") Wscript.Sleep(1000) objShell.SendKeys("serverchat Server will shutdown in 1 Seconds~") objShell.SendKeys("Exit~") Wscript.Sleep(1000) objShell.SendKeys("Q~") Wscript.Sleep(250) objShell.SendKeys("~") RunUpdate() End Sub Sub RunUpdate() objShell.Run "CMD" Wscript.Sleep(500) objShell.SendKeys("taskkill /im ShooterGameServer.exe~") Wscript.Sleep(500) objShell.SendKeys("exit~") Wscript.Sleep(10000) objShell.Run SteamCMDArkStart End Sub

Also modify the MCRCON launch.bat to the following put this and the MCRCON.exe in the scripts folder.

@echo off @cls @if not exist C:\ArkScripits\mcrcon.exe ( @echo ERROR: Cannot find "mcrcon.exe". Bailing out! @echo. @pause @exit ) @set /p host="Enter host (default: 127.0.0.1): " @if "%host%"=="" set host=127.0.0.1 @set /p port="Enter port (default: 25575): " @if "%port%"=="" set port=25575 @set /p passwd="Enter password: " @if "%passwd%"=="" set passwd= @echo. mcrcon.exe -t -H %host% -P %port% -p %passwd% @echo. @set "host=" @set "port=" @set "passwd=" @pause

You will need to create a batch file to run steamcmd update and relaunch Ark. I called this SteamCMDArkStart.bat put this in the script folder

@echo off CD C:\SteamCMD start /wait "" steamcmd +runscript ARKSteamcmd.txt TIMEOUT 5 CD C:\ARKServer\shootergame\Binaries\Win64 start ShooterGameServer "TheIsland?SessionName=:DI Server:?QueryPort=27015?MaxPlayers=20?ServerPassword=PASSWORD?RCONEnabled=True?RCONPort=32330?ServerAdminPassword=PASSWORD?listen" exit

That batch file calls a steamcmd script. So create a file called ARKSteamcmd.txt put this in the steamcmd folder.

// ARKSteamcmd.txt // @ShutdownOnFailedCommand 1 //set to 0 if updating multiple servers at once @NoPromptForPassword 1 login anonymous //for servers which don't need a login //login anonymous force_install_dir C:\ARKServer\ app_update 346110 validate quit

Last edited by HopHead; Jul 18, 2015 @ 3:28pm
< >
Showing 1-2 of 2 comments
HopHead Jul 18, 2015 @ 3:37pm 
Also I put a scheduled task to run every 30 min. cscript.exe c:\ArkScript\ArkUpdateCheck.vbs and set the run in to c:\ArkScript\
hybris6 Oct 29, 2015 @ 5:40am 
tag for later
< >
Showing 1-2 of 2 comments
Per page: 1530 50

Date Posted: Jul 18, 2015 @ 3:28pm
Posts: 2