Playground
The playground is the name of the folder or directory where NetHack can write files.
Like many programs, NetHack has executable and data files which do not change after installation; configuration files which can be adjusted by a user or administrator; and data files which change as the program runs.
On some systems, such as older Windows versions, or when NetHack is installed in a single user's home directory, all of these files may be in the same place.
More typically, however, especially on multi-user systems, the unchanging files are installed in one place – under /usr on Unix, or under \Program Files\ on Windows – and the variable files are kept under a directory where users have write access, such as /var on Unix or \AppData\ on Windows. In this case, playground refers to the directory containing NetHack's variable files; a distinct directory with the executable and data files is called hackdir in some NetHack documents.
The data includes dungeon descriptions, rumours (rumor.tru and rumor.fal), save files, temporary files during gameplay, the logfile, and the high scores list.
The default playground on Linux is /usr/games/lib/nethackdir/
The default playground on FreeBSD is /usr/local/lib/nethack/
In Debian (Lenny) and Ubuntu (Cosmic) the playground is /var/games/nethack
On openSUSE, the playgrounds are located at /var/games/nethack and /usr/share/games/vulture-* for the various Vulture.
On FreeBSD it can also be located at /usr/local/share/nethack
On Mac OS, it may be located at /Library/NetHack/nethackdir or, if installed via Homebrew, /usr/local/Cellar/nethack/VERSION/libexec/save
On Windows, it may be located at %LocalAppData%\NetHack\VERSION, such as %LocalAppData%\NetHack\3.6.
Paths
NetHack uses various system paths to store gameplay data—in Unix-based systems you can check your default directories with the --showpaths option as described in NetHack's manual. Apart from the system configuration file, users can modify the directories that NetHack uses. The main paths that players may want to change are the following:
- NETHACKDIR is the main directory for game files, and the playground as described it is the playground.
- LEVELDIR is the path where level files for in-progress games are stored in.
- SAVEDIR is the path where saved games are kept.
- BONESDIR is the path where bones files are kept.
- SCOREDIR is the path for your score files.
- LOCKDIR is the path where file synchronization locks are stored.
Changing these environment variables may be useful for save scumming with limited machine access, or to adjust the playground along with editing config file. Note that if you decide to change these environment variables, e.g. in your ~/.bash_profile, the directories you specify must exist and be writable—NetHack will not create them for you.