Game Statstrings
This document covers the game advertisement statstrings for the various Blizzard games and goes into detail on each one for each game.
STAR/SEXP, JSTR, SSHR, and W2BN statstrings are comma delimited, and most fields can be null as they have default values. Each field is in a different format, but they all stick to numeric integers, hexadecimal strings (in lowercase), or plaintext strings. The encoding Latin1
is recommended for correct viewing; map names may be in UTF-8
or anything else, but will still show up as Latin1
to the client.
JSTR, SSHR, and W2BN parameters generally follow the same format and meaning as STAR/SEXP, except where otherwise noted.
STAR/SEXP
- Saved game
- Null: This game is not saved.
- Hex string: This is a saved game. A
UINT32
, probably a checksum of the save file.
- Map size
- Null: 256x256
- Two digit number: width and height of the map, divided by 32.
- Ex:
43 = 4*32 x 3*32 = 128x96
- Ex:
- Max players
- Null: 8 players
- Value: Number of players allowed on the map, plus 10.
- Ex: 16 = 6 players
- Speed
- 0x00: Slowest
- 0x01: Slower
- 0x02: Slow
- 0x03: Normal
- 0x04/Null: Fast
- 0x05: Faster
- 0x06: Fastest
- Approval
- 0x00: Not Approved
- 0x01: Blizzard Approved
- 0x02: Ladder Approved
- 0x03: PGL Approved
- 0x04: KBK Approved
- 0x05: CompUSA Approved
- Game type
- 0x02: Melee
- 0x03: Free For All
- 0x04: One vs One
- 0x05: Capture the Flag
- 0x06: Greed
- 0x07: Slaughter
- 0x08: Sudden Death
- 0x09: Ladder
- 0x0A: Use Map Settings
- 0x0B: Team Melee
- 0x0C: Team Free For All
- 0x0D: Team Capture the Flag
- 0x0F: Top vs Bottom
- 0x20: PGL
- Unknown
- This field has only been observed to be Null.
- Game parameter, based on game type
- This field is based on the Game Type
- Melee, Free for All, One vs One, Capture the Flag, Sudden Death, Use Map Settings, PGL
- 0x01: None
- Greed
- 0x01: 2500 resources
- 0x02: 5000 resources
- 0x03: 7500 resources
- 0x04: 10000 resources
- Slaughter
- 0x01: 15 minutes
- 0x02: 30 minutes
- 0x03: 45 minutes
- 0x04: 60 minutes
- Ladder
- 0x01: None
- 0x02: Disconnect counts as a loss
- Team Melee, Team Free for All, Team Capture the Flag
- 0x01: 2 teams
- 0x02: 3 teams
- 0x03: 4 teams
- Top vs Bottom
- Team ratios, as gathered by the following equation:
val[7] vs (val[2] - 10 - val[7])
- Ex: if
(val[2] = 16, val[7] = 2)
, then "2 vs 4"
- Team ratios, as gathered by the following equation:
- CD-Key checksum
- This is a hex string
UINT32
checksum of the creator's CD-Key as generated by call to #502 in Storm.dll (SStrHash
).
- This is a hex string
- Tileset
- 0x00/Null: Badlands
- 0x01: Space Platform
- 0x02: Installation
- 0x03: Ashworld
- 0x04: Jungle
- 0x05: Desert
- 0x06: Arctic
- 0x07: Twilight
- Replay
- 0x00/Null: Not a replay
- 0x01: Is a replay
- Creator/Map
- Format: Game's creator +
0x0D
+ map name +0x0D
- Format: Game's creator +
JSTR
- Saved game
- Map size
- Max players
- Speed
- Approval
- Game type
- Game parameters
- CD key checksum
- Tileset
- Creator + Map
SSHR
- Null (empty)
- Map size
- Max players
- Speed
- Approval
- Game type
- 0x02: Melee
- Game parameters
- 0x01: None
- Checksum
- This is a hex string UINT32 checksum that seems to always be 2ac374b3, probably because SSHR has no CDKey.
- Tileset
- 0x00/Null: Badlands
- Creator + Map
W2BN
- Saved game
- Map size
- Max players
- Speed
- 0x00: Slowest
- 0x01: Even Slower
- 0x02: Slower
- 0x03: Slow
- 0x04: Normal
- 0x05/Null: Fast
- 0x06: Faster
- 0x07: Even Faster
- 0x08: Fastest
- Approval
- Game type
- 0x02: Melee
- 0x03: Free for All
- 0x04: One vs One
- 0x09: Ladder
- 0x0A: Use Map Settings
- 0x0F: Top vs Bottom
- 0x10: Iron Man Ladder
- Game parameter
- CD-Key checksum
- Game settings
- This field is a bitwise-based hex string, containing specific game settings.
- Each section has a bitwise mask, which should be applied to read the setting. 'Bitwise' fields may be combined, 'specific' fields can only have one option.
- Options - 0xF00 (bitwise)
- 0x200: One Peon
- 0x400: Fixed Order
- Resources - 0x23000 (specific)
- 0x00/Null: Default
- 0x1000: Low
- 0x2000: Medium
- 0x3000: High
- 0x20000: Random
- Tileset - 0x1C000 (specific)
- 0x00/Null: Default
- 0x4000: Forest
- 0x8000: Winter
- 0xC000: Wasteland
- 0x14000: Random
- 0x1C000: Orc Swamp
- Options - 0xF00 (bitwise)
- Creator + Map
DRTL/DSHR
Diablo Statstrings are instead [0x0D] delimited and use the following pattern:
- Difficulty
- 0x00: Normal
- 0x01: Nightmare
- 0x02: Hell
- Creator
- The name of the game's creator
- Creator Statstring
- The statstring of the game's creator. See Chat Statstrings for the format of this field.
D2DV/D2XP
- Open Battle.net: '4' + Game Description
- Closed Battle.net: (UINT8) 0x00 (0x01 and 0x02 have previously been seen)
WAR3/W3XP
Warcraft III games use a completely different format for SID_GETADVLISTEX, and do not contain a "Statstring" in the classic sense.
Comments
If the map name has a 0x0D or a 0x0A, then others will not be able to join.
They will receive a "Unable to join game." message from Battle.net and the information screen will be blank.
(Tested on Starcraft Broodwar)
Im going to play safe and assume that this is because Starcraft cannot parse the invalid statstring.
I have done some packet analyzing and I found out the first unknown value. It is the number of players allowed on the map. If the value is blank, then it is an 8 player map, values 12-17 are 2 player maps - 7 player maps.
And #7 does not seem to be the checksum of the map, since it seems to be the same value for me no matter what map I pick.
The other unknown value is set to 1 for a replay game, and set to blank if not.
Also, there is a parameter that lies before the map size... before the first comma and after the game password. The field contains a DWORD in it only when you host a saved game. I am not sure what this data means.
The statstring format for Starcraft needs to be updated... I made my bot send the SID_STARTADVEX3 following these specifications and it had the blank info come up.
Now, that is not saying I do not have a working statstring, because I do. I may find time later on to update this with my working statstring, and ansichart's findings.
Got this info regarding Starcraft Shareware games. Will be doing the rest of them soon as well:
Game Statstring: ,33,12,6,,2,1,2ac374b3,,RealityRipple(0x0D)Byways(0x0D)
Map Size: 33 332,332 96x96
Players: 12 2 players
Game Speed: 6 Fastest
Approval: - Not Implemented/No Approval/Unknown
Game Type: 2 Melee
Parameter: 1 See above Parameter
Checksum: 2ac374b3
Tileset: blank Badlands
Creator: RealityRipple
MapName: Byways
As for the checksum, http://forum.valhallalegends.com/index.php?topic=17702.msg182264#msg182264 will explain how it is created.
That looks about right.
Going to check back on these, it's from old research of mine.
DRTL:
Status: 0
Game Type: 7
Language ID: 67698688
Address Family: 0
Port: 2
Host IP: -1290215401
???: 0
???2: 0
Game Status: 0
Time Elapsed: 101580800
Game Name: asdf
Game Pass:
Game Statstring: 0
Host: UssRustolium16 LTRD 19 0 0 101 16 79 105 19312 0
7: the Hex Dword is actually a CDKey Hash hashed by SStrHash()
Mhmm. Talking to Frost now.
Updated.
Just want you to know that the hash is easily broken on older games and updating to an installation with a Digital Key is highly recommended.
Cleaned up markdown/formatting.