Macros perhaps shouldn't always work


Although the central place for design discussion is ##crawl-dev on freenode, some may find it helpful to discuss requests and suggestions here first.

Blades Runner

Posts: 616

Joined: Thursday, 25th October 2012, 03:19

Post Monday, 6th June 2022, 23:47

Macros perhaps shouldn't always work

I returned to playing recently after a break, mostly working (it happens) and binging a bit in Cataclysm (very fun) only to find myself confused for a time about setting skills. You see, my problem began with the horrible problem of wanting a good new OLED laptop with a numpad and a larger than average screen... for playing Crawl (lol). I finally settled on a laptop after much agonizing and trying my best to avoid Intel chips with Nvidia (for linux). Okay enough ado - the numpad and arrow keys still bother me, it's ridiculous. I've had to retrain my reflexes some for the newer inferior numpad. I wound up binding the enter key to "." for resting a turn and numpad "5" for rest to full and numpad "0" for autoexplore (not physically where I wanted it).

Enough entertainment already!

Anyways, what happened was I didn't realize I still had a key binding after I thought I cleared everything, and every time I'd go into the skill training window and set a target skill number, if I sent "3", it would turn to a red invalid "3." or if I set "3.0" it would just become "3.0." after I hit enter (mind you not on the numpad). I guess maybe I could try to have it differentiate the numpad enter key from the normal one, but the issue I'm trying to present is that perhaps the macros shouldn't kick in for every situation, like, entering values for skill training targets. I solved it finally by a renewed effort to make sure my set of macros were truly all deleted, but that now limits me from using one of the more usefully positioned keys on the numpad.

To be clear, I'm not upset with Crawl -- I blame the laptop creators and their stupid redesigns of keyboards that almost never make sense. How about them crappy half height up/down arrow keys? Before this devolves into a complete rage against the machine posting, I want to say perhaps Crawl could overcome this problem by not applying certain macro definitions in some situations like the one I described above. Aside from that input box for the skill training value, I don't think I had a problem with anything else using the (sad) almost as good key remappings.

In closing, I just want to say one more time -- you FOOLS who design most laptop keyboards. Oh yeah then there is the stupid centering of the touch pad regardless of if there is a numpad or not. I know there are some modular laptops that are a little better about letting you plug different modular components in, but seriously with all the options you can get in a laptop and then that get outdated, I wish there was a good OLED + keyboard lapdock that was bigger than tiny. Sorry!!! *end rant*

Dungeon Master

Posts: 388

Joined: Monday, 18th August 2014, 20:04

Post Wednesday, 8th June 2022, 13:53

Re: Macros perhaps shouldn't always work

The problem here most likely is that you aren't actually using macros, but rather keymaps, which apply unconditionally (within their context). Macros apply only at the main dungeon interface. (That is to say, macros already don't always work.) https://github.com/crawl/crawl/blob/master/crawl-ref/docs/macros_guide.txt:

For the most part, people will probably want command macros. They allow
for things like making a key run a sequence of commands (e.g.
associating a key stroke to the casting of a certain spell) without
having to worry about messing up what that key does at prompts (e.g.
you can macro a number or letter without worrying about it making the
substitution when you're trying to drop an item).

Keymaps are for when you want to fix layout and behavioural problems on
your keyboard (i.e. unrecognised numpad sequences can by mapped into
their numbers, foreign keyboard layouts can be modified to be more
comfortable). There are also special sets of keymaps for the level map,
the targeting mode and confirmation prompts, which allow for mappings
that are restricted to just those situations.


There's also some discussion that may be useful in the in-game help for the macro binding menu.

It is a long-standing issue that the skill menu uses the regular keymap context, and changing this to the menu context would sort of accomplish what you are suggesting for typical number binding keymaps, but this is harder to change than it might seem, for technical reasons.

Blades Runner

Posts: 616

Joined: Thursday, 25th October 2012, 03:19

Post Wednesday, 8th June 2022, 21:02

Re: Macros perhaps shouldn't always work

advil wrote:The problem here most likely is that you aren't actually using macros, but rather keymaps, which apply unconditionally (within their context). Macros apply only at the main dungeon interface. (That is to say, macros already don't always work.) https://github.com/crawl/crawl/blob/master/crawl-ref/docs/macros_guide.txt:

For the most part, people will probably want command macros. They allow
for things like making a key run a sequence of commands (e.g.
associating a key stroke to the casting of a certain spell) without
having to worry about messing up what that key does at prompts (e.g.
you can macro a number or letter without worrying about it making the
substitution when you're trying to drop an item).

Keymaps are for when you want to fix layout and behavioural problems on
your keyboard (i.e. unrecognised numpad sequences can by mapped into
their numbers, foreign keyboard layouts can be modified to be more
comfortable). There are also special sets of keymaps for the level map,
the targeting mode and confirmation prompts, which allow for mappings
that are restricted to just those situations.


There's also some discussion that may be useful in the in-game help for the macro binding menu.

It is a long-standing issue that the skill menu uses the regular keymap context, and changing this to the menu context would sort of accomplish what you are suggesting for typical number binding keymaps, but this is harder to change than it might seem, for technical reasons.


Advil,

Thanks for the response. I'll try ensuring all the entries are in fact command macros and not keymaps.

Return to Game Design Discussion

Who is online

Users browsing this forum: No registered users and 25 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.