Skip to content

Instantly share code, notes, and snippets.

@SirTony
Last active July 24, 2024 00:50
Show Gist options
  • Save SirTony/5832ad8a2b8fd4acb636 to your computer and use it in GitHub Desktop.
Save SirTony/5832ad8a2b8fd4acb636 to your computer and use it in GitHub Desktop.
The binary format for Fallout 4 PC save files.

Fallout 4 Save File Format

The binary format for Fallout 4 PC save files. This document was created by reverse-engineering files from version 1.2.37.0 of the game.

Note: This document is incomplete!

Table of Contents

Format

Field Name Type Remarks
Magic ID char[12] Always FO4_SAVEGAME
Header Size uint32 The total size (in bytes) of the header
Header header See: Header
Snapshot uint8[Width * Height * 4] An array containing raw pixel data for the thumbnail. The array is stored as 32-bits-per-pixel ARGB.
Format Version uint8 The save file format version (?). Current value is 61
Game Version wstring The game's patch version when the save was created in dot-notation (ex 1.2.37.0)
Plugin Info Size uint32 The total size (in bytes) of the plugin information
Plugins Count uint8 The number of plugins used by this save
Plugins wstring[Plugins Count] Each string is a file name for a .esm or .esp file in the Data directory.

Header

Field Name Type Remarks
Engine Version uint32 The version of Creation Engine that created this file (?). Current value is 11
Save Number uint32 Incremented by 1 each time a game is saved
Character Name wstring
Character Level uint32
Character Location wstring Name of the player's current location
Play Time wstring The amount of time played. Stored as xd.yh.zm.x days.y hours.z minutes where x, y, and z are any arbitrary integers. An example of for a character that has played 2 days, 2 hours, and 3 minutes would be 2d.2h.3m.2 days.2 hours.3 minutes
Character Race wstring The internal editor ID of the player's race. Probably always HumanRace
Character Sex uint16 The sex (gender) of the player character. 0 = male, 1 = female
Current Character Experience float32 The current amount of experience the player has attained for progressing to the next level
Required Experience float32 The amount of experience needed to progress to the next level
Filetime FILETIME The real-world time the save file was created
Snapshot Width uint32 The width (in pixels) of the save thumbnail
Snapshot Height uint32 The height (in pixels) of the save thumbnail

Types

Type Name Size (in bytes) Remarks
char 1 An 8-bit character
wstring Variable A wstring is a string prefixed with a uint16 denoting the length, followed by exactly that many characters
uint8 1 An unsigned 8-bit integer
uint16 2 An unsigned 16-bit integer
uint32 4 An unsigned 32-bit integer
float32 4 A single-precision, 32-bit, floating-point number
FILETIME 8 See: https://msdn.microsoft.com/en-us/library/windows/desktop/ms724284(v=vs.85).aspx
@luckydonald
Copy link

luckydonald commented Apr 18, 2021

@genetical yes.

Just the image data seems to be RGBA, not as said above ARGB.

image

@0rdinal
Copy link

0rdinal commented Apr 18, 2021

Thanks for the eventual response XD
Unfortunately you're too late by one day. I was running a multiplayer project for Fallout 4 and I've cancelled it literally just today.

Thank you anyway

@luckydonald
Copy link

luckydonald commented Apr 29, 2021

Awww, that's a real bummer, because Fo4 Multiplayer would be a blast!
I mean I'm not OP, I didn't knew.

@MaximeBrean
Copy link

If anyone wonder, with version 1.10.984.0, plugins are divided in two sections. The first one, as described is followed by another plugin2 count (uint32) and wstring[Plugins2 Count] that store mods and creation kit enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment