FMG message files
An FMG is a table from numeric IDs to strings. The games keep their text (item and menu text) in FMGs that sit as members named *.fmg inside the message binders, one folder per language under
msg/ (for example msg/engus/item.msgbnd.dcx). The IDs are the keys that params and scripts use to name text.
Sourced · SoulsFormatsNEXT
Both games use the 64-bit-offset layout, version 2, and never a big-endian or non-Unicode file. All 504 FMGs of the Sekiro install and all 3,968 of the Elden Ring install (the base game) have the header bytes and the group table described below with no exception. Proven
Little-endian. IDs are stored as ranges (groups); each group's strings are consecutive slots of the offset table.
| Offset | Size | Type | Field | Confidence | Notes |
|---|---|---|---|---|---|
| 0x0 | 1 | u8 = 0 | zero | Proven | |
| 0x1 | 1 | u8 = 0 | big-endian flag | Proven | Zero in all 4,472 files |
| 0x2 | 1 | u8 = 2 | version | Proven | |
| 0x3 | 1 | u8 = 0 | zero | Proven | |
| 0x4 | 4 | u32 | file size | Proven | Equals the file's length in every file |
| 0x8 | 1 | u8 = 1 | Unicode flag | Proven | Strings are UTF-16LE |
| 0xC | 4 | u32 | group count | Proven | |
| 0x10 | 4 | u32 | string count | Proven | Equals the sum of the group sizes in every file |
| 0x14 | 4 | u32 | unknown | Unknown | 0xff in every file |
| 0x18 | 8 | u64 | string-offset table offset | Proven | The group table ends exactly here in every file |
| 0x20 | 8 | u64 = 0 | zero | Proven | |
| 0x28 | 16 × group count | group[] | groups | Proven |
| Offset | Size | Type | Field | Confidence | Notes |
|---|---|---|---|---|---|
| 0x0 | 4 | u32 | index of the group's first string slot | Proven | Continues where the previous group's slots end |
| 0x4 | 4 | i32 | first ID | Proven | |
| 0x8 | 4 | i32 | last ID | Proven | Inclusive |
| 0xC | 4 | u32 = 0 | zero | Proven |
A group holds the IDs first..=last; its slot j belongs to ID first + j. A slot is a u64 offset from the file’s
start to a NUL-terminated UTF-16 string, or 0. Proven for the slot table; the string encoding is Sourced · SoulsFormatsNEXT
What the install holds
Section titled “What the install holds”Over all 504 Sekiro FMGs (46,738 groups, 381,243 slots) and all 3,968 Elden Ring FMGs (787,143 groups, 7,526,881 slots):
- No ID appears in two groups of one file, and the groups are in ascending ID order without overlap. Proven
- The group table ends where the offset table begins, group indices are consecutive, and the string count is the sum of the group sizes. Proven
- A slot of 0 (an ID with no string) is common: 114,867 of the Sekiro slots, in 446 of 504 files, and 5,481,630 of the Elden Ring slots, in 2,604 of 3,968 files. A reader should treat such an ID as having no text, not as an error. Proven
The slot table gives an ID a place in a group range even when no text exists for it in that language or build. Whether the game treats an empty slot differently from a missing ID is not established.
Layout of the file
Section titled “Layout of the file”The parts follow one another in this order: the header and the group table, the string-offset table, the strings, and zero padding. Proven
- Groups. The IDs of a file, those with a string and those with a slot of 0, in ascending order, are cut into groups of consecutive IDs: a group ends only where the next ID is not one more, so two adjacent groups never have consecutive ranges. A slot of 0 inside a range is what keeps a group whole. Rebuilding the group table from the IDs by this rule reproduces the stored table of all 4,472 files. Proven
- Strings. The strings follow the offset table in slot order, each UTF-16 and a NUL, with no gap and none shared (no
two slots name one string), in 4,469 of the 4,472 files. In three Elden Ring files (
GR_NGWord.fmgin thezhoCNlanguage and two copies ofNetworkMessage_dlc01.fmginthaTH) 2 or 8 zero bytes lie between two strings, which no slot names. Proven - The end. Every file’s length is a multiple of 4: the strings are followed by the zero bytes that make it so, and in 43 of Sekiro’s 504 files and 119 of Elden Ring’s 3,968 by more zero bytes, in whole 4-byte units (4 to 112 bytes in Sekiro, 4 to 116 in Elden Ring). Proven