StringList *.stl Files
This section discusses the "\StringList\*.stl" files in the "<locale>_Text.mpq" file, where <locale> is determined by the language of your game client; for example, the <locale> will be "enUS" for English clients. MPQ Patches to this file are located in the <locale> subdirectory of the Diablo 3 "MPQs" directory. Please see the MPQs section for general MPQ information and basic information about how files are encoded.
The StringList (*.stl) files provide the localized (language-specfic) strings that are used to display all in-game text. Check out the StringList Data section to see the information for a number of StringList files (enUS).
StlHeader Structure
The StlHeader structure (0x28 bytes in size) comes immediately after the 0x10 byte MPQ header. Here are the details of this structure:
| struct StlHeader | // sizeof 0x28 | |
| { | ||
| 0x00 | DWord stlFileId; | // Stl file Id |
| 0x04 | DWord unknown1[5]; | // always 0x00000000 |
| 0x08 | DWord headerSize; | // size (in bytes) of the StlHeader? (always 0x00000028) |
| 0x0C | DWord entriesSize; | // size (in bytes) of the StlEntries |
| 0x04 | DWord unknown2[2]; | // always 0x00000000 |
| } |
The StlHeader is followed by a number of StlEntries. Each StlEntry structure is 0x50 bytes. The entries specify the offset and size of the localized strings. The number of StlEntries can be determined by dividing the "entriesSize" by the size of the structure.
| struct StlEntry | // sizeof 0x50 | |
| { | ||
| 0x00 | DWord unknown1[2]; | // always 0x00000000 |
| 0x08 | DWord string1offset; | // file offset for string1 (non-NLS key) |
| 0x0C | DWord string1size; | // size of string1 |
| 0x10 | DWord unknown2[2]; | // always 0x00000000 |
| 0x18 | DWord string2offset; | // file offset for string2 |
| 0x1C | DWord string2size; | // size of string2 |
| 0x20 | DWord unknown3[2]; | // always 0x00000000 |
| 0x28 | DWord string3offset; | // file offset for string3 |
| 0x2C | DWord string3size; | // size of string3 |
| 0x30 | DWord unknown4[2]; | // always 0x00000000 |
| 0x38 | DWord string4offset; | // file offset for string4 |
| 0x3C | DWord string4size; | // size of string4 |
| 0x40 | DWord unknown5; | // always 0xFFFFFFFF |
| 0x44 | DWord unknown6[3]; | // always 0x00000000 |
| } |
The string offsets in the StlEntries are from the start of the StlHeader, in other words, the absolute file offset after you add 0x10 bytes to account for the MPQ header. The string sizes include a trailing 0x00 (NULL) character.
Each StlEntry specifies the non-NLS key as string1, and up to three other strings associated with that entry. These strings are the localized strings that will be displayed in-game and are usually some type of description. Most StringList files only use string1 (the non-NLS key) and string2 (the localized description). In such cases, the size of string3 and string4 will be 1 (the NULL character).
