Victoria 2 keeps three autosaves. It writes autosave.v2, shifts the last one
to oldautosave.v2, shifts that one to olderautosave.v2, and drops whatever
falls off the end. On monthly autosaves that is a three-month memory of a
sixty-four-year game.
There is no setting for this. The depth is not configurable and never was.
Leave this running while you play and every autosave is copied out before the rotation reaches it, into a folder per campaign, named for the date inside the save. A 1836-1900 campaign comes out as 767 files instead of three — which is exactly what vic2saveanalyzer wants to be pointed at.
Double-click vic2autosavekeeper.exe. A window asks for two folders:
| The game's saves | Where Victoria II writes autosave.v2. Filled in for you if the game is installed where it usually is. |
| Keep them in | Anywhere outside that folder. One directory per campaign is made in here. |
Press Start before you start playing, and leave the window open. That is the whole of it. Both paths and both options are remembered, so the next session is one click.
Saves arrive named for the in-game date they hold:
VIC2SAVES\CHI 1836\CHI1836_02_01.v2, CHI1836_03_01.v2, ... CHI1900_01_01.v2
The country tag is not stable. Sardinia forms Italy and every save after it says
ITA; Sweden forms Scandinavia and they say SCA. Sorting saves by their tag
would cut one campaign in half at the moment it got interesting.
So which campaign a save belongs to is decided by what the save contains, not by what it is called. Global event flags accumulate as a game runs, so the earlier of two saves from one campaign holds flags the later one also holds. Counting the earlier one's flags that the later one lacks stays near zero along a single game and jumps between two different ones — across 2,850 real pairs, two saves from one campaign never disagreed by more than five, while two from different campaigns disagreed by twelve at the median.
A save therefore joins the campaign whose history it continues, and the folder is retitled when a nation is formed:
VIC2SAVES\SWE-SCA 1836\SWE1839_01_01.v2, SCA1840_01_01.v2, SCA1841_01_01.v2
The same test does the opposite job too: a second run as the same country from the same start date is a different history, so it gets a folder of its own rather than being interleaved with the first.
An autosave is 20-30 MB and, at speed five, a late-game month can be written, rotated twice and dropped in about two seconds. A watcher that polls every few seconds is asleep for most of that, and loses months — the first version of this tool lost 59 of 767 on one campaign.
So Windows is asked to say when the save folder changes, and the copy starts within milliseconds of the game finishing one. The copy is taken immediately rather than after a pause to confirm the file has stopped moving; if the source changed size or timestamp while it was read, the copy was torn and is thrown away and retaken. Nothing here ever holds a handle the game could trip over, and a save already held costs a header read rather than a copy.
Measured against 21 MB saves rotated the way the game rotates them:
| A month every | Polling every 5s | Waking on the write |
|---|---|---|
| 1.5s | 21 of 24 | 24 of 24 |
| 0.8s | 12 of 24 | 24 of 24 |
| 0.25s | — | 24 of 24 |
A quarter-second per month is more than the game can physically write, so in practice nothing is missed.
Everything. That is the point, and it is worth knowing the number: monthly autosaves from 1836 to 1900 is about 18 GB for one campaign, and the game writes that much again on its own.
The keep one save every N months control is the lever. Three months puts a whole campaign in about 6 GB and is still four times denser than the game's own yearly autosave. Nothing expires on its own; deleting a campaign folder is the only way anything leaves.
Two things worth doing if the machine feels heavy while a long campaign runs: exclude the export folder from Windows Search indexing (Properties → Advanced), and from your antivirus's real-time scanning. Both otherwise read every one of those gigabytes as it lands.
The window is a front for autosave_export.py, which runs on its own:
python autosave_export.py
--saves DIR |
The game's save folder. |
--out DIR |
Where to keep them. |
--every N |
Keep one save every N months, counting from January. |
--all |
Copy saves you made yourself as well, not just autosaves. |
--campaign NAME |
Put everything in this folder, instead of one worked out per save. |
--once |
Sweep the folder once and stop, rather than watch. |
--poll SECONDS |
How long to wait before looking anyway, when the folder has said nothing. |
Keep every autosave.bat is the same thing for double-clicking.
python build_exe.py
Two modules and the standard library, so the bundle is tkinter and very little else. The icon is drawn by the build script rather than shipped, which keeps the repository free of binaries apart from the executable itself.
GNU Affero General Public License v3.0 or later. See LICENSE.