The problem
Last week, I got all of the Factorio saves I had been
keeping around into a single directory in order by the time they were
created. But what should we do with that data? We could load arbitrary
saves to see what our base looked like in the past, but loading the
saves individually isn't a great way to do that when there's a lot of
them.
The solution
Luckily, I'm not the only one to want screenshots of my Factorio bases,
so there are existing mods to do so.
The FactorioMaps Timelapse mod will take a list of
saves and generates a web page like this demo that
lets you look around your base across time.
As the documentation explains, this is not
actually a mod you enable for your save, but a script that you place
in your mods/
directory that will run Factorio repeatedly to generate
screenshots.
To set it up, use a non-Steam install of Factorio and put the saves
you want under its saves
directory (in a subdirectory named
to_screenshot/
in this example). If you downloaded the mod as ZIP
file (e.g., by installing the mod from within Factorio), unzip it;
alternatively you can clone the GitHub repo or
my fork which includes a few minor improvements
for when displaying a lot of saves, especially ones less than an hour
apart.
# get to Factorio install /mods/ directory
cd factorio/mods
# clone the git repo with the mod's internal name
git clone https://github.com/dperelman/FactorioMaps.git L0laapk3_FactorioMaps
cd L0laapk3_FactorioMaps
# install dependencies
python -m venv .venv
. .venv/bin/activate
pip install --upgrade -r requirements.txt
# add saves in /saves/to_screenshot/ to timelapse "mybase"
python auto.py --standalone mybase to_screenshot/*
Then you can find the timelapse in the directory
script-output/FactorioMaps/mybase/
of your Factorio install; just open
index.html
in any web browser. Especially if you have a lot of saves,
consider adding the --dayonly
option to not take twice as much time
also generating screenshots of the night view.
Generating screenshots as you play
Note that if you just want to take screenshots automatically as you
play, you can use the Screenshot Toolkit mod,
which is what I use for single player games. But due to the way Factorio
multiplayer works, doing so impacts every player, so in a multiplayer
game it may be better to just copy the saves as the game runs and
generate the screenshots later.
The details