Angband 3.0.9b.
[angband.git] / lib / help / playing.txt
blobb24ce44855be307837c1e14b56f104575c3a936f
1 === Playing the Game ===\r
2 \r
3     Most of your interaction with Angband will take the form of "commands".\r
4 Every Angband command consists of an "underlying command" plus a variety of\r
5 optional or required arguments, such as a repeat count, a direction, or the\r
6 index of an inventory object.  Commands are normally specified by typing a\r
7 series of keypresses, from which the underlying command is extracted, along\r
8 with any encoded arguments.  You may choose how the standard "keyboard keys"\r
9 are mapped to the "underlying commands" by choosing one of the two standard\r
10 "keysets", the "original" keyset or the "roguelike" keyset.\r
12     The original keyset is very similar to the "underlying" command set,\r
13 with a few additions (such as the ability to use the numeric "directions" to\r
14 "walk" or the "5" key to "stay still").  The roguelike keyset provides similar\r
15 additions, and also allows the use of the h/j/k/l/y/u/b/n keys to "walk" (or,\r
16 in combination with the shift or control keys, to run or alter), which thus\r
17 requires a variety of key mappings to allow access to the underlying commands\r
18 used for walking/running/altering.  In particular, the "roguelike" keyset\r
19 includes many more "capital" and "control" keys, as shown below.\r
21     Note that any keys that are not required for access to the underlying\r
22 command set may be used by the user to extend the "keyset" which is being\r
23 used, by defining new "keymaps".  To avoid the use of any "keymaps", press\r
24 backslash ("\") plus the "underlying command" key.  This is normally only\r
25 used in "macro" definitions.  You may enter "control-keys" as a caret ("^")\r
26 plus the key (so "^" + "p" yields "^P").\r
28     Some commands allow an optional "repeat count", which allows you to tell\r
29 the game that you wish to do the command multiple times, unless you press a\r
30 key or are otherwise disturbed.  To enter a "repeat count", type '0', followed\r
31 by the numerical count, followed by the command.  You must type "space" before\r
32 entering certain commands.  Skipping the numerical count yields a count of 99.\r
33 An option allows certain commands (open, disarm, alter, etc) to auto-repeat.\r
35     Some commands will prompt for extra information, such as a direction, an\r
36 inventory or equipment item, a spell, a textual inscription, the symbol of a\r
37 monster race, a sub-command, a verification, an amount of time, a quantity,\r
38 a file name, or various other things.  Normally you can hit return to choose\r
39 the "default" response, or escape to cancel the command entirely.\r
41     Some commands will prompt for a spell or an inventory item.  Pressing\r
42 space (or '*') will give you a list of choices.  Pressing "-" (minus) selects\r
43 the item on the floor.  Pressing a lowercase letter selects the given item.\r
44 Pressing a capital letter selects the given item after verification.  Pressing\r
45 a numeric digit '#' selects the first item (if any) whose inscription contains\r
46 "@#" or "@x#", where "x" is the current "underlying command".  You may only\r
47 specify items which are "legal" for the command.  Whenever an item inscription\r
48 contains "!*" or "!x" (with "x" as above) you must verify its selection.\r
50     Some commands will prompt for a direction.  You may enter a "compass"\r
51 direction using any of the "direction keys" shown below.  Sometimes, you may\r
52 specify that you wish to use the current "target", by pressing "t" or "5", or\r
53 that you wish to select a new target, by pressing "*" (see "Target" below).\r
55         Original Keyset Directions       Roguelike Keyset Directions\r
57                  7  8  9                           y  k  u\r
58                  4     6                           h     l\r
59                  1  2  3                           b  j  n\r
62     Each of the standard keysets provides some short-cuts over the "underlying\r
63 commands".  For example, both keysets allow you to "walk" by simply pressing\r
64 an "original" direction key (or a "roguelike" direction key if you are using\r
65 the roguelike keyset), instead of using the "walk" command plus a direction.\r
66 The roguelike keyset allows you to "run" or "alter" by simply holding the\r
67 shift or control modifier key down while pressing a "roguelike" direction key,\r
68 instead of using the "run" or "alter" command plus a direction.  Both keysets\r
69 allow the use of the "5" key to "stand still", which is most convenient when\r
70 using the original keyset.\r
72     Note that on many systems, it is possible to define "macros" to various\r
73 keys, or key combinations, so that it is often possible to make macros which,\r
74 for example, allow the use of the shift and/or control modifier keys, plus a\r
75 numeric keypad key, to specify the "run" or "alter" command, with the given\r
76 direction, regardless of any keymap definitions, by using the fact that you\r
77 can always, for example, use "\" + "." + "6", to specify "run east".\r
81 === Original Keyset Command Summary ===\r
83  a  Aim a wand                           A  Activate an artifact\r
84  b  Browse a book                        B  Bash a door\r
85  c  Close a door                         C  Character description\r
86  d  Drop an item                         D  Disarm a trap\r
87  e  Equipment list                       E  Eat some food\r
88  f  Fire an item                         F  Fuel your lantern/torch\r
89  g  Get objects on floor                 G  Gain new spells/prayers\r
90  h  (unused)                             H  (unused)\r
91  i  Inventory list                       I  Observe an item\r
92  j  Jam a door                           J  (unused)\r
93  k  Destroy an item                      K  (unused)\r
94  l  Look around                          L  Locate player on map\r
95  m  Cast a spell                         M  Full dungeon map\r
96  n  (unused)                             N  (unused)\r
97  o  Open a door or chest                 O  (unused)\r
98  p  Pray a prayer                        P  (unused)\r
99  q  Quaff a potion                       Q  Quit (commit suicide)\r
100  r  Read a scroll                        R  Rest for a period\r
101  s  Search for traps/doors               S  Toggle search mode\r
102  t  Take off equipment                   T  Dig a tunnel\r
103  u  Use a staff                          U  (unused)\r
104  v  Throw an item                        V  Version info\r
105  w  Wear/wield equipment                 W  (unused)\r
106  x  (unused)                             X  (unused)\r
107  y  (unused)                             Y  (unused)\r
108  z  Zap a rod                            Z  (unused)\r
109  !  Interact with system                ^A  (special - debug command)\r
110  @  (unused)                            ^B  (unused)\r
111  #  (unused)                            ^C  (special - break)\r
112  $  (unused)                            ^D  (unused)\r
113  %  (unused)                            ^E  Toggle choice window\r
114  ^  (special - control key)             ^F  Repeat level feeling\r
115  &  (unused)                            ^G  (unused)\r
116  *  Target monster or location          ^H  (unused)\r
117  (  Load screen dump                    ^I  (special - tab)\r
118  )  Dump screen dump                    ^J  (special - linefeed)\r
119  {  Inscribe an object                  ^K  (unused)\r
120  }  Uninscribe an object                ^L  (unused)\r
121  [  (unused)                            ^M  (special - return)\r
122  ]  (unused)                            ^N  (unused)\r
123  -  Walk (flip pickup)                  ^O  (unused)\r
124  _  Enter store                         ^P  Show previous messages\r
125  +  Alter grid                          ^Q  (unused)\r
126  =  Set options                         ^R  Redraw the screen\r
127  ;  Walk (with pickup)                  ^S  Save and don't quit\r
128  :  Take notes                          ^T  (unused)\r
129  '  (unused)                            ^U  (unused)\r
130  "  Enter a user pref command           ^V  Repeat last command\r
131  ,  Stay still (with pickup)            ^W  (special - wizard mode)\r
132  <  Go up staircase                     ^X  Save and quit\r
133  .  Run                                 ^Y  (unused)\r
134  >  Go down staircase                   ^Z  (special - borg command)\r
135  \  (special - bypass keymap)            |  (unused)\r
136  `  (special - escape)                   ~  Check knowledge\r
137  /  Identify symbol                      ?  Help\r
141 === Roguelike Keyset Command Summary ===\r
143  a  Zap a rod (Activate)                 A  Activate an artifact\r
144  b  (walk - south west)                  B  (run - south west)\r
145  c  Close a door                         C  Character description\r
146  d  Drop an item                         D  Disarm a trap or chest\r
147  e  Equipment list                       E  Eat some food\r
148  f  Bash a door (force)                  F  Fuel your lantern/torch\r
149  g  Get objects on floor                 G  Gain new spells/prayers\r
150  h  (walk - west)                        H  (run - west)\r
151  i  Inventory list                       I  Observe an item\r
152  j  (walk - south)                       J  (run - south)\r
153  k  (walk - north)                       K  (run - north)\r
154  l  (walk - east)                        L  (run - east)\r
155  m  Cast a spell                         M  Full dungeon map\r
156  n  (walk - south east)                  N  (run - south east)\r
157  o  Open a door or chest                 O  (unused)\r
158  p  Pray a prayer                        P  Browse a book\r
159  q  Quaff a potion                       Q  Quit (commit suicide)\r
160  r  Read a scroll                        R  Rest for a period\r
161  s  Search for traps/doors               S  Jam a door (Spike)\r
162  t  Fire an item                         T  Take off equipment\r
163  u  (walk - north east)                  U  (run - north east)\r
164  v  Throw an item                        V  Version info\r
165  w  Wear/wield equipment                 W  Locate player on map (Where)\r
166  x  Look around                          X  (unused)\r
167  y  (walk - north west)                  Y  (run - north west)\r
168  z  Aim a wand (Zap)                     Z  Use a staff (Zap)\r
169  !  Interact with system                ^A  (special - debug command)\r
170  @  (unused)                            ^B  (alter - south west)\r
171  #  Toggle search mode                  ^C  (special - break)\r
172  $  (unused)                            ^D  Destroy item\r
173  %  (unused)                            ^E  Toggle choice window\r
174  ^  (special - control key)             ^F  Repeat level feeling\r
175  &  (unused)                            ^G  (unused)\r
176  *  Target monster or location          ^H  (alter - west)\r
177  (  Load screen dump                    ^I  (special - tab)\r
178  )  Dump screen dump                    ^J  (alter - south)\r
179  {  Inscribe an object                  ^K  (alter - north)\r
180  }  Uninscribe an object                ^L  (alter - east)\r
181  [  (unused)                            ^M  (special - return)\r
182  ]  (unused)                            ^N  (alter - south east)\r
183  -  Walk (flip pickup)                  ^O  (unused)\r
184  _  Enter store                         ^P  Show previous messages\r
185  +  Alter grid                          ^Q  (unused)\r
186  =  Set options                         ^R  Redraw the screen\r
187  ;  Walk (with pickup)                  ^S  Save and don't quit\r
188  :  Take notes                          ^T  Dig a Tunnel\r
189  '  (unused)                            ^U  (alter - north east)\r
190  "  Enter a user pref command           ^V  Repeat last command\r
191  ,  Run                                 ^W  (special - wizard mode)\r
192  <  Go up staircase                     ^X  Save and quit\r
193  .  Stay still (with pickup)            ^Y  (alter - north west)\r
194  >  Go down staircase                   ^Z  (special - borg command)\r
195  \  (special - bypass keymap)            |  (unused)\r
196  `  (special - escape)                   ~  Check knowledge\r
197  /  Identify symbol                      ?  Help\r
201 === Special Keys ===\r
202  \r
203         Certain special keys may be intercepted by the operating system or\r
204 the host machine, causing unexpected results.  In general, these special keys\r
205 are control keys, and often, you can disable their special effects.\r
207         If you are playing on a UNIX or similar system, then Ctrl-C will\r
208 interrupt Angband.  The second and third interrupt will induce a warning\r
209 bell, and the fourth will induce both a warning bell and a special message,\r
210 since the fifth will quit the game, after killing your character.  Also,\r
211 Ctrl-Z will suspend the game, and return you to the original command shell,\r
212 until you resume the game with the "fg" command.  There is now a compilation\r
213 option to force the game to prevent the "double ctrl-z escape death trick".\r
214 The Ctrl-\ and Ctrl-D and Ctrl-S keys should not be intercepted.\r
215  \r
216         It is often possible to specify "control-keys" without actually\r
217 pressing the control key, by typing a caret ("^") followed by the key.\r
218 This is useful for specifying control-key commands which might be caught\r
219 by the operating system as explained above.\r
221         Pressing backslash ("\") before a command will bypass all keymaps,\r
222 and the next keypress will be interpreted as an "underlying command" key,\r
223 unless it is a caret ("^"), in which case the keypress after that will be\r
224 turned into a control-key and interpreted as a command in the underlying\r
225 angband keyset.  The backslash key is useful for creating macro actions\r
226 which are not affected by any keymap definitions that may be in force, for\r
227 example, the sequence "\" + "." + "6" will always mean "run east", even if\r
228 the "." key has been mapped to a different underlying command.\r
230         The "0" and "^" and "\" keys all have special meaning when entered\r
231 at the command prompt, and there is no "useful" way to specify any of them\r
232 as an "underlying command", which is okay, since they would have no effect.\r
234         For many input requests or queries, the special character ESCAPE\r
235 will abort the command.  The "[y/n]" prompts may be answered with "y" or\r
236 "n", or escape.  The "-more-" message prompts may be cleared (after reading\r
237 the displayed message) by pressing ESCAPE, SPACE, RETURN, LINEFEED, or by\r
238 any keypress, if the "quick_messages" option is turned on.\r
239  \r
241 === Command Counts ===\r
242  \r
243         Some commands can be executed a fixed number of times by preceding\r
244 them with a count.  Counted commands will execute until the count expires,\r
245 until you type any character, or until something significant happens, such\r
246 as being attacked.  Thus, a counted command doesn't work to attack another\r
247 creature.  While the command is being repeated, the number of times left\r
248 to be repeated will flash by on the line at the bottom of the screen.\r
250         To give a count to a command, type 0, the repeat count, and then\r
251 the command.  If you want to give a movement command and you are using the\r
252 original command set (where the movement commands are digits), press space\r
253 after the count and you will be prompted for the command.\r
254  \r
255         Counted commands are very useful for time consuming commands, as\r
256 they automatically terminate on success, or if you are attacked.  You may\r
257 also terminate any counted command (or resting or running), by typing any\r
258 character.  This character is ignored, but it is safest to use a SPACE or\r
259 ESCAPE which are always ignored as commands in case you type the command\r
260 just after the count expires.\r
262         You can tell Angband to automatically use a repeat count of 99\r
263 with commands you normally want to repeat (open, disarm, tunnel, bash,\r
264 alter, etc) by setting the "always_repeat" option.\r
265  \r
266  \r
267 === Selection of Objects ===\r
268  \r
269         Many commands will also prompt for a particular object to be used.\r
270 For example, the command to read a scroll will ask you which of the\r
271 scrolls that you are carrying that you wish to read.  In such cases, the\r
272 selection is made by typing a letter of the alphabet.  The prompt will\r
273 indicate the possible letters, and will also allow you to type the key\r
274 "*", which causes all of the available options to be described.  The list\r
275 of choices will also be shown in the Choice window, if you are using a\r
276 windows environment and windows are turned on.  Often you will be able to\r
277 press "/" to select an object from your equipment instead of your\r
278 inventory.  Pressing space once will have the same effect as "*", and\r
279 the second time will cancel the command and run the "i" or "e" command.\r
280  \r
281         The particular object may be selected by an upper case or a lower\r
282 case letter.  If lower case is used, the selection takes place\r
283 immediately.  If upper case is used, then the particular option is\r
284 described, and you are given the option of confirming or retracting that\r
285 choice.  Upper case selection is thus safer, but requires an extra key\r
286 stroke.  Also see the "!*" and "!x" inscriptions, below.\r
288         For many commands, you can also use "-" to select an object on the\r
289 floor where you are standing.  This lets you read scrolls or quaff\r
290 potions, for example, off the dungeon floor without picking them up.\r
292         If you enter a number between 0 and 9, the first item engraved\r
293 with "@#" where "#" is the number you entered will be selected.  For example,\r
294 if you have a shovel engraved with "@0" and you type "w" (for wield) and\r
295 then 0, you will wield the shovel.  This is very useful for macros (see\r
296 below), since you can use this to select an object regardless of its\r
297 location in your pack.  For example, Angband automatically defines a macro\r
298 for the key "X" to do "w0".  If you then engrave both your digging\r
299 instrument and your primary weapon with @0, pressing X will wield\r
300 whichever one is not being currently wielded (letting you quickly switch\r
301 between them).  Multiple numbers can be engraved on the same object; for\r
302 example, if a sword is engraved with @1@0, then either "w1" or "w0" will\r
303 wield it.  Normally, you inscribe "@1@0" on your primary weapon, and\r
304 "@2@0" on your digger or secondary weapon.  Note that an inscription\r
305 containing "@x#" will act like "@#" but only when the current "Angband\r
306 command" is "x".  Thus you can put "@z4" on a rod and "@u4" on a staff,\r
307 and then use both "z4" and "u4" as desired.\r
309         Note that any object containing "!x" in its inscription, where\r
310 "x" is the current "angband command" (or containing "!*" ever) will induce\r
311 "verification" whenever that object is "selected".  Thus, inscribing, say,\r
312 "!f!k!d" on an object will greatly reduce the odds of you "losing" it by\r
313 accident, and inscribing "!*" on an object will allow you to be very paranoid\r
314 about the object.  Note that "selling" and "dropping" both use the "d" command.\r
317 === User Pref Files ===\r
319         Angband allows you to change various aspects of the game to suit\r
320 your tastes.  You may define keymaps (changing the way Angband maps your\r
321 keypresses to underlying commands), create macros (allowing you to map a\r
322 single keypress to a series of keypresses), modify the visuals (allowing\r
323 you to change the appearance of monsters, objects, or terrain features),\r
324 change the colors (allowing you to make a given color brighter, darker,\r
325 or even completely different), or set options (turning them off or on).\r
327         Angband stores your preferences in files called "user pref files",\r
328 which contain comments and "user pref commands", which are simple strings\r
329 describing one aspect of the system about which the user has a preference.\r
330 There are many ways to load a user pref file, and in fact, some of these\r
331 files are automatically loaded for you by the game.  All of the files are\r
332 kept in the "lib/user/" directory, though you may have to use one of the\r
333 command line arguments to redirect this directory, especially on multiuser\r
334 systems.  You may also enter single user pref commands directly, using the\r
335 special "Enter a user pref command" command, activated by "double quote".\r
336 You may have to use the "redraw" command (^R) after changing certain of\r
337 the aspects of the game, to allow Angband to adapt to your changes.\r
339         When the game starts up, after you have loaded an old character,\r
340 or created a new character, some user pref files are loaded automatically.\r
341 First, the "pref.prf" file is loaded.  This file contains some user pref\r
342 commands which will work on all platforms.  Then one of "font-xxx.prf"\r
343 (for normal usage) or "graf-xxx.prf" (for bitmap usage) is loaded.  These\r
344 files contain attr/char changes to allow the monsters, objects, and/or\r
345 terrain features to look "better" on your system.  Then the "pref-xxx.prf"\r
346 file is loaded.  This file contains pre-defined system specific stuff\r
347 (macros, color definitions, etc).  Then, the "user-xxx.prf" file is loaded.\r
348 This file contains user-defined system specific stuff.  The "user-xxx.prf"\r
349 file is used as the "default" user pref file in many places.  The "xxx" is\r
350 the "system suffix" for your system, taken from the "main-xxx.c" file which\r
351 was used to generate your executable.  Finally, the "Race.prf", "Class.prf",\r
352 and "Name.prf" files are loaded, where "Race", "Class", and "Name" are\r
353 replaced by the actual race, class, and name of the current character.\r
355         Several commands allow you to both load existing user pref files,\r
356 create new user pref files, append information to existing user pref files,\r
357 and/or interact with various of the user preferences in a more intuitive\r
358 way than the user pref commands allow.  The commands include "Interact with\r
359 macros" (@), "Interact with visuals" (%), and "Interact with colors" (&),\r
360 described below.\r
362 --- User Pref Files (Macros) ---\r
364         The "Interact with macros" command allows you to define or remove\r
365 "macros", which are mappings from a single logical keypress to a sequence\r
366 of keypresses, allowing you to use special keys on the keyboard, such as\r
367 function keys or keypad keys, possibly in conjunction with modifier keys,\r
368 to "automate" repetitive multi-keypress commands that you use a lot.\r
370         Since macros represent keypress sequences, and not all keypresses\r
371 have a printable representation, macro triggers and actions must often be\r
372 "encoded" into a human readible form.  This is done using several types\r
373 of encoding, including "\xHH" for character number HH in hexidecimal, "\e"\r
374 for the "escape" code, "\n" for the "newline" code, "\r" for the "return"\r
375 code, "\s" for the "space" code, "\\" for backslash, "\^" for caret, and\r
376 "^X" for the code for any "control" key "ctrl-X".  Note that the "action"\r
377 of a macro will not be checked against other macro triggers (unless the\r
378 macro action contains a "control-backslash"), so you cannot make infinite\r
379 loops.  You may specify extremely long macros, but you are limited in\r
380 length by the underlying input mechanisms, which in general limit you\r
381 to about 1024 keys in both triggers and actions.\r
383         The special "\" command (which must be encoded in macros as "\\")\r
384 is very useful in macros, since it bypasses all keymaps and allows the next\r
385 keystroke to be considered a command in the underlying Angband command set.\r
386 For a list of the Angband command set, see the "command.txt" help file.\r
387 For example, a macro which maps Shift-KP6 to "\" + "." + "6" will induce\r
388 the "run east" behavior, regardless of what keyset the user has chosen, and\r
389 regardless of what keymaps have been defined.\r
391         Macros can be specified in user pref files as a pair of lines, one\r
392 of the form "A:<str>", which defines the encoded macro action, and one of\r
393 the form "P:<str>", which defines the encoded macro trigger.\r
395 --- User Pref Files (Keymaps) ---\r
397         The "Interact with macros" command also allows you to define\r
398 "keymaps", which are vaguely related to macros.  A keymap maps a single\r
399 keypress to a series of keypresses, which bypass both other keymaps and\r
400 any macros.  Angband uses keymaps to map the original and the roguelike\r
401 keysets to the underlying command set, and allows the user to modify or\r
402 add keymaps of their own.  Note that all keymap actions must be specified\r
403 using underlying commands, not keypresses from the original or roguelike\r
404 keysets.  The original keyset is almost identical to the underlying keyset,\r
405 except that "numbers" are mapped to ";" plus a direction, "5" is mapped to\r
406 ",", and a few control-keys are mapped to various things.  See "command.txt"\r
407 for the full set of underlying commands.  Some uses for keymaps include the\r
408 ability to "disable" a command by mapping it to "\x00", \r
410         Keymaps can be specified in user pref files as line of the form\r
411 "M:<T> <key> <str>", where <T> is the keyset (0/1 for original/roguelike),\r
412 <key> is the encoded trigger key, and <str> is the encoded keymap action.\r
414 --- User Pref Files (Visuals) ---\r
416         You can use the "Interact with visuals" command to change various\r
417 visual information, currently including the choice of what attr/char values\r
418 are used to represent various monsters, objects, or terrain features.  Note\r
419 that in combination appropriate support in "main-xxx.c", and with the use of\r
420 the "use_graphics" flag, you may be able to specify that "graphic bitmaps"\r
421 should be used instead of normal "colored characters" for various things.\r
423         When interactively modifying the attr/char values for monsters,\r
424 objects, or terrain features, pressing "n" or "N" will change which entry\r
425 you are changing, pressing "a" or "A" will rotate through the available\r
426 attr values, and pressing "c" or "C" will rotate though the available char\r
427 values.  Note that attr/char values with the "high bit" set may induce the\r
428 display of special "graphic" pictures if the "use_graphics" flag is set,\r
429 and your system supports the "use_graphics" flag.\r
431         Note that this command can be abused in various ways, and if you\r
432 must do so, remember that you are only cheating yourself.\r
434         Keymaps can be specified in user pref files as line of the form\r
435 "R:<N>:<A>/<C>" or "K:<N>:<A>/<C>" or "F:<N>:<A>/<C>" or "U:<N>:<A>/<C>".\r
437 --- User Pref Files (Colors) ---\r
439         The "Interact with colors" command allows you to change the actual\r
440 internal values used to display various colors.  This command may or may\r
441 not have any effect on your machine.  Advanced machines may allow you to\r
442 change the actual RGB values used to represent each of the 16 colors used\r
443 by Angband, and perhaps even allow you to define new colors which are not\r
444 currently used by Angband.\r
446         Colors can be specified in user pref files as line of the form\r
447 "V:<N>:<V>:<R>:<G>:<B>".\r
449 --- User Pref Files (Options) ---\r
451         The "Interact with options" command allows you to turn options\r
452 on or off.  You may turn options off or on using the user pref commands\r
453 of the form "X:<option>" or "Y:<option>" respectively.\r