(Hopefully) useful code snippet modifies "]" command to highlight unidentified items

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Max Stats
    Swordsman
    • Jun 2010
    • 324

    (Hopefully) useful code snippet modifies "]" command to highlight unidentified items

    Playing 3.2, but probably applies to most recent versions. When there is a lot of junk on the ground the object list ("]") command is great to find the "interesting" objects. It is also useful that it highlights artifacts in violet and objects that have not been seen yet in red. I thought it would be even more useful if it also highlighted objects that were not fully identified. I wondered if it might be a simple edit to make this happen, since the code to highlight was already there. It turns out that it was, as evidenced by the fact that I was able to do it.

    If you are the compile-it-yourself type, you can make this change by editing src/object/obj-util.c and finding the display_itemlist function. Find the following code:

    Code:
    		if (artifact_p(o_ptr) && object_is_known(o_ptr))
    			/* known artifact */
    			attr = TERM_VIOLET;
    		else if (!object_flavor_is_aware(o_ptr))
    			/* unaware of kind */
    			attr = TERM_RED;
    		else if (object_is_worthless(o_ptr))
    			/* worthless */
    			attr = TERM_SLATE;
    		else
    			/* default */
    			attr = TERM_WHITE;
    Add three lines to it as follows:

    Code:
    		if (artifact_p(o_ptr) && object_is_known(o_ptr))
    			/* known artifact */
    			attr = TERM_VIOLET;
    		else if (!object_flavor_is_aware(o_ptr))
    			/* unaware of kind */
    			attr = TERM_RED;
    [B][COLOR="Yellow"]		else if (!object_is_known(o_ptr))
    			/* not fully known */
    			attr = TERM_ORANGE;[/COLOR]
    [/B]		else if (object_is_worthless(o_ptr))
    			/* worthless */
    			attr = TERM_SLATE;
    		else
    			/* default */
    			attr = TERM_WHITE;
    I picked orange; if you want a different color, look in src/z-term.h, find the color name you want, and substitute it for TERM_ORANGE. Recompile and install and there you have it.
    If beauty is in the eye of the beholder, then why are beholders so freaking ugly?
  • Tiburon Silverflame
    Swordsman
    • Feb 2010
    • 405

    #2
    Problem is, this is something we *don't* want. Dive strategy usually means:

    a) detect
    b) see, from that, what's interesting and safe to reach
    c) go get it while avoiding undesirable fights

    The general tone of comments is, this is already too easy to do. Thus, anything that simplifies this aspect, is movement in the wrong direction.

    Comment

    • d_m
      Angband Devteam member
      • Aug 2008
      • 1517

      #3
      Originally posted by Tiburon Silverflame
      Problem is, this is something we *don't* want. Dive strategy usually means:

      a) detect
      b) see, from that, what's interesting and safe to reach
      c) go get it while avoiding undesirable fights

      The general tone of comments is, this is already too easy to do. Thus, anything that simplifies this aspect, is movement in the wrong direction.
      I am not sure this is true. Obscuring information that players know anyway doesn't really address the difficultly of a particular strategy.

      If diving really is too easy, the solution is to actually make it harder, not to hide information. Do you think we should hide unknown flavors to make it harder to find those also?

      Max Stats: I will definitely try out your patch and see how it plays. Thanks!
      linux->xterm->screen->pmacs

      Comment

      • Derakon
        Prophet
        • Dec 2009
        • 9022

        #4
        Originally posted by Tiburon Silverflame
        Problem is, this is something we *don't* want.

        ...

        The general tone of comments is, this is already too easy to do. Thus, anything that simplifies this aspect, is movement in the wrong direction.
        Wrong. Very wrong.

        The game should be transparent. That includes automating tedious tasks. If the player can see where an item is, and they can then use the 'l'ook command to inspect the item, and from that determine if the item is identified or not, then there is no reason to not automate that process for the player.

        Your logic would have us e.g. not sorting the monster list by monster level / uniqueness, since you can get that information from using the '/' command and then paging through until you find the monster you want. Difficulty that comes from the game having a clunky interface is not good difficulty.

        In short, we have already decided to provide identification information to the player for items they aren't carrying. Having made that decision, we should make it as easy as possible for the player to get access to that information. Or we should decide that the player cannot tell that the item is identified at all unless they're standing on it. Those are your options.

        Comment

        • Magnate
          Angband Devteam member
          • May 2007
          • 5110

          #5
          Originally posted by Derakon
          Wrong. Very wrong.

          The game should be transparent. That includes automating tedious tasks. If the player can see where an item is, and they can then use the 'l'ook command to inspect the item, and from that determine if the item is identified or not, then there is no reason to not automate that process for the player.

          Your logic would have us e.g. not sorting the monster list by monster level / uniqueness, since you can get that information from using the '/' command and then paging through until you find the monster you want. Difficulty that comes from the game having a clunky interface is not good difficulty.

          In short, we have already decided to provide identification information to the player for items they aren't carrying. Having made that decision, we should make it as easy as possible for the player to get access to that information. Or we should decide that the player cannot tell that the item is identified at all unless they're standing on it. Those are your options.
          Hmmm. While I agree with both you and d_m that we are out to streamline the *interface* while making the *game* harder, I do think that this particular decision can be revisited.

          For example, about a year ago we decided that extra dice on ego/artifact weapons should not be visible until you actually pick up the item (or walk over it, I forget which). So Ringil shows up as a plain 2d5 longsword from any kind of object detection.

          I don't see why we couldn't move further in that direction, as Timo and others have already suggested. We could have dObj just reveal "potion", "ring" etc. without showing flavours until you get to them. That's nothing to do with making the interface better: I'm all for the object list being totally sortable and colour-coded for objects you have already physically plodded over to see.

          Etc.
          Last edited by Magnate; January 6, 2011, 21:01.
          "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

          Comment

          • Derakon
            Prophet
            • Dec 2009
            • 9022

            #6
            Oh, sure, no arguments there. That's a question of deciding what information to reveal and when to reveal it. Once you make that decision, though, you design the UI to make accessing that information as painless as possible once the player has gained it.

            Comment

            • PowerDiver
              Prophet
              • Mar 2008
              • 2820

              #7
              Originally posted by Magnate
              I don't see why we couldn't move further in that direction, as Timo and others have already suggested. We could have dObj just reveal "potion", "ring" etc. without showing flavours until you get to them
              I think I'm opposed to this for a meta reason. For now, if anyone wants to add flavor, I say "go ahead, I can always ignore with squelch". You want to add bottles of Guinness to the game? Go ahead. I encounter one once, squelch, and it hardly impinges on me. It's easy to be agreeable.

              If you change things so that I cannot automatically ignored squelched items until I plod over to check them out, then I'll have to keep that in mind any time anyone wants to do something flavorful. I'd be against adding Guinness in that case.

              Comment

              • bulian
                Adept
                • Sep 2010
                • 163

                #8
                I think the original posters idea would be useful, at least as an option, though it might turn out to be overbearing. As an alternative (or addition) I might suggest highlighting the square the item is on. This would have the added benefit of making food/mushrooms easier to spot.

                Somewhat related to this, is there currently a way to disable the confirmation when destroying stacks of items? I tend to use my favorite macro, k-ay, a lot, which hangs when destroying stacks. Alternatively, an option to destroy an entire stack would be just as useful.

                For example, about a year ago we decided that extra dice on ego/artifact weapons should not be visible until you actually pick up the item (or walk over it, I forget which). So Ringil shows up as a plain 2d5 longsword from any kind of object detection.
                Was it decided that different armor and/or shield AC values should still be shownl? As it stands now, its easy to spot a few of the more common artifact armors due to these differences. Haradrim and Gil-galad shields come to mind as well.

                Comment

                • Magnate
                  Angband Devteam member
                  • May 2007
                  • 5110

                  #9
                  Originally posted by bulian
                  Was it decided that different armor and/or shield AC values should still be shownl? As it stands now, its easy to spot a few of the more common artifact armors due to these differences. Haradrim and Gil-galad shields come to mind as well.
                  Well spotted. I think the dice-hiding change was made before the base ACs were changed. I agree that these shouldn't be obvious from afar either.
                  "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

                  Comment

                  • PowerDiver
                    Prophet
                    • Mar 2008
                    • 2820

                    #10
                    Originally posted by Magnate
                    Well spotted. I think the dice-hiding change was made before the base ACs were changed. I agree that these shouldn't be obvious from afar either.
                    Why would you ever implement different base AC rather than just change the AC bonus?

                    It's not like weapons where there are effects that apply to base but not to plusses.

                    Comment

                    • camlost
                      Sangband 1.x Maintainer
                      • Apr 2007
                      • 523

                      #11
                      Originally posted by PowerDiver
                      Why would you ever implement different base AC rather than just change the AC bonus?

                      It's not like weapons where there are effects that apply to base but not to plusses.
                      Disenchantment.

                      In the future, base shield AC might apply to other things. It's important in O-like combat for arrow deflection, and goes away when wielding a two-handed weapon.
                      a chunk of Bronze {These look tastier than they are. !E}
                      3 blank Parchments (Vellum) {No french novels please.}

                      Comment

                      • PowerDiver
                        Prophet
                        • Mar 2008
                        • 2820

                        #12
                        Originally posted by camlost
                        Disenchantment.

                        In the future, base shield AC might apply to other things. It's important in O-like combat for arrow deflection, and goes away when wielding a two-handed weapon.
                        I guess disenchantment matters a little, but not much. Especially with the new "restore item" scroll coming in 3.3. Disenchantment from 25 to 20 will be equivalent to disenchantment from 15 to 10, for artifacts anyway which is the context of this discussion.

                        I don't see the point of changing base AC. That's what the item *is*. If you want more base AC, use a different item. As an extreme example, a robe should not be able to have a base AC of 60, artifact or not. Such a thing isn't a robe.

                        Comment

                        • Hariolor
                          Swordsman
                          • Sep 2008
                          • 289

                          #13
                          Another meta-complaint, having recently played my second winner (woo) and having gotten my Kobold Warrior killed by M a couple nights ago (had spent all my resources and had him down to almost dead, gambled wrongly that I could off him first - wah wah)

                          Well all that time on the really low levels makes me think if detection is further nerfed to only show type and not flavor/attribute, then the endgame will become EVEN MORE TEDIOUS. Already I find having to spend hours on DL99 gathering potions/scrolls/speed boots/what have you pretty tiring. I'm thinking particularly if someone is looking for a good amulet or ring to complete their kit, or only needs healing potions, then a weaker detect will be hugely frustrating. Often one cannot afford to walk over every single potion or ring on a level to check its flavor.

                          I'd propose adding a *detection* rod/staff/scroll, as well as a better detection type in the spellbooks available only after CL40 or 45. Also make the palantir have the buffed version. This spell would show flavor as normal.

                          This way earlier characters can't rush to good items with the proposed interface change (which I like, btw). But later characters can still choose their objectives a bit more carefully.

                          Comment

                          • Magnate
                            Angband Devteam member
                            • May 2007
                            • 5110

                            #14
                            Originally posted by Hariolor
                            Another meta-complaint, having recently played my second winner (woo) and having gotten my Kobold Warrior killed by M a couple nights ago (had spent all my resources and had him down to almost dead, gambled wrongly that I could off him first - wah wah)

                            Well all that time on the really low levels makes me think if detection is further nerfed to only show type and not flavor/attribute, then the endgame will become EVEN MORE TEDIOUS. Already I find having to spend hours on DL99 gathering potions/scrolls/speed boots/what have you pretty tiring. I'm thinking particularly if someone is looking for a good amulet or ring to complete their kit, or only needs healing potions, then a weaker detect will be hugely frustrating. Often one cannot afford to walk over every single potion or ring on a level to check its flavor.

                            I'd propose adding a *detection* rod/staff/scroll, as well as a better detection type in the spellbooks available only after CL40 or 45. Also make the palantir have the buffed version. This spell would show flavor as normal.

                            This way earlier characters can't rush to good items with the proposed interface change (which I like, btw). But later characters can still choose their objectives a bit more carefully.
                            I think this is quite a good idea. So we're looking at a "rod of detection" which doesn't reveal flavours, and a "rod of *detection*" which does (and ditto for scrolls, spells etc.). Those which reveal flavours would be deeper and rarer items (and cl45+ spells), for use only in the endgame.
                            "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

                            Comment

                            • PowerDiver
                              Prophet
                              • Mar 2008
                              • 2820

                              #15
                              Originally posted by Magnate
                              I think this is quite a good idea. So we're looking at a "rod of detection" which doesn't reveal flavours, and a "rod of *detection*" which does (and ditto for scrolls, spells etc.). Those which reveal flavours would be deeper and rarer items (and cl45+ spells), for use only in the endgame.
                              I hate this idea.

                              Comment

                              Working...
                              😀
                              😂
                              🥰
                              😘
                              🤢
                              😎
                              😞
                              😡
                              👍
                              👎