Angband on Cygwin64 (on Win10)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • moosferatu
    Apprentice
    • Feb 2020
    • 99

    #16
    Ah, okay, we removed too much. Add the lines you removed back. Instead, edit keys-gcu.prf, which is in the same directory. Remove these lines:

    Code:
    keymap-act:.6
    keymap-input:0:[Right]
    
    keymap-act:.4
    keymap-input:0:[Left]
    
    keymap-act:.2
    keymap-input:0:[Down]
    
    keymap-act:.8
    keymap-input:0:[Up]

    Comment

    • Grotug
      Veteran
      • Nov 2013
      • 1631

      #17
      I put the pref file back the way it was and edited the gcu-keys.prf but the movement behavior didn't change at all. So then I put the gcu-keys.prf file back the way it was in the hopes the movement behavior would revert, but it did not. So @ still moves one square at a time, but when pressing SHIFT key with direction key @ still doesn't move at all. I'm not sure what's going on.

      I closed everything out and restarted my computer but still no change.
      Last edited by Grotug; March 26, 2020, 08:30.
      Beginner's Guide to Angband 4.2.3 Part 1: https://www.youtube.com/watch?v=m9c9e2wMngM

      Detailed account of my Ironman win here.

      "My guess is that Grip and Fang have many more kills than Gothmog and Lungorthin." --Fizzix

      Comment

      • moosferatu
        Apprentice
        • Feb 2020
        • 99

        #18
        Hmm... That should have worked. Okay, let's do it this way. Launch Cygwin and:

        Code:
        cd angband
        git checkout lib/customize/*
        The following is a custom key map file that should make the keys behave how you want them:

        Code:
        #=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=# begin Dump keymaps
        # *Warning!*  The lines below are an automatic dump.
        # Don't edit them; changes will be deleted and replaced automatically.
        
        keymap-act:;2
        keymap-input:0:[Down]
        
        keymap-act:;8
        keymap-input:0:[Up]
        
        keymap-act:;6
        keymap-input:0:[Right]
        
        keymap-act:;4
        keymap-input:0:[Left]
        
        keymap-act:.4
        keymap-input:0:\xbe
        
        keymap-act:.6
        keymap-input:0:\xb5
        
        keymap-act:.8
        keymap-input:0:\xf6
        
        keymap-act:.2
        keymap-input:0:\xf7
        
        
        # *Warning!*  The lines above are an automatic dump.
        # Don't edit them; changes will be deleted and replaced automatically.
        #=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=# end Dump keymaps
        If you already have a custom pref file, add those mappings to your existing file. If not, copy and paste the above into a new file at C:\cygwin64\home\USER\.angband\Angband\CHAR.prf.

        USER = Your Windows user
        CHAR = Your Angband character name

        Launch Angband and the preferences should be auto-loaded. If not, you can manually load the file.

        Comment

        • Grotug
          Veteran
          • Nov 2013
          • 1631

          #19
          That worked!

          There is still one minor thing that still doesn't behave as it does in Windows:

          <CTRL> + <direction key> doesn't keep @ from moving while allowing @ to attack (which is the normal behavior of those two keys pressed together).

          Instead it does nothing (or, more accurately, tells me to: press '?' for help).

          And.... one last thing: I'm not sure why the magma veins of treasure are orange blocks instead of orange *.

          Thanks again for all the help. If you want a break from being my Angband troubleshooter I'll certainly understand.

          Talk about if you give a child a glass of milk he'll ask for a cookie, and another cookie, and a brownie, and a cupcake....
          Beginner's Guide to Angband 4.2.3 Part 1: https://www.youtube.com/watch?v=m9c9e2wMngM

          Detailed account of my Ironman win here.

          "My guess is that Grip and Fang have many more kills than Gothmog and Lungorthin." --Fizzix

          Comment

          • moosferatu
            Apprentice
            • Feb 2020
            • 99

            #20
            I tried to make custom mappings for the <ctrl> + <arrow> commands, but I don't think it's possible with the ncurses version. The problem is the there are overlapping key codes. For example, <ctrl>+<down> is \xb5 and <shift>+<left> is also \xb5.

            Sorry!

            As for the magma, the reason is that that's the way they're defined in font-gcu.prf:



            You can delete those lines if you don't like it. Or reassign the symbol within Angband.

            No problem, happy to help!

            Comment

            • moosferatu
              Apprentice
              • Feb 2020
              • 99

              #21
              Here's a solution for you. You can map <ctrl>+<shift>+<arrow> to alter direction actions by adding the following to your key map pref file:

              Code:
              keymap-act:+8
              keymap-input:0:[F8]
              
              keymap-act:+2
              keymap-input:0:\xb4
              
              keymap-act:+6
              keymap-input:0:[F14]
              
              keymap-act:+4
              keymap-input:0:\xa0
              You'll just want to avoid mapping anything to F8 or F14...

              Comment

              • moosferatu
                Apprentice
                • Feb 2020
                • 99

                #22
                Digging into it some more, there's some really weird stuff going on with the ncurses keymappings. For example, if you query the key map in game, it reports the following:

                [End] => \xdf
                [ctrl]+[shift]+[numpad 9] => [End]

                What?

                I suspect that it has something to do with whatever's going on here:



                Right now, I'm not sure if there's a bug in that code that needs fixed and then normal mappings will start working, or if that code is correct, but the ncurses version needs a bunch of additional mappings defined to have parity with the other ports.

                Comment

                • Grotug
                  Veteran
                  • Nov 2013
                  • 1631

                  #23
                  Do you mean the keys-gcu.prf file? I edited that file but there was no change in behavior. I then reverted that file and tried with Grotug.prf (my user pref file) and also no change in behavior. I then reverted that file and edited the pref.prf file but still no change. So I reverted that file as well.

                  BTW I noticed that pressing <CTRL> <down arrow> causes @ to run East, but <CTRL><any other arrow key> nothing happens (ie. the game tells me to press '?' for help).

                  I'm posting here what my .prf files look like in case I've totally botched one/all of them. The only part of pref.prf that I edited was the very end and I believe I've reverted it to the way it is meant to be.

                  keys-gcu.prf
                  =-=-=-=-=-=-=-=-=-=-=-=-=

                  # Some hacky keymaps to allow shift-running with arrow keys in curses - now with numlock running

                  keymap-act:.[Up]
                  keymap-input:0:\xf6

                  keymap-act:.[Down]
                  keymap-input:0:\xf7

                  keymap-act:.[Right]
                  keymap-input:0:\xb5

                  keymap-act:.[Left]
                  keymap-input:0:\xbe

                  keymap-act:.1
                  keymap-input:0:\xc5

                  keymap-act:.7
                  keymap-input:0:\xc0

                  keymap-act:.3
                  keymap-input:0:\xf5

                  keymap-act:.9
                  keymap-input:0:\xf4

                  keymap-act:.1
                  keymap-input:0:\xdf

                  keymap-act:.7
                  keymap-input:0:\xc1

                  keymap-act:.6
                  keymap-input:0:[Right]

                  keymap-act:.4
                  keymap-input:0:[Left]

                  keymap-act:.2
                  keymap-input:0:[Down]

                  keymap-act:.8
                  keymap-input:0:[Up]

                  =-=-=-=-=-=-=-=-=-=-=-=-=

                  Grotug.prf
                  =-=-=-=-=-=-=-=-=-=-=-=-=

                  #=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=# begin Dump keymaps
                  # *Warning!* The lines below are an automatic dump.
                  # Don't edit them; changes will be deleted and replaced automatically.

                  keymap-act:v[Right]0'
                  keymap-input:0:/

                  keymap-act:.2
                  keymap-input:0:\xf7

                  keymap-act:.8
                  keymap-input:0:\xf6

                  keymap-act:.6
                  keymap-input:0:\xb5

                  keymap-act:.4
                  keymap-input:0:\xbe

                  keymap-act:;4
                  keymap-input:0:[Left]

                  keymap-act:;6
                  keymap-input:0:[Right]

                  keymap-act:;8
                  keymap-input:0:[Up]

                  keymap-act:;2
                  keymap-input:0:[Down]

                  keymap-act:^P
                  keymap-input:0

                  # keymap-act:^P
                  # keymap-input:0:\[

                  keymap-act:w11
                  keymap-input:0:1


                  # *Warning!* The lines above are an automatic dump.
                  # Don't edit them; changes will be deleted and replaced automatically.
                  #=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=# end Dump keymaps

                  =-=-=-=-=-=-=-=-=-=-=-=-=

                  # File: pref.prf
                  =-=-=-=-=-=-=-=-=-=-=-=-=

                  [snip]

                  ##### System Specific Subfiles #####

                  ?:[EQU $SYS gcu]
                  %:keys-gcu.prf

                  ?:1

                  =-=-=-=-=-=-=-=-=-=-=-=-=-=
                  Last edited by Grotug; March 27, 2020, 00:51.
                  Beginner's Guide to Angband 4.2.3 Part 1: https://www.youtube.com/watch?v=m9c9e2wMngM

                  Detailed account of my Ironman win here.

                  "My guess is that Grip and Fang have many more kills than Gothmog and Lungorthin." --Fizzix

                  Comment

                  • moosferatu
                    Apprentice
                    • Feb 2020
                    • 99

                    #24
                    I meant your Grotug.prf file. That's weird it didn't work for you. I was just creating the mapping within Angband and then dumping it here for you. You could try creating the mapping manually in Angband on your side.

                    The actions you need to map are:

                    Alter left: +4
                    Alter right: +6
                    Alter up: +8
                    Alter down: +2

                    Comment

                    • Grotug
                      Veteran
                      • Nov 2013
                      • 1631

                      #25
                      Ahh.. I see why it wasn't working. Needs to be <CTRL> not <ALT>

                      Yay! @ spins around!
                      Beginner's Guide to Angband 4.2.3 Part 1: https://www.youtube.com/watch?v=m9c9e2wMngM

                      Detailed account of my Ironman win here.

                      "My guess is that Grip and Fang have many more kills than Gothmog and Lungorthin." --Fizzix

                      Comment

                      • Grotug
                        Veteran
                        • Nov 2013
                        • 1631

                        #26
                        Oh man, this is really weird.

                        There seems to be a conflict with CTRL DOWN and RUN RIGHT.

                        So I removed all the run/spin keys.

                        Then I mapped SHIFT (run) down, left, right, up by creating keys SHIFT <arrow direction> and putting .2, .4, .6, .8 for down, left, right, up

                        So then run works as it should.

                        But when I do the 'spin' keys CTRL <arrow direction> @ spins as he should except now when I try to run to the right, @ spins!

                        I've figured out that it's the CTRL DOWN (+2) that causes the run to the right to no longer work. So there is some kind of conflict between CTRL DOWN and SHIFT RIGHT. Very strange.
                        Beginner's Guide to Angband 4.2.3 Part 1: https://www.youtube.com/watch?v=m9c9e2wMngM

                        Detailed account of my Ironman win here.

                        "My guess is that Grip and Fang have many more kills than Gothmog and Lungorthin." --Fizzix

                        Comment

                        • moosferatu
                          Apprentice
                          • Feb 2020
                          • 99

                          #27
                          Yes, that's what I was trying to say earlier, though I accidentally transposed right and left.

                          You should be able to get the mappings to work if you map the alter actions to <ctrl>+<shift>+<direction> rather than just <ctrl>+<direction>. At least, I was able to get them to work on linux. I didn't try in cygwin.

                          Comment

                          • Grotug
                            Veteran
                            • Nov 2013
                            • 1631

                            #28
                            Do you use 'alter'as a general term for the 'run' or 'spin' actions?

                            I don't understand how I'm supposed to map CTRL and SHIFT together when they each have separate functions for use with arrow keys. Sorry :-/

                            IF I map CTRL with +n and SHIFT with .n how am I supposed to map CTRL+SHIFT?
                            Beginner's Guide to Angband 4.2.3 Part 1: https://www.youtube.com/watch?v=m9c9e2wMngM

                            Detailed account of my Ironman win here.

                            "My guess is that Grip and Fang have many more kills than Gothmog and Lungorthin." --Fizzix

                            Comment

                            • moosferatu
                              Apprentice
                              • Feb 2020
                              • 99

                              #29
                              "Alter" is just generic name Angband calls doing an action on a space next to you. If you search the help file in game, that is what it calls it. It's the action that you're used to being mapped to <ctrl>+<direction> in the windows version.

                              What I was trying to say earlier is that it doesn't appear to be possible to both map the run commands to <shift>+<direction> and the alter commands to <ctrl>+<direction> because of the key code overlap in the ncurses port. As a work around, I'm suggesting that you map the alter commands to <ctrl>+<shift>+<direction> instead.

                              Comment

                              • Grotug
                                Veteran
                                • Nov 2013
                                • 1631

                                #30
                                Okay, I understand now. Thank you. That does work.
                                Beginner's Guide to Angband 4.2.3 Part 1: https://www.youtube.com/watch?v=m9c9e2wMngM

                                Detailed account of my Ironman win here.

                                "My guess is that Grip and Fang have many more kills than Gothmog and Lungorthin." --Fizzix

                                Comment

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