Commit Graph

74 Commits

Author SHA1 Message Date
PatR
e475dca209 add 'montelecontrol' option (wizard-mode only)
Add a new debugging option, 'montelecontrol', that allows a wizard-
mode player to choose a teleporting monster's destination.  If player
picks a bad spot, confirmation will be requested.  If accepted, the
spot will be used even though the consequences could be bad; that's
on the player.  If rejected, the destination will be assigned as if
no control had been attempted rather than try again.

The fuzzer isn't allowed to override a bad spot if it tries to pick
one.  That would probably trigger a sanity_check warning; the fuzzer
causes impossible warnings to behave as if panic, so accepting a bad
spot would just be fuzzer suicide.  It is allowed to randomly set the
option and maybe--though extremely unlikely--randomly pick a valid
controlled destination.
2023-06-09 00:56:53 -07:00
Pasi Kallinen
945e65a19f Move bgcolors option to the map section 2023-04-17 17:07:23 +03:00
Pasi Kallinen
0ac9309e1e Simple options menu shows help for each entry 2023-04-17 15:47:50 +03:00
Pasi Kallinen
ffb61612e3 Option to create the character deaf
Allows creating your character permanently deaf,
for that added challenge.

Breaks saves.
2023-04-11 13:23:30 +03:00
nhmall
d801736d09 opt out of bgcolor highlighting via bgcolors 2023-03-01 19:17:47 -05:00
Pasi Kallinen
fc7a32b86e Tutorial level
Add a tutorial level to teach commands to new players.
Very much a WIP.

Breaks save and bones compat.
2023-03-01 14:00:29 +02:00
nhmall
049ab7a5df remove some macgraphics references; some Amiga
Also closes #183
2023-02-21 22:54:56 -05:00
Pasi Kallinen
5d659cf1f6 Tips and option to disable them
Adds a more general way to handle gameplay tips, and adds
a boolean option "tips", which can be used to disable all
tips.  Adds a helpful longer message when the game goes
into the "farlook" mode.

Also adds a lua binding to easily show multi-line text
in a menu window.

Breaks save compat.
2023-02-19 15:56:18 +02:00
nhmall
6cc35abba3 follow-up - Change the terminology in mO menu 2023-02-08 00:06:56 -05:00
nhmall
08404ddac3 Options menu should indicate unavailability of voices
If SND_SPEECH is not defined (such as via Makefile WANT_SPEECH=1),
indicate so on the options menu.
2023-02-07 23:41:12 -05:00
nhmall
fbd9a7bae8 another update to the soundlib interface
sound_verbal(char *text, int32_t gender, int32_t tone, int32_t vol,
             int32_t moreinfo);
    -- NetHack will call this function when it wants to pass text of
       spoken language by a character or creature within the game.
    -- text is a transcript of what has been spoken.
    -- gender indicates MALE or FEMALE sounding voice.
    -- tone indicates the tone of the voice.
    -- vol is the volume (1% - 100%) for the sound.
    -- moreinfo is used to provide additional information to the soundlib.
    -- there may be some accessibility uses for this function.

It may be useful for accessibility purposes too.

A preliminary implementation has been attempted for macsound to test
the interface on macOS. No tinkering of the voices has been done.

Use of the test implementation requires the following at build time with make.
    WANT_SPEECH=1
That needs to be included on the make command line to enable the test code,
otherwise just the interface update is compiled in.

I don't know for certain when AVSpeechSynthesizer went into macOS, but older versions
likely don't support it, and would just leave off the WANT_SPEECH=1.

If built with WANT_SPEECH=1, the 'voices' NetHack option needs to be enabled.

It was a bit strange, when I first started up the test, to hear Asidonhopo,
the shopkeeper, talking to me as I entered his shop and interacted with him.
2023-02-07 00:44:36 -05:00
nhmall
9bbb2e17cf add a master off/on switch for sounds
sounds can be set in the config file or on the fly with the Options menu.

This also adds a mechanism for specifying a terminology preference
for a boolean option in the options menu.

The choices are: Term_False, Term_Off, Term_Disabled

Term_False, the default, will use the terms "false" and "true" in the
Options menu.
Term_Off will use the terms "off" and "on" in the Options menu.
Term_Disabled will use the terms "disabled" and "enabled" in the Options
menu.

I didn't review any of the existing options to see if one of the new
alternative terms might be a better fit. They were all left at the default.
2023-01-30 12:07:03 -05:00
nhmall
ea4a81901d add an interface for sound libraries
Groundwork for a more versatile interface for using
sound libraries. A lot of sound libraries work across
multiple platforms.

The current NetHack sound stuff is quite limited.

Binaries can have a variety of window ports linked into
them, and it makes sense to have something similar for
sound.

This tries to set things up in a more soundlib-centric way,
rather than inserting things in a platform-centric way.

It establishes a new top-level directory sound (akin to win
for the window interface routines, or "window-port") where
sound-related additions and sndprocs and support files can be
added and used across platforms.

The default interface is nosound and the 'nosound' interface
is in src/sounds.c

The interface for 'windsound', which contains the same minimal
USER_SOUNDS support using built-in routines that has been in the
windows port for a long time is added to
sound/windsound/windsound.c.

For now, the sound interface support for 'qtsound' has been added
to the existing Qt files win/Qt/qt_bind.h and win/Qt/qt_bind.cpp,
and a note has been placed in sound/qtsound/README.md to avoid
confusion.

New header file added: include/sndprocs.h.
2023-01-19 18:51:42 -05:00
nhmall
2fc0d25d45 introduce support for coloring the frame behind a map location
Also includes support by paxed for polearm targeting using the
frame color.

Also renames USE_TILES to TILES_IN_GLYPHMAP which is a more
accurate description.

Not all window interfaces have full support for the color framing
of the background square yet.

MS-DOS needs further work (to bring it to both VESA and VGA, with
and without tiles.

Windows GUI is missing support.

X11 and Qt have been started, but may require further refinement.
2023-01-01 19:55:02 -05:00
PatR
249e431e46 new 'sortvanquished' option
Allow the preferred sort order for the vanquished monsters list to
be specified in the run-time config file
|OPTIONS=sortvanquished:X
where X is t, d, a, c, n, or z.  It can also be set to 'A' or 'C'
but those aren't documented and aren't offered as choices when
setting the value interactively, which can be done via 'm O' or by
using 'm #vanquished'.

Guidebook.mn has been updated but Guidebook.tex is lagging again.
2022-12-26 14:56:12 -08:00
PatR
91e2ab13b2 last? role/race/&c option values update
Keep track of how a role|race|gender|alignment option got its value
so that role:!Tourist in .nethackrc and role:!Priest in NETHACKOPTIONS
yield 'role:!Priest' rather than merging into 'role:!Priest !Tourist'.
It also doesn't write the value into new config file for #saveoptions
if that value comes from environment or command line (not applicable
since the command line arguments for role,&c don't go through options
handling).  Also, the old config file value takes precedence over
the current game's value file so that 'role:random' doesn't become
'role:Healer' or such in a new config after the random value gets
picked for play.

This only tracks the role, race, gender, and alignment options but the
concept could be extended to all options.  The data would need to be
saved and restored if values set interactively need to be retained in
restore sessions (doesn't apply to role,&c since those don't change
during play).
2022-12-22 15:07:33 -08:00
PatR
96f5f03287 revise the role, race, gender, align options
Using role:!wizard to limit which roles would be candidates for
random selection didn't work as I expected.  It required a separate
option setting for role to exclude.  This implements how I thought
it worked:
|OPTIONS=role:!ranger !samurai !wizard
will exclude multiple roles with a space-separated list in a single
option setting.  It also adds support for
|OPTIONS=!role:ranger samurai wizard
to do the same thing.  (OPTIONS=!role:!ranger isn't allowed.)

I thought 'OPTIONS=role:barbarian caveman knight' could be used to
limit random selection to those choices, but that doesn't work and
I haven't attempted to implement it.

This also renames the 'align' option to 'alignment'.  That made the
truncation to 'align' become ambiguous, so it got added back as an
alias for the full name.

Guidebook.tex is lagging; I'm burned out.
2022-12-14 13:14:54 -08:00
nhmall
485797ee8c rework windows nmake file
Keep object files separate between gui and tty builds as they
are not the same binary on windows.

The stubs.c file will no longer be necessary.
2022-12-05 13:21:19 -05:00
PatR
220726f7ba status condition options
Option parsing rejected
|OPTIONS=!cond_X
for all valid X.

Using the menu to unselect all condition options treated that as not
having made any choice and didn't make any changes.  That would be
reasonable if nothing was preselected, but things are so unselecting
all of them is a choice.  (A bizarre one, but still should be viable.)

Mostly this deals with including cond_X options when #saveoptions is
used to write a new RC file.  It now produces something like
|OPTIONS=!cond_barehanded,cond_blind,!cond_busy,cond_conf,!cond_deaf,\
|        cond_iron,cond_fly,cond_foodPois,!cond_glowhands,cond_grab,\
|        cond_hallucinat,!cond_held,!cond_ice,cond_lava,cond_levitate,\
|        !cond_paralyzed,cond_ride,!cond_sleep,cond_slime,!cond_slip,\
|        cond_stone,cond_strngl,cond_stun,!cond_submerged,cond_termIll,\
|        !cond_tethered,!cond_trap,!cond_unconscious,!cond_woundedlegs,\
|        !cond_holding
after the last alphabetical option and before the bound keys, menu
colors, and others which aren't simple OPTIONS=X settings.  This only
happens if there is already one or more OPTIONS=cond_X entries in the
old file when it was read or if 'mO' gets used to make any changes.

Not fixed:  after my RC had something similar to the above and before
I changed status conditions to accept negation, I was getting several
"the cond_ option may not both have a value and be negated" messages
written to stdout instead of the config file error handler.  So they
vanished when the screen was initialized without providing a --More--
prompt to acknowledge that they have been seen.
2022-10-31 00:53:10 -07:00
PatR
cec7da0505 another comment typo fix 2022-10-28 00:30:38 -07:00
PatR
69f62e5872 fix comment typo 2022-10-27 14:52:50 -07:00
PatR
45c39e108f more #saveoptions
Force windowtype to be the first option written to new RC file since
its value can affect how other options are processed.  (Only saved if
comes from existing RC file, not command line.)  doset() lists a few
compound options before the rest too.  Combine the two sets of want-
to-be-first and move the handling for that to optlist.h where the only
cost is that the options are no longer in alphabetical order.
2022-10-13 14:03:52 -07:00
nhmall
c548fff9e4 some spelling corrections
The pull request included some changes that were neither accidental nor
unintentional, so only a subset of the changes from pull request #869
submitted by klorpa were manually applied.

behaviour  -> behavior
speach     -> speech
knowlege   -> knowledge
incrments  -> increments
stethscope -> stethoscope
staiway    -> stairway
arifact    -> artifact
extracing  -> extracting

The uses of "iff" were left alone.

Close #869
2022-09-08 10:54:11 -04:00
Patric Mueller
2deb119ee0 curses: implement a dialog for the windowborders option 2022-08-24 21:03:36 +02:00
Pasi Kallinen
c42e73fd9c Allow binding mouse buttons
Instead of hardcoding mouse button actions, allow the user to
bind mouse buttons to extended commands.  For example the new
defaults are:

BIND=mouse1:therecmdmenu
BIND=mouse2:clicklook

Currently a bit rudimentary; the defaults should be OK, but
documentation is bit lacking, and in-game binding and option
saving are missing.

Allowed commands to bind are "nothing", "therecmdmenu", "clicklook",
and "mouseaction". Clicklook replaces the "clicklook" boolean option,
and mouseaction does what mouse 1 button used to do - a context sensitive
action.
2022-08-23 23:27:21 +03:00
Pasi Kallinen
ac5aadf0e3 Add #fuzzer wiz-mode command
Move the debug_fuzzer boolean out of the full options menu
and turn it into #fuzzer extended command
2022-08-20 08:34:52 +03:00
PatR
c1337773f5 'color' in simple options menu
'color' appears in the simplified O menu for curses, but was not
showing up for tty.  That's because it is hidden when tiles are in
use, and tty has had a bogus value for iflags.wc_tiled_map.

Presence of USE_TILES is not a reliable way to tell whether tiles
are available in a multi-interface binary.  Nor is the setting of
DEFAULT_WC_TILED_MAP from config.h.
2022-08-19 14:54:59 -07:00
Pasi Kallinen
c05a6f3199 Expose some debug flags in options
Show and allow changing the debugging flags in options:

debug_fuzzer: turn on the fuzzer
debug_hunger: prevent hunger
debug_mongen: prevent monster generation
debug_overwrite_stairs: allow level generation overwrite stairs

These are wizard-mode only, cannot be set via config file,
and the fuzzer cannot change these either.
2022-08-17 20:17:30 +03:00
PatR
e5ddf400c6 'O' tweaks
Reformat most of optlist.h.  In the process, fix a couple of
conditionally included items which were mis-classified as set_in_game
when excluded.  Add "permablind" as an alias for the "blind" option.
[I don't understand the size value of 70 for #if BACKWARD_COMPAT
{curses,DEC,IBM,Mac}_graphics but didn't alter that.]

Include 'pickup_types' in the behavior section; it's useful from
turn 1 and does get adjusted from time to time during play.

Include 'color' in the map section, but hide it for wc_tiled_map.

Include 'showscore' and 'statuslines=2|3' in the status section.
I didn't rebuild with SCORE_ON_BOTL enabled so the showscore part
hasn't been tested.
2022-08-04 16:53:31 -07:00
Pasi Kallinen
4ff9537b0d Rudimentary key rebinding in game options
Currently shown only in the full options list, as it's not
quite complete. (For example, it doesn't handle movement commands,
or the getpos keys)
2022-08-04 14:42:45 +03:00
Pasi Kallinen
f3591ea07d User-friendly options menu
Make the default options menu only show the most important
options, split into categories. The full, traditional menu
can be accessed by using the m-prefix.
2022-08-03 14:08:31 +03:00
nhmall
7c579ba7fd optlist verbose follow-up
When the NHOPTP syntax was copied and pasted from cond_ a few lines
above, the opt_out/opt_in setting should have been changed to opt_out
to match the verbose boolean.
2022-06-22 13:50:53 -04:00
nhmall
377be376fe more Verbose
Make verbose a prefix compound option. verbose and !verbose
should still work just as the boolean option did.

verbose0, verbose1, verbose2, verbose3, verbose4 must be
given a decimal value in the config file to set the bits in
verbosity_suppressions[0] through verbosity_suppressions[4].
That can be used to suppress any messages represented by the
verbosity_values defined in include/hack.h.

This also adds a more verbose variation of prinv() where the
total count is included in the message (that particular more
verbose message can be suppressed with OPTIONS=verbose3:134217728).

  Verbose(n,x) name     Hex Value       Decimal             Option
  -------------------------------------------------------------------
  interrupt_multi       0x00000001               1          verbose0
  use_stethoscope       0x00000002               2          verbose0
  Mb_hit                0x00000004               4          verbose0
  adjattrib             0x00000008               8          verbose0
  ballfall              0x00000010              16          verbose0
  use_crystal_ball1     0x00000020              32          verbose0
  use_crystal_ball2     0x00000040              64          verbose0
  digactualhole1        0x00000080             128          verbose0
  digactualhole2        0x00000100             256          verbose0
  mdig_tunnel1          0x00000200             512          verbose0
  mdig_tunnel2          0x00000400            1024          verbose0
  boulder_hits_pool1    0x00000800            2048          verbose0
  boulder_hits_pool2    0x00001000            4096          verbose0
  drop1                 0x00002000            8192          verbose0
  drop2                 0x00004000           16384          verbose0
  drop3                 0x00008000           32768          verbose0
  go_to_level1          0x00010000           65536          verbose0
  go_to_level2          0x00020000          131072          verbose0
  go_to_level3          0x00040000          262144          verbose0
  rot_corpse            0x00080000          524288          verbose0
  getpos1               0x00100000         1048576          verbose0
  getpos2               0x00200000         2097152          verbose0
  off_msg               0x00400000         4194304          verbose0
  on_msg                0x00800000         8388608          verbose0
  Blindf_on             0x01000000        16777216          verbose0
  dog_eat               0x02000000        33554432          verbose0
  dog_invent            0x04000000        67108864          verbose0
  dokick                0x08000000       134217728          verbose0
  toss_up               0x10000000       268435456          verbose0
  consume_tin1          0x20000000       536870912          verbose0
  consume_tin2          0x40000000      1073741824          verbose0
  doengrave1            0x00000001               1          verbose1
  doengrave2            0x00000002               2          verbose1
  doengrave3            0x00000004               4          verbose1
  explode               0x00000008               8          verbose1
  moverock              0x00000010              16          verbose1
  still_chewing         0x00000020              32          verbose1
  trapmove1             0x00000040              64          verbose1
  trapmove2             0x00000080             128          verbose1
  trapmove3             0x00000100             256          verbose1
  trapmove4             0x00000200             512          verbose1
  trapmove5             0x00000400            1024          verbose1
  getobj1               0x00000800            2048          verbose1
  getobj2               0x00001000            4096          verbose1
  doprgold              0x00002000            8192          verbose1
  doorlock1             0x00004000           16384          verbose1
  doorlock2             0x00008000           32768          verbose1
  monpoly1              0x00010000           65536          verbose1
  monpoly2              0x00020000          131072          verbose1
  mswingsm              0x00040000          262144          verbose1
  missmu                0x00080000          524288          verbose1
  mswings               0x00100000         1048576          verbose1
  wildmiss              0x00200000         2097152          verbose1
  gulpmu                0x00400000         4194304          verbose1
  explmu                0x00800000         8388608          verbose1
  meatmetal1            0x01000000        16777216          verbose1
  meatmetal2            0x02000000        33554432          verbose1
  meatmetal3            0x04000000        67108864          verbose1
  meatmetal4            0x08000000       134217728          verbose1
  relobj                0x10000000       268435456          verbose1
  ready_weapon          0x20000000       536870912          verbose1
  wield_tool            0x40000000      1073741824          verbose1
  meatobj1              0x00000001               1          verbose2
  meatobj2              0x00000002               2          verbose2
  meatobj3              0x00000004               4          verbose2
  meatobj4              0x00000008               8          verbose2
  meatcorpse1           0x00000010              16          verbose2
  meatcorpse2           0x00000020              32          verbose2
  mpickgold             0x00000040              64          verbose2
  mpickstuff            0x00000080             128          verbose2
  setmangry             0x00000100             256          verbose2
  mb_trapped            0x00000200             512          verbose2
  m_move1               0x00000400            1024          verbose2
  m_move2               0x00000800            2048          verbose2
  m_move3               0x00001000            4096          verbose2
  m_move4               0x00002000            8192          verbose2
  m_move5               0x00004000           16384          verbose2
  thitu1                0x00008000           32768          verbose2
  thitu2                0x00010000           65536          verbose2
  m_throw               0x00020000          131072          verbose2
  handler_menustyle     0x00040000          262144          verbose2
  handler_autounlock    0x00080000          524288          verbose2
  handler_msg_window    0x00100000         1048576          verbose2
  handler_whatis_coord1 0x00200000         2097152          verbose2
  handler_whatis_coord2 0x00400000         4194304          verbose2
  dolook                0x00800000         8388608          verbose2
  describe_decor1       0x01000000        16777216          verbose2
  describe_decor2       0x02000000        33554432          verbose2
  loot_mon              0x04000000        67108864          verbose2
  dotip                 0x08000000       134217728          verbose2
  polymon               0x10000000       268435456          verbose2
  teleds                0x20000000       536870912          verbose2
  level_tele            0x40000000      1073741824          verbose2
  ghost_from_bottle     0x00000001               1          verbose3
  dodip1                0x00000002               2          verbose3
  dodip2                0x00000004               4          verbose3
  dodip3                0x00000008               8          verbose3
  intemple              0x00000010              16          verbose3
  doread1               0x00000020              32          verbose3
  doread2               0x00000040              64          verbose3
  doread3               0x00000080             128          verbose3
  doread4               0x00000100             256          verbose3
  doread5               0x00000200             512          verbose3
  doread6               0x00000400            1024          verbose3
  doread7               0x00000800            2048          verbose3
  drop_boulder_on_player0x00001000            4096          verbose3
  do_genocide           0x00002000            8192          verbose3
  call_kops1            0x00004000           16384          verbose3
  call_kops2            0x00008000           32768          verbose3
  call_kops3            0x00010000           65536          verbose3
  erode_obj1            0x00020000          131072          verbose3
  erode_obj2            0x00040000          262144          verbose3
  erode_obj3            0x00080000          524288          verbose3
  trapeffect_rocktrap   0x00100000         1048576          verbose3
  climb_pit             0x00200000         2097152          verbose3
  drown                 0x00400000         4194304          verbose3
  mon_adjust_speed      0x00800000         8388608          verbose3
  hit                   0x01000000        16777216          verbose3
  miss                  0x02000000        33554432          verbose3
  makewish              0x04000000        67108864          verbose3
  prinv                 0x08000000       134217728          verbose3
  do_attack             0x00000001               1          verbose4
  known_hitum           0x00000002               2          verbose4
  hmon_hitmon1          0x00000004               4          verbose4
  hmon_hitmon2          0x00000008               8          verbose4
  mhitm_ad_tlpt         0x00000010              16          verbose4
  mhitm_ad_wrap1        0x00000020              32          verbose4
  mhitm_ad_wrap2        0x00000040              64          verbose4
  mhitm_ad_dgst         0x00000080             128          verbose4
  damageum              0x00000100             256          verbose4
  missum                0x00000200             512          verbose4
  hmonas1               0x00000400            1024          verbose4
  hmonas2               0x00000800            2048          verbose4
  hmonas3               0x00001000            4096          verbose4
  hmonas4               0x00002000            8192          verbose4
  passive               0x00004000           16384          verbose4
  flash_hits_mon        0x00008000           32768          verbose4
2022-06-19 21:02:50 -04:00
nhmall
cb0c21e91d ENHANCED_SYMBOLS
A new feature, enabled by default to maximize testing, but one which can
be disabled by commenting it out in config.h

With this, some additional information is added to the glyphmap entries
in a new optional substructure called u with these fields:
    ucolor          RGB color for use with truecolor terminals/platforms.
                    A ucolor value of zero means "not set." The actual
                    rgb value of 0 has the 0x1000000 bit set.
    u256coloridx    256 color index value for use with 256 color
                    terminals, the closest color match to ucolor.
    utf8str         Custom representation via utf-8 string (can be null).

There is a new symset included in the symbols file, called enhanced1.

Some initial code has been added to parse individual
OPTIONS=glyph:glyphid/R-G-B entries in the config file.

The glyphid can, in theory, either be an individual glyph (G_* glyphid)
for a single glyph, or it can be an existing symbol S_ value
(monster, object, or cmap symbol) to store the custom representation for
all the glyphs that match that symbol.

Examples:
   OPTIONS=glyph:G_fountain/U+03A8/0-150-255

(Your platform/terminal font needs to be able to include/display the
character, of course.)

The NetHack core code does parsing and storing the customized
entries, and adding them to the glyphmap data structure.

Any window port can utilize the additional information in the glyphinfo
that is passed to them, once code is added to do so.

Also, consolidate some symbol-related code into symbols.c, and remove it from
files.c and options.c
2022-05-07 10:25:13 -04:00
PatR
44d5be6eb4 autounlock overhaul
This gives the player more control over what autounlock does.  It is
now a compound option rather than a boolean, and takes values of
  autounlock:none
  !autounlock or noautounlock (shortcuts for none)
  autounlock:untrap + apply-key + kick + force (spaces are optional
    or can be used instead of plus-signs, but can't mix "foo bar+quux")
  autounlock (without a value, shortcut for autounlock:apply-key).
Default is autounlock:apply-key.

Untrap isn't implemented (feel free to jump in) so is suppressed from
the 'O' command's new sub-menu for autounlock.  It's parsed and
accepted from .nethackrc but won't accomplish anything.

[Just musing: it should be feasible to kick in direction '.' to break
open a container or #force to an adjacent spot to break open a door.
If that was done, autounlock:kick+force (or more likely autounlock:
apply-key+kick+force when lacking a key) would resort to force if hero
couldn't kick due to wounded legs or riding.

This changes struct flags so increments EDITLEVEL again.

This includes pull requests #750 from entrez and #751 from FIQ but was
entered from scratch rather than using use their commits.

Closes #750
Closes #751
2022-05-04 19:13:28 -07:00
PatR
9da36fb03e some options handling cleanup
Hide 'altkeyhandling' from the 'O' menu for !WIN32 builds.  If
present in run-time config file it will be parsed and then ignored.

Instead of showing "unknown" for the value of the 'hilite_status'
compound option, show "none" if there are no highlighting rules, or
a pointer to other option "status highlight rules" when there are.

Deal with a few function parameters that are used for some
combination of build-time config settings and unused for others.
2022-04-06 12:08:58 -07:00
PatR
8aa48ecd91 'O' vs msg_window option
Change 'O's sub-menu for selecting new msg_window option setting to
work similar to the one for menustyle:  show a description of what
the values mean with a two-line, two-column menu entry.  Also make
its current value be pre-selected.

msg_window is a bit more complicated than menustyle because only
some interfaces support it and curses only supports two of the four
choices.  It currently has one hard-coded reference to "^P" (in the
tty-specific 'combination' choice).  Changing that is feasible but
seems like more trouble than it'd be worth.
2022-04-05 13:35:23 -07:00
PatR
5db6dac863 menuinvertmode
Change the 'menuinvertmode' default from 0 to 1 so that it gets more
exercise.  It can be changed back to 0 via option settings but it's
doubtful that anyone will care enough to bother.

Some pickup/take-off actions have been using it to avoid setting
their 'all' choice when bulk toggling for current-page or whole-menu
takes place; 'O' specifies it for its '?' help choice.  This adds
the skipinvert flag to the 'all' choice of #wizidentify.

The comments describing it now state that menuinvertmode applies to
bulk set-on operations as well as to toggle-on/off operations but
that will only be true if/when interfaces call menuitem_invert_test()
for set as well as for invert.  tty is about to start doing that.
2022-03-16 16:19:30 -07:00
nhkeni
1647125f89 rationalize extensions in doc directory
rename text files to have .txt extension, etc
    update references to changed filenames
2022-01-29 16:28:06 -05:00
PatR
d5b7d8520c 'O' assistance
I don't care for this very much at all, but making it shorter will
reduce its usefullness.  It addresses one of the struggles exhibited
in the "a man and his cat" youtube video, where he was baffled when
selecting booleans didn't change their values and he later used Esc
instead of Enter after eventually finding number_pad.

This inserts some explanatory text (around three dozen lines,
unfortunately) at the start of 'O's menu.  Some of it is general menu
stuff, some is specific options stuff, and some attempts to fend off
various bug reports about options that do or don't persist across
save and restore or RC revisions that seem to have no effect.

The new introductory text can be disabled by turning off cmdassist.
Players who already do that don't need to see this.  Many who ignore
cmdassist and occasionally endure an outburst of compass directions
are likely to be goaded into turning it off.  I hope we won't need a
new 'optassist' for players who want to skip this but leave cmdassist
in general on.

It doesn't attempt to address his attempt to use arrow keys (possibly
arrows overloaded on number pad keys, or perhaps just digits on the
number pad while numpad mode was off) to navigate the menu then having
the Windows port 'helpfully' change those into hjkl which resulted in
selecting and subsequently unintentionally toggling some options on
the first page.  One was 'color' which he did notice and then re-run
'O' to successfully toggle it back on.  There was at least one other
which he either didn't notice to didn't both to reverse.
2022-01-13 14:25:01 -08:00
PatR
30a0cab66f tiled_map option
It was possible to toggle ascii_map On (which toggles tiled_map Off)
and Off (so tiled_map On) during play, but tiled_map was marked as
config-file only so the converse pair of operations weren't allowed.
Allow tiled_map to be toggled On or Off during play.
2022-01-02 00:35:52 -08:00
PatR
4f1c213516 more NO_TILE_C
When USE_TILES is disabled, don't let wc_tiled_map be the default.

Qt is capable of showing an (ugly) ascii map, and will do so if built
with NO_TILE_C after this fix (it defaults to tiles without this),
but it requires that a tiles file be loaded because it displays tiles
in other places besides the map, like role selection.  So it can't
skip them when wc_ascii_map is set.
2021-12-31 15:02:35 -08:00
nhmall
0a97cc5c5e windows console changes - eliminate *key.dll
Incorporate the functionality of the loadable DLL's (nhraykey.dll,
nhdefkey.dll, and nh340key.dll) into the consoletty.c code and
remove the dll building
2021-11-16 15:27:33 -05:00
nhmall
39713783d1 some trailing whitespace in src, include 2021-10-16 12:12:21 -04:00
Pasi Kallinen
76f77ee0cc Add assistance to fire-command
Allows the fire-command to autowield a launcher; it will now
do either swapweapon or wield an appropriate launcher, if you
have ammo quivered.

This assistance can be turned off with the fireassist boolean option.

Adds a rudimentary command queue, which allows the code to add keys
or extended commands into the queue, and they're executed as if
the user did them.  Time passes normally when doing the queue,
and the queue will get cleared if hero is interrupted.
2021-06-16 13:14:32 +03:00
Pasi Kallinen
97e58a4fdc Change autopickup and color default values
Change the default value of autopickup to off. Having it on is
harmful for new players, making them very easily burdened.
We can't expect new players to know how to configure
pickup_types, pickup_burden, and pickup exceptions.

Change the default value of color to on. We can safely assume
new users have a terminal that supports color, and most people
want color.
2021-06-06 19:25:49 +03:00
PatR
f0b63ae20c 'O' vs 'altmeta'
I accidentally toggled the 'altmeta' option On and got this
non sequitur result when trying to toggle it back Off:
|The altmeta option may not both have a value and be negated.
2021-03-29 09:17:33 -07:00
PatR
946df19ea2 \#perminv, 2 of 2: implementation
Add new '|' command, aka #perminv, which allows the player to
send menu scrolling keystrokes to the persistent inventory window.

Implemented for X11, where its usefulness is limited, and for
curses, where it is more needed and also more fully functional.
The interface can either prompt for one keystroke, act upon it,
and return to normal play, or it can loop for multiple keystrokes
until player types <return> or <escape>.  X11 does the former if
the 'slow' application resource is False so that prompting uses
popups, and the latter when 'slow' is True where prompting is in
a fixed spot and doesn't end up causing the persistent inventory
window to be stacked behind the map window.  curses always does
the loop-until-done approach.  It also accepts up and down arrow
keys to scroll one line at a time.

Also adds two new menu scrolling commands, menu_shift_right (key
'}' by default) and menu_shift_left ('{') if wincap2 flags contain
WC2_MENU_SHIFT.  Shifting allows different substrings of too-long
lines to be seen.

For X11, neither works because their handling requires a horizontal
scrollbar and for some reason that escapes me our menus don't have
one of those.  If they did, shifts could work for all menus but a
shifted window would hide the selection letters.  So shifting would
be most usefully done as:  pan right, read more of any long lines,
immediately pan back to the left.

For curses, they only apply to the persistent inventory window.
Shift right redraws it with class headers and inventory letters
shown normally but the item descriptions omit their leftmost
portion, showing more text towards the end.  Shift left reverses
that and does nothing if the beginning is already in view.  Forward
and backward scrolling while shifted leave the shift in place.
2021-03-13 18:18:53 -08:00
PatR
d8bef90009 options key parsing
OPTIONS=menu_previous_page:\mv
  BINDINGS=M-v:menu_previous_page
both worked, but
  OPTIONS=menu_previous_page:M-v
  BINDINGS=\mv:menu_previous_page
both failed.  Make all four variations work.  Tiny change made large
by the need to move some things around.

The option definition for menu_first_page had a couple of its flag
bits swapped.  I didn't try to figure out whether that had any impact.
2021-03-10 12:28:09 -08:00
PatR
f480803970 'wizmgender' flag
"Demote" wizmgender from an obscure wizard mode extended command
to an obscure wizard mode boolean option.  Behaves the same except
that no message is given when the value gets toggled.
2021-02-18 23:54:30 -08:00