Difference between revisions of "Recover"

From NetHackWiki
Jump to navigation Jump to search
m (Running the command)
(Running the command)
Line 22: Line 22:
 
for ubuntu systems, that would be something like this:
 
for ubuntu systems, that would be something like this:
 
  sudo /usr/lib/games/nethack/recover -d /var/games/nethack 1000Bob
 
  sudo /usr/lib/games/nethack/recover -d /var/games/nethack 1000Bob
 +
 +
This will create a file "1000Bob" in "<playground>" directory.
  
 
*''<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/".
 
*''<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/".

Revision as of 19:25, 7 December 2014

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.

Linux/Unix

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. Read the "fg" article first.

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.

  • <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:

chgrp games <UIDusername>

in the example:

chgrp games 1000bob

  • then, you compress it with:

gzip <UIDusername>

in the example:

gzip 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 <UIDusername>.gz <playground>/save/

in the example:

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

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

Vulture's

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

vultureseye-recover -d <playground> alock

SLASH'EM

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

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

External links