Some questions about macros and keymaps

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • danvari
    Rookie
    • Feb 2008
    • 7

    Some questions about macros and keymaps

    hey!

    i played tome for a while and used it great macro recorder to record some keybindings. now i am playing angband and do not know what to do ^^. i read the documentation, but i do not understand everything, i am learning quite well from examples, so here is what i want:

    i want to bind F1 to Magic Thrust at an enemy. what i did: i created a new macro (using "@") with the trigger F1 and typed in: maa*t
    ok that is working, but what happens if the order of my books changes? so i have to type mba*t for example? i read that i need to inscribe my stuff...ok with the "{" - key...

    a) but how can i tell angband to use my inscriptions?
    b) what is the difference between macros and keymaps? which should i use?
    c) i read that many people are using an "\e\e..." before the macro..why? in the documentation it is said that this is the escape key, but what does it do?

    i hope you can help me .
  • Skelwing
    Rookie
    • Jun 2008
    • 14

    #2
    a) but how can i tell angband to use my inscriptions?
    Angband will pay attention to inscriptions including certain characters; the one you're looking for is @. If you (for example) inscribe a spellbook with {@1}, then that spellbook will be selected when you press 1 or the book's inventory letter at a command prompt. If you want the book to only respond to 1 when casting spells, then you want to inscribe it with {@m1}.

    This works in macros too; with this inscription, you can change the macro to: m1a*t and it will work even if the inventory order changes.

    b) what is the difference between macros and keymaps? which should i use?
    Macros will not take effect while other keymaps/macros are being processed, and keymaps will. In general, use macros for making "shortcuts", and keymaps for changing the underlying action of a key.

    c) i read that many people are using an "\e\e..." before the macro..why? in the documentation it is said that this is the escape key, but what does it do?
    The escape key will advance -more- messages, as well as cancel out other prompts you may have open. This is important because if you don't have the escape keys and try to use the macro, Angband will interpret the beginning of the macro for something other than what was intended, and completely screw up the macro.

    Comment

    • danvari
      Rookie
      • Feb 2008
      • 7

      #3
      ahhh yes thank you, you helped me much

      ok, one last question: how do i know that a "@" refers to spellbooks? ok i know it now, but does it stand somewhere in the docs where i can find it?

      Comment

      • Psi
        Knight
        • Apr 2007
        • 870

        #4
        Originally posted by danvari
        ahhh yes thank you, you helped me much

        ok, one last question: how do i know that a "@" refers to spellbooks? ok i know it now, but does it stand somewhere in the docs where i can find it?
        It doesn't. The command follows the @. ie @m1 means this will be the item referenced when m1 is entered. Similarly inscribing @b1 will mean b1 browses this item, @w3 means w3 will wield this item etc.

        I usually inscribe my spell books !d!k!v@m1@b1, !d!k!v@m2@b2 etc

        Which means confirm on dropping, destroying and throwing and treat this as book x for casting and browsing.

        Comment

        • Zikke
          Veteran
          • Jun 2008
          • 1069

          #5
          Wow that's pretty advanced stuff. And here I thought I was hot sh*t for setting 4 damage spells and 3 detect spells to my F1-7 keys...
          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:

          Comment

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