Commit Graph

618 Commits

Author SHA1 Message Date
nhkeni
4f3c463d69 remove some testing junk that escaped 2024-11-16 17:39:40 -05:00
nhkeni
91c38355e7 Merge branch 'keni-gitset2' into NetHack-3.7 2024-11-11 11:27:27 -05:00
nhkeni
36e8d9e6fc nhgitset version 4
To update, run "perl DEVEL/nhgitset.pl"

Fixes:
- "nhcommit -a" has been fixed
- NHDT was hardwired in places
- no longer complain about a missing dat directory outside of the
    NetHack source tree
- make update of gitinfo atomic
- Replace some hardwired directory separators with OS-dependent constructs

Backwards Incompatibilities:
- NH_DATESUB's DATE() is now Date() to match the other variables
- MSYS2 requires an additional Perl package - the MSYS2 docs have
    been updated

New Help System:
- git nhhelp
   This command mirrors "git help" for nh* commands.
- See git nhhelp nhsub for general help on substitution variables

New Substitution Variables:
-Brev()
    An aBREViation of $PREFIX-Branch$:$PREFIX-Revision$ - this
    may help get line length under control in file headers.
-Assert(TYPE=VALUE)
    If TYPE does not match VALUE, do not substitute on this line.
    TYPE P checks VALUE against nethack.substprefix
-Project(arg)
    Returns nethack.projectname if there is no arg and an uppercase
    version if arg is uc.

Other New Features:
- Add nethack.projectname
- Documentation updates - see "git nhhelp nhsub"
- On checkout or merge of a branch, check for nhgitset version updates
  and provide an optional message to the user.
- Move NH_DATESUB substitutions here from cron job to keep dates in sync
- PREFIX-* keywords now available in NH_DATESUB templates
- Support use of nhgitset.pl from a different repo; note that update
  checks will be dependent on keeping the original source repo up-to-date
  and in the same location.
2024-11-11 09:15:49 -05:00
Pasi Kallinen
696af89299 Change MSGHANDLER from compile-time to sysconf 2024-10-19 10:47:53 +03:00
nhmall
bf72423fb0 Merge branch 'NetHack-3.7' of https://github.com/g-branden-robinson/NetHack into NetHack-3.7 2024-09-14 11:15:41 -04:00
nhmall
439c2a0352 Guidebook catch-up
S_engrcorr
S_engroom
2024-09-13 13:05:11 -04:00
G. Branden Robinson
37434a5fa9 doc/Guidebook.mn: Fix bad comment syntax.
These lines were passing a spurious "." argument to the `BR` macro
defined in "doc/tmac.nh".
2024-09-10 06:45:00 -05:00
G. Branden Robinson
6167de1a54 doc/Guidebook.mn: Use different technique.
...to get a block paragraph from the `n` package, instead of
manipulating indentation directly, which can lead to grief.
2024-09-10 06:44:43 -05:00
G. Branden Robinson
ade0c02b20 Make it easier for the Guidebook to find macros.
* doc/Guidebook.mn: Make the Guidebook buildable from the top of the
  source tree, not just inside the "doc" directory.  Try to load its
  "nh" macro package from the current working directory and from "doc".

* doc/tmac.nh: Allocate new register `nH` to the purpose of detecting
  multiple loads, and skip file content if detected.  This is the 1970s
  nroff form of an "#include guard".  groff's "an-ext.tmac" uses the
  same technique for portability.

Also I removed a tab character.  Per the groff Texinfo manual:

     One possibly irritating idiosyncrasy is that tabs should not be
     used to vertically align comments in the source document.  Tab
     characters are not treated as separators between a request name and
     its first argument, nor between arguments.

Here's an example of how one groff macro package works around the
problem.

$ sed -n '402,406p' contrib/mm/m.tmac
.ds LetCN CONFIDENTIAL\"                Confidential default
.ds LetSA To Whom It May Concern:\"     Salutation default
.ds LetAT ATTENTION:\"                  Attention string
.ds LetSJ SUBJECT:\"                    Subject string
.ds LetRN In reference to:\"            Reference string
2024-09-10 06:44:43 -05:00
G. Branden Robinson
67d97d1e03 doc/Guidebook.mn: Fix typo in escape sequence.
\F and \f do different things.

Fixes:

$ (cd doc && cat Guidebook.mn | tbl tmac.n - | groff > Guidebook.ps)
troff:<standard input>:3468: error: no font family named 'I' exists
2024-09-10 06:44:43 -05:00
G. Branden Robinson
5d005a3a95 doc/Guidebook.mn: Refactor achievement table.
Use tbl(1); this sort of layout is what it's designed for.  Use text
blocks to enable lengthy achievement descriptions to break across lines.
2024-09-10 06:44:43 -05:00
G. Branden Robinson
2bbefa2e4d doc/Guidebook.mn: Simplify table format.
The 'A' ("alphabetic") and 'N' ("numeric") column classifiers were being
used to little benefit.

Since 'A' was applying to every row of the table, none was more indented
than any other, except via the inclusion of unadjustable, unbreakable
space escape sequences `\ `, which work just as well with column
classifier 'L' ("left").

In fact, even they are unnecessary; regular spaces will do.

tbl(1):
     Ordinarily, a table entry is typeset rigidly.  It is not filled,
     broken, hyphenated, adjusted, or populated with additional inter‐
     sentence space.

...so furthermore convert the escaped spaces to regular ones.

Similarly, 'N' applies several rules to manage alignment of decimal
points.  This table doesn't need them.  Right-alignment of integers is
just as easily achieved with the 'R' ("right") column classifier.
2024-09-10 06:43:14 -05:00
G. Branden Robinson
f886f71d49 doc/Guidebook.mn: Fix table markup nits.
Comment escape sequences inside table entries can wreak havoc.  Use
dummy character instead to visually indicate the deliberate trailing
spaces.  Move the comment explaining why they're there closer to what
they document.  It's okay to have _whole-line_ comments in table data,
because they are on control lines (lines that start with a dot '.').

Also use the dummy character to indicate deliberately empty table cells.
2024-09-10 06:24:03 -05:00
Pasi Kallinen
e645c0b4bb Allow starting game as pauper, without any inventory
And also without spells, skills, or preidentified items.
This also implies nudist.

Breaks saves and bones.
2024-08-29 20:51:13 +03:00
PatR
84785db5ec Guidebook's map display of monsters
Instead of
" a-z  and
" A-Z  and
" @&':;
for the lists of characters used to show monsters, followed by
" I
for special "remembered, unseen monster", change the capital letter
line
" a-z  and
" A-HJ-Z  and
" @&':;
to emphasize that 'I' is used differently from other letters.

Also, add the trailing "and"s to the LaTeX version.  I haven't seen
what the result looks like.
2024-08-20 14:02:26 -07:00
PatR
0eb8896301 paranoid_confirm:Trap vs vapor+gas cloud regions
Extend paranoid_confirm:trap to also ask for confirmation when
attempting to enter a gas cloud region (scroll of stinking cloud,
breath from green dragons or iron golems, steam clouds from boiling
water, vapor left by fog cloud movement, no doubt several others).

Like with traps, can be overridden for a given move by using the
'm' prefix.  Unlike traps, doesn't try to guess whether moving into
a region will be harmless.

Doesn't affect movement into cloud terrain (Plane of Air).

Update the Guidebook to describe the revised behavior of
paranoid_confirm:trap and to mention how #terrain deals with regions.

'any_visible_region()' got mixed in with this but isn't used yet.
Affects extern.h and region.c.
2024-08-11 14:59:57 -07:00
PatR
e911c71320 Guidebook: more map symbols 2024-07-29 23:58:55 -07:00
PatR
5f36d47110 Guidebook.mn comment
"\(ah" transposed the letters; should have been "\(ha", matching
the actual usage on the same line.  Also, the reference to
"circumflex accent" wasn't appropriate since that's the small
caret you get with "^" or "\^".
2024-07-17 07:37:19 -07:00
PatR
474edb46f8 more Guidebook map characters
Previous update left out a couple of classes of monsters that are
represented by punctuation.  <space> for ghosts is deliberately not
included.
2024-07-16 19:48:10 -07:00
PatR
59fbffd170 Guidebook update: "Map (rest of screen)"
The description of the default map display was out of date:

Sinks aren't conditional anymore, and were changed from '#' to '{'.
Statues were still listed as '`' but aren't displayed as that.
Room and corridor engravings weren't mentioned.
Wall of water and wall of lava weren't mentioned.
Drawbridge portcullis ('#' when closed) and span ('.' when open)
weren't mentioned.

This splits introductory "- and |" into two entries.

I've forced CR font (similar to TeX's tt font) for the initial
character of all the entries.

The formatting of letters for monsters left something to be desired
so I've tried to redo it.  The 'roff edition seems ok (as least when
there's no page break in the middle of it) but I'm not sure how the
LaTeX version will fare.  I didn't try to include the trailing "and"
on the first two lines the way the 'roff version does since I wasn't
sure how to accomplish that.
2024-07-16 14:49:34 -07:00
PatR
749f2ffb0e update 'hitpointbar' documentation 2024-04-12 11:52:26 -07:00
Pasi Kallinen
712a735111 Guidebook: hitpointbar is also available in curses 2024-04-07 12:24:19 +03:00
Pasi Kallinen
9a870b5f06 Option to use a menu to answer yes/no prompts
Add a new boolean option 'query_menu'. If on, game will pop up
a menu for specific yes/no questions, instead of using an input prompt.
2024-03-22 19:19:57 +02:00
PatR
a8fbb96f2b 'windowcolors' documentation
The construct "\\'#rrggbb'" seemed strange and while fixing that
I made several other changes.  There's an escape sequence for
apostrophe but "#rrggbb" doesn't actually need any quoting in the
first place (except for "\#" in the TeX version).

There was unwanted indentation after the OPTIONS=windowcolors line
in the 'roff version.  For the TeX version, avoid 'verbatim' since
it contains both literal text and placeholders that are now being
distinguished with italics.

Also, "trueblack" is Windows-specific rather than an ordinary named
color.
2024-03-21 09:59:43 -07:00
Pasi Kallinen
23d1657dca Add walking on traps to default paranoid_confirm 2024-03-20 19:31:09 +02:00
Pasi Kallinen
4030ef13a0 Curses: implement the windowcolors option
Allow changing the curses windows foreground and background colors,
for example:

OPTIONS=windowcolor:menu #8000F0/20F080 message grey/blue
2024-03-17 18:41:52 +02:00
nhkeni
e316d962a8 Minor regex naming and doc cleanup. 2024-03-09 13:28:15 -05:00
nhmall
258d7b2f56 Guidebook date stamp 2024-02-29 08:00:19 -05:00
RainRat
a3658f85ac fix typos 2024-02-28 20:15:56 -08:00
PatR
41a5565403 new 'showvers' option
Add options 'showvers' (boolean) and 'versinfo' (numeric mask) to
show nethack's version on the status lines during play.  It won't be
particularly interesting to ordinary players but should be useful
when making screenshots or video to be streamed, or for someone who
switches between git branches or between nethack and variants.

I worked on this several months back but it was combined with
unfinished changes to 'hitpointbar'.  I've separated it out so that
it can be put into use.  When enabled, one or more components of
"<name> <branch> <version>" will be shown right justified after
status conditions.  At present the default is "<branch>" if that is
available and overall status isn't 'released', or "<version>" if
'released' or if branch isn't available.  That might need some
refinement.

It works as intended for tty and curses, although some abbreviation
mechanism would be useful if/when the program resorts to abbreviating
status conditions to make things narrow enough to fit.

For X11, it works ok for fancy_status:True (the default, controlled
via NetHack.ad settings) but is messed up for tty-style status.  The
text is positioned correctly but there are gaps in it, making it
appear garbled, similar to what I saw when I tried and failed to
implement statuslines:3 for X11.  [It might be due to having empty
condition widgets be 1 pixel wide instead of being totally removed
but I don't think the situation is that simple.]

For Qt, if the text needs to be truncated in order to fit, the center
portion of the string will be shown, discarding parts from the left
and right.  That ought to discard from left and retain rightmost
portion instead.

For win32|mswin|Win GUI, no attempt to support it has been included.
Things should be ok when 'showvers' is left as False (the default)
but I don't know what will happen if that gets toggled to True.  At a
minimum, the version info won't be right justified.  The information,
or at least some of it, is displayed in the game window's title bar
so there isn't any pressing need to add it to status, but toggling
the option will need to behave sensibly if it doesn't already.
2024-02-28 11:47:16 -08:00
Pasi Kallinen
25fa293c81 Accessibility: lookaround command, mention_map option
Adds a new extended command #lookaround, which will describe
the map around the hero they can see or remember.

Adds a new boolean option mention_map, which will give a message
when an interesting map location in sight changes.
2024-02-28 20:53:52 +02:00
Pasi Kallinen
dd37c5326a Accessibility: showdamage option
Add a new boolean option showdamage, if on, outputs a message
like "[HP -2, 14 left]" - several variants have something similar,
but I chose the message based on how eSpeak said it, while keeping
it short.
2024-02-24 17:38:46 +02:00
nhkeni
3d3ce2369c Merge branch 'keni-wincw2' into NetHack-3.7
Lots of manually resolved conflicts.
2024-02-15 16:25:12 -05:00
Pasi Kallinen
6b9f411a32 Accessibility: mon_movement
Adds a new boolean option, mon_movement. When hero notices monster
movement, give a message. Use with spot_monsters and accessiblemsg.
2024-02-07 19:50:38 +02:00
nhkeni
dbe5c98dca add CRASHREPORT directly to browser
add CRASHREPORT for Windows
add ^P info to report (via DUMPLOG)

new options: crash_email, crash_name, crash_urlmax
new game command: #bugreport
new config option: CRASHREPORT_EXEC_NOSTDERR
new command line option: --bidshow

deleted helper scripts:
    NetHackCrashReport.Javascript
    nhcrashreport.lua

misc:
    update CRASHREPORTURL (will need to be updated before release)
    update bitrot in winchain
    winchain for Windows
    add missing synch_wait for NetHackW --showpaths
    add PANICTRACE (and CRASHREPORT) in mdlib.c:build_opts

missing:
    packaging (Windows needs the pdb file)
    no testing with MSVC command line build

port status:
    linux: working, but glibc's backtrace doesn't show static functions
    Windows VS: working.  pdb file is large - looking into options
    MacOS: working
    msdos: not supported
    VMS: not supported
    MSVC: planned, but not attempted
    MSYS2: working, but libbacktrace not showing symbols (yet?)
2024-02-06 18:33:59 -05:00
nhmall
e5e63b886e Guidebook update Feb 6, 2024 2024-02-06 15:39:50 -05:00
Pasi Kallinen
6c874267b8 Correct petattr doc in Guidebook 2024-02-06 08:54:32 +02:00
nhmall
4d09009fff Guidebook follow-up 2024-01-29 10:56:16 -05:00
Pasi Kallinen
41edcdf6d9 Mention italic for status hilites in Guidebook 2024-01-29 16:48:31 +02:00
Pasi Kallinen
5829863be2 petattr also accepts italic 2024-01-28 19:03:45 +02:00
Pasi Kallinen
fd8b2b58d1 petattr: Change accepted parameters, add support for tty 2024-01-28 10:05:42 +02:00
PatR
b6bc3ef698 more Guidebook for containers
"blue potion" wasn't a very good example for an item in a container;
plain "blue" isn't a potion description.

Add an extra sentence to make the association between a container's
"item count" that's really a stack count and the fact that inventory
slots are for stacks rather than for individual items too.

Style/usage bit: avoid using "another" twice in the same sentence.

Fix a typo in the spelling of "contents".
2024-01-19 10:44:39 -08:00
nhmall
5ab9904b8f fix Guidebook.tex processing 2024-01-19 08:36:12 -05:00
PatR
b156912c46 Guidebook tweaks for "containers" sub-section 2024-01-18 23:58:53 -08:00
Pasi Kallinen
3160112ece Accessibility: Show a message when monster is spotted
Adds a new boolean option, spot_monsters.  If on, every time
the hero notices a monster which was out of sight before,
a message is given.  Combine with accessiblemsg to get the
monster location:

(3north): You see a newt.

Breaks saves and bones.
2024-01-14 13:33:02 +02:00
nhmall
6db79b9f18 Guidebook update 2024-01-02 12:34:05 -05:00
Pasi Kallinen
dc8d9d6cd0 Accessibility: Add location info to messages
Adds a new boolean option, accessiblemsg.  If on, some game messages
are prefixed with direction or location information, for example:

   (west): The newt bites!
   (northwest): You find a hidden door.

I added the info to the most common messages, but several are
still missing it.
2024-01-02 18:59:25 +02:00
nhmall
a6985b1f1a Guidebook updates 2023-12-08 19:45:07 -05:00
Michael Meyer
e427063560 Enable 'dropped_nopick' by default 2023-12-08 15:20:20 -08:00
Michael Meyer
1736f3caaa Add 'pickup_stolen' option
Add pickup_stolen option to autopick items stolen from you by a nymph or
monkey, even if they don't match your normal autopickup settings.
Replace was_dropped, was_thrown with a 2-bit bitfield that can contain
values LOST_DROPPED, LOST_THROWN, and LOST_STOLEN (or 0), since they
should all be mutually exclusive anyway as they track the most recent
way the item left the hero's inventory.

[Rebase/merge conflict fixed up.  PR]
2023-12-08 15:19:54 -08:00