Add notification case: missing nemesis records #1529
+57
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In the past month, two people on the DFHack Discord have reported game-worlds with missing nemesis records, and a third person provided a savegame that proved to have missing nemesis records.
On 12/13/25, Gladius reported a savegame that crashes on retire with a report of "Unit X has IS_NEMESIS flag, but no nemesis record found; save is corrupted." as well as some issues with armor disappearing from units returning from missions. A brief analysis showed that 60 nemesis records were missing from this savegame.
On 12/22/25, Bumber reported a savegame diagnosed as Update: His nemesis record has gone completely AWOL. Oof. The savegame is also is noted as logging "save is corrupted" in the errorlog.txt, as well has having warnings about missing/corrupted unit files. Bumber also reported " My world has been slowly losing unit files."
On 12/23/25, The Dadinator uploaded a savegame for an unrelated armor issue. The provided savegame has 36 units missing nemesis records. 31 of those units are on the map, and 13 are citizens.
Checking for missing nemesis records is trivial; it should not materially slow down the game. The warning could spare players a lot of wasted time trying to play a corrupt savegame. I think adding a test is justified.
The specific text of the warning message could stand to be improved. I am open to suggestions.
Update: I have revised the text based on useful feedback on the DFHack Discord. This revision included removing the diagnosis procedure, both because it did not give useful information beyond "yes, your fort is corrupt", and because it was long and dry to the point that even my eyes glazed over while reading it.
I am still open to suggestions on the text, but I do not think adding details would be useful.