Debian Codegraph @

docs/customize.rst

raw
1 ====================
2 Customising the game
3 ====================
4
5 Angband allows you to change various aspects of the game to suit your tastes. These include:
6
7 * Options - which let you change interface or gameplay behaviour
8 * `Ignoring items`_ and `inscribing items`_ to change how the game treats them
9 * `Showing extra info in subwindows`_
10 * `Keymaps`_ - a way to assign commonly-used actions to specific keys
11 * `Visuals`_ - allowing you to change the appearance of in-game entities like objects and monsters
12 * `Colours`_ - allowing you to make a given color brighter, darker, or even completely different
13 * `Interface details`_ - depending on which interface to the game you use, these give you control over the font, window placement, and graphical tile set
14
15 Except for the options, which are linked to the save file, and interface
16 details, that are handled by the front end rather than the core of the game,
17 you can save your preferences for these into files, which are called
18 `user pref files`. For the options, customize those using the ``=`` command
19 while playing.
20
21
22 User Pref Files
23 ===============
24
25 User pref files are Angband's way of saving and loading certain settings. They can store:
26
27 * Altered visual appearances for game entities
28 * Inscriptions to automatically apply to items
29 * Keymaps
30 * Altered colours
31 * Subwindow settings
32 * Colours for different types of messages
33 * What audio files to play for different types of messages
34
35 They are simple text files with an easy to modify format, and the game has a set of pre-existing pref files in the lib/customize/ folder. It's recommended you don't modify these.
36
37 Several options menu (``=``) items allow you to load existing user pref files, create new user pref files, or save to a user pref file.
38
39 Where to find them
40 ~~~~~~~~~~~~~~~~~~
41
42 On macOS, you can find them in your user directory, in ``Documents/Angband/``.
43
44 On Linux, they will be stored in ``~/.angband/Angband``.
45
46 On Windows you can find them in ``lib/user/``.
47
48 How do they get loaded?
49 ~~~~~~~~~~~~~~~~~~~~~~~
50
51 When the game starts up, after you have loaded or created a character, some user pref files are loaded automatically. These are the ones mentioned above in the ``lib/customize/`` folder, namely ``pref.prf`` followed by ``font.prf``. If you have graphics turned on, then the game will also load some settings from ``lib/tiles/``.
52
53 After these are complete, the game will try to load (in order):
54
55 * *race*.prf - where *race* is your character's race, so something like ``Dwarf.prf``
56 * *class*.prf - where *class* is your character's class, so something like ``Paladin.prf``
57 * *name*.prf - where *name* is your character's name, so something like ``Balin.prf``
58
59 So, you can save some settings - for example, keymaps - to the ``Mage.prf`` file if you only want them to be loaded for mages.
60
61 You may also enter single user pref commands directly, using the special "Enter a user pref command" command, activated by pressing ``"``.
62
63 You may have to use the redraw command (``^r``) after changing certain of the aspects of the game to allow Angband to adapt to your changes.
64
65
66 Ignoring items
67 ==============
68
69 Angband allows you to ignore specific items that you don't want to see anymore. These items are marked 'ignored' and any similar items are hidden from view. The easiest way to ignore an item is with the ``k`` (or ``^d``) command; the object is dropped and then hidden from view. When ignoring an object, you will be given a choice of ignoring just that object, or all objects like it in some way. If you accidentally ignore an item or find yourself in a situation where you want to see if a previously ignored item is available nearby, one way to handle that is to turn off ignoring for all items with the ``K`` (or ``O``) command, go to the item you want, unignore it with the ``k`` (or ``^d``) command, and then turn on ignoring again with the ``K`` (or ``O``) command. When ignoring has been turned off for all items, you will see ``Unignoring`` in the status line at the bottom of the screen.
70
71 The entire ignoring system can also be accessed from the options menu (``=``) by choosing ``i`` for ``Item ignoring setup``. This allows ignore settings for non-wearable items, and quality and ego ignore settings (described below) for wearable items, to be viewed or changed.
72
73 There is a quality setting for each wearable item type. Ignoring a wearable item will prompt you with a question about whether you wish to ignore all of that type of item with a certain quality setting, or of an ego type, or both.
74
75 The quality settings are:
76
77 bad
78 The weapon/armor has negative AC, to-hit or to-dam.
79
80 average
81 The weapon/armor has no pluses no minuses. It is non-magical.
82
83 good
84 The weapon/armor has positive AC, to-hit or to-dam. However it does not
85 have any special abilities, brands, slays, stat-boosts, resistances
86
87 non-artifact
88 This setting only leaves artifacts unignored.
89
90
91 Inscribing items
92 ================
93
94 Inscriptions are notes you can mark on objects using the ``{`` command. You can use this to give the game commands about the object, which are listed below. You can also set up the game to automatically inscribe certain items whenever you find them, using the object knowledge screens, accessed using ``~``.
95
96 Inscribing an item with '!!':
97 This will alert you when the item has finished recharging.
98
99 Inscribing an item with '=g':
100 This marks an item as 'always pick up'. This is sometimes useful for
101 picking up ammunition after a shootout. If there is a number
102 immediately after the 'g', then the amount picked up automatically
103 will be limited. If you have inscribed a spellbook with '=g4' and have
104 four or more copies in your pack, you will not automatially pick up
105 any more copies when you have the 'pickup if in inventory' option
106 enabled. If you have three copies in your pack with that inscription
107 and happen to find a pile of two copies, you'll automatically pick up
108 one so there is four in the pack.
109
110 Inscribing an item with ``!`` followed by a command letter or ``*``:
111 This means "ask me before using this item". '!w' means 'ask me before
112 wielding', '!d' means 'ask me before dropping', and so on. If you
113 inscribe an item with '!*' then the game will confirm any use of an
114 item.
115
116 Say you inscribed your potion of Speed with '!q'. This would prompt
117 you when you try to drink it to see if you really mean to. Multiple
118 '!q' inscriptions will prompt multiple times.
119
120 Similarly, using !v!k!d makes it very hard for you to accidentally
121 throw, ignore or put down the item it is inscribed on.
122
123 Some adventurers use this for Scrolls of Word of Recall so they don't
124 accidentally return to the dungeon too soon.
125
126 Inscribing an item with ``@``, followed by a command letter, followed by 0-9:
127 Normally when you select an item from your inventory you must enter the
128 letter that corresponds to the item. Since the order of your inventory
129 changes as items get added and removed, this can get annoying. You
130 can instead assign certain items numbers when using a command so that
131 wherever they are in your backpack, you can use the same keypresses.
132 If you have multiple items inscribed with the same thing, the game will
133 use the first one.
134
135 For example, if you inscribe a staff of Cure Light Wounds with '@u1',
136 you can refer to it by pressing 1 when ``u``\sing it. You could also
137 inscribe a wand of Wonder with '@a1', and when using ``a``\, 1 would select
138 that wand.
139
140 Spellcasters should inscribe their books, so that if they lose them they
141 do not cast the wrong spell. If you are mage and the beginner's
142 spellbook is the first in your inventory, casting 'maa' will cast magic
143 missile. But if you lose your spellbook, casting 'maa' will cast the
144 first spell in whatever new book is in the top of your inventory. This
145 can be a waste in the best case scenario and exceedingly dangerous in
146 the worst! By inscribing your spellbooks with '@m1', '@m2', etc., if
147 you lose your first spellbook and attempt to cast magic missile by
148 using 'm1a', you cannot accidentally select the wrong spellbook.
149
150 Inscribing an item with ``^``, followed by a command letter:
151 When you wear an item inscribed with ``^``, the game prompts you before
152 doing that action. You might inscribe '^>' on an item if you want to
153 be reminded to take it off before going down stairs. If the item is in
154 your backpack then the game won't prompt you.
155
156 Like with ``!``, you can use ``*`` for the command letter if you want to
157 game to prompt you every turn whatever you're doing. This can get
158 very annoying!
159
160
161 Showing extra info in subwindows
162 ================================
163
164 In addition to the main window, you can create additional windows that have secondary information on them. You can access the subwindow menu by using ``=`` then ``w``, where you can choose what to display in which window.
165
166 You may then need to make the window visible using the "window" menu from the menu bar (if you have one in your version of the game).
167
168 There are a variety of subwindow choices and you should experiment to see which ones are the most useful for you.
169
170
171 Keymaps
172 =======
173
174 You can set up keymaps in Angband, which allow you to map a single keypress, the trigger, to a series of keypresses, the action. For example you might map the key F1 to "maa" (the keypresses to cast "Magic Missile" as a spellcaster). This can speed up access to commonly-used features. To bypass a keymap that's been assigned to a key, press ``\`` before pressing the key.
175
176 To set up keymaps, go to the options menu (``=``) and select "Edit keymaps" (``e``). There, you can check if a key triggers a keymap: select "Query a keymap" (``c``) and then press the key to check. You can also remove an existing keymap: select "Remove a keymap" (``e``) and then press the key that trigger the keymap to be removed. To add a new keymap (or overwrite an existing one), select "Create a keymap" (``d``), it will then prompt you for the key that triggers the keymap. After pressing the trigger key, you'll be prompted for the keymap's action, the series of keypresses that'll be generated when the trigger key is pressed. If you make a mistake while entering the keypresses for the action, press ``Control-u`` to erase the keypresses already entered for the action. Once you've finished entering the keypresses for the action, press ``=`` to end the sequence; you'll then be prompted for whether to keep the newly entered keymap.
177
178 Within the action for a keymap, it is frequently useful to temporarily suppress -more- prompts since they can swallow keypresses from the keymap. To disable those prompts from within the action, include ``(``. To reenable the prompts, include ``)``. So, a typical action where -more- prompts could happen would look like this: ``(`` your keypresses here ``)``.
179
180 The keypresses in the action will be interpreted relative to the keyset you are currently using (original or roguelike). The game will remember what keyset was in effect when the keymap was created. So if you change keysets, the keymaps which were only defined for the other keyset won't be visible. You can have two keymaps, one for the original keyset and another for the roguelike keyset, bound to the same trigger.
181
182 Keymaps are not recursive. If you have F1 as the trigger for a keymap, including F1 as a keypress in the action for that or another keymap won't invoke that keymap.
183
184 Any changes you make to keymaps from the options menu only last as long as the game is running. To have them affect future sessions, save the keymaps to a file. There's an option to do that from the menu for editing keymaps. See `User Pref Files`_ for how the name of the file affects whether the file is loaded when the game reloads your character.
185
186 Note that the game accounts for the modifier keys (Shift, Control, Alt, Meta) that are pressed along with a key. On most platforms, the game also distinguishes between the keys on the numeric keypad that have equivalents on the main keyboard. When a keypress is displayed or saved to the preference file, the modifiers, if any, for the keypress are displayed by code letters (S for Shift, ^ for Control, A for Alt, M for Meta, and K for the numeric keypad) within curly braces prior to the keypress. There are two exceptions to that: if Control is the only modifier it will displayed as ^ before the keypress without any curly braces and if Shift is the only modifier it will often be folded into the keypress itself. For example::
187
188 {^S}& = Control-Shift-&
189 {AK}0 = Alt-0 from the numeric keypad
190 ^d = Control-d
191 A = Shift-a
192
193 Special keys, like F1, F2, or Tab, are all written within square brackets [].
194 For example::
195
196 ^[F1] = Control-F1
197 {^S}[Tab] = Control-Shift-Tab
198
199 Special keys include [Escape].
200
201 You may find it easier to edit the preference files directly to change a keymap. Keymaps are written in pref files as::
202
203 keymap-act:<action>
204 keymap-input:<type>:<trigger>
205
206 The action must always come first, ```<type>``` means 'keyset type', which is either 0 for the original keyset or 1 for the roguelike keyset. For example::
207
208 keymap-act:maa
209 keymap-input:0:[F1]
210
211 An action can have more than one trigger bound to it by having more than
212 one keymap-input line after it and before the next keymap-act line. One
213 reason to do that would be to have the keymap work with either keyset. For
214 example::
215
216 keymap-act:maa
217 keymap-input:0:[F1]
218 keymap-input:1:[F1]
219
220 Angband uses a few built-in keymaps. These are for the movement keys (they are mapped to ``;`` plus the number, e.g. ``5`` -> ``;5``), amongst others. You can see the full list in pref.prf, but they shouldn't impact you in any way.
221
222
223 Colours
224 =======
225
226 The "Interact with colors" options submenu (``=``, then ``c``) allows you to change how different colours are displayed. Depending on what kind of computer you have, this may or may not have any effect.
227
228 The interface is quite clunky. You can move through the colours using ``n`` for 'next colour' and ``N`` for 'previous colour'. Then upper and lower case ``r``, ``g`` and ``b`` will let you tweak the color. You can then save the results to user pref file.
229
230
231 Visuals
232 =======
233
234 You can change how various in-game entities are displayed using the visuals editor. This editor is part of the knowledge menus (``~``). When you are looking at a particular entity - for example, a monster - if you can edit its visuals, that will be mentioned in the prompt at the bottom of the screen.
235
236 If you are in graphics mode, you will be able to select a new tile for the entity. If you are not, you will only be able to change its colours.
237
238 Once you have made edits, you can save them from the options menu (``=``). Press ``v`` for 'save visuals' and choose what you want to save.
239
240
241 Interface details
242 =================
243
244 Some aspects of how the game is presented, notably the font, window placement
245 and graphical tile set, are controlled by the front end, rather than the core
246 of the game itself. Each front end has its own mechanism for setting those
247 details and recording them between game sessions. Below are brief descriptions
248 for what you can configure with the standard `Windows`_, `X11`_, `SDL`_,
249 `SDL2`_ and `Mac`_ front ends.
250
251 Windows
252 ~~~~~~~
253
254 With the Windows front end, the game, by default, displays several of the
255 the subwindows and uses David Gervais's graphical tiles to display the map.
256 You can close a subwindow with the standard close control on the window's
257 upper right corner. Closing the main window with the standard control causes
258 the game to save its current state and then exit. You can reopen or also
259 close a subwindow via the "Visibilty" menu, the first entry in the "Window"
260 menu for the main window. To move a window, use the standard procedure:
261 position the mouse pointer on the window's title bar and then click and drag
262 the mouse to change the window's position. Click and drag on the edges or
263 corners of a window to change its size. To select the font for a window, use
264 the "Font" menu, the second entry in the "Window" menu for the main window.
265
266 The "Term Options" entry in the "Window" menu for the main window is a shortcut
267 to access the core game's method for selecting the contents of the subwindows.
268 You can read more about that in `Showing extra info in subwindows`_. The
269 "Reset Layout" will rearrange the windows to conform with the current size and
270 will have a similar result to what you would get from restarting the Windows
271 interface without a preset configuration.
272
273 The "Bizarre Display" entry in the "Window" menu allows to toggle on or off
274 an alternate text display algorithm for each window. That was added for
275 compatibility with Windows Vista and later. The default setting, on, should
276 likely be used, unless text display is garbled on your system and the off
277 setting allows text to be displayed properly.
278
279 The "Increase Tile Width" and "Decrease Tile Width" options in the "Window",
280 let you increment or decrement, by one pixel, the width of the columns in a
281 window. The "Increase Tile Height" and "Decrease Tile Height" options are
282 similar but work with the height of the rows. For the primary window, you
283 could use the "Term 0 Font Tile Size" entry as an alternative to those to set
284 the width of the columns and height of the rows to certain combinations or to
285 match the width and height of the font, which is the default. When the
286 "Enable Nice Graphics" option is on (it's in the "Options" menu for the main
287 window), the "Increase Tile Width", "Decrease Tile Width",
288 "Increase Tile Height", "Decrease Tile Height", and "Term 0 Font Tile Size"
289 entries will have no effect since the column width and row height are set
290 automatically when that option is on.
291
292 To change whether graphical tiles are used, use the "Graphics" menu, the first
293 entry in the "Options" menu for the main window. The "None" option in the
294 "Graphics" menu will disable graphical tiles and use text for the map. The
295 next section section in that menu allows you to select one of the graphical
296 tile sets. Turning on the "Enable Nice Graphics" option in the "Graphics"
297 menu is a shortcut for automatically setting sizes to get a reasonable-looking
298 result. When that is turned on or is already on and the tile set is changed,
299 the width of the columns ("tile width"), height of the rows ("tile height")
300 and the number of rows and columns used to display a tile (the
301 "Tile Multiplier") will be adjusted to work well with the current font size and
302 the native size of the graphical tiles. You can manually adjust the number of
303 rows and columns used for displaying a tile with the "Tile Multiplier" entry
304 in the "Graphics" menu. Since typical fonts are often twice as tall as wide,
305 multipliers where the first value, for the width, is twice the second, often
306 x work better with the tiles that are natively square (the original ones,
307 Adam Bolt's, David Gervais's, and the two versions of Shockbolt's tiles).
308 Nomad's tiles are 8 x 16 and so usually work best with multipliers that use the
309 same value for both dimensions.
310
311 When you leave the game, the current settings for the Windows interface are
312 saved as ``angband.INI`` in the directory that holds the executable. Those
313 settings will be automatically reloaded the next time you start the Windows
314 interface.
315
316 X11
317 ~~~
318
319 With the X11 front end, the number of windows opened is set by the '-n' option
320 on the command line, i.e. running ``./angband -mx11 -- -n4`` will open the
321 main window and subwindows one through three if the executable is in the
322 current working directory. To control the font, placement, and size used for
323 each of the windows, set enviroment variables before running Angband. Those
324 environment variables for window 'z' where 'z' is an integer between 0 (the
325 main window) and 7 are:
326
327 * ANGBAND_X11_FONT_z holds the name of the font to use for the window
328 * ANGBAND_X11_AT_X_z holds the horizontal coordinate (zero is leftmost) for the upper left corner of the window
329 * ANGBAND_X11_AT_Y_z holds the vertical coordinate (zero is topmost) for the upper left corner of the window
330 * ANGBAND_X11_COLS_z holds the number of columns to display in the window
331 * ANGBAND_X11_ROWS_z holds the number of rows to display in the window
332
333 SDL
334 ~~~
335
336 With the SDL front end, the main window and any subwindows are displayed within
337 the application's rectangular window. At the top of the application's window
338 is a status line. Within that status line, items highlighted in yellow are
339 buttons that can be pressed to initiate an action. From left to right they are:
340
341 * The application's version number - pressing it displays an information dialog about the application
342 * The currently selected terminal - pressing it brings up a menu for selecting the current terminal; you can also make a terminal the current one by clicking on the terminal's title bar if it is visible
343 * Whether or not the current terminal is visible - pressing it for any terminal that is not the main window will allow you to show or hide that terminal
344 * The font for the current terminal - pressing it brings up a menu to choose the font for the terminal
345 * Options - brings up a dialog for selecting global options including those for the graphical tile set used and whether fullscreen mode is enabled
346 * Quit - to save the game and exit
347
348 To move a terminal window, click on its title bar and then drag the mouse.
349 To resize a terminal window, position the mouse pointer over the lower right
350 corner. That should cause a blue square to appear, then click and drag to
351 resize the terminal.
352
353 To change the graphical tile set used when displaying the game's map, press
354 the Options button in the status bar. Then, in the dialog that appears, press
355 one of the red buttons that appear to the right of the label,
356 "Available Graphics:". The last of those buttons, labeled "None", selects
357 text as the method for displaying the map. Your choice for the graphical tile
358 set does not take effect until you press the red button labeled "OK" at the
359 bottom of the dialog.
360
361 When you leave the game, the current settings for the SDL interface are saved
362 as ``sdlinit.txt`` in the same directory as is used for preference files, see
363 `User Pref Files`_ for details. Those settings will be automatically reloaded
364 the next time you start the SDL interface.
365
366 SDL2
367 ~~~~
368
369 With the SDL2 front end, the application has one window that can contain the
370 main window and any of the subwindows. The application may also have up to
371 three additional windows which can contain any of the subwindows. A subwindow
372 may not appear in more than of those application windows. Unused portions of
373 an application window are tiled with repetitions of the game's logo.
374
375 Each of the application windows has a menu bar along the top. The "Menu"
376 entry at the left end of the menu bar has the main menu for controlling
377 aspects of the SDL2 interface.
378
379 Next to "Menu", are a series of one letter labels that act as toggles for the
380 terminal windows shown in the application window. Click on one to toggle it
381 between on (drawn in white) and off (drawn in gray). It is not possible to
382 toggle off the main window shown in the primary application window.
383
384 At the end of the menu bar are two toggle buttons labeled "Size" and "Move".
385 Each will be gray if disabled or white if enabled. Clicking on "Size" when
386 it is disabled will enable it, disable "Move", turn off input to the game's
387 core, and cause clicks and drags within the displayed subwindows to change
388 the sizes for those subwindows. Clicking on "Move" when it is disabled will
389 enable it, disable "Size", turn off input to the game's core, and cause clicks
390 and drags within the displayed subwindows to change the positions for those
391 subwindows. Disable both "Move" and "Size", by clicking on one if it is
392 enabled, to restore passing input to the game's core.
393
394 Within "Menu", the first entries control properties each of the displayed
395 terminal windows within that application window. For the main window, you
396 can set the font, graphical tile set, whether the window is shown with borders
397 or not, and whether or not the window will be shown on top of the other windows.
398 For subwindows, you can set the font, the purpose (which is a shortcut for
399 enabling the subwindow content as described in
400 `Showing extra info in subwindows`_), the opaqueness ("alpha") of the window,
401 whether the window is shown with borders or not, and whether or not the window
402 will be shown on top of the other windows.
403
404 Below the entries for the contained terminal windows, is an entry,
405 "Fullscreen" for toggling fullscreen mode for that application window. That
406 entry will be gray when fullscreen mode is off and white when it is on.
407
408 In the primary application window which contains the main window, there is an
409 entry, "Send Keypad Modifier", after that for whether key strokes from the
410 numeric keypad will be sent to the game with the keypad modifier set. That
411 entry will be gray when the modifier is not send and will be white when the
412 modifier is sent. Sending the modifier allows some predefined keymaps to work,
413 for instance shift with 8 from the numeric keypad to run north, at the cost of
414 compatibility issues with some keyboard layouts that differ from the standard
415 English keyboard layout for which normal keys have equivalents on the numeric
416 keypad. https://github.com/angband/angband/issues/4522 has an example of the
417 problems that can be avoided by not sending the keypad modifier.
418
419 Below "Send Keypad Modifier" in the primary application window's "Menu" is
420 "Windows", use that to bring up one of the additional application windows.
421
422 The final two entries in "Menu" are "About" for displaying an information
423 dialog about the game and "Quit" to save the game and exit.
424
425 When you leave the game, the current settings for the SDL interface are saved
426 as ``sdl2init.txt`` in the same directory as is used for preference files, see
427 `User Pref Files`_ for details. Those settings will be automatically reloaded
428 the next time you start the SDL interface.
429
430 Mac
431 ~~~
432
433 With the Mac-specific front end, you can use Apple's standard mechanisms to
434 control window placement: click and drag on a window's title bar to move it,
435 click and drag on a window's edge or corner to change the window's dimensions,
436 and click the red button at the top left corner of a subwindow to close it.
437 To reopen a subwindow that you closed, use the Window menu from the Mac's
438 menu bar while the game is the active application and select the entry near the
439 bottom of that menu that corresponds to the subwindow you want to see. For a
440 subwindow's entry to be enabled in the Window menu, that subwindow must be
441 configured to display at least one category of information: see
442 `Showing extra info in subwindows`_ for details.
443
444 To change the font for a window, click on the window's title bar and select
445 "Edit Font" from the Settings menu in the Mac's menu bar. That will open a
446 dialog which displays the family, typeface and size for the current font.
447 Changing the selection for any of those will change the font in the window.
448
449 Whether the game's map is displayed as text or as graphical tiles can be set
450 by selecting Settings from the Mac's menu bar while the game is the active
451 application and then choosing from one of the entries in the Graphics option.
452 Choosing "Classic ASCII" will display the map as text. Any of the other options
453 will use some form of graphical tiles to display the map. If you wish to
454 adjust how graphical tiles are scaled to match up with the currently selected
455 font in the main window, select 'Change Tile Set Scaling...' in the Settings
456 menu.
457
458 When you leave the game, the current Mac-specific settings are saved and will
459 be automatically reloaded when you restart. The settings are stored in
460 ``Library/Preferences/org.rephial.angband.plist`` within your user directory.
461 If you suspect those settings have been corrupted in some way or would like to
462 start again from the default settings, quit the game if it is running, open a
463 Terminal window (i.e. select 'Go->Utilities->Terminal' from the Finder's
464 menus), and, in that Terminal window, run this::
465
466 defaults delete org.rephial.angband
467
468 to clear the contents of the preferences file and any cached preferences that
469 may be retained in memory.