Recover

From NetHackWiki
(Redirected from Crashed)
Jump to: navigation, search

"Crash" redirects here. For the sound effect, see Crash!
recover is the small utility program that comes with NetHack. It is used to turn temporary level files into a save file, for example after a power outage during a game.

When trying to restart the game, you get the error message:

"There is already a game in progress under your name. Destroy old game? [yn]"

Say no to the above and keep reading.

Unfortunately, the utility is not totally automated. You need to know some basics about the command line. If you have difficulties ask for help.

General use

Depending on your system, you use a command similar to this:

<fullPath>recover -d <playground> <username>
  • <fullPath>recover Actually, the utility is not a normally accessible command, you need to use the full path to the executable.
  • <playground> is the Playground path where the temporary level files were put during gameplay.

This will most likely only rebuild the savefile, but you might need further commands, depending on your system, to actually reuse it.

For SLASH'EM and probably other variants, it's almost the same as for nethack. Simply replace "nethack" with "slashem" (or other variant name).

For vulture's eye, the name is hard-coded to alock. The command is something like this:

vultureseye-recover -d <playground> alock

Specifics for Linux/Unix

Accidental Ctrl-Z

First make sure you didn't just press ctrl-Z by accident. This simply suspends the current game with out any real damage. A characteristic "[1]+ Stopped nethack" message is given. Read the "fg" article first.

Accidental new shell

A user has suggested improving this page or section as follows:

"What are these keyboard shortcuts for some popular environments??"

Another possible accidental keyboard shortcut. Depending on the command line environment, terminal simulator or desktop environment, they are various keyboard shortcuts to launch a new shell on top of the one you are currently using. This is inside the same window you are using and no message is given. Apparently you drop back in the command line, with no message.

First make sure you aren't in the "Ctrl-Z" situation. The command "jobs" should return nothing. "Ctrl-Z" is a more frequent error and has a characteristic message. When you excluded "Ctrl-Z", to go back to the game, just give the "exit" command (caution!!!! Read the rest first). This command simply kills the current terminal, in our case the superfluous terminal, so make sure you really are in this situation before you try it. If you give the "exit" command after a "Ctrl-Z", you'll probably have to use the recover utility.

Running the command

On Linux and other Unixen, you usually invoke recover like this:

sudo <fullPath>recover -d <playground> <UIDusername>

for ubuntu systems, that would be something like this:

sudo /usr/lib/games/nethack/recover -d /var/games/nethack 1000Bob

This will create a file "1000Bob" in "<playground>" directory. If successful it will give the message "recovered "1000Bob" to 1000Bob".

  • <fullPath>recover Actually, the utility is not a normally accessible command, you need to use the full path to the executable. In Ubuntu systems, the full path is "/usr/lib/games/nethack/".
  • <playground> is the Playground path where the temporary level files were put during gameplay. In Ubuntu systems, that would be "/var/games/nethack/save"
  • <UIDusername> is the file name of the temporary files, without extension. You can easily guess it by inspecting the Playground. They are two components, the "UID" and the "username". It's the UID and username of the user on the system. The UID is a number unique for a user. On single user systems, the UID is usually "1000". The "username" is just the user name or log in .

If you are using official NetHack and your distribution does not come with recover you can download it from the official download-page at http://www.nethack.org/. Check first the other installed files.

Using the file again

Once you executed the recover command successfully.

  • You need to give the created file the correct group.

in general, run the command:

sudo chgrp games <playground><UIDusername>

in the example:

sudo chgrp games /var/games/nethack/1000bob

  • then, you compress it with:

sudo gzip <playground><UIDusername>

in the example:

sudo gzip /var/games/nethack/1000bob

this will create a file with the extension ".gz" or "<UIDusername>.gz". In the example "1000bob.gz".

  • then copy it in the save directory:

sudo cp -p <playground><UIDusername>.gz <playground>/save/

in the example:

sudo cp -p /var/games/nethack/1000bob.gz /var/games/nethack/save/

  • Finally. Hopefully, you can play now. Ask for help if this is too much for you.

A user has suggested improving this page or section as follows:

"if slashem is the same then there doesn't seem to be much point in noting it"

SLASH'EM

For SLASH'EM, it's almost the same as for nethack. Simply replace "nethack" with "slashem". So the example becomes:

sudo /usr/lib/games/slashem/recover -d /var/games/slashem 1000bob

External links

This page may need to be updated for NetHack 3.6.0.

It may contain text specific to NetHack 3.4.3. Information on this page may be out of date.

Editors: After reviewing this page and making necessary edits, please change the {{nethack-343}} tag to {{nethack-360}} or {{noversion}} as appropriate.