Factorio Replay Inspector/Generator

Calculate optimal ratios for feeding recipes, search through the research-tree, specialized tools to view game-information.
User avatar
Murray
Manual Inserter
Manual Inserter
Posts: 4
Joined: Mon Apr 16, 2018 7:05 pm
Contact:

Factorio Replay Inspector/Generator

Post 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 https://kizby.github.io/FactorioReplay/ 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 https://github.com/Kizby/FactorioReplay if you'd like to read it or file the bugs you discover.
User avatar
bw_mutley
Burner Inserter
Burner Inserter
Posts: 9
Joined: Fri Dec 28, 2018 11:25 am
Contact:

Re: Factorio Replay Inspector/Generator

Post 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.
Post Reply

Return to “Cheatsheets / Calculators / Viewers”