Don't Starve Together

Don't Starve Together

40 ratings
Server Status
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
29.736 KB
Aug 20, 2015 @ 11:43am
May 12, 2023 @ 4:14am
20 Change Notes ( view )

Subscribe to download
Server Status

Description
This is mainly for people hosting dedicated servers with a website/webhosting who want to display live server status on it, it can also be used to generate forum signature badge. Supports usage of two APIs at the same time. You will obviously need own web hosting and some basic PHP experience.

Status is sent on these server events:
  • phasechanged - time of day changed (day/dusk/night)
  • ms_playerjoined - player joined the world (not joined the server!)
  • ms_playerleft - player left the world (isn't called when player who didn't select a character disconnects)
  • (periodic task) - will send status every minute
You can manually send status by using c_pushstatus() command.

For advanced Usage and Configuration please LOOK HERE.

Notes / Known Issues:
- Periodic task DOES NOT run when server is paused, nothing changing on the server when it's paused anyway.
- Mods list currently doesn't show client_only mods - just like in-game.
- If one of the players doesn't select a character, and the last playing player disconnects then the last status data will contain the player that didn't select the character even if he disconnected. (pause_when_empty = true)
- (CAVES BETA) People playing on slave shard server will not be included in the main server's status data, so you're forced to parse each server status separately and then merge the data.
Popular Discussions View All (1)
0
1
Aug 20, 2015 @ 11:57am
PINNED: Usage / Configuration
Jack'lul
32 Comments
Jack'lul  [author] May 12, 2023 @ 4:30am 
I have no idea, one thing I noticed while upload is that API changed from V1 to V2 so maybe the mod is now stored elsewhere. Try steamapps\workshop\content\322330

There is no way to add anything to data array without modifying the mod itself.
RejectedGranny May 12, 2023 @ 4:24am 
Seems to be working now, at least no errors in the logs - I do not see a workshop-503330921 folder any under /mods/ - is that not being created anymore?

Also my API seems to be working fine.
In the configuration page you specificid that it's possible to push custom events - but i'm not sure how to work with that with my API
I'm running a simple python FastAPI having a simple GET method on localhost/api?data=

How can I add extra information into that "data" query being passed?

Thank you for all the help!!
Jack'lul  [author] May 12, 2023 @ 4:15am 
Oh my bad, rushed too much to get this updated.
Try now?
RejectedGranny May 12, 2023 @ 3:54am 
And I do see in the begining of the logs
[00:00:07]: Loading mod: workshop-503330921 (Server Status) Version:1.2.5

So it is updated.
RejectedGranny May 12, 2023 @ 3:53am 
I think i've updated it (not sure how - but just enabled everything again and restarted the server thinking it'll download the update, if I need to update different, please point me?)

Now it doesn't seem to create a workshop-MOD_ID folder at all (or creates and deletes it)
In the logs I see:

[string "../mods/workshop-503330921/modmain.lua"]:165: 'then' expected near 'if'

and afterwards a line

[00:00:33]: Disabling workshop-503330921 (Server Status) because it had an error.
Jack'lul  [author] May 12, 2023 @ 2:29am 
I've updated the package, check if 1.2.5 works for you
RejectedGranny May 11, 2023 @ 5:11pm 
Trying to make this mod work - getting an error on modmain.lua

[string "../mods/workshop-503330921/modmain.lua"]:164: attempt to index field 'original' (a nil value)
LUA ERROR stack traceback:
../mods/workshop-503330921/modmain.lua:164 in (upvalue) SendStatus (Lua) <114-190>
../mods/workshop-503330921/modmain.lua:198 in (local) fn (Lua) <198-198>
scripts/entityscript.lua:1152 in (method) PushEvent (Lua) <1139-1166>
...


Line 164 of modmain.lua is
" if _G.TheWorld.topology.overrides.original.preset ~= nil then"

But i'm not sure why it crashes...
Anybody knows maybe?
Jack'lul  [author] Feb 17, 2021 @ 12:09am 
Just FYI - it still works after Reap What You Sow update.
World overrides return empty for some reason though.
DoomRanger Oct 3, 2020 @ 7:48pm 
There's literally a configuration for that.
pause-server-when-empty = true
Shynaid May 9, 2020 @ 2:46pm 
Could you create a mod to pause the game when the dedicated server is empty? ?