This section is designed to get you quickly using the most common keymaps and macros. Later sections explain the techniques used in more detail. These examples may not be the "best" ones to use in real play.
Contents
Definitions
First, you should know some fundamental terms:
- Actions are sequences of keypresses that the game can recognise. They can't be recorded by the game, but must be input manually.
- Macros and keymaps map a keypress to an action. They can be used to customise the keyboard, reduce typing, and speed up game play. Macros must be used when the trigger key doesn't have a system-independent representation. Keymap actions can only contain underlying commands. Most customisation should be done with keymaps instead of macros when there is a choice.
- Inscriptions are "markings" which you can put on any game item. One use is to label items in a way that doesn't depend on inventory position. Another allows verifying the selection of an item. Under the right conditions they can save your life.
Swap weapons
First, to inscribe your main weapon press the following keys in sequence:
{ Inscribe an object
* Show inventory list
/ Switch to equipment list
a Main weapon slot
@w0 Wield when object 0 is chosen
- (Hit Enter)
Now inscribe the second weapon:
{ Inscribe an object
* Show inventory list
- (Choose letter of second weapon)
@w0 Wield when object 0 is chosen
- (Hit Enter)
Finally, ToME (unlike standard 'Vanilla' Angband) does not have an automatic trigger key to swap items, so it must be created. Select a key that is not being used for any other commands ('X' in the normal keyset is free - see this page, and create the following keymap:
@ Interact with macros
8 Create a keymap
X The trigger key for the keymap
w0 Wield object 0
- (Hit Enter)
- (Hit Esc to exit the editor)
Now to swap weapons, just press the trigger key 'X' which is bound to the default keymap "w0". You may also press "w0" directly to swap.
Using the macro-recorder
You may find all the key-presses involved in ToME a long and time-consuming way to play the game. There are ways to speed up repeated commands by assigning them to a trigger key which can help. These are called macros or keymaps.
The most obvious use for these in ToME is for mage-types, especially sorcerors, who rely on their spells for just about everything. Typing mbaa*t in order to fire a Manathrust is fine if you only have to do it once or twice, but can quickly get annoying when you're doing every move. Far easier to assign that sequence of keypresses to a single trigger key which you can then press as many times as you need. (Until your SP run out of course!)
The easiest way to assign a macro is to use the macro-recorder. Start this by hitting the '$' key. You'll then receive a message telling you that the macro recorder has now started and you will need to press the '$' key a second time to stop the recorder. Preparation is all important here. It is best to be in a situation where you really NEED to cast the spell before recording the macro, so you use all the correct casting techniques and the game behaves as it would in a real (combat) situation (if the spell is to be generally cast in combat).
So assuming we're going to create a macro for manathrust. We've walked into a room and there's a nasty small kobold. What do we do?
$ Start macro recorder
*t target monster (or player if no monster in Line of sight)
m open skills menu
@ enters verbose mode
Cast a Spell selects skill to use - CASE SENSITIVE
@ enters verbose mode
Manathrust casts spell from any book/spell container - CASE SENSITIVE
$ end macro recorder
y confirms macro keystrokes*
- (choose trigger key)
@ opens macro saving/loading screen
2 appends macros to a file
- (choose a name for the file eg sorceror.prf)
- (Hit Enter)
- (Hit Esc to exit the editor)
This will search for the spell in all your books and equipment. If it is found, in either a book or a wielded item that contains a spell, then the spell is cast at the targetted monster.
This technique can be used for all the other skills as well (Use Mindcraft, Forge Ammo) etc.
*If you answer no the recorder continues recording keypresses. If you know you have made a mistake, you need to answer yes, and then not save the macro!
Prevent unwanted use of an item
Prevent "losing" an item by "accident":
{ Inscribe an object
* Show inventory list
- (Choose an item)
!d!k!v !d - don't drop (d), !k - don't destroy (k), !v - don't throw (v)
- (Hit Enter)
This prevents dropping, destroying, or throwing the item. You will be asked if you really want to do so. This is one of the most common inscriptions used, and one of the most useful.
Prevent "using" an item at all:
{ Inscribe an object
* Show inventory list
- (Choose an item)
!* Don't do anything with this item without verifying
- (Hit Enter)
This inscription is commonly used on Scrolls of Recall,...
Saving these macros and keymaps for reuse
Save the macros and keymaps for reuse by the current character:
@ Interact with macros
2 Append macros to a file (optionally enter a filename: e.g. dump.prf or dump.txt)
- (Hit Enter to save the file with the filename shown)
6 Append keymaps to a file
- (Hit Enter to save the file with the filename shown)
- (Hit Esc to exit the editor)
This pref file will be automatically loaded any time a character with a name, race, or class matching the filename is loaded.
The "Append macros/keymaps to a file" commands will append ALL current macros/keymaps to the given file. They will not overwrite the file.
You should edit the file to remove macros that weren't added by you, to reduce clutter and prevent errors. Unfortunately the best way to do this is still "by hand". Open up the pref file in a text editor and remove the duplicate macros and keymaps added. These will be added after the headers "# Automatic macro dump" and "# Automatic keymap dump". The ones you added will be the very last ones in the list. The others are the entire set of keymaps and macros from all other prefs loaded. (This step isn't necessary, but is very helpful)
ToME Wiki