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.

Xantek

Steamcmd cleans dedicated_server_mods_setup.lua file

Recommended Posts

Xantek    0

Hello

I'm setting up my dedicated server again and I came across really weird problem. I'm installing mods to my server. I have modoverrides.lua files in Cave and Master directory and my dedicated_server_mods_setup.lua file looks like this:

Quote

--There are two functions that will install mods, ServerModSetup and ServerModCollectionSetup. Put the calls to the functions in this file and they will be executed on boot.

--ServerModSetup takes a string of a specific mod's Workshop id. It will download and install the mod to your mod directory on boot.
    --The Workshop id can be found at the end of the url to the mod's Workshop page.
    --Example: http://steamcommunity.com/sharedfiles/filedetails/?id=350811795
    --ServerModSetup("350811795")
ServerModSetup("1197699346")
ServerModSetup("359020477")
ServerModSetup("362175979")
ServerModSetup("375850593")
ServerModSetup("375859599")
ServerModSetup("378160973")
ServerModSetup("378962221")
ServerModSetup("398570591")
ServerModSetup("458940297")
ServerModSetup("503919639")
ServerModSetup("617944113")
ServerModSetup("782961570")
ServerModSetup("786654500")
ServerModSetup("789639448")
--ServerModCollectionSetup takes a string of a specific mod's Workshop id. It will download all the mods in the collection and install them to the mod directory on boot.
    --The Workshop id can be found at the end of the url to the collection's Workshop page.
    --Example: http://steamcommunity.com/sharedfiles/filedetails/?id=379114180
    --ServerModCollectionSetup("379114180")

Everythink looks correct for me, but when I start my dedicated server, dedicated_server_mods_setup.lua is cleaned, so the mods are not downloaded and loaded. I have tried to disable steamcmd update and it helped, but what to do to have mods and DST server updates? Server run script below:

Quote

#!/bin/bash

steamcmd_dir="/usr/games"
install_dir="$HOME/dontstarvetogether_dedicated_server"
cluster_name="Cluster_2"
dontstarve_dir="$HOME/.klei/DoNotStarveTogether"

function fail()
{
        echo Error: "$@" >&2
        exit 1
}

function check_for_file()
{
    if [ ! -e "$1" ]; then
            fail "Missing file: $1"
    fi
}

cd "$steamcmd_dir" || fail "Missing $steamcmd_dir directory!"

check_for_file "steamcmd"
check_for_file "$dontstarve_dir/$cluster_name/cluster.ini"
check_for_file "$dontstarve_dir/$cluster_name/cluster_token.txt"
check_for_file "$dontstarve_dir/$cluster_name/Master/server.ini"
check_for_file "$dontstarve_dir/$cluster_name/Caves/server.ini"

./steamcmd +force_install_dir "$install_dir" +login anonymous +app_update 343050 validate +quit

check_for_file "$install_dir/bin"

cd "$install_dir/bin" || fail 

run_shared=(./dontstarve_dedicated_server_nullrenderer)
run_shared+=(-console)
run_shared+=(-cluster "$cluster_name")
run_shared+=(-monitor_parent_process $$)

"${run_shared[@]}" -shard Caves  | sed 's/^/Caves:  /' &
"${run_shared[@]}" -shard Master | sed 's/^/Master: /'

I'm using linux mint 18.3 64 bit.

Share this post


Link to post
Share on other sites
Daniel86268    286

It might have to do soemthing with your steamcmd command. Try removing validate from your steamcmd line and see if that works.

Validate basicially checks if all server files are on their original state, and if not resets them. Usually it should exclude configuration files that are meant to be changed, but I've seen it fail like this acouple of times.

Share this post


Link to post
Share on other sites
Daniel86268    286
10 hours ago, Xantek said:

I did that and it works well. Is validate option important in practice? 

It only comes in handy if your server files are corrupted. It's essentially Steam's "Verify game file integrity" function.

In general it's included in the update scripts, in case people messed with their game server files, and a update would break those changes, so it just reverts all changes and goes back to the vanilla working state. Mods usually shouldn't be affected, but aparently they sometimes are.

If for whatever reason your server doesn't start and throws weird (non-mod related) errors you can try a manual update with the validate option to possibly fix said issues. That said I never needed to do that on my server after a few hundred hours.

Share this post


Link to post
Share on other sites