Jump to content

auto-update server + download/update mods script [WINDOWS]


Recommended Posts

Hi,

I have setup dedicated server on my localhost. I setup it via Steam Dedicated Server application. Configured mods and configs manually.

Each time when there is an update of server or mod, I need to do it manually. I want to have it automated.

Here is script that I am working on for Windows.

I am not good with batch scripting, for that reason, I am seeking help with this. I will share my results for community. I am sure, that somebody will benefit from this too.

 

Here is what I have so far:

update.bat

@echo off

:: SETTINGS
set "steam=C:\steam"
set "server=C:\dst"

set "login=YOUR_STEAM_USERNAME"
set "pass=YOUR_STEAM_PASSWORD"

%steam%\steamcmd +login %login% %pass% +force_install_dir "%server%" +app_update 343050 validate +quit

:: Mods
set mods[0]=885426046
set mods[1]=928691537
set mods[2]=378160973

:: Force download
del /f %steam%\steamapps\workshop\appworkshop_322330.acf

set "x=0"
:loop
if defined mods[%x%] (

    call set "id=%%mods[%x%]%%"
    echo Downloading %id%

    echo.
    %steam%\steamcmd +login %login% %pass% +workshop_download_item 322330 %id% validate +quit
    echo.
    mklink /J "%server%\mods\workshop-%id%" "%steam%\steamapps\workshop\content\322330\%id%"
    echo.
    set /a "x+=1"
    GOTO :loop
)

 

First of all, you don't need to use your steam login to download the DST dedicated server, so just replace

On 5/29/2020 at 11:43 AM, 609745_1452790049 said:

set "login=YOUR_STEAM_USERNAME"

set "pass=YOUR_STEAM_PASSWORD"

%steam%\steamcmd +login %login% %pass% +force_install_dir "%server%" +app_update 343050 validate +quit

with

%steam%\steamcmd +login anonymous +force_install_dir "%server%" +app_update 343050 +quit

(No idea if the paths are correct, I just kept them as you provided them.)

If you have the steam authenticator enabled, the authentication code might've already screwed you over with the login there.

For a full setup Guide, check out this post:

 

Second, don't try to force download or somehow hackibly enable your mods, just use the standard functions that the dedicated server provides, as described in my Guide here:

 

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...