Open Game Protocol Specification v0.03

Type Name Dependency Comment
OGP Header (Query)
UINT32 Value: 0xFFFFFFFF
SzString ID Value: "OGP"
VarBitArray HeadFlags Bit 0.0: bAnswer = 0
Bit 0.1: bRequestID
Bit 0.2: bChallengeNumber
Bit 0.3: bSplit
INT32 RequestID bRequestID User definied ID to associate an answer packet with a query.
INT32 ChallengeNumber bChallengeNumber The challenge number to query the server. If the number is wrong or you don't specify one, you'll get one per answer packet. Send a challenge number of 0xFFFFFFFF to request a new.
INT16 MaxBytesPerPacket bSplit Maximum number of bytes a UDP packet may contain. Valid range: 500 - 1500.
UINT8 Type 0 - Banned
1 - None
2 - Default query v1
3 - Rcon
OGP Header (Answer)
UINT32 Value: 0xFFFFFFFF
SzString ID Value: "OGP"
VarBitArray HeadFlags Bit 0.0: bAnswer = 1
Bit 0.1: bRequestID
Bit 0.2: bChallengeNumber
Bit 0.3: bSplit
INT32 RequestID bRequestID User definied ID to associate an answer packet with a query.
INT32 ChallengeNumber bChallengeNumber Your challenge number to query the server.
INT8 SplitPacketCount bSplit
INT8 SplitPacketNo bSplit
UINT8 Type 0 - Banned
1 - None
2 - Default query v1
3 - Rcon
Default Query v1 (Query)
VarBitArray Requests Bit 0.0: bNoStaticData
Bit 0.1: bInfo
Bit 0.2: bTeamList
Bit 0.3: bPlayerList
Bit 0.4: bLimits
Bit 0.5: bMods
Bit 0.6: bRules

VarBitArray TeamFields bTeamList Bit 0.0: bName
Bit 0.1: bScore
Bit 0.2: bAveragePing
Bit 0.3: bAverageLoss
Bit 0.4: bPlayerCount
VarBitArray PlayerFields bPlayerList This field indicates which player information will be returned

Bit 0.0: bFlags
Bit 0.1: bSlot
Bit 0.2: bName
Bit 0.3: bTime
Bit 0.4: bTeam

Bit 1.0: bScore
Bit 1.1: bFrags
Bit 1.2: bKills
Bit 1.3: bDeath
Bit 1.4: bSuicides
Bit 1.5: bTeamKills

Bit 2.0: bID
Bit 2.1: bGlobalID
Bit 2.2: bPing
Bit 2.3: bLoss
Bit 2.4: bModel
Default Query v1 (Answer)
TEAMLIST TeamList bTeamList Complete team list
PLAYERLIST PlayerList bPlayerList Complete player list
TEAMLIST
VarBitArray TeamFields Bit 0.0: bName
Bit 0.1: bScore
Bit 0.2: bAveragePing
Bit 0.3: bAverageLoss
Bit 0.4: bPlayerCount
Bit 0.5: bColor
VarUINT TeamCount Player count in player list.
TEAMLISTENTRY x TeamCount List Player list
TEAMLISTENTRY
SzString Name bName
SINT32 Score bScore
UINT16 AveragePing bAveragePing
UINT16 AverageLoss bAverageLoss
UINT8 PlayerCount bPlayerCount
UINT8 Color bColor 16 default VGA Colors
PLAYERLIST
VarBitArray PlayerFields This field indicates which player information will be returned

Bit 0.0: bFlags
Bit 0.1: bSlot
Bit 0.2: bName
Bit 0.3: bTime
Bit 0.4: bTeam

Bit 1.0: bScore
Bit 1.1: bFrags
Bit 1.2: bKills
Bit 1.3: bDeath
Bit 1.4: bSuicides
Bit 1.5: bTeamKills

Bit 2.0: bID
Bit 2.1: bGlobalID
Bit 2.2: bPing
Bit 2.3: bLoss
Bit 2.4: bModel
VarUINT PlayerCount Player count in player list.
PLAYERLISTENTRY x PlayerCount List Player list
PLAYERLISTENTRY
VarBitArray PlayerFlags bFlags Bit 0.0: bAlive
Bit 0.1: bDead

Bit 1.0: bBomp
Bit 1.1: bVIP
UINT8 Slot bSlot The server slot that is used by this player.
SzString Name bName Name of the player
UINT16 Time bTime Time in seconds the player is on the server
UINT8 TeamNo bTeam The number of the team
0xFF - Spectator
SINT32 Score bScore
SINT16 Frags bFrags
VarUINT Kills bKills
VarUINT Death bDeath
VarUINT Suicides bSuicides
VarUINT TeamKills bTeamKills
UINT32 ID bID Server wide unique identifier
SzString GlobalID bGlobalID
UINT16 Ping bPing
UINT16 Loss bLoss
SzString Model bModel
VarUINT Type:
UINT8 Len8 8-Bit Length:
Len8 <= 0xFE: VarUINT data structure ends here
Len8 == 0xFF: Use the next 16-Bit length field
UINT16 Len16 Len8 == 0xFF 16-Bit Length:
Len16 <= 0xFFFE: VarUINT data structure ends here
Len16 == 0xFFFF: Use the next 32-Bit length field
UINT32 Len32 Len16 == 0xFFFF 32-Bit Length:
Len32 <= 0xFFFFFFFE: VarUINT data structure ends here
Len32 == 0xFFFFFFFF: Use the next 64-Bit length field
UINT64 Len64 Len32 == 0xFFFFFFFF 64-Bit Length:
A Len64 of 0xFFFFFFFFFFFFFFFF is reserved
VarUINT16 Type:
UINT16 Len16 16-Bit Length:
Len16 <= 0xFFFE: VarUINT data structure ends here
Len16 == 0xFFFF: Use the next 32-Bit length field
UINT32 Len32 Len16 == 0xFFFF 32-Bit Length:
Len32 <= 0xFFFFFFFE: VarUINT data structure ends here
Len32 == 0xFFFFFFFF: Use the next 64-Bit length field
UINT64 Len64 Len32 == 0xFFFFFFFF 64-Bit Length:
A Len64 of 0xFFFFFFFFFFFFFFFF is reserved
NString Type:
VarUINT Len Length of string
Char x Len String

SINTx: Signed x bit integer (intel byte order)
UINTx: Unsigned x bit integer (intel byte order)
String: Character String of unkown length
SzString: Null-Terminated string