Talk:Server queries
SteamAppID
@Megaoerti: The change with the bot count and the unknown value can't be correct :/
Yes you're right, but i worry about the SteamAppID set as a 2 byte value 'F000'. This isn't zero?!
- F0 is in decimal 240, which stands for CS: Source (see Steam Application IDs) --King2500 14:53, 15 Aug 2005 (PDT)
- ok ... i forgot the sweet little endian of these two bytes *g* --MEGAOerti 13:17, 16 Aug 2005 (PDT)
Protocol
Source seems to handle multiple packet replies differently. It also sends the 0xFFFFFFFE header followed by the request id. But then the next byte contains the total number of packets, the one after the current packet number. Also Source does not seem to start all "actual" replies with 0xFFFFFFFF (only contained the first packet).
Is this completely right or did I miss something? If it is it will have to be updated in the main page.
--Philip 08:41, 4 Sep 2006 (PDT)
SteamAppID Again
Either I'm being blind and stupid, or do Goldsource a2s_info replies not include an AppID... I think I should point out that I may be both blind and stupid, but I'm just not seeing it
LINE | Hex | ||||||||
0000 | FF | FF | FF | FF | 6D | 31 | 39 | 34 | ....m194 |
0008 | 2E | 31 | 34 | 30 | 2E | 32 | 34 | 32 | .140.242 |
0010 | 2E | 32 | 3A | 32 | 37 | 30 | 32 | 35 | .2:27025 |
0018 | 00 | 32 | 5E | 48 | 41 | 42 | 20 | 43 | .2^HAB C |
0020 | 6C | 61 | 6E | 20 | 53 | 65 | 72 | 76 | lan Serv |
0028 | 65 | 72 | 3A | 3A | 77 | 77 | 77 | 2E | er::www. |
0030 | 32 | 68 | 61 | 62 | 2D | 70 | 72 | 6F | 2hab-pro |
0038 | 67 | 61 | 6D | 65 | 72 | 73 | 2E | 63 | gamers.c |
0040 | 6F | 2E | 6E | 72 | 3A | 3A | 00 | 63 | o.nr::.c |
0048 | 73 | 5F | 6F | 66 | 66 | 69 | 63 | 65 | s_office |
0050 | 00 | 63 | 73 | 74 | 72 | 69 | 6B | 65 | .cstrike |
0058 | 00 | 43 | 6F | 75 | 6E | 74 | 65 | 72 | .Counter |
0060 | 2D | 53 | 74 | 72 | 69 | 6B | 65 | 00 | -Strike. |
0068 | 01 | 0B | 2F | 64 | 6C | 00 | 01 | 77 | ../dl..w |
0070 | 77 | 77 | 2E | 63 | 6F | 75 | 6E | 74 | ww.count |
0078 | 65 | 72 | 2D | 73 | 74 | 72 | 69 | 6B | er-strik |
0080 | 65 | 2E | 6E | 65 | 74 | 00 | 00 | 00 | e.net... |
0088 | 01 | 00 | 00 | 00 | 00 | 9E | F7 | 0A | ........ |
0090 | 00 | 01 | 01 | 00 | .... |
--Luthias 09:05, 13 Nov 2006 (PST)
- You're right. GoldSrc server replies doesn't include an AppID. --King2500 17:32, 11 Jan 2007 (PST)
Counter-strike server reply format
I couldn't find anything about CS1.6 servers, AFAIK this is their reply format for A2S_INFO. There is more after this but I dont know what it is.
Data | Type | Comment |
---|---|---|
Type | byte | Should be equal to 'm' |
IP | string | The server's IP address and port |
Server Name | string | The server's name, eg: "Recoil NZ CS Server #1" |
Map | string | The current map being played, eg: "de_dust" |
Game Directory | string | The name of the folder containing the game files, ie: "cstrike" |
Game Description | string | A friendly string name for the game type, ie: "Counter-Strike" |
Number of players | byte | The number of players currently on the server |
Maximum players | byte | Maximum allowed players for the server |
??? | byte | A '/' |
Dedicated | byte | 'l' for listen, 'd' for dedicated |
OS | byte | Host operating system. 'l' for Linux, 'w' for Windows |
Password | byte | If set to 0x01, a password is required to join this server |
Secure | byte | If set to 0x01, this server is VAC secured |
??? | string | "www.counter-strike.net" |
More information to add to this article
The French version of this article now has more information than this one (the english version). I have asked the person that is currently updating the French article if it were possible to add the same information to the English version. If anyone else has the time to do it as well, please step forth! Perhaps we need a new template to "tag" situations such as these... a template like {{translationupdate}}, but for any language (specified when the template is used), rather than just for the English version. --Etset 14:23, 31 Jan 2008 (PST)
Bug on Rag Doll Kung Fu server reply
Sometime (actually once in two) a RDKF server will reply like this :
FF FF FF FF 49 FC 55 00 53 00 45 00 52 00 20 00 ....I.U.S.E.R. . 32 00 27 00 73 00 20 00 64 00 6F 00 6A 00 6F 00 2.'.s. .d.o.j.o. 00 00 53 6F 63 63 65 72 00 52 44 4B 46 53 6F 63 ..Soccer.RDKFSoc 63 65 72 00 52 61 67 44 6F 6C 6C 4B 75 6E 67 46 cer.RagDollKungF 75 3A 20 53 6F 63 63 65 72 00 EA 03 01 04 00 00 u: Soccer....... 77 00 00 32 2E 33 2E 30 2E 30 00 w..2.3.0.0. |
Everything is fine except the server name (in blue) : a NUL byte is inserted between each character. There is the same effect with the player names on the A2S_PLAYER query. What about? --Cortexd 17:55, 17 Feb 2008 (PST)
- I think these strings are in UTF-16 instead UTF-8 --Cortexd 19:49, 2 Mar 2008 (PST)
GoldSource RCON Protocol
Hi all,
This is probably an old topic - but is there any definitions for "GoldSource" aka "Classic" rcon packet requests/responses. Is this the correct place to start one ?
I am slowly working my way through the protocol so I may be able to contribute in some areas as well.
cheers will Beattie Wlbeattie 19:04, 6 Mar 2008 (PST)
Player connection time
Does anyone know what a player connection time of -1 (0x000080bf) stands for? Maybe someting like "is connecting"? --Koraktor 23:55, 7 Aug 2008 (PDT)
- Bots I think. --TomEdwards 09:26, 8 Aug 2008 (PDT)
A2S_SERVERQUERY_GETCHALLENGE not working since last HLDS update
GoldSrc servers do not respond to A2S_SERVERQUERY_GETCHALLENGE requests since the last HLDS update (GoldSrc protocol version 48). Does anyone know what has changed? Or is this a bug? --Koraktor 07:42, 2 Nov 2008 (PST)
Indeed, kept me busy for quite some time too, but got the solution with the help of some others:
I'm using the function below. If you look closely you discover that the 5th byte has changed to 55 instead of 57 and it's now followed by 4 times \xFF .... dunno how, why and so on, but it works!
function getQuery($queryType) { switch($queryType) { case "A2S_SERVERQUERY_GETCHALLENGE": return "\xFF\xFF\xFF\xFF\x55\xFF\xFF\xFF\xFF"; break; case "A2S_INFO": return "\xFF\xFF\xFF\xFFTSource Engine Query\x00"; break; case "A2S_PLAYER": return sprintf("\xFF\xFF\xFF\xFF\x55%s", $this->getChallenge()); break; } }
Hope this works for you too :) —Unsigned comment added by Ouwe tosti (talk • contribs) Always sign your posts with four tildes (~~~~)
"Does anyone know what has changed? Or is this a bug?"
Current protocol 48 bugs:
- A2S_SERVERQUERY_GETCHALLENGE does not work at all, use A2S_PLAYER or A2S_RULES instead with ffffffffh (-1) as challenge.
- The map name from A2S_INFO is only updated when players are present.
- Hostname and bot flag from A2S_INFO are only updated when the map changes.
- Server rules from A2S_RULES, like amx_nextmap or mp_timeleft, are only updated when the map changes.
- mp_timelimit is off by a few minutes (only the value returned by A2S_RULES, rcon is ok though).
- bot count is now a bot flag, 1 means there were only bots during map change.
I'm not exactly sure which part of the query info gets updated when so take these bug descriptions with a grain of salt. Example, I join an empty server and the map name gets updated, but mp_timeleft is still wrong. I join a server with bots that also has a plugin that updates the server name with the time left, but only the map name gets updated via the query, not the hostname. (You can check the actual full-length hostname by typing status in console.)
--pizzahut 23:30, 2 Nov 2008 (PST)
Looks like all GoldSource servers are responding with the Source protocol format. You will have to use appids to tell source/goldsource servers apart (IE CS/CSS). --The MAZZTer 09:47, 9 Nov 2008 (PST)
A2S_SERVERQUERY_GETCHALLENGE seems to be ignored, because it is changed. It is now 0x55 instead of 0x57 (and Steam seems to send an extra Int32 0 after it, not sure what that is). --The MAZZTer 13:52, 10 Nov 2008 (PST)
- The A2S_SERVERQUERY_GETCHALLENGE hasn't "changed", it stopped working with the update. Steam apparently never used it. The header 0x55 belongs to a A2S_PLAYER request. The additional (long) 0 is an invalid challenge, therefore the server responds with a S2C_CHALLENGE containing a valid challenge. --Koraktor 10:06, 13 Nov 2008 (PST)