RECOVER(6)

πŸ“¦ version 0.0.8, in fedora 43, fedora 44

πŸ’– RECOVER(6) β€” the games manual page bestie πŸ’–

okay so this is recover, from the Games Manual section of your local man pages, and she is here to save your NetHack run from total disaster. 🫢


✨ NAME ✨

recover β€” recover a NetHack game interrupted by disaster πŸ’€βž‘οΈπŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

recover [ -d directory ] base1 base2 ...

🌸 DESCRIPTION 🌸

So like, every once in a while a NetHack game gets interrupted by disaster β€” the game crashes, or the whole system crashes, and your run is just gone. 😭 Prior to NetHack v3.1, those games were lost, periodt, because all the important stuff like the player's inventory was kept only in memory. πŸ’€ But now? All the pertinent information can be written out to disk, so those games can be recovered at the point of the last level change. Slay. ✨

The base options tell recover which files to process. Each base option specifies recovery of a separate game. (Yes bestie, one base per game, don't mix them up. πŸ’…)

  • -d directory β€” supplies a directory which is the NetHack playground. It must be the first argument if it appears. It overrides the value from NETHACKDIR, HACKDIR, or the directory specified by the game administrator during compilation (usually /usr/games/lib/nethackdir).
🚨 For recovery to be possible at all, nethack must have been compiled with the INSURANCE option, and the run-time option checkpoint must also have been on. No cap, both. 🚨

NetHack normally writes out files for levels as the player leaves them, so they'll be ready for return visits. When checkpointing, NetHack also writes out the level entered and the current game state on every level change. This naturally slows level changes down somewhat. 🐌 (worth it tho)

The level file names are of the form base.nn, where nn is an internal bookkeeping number for the level. The file base.0 is used for game identity, locking, and, when checkpointing, for the game state. Various OSes use different strategies for constructing the base name:

  • Microcomputers use the character name, possibly truncated and modified to be a legal filename on that system.
  • Multi-user systems use the (modified) character name prefixed by a user number to avoid conflicts, or "xlock" if the number of concurrent players is being limited.

It may be necessary to look in the playground to find the correct base name of the interrupted game. πŸ” recover will transform these level files into a save file of the same name as nethack would have used. iconic.


πŸ” the security tea πŸ”

Since recover must be able to read and delete files from the playground and create files in the save directory, it has interesting interactions with game security. πŸ‘€ Giving ordinary players access to recover through setuid or setgid is tantamount to leaving the playground world-writable, with respect to both cheating and messing up other players. Yeah. Not the vibe. πŸ™ˆ

For a single-user system, this of course does not change anything, so some of the microcomputer ports install recover by default. ✨

For a multi-user system, the game administrator may want to arrange for all .0 files in the playground to be fed to recover when the host machine boots, and handle game crashes individually. If the user population is sufficiently trustworthy, recover can be installed with the same permissions the nethack executable has. In either case, recover is easily compiled from the distribution utility directory. πŸ› οΈ


πŸ¦‹ NOTES πŸ¦‹

Like nethack itself, recover will overwrite existing savefiles of the same name. 😳

Savefiles created by recover are uncompressed; they may be compressed afterwards if desired, but even a compression-using nethack will find them in the uncompressed form. 🫢


🌈 SEE ALSO 🌈


πŸ’€ BUGS πŸ’€

  • recover makes no attempt to find out if a base name specifies a game in progress. If multiple machines share a playground, this would be impossible to determine.
  • recover should be taught to use the nethack playground locking mechanism to avoid conflicts.

and that's the whole page, bestie πŸ’œ this one came from the 4th Berkeley Distribution, dated 9 January 1993 β€” yeah she's an elder icon and she still ate πŸ‘‘βœ¨

πŸ“¦ where this page comes from