Difference between revisions of "Recover"

From NetHackWiki
Jump to navigation Jump to search
Line 1: Line 1:
 
'''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.
 
'''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.
  
Unfortunately, the utility is not totally automated. You need to know some basics about the command line. If you have difficulties ask for help.
+
Unfortunately, the utility is not totally automated. You need to know some basics about the command line. If you have difficulties ask for [[freenode|help]].
  
 
==Linux/Unix==
 
==Linux/Unix==
Line 66: Line 66:
 
sudo chgrp bob /var/games/nethack/save/1000bob.gz
 
sudo chgrp bob /var/games/nethack/save/1000bob.gz
  
hopefully, you can play now. Ask for help if this is too much for you.
+
hopefully, you can play now. Ask for [[freenode|help]] if this is too much for you.
  
 
===[[Vulture's]]===
 
===[[Vulture's]]===
For vulture's eye, the name is hard-coded to <tt>alock</tt>. The command is something like this:
+
For vulture's eye, the name is hard-coded to ''alock''. The command is something like this:
  
 
  vultureseye-recover -d <playground> alock
 
  vultureseye-recover -d <playground> alock

Revision as of 15:41, 11 November 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.

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

Running the command

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

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

for ubuntu systems, that would be something like this:

/usr/lib/games/nethack/recover -d /var/games/nethack 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

Note: Not sure, if you really need to do all the steps bellow.

  • Once you executed the command successfully. You need to give the created file the correct ownership and group.

in general run the commands:

chown <username> ./<UIDusername>
chgrp games ./<UIDusername>

in the example:

chown bob ./1000bob
chgrp games ./1000bob

(when it will be compressed, owner and group are preserved. This is why you have to change them now.)

  • then, you compress it with:

gzip ./<UIDusername>

in the example:

gzip ./1000bob

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

  • then copy it in the save directory:

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

in the example:

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

  • finally give again the correct ownership and group to the copied file.

sudo chown <username> <playground>/save/<UIDusername>.gz
sudo chgrp games <playground>/save/<UIDusername>.gz

in the example:

sudo chown bob /var/games/nethack/save/1000bob.gz
sudo chgrp bob /var/games/nethack/save/1000bob.gz

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