Skip to content

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

FMG header and group table (version 2)variable83% known

Little-endian. IDs are stored as ranges (groups); each group's strings are consecutive slots of the offset table.

ProvenObservedSourcedInferredUnknownNot described
OffsetSizeTypeFieldConfidenceNotes
0x01u8 = 0zeroProven
0x11u8 = 0big-endian flagProvenZero in all 4,472 files
0x21u8 = 2versionProven
0x31u8 = 0zeroProven
0x44u32file sizeProvenEquals the file's length in every file
0x81u8 = 1Unicode flagProvenStrings are UTF-16LE
0xC4u32group countProven
0x104u32string countProvenEquals the sum of the group sizes in every file
0x144u32unknownUnknown0xff in every file
0x188u64string-offset table offsetProvenThe group table ends exactly here in every file
0x208u64 = 0zeroProven
0x2816 × group countgroup[]groupsProven
FMG group (version 2)16 bytes100% known
ProvenObservedSourcedInferredUnknownNot described
OffsetSizeTypeFieldConfidenceNotes
0x04u32index of the group's first string slotProvenContinues where the previous group's slots end
0x44i32first IDProven
0x84i32last IDProvenInclusive
0xC4u32 = 0zeroProven

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

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
What do the IDs without strings mean?

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.

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.fmg in the zhoCN language and two copies of NetworkMessage_dlc01.fmg in thaTH) 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