Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Variants

Reply
 
Thread Tools Display Modes
Old November 16, 2007, 22:55   #1
Jude
Adept
 
Jude's Avatar
 
Join Date: Nov 2007
Posts: 124
Jude is on a distinguished road
Macros/keymaps question

OK so in Zangband (I assume this is the same for all variants but I figured I'd post in in this forum since it was Z) I was trying to figure out how to use the macros to make spellcasting shortcuts. It seemed simple enough from the help file. But then I went to the "access macros" screen and found there's both "macros" and "keymaps" and I don't know the difference, and there's also the "create a new action" button and I have no clue what that is.

Anyway I decided to start off simple by creating a simple shortcut for my bread and butter Malediction spell. I picked "g" since it's not used for anything important (extraneous movement command afaik) and it's close to where my left hand usually sits, in reach of my pinky. Anyway, that worked fine, so I set up a couple more for some other basic spells.

Now, what was weird was, first I tried doing this with macros and nothing seemed to happen. Then I was like "well ok" and did the same with keymaps, and it worked. I had no clue why since I'm illiterate about this stuff but everything seemed fine. Then I tried to buy some potions of Cure Serious Wounds which were in slot "g" in the store, and there the trouble started...it didn't recognize my "g" command, presumably because I'd keymapped that to "cast Malediction." I checked the readme and it said you could press backslash and then a command to access the underlying command, but this didn't help with the store (incidentally, in the various options and macros menus, the g key doesn't work either, I assume for the same reason. E and F, of course, work fine).

Anyway, I tried "remove a keymap/macro" to no avail, there doesn't seem to be any way to undo this....

So, a) how do I fix this and b) could anyone give a brief tutorial on how to use these things so a computer-idiot can understand? And what's the difference between keymaps and macros?
Jude is offline   Reply With Quote
Old November 16, 2007, 23:47   #2
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 4,824
Donated: $40
Pete Mack is on a distinguished road
Quote:
Originally Posted by Jude View Post

Anyway, I tried "remove a keymap/macro" to no avail, there doesn't seem to be any way to undo this....

So, a) how do I fix this and b) could anyone give a brief tutorial on how to use these things so a computer-idiot can understand? And what's the difference between keymaps and macros?
A keymap defines a new command, and it's almost always what you want to use. Macros are more primitive; they are designed for complex entries like function and arrow keys. (These are represented to an ascii string on some platforms.) And they cannot be overridden with backslash. You should never define a macro for a single character input. You don't want to use them, unless you are trying to define a macro for a function key.

If you botch up your macros, the right thing to do is to clear them (it's one of the options) and then redefine your keymaps.
Pete Mack is offline   Reply With Quote
Old November 16, 2007, 23:50   #3
Jude
Adept
 
Jude's Avatar
 
Join Date: Nov 2007
Posts: 124
Jude is on a distinguished road
Thanks...so wait, if I just use the keymap, that shouldn't mess with stores and stuff?

Last edited by Jude; November 17, 2007 at 00:07.
Jude is offline   Reply With Quote
Old November 17, 2007, 19:19   #4
Jude
Adept
 
Jude's Avatar
 
Join Date: Nov 2007
Posts: 124
Jude is on a distinguished road
Hmmm....the problem still seems to be persisting...I even tried making a new character file to start from scratch and seeing if the same thing happened when I keymapped G, and it did...any idea what's up?
Jude is offline   Reply With Quote
Old November 18, 2007, 12:09   #5
Fuma
Adept
 
Fuma's Avatar
 
Join Date: May 2007
Posts: 114
Fuma is on a distinguished road
I always thought it's the other way around. Macros = good. Keymaps = don't touch.
But then again, I only use macros with the function keys.

If you're playing spellcasters Jude, you should get used to function keys IMO. You can have an enormous amount of macros with them (sixty or more) and there's little risk that you'll accidentally press a function key, as opposed to, say 'g'.

I usually use F1-F12 for the first book and random stuff like shooting or activating rods.
Shift-Fx for the second book, ctrl-Fx for the third, alt-Fx for the fourth, and ctrl-shift-Fx for the fifth. (if I get that far)
__________________
www.snowleopard.org - International Snow Leopard Trust
Fuma is offline   Reply With Quote
Old November 18, 2007, 14:28   #6
Lipa
Rookie
 
Join Date: Jul 2007
Location: Slovenia
Age: 35
Posts: 24
Lipa is on a distinguished road
I agree - macros + function keys are your best bet. Also, don't forget about the "inscribe" feature!

So for example, let's say you want to create a macro for the second spell in one of the books. First, inscribe the book with @1 (or some other number). Then, choose one of the function keys and create the macro: m1b (m - cast a spell, 1 - book inscribed with @1, b - second spell in the book). That's it!

Cheers!
Lipa is offline   Reply With Quote
Old November 18, 2007, 16:09   #7
Jude
Adept
 
Jude's Avatar
 
Join Date: Nov 2007
Posts: 124
Jude is on a distinguished road
Wait, you can use the function keys? I thought I'd tried them and it didn't work...Well, I'll give that a shot...

So what IS the difference between macros and keymaps?

Anyway thanks for the help!

Edit: Hey, it works! What do you know.
Jude is offline   Reply With Quote
Old November 18, 2007, 21:45   #8
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 4,824
Donated: $40
Pete Mack is on a distinguished road
Quote:
Originally Posted by Fuma View Post
I always thought it's the other way around. Macros = good. Keymaps = don't touch.
But then again, I only use macros with the function keys.
Ah, that makes sense. Since I play with the roguelike keyset, the number keys are all available for keymaps. So I use them, because they are easier to reach than the function keys.
Pete Mack 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
Crash - angband: Too many macros! Kav Vanilla 16 June 15, 2007 14:38


All times are GMT +1. The time now is 17:11.


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