[3.3] Targetting using *

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Narvius
    Knight
    • Dec 2007
    • 589

    [3.3] Targetting using *

    It used to select the nearest enemy by default, now it seems to go for the next-nearest.
    If you can convincingly pretend you're crazy, you probably are.
  • Magnate
    Angband Devteam member
    • May 2007
    • 5110

    #2
    Originally posted by Narvius
    It used to select the nearest enemy by default, now it seems to go for the next-nearest.
    Interesting - you may have won the prize for First Genuine Bug in 3.3.0. AFAICT there were no intentional changes to targetting mechanics in 3.3's development, and the only change I can think of is the one to display the path-to-target (which we borrowed from NPP). There's no reason this should have changed the behaviour of '*' though, so it may be related to the input layer changes instead.

    Grateful for confirmation of this bug from others, and also for a savefile from which it can be immediately reproduced.

    Late thought - is it by any chance only ignoring mimics? The behaviour could be related to the mimic changes, unless it's demonstrably happening with no mimics in sight ...
    "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

    Comment

    • Narvius
      Knight
      • Dec 2007
      • 589

      #3
      Savefile attached. It should target the bottom left orc, instead it targets the one above him (so, no, not mimic-related).

      If it helps, Windows XP SP3, no tiles, with minor modifications to the prf files because I severely dislike the atrociously-coloured block walls.

      Edit: Also, "target nearest" works as intended.
      Attached Files
      Last edited by Narvius; August 1, 2011, 12:37.
      If you can convincingly pretend you're crazy, you probably are.

      Comment

      • Timo Pietilä
        Prophet
        • Apr 2007
        • 4096

        #4
        Originally posted by Magnate
        Grateful for confirmation of this bug from others, and also for a savefile from which it can be immediately reproduced.
        Works well for me, so this isn't case for all copies.

        Comment

        • Magnate
          Angband Devteam member
          • May 2007
          • 5110

          #5
          Originally posted by Narvius
          Savefile attached. It should target the bottom left orc, instead it targets the one above him (so, no, not mimic-related).

          If it helps, Windows XP SP3, no tiles, with minor modifications to the prf files because I severely dislike the atrociously-coloured block walls.

          Edit: Also, "target nearest" works as intended.
          Hmm. Given your edit and Timo's comment (thanks Timo), I am now wondering whether '*' has ever explicitly looked for the shortest distance from @. Perhaps it just starts at the first monster in the list. I'll check with 3.2.0 to see if things have changed. (For this we need a 3.2.0 savefile, but it shouldn't be hard to arrange.)
          "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

          Comment

          • Timo Pietilä
            Prophet
            • Apr 2007
            • 4096

            #6
            Originally posted by Magnate
            Hmm. Given your edit and Timo's comment (thanks Timo), I am now wondering whether '*' has ever explicitly looked for the shortest distance from @. Perhaps it just starts at the first monster in the list. I'll check with 3.2.0 to see if things have changed. (For this we need a 3.2.0 savefile, but it shouldn't be hard to arrange.)
            What I did was getting between two townsfolk so that distance to one was 8 and other 9, then moved one step so that distances were reversed. '*' changed target just like it should do.

            [EDIT] checked with attached savefile, and for me '*' does target bottom left orc, not the one above it.

            [EDIT to EDIT] Both orcs are BTW 5 steps away from '@', so both are valid "nearest" targets. Might be random which one it chooses.
            Last edited by Timo Pietilä; August 1, 2011, 13:08.

            Comment

            • Narvius
              Knight
              • Dec 2007
              • 589

              #7
              Did you try it with the savefile I provided?
              (load up, *)

              [Edit]
              Okay. Now I'm in town, a drunk at 0N4E, and a beggar at 3N16W.
              * targets the beggar, ' targets the drunk.

              Weird.

              Second try.
              Cat at 1N1E, Cat#2 at 5S1E, beggar at 0N8W.
              Selects Cat#2, which is incidentally the next-nearest target.

              Attached: Situation @Second try.

              [Second Edit]
              I just redownloaded 3.3.0 off rephial and started a brand new character without any prior modifications to the game files. The problem persists, so it's not caused by any of my tinkering.
              Attached Files
              Last edited by Narvius; August 1, 2011, 13:21.
              If you can convincingly pretend you're crazy, you probably are.

              Comment

              • Timo Pietilä
                Prophet
                • Apr 2007
                • 4096

                #8
                Originally posted by Narvius
                Did you try it with the savefile I provided?
                (load up, *)

                [Edit]
                Okay. Now I'm in town, a drunk at 0N4E, and a beggar at 3N16W.
                * targets the beggar, ' targets the drunk.

                Weird.

                Second try.
                Cat at 1N1E, Cat#2 at 5S1E, beggar at 0N8W.
                Selects Cat#2, which is incidentally the next-nearest target.

                Attached: Situation @Second try.

                [Second Edit]
                I just redownloaded 3.3.0 off rephial and started a brand new character without any prior modifications to the game files. The problem persists, so it's not caused by any of my tinkering.
                Your savefiles work in my copy just fine, both of them. First one targeted the bottom left orc, second the nearest cat.

                Maybe this has something to do with platform?? Mine is Win XP SP3.

                Comment

                • d_m
                  Angband Devteam member
                  • Aug 2008
                  • 1517

                  #9
                  Originally posted by Narvius
                  Okay. Now I'm in town, a drunk at 0N4E, and a beggar at 3N16W.
                  * targets the beggar, ' targets the drunk.
                  I will look into this more closely. I'm don't think that (') and (*) are expected to necessarily target the SAME closest monster, although maybe it would be nice if they were guaranteed to have the same behavior.
                  linux->xterm->screen->pmacs

                  Comment

                  • Narvius
                    Knight
                    • Dec 2007
                    • 589

                    #10
                    Well, that's at least what I'm used to.

                    Just to make sure my mind isn't playing tricks I tried it on 3.20 - works fine, the way I expect.
                    If you can convincingly pretend you're crazy, you probably are.

                    Comment

                    • Magnate
                      Angband Devteam member
                      • May 2007
                      • 5110

                      #11
                      Originally posted by Narvius
                      Well, that's at least what I'm used to.

                      Just to make sure my mind isn't playing tricks I tried it on 3.20 - works fine, the way I expect.
                      Good. It's interesting that 3.3 works for Timo with both your savefiles (thanks again to Timo for taking the time to test). That would imply that there is something about keymaps or user prefs or local settings that is making the difference. Fortunately d_m is more knowledgeable than me about this stuff, and I'm sure will find any bug that exists!

                      FWIW, I think * and ' ought to be guaranteed to start at the closest monster every time - and select the same one if two are equidistant.
                      "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

                      Comment

                      • Blue Baron
                        Adept
                        • Apr 2011
                        • 103

                        #12
                        Originally posted by Narvius
                        Second try.
                        Cat at 1N1E, Cat#2 at 5S1E, beggar at 0N8W.
                        Selects Cat#2, which is incidentally the next-nearest target.
                        This happens to me as well. It happens when I use the asterisk on the numpad, but not shift-8, so it seems to because of the double numpad keypresses mentioned in another thread. (this would be easier to see if there were 4 creatures instead of 3, it would only switch between two of them.)

                        Edit: I guess the internal translation is working again and the translations for ADD, SUBTRACT, MULTIPLY, DIVIDE, and DECIMAL, should be removed again from handle_keydown() in main-win.c?

                        Edit2: removed VK_CLEAR from the above list, because it is still needed, and added a missing character.
                        Last edited by Blue Baron; August 2, 2011, 20:48.

                        Comment

                        • Nomad
                          Knight
                          • Sep 2010
                          • 958

                          #13
                          Originally posted by Blue Baron
                          it seems to because of the double numpad keypresses mentioned in another thread.
                          You're right. I've got a group of five monsters on-screen now: pressing Shift+8 repeatedly moves the target from 1st to 2nd, 3rd, 4th, 5th in order of closeness; pressing * on the numpad targets the 2nd then the 4th.

                          Comment

                          • Timo Pietilä
                            Prophet
                            • Apr 2007
                            • 4096

                            #14
                            Originally posted by Blue Baron
                            This happens to me as well. It happens when I use the asterisk on the numpad, but not shift-8, so it seems to because of the double numpad keypresses mentioned in another thread. (this would be easier to see if there were 4 creatures instead of 3, it would only switch between two of them.)
                            Ah, I did use the asterisk on actual keyboard-section of keyboard, not the numpad one. That could explain the difference between my experience and OP:s....testing....yes, now I get that too. Numpad '*' acts differently than the other '*'.

                            Comment

                            • Magnate
                              Angband Devteam member
                              • May 2007
                              • 5110

                              #15
                              Originally posted by Timo Pietilä
                              Ah, I did use the asterisk on actual keyboard-section of keyboard, not the numpad one. That could explain the difference between my experience and OP:s....testing....yes, now I get that too. Numpad '*' acts differently than the other '*'.
                              Ah, good. I mean, good that we've established the problem precisely, and that it is a(nother) numpad problem, not an inherent problem with targeting!
                              "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

                              Comment

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