Page 1 of 1

Getting current map and game mode from Server Console

PostPosted: Sun May 17, 2020 3:00 am
by wasabi
Hello,

Is there a way to get the current running map and gamemode either from the Server Console started by BFSM, or externally through RemoteConsole.exe?

I cannot seem to find a command that does this. game.listMaps gives me the list, but I need the actual current map name + gamemode (CQ/CTF etc).

The reason I ask is, I thought I could get this from the XML log but it seems the logger is bugged and writes GPM_CQ even if the map is actually GPM_CTF.

Thank you!

Re: Getting current map and game mode from Server Console

PostPosted: Fri Jun 26, 2020 9:00 am
by duffman
What you are looking for is in the old GameSpy on UDP port 14567.

if you send the command: \info\
will response with something like:

_check\0\dedicated\2\gameId\desertcombat\gamemode\openplaying\gametype\coop\hostname\Safe House\hostport\14567\mapId\Desertcombat\mapname\dc desertshield\maxplayers\32\numplayers\0\password\0\reservedslots\0\roundTime\-1\roundTimeRemain\-1\status\3\sv_punkbuster\0\tickets1\196\tickets2\190\unpure_mods\\version\v1.612\final\

Other commands like: \status\, \info\, \players\, \rules\, \basic\

The format of the data is pretty much:
separator=\
variable-name\value\variable-name\value\ etc..

Re: Getting current map and game mode from Server Console

PostPosted: Mon Jul 27, 2020 5:45 am
by wasabi
Thank you very much. I found a Gamespy query library in Python and was able to use it to get this information.