RECOVER(6)

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

πŸ’Ύ RECOVER(6) πŸ’Ύ

okay bestie, this is the recover page from the Games Manual β€” literally the girl whose whole job is rescuing your NetHack run after the universe said "not today" πŸ’€


✨ NAME ✨

recover β€” recover a NetHack game interrupted by disaster 🫢


πŸŽ€ SYNOPSIS πŸŽ€

recover [ -d directory ] base1 base2 ...

🌸 DESCRIPTION 🌸

so like. sometimes a NetHack game gets interrupted by disaster when the game or the system crashes. tragic, i know. and before NetHack v3.1? those games were just gone, because stuff like the player's inventory was kept only in memory. rip. but now, all 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. one base = one rescue mission, no cap.

the -d option β€” and bestie, it must be the first argument if it appears, that's not a vibe, that's a rule β€” supplies a directory which is the NetHack playground. it overrides the value from NETHACKDIR, HACKDIR, or the directory specified by the game administrator during compilation (usually /usr/games/vultureseye). iykyk.

for recovery to even be possible, nethack must have been compiled with the INSURANCE option, and the run-time option checkpoint must also have been on. both. it's giving "two-factor auth but for saves." 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. which naturally slows level changes down somewhat. small price, bestie πŸ’…

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. (scavenger hunt energy, honestly πŸ¦‹) recover will transform these level files into a save file of the same name as nethack would have used. iconic.

now. 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. so like… don't do that, fr fr. for a single-user system, this of course does not change anything, so some of the microcomputer ports install recover by default. makes sense, no notes.

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. heads up bestie, it does not ask twice 😭

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. so it all works out 🫢


πŸ‘€ 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. it's giving "we tried nothing and we're all out of ideas."

recover should be taught to use the nethack playground locking mechanism to avoid conflicts. noted, on the list, we'll get to it πŸ’…


ok that's the whole page bestie, every flag, every file, every warning β€” nothing skipped, nothing invented, all facts intact 🌈

and that's a wrap, angels πŸ’– this was the 4th Berkeley Distribution version, dated 9 January 1993 β€” old enough to be vintage, still out here saving your runs. periodt. πŸ‘‘

πŸ“¦ where this page comes from