Page 1 of 1

Save-file parsing via factorio executable

Posted: Tue Jan 20, 2026 10:55 pm
by CommanderRedYT
TL;DR
Make the factorio binary have a command to select a save game which gets then printed as JSON.

What?
First of, I know from other posts that releasing the binary structure of the save files might not be ideal.
What I have in mind would be something like this:

Code: Select all

~ $ ./factorio --save-file-info mysave.zip
{
  "version": "2.0.72"
  ...
  "mods": [
    "mod-xyz": "1.0.0"
  ]
}
I specifically mean exposing things like metadata, i.e. version, play time, cheats enabled, mod list, ..., but not things like actual world data (i.e. where which building is)
Why?
This one might be more relevant for developers who want to write helpers that interface with factorio, especially in headless contexts.
Personally, I would love to see this, so that I would be able to write a helper tool to automatically download mods that are required by the save.
It would also be interesting information to show in a public server context (for example on a website)

Re: Save-file parsing via factorio executable

Posted: Tue Jan 20, 2026 11:55 pm
by eugenekay
There is at least one repository on GitHub which parses the DAT file format used by Factorio directly, and Factorio Server Manager project (which does not appear to have been update for 2.0?). There is even a post here on the Forums by game Devs with data structure information and an example decoder.

If you unzip a Save file you will find level-init.dat, which can be hex-decoded just by eyeballing it:
01-20-2026, 18-43-51.png
01-20-2026, 18-43-51.png (57.57 KiB) Viewed 182 times
The first bit of data is "02 00 00 00 47", corresponding to Game Version 2.0.71
Next is the Savefile name ("Earf").
Then there is a list of Mods (starting with "base") with their Versions and some separators.
Further down you will find the Startup Settings, map generation data, and a lot more...

Multiplayer Servers can access this using RCON + In-Game LUA code, eg active_mods.

Good Luck!