Quiver bug in v1802

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • miyazaki
    Adept
    • Jan 2009
    • 227

    Quiver bug in v1802

    I love the quiver, but if I hit (f)ire without any ammo or with unfireable ammo, then the game crashes.
  • d_m
    Angband Devteam member
    • Aug 2008
    • 1517

    #2
    Originally posted by miyazaki
    I love the quiver, but if I hit (f)ire without any ammo or with unfireable ammo, then the game crashes.
    What platform are you running? If I do that on Linux with r1804 I get a message "You have nothing to fire" (in both cases).
    linux->xterm->screen->pmacs

    Comment

    • miyazaki
      Adept
      • Jan 2009
      • 227

      #3
      Windows vista. It has happened several times with different launchers. I have never seen that message.

      Comment

      • miyazaki
        Adept
        • Jan 2009
        • 227

        #4
        Oh yeah, ammo doesn't pseudo-ID properly in the quiver either. It gets labeled {worn} and this doesn't disappear unless I use a ?identify, even when I know all the ammo's attributes. I never get the {magical} message. Being treated as armour?

        Comment

        • PowerDiver
          Prophet
          • Mar 2008
          • 2820

          #5
          This whole thing about ammo being "wielded" into the quiver is silly. I know it is how it has always been done, but that doesn't make it right.

          Comment

          • d_m
            Angband Devteam member
            • Aug 2008
            • 1517

            #6
            Originally posted by PowerDiver
            This whole thing about ammo being "wielded" into the quiver is silly. I know it is how it has always been done, but that doesn't make it right.
            Patches welcome!

            After having ported this feature from NPP I think I agree with you, but you're going to hit these bugs whichever way you implement the feature based on the way the loops over intentory[] are written--changing the pick up command to put stuff in the quiver (so that ammo never hits the backpack) doesn't simplify that.

            If I were going to do a refactor I would split inventory[] into equipment[], quiver[] and inventory[]. I think that would make the inventory code a lot easier to read, and obviate most of the weirdness involving INVEN_PACK, INVEN_TOTAL and friends.
            linux->xterm->screen->pmacs

            Comment

            • Magnate
              Angband Devteam member
              • May 2007
              • 5110

              #7
              Originally posted by d_m
              Patches welcome!

              After having ported this feature from NPP I think I agree with you, but you're going to hit these bugs whichever way you implement the feature based on the way the loops over intentory[] are written--changing the pick up command to put stuff in the quiver (so that ammo never hits the backpack) doesn't simplify that.

              If I were going to do a refactor I would split inventory[] into equipment[], quiver[] and inventory[]. I think that would make the inventory code a lot easier to read, and obviate most of the weirdness involving INVEN_PACK, INVEN_TOTAL and friends.
              I don't think anyone would mind if you did that
              "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

              Comment

              • d_m
                Angband Devteam member
                • Aug 2008
                • 1517

                #8
                Originally posted by miyazaki
                Windows vista. It has happened several times with different launchers. I have never seen that message.
                I'm at work now, but I have a theory about why this might be happening that I'll test after work.
                linux->xterm->screen->pmacs

                Comment

                • Nick
                  Vanilla maintainer
                  • Apr 2007
                  • 9647

                  #9
                  Originally posted by PowerDiver
                  This whole thing about ammo being "wielded" into the quiver is silly. I know it is how it has always been done, but that doesn't make it right.
                  Thank you for pointing that out - I hadn't realised it annoyed me. I'll work on finding a more sensible system at some point.
                  One for the Dark Lord on his dark throne
                  In the Land of Mordor where the Shadows lie.

                  Comment

                  • PowerDiver
                    Prophet
                    • Mar 2008
                    • 2820

                    #10
                    Originally posted by Nick
                    Thank you for pointing that out - I hadn't realised it annoyed me. I'll work on finding a more sensible system at some point.
                    The solution appears obvious to me, but a whole lot of work. Inventory needs to be upped to 100 slots or so, with ammo coming last, and a function call [rather than comparison to a constant] to determine whether you have empty slots, and appropriate list output when inspecting or firing.

                    It's also obviously a large amount of work.

                    The only slightly tricky issue is differentiating items that can be both thrown effectively or wielded for melee, like Nimloth. One solution is to separate the types entirely. Another is that ammo goes in the quiver but throwing items do not. Yet another is to put it in the quiver, but allow you to wield it from the quiver into the melee slot.

                    Comment

                    • d_m
                      Angband Devteam member
                      • Aug 2008
                      • 1517

                      #11
                      Originally posted by miyazaki
                      I love the quiver, but if I hit (f)ire without any ammo or with unfireable ammo, then the game crashes.
                      I think I have fixed the issue--I was able to reproduce the crash at home. r1806 fixes it for me; please let me know if it resolves your issue as well.
                      linux->xterm->screen->pmacs

                      Comment

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