Sign in to follow this  
Sesstreets

Don't see server in server browser.

Recommended Posts

jacklul    91

Thanks raiser. Indeed, I'm looking for a script that checks if there's no player and a game/mod update available and if so, shutdown/update/restart the game. I'm running Linux.

 

I found no "clean" way to get the update trigger infos:

  • no players online: I could use http://dstservers.jacklul.com/ but it's not real time (1min update or so). I'd prefer a local solution like c_playerlist() but it returns nothing when run in CLI. Maybe we can get some info from Server Status mod with local API URL.
  • game/mods update available: at worse I would sync the whole game folder in a temporary +force_install_dir and checks for diffs with e.g. a command line diff tool. It would be preferable to get this info from steam/workshop API if any.

 

Another idea:

 

Start script that will start in the background, updating server before launching, running in loop (restarts the server on crash / shutdown after small delay).

Run it with: screen -dmS "DST Server" ./startscript

 

startscript:

#!/bin/bashwhile true;do     /home/steam/steamcmd.sh +@ShutdownOnFailedCommand 1 +@NoPromptForPassword 1 +login anonymous +app_update 343050 validate +quit    cd /home/steam/DSTDS/bin/ ; LD_LIBRARY_PATH=~/.local/lib ./dontstarve_dedicated_server_nullrenderer -console    sleep 10done

Adjust paths as required, LD_LIBRARY_PATH part is required for some people running 64bit linux.

 

Then mod that adds command that checks if there are players online and if not it will c_shutdown() the server so the loop from the script can start again and update the server.

 

Mod:

local _G = GLOBALlocal TheNet = _G.TheNet if TheNet and TheNet:GetIsServer() then    local function ShutdownIfEmpty()	        if table.getn(TheNet:GetClientTable()) <= 1 then            _G.c_shutdown(true)        end    end             -- http://steamcommunity.com/sharedfiles/filedetails/?id=462128393    local GetGlobal=function(gname,default)        local res=_G.rawget(_G,gname)        if default and not res then            _G.rawset(_G,gname,default)            return false        else            return res        end    end    GetGlobal("c_shutdownifempty", ShutdownIfEmpty)end

You can send commands to virtual screen without attaching it like this:

screen -S "DST Server" -p 0 -X stuff "c_shutdownifempty()$(printf \\r)"

$(printf \\r) = Enter

 

Now it's just matter of doing script that will check for update (if you look into DST scripts folder you will find URL to Klei server with versions, happy digging!) and then periodically sending command to the screen until the server process disappears / steamcmd is running or something like that.

You could probably upgrade this mod and call build-in function that actually checks for new version instead.

Edited by jacklul

Share this post


Link to post
Share on other sites
merkmerk73    4

I'm having trouble with this and wondering if anyone can help

 

I've done all the steps with a steam dedicated server. It shows up in my LAN list, but doesn't show up in the server list for my friend.

 

I've done port forwarding thru my linksys router in a wide range (10000 to 11000) but nothing works. Any ideas?

 

 

Share this post


Link to post
Share on other sites
SnowyPanda    5

I've done all the steps with a steam dedicated server. It shows up in my LAN list, but doesn't show up in the server list for my friend.

 

Having same problem.  Updated server through Steam CMD.  Only shows up in Lan Games not in Browser...

 

Any luck?

Edited by SnowyPanda

Share this post


Link to post
Share on other sites
Kooky    4

My server isn't showing up period. I've attempted to change ports, port forward, no luck. It was worknig fine yesterday.

Share this post


Link to post
Share on other sites
jramos    0

Downloaded headless server via steamcmd. Updated it. Followed two different guides, both eventually led me to the same point of launching the headless server.

 

Doesn't show in server list, for lan or main list.

 

So I download steam onto my Windows server. Install the DST server tools, run it, same settings as the headless mode, shows up fine in the steam list.

 

Problem with that is it kicks me off my game on my main computer.

 

Dig around, find the launch_preconfigured_servers.bat file. Run that, shows in server list, doesn't mess with my steam login on my main pc. Can connect and play fine.

 

It makes absolutely ZERO sense that the dedicated headless server gotten through steamcmd does not show yet the dedicated server via the steam platform does. I've launched each with the same params. I've even put the server in the DMZ to see if the forwards were broken, still no dice with headless server.

 

For now, I will use the steam platform method to run this. It's not ideal but it at least works over the steamcmd version. And yes, the headless is up-to-date. Nothing, to me, explains why headless won't show in the game list and steam app dedicated does. Same pc, same network, same settings.

Share this post


Link to post
Share on other sites

My server is no loner showing in the list, I found this in the log

[Steam] SteamGameServer_Init(8768, 11000, 27018)
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
Setting breakpad minidump AppID = 322330
[Steam] SteamGameServer_Init success

 

Share this post


Link to post
Share on other sites
agus013    0

I fixed the problem using steamcmd tool, downloaded the new server files, and I copied and pasted over the old files of the old server (except mod's file because my server uses mods), and runs ok.

There is some problem with .bat file for server update maybe.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this