Saved game folder

Материал из Dwarf Fortress Wiki
Версия от 19:21, 29 апреля 2012; Sturgeon (обсуждение | вклад) (Новая страница: «The '''saved game folder''' is the location in where a certain region's information and necessary files are stored and accessed by Dwarf Fortress. Knowledge on th...»)
(разн.) ← Предыдущая версия | Текущая версия (разн.) | Следующая версия → (разн.)
Перейти к навигацииПерейти к поиску

The saved game folder is the location in where a certain region's information and necessary files are stored and accessed by Dwarf Fortress. Knowledge on the technicals of the saved game folder is crucial if one wishes to import or export saves.

Location

Individual worlds are stored in the dwarffortress/data/save folder. By default, they are saved in the format: region#, where # is a number, starting with region1 and then incrementing. On Windows 7, if Dwarf Fortress is installed in the Program Files subdirectory, the saved game folders are instead located at "Users\Myname\Appdata\Local\VirtualStore\Program Files\Dwarf Fortress\data\save".

If you have modified your d_init.txt to seasonally backup, then the backup folders will be named region#-season-year, for example region1-spr-202.

This can become confusing if you frequently savescum. There is no way to change the name of these folders inside the game, but it is safe to change them using the standard methods of your operating system if the game is not running. However, never alter or delete the folder with the name of the game you're playing while saving from the game, or while that game is running! This can cause fatal flaws many dwarf-seasons later, and is one known cause of the "Nemesis Unit Load Failed" crash error.

Contents

The saved game folder will usually have these contents:

  • A subdirectory, raw, containing the raws directly copied from the time the world was generated.
    • Inside here is an objects folder containing the contents of the raws. This must be kept, but the contents inside can be modified to an extent.
    • There is also a graphics folder for graphics for creatures.
    • Finally, there may be an interaction examples folder. This, along with any files or folders not present in the aforementioned two folders, can be safely deleted.
  • A series of files named art_image-#.dat. As their name would suggest, these files store information about art and are necessary for proper functioning. Replacement with other files is not recommanded.
  • A series of files named feature-#-#.dat. The amount of these files is heavily dependant on the size of the world, and they store the information about map features (such as rivers, caverns, magma seas, and spires). Replacing these files will very rarely crash the game, but usually will cause unwanted effects such as magma seas present on the surface. These files do not seem to cause too many crashes when removed, and do not exist in some perculiar worlds.
  • A series of files named region_snapshot-#.dat. These are the historical maps available in Legends mode.
  • A series of files named site-#.dat.
  • A series of files named unit-#.dat. Replacing these has been known to cause the infamous Nemesis Unit Load Failed error. Resolving the aforementioned error, however, involves copying these over from a previous backup of the save. Depending on the size of the world, there could easily be thousands of these files, making it infeasible to send the saved game folder without compressing it all in one file first.
  • A large file named world.sav. This is the main save folder. The custom raws generated for the forgotten beasts, titans, demons, night creatures, and evil effects are stored in this file. Replacing this entire file will almost certainly crash the game; however, replacing certain portions of the raws included may still keep the save folder working.

Missing one or more of the aforementioned important files may indicate a problem with the save; this is a very common source of crashes.

Backing up saves

Toady recommends that you make backups, and always save to a fresh file:

  1. Copy the relevant region folder in "data/save" to a safe location.
  2. When you want to reuse it, copy that region back to "data/save".

Do not overwrite an old folder, as it might leave residual files.

Please do back up saves. Although the game has permanent death and you might want to play it in that spirit, the game, it is also an alpha, and your world might become corrupted by an error. You can also make use of the auto save features settable in "data/init/d_init.txt".

For more info on the autosave feature, see d_init.txt.

Disappearing saves

Restoring a savegame from backup can be very confusing.

The game saves to the directory from which it was loaded, so if you restore a game from a seasonal save after a crash, you will be saving to the folder from which you loaded and not to your default folder where you would expect it.

This can cause some high blood pressure and panic, because you will see your 'Region X' save as several years older than you would expect it and it will look like you lost all your work since last autosave to some bug. The save you would like to load is however going to be hidden in the slot from which you loaded from automatic backup.

The golden rule is: if you want to restore a savegame from backup, you should rename that backup to indicate that. Remember to do that while the game is not running, per the instructions for savescumming above.