Skip to content

Asset Formats

This section documents the binary formats used by Fallout 4 (Creation Engine) to store game assets.

Formats

Format Extension Description
BA2 .ba2 Archive container for all packaged game assets
NIF .nif Scene-graph format for 3D meshes, skinning, and collision
DDS / BGSM / BGEM .dds / .bgsm / .bgem Texture images and material definitions
Precombined Meshes *_OC.nif Packed combined geometry for cell optimization
Havok Collision (embedded in .nif) Havok packfile physics collision shapes and rigid bodies

Asset Dependency Graph

.esm
  ├── TXST records  ──► texture paths (.dds)
  ├── MATO records  ──► material paths (.bgsm / .bgem)
  ├── STAT/REFR/…   ──► model paths (.nif)
  └── SNDR records  ──► audio paths (.fuz / .xwm)

.nif
  ├── BSShaderTextureSet  ──► texture paths (.dds)
  └── BSLightingShaderProperty.Name  ──► material path (.bgsm)
      BSEffectShaderProperty.Name    ──► material path (.bgem)

.bgsm / .bgem
  └── texture fields  ──► texture paths (.dds)

All of the above packaged in  ──► .ba2 archives

Common Conventions

Paths are always relative to Data\ and use backslashes as separators. Texture paths begin with textures\; material paths begin with materials\; mesh paths begin with meshes\.

FormIDs identify records: upper 8 bits = plugin load order index, lower 24 bits = local ID. Stored as uint32; serialized as strings in the form "0x{LocalID:X6}:{Plugin.esm}".

Strings in ESM use either null-terminated (zstring) or localization-table-indexed (lstring) encoding. NIF and BGSM/BGEM use length-prefixed strings (uint32 length + chars).

Endianness is little-endian throughout all formats.