OSDN Git Service

EQU演算子の説明の修正.
[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' equipment 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   corpses or skeletons : Corpses or skeletons of monsters match.
190   spellbooks        : All books match.
191   favorite weapons  : Weapons suitable for your class (for Priest, Monk,
192                       BeastMaster, ForceTrainer, Cavalry, and Ninja)
193
194   You may also use keywords which match specified kinds of equipment:
195   weapons, armors, missiles, magical devices, lights, junks, spellbooks, 
196   hafted weapons, shields, bows, rings, amulets, suits, cloaks, helms, 
197   gloves, boots
198
199
200 Character strings:
201        After the keywords, you may write a character string. Only items 
202   whose name contains this character string as part of their name match. 
203   Upper or lower case makes no difference.
204        You must insert a ':' between your special keywords and character 
205   string, if both exist in one line.
206
207 Force start-of-line matching:
208   If the first character in a character string is '^', then the 
209   character string must match the beginning of a line.
210
211 !Mace           // Destroy Maces and Lead-Filled Maces.
212 !^Mace          // Destroy only Maces.
213
214
215 Examples:
216
217 !worthless items
218 Meaning:  "destroy all items that are worthless"
219
220 unaware potion
221 Meaning:  "pick up all unaware potions"
222
223 ~unidentified lites
224 Meaning:  "leave all unidentified light sources on the ground"
225
226 unidentified more than 25 dice weapons
227 Meaning:  "pick up all weapons with dice that total more than 25.  A 
228      weapon that is 2d13 qualifies, a weapon that is 5d5 does not."
229
230 Acquirement
231 Meaning:  "pick up anything that includes in its name the word 
232 'Acquirement'"
233
234 potion of Experience
235 Meaning:  "pick up anything named 'potion of experience'"
236
237 Lights:stone
238 Meaning:  "Pick up light sources named stone"
239
240 gloves:slaying
241 Meaning:  "Pick up gauntlets of slaying. Not rings of slaying."
242
243
244 Special Notes:
245
246   Lines will be evaluated in order, and first matched line will be 
247   applied. So you can write names of specific excellent items to pick 
248   up, followed by a general item name with '!' to destroy useless items.
249
250   ! Tips
251   !     In full map command ('M'), you can press M, N, K, or D to 
252   ! display locations of items for auto-pickup, leaving, auto-destroy 
253   ! or both auto-pickup and leaving.
254   !     Additional command letter '(' prevents this display.
255   !
256
257   If you begin the last string in a line with '#', this string will
258   be automatically inscribed on the item.
259
260
261   Strict syntax of each line is below.
262   
263   [! ~ ; (]
264   [[all] [collecting]
265    [unaware] [unidentified] [identified] [*identified*] 
266    [artifact] [ego] [good] [nameless] [average]
267    [worthless] [rare] [common]
268    [dice boosted] [more than N dice] [more bonus than N] 
269    [wanted] [unique monster's] [human] [unreadable] 
270    [first realm's] [second realm's] [first] [second] [third] [fourth] 
271    [items | weapons | favorite weapons | armors | missiles |
272     magical devices | lights | junks | corpses or skeletons | spellbooks |
273     hafted weapons | shields | bows | rings | amulets | suits | cloaks |
274     helms | gloves | boots] :]
275   [[^]part-of-item-name] [#auto-inscription-string]
276
277
278 ***** <ConditionFormat>
279 [[[[G|--- Format of Conditionals ---
280
281   The lines of pickpref.prf can be disabled/enabled using 
282   conditional expressions. 
283   The syntax is the same as that of other preference files.
284
285   - usage of condition expressions
286     ?:expr
287       If result of expr is "0", all lines below are disabled.
288       If result of expr is "1", all lines below are enabled.
289       Caution:It cannot be nested.
290
291   - usage to include other file
292     %:filename
293       Read a file named 'filename' as a new pick-pref file. The file 
294       must be in the user directory.
295
296   - usage of operators
297     [EQU arg1 arg2 ...]
298       If all args are the same as arg1, returns "1", or else returns "0".
299     [IOR arg1 arg2 ...]
300     [AND arg1 arg2 ...]
301       IOR evaluates and returns all args' logical OR. IAND is logical AND.
302     [NOT arg]
303       Returns "0" if arg is "1", or else returns "1"
304     [LEQ arg1 arg2 ...]
305     [GEQ arg1 arg2 ...]
306       Compare args as string. LEQ returns "1" if (arg1 <= arg2 <= ...) ,
307       GEQ returns "1" if (arg1 >= arg2 >= ...) otherwise returns "0".
308
309   - Special variables
310     $RACE
311      Returns name of player race. One of below:
312       Human, Half-Elf, Elf, Hobbit, Gnome, Dwarf, Half-Orc,
313       Half-Troll, Amberite, High-Elf, Barbarian, Half-Ogre,
314       Half-Giant, Half-Titan, Cyclops, Yeek, Klackon, Kobold,
315       Nibelung, Dark-Elf, Draconian, Mindflayer, Imp, Golem,
316       Skeleton, Zombie, Vampire, Spectre, Sprite, Beastman, Ent,
317       Archon, Balrog, Dunadan, Shadow-Fairy, Kutar, Android,
318
319     $CLASS
320      Returns name of player class. One of below:
321       Warrior, Mage, Priest, Rogue, Ranger, Paladin,
322       Warrior-Mage, Chaos-Warrior, Monk, Mindcrafter, High-Mage,
323       Tourist, Imitator, BeastMaster, Sorcerer, Archer,
324       Magic-Eater, Bard, Red-Mage, Samurai, ForceTrainer,
325       Blue-Mage, Cavalry, Berserker, Weaponsmith, Mirror-Master,
326       Ninja
327
328     $PLAYER
329      Returns player name.
330     $REALM1
331      Returns player's first magic realm
332       none, Life, Sorcery, Nature, Chaos, Death, Trump Arcane,
333       Craft, Daemon, Crusade, Music, Kendo
334     $REALM2
335      Returns player's second magic realm
336     $LEVEL
337      Returns player level as two-character string.
338       Ex. "01","09","10","50" etc.