Chat Statstrings
Chat statstrings are space-delimited C strings that communicate attributes of a user in a chat channel. Most notably, game clients use chat statstrings to determine which icons to display for each user. Additionally, game clients will refuse to attempt to create ladder games if not enough normal game wins have been earned.
Chat statstrings are found in S > C [0x0A] SID_ENTERCHAT and in the TEXT
field of S > C [0x0F] SID_CHATEVENT for the following chat event types:
Event ID | Name |
---|---|
0x01 |
EID_USERSHOW |
0x02 |
EID_USERJOIN |
0x03 |
EID_USERLEAVE |
0x09 |
EID_USERUPDATE |
Format
The chat statstring format for each product differs, however the first field is always the user's product in reverse (e.g. STAR
becomes RATS
).
Diablo I
Contain 9 fields that are delimited with spaces.
Note that this product allows the client to specify whatever statstring it calculates, so bots may not follow this format!
- Character Level
- Character Class
- '0': Warrior
- '1': Rogue
- '2': Sorcerer
- Number of dots
- '0': Has not killed Diablo
- '1': Killed Diablo on Normal difficulty
- '2': Killed Diablo on Nightmare difficulty
- '3': Killed Diablo on Hell difficulty
- Character's Strength
- Character's Magic
- Character's Dexterity
- Character's Vitality
- Character's Gold
- Spawned
- '0': Not spawned
- '1': Spawned
Diablo II, Diablo II: Lord of Destruction
These products do not have the same format.
If the player is on Open, the format is: ProductID
Otherwise, the format is: ProductID + RealmName + ',' + CharacterName + ',' + Bytes
- ProductID
- 'PX2D'
- 'VD2D'
- Realm name
- Character name
- 33-byte struct (Each byte is between 0x01 and 0xFF and is explained below. 0xFF generally means the field is empty or not available.)
- Unknown: 0x84 (Larger values have been observed)
- Unknown: 0x80
- Equipment: Head
- Equipment: Torso
- Equipment: Legs
- Equipment: Right Arm
- Equipment: Left Arm
- Equipment: Right Weapon
- Equipment: Left Weapon
- Equipment: Left Shield
- Equipment: Right Shoulder Pad
- Equipment: Left Shoulder Pad
- Left Item (Heads)
- Character Type
- Amazon
- Sorceress
- Necromancer
- Paladin
- Barbarian
- Druid
- Assassin
- Color: Head
- Color: Torso
- Color: Legs
- Color: Right Arm
- Color: Left Arm
- Color: Right Weapon
- Color: Left Weapon
- Color: Shield
- Color: Right Shoulder Pad
- Color: Left Shoulder Pad
- Color: Left Item (Heads)
- Level (0x01 to 0x63)
- Flags
- 0x04: Hardcore
- 0x08: Dead
- 0x20 Expansion
- Current Act
- Original:
- 0x80: Normal Act I
- 0x82: Normal Act II
- 0x84: Normal Act II
- 0x86: Normal Act IV
- 0x88: Nightmare Act I
- 0x8A: Nightmare Act II
- 0x8C: Nightmare Act III
- 0x8E: Nightmare Act IV
- 0x90: Hell Act I
- 0x92: Hell Act II
- 0x94: Hell Act III
- 0x96: Hell Act IV
- 0x98: All Acts Completed
- Expansion
- 0x80: Normal Act I
- 0x82: Normal Act II
- 0x84: Normal Act III
- 0x86: Normal Act IV/V
- 0x8A: Nightmare Act I
- 0x8C: Nightmare Act II
- 0x8E: Nightmare Act III
- 0x90: Nightmare Act IV/V
- 0x94: Hell Act I
- 0x96: Hell Act II
- 0x98: Hell Act III
- 0x9A: Hell Act IV/V
- 0x9E: All Acts Completed
- Original:
- Unknown: 0x80 or 0xFF
- Unknown: 0x80 or 0xFF
- Ladder
- 0xFF: Non-Ladder
- Other: Ladder
- Seems to be season number
- Unknown: 0xFF
- Unknown: 0xFF
StarCraft, StarCraft Japanese, StarCraft: Brood War, and WarCraft II
Contain 9 fields that are delimited with spaces.
- Ladder Rating
- Ladder Rank
- Wins
- The amount of wins in normal games
- Spawned
- '0': Not spawned
- '1': Spawned
- League ID
- High Ladder Rating
- The highest rating that the player has ever achieved
- IronMan Ladder Rating
- Only applicable to:
WarCraft II
- Only applicable to:
- IronMan Ladder Rank
- Only applicable to:
WarCraft II
- Only applicable to:
- Icon Code
- Only applicable to:
StarCraft, StarCraft Japanese, StarCraft: Brood War
- This value should be searched for in the
Icon Code
array of each icon inicons_STAR.bni
. If a match is found, the client should use this icon when displaying the user. See Icons.bni.
- Only applicable to:
WarCraft III, WarCraft III: The Frozen Throne
Contain 2 fields and 1 optional field, all fields are delimited with spaces.
There is a possibility that there can be 0 fields, meaning that the user was not assigned their stats before joining the channel (often appears with bots who join a channel automatically and not waiting until the user clicks 'Enter Chat').
- Icon Code
- Format: Level + Tier + "3W" (Special icons may not follow this format)
- Level: The "win level" of the icon 1 through 5 (6 on TFT). 1 is always peon.
- Tier: The race tier of the icon
- R: Random
- H: Human
- U: Undead
- N: Night Elf
- O: Orc
- D: Tournament (TFT)
- This value should be searched for in the
Icon Code
array of each icon inicons-WAR3.bni
. If a match is found, the client should use this icon when displaying the user. See Icons.bni.
- Format: Level + Tier + "3W" (Special icons may not follow this format)
- Level
- Level of the player. (Highest out of all possible game types that the user has played.) '0' means no ladder games on record.
- Clan tag (OPTIONAL)
- Reversed clan tag, appears only if the player is in a clan.
Comments
Diablo II Armor Types:
Torso, Legs, Arms, and Shoulders all have values from 1 to 3 (and 255 for nothing). Combined, they tell you what type of armor the character is wearing:
The order being used is Torso + Legs + Right Arm + Left Arm + Right Shoulder + Left Shoulder
111111 / 255255255255255255 = Nothing
111122 = Quilted Armor
211122 = Leather Armor
212222 = Hard Leather Armor
122122 = Studded Leather Armor
221122 = Ring Mail
222222 = Scale Mail
311133 = Breast Plate
222233 = Chain Mail
322222 = Splint Mail
223133 = Light Plate
332233 = Field Plate
333322 = Plate Mail
233333 = Gothic Plate
333333 = Full Plate Mail
332331 = Ancient Armor
Diablo II Equipment (hex):
0 / 1 / 2 / 3 / FF = None
4 / 39 = Cap
5 / 3A = Skullcap
6 / 3B = Helm
7 / 3C = Full Helm
8 / 3D = Great Helm
9 / 3E = Crown
A / 3F = Mask
40 / 53 = Bone Helm
56 = Wolf Head
57 = Hawk Helm
58 = Antlers
59 = Jawbone Cap
5A = Horned Helm
5B = Assault Helmet
Diablo II Items (Hex):
0 / FF = None
4 = Hand Axe
5 = Axe
6 = Double Headed Axe
7 = War Axe
8 = Giant Axe
9 = Wand
A = Yew Wand
B = Grim Wand
C = Club
D = Mace
E = Warhammer
F = Flail
10 = Maul
11 = Short Sword
12 = Scimitar
13 = Falchion
14 = Crystal Sword
15 = Broadsword
16 = Longsword
17 = Claymore
18 = Bastard Sword
19 = Dagger
1A = Blade
1B = Short Spear
1C = Glaive
1D = Pilum
1E = Spear
1F = Trident
20 = Spetum
21 = Pike
22 = Bardiche
23 = Scythe
24 = Halberd
25 = Short Staff
26 = Long Staff
27 = Battle Staff
28 = War Staff
29 = Short Bow
2A = Long Bow
2B / F3 / F4 / FB = Claws
2C / F5 / F6 / FC = Scissors Katar
2D / F7 / F8 / FD = Katar
2E / F9 / FA / FE = Hatchet Hands
2F = Hunter's Bow
30 = Composite Bow
31 / 7A / F0 = Crossbow
32 / 7C / F2 = Heavy Crossbow
33 = Eagle Orb
34 = Sacred Globe
35 = Clasped Orb
36 = Stag Bow
37 = Reflex Bow
4F = Small Shield
50 = Large Shield
51 = Kite Shield
52 = Tower Shield
54 = Bone Shield
55 = Spiked Shield
5C = Targe
5D = Heraldic Shield
5E = Crown Shield
5F = Demon Head
60 = Gargoyle Head
61 = Zombie Head
75 / EB = Short Battle Bow
76 / EC = Long Battle Bow
77 / ED = Short War Bow
78 / EE = Long War Bow
EF = Light Crossbow
F1 = Repeating Crossbow
Diablo II Colors:
Color should be MOD A0'd as all values repeat.
0 / 1F / FF = Normal
1 = Gray
2 = Shiny Black
3 = Dull Black
4 = Black
5 = Shiny Blue
6 = Dull Blue
7 = Blue
8 = Shiny Red
9 = Dull Red
A = Red
B = Shiny Green
C = Dull Green
D = Green
E = Shiny Yellow
F = Dull Yellow
10 = Yellow
11 = Duller Yellow
12 = Shiny Purple
13 = Purple
14 = Gold
15 = White
Flags:
20 = Tinted
40 = Lightly Tinted
Some Diablo II statstring research comments:
Field 1 - Usually 0x84. Larger values observed as well. No idea as to the meaning yet.
Field 25 - Determined to be offhand item (necromancer heads) color.
Field 27 - Flags seem to start off at 0x80. A 0x01 seems to indicate the character has not yet entered a game, although a non-expansion character will not have this flag set unless it re-enters chat before joining a game. More research to come here too.
Fields 29 and 30 are 0x80 when the character has not yet entered a game, and 0xFF once he has. No other values have yet been observed.
Also, I just got a W3XP statstring that contained a level and clan tag but no icon data, so be aware of that possibility.
RealityRipple; you have editor access; I'm surprised to see you didn't put that directly into the document.
According to PvPGN, the Tier
sub-field in WarCraft 3's Icon Code
field appeared in patch 1.03.
The StarCraft statstring format in this document appeared starting in patch 1.10. Previously, the latter 4 or 5 fields did not exist.