\e in macros

General discussion about the game. Pull up a stool and tell us your tale!
Post Reply

How do you feel about escape sequences in macros?

\eq1 then \er1 should only execute 'r1'
1
100%
\eq1 then \er1 should execute both commands
0
No votes
other (explain in post)
0
No votes
 
Total votes: 1

User avatar
Flambard
King Vampire
Posts: 258
Joined: Wed 20.06.2007, 10:49

\e in macros

Post by Flambard » Wed 20.03.2019, 12:27

Did you know, that pressing ESC clears the command queue?

Are you aware, that \e in macros also clears the command queue?

Do you write your macros always starting with \e?

I will post complete explanation/reasoning behind this questions a bit later, but I really need to hear your opinions and usage cases!

serina
Crystal Ooze
Posts: 373
Joined: Sat 15.09.2007, 18:42

Re: \e in macros

Post by serina » Wed 20.03.2019, 18:47

Hiya

If only 1 macro is executed, it works like it is now, right?

If you execute both macros, what happens if you click the macro-button faster than your character can execute them? - ie. If a mage with speed +20 wants to magic missile as quickly as possible, but then all of the sudden needs a different spell or potion, would the character then finish off all the magic missiles and then maybe die to lacking healing? Because that would be bad.
Ie. \e*tm1a*t or however that macro is. If you press that repeatedly faster than character speed. If your character then has to execute all of those commands before being able to do something else, it would be bad.

I can't see where a suggested change would be useful other than if you're having lag and want to do a macro that casts a spell x number of times and then quaffs a pot etc. I dunno.

I feel like the only macroing I'm missing is the ability to recharge a specific wand or staff with only 1 click. So either read scroll or cast spell and apply it to a specific wand/staff. This is especially required now wands stack and the propability to fail recharge doesn't depend on the number of wands/staves in the stack, as far as I can tell. Having 4-5 Stone to mud wands with only 4-5 total charges on without having to drop them individually and recharging them would be nice, but as a minimum, being able to recharge them with 1 button would be sort of a fix. Not sure it's a good fix though.

I didn't mean to de-rail the post, but just hoping to get a better understanding of the change before I vote.

Zal

User avatar
Flambard
King Vampire
Posts: 258
Joined: Wed 20.06.2007, 10:49

Re: \e in macros

Post by Flambard » Thu 21.03.2019, 07:24

Hi, thank you very much for that detailed post!

First off, there's no change in how macros work in 1.5.0, this is more about potential changes.

Secondly, yes, I should've mentioned that this whole question only makes sense if "you trigger macros faster than character speed", like you said. That can happen for Slow character, in cases of extreme lag, but also when bullet time is active.

I'm just trying to collect stats about how people think macros work, and if people are aware of this queue-clearing behavior.

It appears, that you ARE completely aware, and DO in fact use the system to it's full potential (not surprising, considering you wrote our macro guide :)

I guess maybe I was the only one not understanding the full ramifications before :) Oh, well, I can't play the darn game properly :P
I can't see where a suggested change would be useful other than if you're having lag and want to do a macro that casts a spell x number of times and then quaffs a pot etc. I dunno.
Yes, that's what I was going to suggest, and yes, thank you for the vote. So I guess it's a bad idea.

The reasoning behind this was "I wanna read phase door AND quaff a csw, I don't want second macro to cancel the first one", but given your answer, I see how this makes little sense (e.g., like you said, 9000 magic missiles queued will definitely not work for my benefit here).

RE: recharging macro, that's an interesting use case, I'll add a separate ticket to our bug tracker with this idea.

PowerWyrm
Balrog
Posts: 1574
Joined: Sun 27.11.2005, 15:57

Re: \e in macros

Post by PowerWyrm » Fri 29.03.2019, 17:17

I like what I did with PWMangband: the macro system always adds [Escape] at the beginning of a macro to clear the queue then doesn't care about the others. For spellcasters/archers, a new "fire till kill" mode allows to repeat casting/shooting 99 times without having to care about the rest, everything is handled by the "disturb" method.

Ace
Crystal Ooze
Posts: 368
Joined: Fri 15.02.2008, 12:50

Re: \e in macros

Post by Ace » Thu 18.04.2019, 14:38

I think /e is important in case you really want to use the scroll of teleportation (or whatever) as soon as possible. So it's good if you can clear the queue.

Post Reply