OSDN Git Service

prefファイル読み込みで自分自身を読み込んでもクラッシュすることはない
[hengband/hengband.git] / lib / help / editor.txt
1 [[[[G|=== Auto-Picker/Destroyer Editor ===
2
3 Please choose one of the following online help files:
4
5     (a) The Basics of Auto-picker Editor      (#Editor)            
6     (b) Cur and Paste                         (#CutAndPaste)       
7     (c) Register to Auto-picker               (#RegisterName)      
8     (d) Insert Name from your Inventory       (#InsertObjectName)  
9     (e) Insert Fixed Keyword                  (#InsertKeyword)     
10     (f) Change Multiple Lines at Once         (#MultiLines)        
11     (g) Conditionals                          (#Conditionals)      
12     (h) Auto Register an Item without Editor  (#AutoRegister)      
13
14     (i) Format of Auto-picker/destroyer       (#AutopickFormat)      
15     (j) Format of Conditionals                (#ConditionFormat)     
16     (k) Sample Preference File                (lib/pref/pickpref.prf)
17
18 ***** [a] editor.txt#Editor
19 ***** [b] editor.txt#CutAndPaste
20 ***** [c] editor.txt#RegisterName
21 ***** [d] editor.txt#InsertObjectName
22 ***** [e] editor.txt#InsertKeyword
23 ***** [f] editor.txt#MultiLines
24 ***** [g] editor.txt#Conditionals
25 ***** [h] editor.txt#AutoRegister
26 ***** [i] editor.txt#AutopickFormat
27 ***** [j] editor.txt#ConditionFormat
28 ***** [k] ../pref/pickpref.prf
29
30 ***** <Editor>
31 [[[[G|--- The Basics of Auto-picker Editor ---
32
33 The "auto-picker editor" is a special text editor to write preferences
34 for auto-picker/destroyer.
35
36 To open the editor, you can press the _ key in the game or choose
37 "(P) Auto-picker/destroyer editor" in the options panel (=).
38
39 Like normal text editor, you can move the cursor by Left, Right, Up,
40 Down arrow keys, and Home, End, PageUp, and PageDown keys.  And any
41 letter keys pressed are written as a text.
42
43 Press ^W to finish the edito.  All changes will be saved automatically.
44 Or press ^Q to quit and discard all changes.
45
46 Press ESC to open a command menu.
47 +---------------------------+
48 | a) Help                   |
49 | b) Quit without save   ^Q |
50 | c) Save & Quit         ^W |
51 | d) Revert all changes  ^Z |
52 | e) Edit                 > |
53 | f) Search               > |
54 | g) Move cursor          > |
55 | h) Insert...            > |
56 | i) Adjective (general)  > |
57 | j) Adjective (special)  > |
58 | k) Keywords (noun)      > |
59 | l) Command letter       > |
60 +---------------------------+
61 Press a-l to choose a command or open a sub-menu.  Also you can press
62 ^Q, ^Z, etc. to use commands without opening this menu.
63
64
65 ***** <CutAndPaste>
66 [[[[G|--- Cur and Paste
67
68 Cut and Paste are useful when you want to write many similer lines, or
69 want to swap lines.
70 Open submenu "e) Edit >",
71 +-------------------------+
72 | a) Cut               ^X |
73 | b) Copy              ^C |
74 | c) Paste             ^V |
75 | d) Select block      ^G |
76 | e) Kill rest of line ^K |
77 | f) Delete character  ^D |
78 | g) Backspace         ^H |
79 | h) Return            ^J |
80 | i) Return            ^M |
81 +-------------------------+
82
83 You can select a segment of the text using shift key + arrow keys.
84 Selected text will be displayed in yellow.  You can press ^X to cut
85 the selected text, or press ^C to copy the selected text to the
86 clipboard.  Contents of the clipboard will be pasted on pressing ^V.
87
88 Note that it's possible that Hengband cannot recognize shift+arrow
89 keys on a minor environment.  In that case, you can press ^G and then
90 move cursor to select text.
91
92
93 ***** <RegisterName>
94 [[[[G|--- Register to Auto-picker ---
95
96 ***** <InsertObjectName>
97 [[[[G|--- Insert Name from your Inventory ---
98
99 ***** <InsertKeyword>
100 [[[[G|--- Insert Fixed Keyword ---
101
102 ***** <MultiLines>
103 [[[[G|--- Change Multiple Lines at Once ---
104
105 ***** <Conditionals>
106 [[[[G|--- Conditionals ---
107
108 ***** <AutoRegister>
109 [[[[G|--- Auto Register an Item without Editor ---
110
111 ***** <AutopickFormat>
112 [[[[G|--- Format of Auto-picker/destroyer ---
113
114 Hengband can automatically pick up or destroy specified objects when
115 you write objects name in the file "pickpref.prf" or
116 "pickpref-<<playername>>.prf" in the user directory, this will be
117 ~/.angband/Hengband/ for UNIX, or Hengband\lib\user\ for other
118 operating systems.
119
120 The game will read the file "pickpref-<<playername>>.prf" first and
121 then read the file "pickpref.prf".  The first-read file takes
122 priority.
123
124 You may use the '$' command within the game to reread auto-picker
125 files.
126
127 Notes:
128 Maximum number of active lines is 1009.
129 A line with a header '#' is a comment.
130
131 --- Editing the file ---
132
133 Command letter:
134
135       Each line determines the actions taken when you step over a kind
136   of object.  Starting a line with '!' indicates that you wish to
137   destroy this kind of object.  Starting a line with '~' indicates
138   that you wish to leave this kind of object on the floor.  Starting a
139   line with ';' indicates that you wish to force the game to ask you
140   if you want to pick the item up or not.  Otherwise, your character
141   will automatically attempt to pick up the object.
142        There is an additional command letter '('.  It indicates that
143   you don't wish this item to be displayed in full map. see below.
144
145   Notes:
146   If you want to disable the effect of the '!' indicator temporally,
147   use 'always_pickup' option.
148
149
150 Keywords:
151        After the command letter may come one or more keywords.  They are:
152
153   all               : All items match.
154   collecting        : Matches if you already have that same item.
155   unaware           : Items with unknown effects match.
156   unidentified      : Unidentified items match.
157   identified        : Identified items match.
158   *identified*      : *Identified* items match.
159   dice boosted      : Weapons with boosted damage dice match.
160   more than N dice  : Weapons with dice (dd * ds) better than +N match.
161   more bonus than N : Items which has more magical bonus than (+N) match.
162   worthless         : Items which you cannot sell match.
163   artifact          : Artifacts items match.
164   ego               : Ego items match.
165   good              : {good} items match.
166   nameless          : Non ego/non artifact items match.
167   average           : {average} items match.
168   rare              : Rare equipment such as Dragon armors etc. match.
169   common            : Any equipments except 'rare' equpment match.
170   wanted            : Wanted monster's corpses or skeletons match.
171   unique monster's  : Unique monster's corpses, skeletons or statues match.
172   human             : Human corpses or skeletons match.
173   unreadable        : Spellbooks other than those you can read match.
174   first realm's     : Your first magic realm's spellbooks match.
175   second realm's    : Your second magic realm's spellbooks match.
176   first             : First one of four spellbooks in each realm match.
177   second            : Second one of four spellbooks in each realm match.
178   third             : Third one of four spellbooks in each realm match.
179   fourth            : Fourth one of four spellbooks in each realm match.
180
181   items             : All items match. Use it with an adjective for 
182                       readability (i.e. "unaware items").
183   weapons           : All weapons including missile weapons match.
184   armors            : All armors match.
185   missiles          : Arrows, bolts, and shots match.
186   magical devices   : Wands, staffs, rods and scrolls match.
187   lights            : Light sources match.
188   junks             : Junk items like Shard of Pottery or etc. match.
189   spellbooks        : All books match.
190   favorite weapons  : Weapons suitable for your class (for Priest, Monk,
191                       BeastMaster, ForceTrainer, Cavalry, and Ninja)
192
193   You may also use keywords which match specified kinds of equipment:
194   weapons, armors, missiles, magical devices, lights, junks, spellbooks, 
195   hafted weapons, shields, bows, rings, amulets, suits, cloaks, helms, 
196   gloves, boots
197
198
199 Character strings:
200        After the keywords, you may write a character string. Only items 
201   whose name contains this character string as part of their name match. 
202   Upper or lower case makes no difference.
203        You must insert a ':' between your special keywords and character 
204   string, if both exist in one line.
205
206 Force start-of-line matching:
207   If the first character in a character string is '^', then the 
208   character string must match the beginning of a line.
209
210 !Mace           // Destroy Maces and Lead-Filled Maces.
211 !^Mace          // Destroy only Maces.
212
213
214 Examples:
215
216 !worthless items
217 Meaning:  "destroy all items that are worthless"
218
219 unaware potion
220 Meaning:  "pick up all unaware potions"
221
222 ~unidentified lites
223 Meaning:  "leave all unidentified light sources on the ground"
224
225 unidentified more than 25 dice weapons
226 Meaning:  "pick up all weapons with dice that total more than 25.  A 
227      weapon that is 2d13 qualifies, a weapon that is 5d5 does not."
228
229 Acquirement
230 Meaning:  "pick up anything that includes in its name the word 
231 'Acquirement'"
232
233 potion of Experience
234 Meaning:  "pick up anything named 'potion of experience'"
235
236 Lights:stone
237 Meaning:  "Pick up light sources named stone"
238
239 gloves:slaying
240 Meaning:  "Pick up gauntlets of slaying. Not rings of slaying."
241
242
243 Special Notes:
244
245   Lines will be evaluated in order, and first matched line will be 
246   applied. So you can write names of specific excellent items to pick 
247   up, followed by a general item name with '!' to destroy useless items.
248
249   ! Tips
250   !     In full map command ('M'), you can press M, N, K, or D to 
251   ! display locations of items for auto-pickup, leaving, auto-destroy 
252   ! or both auto-pickup and leaving.
253   !     Additional command letter '(' prevents this display.
254   !
255
256   If you begin the last string in a line with '#', this string will
257   be automatically inscribed on the item.
258
259
260   Strict syntax of each line is below.
261   
262   [! ~ ; (]
263   [[all] [collecting]
264    [unaware] [unidentified] [identified] [*identified*] 
265    [artifact] [ego] [good] [nameless] [average]
266    [worthless] [rare] [common]
267    [dice boosted] [more than N dice] [more bonus than N] 
268    [wanted] [unique monster's] [human] [unreadable] 
269    [first realm's] [second realm's] [first] [second] [third] [fourth] 
270    [items | weapons | armors | missiles | magical devices | 
271     lights | junks | spellbooks | hafted weapons | shields | bows | 
272     rings | amulets | suits | cloaks | helms | gloves | boots] :]
273   [[^]part-of-item-name] [#auto-inscription-string]
274
275
276 ***** <ConditionFormat>
277 [[[[G|--- Format of Conditionals ---
278
279   The lines of pickpref.prf can be disabled/enabled using 
280   conditional expressions. 
281   The syntax is the same as that of other preference files.
282
283   - usage of condition expressions
284     ?:expr
285       If result of expr is "0", all lines below are disabled.
286       If result of expr is "1", all lines below are enabled.
287       Caution:It cannot be nested.
288
289   - usage to include other file
290     %:filename
291       Read a file named 'filename' as a new pick-pref file. The file 
292       must be in the user directory.
293
294   - usage of operators
295     [EQU arg1 arg2 ...]
296       If all args are same, returns "1", or else returns "0".
297     [IOR arg1 arg2 ...]
298     [AND arg1 arg2 ...]
299       IOR evaluates and returns all args' logical OR. IAND is logical AND.
300     [NOT arg]
301       Returns "0" if arg is "1", or else returns "1"
302     [LEQ arg1 arg2 ...]
303     [GEQ arg1 arg2 ...]
304       Compare args as string. LEQ returns "1" if (arg1 <= arg2 <= ...) ,
305       GEQ returns "1" if (arg1 >= arg2 >= ...) otherwise returns "0".
306
307   - Special variables
308     $RACE
309      Returns name of player race. One of below:
310       Human, Half-Elf, Elf, Hobbit, Gnome, Dwarf, Half-Orc,
311       Half-Troll, Amberite, High-Elf, Barbarian, Half-Ogre,
312       Half-Giant, Half-Titan, Cyclops, Yeek, Klackon, Kobold,
313       Nibelung, Dark-Elf, Draconian, Mindflayer, Imp, Golem,
314       Skeleton, Zombie, Vampire, Spectre, Sprite, Beastman, Ent,
315       Archon, Balrog, Dunadan, Shadow-Fairy, Kutar, Android,
316
317     $CLASS
318      Returns name of player class. One of below:
319       Warrior, Mage, Priest, Rogue, Ranger, Paladin,
320       Warrior-Mage, Chaos-Warrior, Monk, Mindcrafter, High-Mage,
321       Tourist, Imitator, BeastMaster, Sorcerer, Archer,
322       Magic-Eater, Bard, Red-Mage, Samurai, ForceTrainer,
323       Blue-Mage, Cavalry, Berserker, Weaponsmith, Mirror-Master,
324       Ninja
325
326     $PLAYER
327      Returns player name.
328     $REALM1
329      Returns player's first magic realm
330       none, Life, Sorcery, Nature, Chaos, Death, Trump Arcane,
331       Craft, Daemon, Crusade, Music, Kendo
332     $REALM2
333      Returns player's second magic realm
334     $LEVEL
335      Returns player level as two-character string.
336       Ex. "01","09","10","50" etc.