Quiver added to Vanilla as of r1776

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SilverD
    Scout
    • Nov 2009
    • 31

    #16
    I have one set of arrows equipped, but when I press 't" to unequip an item, it doesn't show me the quiver entry in the drop-down list in the main window (I have the option to always show lists to on).
    But by pressing "n" to choose where the arrow actually is, it unequips it fine.

    Btw, what is that [f0] tag and why is the 'm' slot skipped? Just wondering :-)
    Great job, thanks!
    Reality is what, when you stop believing in it, doesn't go away.
    Failure is not an option. It is a privilege, reserved only for those who try.

    Comment

    • Whelk
      Adept
      • Jun 2007
      • 211

      #17
      I believe the [f0] tag means it'll be the default ammo if you go to fire and at the "fire which item?" prompt just press enter instead of entering the ammo's corresponding letter. You can also press 0 rather than the ammo's letter to choose that ammo after pressing the 'f'ire key.

      As far as I can tell, it's just a little automated time-saver, so you don't have to manually inscribe all your ammo with @f1, @f2, @f3 and so on. I like it.

      Comment

      • d_m
        Angband Devteam member
        • Aug 2008
        • 1517

        #18
        Originally posted by SilverD
        I have one set of arrows equipped, but when I press 't" to unequip an item, it doesn't show me the quiver entry in the drop-down list in the main window (I have the option to always show lists to on).
        But by pressing "n" to choose where the arrow actually is, it unequips it fine.

        Btw, what is that [f0] tag and why is the 'm' slot skipped? Just wondering :-)
        Great job, thanks!
        If you hit something like space after the "t" prompt do you see an item? If you turn off always-show-lists and hit space does it work?

        Whelk is correct about the meaning of [f0].

        The reason the quiver starts at (n) not (m) is not used is that most other places in the Angband code base expect slot (m) to always be empty, and going through to fix all of that wasn't attractive. It's arguably a bug, but it's a well-entrenched one that has an easy work-around.
        linux->xterm->screen->pmacs

        Comment

        • SilverD
          Scout
          • Nov 2009
          • 31

          #19
          Originally posted by d_m
          If you hit something like space after the "t" prompt do you see an item? If you turn off always-show-lists and hit space does it work?

          Whelk is correct about the meaning of [f0].

          The reason the quiver starts at (n) not (m) is not used is that most other places in the Angband code base expect slot (m) to always be empty, and going through to fix all of that wasn't attractive. It's arguably a bug, but it's a well-entrenched one that has an easy work-around.
          Nope, there is nothing after the slot 'l' with either the option on or off.

          *EDIT*: Should also note that the quiver slot doesn't show up in the drop--down list when trying to view item information from equipment ('I', '/').

          Ah, okay. It actually looks fitting with a blank space.. like a divider.
          Last edited by SilverD; November 30, 2009, 02:07.
          Reality is what, when you stop believing in it, doesn't go away.
          Failure is not an option. It is a privilege, reserved only for those who try.

          Comment

          • d_m
            Angband Devteam member
            • Aug 2008
            • 1517

            #20
            Originally posted by SilverD
            Nope, there is nothing after the slot 'l' with either the option on or off.


            *EDIT*: Should also note that the quiver slot doesn't show up in the drop--down list when trying to view item information from equipment ('I', '/').

            Ah, okay. It actually looks fitting with a blank space.. like a divider.
            EDIT: I think it has something to do with array sizes.
            EDIT2: Actually that makes no sense... clearly I need some sleep. I'll work on this for a bit longer first though (I can replicate this with a full equipment list).

            Huh, I am not seeing that behavior for (t) or (I).

            It looks like you're on OS X. Are you building these versions yourself? If so, you might want to try building a totally clean version. In any case, please paste how you're building the code. I will also go test this on my box running OS X--maybe it's weirdly platform--specific or something.

            So the short answer is that I can't replicate this.
            Last edited by d_m; November 29, 2009, 23:46.
            linux->xterm->screen->pmacs

            Comment

            • SilverD
              Scout
              • Nov 2009
              • 31

              #21
              Well, I thought so at first, too. But then I built from the fresh trunk checkout - same problem.

              command:

              cd /path/to/trunk/src
              make -f ./Makefile.osx

              I'm gonna go look for the bug and try to figure it out since it seems fine for you :-)

              *EDIT* It looks like the quiver in the drop-down lists shows up fine, as long as at least one slot in my equipment is empty.

              *EDIT2* Yea, I see what's happening. In obj-ui.c :: show_equip you iterate over the equip slots but increment the slot at the end. One of the tester hooks for invalid items just goes 'continue' without incrementing the slot (and i think it fires when going over the 'm' slot), so you'll never see the last entry.

              At least I think that's what happening. I don't know enough of Angband codebase in this regard to fix it correctly, but for testing purposes I incremented 'k' before 'continue' and my quiver showed up.
              Last edited by SilverD; November 29, 2009, 23:23.
              Reality is what, when you stop believing in it, doesn't go away.
              Failure is not an option. It is a privilege, reserved only for those who try.

              Comment

              • d_m
                Angband Devteam member
                • Aug 2008
                • 1517

                #22
                Originally posted by SilverD
                *EDIT* It looks like the quiver in the drop-down lists shows up fine, as long as at least one slot in my equipment is empty.
                Oh! I think I might know how to fix this then. Thanks for figuring this out.
                linux->xterm->screen->pmacs

                Comment

                • d_m
                  Angband Devteam member
                  • Aug 2008
                  • 1517

                  #23
                  Originally posted by SilverD
                  *EDIT2* Yea, I see what's happening. In obj-ui.c :: show_equip you iterate over the equip slots but increment the slot at the end. One of the tester hooks for invalid items just goes 'continue' without incrementing the slot (and i think it fires when going over the 'm' slot), so you'll never see the last entry.

                  At least I think that's what happening. I don't know enough of Angband codebase in this regard to fix it correctly, but for testing purposes I incremented 'k' before 'continue' and my quiver showed up.
                  I'm not sure about that fix--it seems to break things for me in GCU mode. The variable "k" is used to store item information in data structures used by the next for loop. But since it fixes your issue, it seems like it is closely linked with the bug.

                  The issue may lie in that for loop instead. I will give you a patch to test if I still can't replicate this myself. (EDIT: I can replicated it... I've been editing an earlier post by accident... but hopefully I can fix this soon)
                  Last edited by d_m; November 29, 2009, 23:48.
                  linux->xterm->screen->pmacs

                  Comment

                  • d_m
                    Angband Devteam member
                    • Aug 2008
                    • 1517

                    #24
                    Originally posted by SilverD
                    *EDIT2* Yea, I see what's happening. In obj-ui.c :: show_equip you iterate over the equip slots but increment the slot at the end. One of the tester hooks for invalid items just goes 'continue' without incrementing the slot (and i think it fires when going over the 'm' slot), so you'll never see the last entry.

                    At least I think that's what happening. I don't know enough of Angband codebase in this regard to fix it correctly, but for testing purposes I incremented 'k' before 'continue' and my quiver showed up.
                    OK, so the bug is fixed in r1801.

                    It turned out to be an inconsistent treatment of the separator line between equipment and quiver ammo which only hit you if your equipment was full. But until you figured out that the full equipment caused it I was stumped. Thanks for your help!
                    linux->xterm->screen->pmacs

                    Comment

                    • SilverD
                      Scout
                      • Nov 2009
                      • 31

                      #25
                      Originally posted by d_m
                      OK, so the bug is fixed in r1801.

                      It turned out to be an inconsistent treatment of the separator line between equipment and quiver ammo which only hit you if your equipment was full. But until you figured out that the full equipment caused it I was stumped. Thanks for your help!
                      Yep, that did it!
                      Yea, I was just playing around with stuff trying to determine if I was at least looking in the right place =p

                      Seems to work pefectly now. If I find anything else I'll post on trac.
                      Reality is what, when you stop believing in it, doesn't go away.
                      Failure is not an option. It is a privilege, reserved only for those who try.

                      Comment

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