Angband Forums keybind multiple actions?
 Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 May 16, 2020, 23:49 #1 Sky Veteran   Join Date: Oct 2016 Location: London-ish Age: 47 Posts: 1,596 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"
 May 17, 2020, 08:25 #2 Sky Veteran   Join Date: Oct 2016 Location: London-ish Age: 47 Posts: 1,596 hmm.. many views, few replies. __________________ "i can take this dracolich"
 May 17, 2020, 12:38 #3 Sideways Knight   Join Date: Nov 2008 Posts: 560 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.
 May 17, 2020, 14:54 #4 Sky Veteran   Join Date: Oct 2016 Location: London-ish Age: 47 Posts: 1,596 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"
 May 17, 2020, 15:55 #5 fph Knight   Join Date: Apr 2009 Location: Pisa / DL0 Posts: 894 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. -- You read a scroll labeled 'lol gtfo' of Teleport Level.
 May 17, 2020, 16:06 #6 wobbly Veteran   Join Date: May 2012 Location: Adelaide, Australia Posts: 2,318 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.
 May 17, 2020, 16:28 #7 Sideways Knight   Join Date: Nov 2008 Posts: 560 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.) __________________ The Complainer worries about the lack of activity here these days. Last edited by Sideways; May 17, 2020 at 16:36.
May 17, 2020, 18:02   #8
Sky
Veteran

Join Date: Oct 2016
Location: London-ish
Age: 47
Posts: 1,596
Quote:
 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"

 June 11, 2020, 16:43 #9 Pete Mack Prophet   Join Date: Apr 2007 Location: Seattle, WA Posts: 5,736 Donated: \$40 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.

 Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Angband     AAR     Vanilla     Development     ToME     Sil     Variants     Competition The real world     Idle chatter     Oook! Obsolete     v4

 Similar Threads Thread Thread Starter Forum Replies Last Post Chud Vanilla 4 May 4, 2011 06:53 PowerWyrm Vanilla 27 April 21, 2011 20:01 Skeeblix Vanilla 5 February 22, 2011 19:12 FUD Vanilla 11 September 16, 2009 21:49 vorondil Vanilla 24 December 24, 2008 19:13

All times are GMT +1. The time now is 08:04.