Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old August 30, 2008, 13:09   #1
Skippy
Rookie
 
Join Date: Aug 2008
Posts: 2
Skippy is on a distinguished road
Problems with macros

I just came back to Angband after a little hiatus and was trying to get my macros going again.

I used to have macros on 'x' and 'y' for, say, stinking cloud and lightning bolt. I use these because they are empty commands.

My mage.prf file has the following entry:
# x -- Stinking cloud

A:\e\e*tm1i5
P:x

Now I find that these macros don't work properly anymore. Or rather, they work too well, they work everywhere including when responding to [y/n] prompts and when trying to inscribe some armour "Orfax". It is taking the final x and interpreting it. Similarly when I try to respond 'y' to any prompt it will interpret my command and do weird things.

What have I done wrong - or - is this a bug?
Skippy is offline   Reply With Quote
Old August 31, 2008, 03:39   #2
aeneas
Adept
 
Join Date: Jun 2007
Location: The place of virtuous unbelievers
Posts: 158
aeneas is on a distinguished road
Hmm- I'm sure someone who knows a bit more about how macros are implemented can weigh in more definitively, but this is behavior that I would expect, or at least not find all that surprising. I use a very small number of macros constantly, but I'm set in my ways. I figured out a system that worked for me a long time ago and haven't changed it since. I only use function keys for macros though. Assuming you have function keys you might try just using them, as it would solve your problem. Also, your example macro looks a bit funny to me- one thing is certain: two \e\e escapes are not enough. I use six. For some reason I think that using \a might do the same thing, but like I said, I'm set in my ways.
aeneas is offline   Reply With Quote
Old August 31, 2008, 04:35   #3
Skippy
Rookie
 
Join Date: Aug 2008
Posts: 2
Skippy is on a distinguished road
I suppose that the reason for my comment is that this, if my memory serves me right, appears to be changed behaviour from, say, 2.9.x and 3.0.x where x<6. I don't remember having trouble inscribing things and have used 'x' as a macro key in earlier versions of Angband. But maybe I never actually tried to inscribe something with Orfax before.

I would expect that macros behave in the same way as commands - and don't try to interpret things you type in an inscription or responding to a y/n prompt.

The model for this macro is the macros that are in the user-mac.prf file that 'ships' with the game and they all use 2 escapes. At any rate, I've only ever used 2 escapes and have never had any problems. I have shifted these macros to F4-F7 - but it is harder to reach the F keys than, say, x. I guess I am also set in my ways.

But a definitive answer would be appreciated.
Skippy is offline   Reply With Quote
Old August 31, 2008, 05:01   #4
aeneas
Adept
 
Join Date: Jun 2007
Location: The place of virtuous unbelievers
Posts: 158
aeneas is on a distinguished road
Quote:
Originally Posted by Skippy View Post
I suppose that the reason for my comment is that this, if my memory serves me right, appears to be changed behaviour from, say, 2.9.x and 3.0.x where x<6. I don't remember having trouble inscribing things and have used 'x' as a macro key in earlier versions of Angband. But maybe I never actually tried to inscribe something with Orfax before.

I would expect that macros behave in the same way as commands - and don't try to interpret things you type in an inscription or responding to a y/n prompt.
Well you may well be right about that changing, as far as I know- I've always used just the function keys, so I wouldn't have noticed a change in behavior. The macro facility has always been a bit under-documented. I'm just stabbing in the dark, but you might look at keymaps to see if they behave differently. I just use macros, though I have a feeling it is generally better to use keymaps. Like I said, I just have a system that works for me, and I only use a few macros (though I could hardly play the game without them).

Quote:
Originally Posted by Skippy View Post
The model for this macro is the macros that are in the user-mac.prf file that 'ships' with the game and they all use 2 escapes.
That's pretty dangerous, I think. If I'm not mistaken (always an iffy proposition) each \e clears one prompt. If there are more than two prompts your macro may be only partially interpreted, starting in the middle, and that can lead to some unexpected things happening, sudden tombstones among them. On top of that you are most likely to get a lot of prompts at a critical time. I used to use three \e escapes, but found that that was occasionally not enough. I don't recall ever having a problem with six, but if \a does what I think it does it would be better.

Quote:
Originally Posted by Skippy View Post
At any rate, I've only ever used 2 escapes and have never had any problems. I have shifted these macros to F4-F7 - but it is harder to reach the F keys than, say, x. I guess I am also set in my ways.

But a definitive answer would be appreciated.
Well I'm sure one will happen along any time now, at least in terms of telling you what the behavior is now. You might not get a definitive answer about whether or not it has changed, as the versions you are talking about are a number of years old now, and changes might have been made by someone who is no longer involved with Angband- you might have to start looking at the sources to answer that (or just try the same macros in an older version ). I imagine you would have noticed the 'y' though, if not the 'x'. In the absence of a spec it is the sort of thing I would consider implementation dependent.

I certainly understand what you mean about being set in your ways- after a few years of playing it is not easy to adjust to changes in your fingering patterns.
aeneas is offline   Reply With Quote
Old September 17, 2008, 19:29   #5
Caesum
Rookie
 
Join Date: Aug 2008
Posts: 12
Caesum is on a distinguished road
macros

Are you sure you didn't use to bind it to X instead of x ? The behaviour has always been like this I think, see the macro FAQ section 6.1 where it warns against y/n prompts etc.
http://www.thangorodrim.net/help/macrofaq.txt
Caesum is offline   Reply With Quote
Old September 17, 2008, 19:51   #6
Narvius
Knight
 
Narvius's Avatar
 
Join Date: Dec 2007
Location: Poland, Katowice
Age: 25
Posts: 588
Narvius is on a distinguished road
...but you know, this is a very old thread?
__________________
If you can convincingly pretend you're crazy, you probably are.
Narvius 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
Some questions about macros and keymaps danvari Vanilla 4 August 14, 2008 22:44
[SA] Macros in SAngband? Poop Loops Variants 1 June 13, 2008 19:36
On macros... Wisp Vanilla 5 February 26, 2008 22:37
Macros/keymaps question Jude Variants 7 November 18, 2007 22:45
Crash - angband: Too many macros! Kav Vanilla 16 June 15, 2007 15:38


All times are GMT +1. The time now is 20:34.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.