Quick macro question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Zikke
    Veteran
    • Jun 2008
    • 1028

    Quick macro question

    Is there a way to bind one key to either use a ?ID or _ID whichever is in my inventory?

    I have my ?ID autoinscribe with '@r0' and my _ID autoinscribe with '@u0' but I keep having to switch my actual macro to either z0 or u0. Is there any way to make it just use both or whichever is present?

    Like "r0, if that fails then u0"?
    A(3.1.0b) CWS "Fyren_V" NEW L:50 DL:127 A++ R+++ Sp+ w:The Great Axe of Eonwe
    A/FA W H- D c-- !f PV+++ s? d P++ M+
    C- S+ I- !So B ac++ GHB? SQ? !RQ V F:
  • Derakon
    Prophet
    • Dec 2009
    • 8820

    #2
    I don't have the game in front of me to check, but if Vanilla has a "unified use" command (that does appropriate actions for the item chosen, e.g. quaffing potions, reading scrolls, aiming wands, etc.), then you should be able to inscribe both items with the same inscription and, since staves come later in the inventory than scrolls, it'll only use the staff if you're out of scrolls. Of course, this isn't generally what you want. To my knowledge there's no way to attempt to use a staff, and default to scrolls only if the staff is out of charges.

    Comment

    • Magnate
      Angband Devteam member
      • May 2007
      • 4916

      #3
      Originally posted by Derakon
      I don't have the game in front of me to check, but if Vanilla has a "unified use" command (that does appropriate actions for the item chosen, e.g. quaffing potions, reading scrolls, aiming wands, etc.), then you should be able to inscribe both items with the same inscription and, since staves come later in the inventory than scrolls, it'll only use the staff if you're out of scrolls. Of course, this isn't generally what you want. To my knowledge there's no way to attempt to use a staff, and default to scrolls only if the staff is out of charges.
      And we don't yet have a unified use command - that's coming any year now ... (http://trac.rephial.org/ticket/51)
      "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

      Comment

      • Zababa
        Apprentice
        • Sep 2009
        • 99

        #4
        I want to use this thread to ask whether three is a command which would repeat the last action. Occasionally, I want to shoot three or four missiles but don't want to care to create macros. I am learning to dive and my characters die too quickly, so it bothers me to set similar macros for every new character over and over again. But maybe there is a key I could press after I once type "f1'" (shoot the first missile at the nearest target) which would repeat that.

        Comment

        • Magnate
          Angband Devteam member
          • May 2007
          • 4916

          #5
          Originally posted by Zababa
          I want to use this thread to ask whether three is a command which would repeat the last action. Occasionally, I want to shoot three or four missiles but don't want to care to create macros. I am learning to dive and my characters die too quickly, so it bothers me to set similar macros for every new character over and over again. But maybe there is a key I could press after I once type "f1'" (shoot the first missile at the nearest target) which would repeat that.
          There is a "repeat last command" action but I never use it - I think it's 'n' - and I also think it's buggy (http://trac.rephial.org/ticket/966).

          You can, however, save your macros and reload them for each new char, without having to redefine them all. This needs a lot more improvement, but at the moment the files user.prf and <charname>.prf are automatically loaded when you start. So if you save your generic macros to user.prf they'll always be available. If you don't mind keeping your chars with the same name, you can use the charname pref file as well or instead. Or you can save your own pref file and load it manually.
          "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
            • 3964

            #6
            Originally posted by Magnate
            You can, however, save your macros and reload them for each new char, without having to redefine them all. This needs a lot more improvement, but at the moment the files user.prf and <charname>.prf are automatically loaded when you start.
            Also matching <class>.prf is loaded automatically. I have separate files for all classes, so that mage gets mage macros and priest gets priest macros and so on.

            Makes gaming a lot easier.

            If you know the syntax you can edit macro files with text editor directly, add comments etc.

            Comment

            • Magnate
              Angband Devteam member
              • May 2007
              • 4916

              #7
              Originally posted by Timo Pietilä
              Also matching <class>.prf is loaded automatically. I have separate files for all classes, so that mage gets mage macros and priest gets priest macros and so on.
              I have spent years trying to set this up and have never, ever got it to work.
              "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
                • 3964

                #8
                Originally posted by Magnate
                I have spent years trying to set this up and have never, ever got it to work.
                That's weird. I have used those several years and it has always worked. You need to put them in /lib/user -directory. It used to be /lib/pref. (it might work from /pref too, but I know it works from /user. That's where game dumps your macro/keymap-files)

                Just create new char for each class, define macros and dump them to <class>.prf, and you have a basic file set.

                Comment

                • Zababa
                  Apprentice
                  • Sep 2009
                  • 99

                  #9
                  Thanks for the information. the 'n' key looks fine, I'll watch out for some potential bugs.

                  I was used to suffix a generation number after the Name of my character like (Nimral_IV), which was why I had to meddle with macro and setting files over and over again. Now I tried what you say about leaving one name for every race/class combination I play, and reuse that dead character over and over again. It is a more convenient method, macros and settings are loaded automatically. In this case, however, I might spend some time on defining macros again.

                  BTW: Is it possible to change the class of a character which is based on a dead one? E.g. I load my dead hobit rogue for his son to use his father's monster knowledge but I want him to be a ranger or any of the other classes.

                  Comment

                  • Magnate
                    Angband Devteam member
                    • May 2007
                    • 4916

                    #10
                    Originally posted by Zababa
                    Thanks for the information. the 'n' key looks fine, I'll watch out for some potential bugs.

                    I was used to suffix a generation number after the Name of my character like (Nimral_IV), which was why I had to meddle with macro and setting files over and over again. Now I tried what you say about leaving one name for every race/class combination I play, and reuse that dead character over and over again. It is a more convenient method, macros and settings are loaded automatically. In this case, however, I might spend some time on defining macros again.

                    BTW: Is it possible to change the class of a character which is based on a dead one? E.g. I load my dead hobit rogue for his son to use his father's monster knowledge but I want him to be a ranger or any of the other classes.
                    Yes it is. The game automatically offers you a character based on the previous one, but you can escape out of that and choose a different race and/or class.

                    When we added the name suffixes we didn't change the macro handling - when I get round to this, it will automatically load FooBar.prf for every character called FooBar X where X is any roman numeral. (See http://trac.rephial.org/ticket/671.)
                    "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

                    Comment

                    • Zababa
                      Apprentice
                      • Sep 2009
                      • 99

                      #11
                      Originally posted by Magnate
                      when I get round to this, it will automatically load FooBar.prf for every character called FooBar X where X is any roman numeral. (See http://trac.rephial.org/ticket/671.)
                      This sounds very promising. I am really looking forward to 3.1.3 Then I can write the generation numbers again.

                      Comment

                      • Timo Pietilä
                        Prophet
                        • Apr 2007
                        • 3964

                        #12
                        Originally posted by Zababa
                        Now I tried what you say about leaving one name for every race/class combination I play, and reuse that dead character over and over again.
                        I mean that you should have warrior.prf, rogue.prf, ranger.prf, paladin.prf and priest.prf with macros that are appropriate for that class. Those are then loaded when you start your char based on which class it is no matter which name it has.

                        You can then have whatever savefile, character name, class, race etc. you choose and always have right set of macros. Much, much easier that way.

                        Comment

                        • buzzkill
                          Prophet
                          • May 2008
                          • 2783

                          #13
                          Originally posted by Zababa
                          Thanks for the information. the 'n' key looks fine, I'll watch out for some potential bugs.
                          I use 'n' constantly. I assumed everyone did. Although it's functionality could be improved in a few situations, I've never seen it do anything that I would describe as 'buggy'.
                          www.mediafire.com/buzzkill - Get your 32x32 tiles here. UT32 now compatible Ironband and Quickband 9/6/2012.
                          My banding life on Buzzkill's ladder.

                          Comment

                          • Jungle_Boy
                            Swordsman
                            • Nov 2008
                            • 428

                            #14
                            I also use 'n' all the time and I've never had any problems. What I did to create my macro files was just play a class then usually whenever i made a macro I would save it to both the name.prf file and class.prf this way I eventually created macro files for each class with the basic macros if it was a macro specific to the character I left it off the class file.
                            My first winner: http://angband.oook.cz/ladder-show.php?id=10138

                            Comment

                            • Derakon
                              Prophet
                              • Dec 2009
                              • 8820

                              #15
                              Originally posted by buzzkill
                              I use 'n' constantly. I assumed everyone did. Although it's functionality could be improved in a few situations, I've never seen it do anything that I would describe as 'buggy'.
                              Likewise. It's very handy, particularly for re-firing ammo or spells at a not-yet-dead enemy. The only thing I'd describe as a "bug" with it is that I can't use it to repeatedly enchant the same piece of gear.

                              Comment

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