• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Server KF2 Server Query protocol

xoru

Member
Jun 24, 2013
12
0
Hi All,

I hope a KF2 developer could possible help me out here, or someone who has gotten far with this;

I am currently writing a small PHP framework that communicates with a KF2 server over the Query port in order to retrieve information about the server for a web page I'm making for my friends. I've come a long way and discovered how to retrieve basic player information, server details, server rules and the whole protocol in general is done.

The one thing I'm looking for is a specification for the data sent back. I send the challenge request, then a request for either players, details, rules etc. however I don't quite understand the data returned from the server details request for example.

There is a comma separated string coming back, with each entry a key-value pair. The key is always one character and the value always seems to be a numeric one, however I don't know what these values mean. By deduction, I thought that 'd' was the key for the number of waves a server is set to, but I cannot be sure easily.

Is there a specification available for this information structure? Retrieving it was easy enough, however interpreting it is proving to be difficult. I now have map name, game directory, game mode etc. all done - but I would like to be able to interpret all information.

Thank you!
 
Aurien;n2321549 said:
You might have better luck getting a dev answer via Tripwaire's support/ticketing system. https://support.killingfloor2.com

Thanks for your reply. I might have a go at that, maybe they can send me a spec.

​​

omano;n2321559 said:
reinventing the wheel.

KF 2 uses a source-like protocol, you can retrieve info already by querying it like a source server. Put IP and query port of a KF 2 server here https://skillzservers.com/kf-serverquery/ and see.

Thanks for replying. Yes, and according to that spec I have implemented the protocol as I've stated in my original question. The UDP communication is fairly simple, however I am looking for a specification for the data sent back. For example the GameTags field in the page you linked is unspecified. I have all the information on that page, but cannot name all the information (and that page can't either)
 
Upvote 0
I just checked 3 empty servers and the tags, i couldn't make lot of sense of it but maybe it is a start (also if I didn't mix the tags lol but in theory no it is OK):
d:7,e:1,a:0,l:0,m:0,k:0,i:2,n:0,h:0,b:1,c:0,f:0, suicidal medium
d:4,e:1,a:0,l:0,m:0,k:0,i:1,n:0,h:0,b:1,c:0,f:0, hard short
d:7,e:1,a:0,l:0,m:0,k:0,i:3,n:0,h:0,b:1,c:0,f:0, hell short

so yeah not sure if the tags are relevant or maybe they change during game.
 
Upvote 0
omano;n2321616 said:
I just checked 3 empty servers and the tags, i couldn't make lot of sense of it but maybe it is a start (also if I didn't mix the tags lol but in theory no it is OK):


so yeah not sure if the tags are relevant or maybe they change during game.

Cheers haha! I also want to note that the 'e' field is the current wave. It will be 11 in the boss wave.
 
Upvote 0