Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old November 21, 2022, 20:02   #1
iggy_hunter
Apprentice
 
Join Date: Sep 2021
Location: Sunny Jacksonville, FL ... contact me @ marc-johnston@outlook.com
Posts: 91
iggy_hunter is on a distinguished road
Macros

I've added keyboard macro support to AngbandOS http://angbandos.skarstech.com. Which brings me to this next topic ...

Keyboard macros only work when the game is ready for the original position the macro was intended for. Usually, this position is when the character is ready for game input. The macros reek havoc if a menu is display, waiting for Rest subcommand, store command, something, something. I'm not familiar with anyone wanting keyboard macros for in store actions and the like.

I'm considering enumerating all of the possible commands and creating a "menu" type assignment for macros.

Examples:
F1 => "Fire Arrow (best)"
F2 => "Fire Standard Arrow"
F8 => "Rest As Needed"
F9 => "Spell Magic Missile"
F10 => "Spell Light Room"
F11 => "Spell Trap and Door Location"
F12 => "Eat Ration of Food"

With these types of assignments, the command system only accepts the macro command during game play (not store, or other weird areas like "--more--")

Obviously, the command has to vet whether the player can actually perform that action (spell needs possession of the book etc) ... but something like this could guarantee either it works ... or nothing bad happens.

Thoughts?
iggy_hunter is offline   Reply With Quote
Old November 22, 2022, 23:01   #2
Julian
Adept
 
Join Date: Apr 2021
Posts: 122
Julian is on a distinguished road
That’s pretty much what the current keymaps do. They only work when the game is waiting for a command.

The game used to have both, but somebody decided it wasn’t worth the extra complexity, and, even as somebody who did use the full-blown macros, they were probably right.
Julian is offline   Reply With Quote
Old November 23, 2022, 01:59   #3
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 6,726
Donated: $40
Pete Mack will become famous soon enough
The reasons to use macros are
1. To do stty based terminal control (obsoleted by l
ncurses library)
2. To automate menu-based actions, like changing stance in ToME and toggle fire arrows in Sil. (I have done both.)

Vanilla Angband has no menus suitable for (2) and can safely rely entirely on keymaps. But this is not universally true.
With the removal of case 1, I suspect you can safely limit macros to when a command is expected, just like keymaps.
Pete Mack is offline   Reply With Quote
Old November 23, 2022, 03:13   #4
Estie
Veteran
 
Join Date: Apr 2008
Location: Germany
Posts: 2,177
Estie is on a distinguished road
I like to put 2 actions on the same key, like detect traps + monsters.
Estie is offline   Reply With Quote
Old November 23, 2022, 07:44   #5
fph
Veteran
 
Join Date: Apr 2009
Location: Pisa / DL0
Posts: 1,020
fph is on a distinguished road
Many modern-day games have quick-use slots that are essentially the equivalent of Angband keymaps. Usually they are tied to inventory: first you select an object (e.g., a book), then all actions available with it (e.g., cast a spell).

Angband strongly prefers verb-object, and the object-verb of interface hasn't been too successful when it has been tried in shops, but that's an option to consider, at least to take inspiration.
__________________
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 November 23, 2022, 23:32   #6
iggy_hunter
Apprentice
 
Join Date: Sep 2021
Location: Sunny Jacksonville, FL ... contact me @ marc-johnston@outlook.com
Posts: 91
iggy_hunter is on a distinguished road
fph ... Can you provide me with more detail on this setup ... I'm not fully understanding you. Maybe some examples too.
iggy_hunter is offline   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
FAAngband and macros Amnekian Variants 3 May 13, 2015 12:33
Macros are... gone??? PowerWyrm Development 1 April 1, 2011 13:53
What are your macros? Raxmei Vanilla 4 March 22, 2011 20:00
Macros help ZenDragon Vanilla 3 June 10, 2010 01:28
On macros... Wisp Vanilla 5 February 26, 2008 21:37


All times are GMT +1. The time now is 03:30.


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