macros for magic with target - doesn't work??

All your questions answered.
Post Reply
udosdottir
Clear Yeek
Posts: 18
Joined: Tue 06.03.2007, 13:48

macros for magic with target - doesn't work??

Post by udosdottir » Tue 06.03.2007, 14:14

I somehow cannot get my macros right for magic that requires a target - anybody can help me? For short: the problem is that such macros, which work just fine after i just programmed them, fail after relaod of the .prf-file. Below i repeat in detail, what i do so that this happens.

preliminary:
I'd like to play with use_old_target = false, but then the macros don't work at all, so I already switched to use_old_target = true, but if anyone can tell me, how to do the following without this option, then i'd be grateful. And another pre-question: What's the difference between normal and command macros?


The problem occurs like this:

first of all, I created identity macros on all keys that I thought might carry macros. Then I program them for example for a priest for example by:

1) press 3- new command
2) I enter "\e*tp3b"
3) press 5 - create normal macro
4) enter the key that I want to carry this new macro

The message screen tells me "you created a normal macro". Then i dump this to "priest.prf" and, because I know I want to use this set of macros for a while, I dump again to player.prf, or whatever the default file is.

During the game the macro works just fine. I exit and when I next login all my macros, including spells without explicit target, like healing or detection spells, as well as those fireing missiles work just fine, but when i want to activate the one that carries the OoD like above or any other magic that requires target gets me into the question screen "pray from what book?" or similar.
Yes, i have my book inscribed correctly. - Each time i reload the pref - file i have to rewrite all these macros. This is annoying but o.k. on the mangband.org server, because there i usually exit save in town, so that i have the time to do so. But on the IRONMAN-server, sooner or later i login and find myself in a bunch of orcs - i lost all my magic-user-character so far due to this - anyone knows what goes wrong here?

Thanks for your help in advance. Best regards,

Udosdottir

Billsey
King Vampire
Posts: 272
Joined: Sun 12.02.2006, 14:36
Location: Oregon, USA
Contact:

Re: macros for magic with target - doesn't work??

Post by Billsey » Wed 07.03.2007, 10:36

I'm not sure why you're seeing this behavior, but if you change your macro to:

\ep3b*t

it should work again.
Mangband Project Team Member

udosdottir
Clear Yeek
Posts: 18
Joined: Tue 06.03.2007, 13:48

Re: macros for magic with target - doesn't work??

Post by udosdottir » Wed 07.03.2007, 13:06

No, this doesn't work. It workes fine for missiles but not for magic. In that case i am always logged in a "what target?"-screen, no matter when i programmed the macro.

I completely don't understand this behaviour - maybe it has to do with LAG? It also happens with manual entry, i have to wait quite some time until the server catches my input. If i manually enter (not too slow) p3b*t it will not target anything. i have to enter more like
p   3     b             *  t

Or could it be related to the fact that i am using roguelike keyset?

Fink
Ancient MultiHued Dragon
Posts: 614
Joined: Tue 20.01.2004, 13:55

Re: macros for magic with target - doesn't work??

Post by Fink » Wed 07.03.2007, 13:55

Yeah magic targetting is kind of reversed from ranged weapon and wand etc targetting, for some kooky reason:

\ef1*t (ranged, wands)
\e*tm1a (magic)


Udosdottir,  you've probably already done all this, but have you tested the problem using only the default prf file (ie, not saving out to a prf file you specify, but instead just using the default one)?

This problem kind of sounds somewhat familiar - it's bringing back a vague memory of running into some problems getting the macros I want to both load and persist.

Perhaps you should open up the default prf file in a text editor, then set up a macro that you believe will fail to be written. Dump it, and see if the file you have open changes. This way, you can see if the problem is that your macros are failing to write, or instead failing to load.

Also, is it necessary to use Option 6 (create identity macro) before going through the steps to set up a macro? Myself, I don't do this (on a win client): I just Option 3 - enter the action, and Option 5 - create a normal macro. Are you doing this because you are using keys the game originally intends for something else? With this in mind, have you tested the problem using known safe keys (function keys, etc, that the game does not use)?

Billsey
King Vampire
Posts: 272
Joined: Sun 12.02.2006, 14:36
Location: Oregon, USA
Contact:

Re: macros for magic with target - doesn't work??

Post by Billsey » Wed 07.03.2007, 17:16

I'm not sure it has anything to do with this, but I remember changing all my macros from normal macros to command macros a while back. A command macro only starts getting parsed when you're at a command prompt, a normal macro can often waste it's first character or two clearing the buffer, leaving you with something like 'tp3b' instead of '*tp3b' as the actual command. The leading escape is supposed to fix that behavior, but I'm not all that sure it's really successful.

There's also an issue with the Windows client not handshaking well with the server, causing the client either to get hung when the keypresses get too far ahead or for the player to have to hit a key twice to get a command to 'take'.

Bill
Mangband Project Team Member

udosdottir
Clear Yeek
Posts: 18
Joined: Tue 06.03.2007, 13:48

Re: macros for magic with target - doesn't work??

Post by udosdottir » Sun 11.03.2007, 06:06

Thanks to both of you for your help. I didn't really find the problem and therefore chose to bypass, instead of try to solve it. I now switched to linux and it seems that the client here doesn't share this oddity.

Best regards,
Udosdottir

Post Reply