Dwarf Fortress > DF Bug Reports
[40d] Nemesis Unit Load Failed WORKAROUND
Sowelu:
This post will describe the Nemesis Unit Load Failed bug, how to set up autosaving so that you can recover from it, and how to implement the recovery in a corrupted fort.
The "Nemesis Unit Load Failed" error is a ruthless killer of forts. It causes your game to crash, and when you re-load your save, it will generally happen again and again at the same day it happened originally; it's usually considered unrecoverable. Back in the old days, it was caused by terminating your fort without saving, but that is no longer the case. The initial cause of the bug is currently unknown, but it manifests in the same way: Your /df/data/save/region1 folder (or whatever region) will have a lot less files than it used to, often just one or five files. By contrast, a non-corrupted file has many more, closer to fifty, a hundred or more. These files are important for keeping track of off-site historical figures, people like kings or military leaders or liaisons. Often, the crash will occur when one of these people is supposed to arrive at your fort.
There is a workaround that may allow you to salvage an already corrupted fort, as long as you have some sort of autosave enabled.
First, make sure autosaving is enabled. You should ALWAYS have this turned on... Edit the init file, /df/data/init/init.txt. Many players will already be familiar with this.
Find these lines:
[AUTOSAVE:NONE]
[AUTOBACKUP:NO]
[INITIAL_SAVE:NO]
Change them to this:
[AUTOSAVE:SEASONAL]
[AUTOBACKUP:YES]
[INITIAL_SAVE:YES]
(It's important to note that this will create multiple saved games. ONLY use the original one! That is, if your folder has region1 and region1-spr-201, ALWAYS use region1! If you need to go back to an old save, delete region1 and copy region1-spr-201, renaming it as region1. Otherwise your saved games will get very confusing. But that's off-topic.)
Okay. So now you've been playing for a few years with autosaving enabled, and suddenly you get a 'nemesis unit load failed' error. Your fort is hosed. How do you fix it? Well...When this happens, it's because all the extra files in your save folder are missing, and have probably been missing for quite a while.
Just COPY THEM from a backup! Go to /df/data/save/region1-spr-201 (or other similar autosave), and copy over to /df/save/region1 all the files that it's missing.
Whatever you do, do not overwrite any files. Just copy the ones that are missing. Go to an old region1-spr-201 or similar backup save--you probably want the most recent one that has all those files, but they may be missing from the most recent few autosaves. In any case, once you've done this, just reload your fort and it should play fine without crashing.
We don't quite know what the effects of doing this are, but it might play with your art a little, it might play with the ages of historical figures that live off-map, stuff like that... But it's worked for a couple of people already, at least! As of writing this, I've seen two reports of success, and no reports of anything going horribly wrong.
Feel free to report your success or failure, and please report any side effects...
Sowelu:
Placeholder for more information later...
It's POSSIBLE that this method could also bring dead goblin commanders back to live, so people with 20-year forts that no longer get goblin attacks could start getting them again. It's just speculation, and it might totally hose their fort, but it's an idea. I'd appreciate if anyone wants to try...just copy all the hist fig data (but obviously nto the world file itself!) from an OLD save, into the most current one, but do overwrite stuff this time. This is an expert-level 'do at your own risk' thing, but if anyone gets results positive or negative I would like to see them!
Albedo:
Couple observations...
--- Quote from: Sowelu on April 29, 2009, 02:05:23 pm ---We don't quite know what the effects of doing this are, but it might play with your art a little, it might play with the ages of historical figures that live off-map, stuff like that...
--- End quote ---
I was experimenting with Trading and immigrants - I had saved the game just before the first caravan arrived, then let them land and so forth, then start over, compare and contrast different variables, and noticed two things relevant here.
1)
I had a Nemesis fault after the caravan left, and loaded the files from the pre-caravan save and continued on. Zero immigrants (with a fortress value of about 250k).
So, ~if~ that is significant (nothing says it has to be), it means that the "Caravan Value-Assessment of your Fortress" is one of the things saved in one or more of those files.
2)
I found one way this fault is created. (This ~might~ be a flawed conclusion based on my observations - those who know more about the code should read and decide for themselves.)
I was running a number of these trials, and so got the pattern down - had DF windowed with the DF Save folder, and was going back and forth, saving the game, and copying, pasting, deleting while that finished, then restarting, etc.
When DF saves a game, it saves to any folder of the same name that it originally opened and is then running. If you're playing a game from "Region 666 mk II", it will save to "Region 666 mk II", etc. If there's a folder with that same name there, it saves to that folder - if not, it creates it over again. If you changed the name of the folder after you opened the game, or deleted it, no problem - the game will save the files and create a new folder with the old name. It knows what it opened, and that's where it will be saved. And that's all it knows.
BUT...
The code does both "save the files to the folder" and "create the same folder if necessary" at different times, and in that order. If there's an existing folder with the same name as the game it loaded, it starts saving the various files to that folder. But if that folder is deleted or the name changed half way thru, those files are deleted or moved with it - and the game doesn't start the save over. The game then finishes the save virtually and, at the very end, re-creates the new game folder (with whatever name it was working with from the last load) with only those remaining files after it saves the last, main world.sav file, which is enough to re-start a game, but not enough to bring in units like caravans, thieves, sieges, etc.
So the folder is recreated, but you've lost any files that were saved to that other folder before it was deleted/changed.
(Also, before saving, if you delete the game-folder that was opened, and re-name a different game-folder to that same name, that could create problems if there are extra/different files! As mentioned above, DO NOT OVERWRITE if you can help it.)
I tried doing this on purpose, deleting the file part-way thru the save and got varying numbers of files in the final (re-created) folder. The majority of the files are tiny (1-15 k) and so must be created very quickly, but there are about 7 dozen of them. The world.sav file is about a meg, and takes longer to copy - on my gimp of a PC anyway.)
So - if you're in the habit of scum-saving, NEVER delete or alter the working file while the game is saving! To be safe, leave the Save folder alone from the time you hit "Save Game" until the DF screen changes to "Continue Playing/etc."
This might be the entire cause of this - hard to say, but it's gotta be part of it.
(edit - typo, said "file" when I meant "folder" - fixed)
Naia:
Sticky please. This is really usefull
Slappy Moose:
OH MY GOD! Thank you for posting this. The caravan was crashing my fort, but now I can play again!
I would have quit playing DF if my fort was lost, I've spent days perfecting it's design. Thank you OP!
Navigation
[0] Message Index
[#] Next page
Go to full version