C>S 0x1C SID_STARTADVEX3
Transport Layer: | Transmission Control Protocol (TCP) |
---|---|
Application Layer: | Battle.net v1 TCP Messages (SID) |
Message Id: | 0x1C |
Message Name: | SID_STARTADVEX3 |
Direction: | Client to Server |
Options: | In Research |
Used By: | Starcraft Original, Starcraft Broodwar Starcraft Shareware, Starcraft Japanese Diablo Retail, Diablo Shareware Diablo II, Diablo II Lord of Destruction Warcraft II BNE, Warcraft III Reign of Chaos Warcraft III The Frozen Throne |
Message Format: (does not include protocol header) |
|
Remarks
Used by clients to inform the server that a game has been created, or that the state of a created game has changed.
Previous incarnations of this message are SID_STARTADVEX and SID_STARTADVEX2.
Game State
Bitwise flags:
0x01: Game is private
0x02: Game is full
0x04: Game contains players (other than creator)
0x08: Game is in progress
0x10: Disconnect counts as loss (Ladder?)
0x80: Game is a replay
Game Elapsed Time
This is set to 0 in Diablo 2.
Game Type
On Diablo 2 (Open Battle.net), this is set to 4
.
On Diablo 2 (Closed Battle.net), this is set to 0
.
0x02: Melee
0x03: Free for All
0x04: 1 vs 1
0x05: Capture The Flag
0x06: Greed (Resources, 0x01: 2500, 0x02: 500, 0x03: 7500, 0x04: 10000)
0x07: Slaughter (Minutes, 0x01: 15, 0x02: 30, 0x03: 45, 0x04: 60)
0x08: Sudden Death
0x09: Ladder (Disconnects, 0x00: Not a loss, 0x01: Counts as a loss)
0x10: Iron Man Ladder (W2BN only)
0x0A: Use Map Settings
0x0B: Team Melee (Number Of Teams, 0x01: 2 Teams, 0x02: 3 Teams, etc.)
0x0C: Team Free For All (Number Of Teams, 0x01: 2 Teams, 0x02: 3 Teams, etc.)
0x0D: Team Capture The Flag (Number Of Teams, 0x01: 2 Teams, 0x02: 3 Teams, etc.)
0x0F: Top vs. Bottom (Number Of Teams, 1-7 specifies the ratio of players belonging to both teams)
0x20: PGL
Sub Game Type
Sub Game Type
appears to be 0x01
for all game types except Top vs Bottom, where it seems to depend on the size of each team. More research will be needed to confirm.
This is set to 0 in Diablo 2.
Provider Version Constant
StarCraft 1.16.1 uses 0xFF
, previous versions are known to have used 0x1F
.
This is set to 0 in Diablo 2 and StarCraft Shareware.
Ladder Type
Ladder Type
is possibly bitwise, and that 0x02
means Iron Man and 0x03
just means Iron Man + Ladder.
This is set to 0 in Diablo 2.
0x00: Game is Normal (Non-Ladder)
0x01: Game is Ladder
0x03: Game is Iron Man Ladder (W2BN only)
Game Statstring
The format for this field varies between games.
See Game Statstrings for more information.
Comments
Statstring:
For Values in the Statstring (PacketLog it for the format of it)
MapSize=Size of Map ex) 44
GameSpeed=The speed of game Format is a 1 digit number see below
0 = Slowest 1 = Slower 2 = Slow 3 = Normal 4 = Fast 5 = Faster 6 = Fastest
MapIcon=Icon of the map Format is 1 digit number see below
1 = Blizz icon , 2 = Ladder icon , 3 = Green GF icon , 4 = KBK icon
GameType=The type of game Format is a one digit charecter see below
2 = Melee , 3 = FFA , 4 = 1 on 1 , 9 = Ladder , a = UMS , f = Top vs Bottom
[After GameType you would see something like , ",,1" & ",34eab02f,"
1 is believed to be no game penalty on disc and 0 would then be game penalty on disc and the alphanumeric thing after seems to be a timestamp maybe..
]
MapType=Type of map weather sc or bw 4 = SC 5 = BW
Username=Username of the host of the game (Can be spoofed)
MapName=The name of the map itself ( i.e The Hunters)
still waiting for someone to bring over the old bnetdocs's page on game statstrings
i might do it today after i get some stuff done
Brought it over.
yeh I thought that alphanumeric was sometype of map checksum; someone know how it is derived?
i've tested it with various different checksum functions (almost all the CRC's i could find) me and don found out that the check sum is actually different from computer to computer and product to product.... so im not quite sure how it's derived but seems to depend on some client side element also...
Are you both even sure it's the map checksum?
so it still could be a timestamp? w/e it is, people can still join the game even if you use the same value for all ur maps
Yea, a timestamp makes more sense.
that's a very large time stamp... timestamp doesn't make since because it doesn't change based on filetime, we proved that when we tested it with kyro's map (same exact one as mine)..
both me and kyro had the same exact map with the same exact filetime and all together got 2 different values... which is what leads me to believe its a hash of the map and some other element of the computer either username or ip or something hmm i haven't tested this using a different username
It would be cool to make Ripple Chat Bot enter a game... but the Packet Builder it has restricts that in a way that's not cool.
I did some packet analyzing and I found that when you host a replay game, the value 0x81 is used for the game state. And when you close all the available slots the value is 0x06.
Also, 0x04 does not mean the game contains players necisary, it could also mean that the game contains slots that are filled, either by a computer or a closed slot. So, if you close all available slots, and open one... it refreshes the game, because starcraft will update b.net on the status.
Also, the Unknown DWORD I always get the value FF.
Parameter is more like SubType.
Values for GameType/SubType
2 Melee
3 Free For All
4 One on One
5 Capture The Flag
6 Greed
-- SubType: Resources (1 = 2500; 2 = 5000; 3 = 7500; 4 = 10000)
7 Slaughter
-- SubType: Minutes (1 = 15; 2 = 30; 3 = 45; 4 = 60)
8 Sudden Death
9 Ladder
-- SubType: Disconnects (Specifies if a disconnect is counted as a loss or not)
10 Use Map Settings
11 Team Melee
-- SubType: Number Of Teams (1 = 2; 2 = 3; 3 = 4)
12 Team Free For All
-- SubType: Number Of Teams (1 = 2; 2 = 3; 3 = 4)
13 Team Capture The Flag
-- SubType: Number Of Teams (1 = 2; 2 = 3; 3 = 4)
15 Top Vs. Bottom
-- SubType: Teams (1-7 specifies the ratio of players belonging to both teams)
16 Iron Man Ladder
32 PGL
Those values apply to Starcraft and W2BN
Updated according to Herinermann's documentation and Frost's documentation.
Thank you for your contributions.
Missing 0x80 state bitwise flag. It means a replay game.
Also, the provider version constant (Gotten from storm network provider information structure +0x28) may not be 0xFF in all games and all version. It is 0xFF in the current version of Starcraft: Broodwar, however.
Added the missing flag and stuck a note in there about the provider version constant.
For D2XP: The game state, uptime, type, sub type, provider, and ladder type are all set to 0x00, Only the game name, password, and description are sent. In addition, the server does not appear to respond to this packet.
For Game Type, PvPGN lists PGL as 0x0E.
00000000 FF 1C 2C 00 01 00 00 00 - 00 00 00 00 08 00 00 00 ..,.............
00000010 00 00 00 00 00 00 00 00 - 41 73 64 66 00 41 73 64 ........Asdf.Asd
00000020 66 00 31 66 64 20 61 73 - 20 64 66 00 f.1fd as df.
Provider version on SSHR is 0x00000000
On Diablo 2 (Open Battle.net), the server responds back with SID_STARTADVEX3 and then the client sends SID_LEAVECHAT. No SID_NOTIFYJOIN packet is sent.
On Diablo 2 (Closed Battle.net), the server does not respond to this packet. The client immediately sends SID_NOTIFYJOIN followed by SID_LEAVECHAT.