Stupid idea #355: inscribing macros

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Therem Harth
    Knight
    • Jan 2008
    • 926

    Stupid idea #355: inscribing macros

    Normally I might have a spellbook inscribed:

    !d!v!k!s@m1

    and then a macro

    \e\e\ema1a*

    Or somesuch. (The above is a typical Manathrust macro in ToME 2.)

    This is custom settings in two places. It'd be nice to have everything in one place.

    My suggestion: add an inscription specification for macros. For instance

    [F1:m_a*]

    Code:
    [ => start a new macro
    
    F1 => first function key
    
    : => start the command sequence
    
    m_a* => press m, (this item's slot), a, *
    
    ] => end the macro
    Or likewise

    [C-x:m_d]

    Code:
    C-x => Ctrl-x
    
    m_d => press m, (this item's slot), d
    ... Does this sound reasonable, or is it cramming in too much stuff?
  • Nick
    Vanilla maintainer
    • Apr 2007
    • 9647

    #2
    It's an interesting idea. I'm not the world's greatest expert on macros, I'd appreciate some more informed opinions.
    One for the Dark Lord on his dark throne
    In the Land of Mordor where the Shadows lie.

    Comment

    • Derakon
      Prophet
      • Dec 2009
      • 9022

      #3
      I find it a bit inelegant that every time you input a key, the game would have to scan all of your items to see if they have relevant keymaps assigned to them. That's my biggest complaint.

      I'd prefer a system where you could create keymaps that are explicitly attached to a specific object type, rather than to the object that has a specific "magic" inscription on it. So e.g. I want to be able to say "cast the first spell from the book Magic for Beginners", not "cast the first spell from the book inscribed with @m1".

      Maybe what we need is to add an option when examining items in the inventory: "create keymap using this item type". You'd input a keymap as you currently do, except that in place of the item prompt you input _ (or some other special character). Then the game uses the selected item automatically, or fails the keymap if it's not in your inventory/equipment/quiver.

      Comment

      • Diego Gonzalez
        Adept
        • May 2007
        • 170

        #4
        Jeff is doing something like this in the new NPP, under the hotkeys menu

        Comment

        • Pete Mack
          Prophet
          • Apr 2007
          • 6883

          #5
          V doesn't have macros anymore, onl keymaps/hotkeys. Macros are different: They are how terminal escape sequences for function keys used to be converted into a single keyboard equivalent. (this is done some other way now, I think.) In fact, what you are trying to do WOULD work if you used real macros. But they were removed from V some time ago. (It was fairly hairy code, so it was a pain for new maintaners to take over.)
          Note:
          One trouble with user defined macros is the substitution happens in all input streams, not just at command entry. So they could lead to bizarre side effects in unexpected parts of the game.

          Comment

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