Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old May 16, 2020, 23:49   #1
Sky
Veteran
 
Join Date: Oct 2016
Location: London-ish
Age: 47
Posts: 1,592
Sky is on a distinguished road
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 is offline   Reply With Quote
Old May 17, 2020, 08:25   #2
Sky
Veteran
 
Join Date: Oct 2016
Location: London-ish
Age: 47
Posts: 1,592
Sky is on a distinguished road
hmm.. many views, few replies.
__________________
"i can take this dracolich"
Sky is offline   Reply With Quote
Old May 17, 2020, 12:38   #3
Sideways
Knight
 
Join Date: Nov 2008
Posts: 557
Sideways is on a distinguished road
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.
Sideways is offline   Reply With Quote
Old May 17, 2020, 14:54   #4
Sky
Veteran
 
Join Date: Oct 2016
Location: London-ish
Age: 47
Posts: 1,592
Sky is on a distinguished road
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"
Sky is offline   Reply With Quote
Old May 17, 2020, 15:55   #5
fph
Knight
 
Join Date: Apr 2009
Location: Pisa / DL0
Posts: 893
fph is on a distinguished road
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.
fph is offline   Reply With Quote
Old May 17, 2020, 16:06   #6
wobbly
Veteran
 
Join Date: May 2012
Location: Adelaide, Australia
Posts: 2,317
wobbly is on a distinguished road
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.
wobbly is offline   Reply With Quote
Old May 17, 2020, 16:28   #7
Sideways
Knight
 
Join Date: Nov 2008
Posts: 557
Sideways is on a distinguished road
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.
Sideways is offline   Reply With Quote
Old May 17, 2020, 18:02   #8
Sky
Veteran
 
Join Date: Oct 2016
Location: London-ish
Age: 47
Posts: 1,592
Sky is on a distinguished road
Quote:
Originally Posted by wobbly View Post
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"
Sky is offline   Reply With Quote
Old June 11, 2020, 16:43   #9
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 5,736
Donated: $40
Pete Mack is on a distinguished road
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.
Pete Mack is online now   Reply With Quote
Reply


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

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 Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Aggravating actions? Chud Vanilla 4 May 4, 2011 06:53
Multiple pvals PowerWyrm Vanilla 27 April 21, 2011 20:01
multiple blows Skeeblix Vanilla 5 February 22, 2011 19:12
Multiple shots FUD Vanilla 11 September 16, 2009 21:49
weapons: multiple blows versus multiple slays vorondil Vanilla 24 December 24, 2008 19:13


All times are GMT +1. The time now is 18:56.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.