home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / games / volume16 / nethck31 / part53 < prev    next >
Encoding:
Text File  |  1993-02-03  |  58.0 KB  |  1,422 lines

  1. Path: uunet!news.tek.com!master!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v16i061:  nethack31 - display oriented dungeons & dragons (Ver. 3.1), Part53/108
  5. Message-ID: <4364@master.CNA.TEK.COM>
  6. Date: 1 Feb 93 19:43:17 GMT
  7. Sender: news@master.CNA.TEK.COM
  8. Lines: 1410
  9. Approved: billr@saab.CNA.TEK.COM
  10. Xref: uunet comp.sources.games:1611
  11.  
  12. Submitted-by: izchak@linc.cis.upenn.edu (Izchak Miller)
  13. Posting-number: Volume 16, Issue 61
  14. Archive-name: nethack31/Part53
  15. Supersedes: nethack3p9: Volume 10, Issue 46-102
  16. Environment: Amiga, Atari, Mac, MS-DOS, OS2, Unix, VMS, X11
  17.  
  18.  
  19.  
  20. #! /bin/sh
  21. # This is a shell archive.  Remove anything before this line, then unpack
  22. # it by saving it into a file and typing "sh file".  To overwrite existing
  23. # files, type "sh file -c".  You can also feed this as standard input via
  24. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  25. # will see the following message at the end:
  26. #        "End of archive 53 (of 108)."
  27. # Contents:  doc/Guidebook.te2 doc/window.doc
  28. # Wrapped by billr@saab on Wed Jan 27 16:09:07 1993
  29. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  30. if test -f 'doc/Guidebook.te2' -a "${1}" != "-c" ; then 
  31.   echo shar: Will not clobber existing file \"'doc/Guidebook.te2'\"
  32. else
  33. echo shar: Extracting \"'doc/Guidebook.te2'\" \(34659 characters\)
  34. sed "s/^X//" >'doc/Guidebook.te2' <<'END_OF_FILE'
  35. X%.hn 1
  36. X\section{Objects}
  37. X
  38. X%.pg
  39. XWhen you find something in the dungeon, it is common to want to pick
  40. Xit up.  In {\it NetHack}, this is accomplished automatically by walking over
  41. Xthe object (unless you turn off the {\it pickup\/}
  42. Xoption (see below), or move with the `{\tt m}' prefix (see above)), or
  43. Xmanually by using the `{\tt ,}' command.  If you're carrying too many
  44. Xthings, {\it NetHack\/} will tell you so and won't pick up anything more.
  45. XOtherwise, it will add the object(s) to your pack and tell you what you
  46. Xjust picked up.
  47. X
  48. X%.pg
  49. XWhen you pick up an object, it is assigned an inventory letter.  Many
  50. Xcommands that operate on objects must ask you to find out which object
  51. Xyou want to use.  When {\it NetHack\/} asks you to choose a particular object
  52. Xyou are carrying, you are usually presented with a list of inventory
  53. Xletters to choose from (see Commands, above).
  54. X
  55. X%.pg
  56. XSome objects, such as weapons, are easily differentiated.  Others, like
  57. Xscrolls and potions, are given descriptions which vary according to
  58. Xtype.  During a game, any two objects with the same description are
  59. Xthe same type.  However, the descriptions will vary from game to game.
  60. X
  61. X%.pg
  62. XWhen you use one of these objects, if its effect is obvious, {\it NetHack\/}
  63. Xwill remember what it is for you.  If its effect isn't extremely
  64. Xobvious, you will be asked what you want to call this type of object
  65. Xso you will recognize it later.  You can also use the ``{\tt \#name}''
  66. Xcommand for the same purpose at any time, to name all objects of a
  67. Xparticular type or just an individual object.
  68. X
  69. X%.hn 2
  70. X\subsection*{Curses and blessings}
  71. X
  72. X%.pg
  73. XAny object that you find may be cursed, even if the object is
  74. Xotherwise helpful.  The most common effect of a curse is being stuck
  75. Xwith (and to) the item.  Cursed weapons weld themselves to your hand
  76. Xwhen wielded, so you cannot unwield them.  Any cursed item you wear
  77. Xis not removable by ordinary means.  In addition, cursed arms and armor
  78. Xusually, but not always, bear negative enchantments that make them
  79. Xless effective in combat.  Other cursed objects may act poorly or
  80. Xdetrimentally in other ways.
  81. X
  82. X%.pg
  83. XObjects can also become blessed.  Blessed items usually work better or
  84. Xmore beneficially than normal uncursed items.  For example, a blessed
  85. Xweapon will do more damage against demons.
  86. X
  87. X%.pg
  88. XThere are magical means of bestowing or removing curses upon objects,
  89. Xso even if you are stuck with one, you can still have the curse
  90. Xlifted and the item removed.  Priests and Priestesses have an innate
  91. Xsensitivity to curses and blessings, so they can more easily avoid
  92. Xcursed objects than other character classes.
  93. X
  94. X%.pg
  95. XAn item with unknown curse status, and an item which you know to be uncursed,
  96. Xwill be distinguished in your inventory by the presence of the word
  97. X``uncursed'' in the description of the latter.  The exception is if this
  98. Xdescription isn't needed; you can look at the inventory description and know
  99. Xthat you have discovered whether it's cursed.  This applies to items which
  100. Xhave ``plusses,'' and items with charges.
  101. X
  102. X%.hn 2
  103. X\subsection*{Weapons (`{\tt )}')}
  104. X
  105. X%.pg
  106. XGiven a chance, most monsters in the Mazes of Menace will
  107. Xgratuitously kill you.  You need weapons for self-defense (killing
  108. Xthem first).  Without a weapon, you do only 1--2 hit points of damage
  109. X(plus bonuses, if any).
  110. X
  111. X%.pg
  112. XThere are wielded weapons, like maces and swords, and thrown weapons,
  113. Xlike arrows.  To hit monsters with a weapon, you must wield it and
  114. Xattack them, or throw it at them.  To shoot an arrow out of a bow, you
  115. Xmust first wield the bow, then throw the arrow.  Crossbows shoot
  116. Xcrossbow bolts.  Slings hurl rocks and (other) gems.  You can wield
  117. Xonly one weapon at a time, but you can change weapons unless you're
  118. Xwielding a cursed one.
  119. X
  120. X%.pg
  121. XEnchanted weapons have a ``plus'' (which can also be a minus)
  122. Xthat adds to your chance
  123. Xto hit and the damage you do to a monster.  The only way to find out
  124. Xif a weapon is enchanted is to have it magically identified somehow.
  125. X
  126. X%.pg
  127. XThose of you in the audience who are AD\&D players, be aware that each
  128. Xweapon which exists in AD\&D does the same damage to monsters in
  129. X{\it NetHack}.  Some of the more obscure weapons (such as the %
  130. X{\it aklys}, {\it lucern hammer}, and {\it bec-de-corbin\/}) are defined
  131. Xin an appendix to {\it Unearthed Arcana}, an AD\&D supplement.
  132. X
  133. X%.pg
  134. XThe commands to use weapons are `{\tt w}' (wield) and `{\tt t}' (throw).
  135. X
  136. X%.hn 2
  137. X\subsection*{Armor (`{\tt [}')}
  138. X
  139. X%.pg
  140. XLots of unfriendly things lurk about; you need armor to protect
  141. Xyourself from their blows.  Some types of armor offer better
  142. Xprotection than others.  Your armor class is a measure of this
  143. Xprotection.  Armor class (AC) is measured as in AD\&D, with 10 being
  144. Xthe equivalent of no armor, and lower numbers meaning better armor.
  145. XEach suit of armor which exists in AD\&D gives the same protection in
  146. X{\it NetHack}.  Here is an (incomplete) list of the armor classes provided by
  147. Xvarious suits of armor:
  148. X
  149. X\begin{center}
  150. X\begin{tabular}{lllll}
  151. Xdragon scale mail   & 1 & \makebox[20mm]{}  & chain mail            & 5\\
  152. Xplate mail          & 3 &                   & scale mail            & 6\\
  153. Xbronze plate mail   & 4 &                   & ring mail             & 7\\
  154. Xsplint mail         & 4 &                   & studded leather armor & 7\\
  155. Xbanded mail         & 4 &                   & leather armor         & 8\\
  156. Xelven mithril-coat  & 5 &                   & no armor              & 10
  157. X\end{tabular}
  158. X\end{center}
  159. X
  160. X%.pg
  161. X\nd You can also wear other pieces of armor (ex.\ helmets, boots,
  162. Xshields, cloaks)
  163. Xto lower your armor class even further, but you can only wear one item
  164. Xof each category (one suit of armor, one cloak, one helmet, one
  165. Xshield, and so on).
  166. X
  167. X%.pg
  168. XIf a piece of armor is enchanted, its armor protection will be better
  169. X(or worse) than normal, and its ``plus'' (or minus) will subtract from
  170. Xyour armor class.  For example, a +1 chain mail would give you
  171. Xbetter protection than normal chain mail, lowering your armor class one
  172. Xunit further to 4.  When you put on a piece of armor, you immediately
  173. Xfind out the armor class and any ``plusses'' it provides.  Cursed
  174. Xpieces of armor usually have negative enchantments (minuses) in
  175. Xaddition to being unremovable.
  176. X
  177. X%.pg
  178. XThe commands to use armor are `{\tt W}' (wear) and `{\tt T}' (take off).
  179. X
  180. X%.hn 2
  181. X\subsection*{Food (`{\tt \%}')}
  182. X
  183. X%.pg
  184. XFood is necessary to survive.  If you go too long without eating you
  185. Xwill faint, and eventually die of starvation.  Unprotected food does
  186. Xnot stay fresh indefinitely; after a while it will spoil, and be
  187. Xunhealthy to eat.  Food stored in ice boxes or tins (``cans'' to you
  188. XAmericans) will usually stay fresh, but ice boxes are heavy, and tins
  189. Xtake a while to open.
  190. X
  191. X%.pg
  192. XWhen you kill monsters, they usually leave corpses which are also
  193. X``food.''  Many, but not all, of these are edible; some also give you
  194. Xspecial powers when you eat them.  A good rule of thumb is ``you are
  195. Xwhat you eat.''
  196. X%.pg
  197. XYou can name one food item after something you like to eat with the
  198. X{\it fruit\/} option, if your dungeon has it.
  199. X
  200. X%.pg
  201. XThe command to eat food is `{\tt e}'.
  202. X
  203. X%.hn 2
  204. X\subsection*{Scrolls (`{\tt ?}')}
  205. X
  206. X%.pg
  207. XScrolls are labeled with various titles, probably chosen by ancient wizards
  208. Xfor their amusement value (ex.\ ``READ ME,'' or ``HOLY BIBLE'' backwards).
  209. XScrolls disappear after you read them (except for blank ones, without
  210. Xmagic spells on them).
  211. X
  212. X%.pg
  213. XOne of the most useful of these is the %
  214. X{\it scroll of identify}, which
  215. Xcan be used to determine what another object is, whether it is cursed or
  216. Xblessed, and how many uses it has left.  Some objects of subtle
  217. Xenchantment are difficult to identify without these.
  218. X
  219. X%.pg
  220. XIf you receive mail while you are playing (on
  221. Xversions compiled with this feature), a mail daemon may run up and
  222. Xdeliver it to you as a %
  223. X{\it scroll of mail}.  To use this feature,
  224. Xyou must let {\it NetHack\/} know where to look for new mail by setting the
  225. X``MAIL'' environment variable to the file name of your mailbox.  You
  226. Xmay also want to set the ``MAILREADER'' environment variable to the
  227. Xfile name of your favorite reader, so {\it NetHack\/} can shell to it when you
  228. Xread the scroll.
  229. X
  230. X%.pg
  231. XThe command to read a scroll is `{\tt r}'.
  232. X
  233. X%.hn 2
  234. X\subsection*{Potions (`{\tt !}')}
  235. X
  236. X%.pg
  237. XPotions are distinguished by the color of the liquid inside the flask.
  238. XThey disappear after you quaff them.
  239. X
  240. X%.pg
  241. XClear potions are potions of water.  Sometimes these are
  242. Xblessed or cursed, resulting in holy or unholy water.  Holy water is
  243. Xthe bane of the undead, so potions of holy water are good thing to
  244. Xthrow (`{\tt t}') at them.  It also is very useful when you dip
  245. X(``{\tt \#dip}'') other
  246. Xobjects in it.
  247. X
  248. X%.pg
  249. XThe command to drink a potion is `{\tt q}' (quaff).
  250. X
  251. X%.hn 2
  252. X\subsection*{Wands (`{\tt /}')}
  253. X
  254. X%.pg
  255. XMagic wands have multiple magical charges.  Some wands are
  256. Xdirectional---you must give a direction to zap them in.  You can also
  257. Xzap them at yourself (just give a `{\tt .}' or `{\tt s}' for the direction),
  258. Xbut it is often unwise.  Other wands are nondirectional---they don't ask
  259. Xfor directions.  The number of charges in a wand is random, and
  260. Xdecreases by one whenever you use it.
  261. X
  262. X%.pg
  263. XThe command to use a wand is `{\tt z}' (zap).
  264. X
  265. X%.hn 2
  266. X\subsection*{Rings (`{\tt =}')}
  267. X
  268. X%.pg
  269. XRings are very useful items, since they are relatively permanent
  270. Xmagic, unlike the usually fleeting effects of potions, scrolls, and
  271. Xwands.
  272. XPutting on a ring activates its magic.  You can wear only two
  273. Xrings, one on each ring finger.
  274. XMost rings also cause you to grow hungry more rapidly, the rate
  275. Xvarying with the type of ring.
  276. X
  277. X%.pg
  278. XThe commands to use rings are `{\tt P}' (put on) and `{\tt R}' (remove).
  279. X
  280. X%.hn 2
  281. X\subsection*{Spell books (`{\tt +}')}
  282. X
  283. X%.pg
  284. XSpell books are tomes of mighty magic.  When studied with the `{\tt r}' (read)
  285. Xcommand, they bestow the knowledge of a spell---unless the attempt
  286. Xbackfires.
  287. XReading a cursed spell book, or one with mystic runes beyond
  288. Xyour ken can be harmful to your health!
  289. X
  290. X%.pg
  291. XA spell can also backfire when you cast it.  If you attempt to cast a
  292. Xspell well above your experience level, or cast it at a time when your
  293. Xluck is particularly bad, you can end up wasting both the energy and
  294. Xthe time required in casting.
  295. X
  296. X%.pg
  297. XCasting a spell calls forth magical energies and focuses them with
  298. Xyour naked mind.  Releasing the magical energy releases some of your
  299. Xmemory of the spell with it.  Each time you cast a spell, your
  300. Xfamiliarity with it will dwindle, until you eventually forget the
  301. Xdetails completely and must relearn it.
  302. X
  303. X%.pg
  304. XThe command to read a spell book is the same as for scrolls, `{\tt r}'
  305. X(read).  The `{\tt +}' command lists your current spells and the number of
  306. Xspell points they require.  The `{\tt Z}' (cast) command casts a spell.
  307. X
  308. X%.hn 2
  309. X\subsection*{Tools (`{\tt (}')}
  310. X
  311. X%.pg
  312. XTools are miscellaneous objects with various purposes.  Some tools,
  313. Xlike wands, have a limited number of uses.  For example, lamps burn
  314. Xout after a while.  Other tools are containers, which objects can
  315. Xbe placed into or taken out of.
  316. X
  317. X%.pg
  318. XThe command to use tools is `{\tt a}' (apply).
  319. X
  320. X%.hn 3
  321. X\subsection*{Chests and boxes}
  322. X
  323. X%.pg
  324. XYou may encounter chests or boxes in your travels.  These can be
  325. Xopened with the ``{\tt \#loot}'' extended command when they are on the floor,
  326. Xor with the `{\tt a}' (apply) command when you are carrying one.  However,
  327. Xchests are often locked, and require you to either use a key to unlock
  328. Xit, a tool to pick the lock, or to break it open with brute force.
  329. XChests are unwieldy objects, and must be set down to be unlocked (by
  330. Xkicking them, using a key or lock picking tool with the `{\tt a}' (apply)
  331. Xcommand, or by using a weapon to force the lock with the ``{\tt \#force}''
  332. Xextended command).
  333. X
  334. X%.pg
  335. XSome chests are trapped, causing nasty things to happen when you
  336. Xunlock or open them.  You can check for and try to deactivate traps
  337. Xwith the ``{\tt \#untrap}'' extended command.
  338. X
  339. X%.hn 2
  340. X\subsection*{Amulets (`{\tt "}')}
  341. X
  342. X%.pg
  343. XAmulets are very similar to rings, and often more powerful.  Like
  344. Xrings, amulets have various magical properties, some beneficial,
  345. Xsome harmful, which are activated by putting them on.
  346. X
  347. X%.pg
  348. XThe commands to use amulets are the same as for rings, `{\tt P}' (put on)
  349. Xand `{\tt R}' (remove).
  350. X
  351. X%.hn 2
  352. X\subsection*{Gems (`{\tt *}')}
  353. X
  354. X%.pg
  355. XSome gems are valuable, and can be sold for a lot of gold pieces.
  356. XValuable gems increase your score if you bring them with you when you
  357. Xexit.  Other small rocks are also categorized as gems, but they are
  358. Xmuch less valuable.
  359. X
  360. X%.hn 2
  361. X\subsection*{Large rocks (`{\tt `}')}
  362. X%.pg
  363. XStatues and boulders are not particularly useful, and are generally
  364. Xheavy.  It is rumored that some statues are not what they seem.
  365. X
  366. X%.hn 2
  367. X\subsection*{Gold (`{\tt \$}')}
  368. X
  369. X%.pg
  370. XGold adds to your score, and you can buy things in shops with it.
  371. XYour version of {\it NetHack\/} may display how much gold you have on the
  372. Xstatus line.  If not, the `{\tt \$}' command will count it.
  373. X
  374. X%.hn 1
  375. X\section{Options}
  376. X
  377. X%.pg
  378. XDue to variations in personal tastes and conceptions of how {\it NetHack\/}
  379. Xshould do things, there are options you can set to change how {\it NetHack\/}
  380. Xbehaves.
  381. X
  382. X%.hn 2
  383. X\subsection*{Setting the options}
  384. X
  385. X%.pg
  386. XOptions may be set in a number of ways.  Within the game, the `{\tt O}'
  387. Xcommand allows you to view all options and change most of them.
  388. XYou can also set options automatically by placing them in the
  389. X``NETHACKOPTIONS'' environment variable or a configuration file.
  390. XSome versions of {\it NetHack\/} also have front-end programs that allow
  391. Xyou to set options before starting the game.
  392. X
  393. X%.hn 2
  394. X\subsection*{Using the NETHACKOPTIONS environment variable}
  395. X
  396. X%.pg
  397. XThe NETHACKOPTIONS variable is a comma-separated list of initial
  398. Xvalues for the various options.  Some can only be turned on or off.
  399. XYou turn one of these on by adding the name of the option to the list,
  400. Xand turn it off by typing a `{\tt !}' or ``{\tt no}'' before the name.
  401. XOthers take a
  402. Xcharacter string as a value.  You can set string options by typing
  403. Xthe option name, a colon, and then the value of the string.  The value
  404. Xis terminated by the next comma or the end of string.
  405. X
  406. X%.pg
  407. XFor example, to set up an environment variable so that {\it female\/}
  408. Xis on, {\it pickup\/} is off, the {\it name\/} is set to ``Blue Meanie'', and
  409. Xthe {\it fruit\/} is set to ``papaya'', you would enter the command
  410. X%.sd
  411. X\begin{verbatim}
  412. X    setenv NETHACKOPTIONS "female,!pickup,name:Blue Meanie,fruit:papaya"
  413. X\end{verbatim}
  414. X%.ed
  415. X
  416. X\nd in {\it csh}, or
  417. X%.sd
  418. X\begin{verbatim}
  419. X    NETHACKOPTIONS="female,!pickup,name:Blue Meanie,fruit:papaya"
  420. X    export NETHACKOPTIONS
  421. X\end{verbatim}
  422. X%.ed
  423. X
  424. X\nd in {\it sh\/} or {\it ksh}.
  425. X
  426. X%.hn 2
  427. X\subsection*{Using a configuration file}
  428. X
  429. X%.pg
  430. XAny line in the configuration file starting with ``{\tt OPTIONS=}'' may be
  431. Xfilled out with options in the same syntax as in NETHACKOPTIONS.
  432. XAny line starting with ``{\tt GRAPHICS=}'', ``{\tt MONSTERS=}'', or
  433. X``{\tt OBJECTS=}''
  434. Xis taken as defining the {\it graphics\/}, {\it monsters\/}, or
  435. X{\it objects\/} options in a different syntax,
  436. Xa sequence of decimal numbers giving the character position
  437. Xin the current font to be used in displaying each entry.
  438. XSuch a sequence can be continued to multiple lines by putting a
  439. X`{\tt \verb+\+}' at the end of each line to be continued.
  440. XAny line starting with `{\tt \#}' is treated as a comment.
  441. X
  442. X%.pg
  443. XThe default name of the configuration file varies on different
  444. Xoperating systems, but NETHACKOPTIONS can also be set to
  445. Xthe full name of a file you want to use (possibly preceded by an `{\tt @}').
  446. X
  447. X%.hn 2
  448. X\subsection*{Customization options}
  449. X
  450. X%.pg
  451. XHere are explanations of the various options do.  Character strings
  452. Xlonger than fifty characters are truncated.  Some of the options
  453. Xlisted may be inactive in your dungeon.
  454. X
  455. X\blist{}
  456. X%.lp
  457. X\item[\ib{BIOS}]
  458. XUse BIOS calls to update the screen display quickly and to read the keyboard
  459. X(allowing the use of arrow keys to move) on machines with an IBM PC
  460. Xcompatible BIOS ROM (default off, {\it OS/2, PC\/ {\rm and} ST NetHack\/} only).
  461. X%.lp
  462. X\item[\ib{catname}]
  463. XName your starting cat (ex.\ ``{\tt catname:Morris}'').
  464. XCannot be set with the `{\tt O}' command.
  465. X%.lp
  466. X\item[\ib{checkpoint}]
  467. XSave game state after each level change, for possible recovery after
  468. Xprogram crash (default on).
  469. X%.lp
  470. X\item[\ib{color}]
  471. XUse color for different monsters, objects, and dungeon features
  472. X(default on for microcomputers).
  473. X%.lp
  474. X\item[\ib{confirm}]
  475. XHave user confirm attacks on pets, shopkeepers, and other
  476. Xpeaceable creatures (default on).
  477. X%.lp
  478. X\item[\ib{DECgraphics}]
  479. XUse a predefined selection of characters from the DEC VT-xxx/DEC Rainbow/
  480. XANSI line-drawing character set to display the dungeon instead of having
  481. Xto define a full graphics set yourself (default off).
  482. XCannot be set with the `{\tt O}' command.
  483. X%.lp
  484. X\item[\ib{disclose}]
  485. XOffer to identify your inventory and intrinsics when the
  486. Xgame ends (default on).
  487. X%.lp
  488. X\item[\ib{dogname}]
  489. XName your starting dog (ex.\ ``{\tt dogname:Fang}'').
  490. XCannot be set with the `{\tt O}' command.
  491. X%.lp
  492. X\item[\ib{female}]
  493. XSet your sex (default off). Cannot be set with the `{\tt O}' command.
  494. X%.lp
  495. X\item[\ib{fixinv}]
  496. XAn object's inventory letter sticks to it when it's dropped (default on).
  497. XIf this is off, dropping an object shifts all the remaining inventory letters.
  498. X%.lp
  499. X\item[\ib{fruit}]
  500. XName a fruit after something you enjoy eating (ex.\ ``{\tt fruit:mango}'')
  501. X(default ``{\tt slime mold}''). Basically a nostalgic whimsy that
  502. X{\it NetHack\/} uses from time to time.  You should set this to something you
  503. Xfind more appetizing than slime mold.  Apples, oranges, pears, bananas, and
  504. Xmelons already exist in {\it NetHack}, so don't use those.
  505. X%.lp
  506. X\item[\ib{graphics}]
  507. XSet the graphics symbols for screen displays (default
  508. X``\verb& |--------||.-|++.##<>&
  509. X\verb&<>\^"_\\#{}.}..## #}|-\\/*!)(0#@*/-\\||\\-//-\\| |\\-/&'').
  510. XIf specified, the {\it graphics\/}
  511. Xoption should come last, followed by a string of 1--69
  512. Xcharacters to be used instead of the default map-drawing characters.
  513. XThe dungeon map will use the characters you specify instead of the
  514. Xdefault symbols.
  515. XRemember that you may need to escape some of these characters
  516. Xif, for example, you use {\it csh}.
  517. X
  518. XThe {\it DECgraphics\/} and {\it IBMgraphics\/}
  519. Xoptions use predefined selections of graphics symbols, so you need not
  520. Xgo to the trouble of setting up a full graphics string for these common
  521. Xcases.  These two options also set up proper handling of graphics
  522. Xcharacters for such terminals, so you should specify them as appropriate
  523. Xeven if you override the selections with your own graphics string.
  524. X
  525. XNote that this option string is now escape-processed in conventional C
  526. Xfashion.  This means that `\verb+\+' is a prefix to take the following
  527. Xcharacter literally, and not as a special prefix.  Your graphics
  528. Xstrings for {\it NetHack\/} 2.2 and older versions may contain a `\verb+\+';
  529. Xit must be doubled for the same effect now.  The special escape form
  530. X`\verb+\m+' switches on the meta bit in the following character, and the
  531. X`{\tt \^{}}' prefix causes the following character to be treated as a control
  532. Xcharacter (so any `{\tt \^{}}' in your old graphics strings should be changed
  533. Xto `\verb+\^+' now).  Also note that there are more symbols in a different
  534. Xorder than used for {\it NetHack\/} 3.0.
  535. X
  536. XThe order of the symbols is: solid rock, vertical wall, horizontal
  537. Xwall, upper left corner, upper right corner, lower left corner, lower
  538. Xright corner, cross wall, upward T wall, downward T wall, leftward T
  539. Xwall, rightward T wall, no door, vertical open door, horizontal open
  540. Xdoor, vertical closed door, horizontal closed door, floor of a room,
  541. Xdark corridor, lit corridor, stairs up, stairs down, ladder up, ladder
  542. Xdown, trap, web, altar, throne, kitchen sink, fountain, pool or moat,
  543. Xice, lava, vertical lowered drawbridge, horizontal lowered drawbridge,
  544. Xvertical raised drawbridge, horizontal raised drawbridge, air, cloud,
  545. Xunder water, vertical beam, horizontal beam, left slant, right slant,
  546. Xdigging beam, camera flash beam, left boomerang, right boomerang, four
  547. Xglyphs giving the sequence for magic resistance displays; the eight
  548. Xsurrounding glyphs for swallowed display; nine glyphs for explosions.
  549. XAn explosion consists of three rows (top, middle, and bottom) of three
  550. Xcharacters.  The explosion is centered in the center of this $3 \times 3$
  551. Xarray.
  552. X
  553. XYou might want to use `{\tt +}' for the corners and T walls for a more
  554. Xaesthetic, boxier display.  Note that in the next release, new symbols
  555. Xmay be added, or the present ones rearranged.
  556. X
  557. XCannot be set with the `{\tt O}' command.
  558. X%.lp
  559. X\item[\ib{help}]
  560. XIf more information is available for an object looked at
  561. Xwith the `{\tt /}' command, ask if you want to see it (default on).
  562. XTurning help off makes just looking at things faster, since you aren't
  563. Xinterrupted with the ``{\tt More info?}'' prompt, but it also means that you
  564. Xmight miss some interesting and/or important information.
  565. X%.lp
  566. X\item[\ib{hilite\_pet}]
  567. XHighlight pets when color is turned off (default off).
  568. X%.lp
  569. X\item[\ib{IBMgraphics}]
  570. XUse a predefined selection of IBM extended ASCII characters to display the
  571. Xdungeon instead of having to define a full graphics set yourself (default off).
  572. XCannot be set with the `{\tt O}' command.
  573. X%.lp
  574. X\item[\ib{ignintr}]
  575. XIgnore interrupt signals, including breaks (default off).
  576. X%.lp
  577. X\item[\ib{legacy}]
  578. XDisplay an introductory message when starting the game (default on).
  579. X%.lp
  580. X\item[\ib{lit\_corridor}]
  581. XShow corridor squares seen by night vision or a light source held by your
  582. Xcharacter as lit (default off).
  583. X%.lp
  584. X\item[\ib{male}]
  585. XSet your sex (default on, most hackers are male).
  586. XCannot be set with the `{\tt O}' command.
  587. X%.lp
  588. X\item[\ib{monsters}]
  589. XSet the characters used to display monster classes (default
  590. X``\verb+abcdefghijklmnopqrstuv+
  591. X\verb+wxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@ \\&;:~]+'').
  592. XThis string is subjected to the same processing as the {\it graphics\/} option.
  593. XThe order of the symbols is
  594. Xant or other insect, blob, cockatrice,
  595. Xdog or other canine, eye or sphere, feline,
  596. Xgremlin, humanoid, imp or minor demon,
  597. Xjelly, kobold, leprechaun,
  598. Xmimic, nymph, orc,
  599. Xpiercer, quadruped, rodent,
  600. Xspider, trapper or lurker above, unicorn,
  601. Xvortex, worm, xan or other mythical/fantastic insect,
  602. Xlight, zruty,
  603. Xangelic being, bat, centaur,
  604. Xdragon, elemental, fungus or mold,
  605. Xgnome, giant humanoid, invisible stalker,
  606. Xjabberwock, Keystone Kop, lich,
  607. Xmummy, naga, ogre,
  608. Xpudding or ooze, quantum mechanic, rust monster,
  609. Xsnake, troll, umber hulk,
  610. Xvampire, wraith, xorn,
  611. Xyeti or ape or other large beast, zombie,
  612. Xhuman, ghost, golem,
  613. Xdemon, sea monster, lizard,
  614. Xlong worm tail, and mimic.
  615. XCannot be set with the `{\tt O}' command.
  616. X%.lp
  617. X\item[\ib{msghistory}]
  618. XThe number of top line messages to save (and recall with `{\tt \^{}P}')
  619. X(default 20). Cannot be set with the `{\tt O}' command.
  620. X%.lp
  621. X\item[\ib{name}]
  622. XSet your character's name (defaults to your user name).  You can also
  623. Xset your character class by appending a dash and the first letter of
  624. Xthe character class (that is, by suffixing one of
  625. X``{\tt -A -B -C -E -H -K -P -R -S -T -V -W}'').
  626. XCannot be set with the `{\tt O}' command.
  627. X%.lp
  628. X\item[\ib{news}]
  629. XRead the {\it NetHack\/} news file, if present (default on).
  630. XSince the news is shown at the beginning of the game, there's no point
  631. Xin setting this with the `{\tt O}' command.
  632. X%.lp
  633. X\item[\ib{null}]
  634. XSend padding nulls to the terminal (default off).
  635. X%.lp
  636. X\item[\ib{number\_pad}]
  637. XUse the number keys to move instead of {\tt [yuhjklbn]} (default off).
  638. X%.lp
  639. X\item[\ib{objects}]
  640. XSet the characters used to display object classes (default
  641. X``\verb&])[="(%!?+/$*`0_.&'').
  642. XThis string is subjected to the same processing as the {\it graphics\/} option.
  643. XThe order of the symbols is
  644. Xillegal-object (should never be seen), weapon, armor, ring, amulet, tool,
  645. Xfood, potion, scroll, spell book, wand, gold, gem or rock, boulder or statue,
  646. Xiron ball, chain, and venom.
  647. XCannot be set with the `{\tt O}' command.
  648. X%.lp
  649. X\item[\ib{packorder}]
  650. XSpecify the order to list object types in (default
  651. X``\verb&\")[\%?+/=!(*`0_&''). The value of this option should be a string
  652. Xcontaining the symbols for the various object types.
  653. X%.lp
  654. X\item[\ib{pettype}]
  655. XSpecify the type of your initial pet, if you are playing a character class
  656. Xthat uses both types of pets.  Possible values are ``{\tt cat}''
  657. Xand ``{\tt dog}''.
  658. XCannot be set with the `{\tt O}' command.
  659. X%.lp
  660. X\item[\ib{pickup}]
  661. XPick up things you move onto by default (default on).
  662. X%.lp
  663. X\item[\ib{rawio}]
  664. XForce raw (non-ctrl-break) mode for faster output and more
  665. Xbulletproof input (MS-DOS sometimes treats `{\tt \^{}P}' as a printer toggle
  666. Xwithout it) (default off).  Note:  DEC Rainbows hang if this is turned on.
  667. XCannot be set with the `{\tt O}' command.
  668. X%.lp
  669. X\item[\ib{rest\_on\_space}]
  670. XMake the space bar a synonym for the `{\tt .}' (rest) command (default off).
  671. X%.lp
  672. X\item[\ib{safe\_pet}]
  673. XPrevent you from (knowingly) attacking your pets (default on).
  674. X%.lp
  675. X\item[\ib{scores}]
  676. XControl what parts of the score list you are shown at the end (ex.\
  677. X``{\tt scores:5top scores/4around my score/own scores}'').  Only the first
  678. Xletter of each category (`{\tt t}', `{\tt a}' or `{\tt o}') is necessary.
  679. X%.lp
  680. X\item[\ib{showexp}]
  681. XShow your accumulated experience points on bottom line (default off).
  682. X%.lp
  683. X\item[\ib{showscore}]
  684. XShow your approximate accumulated score on bottom line (default off).
  685. X%.lp
  686. X\item[\ib{silent}]
  687. XSuppress terminal beeps (default on).
  688. X%.lp
  689. X\item[\ib{sortpack}]
  690. XSort the pack contents by type when displaying inventory (default on).
  691. X%.lp
  692. X\item[\ib{standout}]
  693. XBoldface monsters and ``{\tt --More--}'' (default off).
  694. X%.lp
  695. X\item[\ib{time}]
  696. XShow the elapsed game time in turns on bottom line (default off).
  697. X%.lp
  698. X\item[\ib{tombstone}]
  699. XDraw a tombstone graphic upon your death (default on).
  700. X%.lp
  701. X\item[\ib{verbose}]
  702. XProvide more commentary during the game (default on).
  703. X%.lp
  704. X\item[\ib{windowtype}]
  705. XSelect which windowing system to use, such as ``{\tt tty}'' or ``{\tt X11}''
  706. X(default depends on version).
  707. XCannot be set with the `{\tt O}' command.
  708. X\elist
  709. X
  710. X%.hn 1
  711. X\section{Scoring}
  712. X
  713. X%.pg
  714. X{\it NetHack\/} maintains a list of the top scores or scorers on your machine,
  715. Xdepending on how it is set up.  In the latter case, each account on
  716. Xthe machine can post only one non-winning score on this list.  If
  717. Xyou score higher than someone else on this list, or better your
  718. Xprevious score, you will be inserted in the proper place under your
  719. Xcurrent name.  How many scores are kept can also be set up when
  720. X{\it NetHack\/} is compiled.
  721. X
  722. X%.pg
  723. XYour score is chiefly based upon how much experience you gained, how
  724. Xmuch loot you accumulated, how deep you explored, and how the game
  725. Xended.  If you quit the game, you escape with all of your gold intact.
  726. XIf, however, you get killed in the Mazes of Menace, the guild will
  727. Xonly hear about 90\,\% of your gold when your corpse is discovered
  728. X(adventurers have been known to collect finder's fees).  So, consider
  729. Xwhether you want to take one last hit at that monster and possibly
  730. Xlive, or quit and stop with whatever you have.  If you quit, you keep
  731. Xall your gold, but if you swing and live, you might find more.
  732. X
  733. X%.pg
  734. XIf you just want to see what the current top players/games list is, you
  735. Xcan type
  736. X\begin{verbatim}
  737. X    nethack -s all
  738. X\end{verbatim}
  739. Xon most versions.
  740. X
  741. X%.hn 1
  742. X\section{Explore mode}
  743. X
  744. X%.pg
  745. X{\it NetHack\/} is an intricate and difficult game.  Novices might falter
  746. Xin fear, aware of their ignorance of the means to survive.  Well, fear
  747. Xnot.  Your dungeon may come equipped with an ``explore'' or ``discovery''
  748. Xmode that enables you to keep old save files and cheat death, at the
  749. Xpaltry cost of not getting on the high score list.
  750. X
  751. X%.pg
  752. XThere are two ways of enabling explore mode.  One is to start the game
  753. Xwith the {\tt -X}
  754. Xswitch.  The other is to issue the `{\tt X}' command while already playing
  755. Xthe game.  The other benefits of explore mode are left for the trepid
  756. Xreader to discover.
  757. X
  758. X%.hn
  759. X\section{Credits}
  760. X%.pg
  761. XThe original %
  762. X{\it hack\/} game was modeled on the Berkeley
  763. X%.ux
  764. XUNIX
  765. X{\it rogue\/} game.  Large portions of this paper were shamelessly
  766. Xcribbed from %
  767. X{\it A Guide to the Dungeons of Doom}, by Michael C. Toy
  768. Xand Kenneth C. R. C. Arnold.  Small portions were adapted from
  769. X{\it Further Exploration of the Dungeons of Doom}, by Ken Arromdee.
  770. X
  771. X%.pg
  772. X{\it NetHack\/} is the product of literally dozens of people's work.
  773. XMain events in the course of the game development are described below:
  774. X
  775. X%.pg
  776. X\bigskip
  777. X\nd {\it Jay Fenlason\/} wrote the original {\it Hack\/} with help from {\it
  778. XKenny Woodland}, {\it Mike Thome}, and {\it Jon Payne}.
  779. X
  780. X%.pg
  781. X\medskip
  782. X\nd {\it Andries Brouwer\/} did a major re-write, transforming {\it Hack\/}
  783. Xinto a very different game, and published (at least) three versions (1.0.1,
  784. X1.0.2, and 1.0.3) for UNIX machines to the Usenet.
  785. X
  786. X%.pg
  787. X\medskip
  788. X\nd {\it Don G. Kneller\/} ported {\it Hack\/} 1.0.3 to Microsoft C and MS-DOS,
  789. Xproducing {\it PC Hack\/} 1.01e, added support for DEC Rainbow graphics in
  790. Xversion 1.03g, and went on to produce at least four more versions (3.0, 3.2,
  791. X3.51, and 3.6).
  792. X
  793. X%.pg
  794. X\medskip
  795. X\nd {\it R. Black\/} ported {\it PC Hack\/} 3.51 to Lattice C and the Atari
  796. X520/1040ST, producing {\it ST Hack\/} 1.03.
  797. X
  798. X%.pg
  799. X\medskip
  800. X\nd {\it Mike Stephenson\/} merged these various versions back together,
  801. Xincorporating many of the added features, and produced {\it NetHack\/} version
  802. X1.4.  He then coordinated a cast of thousands in enhancing and debugging
  803. X{\it NetHack\/} 1.4 and released {\it NetHack\/} versions 2.2 and 2.3.
  804. X
  805. X%.pg
  806. X\medskip
  807. X\nd Later, Mike coordinated a major rewrite of the game, heading a team which
  808. Xincluded {\it Ken Arromdee}, {\it Jean-Christophe Collet}, {\it Steve Creps},
  809. X{\it Eric Hendrickson}, {\it Izchak Miller}, {\it Eric S. Raymond}, {\it John
  810. XRupley}, {\it Mike Threepoint}, and {\it Janet Walz}, to produce {\it
  811. XNetHack\/} 3.0c.
  812. X
  813. X%.pg
  814. X\medskip
  815. X\nd {\it NetHack\/} 3.0 was ported to the Atari by {\it Eric R. Smith}, to OS/2 by
  816. X{\it Timo Hakulinen}, and to VMS by {\it David Gentzel}.  The three of them
  817. Xand {\it Kevin Darcy\/} later joined the main development team to produce
  818. Xsubsequent revisions of 3.0.
  819. X
  820. X%.pg
  821. X\medskip
  822. X\nd {\it Olaf Seibert\/} ported {\it NetHack\/} 2.3 and 3.0 to the Amiga.  {\it
  823. XNorm Meluch}, {\it Stephen Spackman\/} and {\it Pierre Martineau\/} designed
  824. Xoverlay code for {\it PC NetHack\/} 3.0.  {\it Johnny Lee\/} ported {\it
  825. XNetHack\/} 3.0 to the Macintosh.  Along with various other Dungeoneers, they
  826. Xcontinued to enhance the PC, Macintosh, and Amiga ports through the later
  827. Xrevisions of 3.0.
  828. X
  829. X%.pg
  830. X\medskip
  831. X\nd Headed by {\it Mike Stephenson\/} and coordinated by {\it Izchak Miller\/} and
  832. X{\it Janet Walz}, the development team which now included {\it Ken Arromdee},
  833. X{\it David Cohrs}, {\it Jean-Christophe Collet}, {\it Kevin Darcy},
  834. X{\it Matt Day}, {\it Timo Hakulinen}, {\it Steve Linhart}, {\it Dean Luick},
  835. X{\it Pat Rankin}, {\it Eric Raymond}, and {\it Eric Smith\/} undertook a radical
  836. Xrevision of 3.0.  They re-structured the game's design, and re-wrote major
  837. Xparts of the code.  They added multiple dungeons, a new display, special
  838. Xindividual character quests, a new endgame and many other new features, and
  839. Xproduced {\it NetHack\/} 3.1.
  840. X
  841. X%.pg
  842. X\medskip
  843. X\nd {\it Ken Lorber}, {\it Gregg Wonderly\/} and {\it Greg Olson}, with help
  844. Xfrom {\it Richard Addison}, {\it Mike Passaretti}, and {\it Olaf Seibert},
  845. Xdeveloped {\it NetHack\/} 3.1 for the Amiga.
  846. X
  847. X%.pg
  848. X\medskip
  849. X\nd {\it Norm Meluch\/} and {\it Kevin Smolkowski}, with help from
  850. X{\it Carl Schelin}, {\it Stephen Spackman}, {\it Steve VanDevender},
  851. Xand {\it Paul Winner}, ported {\it NetHack\/} 3.1 to the PC.
  852. X
  853. X%.pg
  854. X\medskip
  855. X\nd {\it Jon W\"atte}, with help from {\it Ross Brown}, {\it Mike Engber},
  856. X{\it David Hairston}, {\it Michael Hamel}, {\it Jonathan Handler},
  857. X{\it Johnny Lee}, {\it Tim Lennan}, {\it Rob Menke}, {\it Andy Swanson}, and
  858. Xespecially from {\it Hao-yang Wang}, developed {\it NetHack\/} 3.1 for the Macintosh.
  859. X
  860. X%.pg
  861. X\medskip
  862. X\nd {\it Timo Hakulinen\/} ported {\it NetHack\/} 3.1 to OS/2.  {\it Eric Smith\/}
  863. Xported {\it NetHack\/} 3.1 to the Atari.  {\it Pat Rankin}, with help from
  864. X{\it Joshua Delahunty}, is responsible for the VMS version of {\it NetHack\/} 3.1.
  865. X
  866. X%.pg
  867. X\medskip
  868. X\nd {\it Dean Luick}, with help from {\it David Cohrs}, developed {\it NetHack\/}
  869. X3.1 for X11.
  870. X
  871. X%.pg
  872. X\bigskip
  873. X\nd From time to time, some depraved individual out there in netland sends a
  874. Xparticularly intriguing modification to help out with the game.  The Gods of
  875. Xthe Dungeon sometimes make note of the names of the worst of these miscreants
  876. Xin this, the list of Dungeoneers:
  877. X
  878. X%.sd
  879. X\begin{center}
  880. X\begin{tabular}{lll}
  881. XRichard Addison        & Eric Hendrickson    & Mike Passaretti   \\
  882. XTom Almy               & Bruce Holloway      & Pat Rankin        \\
  883. XKen Arromdee           & Richard P. Hughey   & Eric S. Raymond   \\
  884. XEric Backus            & Ari Huttunen        & Frederick Roeber  \\
  885. XJohn S. Bien           & John Kallen         & John Rupley       \\
  886. XRalf Brown             & Del Lamb            & Carl Schelin      \\
  887. XRoss Brown             & Greg Laskin         & Olaf Seibert      \\
  888. XDavid Cohrs            & Johnny Lee          & Kevin Sitze       \\
  889. XJean-Christophe Collet & Tim Lennan          & Eric R. Smith     \\
  890. XSteve Creps            & Merlyn LeRoy        & Kevin Smolkowski  \\
  891. XKevin Darcy            & Steve Linhart       & Michael Sokolov   \\
  892. XMatthew Day            & Ken Lorber          & Stephen Spackman  \\
  893. XJoshua Delahunty       & Dean Luick          & Andy Swanson      \\
  894. XBill Dyer              & Benson I. Margulies & Kevin Sweet       \\
  895. XMike Engber            & Pierre Martineau    & Scott R. Turner   \\
  896. XJochen Erwied          & Roland McGrath      & Steve VanDevender \\
  897. XMike Gallop            & Norm Meluch         & Janet Walz        \\
  898. XDavid Gentzel          & Rob Menke           & Hao-yang Wang     \\
  899. XMark Gooderum          & Deron Meranda       & Jon W\"atte       \\
  900. XDavid Hairston         & Bruce Mewborne      & Tom West          \\
  901. XTimo Hakulinen         & Izchak Miller       & Paul Winner       \\
  902. XMichael Hamel          & Gil Neiger          & Gregg Wonderly    \\
  903. XJonathan Handler       & Greg Olson          &
  904. X\end{tabular}
  905. X\end{center}
  906. X%.ed
  907. X
  908. X%\vfill
  909. X%\begin{flushleft}
  910. X%\small
  911. X%Microsoft and MS-DOS are registered trademarks of Microsoft Corporation.\\
  912. X%%%Don't need next line if a UNIX macro automatically inserts footnotes.
  913. X%UNIX is a registered trademark of AT\&T.\\
  914. X%Lattice is a trademark of Lattice, Inc.\\
  915. X%Atari and 1040ST are trademarks of Atari, Inc.\\
  916. X%AMIGA is a trademark of Commodore-Amiga, Inc.\\
  917. X%%.sm
  918. X%Brand and product names are trademarks or registered trademarks
  919. X%of their respective holders.
  920. X%\end{flushleft}
  921. X
  922. X\end{document}
  923. END_OF_FILE
  924. if test 34659 -ne `wc -c <'doc/Guidebook.te2'`; then
  925.     echo shar: \"'doc/Guidebook.te2'\" unpacked with wrong size!
  926. fi
  927. # end of 'doc/Guidebook.te2'
  928. fi
  929. if test -f 'doc/window.doc' -a "${1}" != "-c" ; then 
  930.   echo shar: Will not clobber existing file \"'doc/window.doc'\"
  931. else
  932. echo shar: Extracting \"'doc/window.doc'\" \(20576 characters\)
  933. sed "s/^X//" >'doc/window.doc' <<'END_OF_FILE'
  934. XIntroduction
  935. X
  936. XThis file documents the support for various windowing systems in
  937. XNetHack.  The support is through a standard interface, separating the
  938. Xmain NetHack code from window-system specific code.  The implementation
  939. Xsupports multiple window systems in the same binary.  Even if you only
  940. Xwish to support one window-port on your port, you will need to follow
  941. Xthe instructions in Section VII to get a compilable binary.
  942. X
  943. XContents:
  944. X    I.   Window Types and Terminology
  945. X    II.  Interface Specification
  946. X    III. Global variables
  947. X    IV.  New or respecified common, high level routines
  948. X    V.   Game startup
  949. X    VI.  Conventions
  950. X    VII. Implementation and Multi-window support
  951. X
  952. XI.  Window Types and Terminology
  953. X
  954. XThere are 5 basic window types, used to call create_nhwindow():
  955. X
  956. X    NHW_MESSAGE    (top line)
  957. X    NHW_STATUS    (bottom lines)
  958. X    NHW_MAP        (main dungeon)
  959. X    NHW_MENU    (inventory or other "corner" windows)
  960. X    NHW_TEXT    (help/text, full screen paged window)
  961. X
  962. XThe tty window-port also uses NHW_BASE (the base display) internally.
  963. X
  964. XNHW_MENU windows can be used for either menu or text display.  Their
  965. Xbasic feature is that for the tty-port, if the window is small enough,
  966. Xit appears in the corner of the tty display instead of overwriting
  967. Xthe whole screen.  The first call to add information to the window
  968. Xwill decide if it is going to be used to display a menu or text.
  969. XIf start_menu() is called, then it will be used as a menu.  If
  970. Xputstr() is called, it will be used as text.  Once decided, there
  971. Xis no turning back.  For the tty-port, if the data is too large for
  972. Xa single screen then the data is paged (with --more--) between pages.
  973. XOnly NHW_MENU type windows can be used for menus.
  974. X
  975. XNHW_TEXT windows are used to display a large amount of textual data.
  976. XThis is the type of window one would use for displaying a help file,
  977. Xfor example.  In the tty window-port, windows of type NHW_TEXT can
  978. Xpage using the DEF_PAGER, if DEF_PAGER is defined.  There exists an
  979. Xassumption that the font for text windows is monospaced.  The help
  980. Xfiles are all formatted accordingly.
  981. X
  982. X"window" is always of type winid.  This is currently implemented as an
  983. Xinteger, but doesn't necessarily have to be done that way.  There are
  984. Xa few fixed window names that are known throughout the code:
  985. X
  986. X    WIN_MESSAGE    (top line)
  987. X    WIN_STATUS    (bottom lines)
  988. X    WIN_MAP        (main dungeon)
  989. X    WIN_INVEN    (inventory)
  990. X
  991. XOther windows are created and destroyed as needed.
  992. X
  993. X"Port" in this document refers to a CPU/OS/hardware platform (UNIX, MSDOS
  994. XTOS, etc.)  "window-port" refers to the windowing platform.  This is
  995. Xorthogonal (e.g.  UNIX might use either a tty window-port or an X11
  996. Xwindow-port).
  997. X
  998. X
  999. XII.  Interface Specification
  1000. X
  1001. XAll functions below are void unless otherwise noted.
  1002. X
  1003. XA.  Low-level routines:
  1004. X
  1005. Xraw_print(str)    -- Print directly to a screen, or otherwise guarantee that
  1006. X           the user sees str.  raw_print() appends a newline to str.
  1007. X           It need not recognize ASCII control characters.  This is
  1008. X           used during startup (before windowing system initialization
  1009. X           -- maybe this means only error startup messages are raw),
  1010. X           for error messages, and maybe other "msg" uses.  E.g.
  1011. X           updating status for micros (i.e, "saving").
  1012. Xraw_print_bold(str)
  1013. X        -- Like raw_print(), but prints in bold/standout (if possible).
  1014. Xcurs(window, x, y)
  1015. X        -- Next output to window will start at (x,y), also moves
  1016. X           displayable cursor to (x,y).  For backward compatibility,
  1017. X           1 <= x < cols, 0 <= y < rows, where cols and rows are
  1018. X           the size of window.
  1019. X        -- For variable sized windows, like the status window, the
  1020. X           behaviour when curs() is called outside the window's limits
  1021. X           is unspecified. The mac port wraps to 0, with the status
  1022. X           window being 2 lines high and 80 columns wide.
  1023. X        -- Still used by curs_on_u(), status updates, screen locating
  1024. X           (identify, teleport).
  1025. X        -- NHW_MESSAGE, NHW_MENU and NHW_TEXT windows do not
  1026. X           currently support curs in the tty window-port.
  1027. Xputstr(window, attr, str)
  1028. X        -- Print str on the window the given attribute.  Only
  1029. X           printable ASCII characters (040-0126) must be supported.
  1030. X           Multiple putstr()s are output on separate lines.  Attributes
  1031. X           can be one of
  1032. X            ATR_NONE (or 0)
  1033. X            ATR_ULINE
  1034. X            ATR_BOLD
  1035. X            ATR_BLINK
  1036. X            ATR_INVERSE
  1037. X           If a window-port does not support all of these, it may map
  1038. X           unsupported attributes to a supported one (e.g. map them
  1039. X           all to ATR_INVERSE).  putstr() may compress spaces out of
  1040. X           str, break str, or truncate str, if necessary for the
  1041. X           display.  Where putstr() breaks a line, it has to clear
  1042. X           to end-of-line.
  1043. X        -- putstr should be implemented such that if two putstr()s
  1044. X           are done consecutively that the user will see the first
  1045. X           and the second.  In the tty port, pline() achieves this
  1046. X           by calling more() or displaying both on the same line.
  1047. Xget_nh_event()    -- Does window event processing (e.g. exposure events).
  1048. X           A noop for the tty and X window-ports.
  1049. Xint nhgetch()    -- Returns a single character input from the user.
  1050. X        -- In the tty window-port, nhgetch() assumes that tgetch()
  1051. X           will be the routine the OS provides to read a character.
  1052. X           Returned character _must_ be non-zero.
  1053. Xint nh_poskey(int *x, int *y, int *mod)
  1054. X        -- Returns a single character input from the user or a
  1055. X           a positioning event (perhaps from a mouse).  If the
  1056. X           return value is non-zero, a character was typed, else,
  1057. X           a position in the MAP window is returned in x, y and mod.
  1058. X           mod may be one of
  1059. X
  1060. X            CLICK_1        /* mouse click type 1 */
  1061. X            CLICK_2        /* mouse click type 2 */
  1062. X
  1063. X           The different click types can map to whatever the
  1064. X           hardware supports.  If no mouse is supported, this
  1065. X           routine always returns a non-zero character.
  1066. X
  1067. XB.  High-level routines:
  1068. X
  1069. Xprint_glyph(window, x, y, glyph)
  1070. X        -- Print the glyph at (x,y) on the given window.  Glyphs are
  1071. X           integers at the interface, mapped to whatever the window-
  1072. X           port wants (symbol, font, color, attributes, ...there's
  1073. X           a 1-1 map between glyphs and distinct things on the map).
  1074. Xchar yn_function(const char *ques, const char *choices, char default)
  1075. X        -- Print a prompt made up of ques, choices and default.
  1076. X           Read a single character response that is contained in
  1077. X           choices or default.  If choices is NULL, all possible
  1078. X           inputs are accepted and returned.  This overrides
  1079. X           everything else.  The choices are expected to be in
  1080. X           lower case.  Entering ESC always maps to 'q', or 'n',
  1081. X           in that order, if present in choices, otherwise it maps
  1082. X           to default.  Entering any other quit character (SPACE,
  1083. X           RETURN, NEWLINE) maps to default.
  1084. X        -- If the choices string contains a '#' then accept a count.
  1085. X           Place this value in the global "yn_number" and return '#'.
  1086. X        -- This uses the top line in the tty window-port, other
  1087. X           ports might use a popup.
  1088. Xgetlin(const char *ques, char *input)
  1089. X        -- Prints ques as a prompt and reads a single line of text,
  1090. X           up to a newline.  The string entered is returned without the
  1091. X           newline.  ESC is used to cancel, in which case the string
  1092. X           "\033\000" is returned.
  1093. X        -- getlin() must call flush_screen(1) before doing anything.
  1094. X        -- This uses the top line in the tty window-port, other
  1095. X           ports might use a popup.
  1096. Xget_ext_cmd(char *input)
  1097. X        -- This routine is only included if COM_COMPL is defined.
  1098. X           Get the extended command in a special way (command
  1099. X           completion on the tty window-port).
  1100. X        ** I think it is pretty lame that this has an #ifdef
  1101. X        ** on it.  The #ifdef COM_COMPL should either be yanked
  1102. X        ** inside this function or done away with.    -dean
  1103. Xplayer_selection()
  1104. X        -- Do a window-port specific player type selection.  If
  1105. X           player_selection() offers a Quit option, it is its
  1106. X           responsibility to clean up and terminate the process.
  1107. Xdisplay_file(str, boolean complain)
  1108. X        -- Display the file named str.  Complain about missing files
  1109. X           iff complain is TRUE.
  1110. Xupdate_inventory()
  1111. X        -- Indicate to the window port that the inventory has been
  1112. X           changed.
  1113. X        -- Merely calls display_inventory() for window-ports that
  1114. X           leave the window up, otherwise empty.
  1115. Xdoprev_message()
  1116. X        -- Display previous messages.  Used by the ^P command.
  1117. X        -- On the tty-port this scrolls WIN_MESSAGE back one line.
  1118. X
  1119. XC.  Window Utility Routines
  1120. X
  1121. Xinit_nhwindows()
  1122. X        -- Initialize the windows used by NetHack.  This can also
  1123. X           create the standard windows listed at the top, but does
  1124. X           not display them.
  1125. X        -- When the message window is created, the variable
  1126. X           flags.window_inited needs to be set to TRUE.  Othewise
  1127. X           all plines() will be done via raw_print().
  1128. X        ** Why not have init_nhwindows() create all of the "standard"
  1129. X        ** windows?  Or at least all but WIN_INFO?    -dean
  1130. Xexit_nhwindows()
  1131. X        -- Exits the window system.  This should dismiss all windows,
  1132. X           except the "window" used for raw_print().
  1133. Xwindow = create_nhwindow(type)
  1134. X        -- Create a window of type "type."
  1135. Xclear_nhwindow(window)
  1136. X        -- Clear the given window, when apropriate.
  1137. Xdisplay_nhwindow(window, boolean blocking)
  1138. X        -- Display the window on the screen.  If there is data
  1139. X           pending for output in that window, it should be sent.
  1140. X           If blocking is TRUE, display_nhwindow() will not
  1141. X           return until the data has been displayed on the screen,
  1142. X           and acknowledged by the user where appropriate.
  1143. X        -- All calls are blocking in the tty window-port.
  1144. X        -- Calling display_nhwindow(WIN_MESSAGE,???) will do a
  1145. X           --more--, if necessary, in the tty window-port.
  1146. Xdestroy_nhwindow(window)
  1147. X        -- Destroy will dismiss the window if the window has not
  1148. X           already been dismissed.
  1149. Xstart_menu(window)
  1150. X        -- Start using window as a menu.  You must call start_menu()
  1151. X           before add_menu().  After calling start_menu() you may not
  1152. X           putstr() to window.  Only windows of type NHW_MENU may be
  1153. X           used for menus.
  1154. Xadd_menu(window, ch, attr, str)
  1155. X        -- Add a text line to the given menu window.  If ch is 0,
  1156. X           then the line cannot be selected (e.g. a title).  Otherwise,
  1157. X           ch is the response needed to select the line.  The value
  1158. X           attr is the same as in putstr().
  1159. Xend_menu(window, ch, str, morestr)
  1160. X        -- Stop adding entries to the menu and flushes the window
  1161. X           to the screen (brings to front?).  Str gives other valid
  1162. X           (likely canceling) inputs (beyond any standard ones) and
  1163. X           ch is the response to any of them.  Morestr is a prompt
  1164. X           to give the user.  If morestr is NULL, no prompt will be
  1165. X           printed unless the window-port requires one (e.g. --more--
  1166. X           in the tty window-port).
  1167. Xchar select_menu(window)
  1168. X        -- Returns a valid response from the given menu (user typing,
  1169. X           mouse selection, whatever).  You may select_menu() from a
  1170. X           window multiple times -- the menu is saved until
  1171. X           start_menu() or destroy_nhwindow() is called on the window.
  1172. X        -- Note that NHW_MENU windows need not have select_menu
  1173. X           called for them. There is no way of knowing whether
  1174. X           select_menu() will be called for the window at
  1175. X           create_nhwindow() time.
  1176. X
  1177. XD.  Misc. Routines
  1178. X
  1179. Xmake_sound(???) -- To be determinded later.  THIS IS CURRENTLY UN-IMPLEMENTED.
  1180. Xnhbell()    -- Beep at user.  [This will exist at least until sounds are
  1181. X           redone, since sounds aren't attributable to windows anyway.]
  1182. Xmark_synch()    -- Don't go beyond this point in I/O on any channel until
  1183. X           all channels are caught up to here.  Can be an empty call
  1184. X           for the moment
  1185. Xwait_synch()    -- Wait until all pending output is complete (*flush*() for
  1186. X           streams goes here).
  1187. X        -- May also deal with exposure events etc. so that the
  1188. X           display is OK when return from wait_synch().
  1189. Xdelay_output()    -- Causes a visible delay of 50ms in the output.
  1190. X           Conceptually, this is similar to wait_synch() followed
  1191. X           by a nap(50ms), but allows asynchronous operation.
  1192. Xaskname()    -- Ask the user for a player name.
  1193. Xcliparound(x, y)-- Make sure that the user is more-or-less centered on the
  1194. X           screen if the playing area is larger than the screen.
  1195. X        -- This funciton is only defined if CLIPPING is defined.
  1196. Xnumber_pad(state)
  1197. X        -- Initialize the number pad to the given state.
  1198. Xsuspend_nhwindows(str)
  1199. X        -- Prepare the window to be suspended.
  1200. Xresume_nhwindows()
  1201. X        -- Restore the windows after being suspended.
  1202. X
  1203. Xstart_screen()    -- Only used on Unix tty ports, but must be declared for
  1204. X           completeness.  Sets up the tty to work in full-screen
  1205. X           graphics mode.  Look at win/tty/termcap.c for an
  1206. X           example.  If your window-port does not need this function
  1207. X           just declare an empty function.
  1208. Xend_screen()    -- Only used on Unix tty ports, but must be declared for
  1209. X           completeness.  The complement of start_screen().
  1210. X
  1211. X
  1212. XIII.  Global variables
  1213. X
  1214. XThe following global variables are defined in decl.c and must be used by
  1215. Xthe window interface to the rest of NetHack.
  1216. X
  1217. Xchar toplines[BUFSZ]    Contains the last message printed to the WIN_MESSAGE
  1218. X            window, used by Norep().
  1219. Xwinid WIN_MESSAGE, WIN_MAP, WIN_STATUS, WIN_INVEN
  1220. X            The four standard windows.
  1221. Xchar *AE, *AS;        Checked in options.c to see if we should switch
  1222. X            to DEC_GRAPHICS.  It is #ifdefed VMS and UNIX.
  1223. Xint LI, CO;        Set in sys/unix/ioctl.c.
  1224. X
  1225. XThe following appears to be Unix specific.  Other ports using the tty
  1226. Xwindow-port should also declare this variable in one of your sys/*.c files.
  1227. X
  1228. Xshort ospeed;        Set and declared in sys/unix/unixtty.c (don't
  1229. X            know about other sys files).
  1230. X
  1231. XIV.  New or respecified common, high level routines
  1232. X
  1233. XThese are not part of the interface, but mentioned here for your information.
  1234. X
  1235. Xchar display_inventory(lets,show_cost)
  1236. X        -- Calls a start_menu()/add_menu()/select_menu() sequence.
  1237. X           It returns the item selected, or '\0' if none is selected.
  1238. X           Returns '\033' if the menu was canceled.
  1239. Xraw_printf(str, ...)
  1240. X        -- Like raw_print(), but accepts arguments like printf().  This
  1241. X           routine processes the arguments and then calls raw_print().
  1242. X        -- The mac version #defines error raw_printf.  I think this
  1243. X           is a reasonable thing to do for most ports.
  1244. Xpline(str, ...)
  1245. X        -- Prints a string to WIN_MESSAGE using a printf() interface.
  1246. X           It has the variants kludge(), You(), Your(), and Norep()
  1247. X           which all use the same mechanism.  pline() requires the
  1248. X           variable "char toplines[]" be defined; Every putstr() on
  1249. X           WIN_MESSAGE must copy str to toplines[] for use by Norep()
  1250. X           and pline().  If the window system is not active
  1251. X           (!flags.window_inited) pline() uses raw_print().
  1252. X
  1253. X
  1254. XV.  Game startup
  1255. X
  1256. XThe following is the general order in which calls from main() should be made,
  1257. Xas they relate to the window system.  The actual code may differ, but the
  1258. Xorder of the calls should be the same.
  1259. X
  1260. X
  1261. Xchoose_windows(DEFAULT_WINDOW_SYS) /* choose a default window system */
  1262. Xinitoptions()               /* read the resource file */
  1263. Xinit_nhwindows()           /* initialize the window system */
  1264. Xprocess_options(argc, argv)       /* process command line options or equiv */
  1265. Xif(save file is present) {
  1266. X  display_gamewindows()           /* create & display the game windows */
  1267. X  dorestore()               /* restore old game; pline()s are OK */
  1268. X} else {
  1269. X  player_selection()           /* select a player type using a window */
  1270. X  display_gamewindows()           /* create & display the game windows */
  1271. X}
  1272. Xpline("Hello, welcome...");
  1273. X
  1274. XChoose_windows() is a common routine, and calling it in main() is necessary
  1275. Xto initialize the function pointer table to _something_ so that calls to
  1276. Xraw_print() will not fail.  Choose_windows() should be called almost
  1277. Ximmediately upon entering main().  Look at unixmain.c for an example.
  1278. X
  1279. XDisplay_gamewindows() is a common routine that displays the three standard
  1280. Xgame windows (WIN_MESSAGE, WIN_MAP, and WIN_STATUS).  It is normally called
  1281. Xjust before the "Hello, welcome" message.
  1282. X
  1283. XProcess_options() is currently still unique to each port.  There may be need
  1284. Xin the future to make it possible to replace this on a per window-port basis.
  1285. X
  1286. X
  1287. XVI.  Conventions
  1288. X
  1289. Xinit_nhwindows() is expected to display a gee-whiz banner window, including
  1290. Xthe Copyright message.
  1291. X
  1292. XPorts (MSDOS, TOS, MAC, etc) _may_ use window-port specific routines in
  1293. Xtheir port specific files, _AT_THEIR_OWN_RISK_.  Since "port" and
  1294. X"window-port" are orthogonal, you make your "port" code less portable by
  1295. Xusing "window-port" specific routines.  Every effort should be made to
  1296. Xuse window-port interface routines, unless there is something port
  1297. Xspecific that is better suited (e.g. msmsg() for MSDOS).
  1298. X
  1299. XThe tty window-port is contained in win/tty, the X window port is contained
  1300. Xin win/X11.  The files in these directories contain _only_ window port code,
  1301. Xand may be replaced completely by other window ports.
  1302. X
  1303. X
  1304. XVII.  Implementation and Multi-window support
  1305. X
  1306. XNetHack 3.1 supports multiple window systems in the same binary.  When
  1307. Xwriting a new window-port, you need to follow the following guidelines:
  1308. X
  1309. X1) Pick a unique prefix to identify your window-port.  For example, the tty
  1310. X   window port uses "tty"; the X11 window-port uses "X11".
  1311. X2) When declaring your interface function, preceed the function names with
  1312. X   your unique prefix.  E.g:
  1313. X
  1314. X    void tty_init_nhwindows()
  1315. X    {
  1316. X        /* code for initializing windows in the tty port */
  1317. X    }
  1318. X
  1319. X   When calling window functions from within your port code, we suggest
  1320. X   calling the prefixed version to avoid unnecessary overhead.  However,
  1321. X   you may safely call the non-prefixed version (e.g. putstr() rather than
  1322. X   tty_putstr()) as long as you #include "hack.h".  If you do not
  1323. X   include hack.h and use the non-prefixed names, you will get compile
  1324. X   or link-time errors.
  1325. X
  1326. X   We also suggest declaring all functions and port-specific data with
  1327. X   this prefix to avoid unexpected overlaps with other window-ports.
  1328. X   The tty and X11 ports do not currently follow this suggestion, but do
  1329. X   use separate non-overlapping convention for naming data and internal
  1330. X   functions.
  1331. X
  1332. X3) Declare a structure, "struct win_choices prefix_procs", (with your
  1333. X   prefix instead of "prefix") and fill in names of all of your
  1334. X   interface functions.  The first entry in this structure in the name
  1335. X   of your window-port, which should be the prefix.  The other entries
  1336. X   are the function addresses.
  1337. X
  1338. X   Assuming that you followed the convention in (2), you can safely copy
  1339. X   the structure definition from an existing window-port and just change
  1340. X   the prefixes.  That will guarantee that you get the order of your
  1341. X   initializations correct (not all compilers will catch out-of-order
  1342. X   function pointer declarations).
  1343. X
  1344. X3) Add a #define to config.h identifying your window-port in the
  1345. X   "Windowing systems" section.  Follow the "prefix_GRAPHICS" convention
  1346. X   for your window-port.
  1347. X
  1348. X4) Add your prefix to the list of valid prefixes listed in the "Known
  1349. X   systems are" comment.
  1350. X
  1351. X5) Edit makedefs.c and add a string for your windowing system to window_opts
  1352. X   inside an #ifdef prefix_GRAPHICS.
  1353. X
  1354. X6) Edit windows.c and add an external reference to your prefix_procs inside
  1355. X   an #ifdef prefix_GRAPHICS.  Also add an entry to the winchoices
  1356. X   structure for your window-port of the form:
  1357. X
  1358. X    #ifdef prefix_GRAPHICS
  1359. X    { &prefix_procs, prefix_init_function },
  1360. X    #endif
  1361. X
  1362. X   The init_function is necessary for some compilers and systems to force
  1363. X   correct linking.  If your system does not need such massaging, you
  1364. X   may put a null pointer here.
  1365. X
  1366. X   You should declare prefix_procs and prefix_init_function as extern's
  1367. X   in your win*.h file, and #include that file at the beginning of
  1368. X   windows.c, also inside an #ifdef prefix_GRAPHICS.  Some win*.h files
  1369. X   are rather sensitive, and you might have to duplicate your
  1370. X   prefix_procs and prefix_init_function's instead of including win*.h.
  1371. X   The tty port includes wintty.h, the X11 port duplicates the declarations.
  1372. X
  1373. X7) If your port uses Makefile.src, add the .c and .o files and an
  1374. X   appropriate comment in the section on "WINSRC" and "WINOBJ".  See
  1375. X   Makefile.src for the style to use.  If you don't use Makefile.src,
  1376. X   we suggest using a similar convention for the make-equivalent used
  1377. X   on your system.  Also add your new source and binaries to WINSRC and
  1378. X   WINOBJ (if you want the NetHack binary to include them, that is).
  1379. X
  1380. X8) Look at your port's portmain.c (the file containing main()) and make
  1381. X   sure that all of the calls match the the requirements laid out in
  1382. X   Section V.
  1383. X
  1384. XNow, proceed with compilation and installation as usual.  Don't forget
  1385. Xto edit Makefile.src (or its equivalent) and config.h to set the
  1386. Xwindow-ports you want in your binary, the default window-port to use,
  1387. Xand the .o's needed to build a valid game.
  1388. X
  1389. XOne caveat.  Unfortunately, if you incorrectly specify the
  1390. XDEFAULT_WINDOW_SYS, NetHack will dump core (or whatever) without
  1391. Xprinting any message, because raw_print() cannot function without first
  1392. Xsetting the window-port.
  1393. END_OF_FILE
  1394. if test 20576 -ne `wc -c <'doc/window.doc'`; then
  1395.     echo shar: \"'doc/window.doc'\" unpacked with wrong size!
  1396. fi
  1397. # end of 'doc/window.doc'
  1398. fi
  1399. echo shar: End of archive 53 \(of 108\).
  1400. cp /dev/null ark53isdone
  1401. MISSING=""
  1402. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 \
  1403. 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 \
  1404. 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 \
  1405. 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 \
  1406. 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 \
  1407. 101 102 103 104 105 106 107 108 ; do
  1408.     if test ! -f ark${I}isdone ; then
  1409.     MISSING="${MISSING} ${I}"
  1410.     fi
  1411. done
  1412. if test "${MISSING}" = "" ; then
  1413.     echo You have unpacked all 108 archives.
  1414.     echo "Now execute 'rebuild.sh'"
  1415.     rm -f ark10[0-8]isdone ark[1-9]isdone ark[1-9][0-9]isdone
  1416. else
  1417.     echo You still need to unpack the following archives:
  1418.     echo "        " ${MISSING}
  1419. fi
  1420. ##  End of shell archive.
  1421. exit 0
  1422.