Extract current server player count

Enhance your gameplay with these tools. This category is also the right place for tools useful for modders.
Mod databases, calculators, cheatsheets, multiplayer, scripts, libs and other useful stuff that is not strictly in-game mods.
Post Reply
xXDarkVikingXx
Manual Inserter
Manual Inserter
Posts: 3
Joined: Fri Sep 23, 2016 1:04 pm
Contact:

Extract current server player count

Post by xXDarkVikingXx »

Hi,

I'm currently making a little script for my website that supplies the player counts of all game servers running on the machine (minecraft, factorio etc).
Now to do this for minecraft I simply sniffed out the TCP package with wireshark, and the returned package from the server contains all info, including the player count.
However, for direct connect in factorio, you dont get the player count returned, only the MotD and some other stuff.
Now there is the server browser, but for that I'd have to authenticate with my credentials, which makes this much more complicated. You can't intercept the package there since it's TLS encrypted (thank god).

Question is, how else can I get that number? A mod would probably work, but again thats quite a lot of work and brings new problems.

User avatar
Therax
Filter Inserter
Filter Inserter
Posts: 470
Joined: Sun May 21, 2017 6:28 pm
Contact:

Re: Extract current server player count

Post by Therax »

Do you run your server with RCON enabled? If so it's as simple as sending the "/players online count" command via the RCON interface.
Miniloader — UPS-friendly 1x1 loaders
Bulk Rail Loaders — Rapid train loading and unloading
Beltlayer & Pipelayer — Route items and fluids freely underground

xXDarkVikingXx
Manual Inserter
Manual Inserter
Posts: 3
Joined: Fri Sep 23, 2016 1:04 pm
Contact:

Re: Extract current server player count

Post by xXDarkVikingXx »

I don't, but it won't be a problem setting it up real quick, this should do exactly what i was looking for, I didn't think of RCON, thank you so much!

Post Reply

Return to “Tools”