PDA

View Full Version : more auto-repeats


PowerDiver
February 10, 2010, 02:01
Excuse me if I come across confused here. Part of the point is to figure out what the point is.

With the recent changes in V, I am failing more when activating a rod of identify. I'm not complaining about that. I think the activation changes are probably a big improvement.

The problem is that my fingers type z1-a and when the rod fails, I should not have typed -a. Sometimes I try to wait after z1, but that's annoying too. Macros get screwed up as well. [Speaking of which, for macros, there ought to be some sort of flush on failure. I wonder how much code would have to be rewritten to accomplish that.]

One solution, in my example case, is for some way to specify to autorepeat zapping a rod until successful, unless disturbed. Perhaps via inscription, perhaps via command, perhaps via UI option, or some combination thereof.

Another question is whether when used on a stack of all charging rods, should it make the player rest first until one recharges? How do you specify always, sometimes, or never for this?

It would also be nice to generalize to casting spells such as m3f. But then you need another disturb before running out of mana, and maybe at half mana or something else for people who want to reserve mana for a possible emergency teleport other or whatever.


So, short of having macros that execute scripts with flow control, what is the best solution? Can it be generalized to all of items with charges, items that recharge, and spells cast from books?

Derakon
February 10, 2010, 02:19
Why are you using macros? Keymaps are much safer. I don't think I've seen a situation yet in which macros were desirable over keymaps. Their only advantage, if you can call it that, is that they can be invoked anytime the game is waiting for input instead of just when they're waiting for your next action.

I've had plenty of characters with the keymap "z2-a" to try to identify the item they're standing on (z1 is trap detection, of course), with no problems if the zap fails. Something like "099z2-a" should try to zap the rod 99 times, though I don't know if that will actually get the behavior you want.

PowerDiver
February 10, 2010, 02:33
Why are you using macros?

I've had plenty of characters with the keymap "z2-a" to try to identify the item they're standing on (z1 is trap detection, of course), with no problems if the zap fails.

As to the first, just an old bad habit. I just never made the switch to keymaps.

The second may solve the specific case at this particular time if you don't mind a beep, but I am trying to get at a larger issue by describing the specific case. I'm more interested in figuring out the right general approach than how best to muck with the current system. I warned you the post was confused. :)

Pete Mack
February 10, 2010, 03:54
keymaps are what you want. They stop in the middle on failure.
Unfortunately, they don't work with F-keys. (If your keyboard supports Latin-1, I suppose you can map the F-keys to latin-1 as macros, and the latin-1 to the appropriate command as keymaps. In fact, this should be a feature--allow hexadecimal keymaps and macros.)

PowerDiver
February 10, 2010, 04:03
keymaps are what you want. They stop in the middle on failure. )

That's not a full solution. I want the autorepeat on failure, or at least I can imagine situations where I might want it.