Menu

#4 menu letter choosing

open
nobody
None
5
2001-09-21
2001-09-21
No

The idea of using the line item text rather than
alphabet order to determine the choices in a menu (like
the take what? menu) is a good one, but has a few
problems.
1. Non-letter characters, especially ' ', can end up
being the keychoices for the menu.
2. Since most objects begin with "a" or "an", the first
few choices are usually [aAnN ]. If there are a few
arrows, the first digit of the number of arrows gets
used, which seems kind of silly. And at an extreme,
after dropping lots of stuff on an altar, I find myself
needing to pick up a variant on [aAnN uUcCrRsSeEdD].

This patch fixes most of these problems. Specifically:
It ignores " - " (from an #enhance menu line).
It parses and ignores phrases including "an uncursed "
or "24 +1 " (from the start of an object).
After that, it rejects the character ' ' when searching
the menu line for an unused letter. (I'd like to see
typing " " in a menu like this scroll down one
windowful, but that's a separate issue.)

Some possible shortcomings of the patch are:
1. It won't make sense in foreign language
translations, if any exist. Perhaps what this does
should be a hook of some sort. Actually, parsing the
string fed to the menu function is slightly ugly when
there are objects that might be better able to suggest
letters for themselves...
2. It's still possible for non-letter characters to be
used: if choosing from a large collection of wands or
chargeable tools, characters from the (0:3) and similar
might be used. Note that if this part is excluded we
would go instead to the first available alphabet
letter. Maybe the way it is is good, maybe not.
3. Should "pair of " (as in gloves, boots) be ignored?
4. I probably forgot some type of menu or something.
This file is a -u patch, to be applied to
falconseye-1.9.3/win/jtp/jtp_win.c

Discussion

  • Andrew Schepler

    Andrew Schepler - 2001-09-21

    menu letters patch

     
  • Andrew Schepler

    Andrew Schepler - 2001-09-24

    Logged In: YES
    user_id=329517

    Updated the patch 9/23/01. Fixed a bug that caused the
    parser to select the number in '+1' or similar.

     
  • Andrew Schepler

    Andrew Schepler - 2001-09-24

    menu letters patch

     
  • Andrew Schepler

    Andrew Schepler - 2001-09-24

    Logged In: YES
    user_id=329517

    whoops, it won't delete the previous version. The file
    listed second (under Description and Download) is the more
    recent one. (make sure the URL mentions file_id=11120.)
    Sorry about that, should have given a better description.

     

Log in to post a comment.