Page 1 of 1

Factorio Replay Inspector/Generator

Posted: Sat Apr 21, 2018 5:25 am
by Murray
I was having trouble finding information on the format of replays, so I made a first crack at figuring out how they're stored in 16.36. If you have replays enabled on your save, the tool at will parse the replay.dat file (inside your Factorio save file) into a (somewhat) human readable format that you can edit if you'd like, then save back again. No guarantees are made about the usefulness/accuracy of any of this, but I figure anyone interested in learning about replays or maybe making vanilla TAS runs may find this useful. The source is at if you'd like to read it or file the bugs you discover.

Re: Factorio Replay Inspector/Generator

Posted: Thu Apr 18, 2019 4:45 pm
by bw_mutley
HI there,
its been an year since you posted it here. I found it very intersting and useful, thank you for your addition.

I have been working on ways to extract general info from replay files, like number of machines assembling a given recipe, or the number of generators on game surface. So far what I did was to watch the replay, save it in a given point and then reload the game just to apply a simple lua script I've written for gathering the information. A more clever way of doing that would be to apply some script to the replay file directly, gathering selected in game data automatically. I would like to know if you could help in any of the ways:

1) Pointing out a mod or script which already do this;
2) Adding this sort of function to your code. It could generate .csv or .json files containing game data for a given tick number;
3) Telling me how to run scripts in a replay file. I thought about including it as a message and rebuild the save, excluding the checksum. Could not test it, howerver, since your "checksum stripper" is not working for me.

Thanks in advance.