See File Format Conventions to understand the variables and the data types this specification uses.
FormIDs in save files are stored as 3 bytes, rather than the usual 4 byte uint32 formID. These will be referred to as RefID.
The lower 22 bits represent the formID value itself, while the upper 2 bits are the type of formID.
|byte0||uint8||The upper two bits represent the type of formID:
For example, the global variable "DragonsAbsorbed" (0x0001C0F2) becomes the bytes: 41 C0 F2
|headerSize||uint32||Size of the header.|
|For LE: RGB pixel data of the image.
For SE: RGBA pixel data of the image.
|uncompressedLen||uint32||Uncompressed length (SE only)|
|compressedLen||uint32||Compressed length (SE only)|
|formVersion||uint8||current as of LE 1.9 and SE 1.5.97 is 74.|
|pluginInfoSize||uint32||Size of the plugin information.|
|lightPluginInfo||Light Plugin Info||Only for SE save games (and formVersion >= 78?). This contains info about ESL plugins.|
|fileLocationTable||File Location Table|
|globalDataTable1||Global Data[fileLocationTable.globalDataTable1Count]||Types 0 to 8.|
|globalDataTable2||Global Data[fileLocationTable.globalDataTable2Count]||Types 100 to 114.|
|globalDataTable3||Global Data[fileLocationTable.globalDataTable3Count]||Types 1000 to 1005.|
|formIDArray||formID[formIDArrayCount]||Not to be confused with RefIDs. These are FormIDs, four bytes in length, little endian.|
|visitedWorldspaceArray||formID[visitedWorldspaceArrayCount]||A list of the FormIDs of all worldspaces visited by the player.|
|unknown3TableSize||uint32||Size in bytes of unknown3Table.|
|unknown3Table||Unknown 3 Table|
|version||uint32||Current LE version: 9, supported: 7 - 9, for SE it will be 12. Use this to determine whether or not the save file is for LE or SE.|
|saveNumber||uint32||Save number, used for default name of save file. Presumably this is a counter keeping track of the total number of saves you have made to date.|
|gameDate||wstring||In-game date at the time of saving.|
|playerCurExp||float32||Experience gathered for level up.|
|playerLvlUpExp||float32||Experience required for level up.|
|filetime||FILETIME||See the Microsoft Docs for more info on this type.|
|shotWidth||uint32||Screenshot width (in pixels).|
|shotHeight||uint32||Screenshot height (in pixels).|
If compression is present, everything after the compression lengths is compressed.
Light Plugin InfoEdit
Note: only found in SE save games
File Location TableEdit
|formIDArrayCountOffset||uint32||Absolute offset to the start of File.formIDArrayCount.|
|unknownTable3Offset||uint32||Absolute offset to the start of File.unknown3TableSize.|
|globalDataTable1Offset||uint32||Absolute offset to the start of File.globalDataTable1.|
|globalDataTable2Offset||uint32||Absolute offset to the start of File.globalDataTable2.|
|changeFormsOffset||uint32||Absolute offset to the start of File.changeForms.|
|globalDataTable3Offset||uint32||Absolute offset to the start of File.globalDataTable3.|
|globalDataTable1Count||uint32||The number of Global Data in File.globalDataTable1 (9).|
|globalDataTable2Count||uint32||The number of Global Data in File.globalDataTable2 (15).|
|globalDataTable3Count||uint32||The number of Global Data in File.globalDataTable3 (5 -- bugged).
Note: This count is currently bugged (as of version 112) that it does not include type 1001 (Papyrus) in the count. This causes Skyrim to never read the final type in this table, which is typically type 1005 (Main), thankfully the bug is harmless since this type never has any data.
|data||uint8[length]||Format of data depends on its type:
Note: the layout of the data section is not a Record as it is in a mod file. Work is in progress documenting changeForm structures here: changeFlags
|changeFlags||uint32||A combination of changeFlags that indicates which changes are included in the data.|
Upper 2 bits represent the size of the data lengths:
Lower 6 bits represent the type of form:
|version||uint8||Current as of Skyrim 1.9 is 74. Older values (57, 64, 73) are also valid.|
|length1||depends on flags||Length of following data.|
|length2||depends on flags||If this value is non-zero, data is compressed (ZLib, so far tested on SE only). This value then represents the uncompressed length.|
Unknown 3 TableEdit
The Xbox 360 uses a container for all of its user content. The STFS file system used for the container has been mapped out and files within them can be extracted using tools such as WxPirs or Horizon.
It is entirely possible to use Xbox 360 game saves on the PC version of Skyrim. The only draw back is that the first time a game save is used on the PC version of the game, the preview screenshot is swizzled. Saving the game again once you have it loaded will fix this.
To get your XBOX 360 save. One would use a tool like Horizon to get your game save off of a Xbox 360 formatted drive (such as a USB drive) and extract the Savegame.dat from the Xbox 360 container and rename it to anything ending in ".ess". After this one would put this new ess file in Documents\My Games\Skyrim\Saves and load it in Skyrim as usual.
It is possible to perform this in the reverse direction as well. Rename your savegame.ess to savegame.dat. Then, use Horizon to reinject the save into the save originally transferred from the Xbox 360. You must then rehash and resign your save so it can be used on your Xbox 360. The only drawback of this is the same as the other: the screenshot is swizzled, but it works. This can be used to fix quest related bugs with the console if you have access to both a PC and Xbox 360 version of the game.