You are not logged in.

#1 14 Feb 2008 7:58 am

Extreme Member
Registered: Mar 2007
Posts: 90

Hey, im working on BF2 now

Sup guys, long time i dont come in here, it has been long time since i actually worked on something related to BF now days. Just to let everyone know that im now working on the BF2 section of my program =P. I have already stats up and going, with signatures and everything. Currently working on retreiving server information. Here are some screens.

And this is what i want to do for BF2 also, here are the screen from the BF2142 server search.

Let me know what you think of my work... jejeje.



#2 14 Feb 2008 11:34 am

Extreme Member
Registered: Mar 2007
Posts: 90

Re: Hey, im working on BF2 now

by the way, does anyone know how to query BF2 servers, i read somewhere is using GS3, but im not so sure... what im sure, is that its now using GS4 nor GS2....

And i read somewhere that GS3 has a responce token responce system like GS4 but, on the response it doesnt comes back that much info, so im sending somthing like

0xFE 0xFD 0x09 0x04 0x05 0x06 0x07

And recieve something like this

0x09 0x04 0x05 0x06 0x07 0x48 0x00

also read something about a signed int... but nothing usefull i could find.



#3 18 Feb 2008 10:53 pm

From: Dallas TX
Registered: Jun 2006
Posts: 529

Re: Hey, im working on BF2 now

its the game spy query protocol v4.

Ive seen documentation on it but for the life of me can't seem to get it to work.  what I send looks just like what HLSW sends but I hang on the receive (and don't understand why).

the exchange is documented here (though its a UT3 page, UT3 uses the same protocol).

from what I've seen bf2 is the same, but simply skips the challenge step (and the challenge code isn't inserted into the server query, but everything else is the same from that point on).



#4 19 Feb 2008 4:37 am

Extreme Member
Registered: Mar 2007
Posts: 90

Re: Hey, im working on BF2 now

well bad news and good news,

Bad news, that page didnt help much but it had some interesting information.

Good news, is that i got it to work.

BF2 uses GS3, and BF2142 uses GS4.

The GS3 is not as complicated as GS4 but still has the same challenge response kind of thing going on.

For BF2 servers you need to do the following:

Send a UDP message = {0xFE, 0xFD, 0x9, 0xX1, 0xX2, 0xX3, 0xX4} -> fill X1, X2, X3, and X4 with some array you want, can be 1,2,3,4.

Then responce is received, it has 0x9 (your 4 0xX code here) (0xnumber here) 0x0

Then a message needs to be send by inserting the (0xnumber here) at the end. This number need to be converted to integers as it is, and then to hex, so lets say you have 0x48, so convert that to integer (48) and then convert that  integer to hex again hex(48) = 30

So the last message looks something like this

{0xFE, 0xFD, 0x0, (your 4 0xX code here), 0xFF, 0xFF, 0xFF, 0x1, (your new hex here 0xX5) }

So live example

Send: 0xFE, 0xFD, 0x9, 0x1, 0x2, 0x3, 0x4

Receive: 0x9, 0x1, 0x2, 0x3, 0x4, 0x48, 0x0

Send: 0xFE, 0xFD, 0x0, 0x1, 0x2, 0x3, 0x4, 0xFF, 0xFF, 0xFF, 0x1, 0x30

Receive: up to 3 packets with all the info. the first 16 chars are crap, except for char 14, that specifies the number of the packet, you must always wait for the 3 packets and they come like this,

The packet that has char 14 greater then 0x1 up to 0x150 then its the last packet
The packet that has char 14 is 0x0 its the first packet
The packet that has char 14 is 0x1 its the second packet

if you only receive 2 packets, then you will only have 0x0 and 0xXXX.

if you only receive 1 packet then it will have 0xXXX.

All the information is split by 0x0

when you get to players info it starts with _player and 0x0 char.

Hope this helps a bit, if you have any other questions please let me know



© 2003 - 2022 NullFX
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License