Skip to content

File Formats

Fallout 4 uses various internal file formats to store its assets. This section documents the structure of each format at the byte level.

ESM / ESP — Game Data Records

The .esm and .esp files are Bethesda's record database format. They contain every piece of game data: world geometry references, NPCs, items, quests, dialogue, weather, and more. Records are organized into groups and identified by 32-bit FormIDs.

  • ESM/ESP Overview — file structure, record headers, groups, compression, and all major record types
  • Water (WATR) — water type records controlling fog, reflections, specular, noise, and silt
  • Grass (GRAS) — procedural grass placement via GRAS records and LTEX texture links
  • Material Swaps (MSWP) — material substitution system for rendering model variants with different surfaces

Asset Formats

Game assets (meshes, textures, materials, audio) are packaged in .ba2 archives and use specialized binary formats for 3D geometry and surface rendering.

  • Asset Overview — dependency graph showing how ESM records, meshes, textures, and materials reference each other
  • BA2 Archives — archive container format (GNRL and DX10 entry types, compression, name tables)
  • NIF Meshes — scene-graph format for 3D geometry, skinning, shaders, collision, and extra data
  • Textures & Materials — DDS texture format, BGSM/BGEM material definitions, greyscale-to-palette system
  • Precombined Meshes — byte-level spec for BSPackedCombinedSharedGeomDataExtra blocks in *_OC.nif files
  • Havok Collision — binary format for Havok packfile physics collision data in NIF meshes