keybind multiple actions?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sky
    Veteran
    • Oct 2016
    • 2321

    keybind multiple actions?

    is there a way to bind a single key to perform multiple actions?
    For example, let's say i want to bind F1 to cast Heroism and then to cast Berserker.

    I have tried pgapgb (pga = cast hero, pgb = cast berserker), pga [enter] pgb, but neither works.
    ideally a solution that doesnt involve waiting a turn in between.
    "i can take this dracolich"
  • Sky
    Veteran
    • Oct 2016
    • 2321

    #2
    hmm.. many views, few replies.
    "i can take this dracolich"

    Comment

    • Sideways
      Knight
      • Nov 2008
      • 896

      #3
      Solutions like "pgapgb" actually do work, but only in specific situations. The problem is that many types of feedback from the game - like those from timed effects kicking in - stop all active keymaps from continuing, so if the Heroism works the keymap stops there, and if you fail to cast Heroism that also stops the keymap. I don't think there's any way around that.

      Even when you do successfully take two actions through one keypress, it will still always consume two turns - casting a spell consumes 100 energy, aka "1 turn", there is and should be no way around that.
      The Complainer worries about the lack of activity here these days.

      Comment

      • Sky
        Veteran
        • Oct 2016
        • 2321

        #4
        im not trying to do two actions in 1 turn, but, seeing as the rest function allows for time to pass, i thought that 'cast A - rest - cast B' might work, however that takes 3 turns for 2 spells - that's what i mean by 'losing a turn'.
        "i can take this dracolich"

        Comment

        • fph
          Veteran
          • Apr 2009
          • 1030

          #5
          Multi-turn keymaps used to be available in the game (they were called macros IIRC), but they have been phased out.

          I don't miss them much; keymaps seem sufficient for 99% of the purposes. Multi-turn keymaps have hard-to-define behavior if the first command fails, and forgetting that they take two turns might easily get you killed.
          --
          Dive fast, die young, leave a high-CHA corpse.

          Comment

          • wobbly
            Prophet
            • May 2012
            • 2629

            #6
            Macros are great. You get some unexpected prompt or spell failure & suddenly all the keypresses are 1 key out of sequence & you're randomly removing your armour and banishing all molds from the level.

            Comment

            • Sideways
              Knight
              • Nov 2008
              • 896

              #7
              Macros had the same problem anyway - flush() would stop them too. At least in 2.9.3, I don't see any difference between when a 2-prayer macro stops and when a 2-prayer keymap stops. Early Angband did have greater support for multi-turn mapping, but that was implemented through options that regulated when flush() would be called, and so affected macros and keymaps equally. (Macros might have been better for really weird mapping that actually temporarily changed those options... not sure.)
              Last edited by Sideways; May 17, 2020, 16:36.
              The Complainer worries about the lack of activity here these days.

              Comment

              • Sky
                Veteran
                • Oct 2016
                • 2321

                #8
                Originally posted by wobbly
                macros are great. You get some unexpected prompt or spell failure & suddenly all the keypresses are 1 key out of sequence & you're randomly removing your armour and banishing all molds from the level.
                waahahahaha
                "i can take this dracolich"

                Comment

                • Pete Mack
                  Prophet
                  • Apr 2007
                  • 6883

                  #9
                  Yes, multi-turn keymaps work, but you need to clear --more-- prompts between them as part of the command.
                  1. Inscribe your books so that you can cast by number rather than inventory position. EG: using a very old set of spells (v3.2), the following will detect doors, stairs, and traps, map the area, and reveal all monsters, using 3 turns.
                  Code:
                  a)  Magic for Beginners. {@m1}
                  b)  Incantations and Illusions {@m3}
                  ...
                  k) 5 Rods of Mapping {@z2;!!}
                  2. Make the keymap bind to the number, escaping away all messages
                  Code:
                  m1g\e\e\ez2\em3g
                  Note that if your fail rate is nonzero you may have to cast one or more of the spells again. Note further that reveal monsters spell must be last, or its results will be overridden before you see them.

                  Comment

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