Getting current map and game mode from Server Console

Ask questions, discuss ideas, get answers

Getting current map and game mode from Server Console

Postby wasabi » Sun May 17, 2020 3:00 am

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!
wasabi
 
Posts: 16
Joined: Tue Apr 21, 2020 1:16 am

Re: Getting current map and game mode from Server Console

Postby duffman » Fri Jun 26, 2020 9:00 am

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..
duffman
 
Posts: 44
Joined: Tue Apr 15, 2014 8:02 am

Re: Getting current map and game mode from Server Console

Postby wasabi » Mon Jul 27, 2020 5:45 am

Thank you very much. I found a Gamespy query library in Python and was able to use it to get this information.
wasabi
 
Posts: 16
Joined: Tue Apr 21, 2020 1:16 am


Return to 1942 Modding Discussion

Who is online

Users browsing this forum: Majestic-12 [Bot] and 80 guests

cron