Icons.bni

Brief:

File format and conventions for server-defined chat icons

Icons.bni is a file downloaded by Blizzard's games during their handshake with Battle.net and is used to display client icons in chat, including icons like tournament trophies and number of wins. There are also product-specific variations of this file such as icons_STAR.bni. The correct file to use can be obtained by sending SID_GETICONDATA after client authentication.

Standard File Format

(UINT32) Size of BNI header (always 16)
(UINT16) BNI Version
(UINT16) Alignment Padding (Unused)
(UINT32) Number of Icons
(UINT32) Image data Offset

For each icon:
    (UINT32)   Flags
    (UINT32)   X Size
    (UINT32)   Y Size
    (UINT32)[] Icon Code (zero-terminated)

(VOID) Targa image data

Additional Notes

| Edited: inetknght

Comments

xboi209

Icon Precedence:

  1. For any user, display the first icon in icons.bni that has icon flags matching the bitwise-and of the icon flags and user flags (given by server in SID_CHATEVENT).

  2. For StarCraft users displaying icons other StarCraft users' icons, the first icon in icons_STAR.bni that has an icon code matching the value in the Icon Code field in chat statstrings.
    For WarCraft 3 users displaying other WarCraft 3 users' icons, the first icon in icons-WAR3.bni that has an icon code matching the value in the Icon Code field in chat statstrings.

  3. For any user displaying icons of users with different product codes, display the first icon in icons.bni that has icon flags matching the Icon Code field in chat statstrings.

  4. For any user displaying icons of users with the same product code, display an internal icon. See http://classic.battle.net/info/icons.shtml and http://classic.battle.net/war3/ladder/w3xp-ladder-info-laddericons.aspx?Gateway=Lordaeron for examples.