TrueOsiris / docker-vrising

Container for V-Rising dedicated server
237 stars 63 forks source link

SaveName in ServerHostSettings.json is ignored #60

Closed ScarlettHoefler closed 4 months ago

ScarlettHoefler commented 4 months ago

Setting your save name in ServerHostSettings.json doesn't seem to work.

I'm assuming the issue comes from start.sh always setting the world name if you haven't set an environment variable:

if [ -z "$WORLDNAME" ]; then
    WORLDNAME="world1"
fi

Which later gets passed as...

-saveName "$WORLDNAME"

And so it's always defaulting to world1 unless you set a different one as an environment variable, thus meaning the JSON file is ignored entirely.

I worked around this by just using a new environment variable

TrueOsiris commented 4 months ago

fixed

override_savename=""
if [ ! -z "$WORLDNAME" ]; then
    override_savename="-saveName $WORLDNAME"
fi

...

v() {
    DISPLAY=:0.0 wine64 /mnt/vrising/server/VRisingServer.exe -persistentDataPath $p -serverName "$SERVERNAME" $override_savename -logFile "$p/$logfile" "$game_port" "$query_port" 2>&1 &
}
v