Merge branch 'NetHack-3.6.0'
Conflicts: sys/share/lev_lex.c Changes to be committed: modified: doc/nethack.6 modified: doc/nethack.txt modified: doc/recover.6 modified: doc/recover.txt modified: src/read.c modified: sys/share/dgn_lex.c modified: sys/share/lev_lex.c modified: sys/unix/Makefile.top
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
.TH NETHACK 6 "6 March 2004"
|
||||
.\" NetHack 3.6 nethack.6 $NHDT-Date: 1432512786 2015/05/25 00:13:06 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $
|
||||
.TH NETHACK 6 "7 December 2015"
|
||||
.\" NetHack 3.6 nethack.6 $NHDT-Date: 1449616496 2015/12/08 23:14:56 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.11 $
|
||||
.SH NAME
|
||||
nethack \- Exploring The Mazes of Menace
|
||||
.SH SYNOPSIS
|
||||
@@ -226,10 +226,17 @@ development by the Usenet. Andries Brouwer has made this request for the
|
||||
distinction, as he may eventually release a new version of his own.
|
||||
.SH FILES
|
||||
.PP
|
||||
All files are in the playground, normally /usr/games/lib/nethackdir.
|
||||
Run-time configuration options were discussed above and use a platform
|
||||
specific name for a file in a platform specific location. For Unix, the
|
||||
name is '.nethackrc' in the user's home directory.
|
||||
|
||||
.br
|
||||
All other files are in the playground directory,
|
||||
normally /usr/games/lib/nethackdir.
|
||||
If DLB was defined during the compile, the data files and special levels
|
||||
will be inside a larger file, normally nhdat, instead of being separate
|
||||
files.
|
||||
|
||||
.br
|
||||
.DT
|
||||
.ta \w'cmdhelp, opthelp, wizhelp\ \ \ 'u
|
||||
@@ -237,7 +244,18 @@ nethack The program itself.
|
||||
.br
|
||||
data, oracles, rumors Data files used by NetHack.
|
||||
.br
|
||||
options, quest.dat More data files.
|
||||
quest.dat, bogusmon More data files.
|
||||
.br
|
||||
engrave, epitaph, tribute Still more data files.
|
||||
.br
|
||||
symbols Data file holding sets of specifications
|
||||
.br
|
||||
for how to display monsters, objects, and
|
||||
.br
|
||||
map features.
|
||||
.br
|
||||
options Data file containing a description of the
|
||||
build-time option settings.
|
||||
.br
|
||||
help, hh Help data files.
|
||||
.br
|
||||
@@ -253,26 +271,63 @@ license Rules governing redistribution.
|
||||
.br
|
||||
record The list of top scorers.
|
||||
.br
|
||||
logfile An extended list of games
|
||||
logfile An extended list of games played
|
||||
.br
|
||||
played.
|
||||
(optional).
|
||||
.br
|
||||
xlock.nnn Description of a dungeon level.
|
||||
xlogfile A more detailed version of 'logfile'
|
||||
.br
|
||||
perm Lock file for xlock.dd.
|
||||
(also optional).
|
||||
.br
|
||||
bonesDD.nn Descriptions of the ghost and
|
||||
paniclog Record of exceptional conditions
|
||||
.br
|
||||
belongings of a deceased
|
||||
discovered during program execution.
|
||||
.br
|
||||
adventurer.
|
||||
xlock.nn Description of dungeon level 'nn' of
|
||||
.br
|
||||
save A subdirectory containing the
|
||||
active game 'x' if there's a limit on the
|
||||
.br
|
||||
saved games.
|
||||
number of simultaneously active games.
|
||||
.br
|
||||
UUcccccc.nn Alternate form for dungeon level 'nn'
|
||||
.br
|
||||
of active game by user 'UU' playing
|
||||
.br
|
||||
character named 'cccccc' when there's no
|
||||
.br
|
||||
limit on number of active games.
|
||||
.br
|
||||
perm Lock file for xlock.0 or UUcccccc.0.
|
||||
.br
|
||||
bonesDD.nn Descriptions of the ghost and belongings
|
||||
.br
|
||||
of a deceased adventurer who met his
|
||||
.br
|
||||
or her demise on level 'nn'.
|
||||
.br
|
||||
.\"following line should contain <space><tab>
|
||||
|
||||
.br
|
||||
save/ A subdirectory containing saved games.
|
||||
.br
|
||||
.\"following line should contain <space><tab>
|
||||
|
||||
.br
|
||||
sysconf System-wide options. Required if
|
||||
.br
|
||||
program is built with 'SYSCF' option
|
||||
.br
|
||||
enabled, ignored if not.
|
||||
.br
|
||||
|
||||
The location of 'sysconf' is specified at build time and can't be changed
|
||||
except by updating source file "config.h" and rebuilding the program.
|
||||
.br
|
||||
|
||||
In a perfect world, 'paniclog' would remain empty.
|
||||
.SH ENVIRONMENT
|
||||
.DT
|
||||
.ta \w'HACKPAGER or PAGER\ \ \ 'u
|
||||
.ta \w'NETHACKDIR or HACKDIR\ \ \ 'u
|
||||
USER or LOGNAME Your login name.
|
||||
.br
|
||||
HOME Your home directory.
|
||||
@@ -289,14 +344,20 @@ MAILREADER Replacement for default reader
|
||||
.br
|
||||
(probably /bin/mail or /usr/ucb/mail).
|
||||
.br
|
||||
NETHACKDIR Playground.
|
||||
NETHACKDIR or HACKDIR Playground.
|
||||
.br
|
||||
NETHACKOPTIONS String predefining several NetHack
|
||||
.br
|
||||
options.
|
||||
.br
|
||||
|
||||
In addition, SHOPTYPE is used in debugging (wizard) mode.
|
||||
If the same option is specified in both NETHACKOPTIONS and .nethackrc,
|
||||
the value assigned in NETHACKOPTIONS takes precedence.
|
||||
.br
|
||||
|
||||
SHOPTYPE and SPLEVTYPE can be used in debugging (wizard) mode.
|
||||
.br
|
||||
DEBUGFILES can be used if the program was built with 'DEBUG' enabled.
|
||||
.SH "SEE ALSO"
|
||||
.PP
|
||||
dgn_comp(6), lev_comp(6), recover(6)
|
||||
|
||||
293
doc/nethack.txt
293
doc/nethack.txt
@@ -1,4 +1,4 @@
|
||||
NETHACK(6) NETHACK(6)
|
||||
NETHACK(6) NETHACK(6)
|
||||
|
||||
|
||||
|
||||
@@ -6,143 +6,150 @@ NAME
|
||||
nethack - Exploring The Mazes of Menace
|
||||
|
||||
SYNOPSIS
|
||||
nethack [ -d directory ] [ -n ] [ -p profession ] [ -r race ] [
|
||||
-[DX] ] [ -u playername ] [ -dec ] [ -ibm ]
|
||||
nethack [ -d directory ] [ -n ] [ -p profession ] [ -r race ] [ -[DX] ]
|
||||
[ -u playername ] [ -dec ] [ -ibm ]
|
||||
|
||||
nethack [ -d directory ] -s [ -v ] [ -p profession ] [ -r race ]
|
||||
[ playernames ]
|
||||
nethack [ -d directory ] -s [ -v ] [ -p profession ] [ -r race ] [
|
||||
playernames ]
|
||||
|
||||
DESCRIPTION
|
||||
NetHack is a display oriented Dungeons & Dragons(tm) - like game.
|
||||
The standard tty display and command structure resemble rogue.
|
||||
NetHack is a display oriented Dungeons & Dragons(tm) - like game. The
|
||||
standard tty display and command structure resemble rogue.
|
||||
|
||||
Other, more graphical display options exist if you are using
|
||||
either a PC, or an X11 interface.
|
||||
Other, more graphical display options exist for most platforms.
|
||||
|
||||
To get started you really only need to know two commands. The
|
||||
command ? will give you a list of the available commands (as
|
||||
well as other information) and the command / will identify the
|
||||
things you see on the screen.
|
||||
To get started you really only need to know two commands. The command
|
||||
? will give you a list of the available commands (as well as other
|
||||
information) and the command / will identify the things you see on the
|
||||
screen.
|
||||
|
||||
To win the game (as opposed to merely playing to beat other peo-
|
||||
ple's high scores) you must locate the Amulet of Yendor which is
|
||||
somewhere below the 20th level of the dungeon and get it out.
|
||||
Nobody has achieved this yet; anybody who does will probably go
|
||||
down in history as a hero among heroes.
|
||||
To win the game (as opposed to merely playing to beat other people's
|
||||
high scores) you must locate the Amulet of Yendor which is somewhere
|
||||
below the 20th level of the dungeon and get it out. Few people achieve
|
||||
this; most never do. Those who have go down in history as heros among
|
||||
heroes - and then they find ways of making the game even harder. See
|
||||
the Guidebook section on Conduct if this game has gotten too easy for
|
||||
you.
|
||||
|
||||
When the game ends, whether by your dying, quitting, or escaping
|
||||
from the caves, NetHack will give you (a fragment of) the list of
|
||||
top scorers. The scoring is based on many aspects of your behav-
|
||||
ior, but a rough estimate is obtained by taking the amount of
|
||||
gold you've found in the cave plus four times your (real) experi-
|
||||
ence. Precious stones may be worth a lot of gold when brought to
|
||||
the exit. There is a 10% penalty for getting yourself killed.
|
||||
When the game ends, whether by your dying, quitting, or escaping from
|
||||
the caves, NetHack will give you (a fragment of) the list of top scor-
|
||||
ers. The scoring is based on many aspects of your behavior, but a
|
||||
rough estimate is obtained by taking the amount of gold you've found in
|
||||
the cave plus four times your (real) experience. Precious stones may
|
||||
be worth a lot of gold when brought to the exit. There is a 10%
|
||||
penalty for getting yourself killed.
|
||||
|
||||
The environment variable NETHACKOPTIONS can be used to initialize
|
||||
many run-time options. The ? command provides a description of
|
||||
these options and syntax. (The -dec and -ibm command line
|
||||
options are equivalent to the decgraphics and ibmgraphics run-
|
||||
time options described there, and are provided purely for conve-
|
||||
nience on systems supporting multiple types of terminals.)
|
||||
The environment variable NETHACKOPTIONS can be used to initialize many
|
||||
run-time options. The ? command provides a description of these
|
||||
options and syntax. (The -dec and -ibm command line options are equiv-
|
||||
alent to the decgraphics and ibmgraphics run-time options described
|
||||
there, and are provided purely for convenience on systems supporting
|
||||
multiple types of terminals.)
|
||||
|
||||
Because the option list can be very long (particularly when spec-
|
||||
ifying graphics characters), options may also be included in a
|
||||
configuration file. The default is located in your home direc-
|
||||
tory and named .nethackrc on Unix systems. On other systems, the
|
||||
default may be different, usually NetHack.cnf. On DOS or Win-
|
||||
dows, the name is defaults.nh, while on the Macintosh or BeOS, it
|
||||
is NetHack Defaults. The configuration file's location may be
|
||||
specified by setting NETHACKOPTIONS to a string consisting of an
|
||||
@ character followed by the filename.
|
||||
Because the option list can be very long (particularly when specifying
|
||||
graphics characters), options may also be included in a configuration
|
||||
file. The default is located in your home directory and named
|
||||
.nethackrc on Unix systems. On other systems, the default may be dif-
|
||||
ferent, usually NetHack.cnf. On DOS or Windows, the name is
|
||||
defaults.nh, while on the Macintosh or BeOS, it is NetHack Defaults.
|
||||
The configuration file's location may be specified by setting NETHACK-
|
||||
OPTIONS to a string consisting of an @ character followed by the file-
|
||||
name.
|
||||
|
||||
The -u playername option supplies the answer to the question "Who
|
||||
are you?". It overrides any name from the options or configura-
|
||||
tion file, USER, LOGNAME, or getlogin(), which will otherwise be
|
||||
tried in order. If none of these provides a useful name, the
|
||||
player will be asked for one. Player names (in conjunction with
|
||||
uids) are used to identify save files, so you can have several
|
||||
saved games under different names. Conversely, you must use the
|
||||
appropriate player name to restore a saved game.
|
||||
The -u playername option supplies the answer to the question "Who are
|
||||
you?". It overrides any name from the options or configuration file,
|
||||
USER, LOGNAME, or getlogin(), which will otherwise be tried in order.
|
||||
If none of these provides a useful name, the player will be asked for
|
||||
one. Player names (in conjunction with uids) are used to identify save
|
||||
files, so you can have several saved games under different names. Con-
|
||||
versely, you must use the appropriate player name to restore a saved
|
||||
game.
|
||||
|
||||
A playername suffix can be used to specify the profession, race,
|
||||
alignment and/or gender of the character. The full syntax of the
|
||||
playername that includes a suffix is "name-ppp-rrr-aaa-ggg".
|
||||
"ppp" are at least the first three letters of the profession
|
||||
(this can also be specified using a separate -p profession
|
||||
option). "rrr" are at least the first three letters of the char-
|
||||
acter's race (this can also be specified using a separate -r race
|
||||
option). "aaa" are at last the first three letters of the char-
|
||||
acter's alignment, and "ggg" are at least the first three letters
|
||||
of the character's gender. Any of the parts of the suffix may be
|
||||
left out.
|
||||
A playername suffix can be used to specify the profession, race, align-
|
||||
ment and/or gender of the character. The full syntax of the playername
|
||||
that includes a suffix is "name-ppp-rrr-aaa-ggg". "ppp" are at least
|
||||
the first three letters of the profession (this can also be specified
|
||||
using a separate -p profession option). "rrr" are at least the first
|
||||
three letters of the character's race (this can also be specified using
|
||||
a separate -r race option). "aaa" are at last the first three letters
|
||||
of the character's alignment, and "ggg" are at least the first three
|
||||
letters of the character's gender. Any of the parts of the suffix may
|
||||
be left out.
|
||||
|
||||
-p profession can be used to determine the character profession,
|
||||
also known as the role. You can specify either the male or female
|
||||
name for the character role, or the first three characters of the
|
||||
role as an abbreviation. -p @ has been retained to explicitly
|
||||
request that a random role be chosen. It may need to be quoted
|
||||
with a backslash (\@) if @ is the "kill" character (see "stty")
|
||||
for the terminal, in order to prevent the current input line from
|
||||
being cleared.
|
||||
-p profession can be used to determine the character profession, also
|
||||
known as the role. You can specify either the male or female name for
|
||||
the character role, or the first three characters of the role as an
|
||||
abbreviation. -p @ has been retained to explicitly request that a ran-
|
||||
dom role be chosen. It may need to be quoted with a backslash (\@) if
|
||||
@ is the "kill" character (see "stty") for the terminal, in order to
|
||||
prevent the current input line from being cleared.
|
||||
|
||||
Likewise, -r race can be used to explicitly request that a race
|
||||
be chosen.
|
||||
Likewise, -r race can be used to explicitly request that a race be cho-
|
||||
sen.
|
||||
|
||||
Leaving out any of these characteristics will result in you being
|
||||
Leaving out any of these characteristics will result in you being
|
||||
prompted during the game startup for the information.
|
||||
|
||||
|
||||
The -s option alone will print out the list of your scores on the
|
||||
current version. An immediately following -v reports on all ver-
|
||||
sions present in the score file. The -s may also be followed by
|
||||
arguments -p and -r to print the scores of particular roles and
|
||||
races only. It may also be followed by one or more player names
|
||||
to print the scores of the players mentioned, by 'all' to print
|
||||
out all scores, or by a number to print that many top scores.
|
||||
The -s option alone will print out the list of your scores on the cur-
|
||||
rent version. An immediately following -v reports on all versions
|
||||
present in the score file. The -s may also be followed by arguments -p
|
||||
and -r to print the scores of particular roles and races only. It may
|
||||
also be followed by one or more player names to print the scores of the
|
||||
players mentioned, by 'all' to print out all scores, or by a number to
|
||||
print that many top scores.
|
||||
|
||||
The -n option suppresses printing of any news from the game
|
||||
administrator.
|
||||
The -n option suppresses printing of any news from the game administra-
|
||||
tor.
|
||||
|
||||
The -D or -X option will start the game in a special non-scoring
|
||||
discovery mode. -D will, if the player is the game administra-
|
||||
tor, start in debugging (wizard) mode instead.
|
||||
The -D or -X option will start the game in a special non-scoring dis-
|
||||
covery mode. -D will, if the player is the game administrator, start
|
||||
in debugging (wizard) mode instead.
|
||||
|
||||
The -d option, which must be the first argument if it appears,
|
||||
supplies a directory which is to serve as the playground. It
|
||||
overrides the value from NETHACKDIR, HACKDIR, or the directory
|
||||
specified by the game administrator during compilation (usually
|
||||
/usr/games/lib/nethackdir). This option is usually only useful
|
||||
to the game administrator. The playground must contain several
|
||||
auxiliary files such as help files, the list of top scorers, and
|
||||
a subdirectory save where games are saved.
|
||||
The -d option, which must be the first argument if it appears, supplies
|
||||
a directory which is to serve as the playground. It overrides the
|
||||
value from NETHACKDIR, HACKDIR, or the directory specified by the game
|
||||
administrator during compilation (usually /usr/games/lib/nethackdir).
|
||||
This option is usually only useful to the game administrator. The
|
||||
playground must contain several auxiliary files such as help files, the
|
||||
list of top scorers, and a subdirectory save where games are saved.
|
||||
|
||||
AUTHORS
|
||||
Jay Fenlason (+ Kenny Woodland, Mike Thome and Jon Payne) wrote
|
||||
the original hack, very much like rogue (but full of bugs).
|
||||
Jay Fenlason (+ Kenny Woodland, Mike Thome and Jon Payne) wrote the
|
||||
original hack, very much like rogue (but full of bugs).
|
||||
|
||||
Andries Brouwer continuously deformed their sources into an
|
||||
entirely different game.
|
||||
Andries Brouwer continuously deformed their sources into an entirely
|
||||
different game.
|
||||
|
||||
Mike Stephenson has continued the perversion of sources, adding
|
||||
various warped character classes and sadistic traps with the help
|
||||
of many strange people who reside in that place between the
|
||||
worlds, the Usenet Zone. A number of these miscreants are immor-
|
||||
talized in the historical roll of dishonor and various other
|
||||
places.
|
||||
Mike Stephenson has continued the perversion of sources, adding various
|
||||
warped character classes and sadistic traps with the help of many
|
||||
strange people who reside in that place between the worlds, the Usenet
|
||||
Zone. A number of these miscreants are immortalized in the historical
|
||||
roll of dishonor and various other places.
|
||||
|
||||
The resulting mess is now called NetHack, to denote its develop-
|
||||
ment by the Usenet. Andries Brouwer has made this request for
|
||||
the distinction, as he may eventually release a new version of
|
||||
his own.
|
||||
The resulting mess is now called NetHack, to denote its development by
|
||||
the Usenet. Andries Brouwer has made this request for the distinction,
|
||||
as he may eventually release a new version of his own.
|
||||
|
||||
FILES
|
||||
All files are in the playground, normally
|
||||
/usr/games/lib/nethackdir. If DLB was defined during the com-
|
||||
pile, the data files and special levels will be inside a larger
|
||||
file, normally nhdat, instead of being separate files.
|
||||
Run-time configuration options were discussed above and use a platform
|
||||
specific name for a file in a platform specific location. For Unix,
|
||||
the name is '.nethackrc' in the user's home directory.
|
||||
|
||||
All other files are in the playground directory, normally
|
||||
/usr/games/lib/nethackdir. If DLB was defined during the compile, the
|
||||
data files and special levels will be inside a larger file, normally
|
||||
nhdat, instead of being separate files.
|
||||
|
||||
nethack The program itself.
|
||||
data, oracles, rumors Data files used by NetHack.
|
||||
options, quest.dat More data files.
|
||||
quest.dat, bogusmon More data files.
|
||||
engrave, epitaph, tribute Still more data files.
|
||||
symbols Data file holding sets of specifications
|
||||
for how to display monsters, objects, and
|
||||
map features.
|
||||
options Data file containing a description of the
|
||||
build-time option settings.
|
||||
help, hh Help data files.
|
||||
cmdhelp, opthelp, wizhelp More help data files.
|
||||
*.lev Predefined special levels.
|
||||
@@ -150,30 +157,54 @@ FILES
|
||||
history A short history of NetHack.
|
||||
license Rules governing redistribution.
|
||||
record The list of top scorers.
|
||||
logfile An extended list of games
|
||||
played.
|
||||
xlock.nnn Description of a dungeon level.
|
||||
perm Lock file for xlock.dd.
|
||||
bonesDD.nn Descriptions of the ghost and
|
||||
belongings of a deceased
|
||||
adventurer.
|
||||
save A subdirectory containing the
|
||||
saved games.
|
||||
logfile An extended list of games played
|
||||
(optional).
|
||||
xlogfile A more detailed version of 'logfile'
|
||||
(also optional).
|
||||
paniclog Record of exceptional conditions
|
||||
discovered during program execution.
|
||||
xlock.nn Description of dungeon level 'nn' of
|
||||
active game 'x' if there's a limit on the
|
||||
number of simultaneously active games.
|
||||
UUcccccc.nn Alternate form for dungeon level 'nn'
|
||||
of active game by user 'UU' playing
|
||||
character named 'cccccc' when there's no
|
||||
limit on number of active games.
|
||||
perm Lock file for xlock.0 or UUcccccc.0.
|
||||
bonesDD.nn Descriptions of the ghost and belongings
|
||||
of a deceased adventurer who met his
|
||||
or her demise on level 'nn'.
|
||||
|
||||
save/ A subdirectory containing saved games.
|
||||
|
||||
sysconf System-wide options. Required if
|
||||
program is built with 'SYSCF' option
|
||||
enabled, ignored if not.
|
||||
|
||||
The location of 'sysconf' is specified at build time and can't be
|
||||
changed except by updating source file "config.h" and rebuilding the
|
||||
program.
|
||||
|
||||
In a perfect world, 'paniclog' would remain empty.
|
||||
|
||||
ENVIRONMENT
|
||||
USER or LOGNAME Your login name.
|
||||
HOME Your home directory.
|
||||
SHELL Your shell.
|
||||
TERM The type of your terminal.
|
||||
HACKPAGER or PAGER Replacement for default pager.
|
||||
MAIL Mailbox file.
|
||||
MAILREADER Replacement for default reader
|
||||
(probably /bin/mail or /usr/ucb/mail).
|
||||
NETHACKDIR Playground.
|
||||
NETHACKOPTIONS String predefining several NetHack
|
||||
options.
|
||||
USER or LOGNAME Your login name.
|
||||
HOME Your home directory.
|
||||
SHELL Your shell.
|
||||
TERM The type of your terminal.
|
||||
HACKPAGER or PAGER Replacement for default pager.
|
||||
MAIL Mailbox file.
|
||||
MAILREADER Replacement for default reader
|
||||
(probably /bin/mail or /usr/ucb/mail).
|
||||
NETHACKDIR or HACKDIR Playground.
|
||||
NETHACKOPTIONS String predefining several NetHack
|
||||
options.
|
||||
|
||||
In addition, SHOPTYPE is used in debugging (wizard) mode.
|
||||
If the same option is specified in both NETHACKOPTIONS and .nethackrc,
|
||||
the value assigned in NETHACKOPTIONS takes precedence.
|
||||
|
||||
SHOPTYPE and SPLEVTYPE can be used in debugging (wizard) mode.
|
||||
DEBUGFILES can be used if the program was built with 'DEBUG' enabled.
|
||||
|
||||
SEE ALSO
|
||||
dgn_comp(6), lev_comp(6), recover(6)
|
||||
@@ -187,4 +218,4 @@ BUGS
|
||||
|
||||
|
||||
|
||||
6 March 2004 NETHACK(6)
|
||||
7 December 2015 NETHACK(6)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.TH RECOVER 6 "9 January 1993"
|
||||
.\" NetHack 3.6 recover.6 $NHDT-Date: 1432512786 2015/05/25 00:13:06 $ $NHDT-Branch: master $:$NHDT-Revision: 1.6 $
|
||||
.TH RECOVER 6 "7 December 2015"
|
||||
.\" NetHack 3.6 recover.6 $NHDT-Date: 1449616497 2015/12/08 23:14:57 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.7 $
|
||||
.UC 4
|
||||
.SH NAME
|
||||
recover \- recover a NetHack game interrupted by disaster
|
||||
@@ -34,26 +34,11 @@ It overrides the value from NETHACKDIR, HACKDIR, or the directory
|
||||
specified by the game administrator during compilation
|
||||
(usually /usr/games/lib/nethackdir).
|
||||
.PP
|
||||
^?ALLDOCS
|
||||
For recovery to be possible,
|
||||
.I nethack
|
||||
must have been compiled with the INSURANCE option, and the run-time option
|
||||
the run-time option
|
||||
.I checkpoint
|
||||
must also have been on.
|
||||
^:
|
||||
^?INSURANCE
|
||||
For recovery to be possible,
|
||||
.I nethack
|
||||
must have been compiled with the INSURANCE option (this configuration was),
|
||||
and the run-time option
|
||||
.I checkpoint
|
||||
must also have been on.
|
||||
^:
|
||||
This configuration of
|
||||
.I nethack
|
||||
was created without support for recovery.
|
||||
^.
|
||||
^.
|
||||
must have been on.
|
||||
.PP
|
||||
NetHack normally writes out files for levels as the player leaves them,
|
||||
so they will be ready for return visits.
|
||||
When checkpointing, NetHack also writes out the level entered and
|
||||
|
||||
163
doc/recover.txt
163
doc/recover.txt
@@ -1,132 +1,81 @@
|
||||
|
||||
|
||||
|
||||
RECOVER(6) 1993 RECOVER(6)
|
||||
RECOVER(6) RECOVER(6)
|
||||
|
||||
|
||||
|
||||
NAME
|
||||
recover - recover a NetHack game interrupted by disaster
|
||||
recover - recover a NetHack game interrupted by disaster
|
||||
|
||||
SYNOPSIS
|
||||
recover [ -d directory ] base1 base2 ...
|
||||
recover [ -d directory ] base1 base2 ...
|
||||
|
||||
DESCRIPTION
|
||||
Occasionally, a NetHack game will be interrupted by disaster
|
||||
when the game or the system crashes. Prior to NetHack v3.1,
|
||||
these games were lost because various information like the
|
||||
player's inventory was kept only in memory. Now, all per-
|
||||
tinent information can be written out to disk, so such games
|
||||
can be recovered at the point of the last level change.
|
||||
Occasionally, a NetHack game will be interrupted by disaster when the
|
||||
game or the system crashes. Prior to NetHack v3.1, these games were
|
||||
lost because various information like the player's inventory was kept
|
||||
only in memory. Now, all pertinent information can be written out to
|
||||
disk, so such games can be recovered at the point of the last level
|
||||
change.
|
||||
|
||||
The base options tell recover which files to process. Each
|
||||
base option specifies recovery of a separate game.
|
||||
The base options tell recover which files to process. Each base option
|
||||
specifies recovery of a separate game.
|
||||
|
||||
The -d option, which must be the first argument if it
|
||||
appears, supplies a directory which is the NetHack play-
|
||||
ground. It overrides the value from NETHACKDIR, HACKDIR, or
|
||||
the directory specified by the game administrator during
|
||||
compilation (usually /usr/games/lib/nethackdir).
|
||||
The -d option, which must be the first argument if it appears, supplies
|
||||
a directory which is the NetHack playground. It overrides the value
|
||||
from NETHACKDIR, HACKDIR, or the directory specified by the game admin-
|
||||
istrator during compilation (usually /usr/games/lib/nethackdir).
|
||||
|
||||
For recovery to be possible, nethack must have been compiled
|
||||
with the INSURANCE option, and the run-time option check-
|
||||
point must also have been on. NetHack normally writes out
|
||||
files for levels as the player leaves them, so they will 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.
|
||||
For recovery to be possible, the run-time option checkpoint must have
|
||||
been on.
|
||||
|
||||
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 play-
|
||||
ground 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.
|
||||
NetHack normally writes out files for levels as the player leaves them,
|
||||
so they will 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.
|
||||
|
||||
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 ordi-
|
||||
nary 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. For
|
||||
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. Vari-
|
||||
ous 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.
|
||||
|
||||
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.
|
||||
For a single-user system, this of course does not change anything, so
|
||||
some of the microcomputer ports install recover by default.
|
||||
|
||||
|
||||
January Last change: 9 1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
RECOVER(6) 1993 RECOVER(6)
|
||||
|
||||
|
||||
|
||||
a single-user system, this of course does not change any-
|
||||
thing, 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 permis-
|
||||
sions the nethack executable has. In either case, recover
|
||||
is easily compiled from the distribution utility directory.
|
||||
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 popu-
|
||||
lation 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 save-
|
||||
files 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.
|
||||
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
|
||||
nethack(6)
|
||||
nethack(6)
|
||||
|
||||
BUGS
|
||||
recover makes no attempt to find out if a base name speci-
|
||||
fies a game in progress. If multiple machines share a play-
|
||||
ground, this would be impossible to determine.
|
||||
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 lock-
|
||||
ing mechanism to avoid conflicts.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
January Last change: 9 2
|
||||
recover should be taught to use the nethack playground locking mecha-
|
||||
nism to avoid conflicts.
|
||||
|
||||
|
||||
|
||||
4th Berkeley Distribution 7 December 2015 RECOVER(6)
|
||||
|
||||
29
src/read.c
29
src/read.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 read.c $NHDT-Date: 1448862378 2015/11/30 05:46:18 $ $NHDT-Branch: master $:$NHDT-Revision: 1.125 $ */
|
||||
/* NetHack 3.6 read.c $NHDT-Date: 1449645144 2015/12/09 07:12:24 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.126 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -2111,6 +2111,10 @@ int how;
|
||||
} else {
|
||||
for (i = 0;; i++) {
|
||||
if (i >= 5) {
|
||||
/* cursed effect => no free pass (unless rndmonst() fails) */
|
||||
if (!(how & REALLY) && (ptr = rndmonst()) != 0)
|
||||
break;
|
||||
|
||||
pline1(thats_enough_tries);
|
||||
return;
|
||||
}
|
||||
@@ -2118,16 +2122,13 @@ int how;
|
||||
buf);
|
||||
(void) mungspaces(buf);
|
||||
/* choosing "none" preserves genocideless conduct */
|
||||
if (!strcmpi(buf, "none") || !strcmpi(buf, "nothing")) {
|
||||
if (*buf == '\033' || !strcmpi(buf, "none")
|
||||
|| !strcmpi(buf, "nothing")) {
|
||||
/* ... but no free pass if cursed */
|
||||
if (!(how & REALLY)) {
|
||||
ptr = rndmonst();
|
||||
if (!ptr)
|
||||
return; /* no message, like normal case */
|
||||
mndx = monsndx(ptr);
|
||||
if (!(how & REALLY) && (ptr = rndmonst()) != 0)
|
||||
break; /* remaining checks don't apply */
|
||||
} else
|
||||
return;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
mndx = name_to_mon(buf);
|
||||
@@ -2151,11 +2152,12 @@ int how;
|
||||
|
||||
if (!(ptr->geno & G_GENO)) {
|
||||
if (!Deaf) {
|
||||
/* fixme: unconditional "caverns" will be silly in some
|
||||
* circumstances */
|
||||
/* FIXME: unconditional "caverns" will be silly in some
|
||||
* circumstances. Who's speaking? Divine pronouncements
|
||||
* aren't supposed to be hampered by deafness....
|
||||
*/
|
||||
if (flags.verbose)
|
||||
pline(
|
||||
"A thunderous voice booms through the caverns:");
|
||||
pline("A thunderous voice booms through the caverns:");
|
||||
verbalize("No, mortal! That will not be done.");
|
||||
}
|
||||
continue;
|
||||
@@ -2165,6 +2167,7 @@ int how;
|
||||
killplayer++;
|
||||
break;
|
||||
}
|
||||
mndx = monsndx(ptr); /* needed for the 'no free pass' cases */
|
||||
}
|
||||
|
||||
which = "all ";
|
||||
|
||||
@@ -501,7 +501,7 @@ int yy_flex_debug = 0;
|
||||
#define YY_MORE_ADJ 0
|
||||
#define YY_RESTORE_YY_MORE_OFFSET
|
||||
char *yytext;
|
||||
/* NetHack 3.6 dgn_comp.l $NHDT-Date: 1449385342 2015/12/06 07:02:22 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.16 $ */
|
||||
/* NetHack 3.6 dgn_comp.l $NHDT-Date: 1449615114 2015/12/08 22:51:54 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.17 $ */
|
||||
/* Copyright (c) 1989 by Jean-Christophe Collet */
|
||||
/* Copyright (c) 1990 by M. Stephenson */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -1147,41 +1147,37 @@ static int yy_get_next_buffer ()
|
||||
*/
|
||||
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
|
||||
} else {
|
||||
yy_size_t num_to_read =
|
||||
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
|
||||
yy_size_t num_to_read;
|
||||
/* just a shorter name for the current buffer */
|
||||
YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
|
||||
|
||||
while (num_to_read <= 0) {
|
||||
/* [pr] This could probably be (b->yy_buf_size < number_to_move)
|
||||
* since the allocated size is actually b->yy_buf_size + 2.
|
||||
* The old code calculated num_to_read above (with same formula
|
||||
* as is used below), then used (num_to_read <= 0) here, which
|
||||
* got broken when num_to_read was changed to an unsigned type. */
|
||||
while (b->yy_buf_size <= number_to_move + 1) {
|
||||
/* Not enough room in the buffer - grow it. */
|
||||
|
||||
/* just a shorter name for the current buffer */
|
||||
YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
|
||||
int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf);
|
||||
|
||||
if ( b->yy_is_our_buffer ) {
|
||||
yy_size_t new_size = b->yy_buf_size * 2;
|
||||
|
||||
if ( new_size <= 0 )
|
||||
b->yy_buf_size += b->yy_buf_size / 8;
|
||||
else
|
||||
b->yy_buf_size *= 2;
|
||||
|
||||
b->yy_buf_size += b->yy_buf_size / 4;
|
||||
b->yy_ch_buf = (char *)
|
||||
/* Include room in for 2 EOB chars. */
|
||||
yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
|
||||
/* Include room in for 2 EOB chars. */
|
||||
yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
|
||||
} else
|
||||
/* Can't grow it, we don't own it. */
|
||||
b->yy_ch_buf = 0;
|
||||
|
||||
if (! b->yy_ch_buf)
|
||||
YY_FATAL_ERROR("fatal error - scanner input buffer overflow" );
|
||||
YY_FATAL_ERROR("fatal error - scanner input buffer overflow");
|
||||
|
||||
(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
|
||||
|
||||
num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
|
||||
number_to_move - 1;
|
||||
|
||||
}
|
||||
|
||||
num_to_read = b->yy_buf_size - number_to_move - 1;
|
||||
if ( num_to_read > YY_READ_BUF_SIZE )
|
||||
num_to_read = YY_READ_BUF_SIZE;
|
||||
|
||||
@@ -1470,6 +1466,8 @@ YY_BUFFER_STATE yy_create_buffer (file,size )
|
||||
b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
|
||||
if ( ! b )
|
||||
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
|
||||
if (!size)
|
||||
size = YY_BUF_SIZE;
|
||||
|
||||
b->yy_buf_size = (yy_size_t)size;
|
||||
|
||||
|
||||
@@ -1022,7 +1022,7 @@ int yy_flex_debug = 0;
|
||||
#define YY_MORE_ADJ 0
|
||||
#define YY_RESTORE_YY_MORE_OFFSET
|
||||
char *yytext;
|
||||
/* NetHack 3.6 lev_comp.l $NHDT-Date: 1449431380 2015/12/06 19:49:40 $ $NHDT-Branch: master $:$NHDT-Revision: 1.27 $ */
|
||||
/* NetHack 3.6 lev_comp.l $NHDT-Date: 1449615116 2015/12/08 22:51:56 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.25 $ */
|
||||
/* Copyright (c) 1989 by Jean-Christophe Collet */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -2390,41 +2390,37 @@ static int yy_get_next_buffer ()
|
||||
*/
|
||||
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
|
||||
} else {
|
||||
yy_size_t num_to_read =
|
||||
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
|
||||
yy_size_t num_to_read;
|
||||
/* just a shorter name for the current buffer */
|
||||
YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
|
||||
|
||||
while (num_to_read <= 0) {
|
||||
/* [pr] This could probably be (b->yy_buf_size < number_to_move)
|
||||
* since the allocated size is actually b->yy_buf_size + 2.
|
||||
* The old code calculated num_to_read above (with same formula
|
||||
* as is used below), then used (num_to_read <= 0) here, which
|
||||
* got broken when num_to_read was changed to an unsigned type. */
|
||||
while (b->yy_buf_size <= number_to_move + 1) {
|
||||
/* Not enough room in the buffer - grow it. */
|
||||
|
||||
/* just a shorter name for the current buffer */
|
||||
YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
|
||||
int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf);
|
||||
|
||||
if ( b->yy_is_our_buffer ) {
|
||||
yy_size_t new_size = b->yy_buf_size * 2;
|
||||
|
||||
if ( new_size <= 0 )
|
||||
b->yy_buf_size += b->yy_buf_size / 8;
|
||||
else
|
||||
b->yy_buf_size *= 2;
|
||||
|
||||
b->yy_buf_size += b->yy_buf_size / 4;
|
||||
b->yy_ch_buf = (char *)
|
||||
/* Include room in for 2 EOB chars. */
|
||||
yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
|
||||
/* Include room in for 2 EOB chars. */
|
||||
yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
|
||||
} else
|
||||
/* Can't grow it, we don't own it. */
|
||||
b->yy_ch_buf = 0;
|
||||
|
||||
if (! b->yy_ch_buf)
|
||||
YY_FATAL_ERROR("fatal error - scanner input buffer overflow" );
|
||||
YY_FATAL_ERROR("fatal error - scanner input buffer overflow");
|
||||
|
||||
(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
|
||||
|
||||
num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
|
||||
number_to_move - 1;
|
||||
|
||||
}
|
||||
|
||||
num_to_read = b->yy_buf_size - number_to_move - 1;
|
||||
if ( num_to_read > YY_READ_BUF_SIZE )
|
||||
num_to_read = YY_READ_BUF_SIZE;
|
||||
|
||||
@@ -2713,6 +2709,8 @@ YY_BUFFER_STATE yy_create_buffer (file,size )
|
||||
b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
|
||||
if ( ! b )
|
||||
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
|
||||
if (!size)
|
||||
size = YY_BUF_SIZE;
|
||||
|
||||
b->yy_buf_size = (yy_size_t)size;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# NetHack Makefile.
|
||||
# NetHack 3.6 Makefile.top $NHDT-Date: 1447844578 2015/11/18 11:02:58 $ $NHDT-Branch: master $:$NHDT-Revision: 1.32 $
|
||||
# NetHack 3.6 Makefile.top $NHDT-Date: 1449621572 2015/12/09 00:39:32 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.33 $
|
||||
|
||||
# Root of source tree:
|
||||
NHSROOT=.
|
||||
@@ -46,14 +46,14 @@ DIRPERM = 0755
|
||||
|
||||
# per discussion in Install.X11 and Install.Qt
|
||||
#VARDATND =
|
||||
# VARDATND = x11tiles NetHack.ad pet_mark.xbm pilemark.xpm
|
||||
# VARDATND = x11tiles NetHack.ad pet_mark.xbm pilemark.xpm rip.xpm
|
||||
# VARDATND = x11tiles NetHack.ad pet_mark.xbm pilemark.xbm
|
||||
# VARDATND = x11tiles NetHack.ad pet_mark.xbm pilemark.xbm rip.xpm
|
||||
# for Atari/Gem
|
||||
# VARDATND = nh16.img title.img GEM_RSC.RSC rip.img
|
||||
# for BeOS
|
||||
# VARDATND = beostiles
|
||||
# for Gnome
|
||||
# VARDATND = x11tiles pet_mark.xbm pilemark.xpm rip.xpm mapbg.xpm
|
||||
# VARDATND = x11tiles pet_mark.xbm pilemark.xbm rip.xpm mapbg.xpm
|
||||
|
||||
VARDATD = bogusmon data engrave epitaph oracles options quest.dat rumors
|
||||
VARDAT = $(VARDATD) $(VARDATND)
|
||||
@@ -85,7 +85,7 @@ SPEC_LEVS = asmodeus.lev baalz.lev bigrm-*.lev castle.lev fakewiz?.lev \
|
||||
astral.lev air.lev earth.lev fire.lev water.lev
|
||||
QUEST_LEVS = ???-goal.lev ???-fil?.lev ???-loca.lev ???-strt.lev
|
||||
|
||||
DATNODLB = $(VARDATND) license
|
||||
DATNODLB = $(VARDATND) license symbols
|
||||
DATDLB = $(DATHELP) dungeon tribute $(SPEC_LEVS) $(QUEST_LEVS) $(VARDATD)
|
||||
DAT = $(DATNODLB) $(DATDLB)
|
||||
|
||||
@@ -201,7 +201,6 @@ dofiles:
|
||||
-e '}' \
|
||||
-e '$$s/.*/nodlb/p' < dat/options` ; \
|
||||
$(MAKE) dofiles-$${target-nodlb}
|
||||
(cd dat ; cp symbols $(INSTDIR) )
|
||||
cp src/$(GAME) $(INSTDIR)
|
||||
cp util/recover $(INSTDIR)
|
||||
-if test -n '$(SHELLDIR)'; then rm -f $(SHELLDIR)/$(GAME); fi
|
||||
@@ -220,9 +219,6 @@ dofiles:
|
||||
if test -n '$(SHELLDIR)'; then \
|
||||
$(CHGRP) $(GAMEGRP) $(SHELLDIR)/$(GAME); \
|
||||
chmod $(EXEPERM) $(SHELLDIR)/$(GAME); fi
|
||||
-( cd $(INSTDIR) ; $(CHOWN) $(GAMEUID) symbols ; \
|
||||
$(CHGRP) $(GAMEGRP) symbols ; \
|
||||
chmod $(FILEPERM) symbols )
|
||||
|
||||
dofiles-dlb: check-dlb
|
||||
( cd dat ; cp nhdat $(DATNODLB) $(INSTDIR) )
|
||||
|
||||
Reference in New Issue
Block a user