Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old February 25, 2009, 11:24   #1
PaulBlay
Knight
 
Join Date: Jan 2009
Posts: 657
PaulBlay is on a distinguished road
Special macro command - interrupt for direction / target

Because macros and keymaps are stored as series of characters not as a series of commands there is no way for macros to distinguish between character-that-is-an-argument and character-that-is-a-command.

To give a practical example, if you have the following action string

w2Tw1
(w)ield pick{@w2}, (T)unnel, (w)ield weapon{@w1}

'w' will be taken as the direction parameter for the (T)unnel command.

The proper solution would probably be to redo the way commands are handled entirely (something I looked at once but was scared off by the work involved ). However I think it might be possible to fudge a work-around with a macro-only command that temporarily interrupts the execution of a macro until a direction / target is returned (or escape) and then continues with the rest of the macro (or cancels the macro).

So the previous string would now be ...

w2T\255w1
(w)ield pick{@w2}, (T)unnel, wait for direction parameter, (w)ield weapon{@w1}

A simpler solution for that particular problem might be to allow the (T)unnel command to automatically wield the first item with {=T) inscribed before tunnelling and automatically replace it with the first item with {=W} inscribed afterwards.
PaulBlay 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
Squelch command in roguelike keyset? Donald Jonker Vanilla 3 December 28, 2008 02:57
Question about "special" feelings Neuro Vanilla 9 June 23, 2008 22:37
bug with n (repeat last command) and engraving DaviddesJ Vanilla 0 March 31, 2008 08:20
Expanding the power of the look command again with mouseover. Irashtar Vanilla 4 October 20, 2007 02:28
Command Menu Suggestion arcum42 Vanilla 1 August 3, 2007 14:54


All times are GMT +1. The time now is 12:32.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.