Page 1 of 1

Where can I find the current play time data in the saved game zip file?

Posted: Fri May 15, 2020 5:44 pm
by nuke_it_from_orbit
I want to scrape the play time from 178 save files.

I'm interested in knowing how Factorio reads the metadata for a saved game file.

In the Load Game GUI I see the following metadata:
  • Map Version
  • Scenario
  • Difficulty
  • Play time
  • Mods
I'm interested in accessing the play time.

I unzipped a save game file and I have the following files, but couldn't find the data I wanted.
  • control.lua
  • info.json
  • level.dat
  • level-init.dat
  • script.dat

Re: Where can I find the current play time data in the saved game zip file?

Posted: Wed May 20, 2020 5:42 am
by Rseding91
It's in level.dat but the contents of level.dat are a serialized version of the game state the format of which isn't documented because it changes as needed for new or removed data we include in the save.

You'd have to know the file format up until you're able to read what you want and then hope we never change it (which happens).