Commit Graph

630 Commits

Author SHA1 Message Date
Pasi Kallinen
8d6ab2f9ab Allow m-prefixing #annotate
This is the same as m-prefixing #overview
2026-04-12 19:55:12 +03:00
PatR
11f27226cb 'pauper' documentation
The LaTeX Guidebook has been updated but not tested.  It's unlikely that
this small change has introduced any problems though.
2026-03-25 11:18:15 -07:00
nhmall
3c89dc2387 Guidebook date stamp to reflect most recent update 2026-03-25 08:06:12 -04:00
Pasi Kallinen
f8bd79354c Add a history menu for wizwish
Use the 'm' Prefix to make wizwish show the history menu.
Also entries wished via WIZKIT are added to the history.

While debugging, I often need to wish the same thing multiple
times, and typing or pasting it with mouse is annoying...
2026-03-25 13:46:07 +02:00
nhmall
8ee179a594 Guidebook timestamp to reflect the most recent update 2026-03-22 09:30:16 -04:00
Pasi Kallinen
8e4c7f9fb5 Change some command keys
Change 'v' from #versionshort to #chronicle.
Change 'V' from #history to #versionshort.
History can still be accessed either directly with the extended command,
or via the help menu.
Versionshort now accepts the m-prefix, and then shows the longer version.
2026-03-21 17:56:37 +02:00
Pasi Kallinen
63a78edcfa Add toggle extended command
Allows the user to configure a key binding to toggle any boolean
option, for example:

BIND=':toggle(price_quotes)
BIND=v:toggle(autodig)

The option must be settable in-game.
2026-03-21 12:17:37 +02:00
PatR
b074657f2b Guidebook.tex tidbit
This should eliminate an unwanted space.

Untested.
2026-02-12 07:37:31 -08:00
PatR
3e24fbcc4e Guidebook.tex Artifacts and Relics
Match recent Guidebook.mn addition of two new subsections for Objects.

Untested.
2026-02-11 15:30:40 -08:00
nhmall
7c4437437b Merge branch 'NetHack-3.7' of https://github.com/danielclow/NetHack into pr1473 2026-01-24 09:04:48 -05:00
nhmall
6459d44461 some spelling and inconsistency corrections; comments and elsewhere 2026-01-11 11:31:34 -05:00
danielclow
d924ec0ae4 Replace deprecated styles bf, it & remove verbatims
This replaces deprecatd styles with the modern LaTeX
equivalent (it - textit, etc.) and removes some verbatim
content that was not needed. More special characters
are cleaned up as well.
2026-01-04 01:29:27 +08:00
danielclow
465a9b1fbc Remove unneeded aliases
After changing the list styles in the previous commit,
it is no longer necessary to define aliases for these styles.
2026-01-03 23:52:28 +08:00
danielclow
ea925fa502 Refactor description lists using enumitem
This replaces the custom blist with the LaTex built-in description list
and adds enumitem to style the lists more easily. A default style for
the description list is defined instead of specifying the font in every
list item. Some special characters in list items are also replaced
with textcomp options such as textasciigrave, etc.
2026-01-03 23:44:46 +08:00
danielclow
2f4595bb9d Use geometry package to define page layout
This sets the size of the text on the page by using the geometry
package, which is now essentially standard procedure.
2026-01-03 21:26:23 +08:00
danielclow
d59add7100 Remove underscore hack
The redefinition of the underscore's category code is replaced with
textunderscore as needed throughout to prevent future confusion.
2026-01-03 21:10:37 +08:00
danielclow
71d7b1e587 Update LaTeX guidebook to use 2e documentclass
This is essentially the minimum required to start modernizing the LaTeX
code for the guidebook. Because this breaks the way that underscores
and straight single quotation marks were implemented, this also replaces
those with textunderscore and textsinglequote.
2026-01-03 20:57:31 +08:00
nhmall
9321316634 Guidebook date stamp to match most recent change 2025-12-05 20:00:14 -05:00
nhmall
3eed021a39 date stamp update 2025-10-24 12:01:37 -04:00
nhmall
dbe5ebfa94 Guidebook typo
doc/Guidebook.mn:2928:54 - Unknown word (situtaion) fix: (situation)
2025-10-24 11:46:10 -04:00
nhmall
60e2598d81 SYMBOLS=S_ghost:
Resolves #1448
2025-10-05 22:10:34 -04:00
nhmall
f4a6da2e52 save/restore changes - part 2
This is the second of a series of changes related to save/restore.

    No EDITLEVEL bump has been included, because although the code
    is changed extensively by this, the content of the savefiles have
    not been changed.

    Push the use of the structlevel bwrite() and mread() function use
    out of the core and into sfstruct.c. This is groundwork for upcoming
    changes.

    In the core, replace the bwrite() and mread() calls with the
    use of type-specific savefile output (Sfo) and savefile
    input (Sfi) macros.  The macros are defined in a new header file
    savefile.h, which also contains the prototypes for the sfo_* and
    sfi_* functions that the macros ultimately expand to. The functions
    themselves are in src/sfbase.c.

    On C99, each Sfo or Sfi macro expansion refers directly to the
    corresponding  type-specific sfo_* or sfi_* function.

    If C23 or later is is use, the majority (all but 3 types) of the
    macros refer to a single _Generic output routine sfo(nhfp, dt, tag),
    and a single _Generic input routine sfi(nhfp, dt, tag), which handles
    the dispatch of the type-specific underlying functions. This was
    somewhat experimental, but turned out to be practical because the
    compiler would gripe if the type for a variable was not included in
    the _Generic when passed as an argument, so it could be fixed.

    This alters the savefile verication process by having a common set
    return values for the related functions such as uptodate(),
    check_version(), etc. The new return values return more information
    about savefile incompatibilities, beyond failure/sucess. The
    additional information will be useful for an upcoming addition.
    The expanded return values are:
     SF_UPTODATE                     (0) everything matched and looks good
     SF_OUTDATED                     (1) savefile is outdated
     SF_CRITICAL_BYTE_COUNT_MISMATCH (2) critical size count mismatch
     SF_DM_IL32LLP64_ON_ILP32LL64    (3) Windows x64 savefile on x86
     SF_DM_I32LP64_ON_ILP32LL64      (4) Unix 64 savefile on x86
     SF_DM_ILP32LL64_ON_I32LP64      (5) x86 savefile on Unix 64
     SF_DM_ILP32LL64_ON_IL32LLP64    (6) x86 savefile on Windows x64
     SF_DM_I32LP64_ON_IL32LLP64      (7) Unix 64 savefile on Windows x64
     SF_DM_IL32LLP64_ON_I32LP64      (8) Windows x64 savefile on Unix 64
     SF_DM_MISMATCH                  (9) some other mismatch
    The callers in the core have been adjusted to deal with the expanded
    return values.

    Other miscellaneous inclusions:

       - go.oracle_loc -> svo.oracle_loc.
       - add a bit (1UL << 30) to  called SFCTOOL_BIT as groundwork
         for changes to follow.
2025-05-25 15:03:13 -04:00
PatR
a1e3943e1f fix #K4327 - inaccurate Guidebook for role/race/&c
The Guidebook states that the default values for 'role', 'race',
'gender', and 'alignment' are "random" but that's wrong.  Omitting
those options results in interactive prompting.
2025-05-01 15:43:57 -07:00
PatR
a587ccaa26 merge new use_menu_glyphs option with menu_objsyms
The two options are very similar but probably mutually exclusive
except when using look-here and look-into-container (both via ':')
with the default setting for 'sortloot', or with inventory when
'sortpack' has been toggled off.

This removes 'use_menu_glyphs' and changes 'menu_objsyms' from a
boolean to a compound taking six possible values:
| 0: no object symbols in menus,
| 1: append object class symbol to object header lines (same as old
|menu_objsyms boolean),
| 2: include object symbol in menu entry lines for objects (same as
|recently added use_menu_glyphs),
| 3: both 1 and 2,
| 4: display as #2 but only if the menu lacks class header lines,
| 5: if header lines are present, display as #1; if headers are not
|present, then display as #4 (which will implicitly be #2).
Default is #4.

Effectively replaces the options portion of pull request #1406 and
retains the functionality, but not as default for normal menus.

Guidebook.tex is only partially updated.  Someone else will need to
finish that.
2025-04-28 18:12:02 -07:00
Kestrel
91f0c0852b Correct Guidebook.tex typo. 2025-04-26 12:50:18 -07:00
Kestrel
61f2af9ca9 Update Guidebook.tex with use_menu_glyphs. 2025-04-26 12:50:18 -07:00
PatR
d32c8c63bd Mention reading scrolls while blind in Guidebook 2025-04-19 17:53:22 -07:00
nhmall
95cf46c102 update Guidebook and some generated files 2024-12-24 10:27:12 -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
439c2a0352 Guidebook catch-up
S_engrcorr
S_engroom
2024-09-13 13:05:11 -04: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
dfa9d9df3c untested Guidebook.tex fix
A recent change accidentally put a dash where a hyphen (default
value for S_golem) is intended.  I'm not sure whether verbatim is
necessary here, but it ought to work.
2024-07-19 15:34:38 -07:00
nhmall
e44bfe4eb2 fix sentence structure in Guidebook.tex
Commit 59fbffd1 neglected to include the closing ')'
2024-07-17 08:13:11 -04:00
nhmall
afe0d03678 fix Guidebook.tex 2024-07-17 08:00:46 -04: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