File: PairSpec

package info (click to toggle)
glhack 1.2-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 26,748 kB
  • sloc: ansic: 208,571; cpp: 13,139; yacc: 2,005; makefile: 1,152; lex: 377; sh: 121; awk: 89; sed: 11
file content (383 lines) | stat: -rw-r--r-- 9,652 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383

NetHack 3.3.1 Glyph Pairs
=========================

by Andrew Apted.


Encoding glyphs as pairs
------------------------

Each glyph consists of three characters.  The method here encodes
enough info to support both TILE based display and TEXT based display
(with color).  For TEXT displays, are color is always specified
(either explicitly or implicitly).  It does NOT encode the full
NetHack glyph range (0 to MAX_GLYPH).

The first character is the normal NetHack text character for the glyph
(e.g. "d" for a dog, "." for the floor of a room), with a couple of
exceptions.  

The second character is a "meta" character that provides more
information.  It is always non-alphanumeric.  The `-' character is
used as the "nothing special" meta character.  

The third character is always alphanumeric, and is the main way of
distinguishing each pair (e.g. different monsters of the same class).
Depending on the meta character, it is either a color specifier, or
merely a differentiator (and the meta character implies a color).

///--- The extra character(s) provides more information.
///--- which is usually specific to the first character.  Most of the time a
///--- color is specified (explicitly or implicitly) for TEXT displays.
///--- 
///--- The second character can be a "meta" character, which modifies the
///--- meaning, and also signifies there is at least one more character.
///--- Pets and ridden monsters work this way.  Meta characters are optional,
///--- they get "shoved in" when required.
///--- 
///--- The final character(s) (i.e. all except the first char and any meta
///--- character) are always alphanumeric.  Meta characters are always
///--- non-alphanumeric.  Only one meta character can be used per glyph.


MONSTERS
--------

For pets, the meta character is `+', for example "d+W".

For ridden monsters, the meta character is `^', for example "u^y".

For detected monsters, meta character is `/', for example "d/w".

For corpses, meta character is `%'.  On TEXT displays, corpses should
be drawn as a colored `%' char.

In all these cases, the final character is the color letter.


PLAYERS
-------

First character is `9', but should be rendered as `@' on a TEXT
display.  The third character is the player's class:

    (lowercase for male, uppercase for female)

    a  : Archeologist    b  : Barbarian
    c  : Caveman         h  : Healer
    k  : Knight          m  : Monk
    p  : Priest          n  : Ranger
    r  : Rogue           s  : Samurai
    t  : Tourist         v  : Valkyrie
    w  : Wizard

Players should be drawn bright white on a TEXT display (though
different colors for different classes is a possibility).


DEMONS
------

Most demons begin with `&'.  Some begin with `7' but should be endered
as '&' on a TEXT display.  For both, the third character is a color.


HUMANS
------

Humans (and a few others races) normally begin with `@', with the
third character is a color.

Some begin with a `6' or an `8', followed by a distinguishing letter.
The ones with `8' should be drawn as a bright white `@' on a TEXT
display, where the ones with `6' should be a normal magenta `@'.


WARNINGS and other SPECIAL CASES
--------------------------------

The sequences and their text renderings are as follows:

     "?-0"  -->  "0-W"
     "?-1"  -->  "1-r"
     "?-2"  -->  "2-r"
     "?-3"  -->  "3-r"
     "?-4"  -->  "4-m"
     "?-5"  -->  "5-M"

     "?-9"  -->  "I-K"   (invisible)
     "w-q"  -->  "~-y"   (worm tail)

The `NO_GLYPH' sequence is "$__".


SWALLOWS
--------

First character is one of `|' `-' `/' `\'.

Meta character is `(' for left side and top `-'.
Meta character is `)' for right side and bottom `-'.

Third character is the color.

Example:

       /(B  -(B  \)B

       |(B       |)B

       \(B  -)B  /)B


EXPLOSIONS
----------

First character is one of `|' `-' `/' `\'.

Meta character is `[' for left side, top `-' and center.
Meta character is `]' for right side and bottom `-'.

Third character is the color.

Example:

       /[R  -[R  \]R

       |[R   [R  |]R       (Note space char at center)

       \[R  -]R  /]R


ZAPS
----

First character is one of `|' `-' `/' `\'.

Meta character is `='.

Third character is the color.


TRAPS
-----

First character is `^'.  Third character identifies the trap:

    a  : arrow             A  : anti-magic field
    b  : bear
    d  : dart
    f  : falling rock      F  : fire
    h  : hole              H  : trap door
    l  : land mine
    m  : magic             M  : magic-portal
    p  : pit               P  : spiked pit
    r  : rolling boulder   R  : rust
    s  : squeaky board
    t  : teleportation     T  : level teleporter
    w  : web
    y  : polymorph         Y  : statue
    z  : sleeping gas

Text colors must be looked up in a table.


WALLS / FLOORS / DOORS
----------------------

First character is one of `|' `-' `{' `.' `#'.

The `{' is used for wall corners.  The third character is:

            +-  -+-  -+
            |    |    |      R  T  Z

            |    |    |
            +-  -+-  -+      F  X  Y
            |    |    |

            |    |    |      L  W  J      
            +-  -+-  -+      

///--- @@@
///--- For `#'
///--- 
///---     (uppercase used with "#" for lit corridor)
///--- 
///---     d  : Dungeons of Doom
///---     g  : Gnomish Mines
///---     s  : Sokoban
///---     k  : Knox
///---     h  : Gehennom (hell)
///---     a  : Astral plane
///---     q  : Quest


DOORS
-----

The third character identifies the type of door:

    (lowercase for closed, uppercase for open)

    h  Horizontal door  
    v  Vertical door
    p  Horizontal drawbridge
    q  Vertical drawbridge
    b  Iron bars
    o  Doorway (always open)

    c  Corridor (lowercase normal, uppercase if lit)


SCENERY / OTHER ITEMS
---------------------

First character is `}' or ']'.

Third character is based on tilename.  Shown in quotes are the text
character and color to use:

    }-a  : air              " c"
    }-c  : cloud            "#w"
    }-f  : fountain         "{b"
    }-g  : grave            "|w"
    }-h  : throne           "\Y"
    }-i  : ice              ".c"
    }-l  : altar            "_w"
    }-p  : pool of watera   "}b"
    }-r  : molten lava      "}r"
    }-s  : sink             "#w"
    }-t  : tree             "#g"
    }-w  : water            "}b"

    ]-d  : dig beam         "*W"
    ]-c  : camera flash     "!W"
    ]-l  : thrown boomerang, open left    ")y"
    ]-r  : thrown boomerang, open right   "(y"
    ]-1  : magic shield 1   "0B"
    ]-2  : magic shield 2   "#B"
    ]-3  : magic shield 3   "@B"
    ]-4  : magic shield 4   "*B"
    ]-k  : strange object   "]k"
    ]-a  : splash of venom / acid venom        ".y"
    ]-b  : splash of venom / blinding venom    ".y"
    ]-O  : iron ball        "0c"
    ]-Z  : iron chain       "_c"

    ]-A  : zigzag wall A    "|K"
    ]-B  : zigzag wall B    "-K"
    ]-C  : zigzag wall C    "\K"
    ]-D  : zigzag wall D    "/K"


SCROLLS
-------

First character is `?'.  Third char:

    a : ANDOVA BEGARIN
    d : DAIYEN FOOELS       D : DUAM XNAHT
    e : ELAM EBOW           E : ELBIB YLOH
    f : FOOBIE BLETCH       F : VE FORBRYDERNE
    g : GARVEN DEH
    h : HACKEM MUCHE        H : VERR YED HORRE
    j : JUYED AWK YACC
    k : KERNOD WEL          K : KIRJE
    l : LEP GEX VEN ZEA
    n : NR 9
    p : PRATYAVAYAH         P : PRIRUTSENIE
    R : READ ME
    t : TEMOV               T : THARR
    u : unlabeled
    v : VELOX NEB           V : VENZAR BORGAVVE
    x : XIXAXA XOXAXA
    y : YUM YUM
    z : ZELGO MER

Under a TEXT display, all scrolls are bright white.


AMULETS
-------

First character is `"'.  Second char:

    a  : Amulet of Yendor
    i  : Amulet of Yendor (cheap plastic imitation)
    c  : circular
    v  : concave
    h  : hexagonal
    g  : octagonal
    o  : oval
    p  : pyramidal
    s  : spherical
    q  : square
    t  : triangular

Under a TEXT display, all amulets are normal cyan.


OBJECTS
-------

First character is object type.

Without a meta character, second character is a color letter.

There are four meta characters: `<', `>', `:' and `.'.  Each one
implies a certain text color, depending on the type of object (armour,
weapon, etc).  The third character is only for differentation (usually
a letter based on the object name).

Colors implied:
  
             )< == y   ). == c

   (> == Y   (< == y   (. == c  (: == W

   [> == k   [< == y   [. == c  [: == W

   *> == k   %< == y   /. == c  +: == W


COLOR CODES
===========

Multiple letters can refer to the same basic color, so that glyphs can
be differentated on a TILED display.  They don't need to be
differentated on a TEXT display (though that's a possibility).

    jkl  : black                   JKL  : grey
    rst  : normal red              RST  : bright red
    ghi  : normal green            GHI  : bright green
    bfv  : normal blue             BFV  : bright blue
    yzpq : normal yellow / brown   YZPQ : bright yellow
    mno  : normal magenta          MNO  : bright magenta
    cde  : normal cyan             CDE  : bright cyan
    wxa  : normal white            WXA  : bright white


SUMMARY OF META CHARS
=====================

   +  : pets
   ^  : ridden monsters
   /  : detected monsters
   %  : corpses
   
   =  : zaps
   (  : swallows (left)
   )  : swallows (right)
   [  : explosions (left)
   ]  : explosions (right)

   !  : generic differentator 1
   *  : generic differentator 2

   >  : object differentator 1 (bright yellow)
   <  : object differentator 2 (normal yellow / brown)
   .  : object differentator 3 (normal cyan)
   :  : object differentator 4 (bright white)