| Load a BESM/BESP/BESL or CSV file to start |
|---|
| Idx | Sig | FormID | EditorID | Name | Flags | Size |
|---|---|---|---|---|---|---|
| No file loaded | ||||||
| FormID | Editor ID | Text String |
|---|---|---|
| No file loaded | ||
The BESM file structure is optimized for rapid multi-core seeking and 1:1 rebuilding. Click on any section block below to inspect its detailed offset mapping and byte-level schema definitions.
| Offset | Type | Field | Description |
|---|---|---|---|
| 0x00 (0) | char[4] | magic | Magic identifier bytes: 'BESM' |
| 0x04 (4) | uint32 | version | File format version (0x00000001) |
| 0x08 (8) | uint32 | secCount | Total count of record subsectors in the directory |
| 0x0C (12) | uint64[3] | bPool | Blob Pool Descriptor: [fileOffset, compressedSize, uncompressedSize] |
| 0x24 (36) | uint64[3] | sTable | String Table Descriptor: [fileOffset, compressedSize, uncompressedSize] |
| 0x3C (60) | uint64[3] | schemas | Schema Preset Descriptor: [fileOffset, compressedSize, uncompressedSize] |
| 0x54 (84) | uint64[3] | reconstruction | Reconstruct Map Descriptor: [fileOffset, compressedSize, uncompressedSize] |
| Offset | Type | Field | Description |
|---|---|---|---|
| 0x00 (0) | char[4] | signature | Record type signature (e.g. 'REFR', 'WEAP') |
| 0x04 (4) | uint32 | rowSize | Uncompressed size of a single row/record inside the subsector table |
| 0x08 (8) | uint32 | rowCount | Total record rows stored in this subsector block |
| 0x0C (12) | uint64 | sOffset | Absolute file offset to the compressed data block |
| 0x14 (20) | uint64 | sCompSize | Compressed block size (Zlib Deflate) |
| 0x1C (28) | uint64 | sUncompSize | Uncompressed size of the parsed records table |
Uncompressed byte heap containing remainder subrecord fields. Mapped records reference their bytes using a 4-byte BlobOffset field inside the flat record row.
| Relative Offset | Type | Field | Description |
|---|---|---|---|
| +0x00 (0) | char[4] | signature | Subrecord type signature/tag (e.g. 'VMAD') |
| +0x04 (4) | uint16 | length | Subrecord data payload size (len) in bytes |
| +0x06 (6) | uint8[len] | payload | Raw subrecord payload bytes |
Stores all string mappings (like EDID / FULL string fields) mapped to their corresponding FormIDs. It contains a String Count header, followed by a contiguous Directory index, followed by the UTF-8 String Heap.
| Offset | Type | Field | Description |
|---|---|---|---|
| 0x00 (0) | uint32 | count | Total count of string entries in this table |
| 0x04 (4) | Index[count] | directory | Directory mapping entries (10 bytes each) |
| Dynamic | char[] | heap | Contiguous UTF-8 string heap (encoded as 'Name|EDID') |
+0x00 (uint32): FormID (fID)+0x04 (uint32): Offset in String Heap (sOffset)+0x08 (uint16): Length of string (sLength)Stores the exact plain-text schema definition rules used to decompose the nested records into flat record rows. Stored as raw UTF-8 text strings.
Reconstruction sequencing index which preserves the chronological ordering of the original ESM. Enables byte-perfect 1:1 rebuilding of the ESM file.
| Offset | Type | Field | Description |
|---|---|---|---|
| 0x00 (0) | uint32 | count | Total chronological records/entries |
| 0x04 (4) | Entry[] | chronoEntries | Repeating stream of chronological records |
+0x00 (char[4]): Original record signature/type (e.g. 'WEAP')+0x04 (uint8[24]): Original 24-byte record header raw bytes+0x1C (uint32): Record body size (bodyLen) in bytes+0x20 (uint8[bodyLen]): Raw body payload (if body is not reconstructed from database tables)To seek the database field column $C$ of record index $r$ inside a decompressed subsector block, the memory offset is calculated as:
Where:
r: The zero-based row index of the record.rowSize: Fixed size of a single record database row.colOffset: The relative field offset defined in the schema.A FormID is an 8-digit hexadecimal number (32-bit unsigned integer) that serves as a unique identifier for everything in a Bethesda master file.
00: Main Game (e.g. Skyrim.esm or Fallout4.esm)01: Update files (e.g. Update.esm)02-FD: standard ESM/ESP plugins depending on active load orderFE: Light Plugins (.esl / Creation Club) - uses 3 intermediary digits (e.g. FExxx123)FF: Dynamically allocated in-game objects (temporary playthrough data)BaseID defines the prototype/template structure of an item, NPC, or object (e.g. the weapon stats of a Steel Sword).
RefID defines a specific placed copy/instance of an object in the world space (e.g. the specific Steel Sword sitting on a table in Breezehome).