From StrategyWiki, the video game walkthrough and strategy guide wiki
Jump to navigation Jump to search
(→‎Boulders: links should use "commons:")
mNo edit summary
 
(35 intermediate revisions by 13 users not shown)
Line 1: Line 1:
{{Header Nav|game=NetHack}}
This visual tour introduces one to [[../]]. This chapter describes the beginning keys and dungeon exploration. More advanced combat will be at [[../Combat/]].
This visual tour introduces one to [[../]]. This chapter describes the beginning keys and dungeon exploration. More advanced combat will be at [[../Combat/]].


Line 6: Line 7:
* the various types of items are unfamiliar
* the various types of items are unfamiliar


{{wikipedia|curses (programming library)}}
==Windows ports==
NetHack makes this easier by providing graphical user interfaces in environments like x11 and Microsoft Windows. This tutorial will instead describe the '''tty''' (''terminal'') port. This port uses only ASCII characters and runs on a terminal, such as a Unix or DOS console or a telnet client. By learning the "tty" port, one can play on public telnet servers (like [http://alt.org/nethack nethack.alt.org]). One will also start recognising the ASCII letters of each monster (useful for reading [[comixpedia:Dudley's Dungeon|Dudley's dungeon webcomic]]).
This screenshots in this tutorial use the '''tty''' (''terminal'') port of NetHack. This port uses only ASCII characters and runs on a terminal, such as a Unix console (through the [[Commons:en:curses (programming library)|curses library]]), DOS console or a telnet client. By learning the "tty" port, one can play on public telnet servers (like [http://alt.org/nethack nethack.alt.org]). One will also start recognising the ASCII letters of each monster. The ASCII letters are useful for reading [http://www.comixpedia.org/index.php/Dudley's_Dungeon Dudley's dungeon webcomic]; there is also one item in the game that will ask for them.


This tutorial will introduce the controls for the "tty" player as an example player explores the first two levels of the dungeon.
Graphical ports, such as the Windows, Macintosh, X11, and Qt versions of NetHack, use the same controls. However, you will also have menus (useful if you forget the key for some command) and you might see the dungeon as graphical tiles, not ASCII characters.


===Configuring NetHack===
For this tutorial, the screenshots had "color" and "DECgraphics" turned on. (DECgraphics works in xterm and some other Unix terminals and telnet clients, while IBMgraphics looks nice in DOS.) Boulders were configured to display as <tt>'''8'''</tt>, which is easier to see than the default <tt>'''`'''</tt>. The configuration was:
The configuration used in the screenshots below is:
OPTIONS=!autopickup,autodig
  OPTIONS=color,hilite_pet,lit_corridor,DECgraphics,boulder:8
  OPTIONS=color,hilite_pet,lit_corridor,DECgraphics,boulder:8
  OPTIONS=showexp,showscore,time,msg_window:f
  OPTIONS=showexp,showscore,time,msg_window:f
OPTIONS=fruit:salad,catname:Morris,dogname:Fido
OPTIONS=race:elf,disclose:+i+a+v+g+c


In particular, note the use of "color" and "DECgraphics" to enhance the graphics. Boulders will appear as <tt>'''8'''</tt>, which is easier to see than <tt>'''`'''</tt>, the default for boulders.
==Starting NetHack==
When you start NetHack, it will automatically load your saved game if you have one. Otherwise, you be prompted for a new character.


===Starting NetHack===
Shall I pick a character for you? [ynq]
When one starts NetHack, one of two things happens:
* the saved game loads itself, or
* you are prompted for a new character


This is a new game. By default, the prompt lets you pick race, role, and gender. The example configuration uses "race:elf", so elf is assumed as the race:
If you have configured some defaults, for example <tt>OPTIONS=race:elf</tt>, then the prompt might look different:


[[image:nethack-kernigh-22oct2005-01.png]]
Shall I pick your elf's role and gender for you? [ynq]


Press '''y''' to let the game pick randomly or press '''n''' to use menus to pick. (Press '''q''' to quit NetHack.) After choosing the character, the game introduces the plot:
At this prompt, press '''[y]''' to let the game pick your character's race, role, gender, and alignment, or press '''[n]''' to use menus to pick them yourself. (Press '''[q]''' to quit NetHack.) After choosing the character, the game introduces the plot:


[[image:nethack-kernigh-22oct2005-02.png]]
[[File:nethack-kernigh-22oct2005-02.png]]


The game now stops at a '''--More--''' prompt. This prompt gives the player time to read some text before NetHack decides to show additional text or return to the map. When you see this prompt, read (or skip) the text, then press space bar to proceed.
The game now stops at a '''--More--''' prompt. This prompt gives the player time to read some text before NetHack decides to show additional text or return to the map. When you see this prompt, read (or skip) the text, then press space bar to proceed.


After proceeding from the plot introduction, the game shows the map for the first time. This is a map of dungeon level 1:
After proceeding from the plot introduction, the game shows the map for the first time. You always start on dungeon level 1 (shown as <tt>Dlvl:1</tt> in the bottom row of the tty port). Here is an example of what dungeon level 1 might look like:


[[image:nethack-kernigh-22oct2005-03.png]]
[[File:nethack-kernigh-22oct2005-03.png]]


There are some things to notice about this screen:
There are some things to notice about this screen:
* In NetHack, ''you and the other characters are literally characters''. The <tt>'''@'''</tt> with a cursor on it is you, the player.
* In NetHack, ''you and the other characters are literally characters''. The '''@''' with a cursor on it is you, the player.
** The <tt>'''d'''</tt> is a pet little dog. The '''d''' is highlighted because "hilite_pet" is on the configuration.
** The '''d''' is a pet little dog. The '''d''' is highlighted because "hilite_pet" is in the configuration.
** You might start with a cat '''f''' or horse '''u''' instead. (Remember, "f" means [[wiktionary:feline|feline]] and "u" means [[wiktionary:unicorn|unicorn]]. Whoever added horses to this game thought that they were similar enough to unicorns to use "u".)
** You might start with a cat '''f''' or horse '''u''' instead. (Remember, "f" means [[wiktionary:feline|feline]] and "u" means [[wiktionary:unicorn|unicorn]]. NetHack uses "u" for horses too.)
* ''Most of the screen is blank.'' The player has not explored most of this dungeon level.
* ''Most of the screen is blank.'' You can see the room that you are in, because it is lit (with dots '''.'''), however you have not explored the other parts of the dungeon so you do not know what is there.
** One room is visible. We can see the entire room because it is lit with dots '''.''' showing the entire room. (This dungeon contains many lit, rectangular rooms!)
** Because we have "DECgraphics", the wall looks like a box instead of hyphens '''-''' and pipes '''|'''. The wall contains closed doors '''+''' and a doorway '''.''' without a door. We cannot see past the doorway because it is not lit.
* If you start your own game, the room will look different. That is because NetHack ''randomly generates'' the dungeon each time. The room in the example does not contain items, but does have a fountain '''{''' east of the player.


===Moving Around===
This particular room had a fountain '''{''' (or '''⌠''' with IBMgraphics - [http://nethackwiki.com/wiki/Fountain#Symbol note on symbol]) in it. NetHack also drew a box around the room; if you do not use DECgraphics/IBMgraphics, then NetHack will use hyphens '''-''' and pipes '''|'''.
{|style="float: right; background-color: #cccccc; font-size: larger;" border="1"
 
==Moving Around==
{|style="float:right; margin: 0 0 1em 1em; background-color: #cccccc; font-size: larger;" border="1"
|+keys for movement
|+keys for movement
|''y''
|[y]
|'''k'''
|'''[k]'''
|''u''
|[u]
|-
|-
|'''h'''
|'''[h]'''
|
|
|'''l'''
|'''[l]'''
|-
|-
|''b''
|[b]
|'''j'''
|'''[j]'''
|''n''
|[n]
|}
|}
Some graphical versions of NetHack let you click on squares to move there. Otherwise, you will need to learn the keys to move around.
If you had switched on the "number_pad" option, then you get to use the number keys '''[12346789]''' to move in eight directions. ''Most ports do not let you use the arrow keys.'' For the best controls (and also if your keyboard has no numeric keypad), you should leave "number_pad" off and use the '''[yuhjklbn]''' keys to move your '''@''' around. This system consists of four "vi" keys to move in four directions (up, down, left, right), and four "diagonal" keys for diagonal movement.


Learn the eight moving keys so we can move the '''@''' around to explore the dungeon. These keys consist of four "vi" keys for moving in four directions (up, down, left, right), and four "diagonal" keys for diagonal movement.
===vi keys===
The '''four vi keys''' are '''[h]''', '''[j]''', '''[k]''', '''[l]'''. The use of these keys was made popular by a program called "vi", a traditional text editor for Unix. (The text in this section originates from [[Wikibooks:Learning vi:Basic tasks]].)


====vi keys====
* The '''[h]''' key moves you '''left'''.
The '''four vi keys''' are "h", "j", "k", "l". These keys originate from the "vi" editor. This text originates from [[Learning vi:Basic tasks]].
* The '''[j]''' key moves you '''down'''.
* The '''[k]''' key moves you '''up'''.
* The '''[l]''' key moves you '''right'''.


We can move our NetHack <tt>'''@'''</tt> character around the dungeon by using the "h", "j", "k", and "l" keys. '''Note''': your arrow keys may be set up to work (especially on DOS), and you can use them if you like, but for proficiency, you should learn to use the letter keys. Many copies of NetHack, especially on Unix, do not have working arrow keys.
If you have trouble remembering this, keep in mind that '''[h]''' is leftmost, the letter '''[j]''' goes down below the line, the letter '''[k]''' pokes up above the line, and the '''[l]''' key is rightmost. (J also resembles an arrow pointing downward, if you squint a bit.)


*The "h" key moves you '''left'''.
The ''four diagonal keys'' are '''[y]''', '''[u]''', '''[b]''', '''[n]'''. Look at their position on the keyboard to see how they work. The upper-left key "y" moves up and left, and so on.
*The "j" key moves you '''down'''.
*The "k" key moves you '''up'''.
*The "l" key moves you '''right'''.


If you have trouble remembering this, keep in mind that "h" is leftmost, the letter "j" goes down below the line, the letter "k" pokes up above the line, and the "l" key is rightmost. (J also resembles an arrow pointing downward, if you squint a bit.)
If you are only using the vi keys, then you should still use the diagonal keys when you need them: to fight monsters diagonally adjacent to you, to squeeze into certain small diagonal paths, and to step around certain obstacles.


====diagonal keys====
It is a matter of personal preference on whether you want to use the vi keys or the number pad.  The main advantage of the number pad is it's intuitiveness, although the vi keys allow you to more quickly perform some actions and allow play on a keyboard that has no number pad.
The ''four diagonal keys'' are "y", "u", "b", "n". These keys are not from vi. Look at their position on the keyboard to see how they work. The upper-left key "y" moves up and left, et cetera.


New players might prefer to use only the vi keys. The diagonal keys are necessary when fighting monsters and for moving faster on diagonal paths.
==Doors and corridors==
Now let us continue with the example game. To explore the dungeon level, you need to leave the room. Some exits have doors in them, while some are just empty doorways.


===Exploring a Dungeon Path===
The player in the example game is going to try to open a door. First the player walks up to the door. To open a door, stand next to it and press '''[o]'''. At the prompt,
Continuing with the example game, the player starts moving around in the room and [[commons:image:nethack-kernigh-22oct2005-04.png|encounters a door]].


To open a door, press '''o''' for the open command. At the prompt,
  In which direction?
  In which direction?
because this door is to the left, press '''h''' for left to open the door:
[[image:nethack-kernigh-22oct2005-05.png]]
The player now uses '''h''', '''y''', and '''k''' to travel along the path. The player encounters some intersections but continues to travel northwest:
[[image:nethack-kernigh-22oct2005-06.png]]


In the darkness of the above corridor, the player can see ahead by only one square, but the player memorises the location of all discovered corridors and rooms.
press the key for the direction of the door. (If "the door resists" then try using '''[o]''' to open the door again.) In the example, the player pressed '''[h]''' to open the door on the left:


The player [[commons:image:nethack-kernigh-22oct2005-07.png|discovers a second room]]. Remember that ''every dungeon is randomly generated'', so when you play NetHack, you will not find the room in the same place. After the example player enters the room, the pet dog follows the player into the room:
[[File:nethack-kernigh-22oct2005-05.png]]


[[image:nethack-kernigh-22oct2005-08.png]]
(If you ever want to close a door, then use the '''[c]''' command. Some monsters will not be able to pass closed doors, while some others might have to momentarily stop to open the door.) The example player now travels into the corridor.


The player opens another door and a [[commons:image:nethack-kernigh-22oct2005-09.png|sees a third lit room come into view]]. On entering the room, the player discovers a potion '''!''' that is the first item that this player finds:
[[File:nethack-kernigh-22oct2005-06.png]]


[[image:nethack-kernigh-22oct2005-10.png]]
In the darkness of the above corridor, the player can only see as far as a "night vision" radius of one square. (So the pet dog or monsters might be in the corridor that the hero already passed through, but the hero simply cannot see them now.) The game map will always memorise the location of corridors and rooms that you already saw.


Because the dungeon is random, the items are randomly placed. If you are lucky, then you find good items early in the dungeon.
If you follow the corridors, you should be able to discover a second room. Because ''every dungeon is randomly generated'', you will never find the rooms in the same place. In the example game, the hero had lost sight of the pet dog. Now the pet dog follows the player into the room:


===Taking an Item===
[[File:nethack-kernigh-22oct2005-08.png]]


At first, we only know that there is a potion. (Because option "color" is on, the potion looks red.) The player can discover which object this is by walking to its square.
This room was empty, so the example player now opens another door and  sees a third room come into view. On entering the room, the player discovers a potion '''!''' on the floor:


In this case, we discover that there are two items on one square:
[[File:nethack-kernigh-22oct2005-10.png]]


[[image:nethack-kernigh-22oct2005-11.png]]
The dungeon has items in it, but those items are at random places. In some games, the random number generator (or "Random Number God" as some say) might favor you enough in such games that you find good items early in the dungeon.


The player presses '''[SPACE]''' to dismiss the '''--More--''' prompt, and then grabs the items. To pick up an item from the dungeon floor, press '''[,]''' (comma). A comma looks vaguely as if it is pointing to the ground. (If option "autopickup" is on, then the player takes the items without pressing comma.)
==Taking objects from the floor==
The command to pick up objects from the floor is '''[,]''' (comma). First you need to move onto the square with the object, then you press '''[,]''' to take it.


Normally, pressing comma takes the item. In this case, NetHack wants to know whether to take one item or both. It presents a menu:
In the example game, the player first only knows that there is a potion there. (Because option "color" is on, the potion looks red.) When the player walks onto the square, he discovers that there are two objects on the square:


[[image:nethack-kernigh-22oct2005-12.png]]
Things that are here:     (screenshot)
a puce potion
10 gold pieces
--More--


This is a typical menu. We can press '''[a]''' or '''[b]''' on the keyboard to [[commons:image:nethack-kernigh-22oct2005-14.png|select the menu items]]. Though some menus disappear after the selection of one item, this menu allows for the selection of multiple items. Thus, the player presses '''[SPACE]''' again to dismiss the menu.
As usual, pressing '''[SPACE]''' dismisses the "--More--" prompt. Because there is more than one object, when the player presses '''[,]''', a menu appears:


When the menu is dismissed, we pick up the items:
Pick up what?            (screenshot)
Coins
a - 10 gold pieces
Potions
b - a puce potion


[[image:nethack-kernigh-22oct2005-15.png]]
The use of this menu is simple. The "a -" and "b -" indicate that you can press '''[a]''' and '''[b]''' to select the object. These become "a +" and "b +" if you select them; you can also deselect them by pressing '''[a]''' or '''[b]''' again. When the player selects both objects and presse '''[SPACE]''' to dismiss the menu:


We add both the potion and the money to the "inventory". The [[wikt:inventory|inventory]] (which one can view by pressing '''[i]''' for inventory) is the list of all items that this player carries. The 10 gold pieces are added to the "purse". Notice the "$:10" in the bottom line; it shows how much money this player has. The text "g - a puce potion" indicates that this potion was placed at inventory letter "g". When we want to use or drop items, our potion will be listed at "g" in the NetHack menus.
[[File:nethack-kernigh-22oct2005-15.png]]


What does a "[[wikt:puce|puce]] potion" do? This player does not know. Pressing '''[q]''' (quaff command) then '''[g]''' (inventory letter) to qauff (drink) our potion might show us, but this player chooses to keep the potion.
Both the potion and the money are now in the player's ''inventory''. The [[wikt:inventory|inventory]] is the list of all items that this player carries. You can press '''[i]''' to look at your inventory as much as you want; the command does not use any game time, so you can even use '''[i]''' if you are surrounded by monsters. The 10 gold pieces go to the ''purse''. Money does not appear in the inventory screen, but the "$:10" on the bottom line here shows how much money this player has.


===Handling locked doors===
What about "g - a puce potion"? The "g" is the ''inventory letter'' in this potion. You can now use the potion with other game commands; for example '''[d] [g]''' would drop this potion back to the floor, while '''[q] [g]''' will cause the hero to drink (quaff) this potion. If you forget the letter, then you can check with '''[i]''', or you can use '''[d] [?]''' or '''[q] [?]''' to choose your potion from a menu.


Next, the player [[commons:image:nethack-kernigh-22oct2005-16.png|encounters a locked door]]. Obviously, only trying to open the door will not work.
Then what does a "[[wikt:puce|puce]] potion" do? ''We do not know.'' The presence of unidentified items is one of the main traits of most roguelike games. This potion might be healing, it might cause sickness, it might do something else. For now, the example player chooses only to carry the potion around.


The game documentation mentions the kick command '''^D''', which means to hold '''[Control]''' and press '''[D]'''. It says that "D" means door. Does that mean that we can kick doors?
==Breaking locked doors==
When you encounter a locked door, you cannot open it; you must first unlock or break it somehow. Because NetHack puts locked doors in random places, you need to be able to pass them if you want to explore most of the dungeon.


So the player presses '''^D''' and then '''[l]''' to kick the door to the right. [[commons:image:nethack-kernigh-22oct2005-17.png|WHAMMM!!!]] The player kicks the door again and again, and succeeds:
The game documentation mentions the kick command '''^D''', which means to hold '''[Control]''' and press '''[D]'''. (Those using the "number_pad" option can also press '''[k]''' to kick.) It also mentions that "D" means door. Is it helpful to kick doors?


[[image:nethack-kernigh-22oct2005-18.png]]
Witness the example player, encountering a locked door, kick the door. The player presses '''^D''' and then '''[l]''' to kick the door to right. WHAMMM!!! After a second kick, this particular door breaks:


When you need to pass a locked door to continue exploring the dungeon, remember to use the '''^D''' command to destroy the door. (In the future, you might learn other ways of handling locked doors.)
[[File:nethack-kernigh-22oct2005-18.png|"As you kick the door, it crashes open!"]]


===Searching for secret paths===
Whenever you need to pass a locked door, remember to use the '''^D''' command, unless you find another way to deal with it.
Using '''[l]''', '''[n]''', and '''[j]''', the player explores the path, [[commons:image:nethack-kernigh-22oct2005-19.png|but it ends]]. The player presses '''[s]''' (the search command) repeatedly to search for a continuation, but [[commons:image:nethack-kernigh-22oct2005-20.png|fails to find one]]. So the player turns back and moves upward.


At one point Fido, the pet dog, blocks the path. The message [[commons:image:nethack-kernigh-22oct2005-21.png|"You displaced Fido."]] means that the pet moved away when you tried to move to the pet's square.
==Displacing pets==
If your pet is blocking your path, sometimes you can try to move onto its square anyway. Sometimes, "You stop. Fido is in the way!", but sometimes "You displaced Fido." and you and your pet swap positions.


Sometimes you can hear "sound" in NetHack. This does not involve your computer speakers; it is a message that the player heard something:
==Searching for secret paths==
NetHack generates secret exits out of some of the rooms, and secret continuations of some corridors. By using the '''[s]''' command, you can search the eight surrounding squares for secret paths. You will often need to use this command repeatedly. A shortcut for using the command multiple times is to type a number before it, so '''[1] [0] [s]''' will search ten times. (In "number_pad" mode, use '''[n]''' before the number, like '''[n] [1] [0] [s]'''.) ''Avoid holding down the '''[s]''' key or any key in NetHack. The command will run repeatedly, but a monster might come and can kill you before you are able to react and release the key.''


[[image:nethack-kernigh-22oct2005-22.png]]
In the example game, the player followed one such path to its end and searched with '''[s]''' several times discovering nothing. So the player went in a different direction. Now the player has reached the end of another path:


This path has also ended. The player presses '''[s]''' repeatedly to search. (''Warning:'' Do not hold down the '''[s]''' key or any key in NetHack. You might not be able to release it before a monster attacks ands kills your character.) We find a door:
[[File:nethack-kernigh-22oct2005-22.png|"You hear the footsteps of a guard on patrol."]]


[[image:nethack-kernigh-22oct2005-23.png]]
("You hear the footsteps of a guard on patrol." is an example of a sound in NetHack. These sounds can give you hints if you know what they mean.) The player now taps '''[s]''' several times to search. The player thus finds a door, a '''+''' where the wall had been:


Using '''[o]''' (open command) '''[h]''' (left direction) the player opens the door. [[commons:image:nethack-kernigh-22oct2005-24.png|First it resists]] but [[commons:image:nethack-kernigh-22oct2005-25.png|then it opens]].
|........|          (screenshot)
|........<span style="color: brown;">+</span>@
|........|#
|.........###


Though in this case there was no necessity in open this door, remember to use '''[s]''' to find such doors when you can find no other paths to continue.
Using '''[o]''' '''[h]''' the player opens the door. First it resists but then it opens.


===Boulders===
You can also search from the inside of rooms, trying to find secret doors to exit. Try using '''[s]''' to reach seemingly inaccessible parts of the map.


==Boulders==
The appearance of a boulder depends on the "boulder" option. By default it is <tt>`</tt>, but for this game it was set to <tt>8</tt>.
The appearance of a boulder depends on the "boulder" option. By default it is <tt>`</tt>, but for this game it was set to <tt>8</tt>.


A [[commons:image:nethack-kernigh-22oct2005-26.png|boulder]] blocks the path of the player. The player is able to [[commons:image:nethack-kernigh-22oct2005-27.png|push the boulder]] right using '''[l]'''. Note that pressing '''[l]''' normally moves the character right, and because a boulder is blocking the path, the player tries to push the boulder right when moving right.
A boulder blocks the path of the player. The player is able to push the boulder right using '''[l]'''. Note that pressing '''[l]''' normally moves the character right, and because a boulder is blocking the path, the player tries to push the boulder right when moving right.


(The player is pushing the boulder into an unknown path. It is better to push it into an already-explored path, so that the player knows that the boulder will not permanently block something.)
(The player is pushing the boulder into an unknown path. It is better to push it into an already-explored path, so that the player knows that the boulder will not permanently block something.)
Line 172: Line 174:
The following is a good position for a boulder:
The following is a good position for a boulder:


[[image:nethack-kernigh-22oct2005-28.png]]
[[File:nethack-kernigh-22oct2005-28.png]]


Notice that the player can now pass around the boulder by pressing '''[u]''' (diagonal up-right movement) or '''[n]''' (diagonal down-right movement). This is one of those situations where knowing the four diagonal keys (y,u,b,n) instead of using only the vi keys (h,j,k,l) is important.
Notice that the player can now pass around the boulder by pressing '''[u]''' (diagonal up-right movement) or '''[n]''' (diagonal down-right movement). This is one of those situations where knowing the four diagonal keys (y,u,b,n) instead of using only the vi keys (h,j,k,l) is important.


=== Armor, gold, gem, light ===
==Armor, gold, gem, light==
 
Now, the player encounters another end of path, opens another secret door (finding Fido, the pet dog), goes downward to another room, finds another end of path, and discovers a third secret door. After opening the door, the map looks like this:
Now, the player [[commons:image:nethack-kernigh-22oct2005-29.png|encounters another end of path]], [[commons:image:nethack-kernigh-22oct2005-30.png|opens another secret door]] (finding Fido, the pet dog), [[commons:image:nethack-kernigh-22oct2005-31.png|goes downward to another room]], [[commons:image:nethack-kernigh-22oct2005-32.png|finds another end of path]], and discovers a [[commons:image:nethack-kernigh-22oct2005-33.png|third secret door]]. After opening the door, the map looks like this:


[[image:nethack-kernigh-22oct2005-34.png]]
[[File:nethack-kernigh-22oct2005-34.png]]


The player [[:image:nethack-kernigh-22oct2005-35.png|steps in]] and sees two items:
The player steps in and sees two items:


[[image:nethack-kernigh-22oct2005-36.png]]
[[File:nethack-kernigh-22oct2005-36.png]]


The <tt>[</tt> represents armor. Walking to it shows that it is [[commons:image:nethack-kernigh-22oct2005-37.png|a pair of fencing gloves]]. The player presses '''[,]''' (comma) and takes it. The game assigns inventory letter "h":
The <tt>[</tt> represents armor. Walking to it shows that it is a pair of fencing gloves. The player presses '''[,]''' (comma) and takes it. The game assigns inventory letter "h":


[[image:nethack-kernigh-22oct2005-39.png]]
[[File:nethack-kernigh-22oct2005-39.png]]


The <tt>$</tt> represents gold. In this case, the player [[commons:image:nethack-kernigh-22oct2005-40.png|adds 41 gold pieces to the purse]] for "$:51" total.
The <tt>$</tt> represents gold. In this case, the player adds 41 gold pieces to the purse for "$:51" total.


Now the player proceeds out the door and discovers another room. Note that from outside the room, only some parts of the lit room are visible:
Now the player proceeds out the door and discovers another room. Note that from outside the room, only some parts of the lit room are visible:


[[image:nethack-kernigh-22oct2005-41.png]]
[[File:nethack-kernigh-22oct2005-41.png]]


The other parts of the room cannot be seen because the player is looking from the wrong angle. When the player steps in, more of the room is revealed. Stepping in reveals a <tt>*</tt> representing a gem:
The other parts of the room cannot be seen because the player is looking from the wrong angle. When the player steps in, more of the room is revealed. Stepping in reveals a <tt>*</tt> representing a gem:


[[image:nethack-kernigh-22oct2005-42.png]]
[[File:nethack-kernigh-22oct2005-42.png]]
 
The player [[commons:image:nethack-kernigh-22oct2005-43.png|takes two violet gems]] and [[commons:image:nethack-kernigh-22oct2005-44.png|leaves the room]] (finding Fido, the pet dog). After a walk left, up, right, and down, the player [[commons:image:nethack-kernigh-22oct2005-45.png|another sound]]. ("You hear the splashing of a [[wikt:naiad|naiad]].")


Continuing, the player [[commons:image:nethack-kernigh22-oct2005-46.png|moves right]]. Again, the player can at first only see part of the room:
The player takes two violet gems and leaves the room (finding Fido, the pet dog). After a walk left, up, right, and down, the player another sound. ("You hear the splashing of a [[wikt:naiad|naiad]].")


[[image:nethack-kernigh-22oct2005-48.png]]
Continuing, the player moves right. Again, the player can at first only see part of the room:


But there is a surpise when we step in...
[[File:nethack-kernigh-22oct2005-48.png]]


=== Identifying a character on the screen ===
But there is a surprise when we step in...


==Identifying a character on the screen==
This player has encountered a colon '''<tt>:</tt>''' on the screen. The staircase to the second dungeon level <tt>&gt;</tt> is visible, but how do we handle the colon?
This player has encountered a colon '''<tt>:</tt>''' on the screen. The staircase to the second dungeon level <tt>&gt;</tt> is visible, but how do we handle the colon?


[[image:nethack-kernigh-22oct2005-49.png]]
[[File:nethack-kernigh-22oct2005-49.png]]


We are now interested in two keys on the keyboard.
We are now interested in two keys on the keyboard.
Line 220: Line 220:
Because the colon '''<tt>:</tt>''' is on a different square than our player, we need to use the semicolon '''[;]''' key, not the colon '''[:]''' key.
Because the colon '''<tt>:</tt>''' is on a different square than our player, we need to use the semicolon '''[;]''' key, not the colon '''[:]''' key.


Pressing '''[;]''' makes a "Pick an object." prompt. To pick an object, you move with the (h,j,k,l) and (y,u,b,n) keys as normal, except that this moves the cursor instead of the player '''<tt>@</tt>'''.
Pressing '''[;]''' makes a "Pick an object." prompt. To pick an object, you move with the (h,j,k,l) and (y,u,b,n) keys as normal, except that this moves the cursor without moving the player '''<tt>@</tt>'''.


Here is the result of pressing '''[;]''' and then pressing '''[y]''' to move the cursor to the colon:
Here is the result of pressing '''[;]''' and then pressing '''[y]''' to move the cursor to the colon:


[[image:nethack-kernigh-22oct2005-50.png]]
[[File:nethack-kernigh-22oct2005-50.png]]


Now, with the cursor over the colon '''<tt>:</tt>''' on the screen, press the colon '''[:]''' key now to look at that square. (In the "Pick an object." mode, one can use one eye '''[.]''' to take a brief look, or both eyes '''[:]''' to take a look that involves reading more text, if available.)
Now, with the cursor over the colon '''<tt>:</tt>''' on the screen, press the colon '''[:]''' key now to look at that square. (In the "Pick an object." mode, one can use one eye '''[.]''' to take a brief look, or both eyes '''[:]''' to take a look that involves reading more text, if available.)
Line 230: Line 230:
We learn that the colon '''<tt>:</tt>''' at the screen is "a lizard (newt)":
We learn that the colon '''<tt>:</tt>''' at the screen is "a lizard (newt)":


[[image:nethack-kernigh-22oct2005-51.png]]
[[File:nethack-kernigh-22oct2005-51.png]]


Note the '''--More--''' prompt, which appears because we pressed colon '''[:]''' to ask for more information if it was available. Pressing '''[SPACE]''' advances us beyond the prompt. We then read the NetHack "database" entry for newts:
Note the '''--More--''' prompt, which appears because we pressed colon '''[:]''' to ask for more information if it was available. Pressing '''[SPACE]''' advances us beyond the prompt. We then read the NetHack "database" entry for newts:


[[image:nethack-kernigh-22oct2005-52.png]]
[[File:nethack-kernigh-22oct2005-52.png]]


As this is another '''--More--''' prompt, the player finishes reading and presses '''[SPACE]'''.
As this is another '''--More--''' prompt, the player finishes reading and presses '''[SPACE]'''.


=== First combat ===
==First combat==
 
The dungeon contains many ''monsters'' which try to kill the player. A monster is normally represented by a letter '''<tt>A-Z</tt>''' or '''<tt>a-z</tt>''', but there are other monsters such as apostrophes '''<tt>'</tt>''', semicolons '''<tt>;</tt>''', and colons '''<tt>:</tt>''' including this newt.
The dungeon contains many ''monsters'' which try to kill the player. A monster is normally represented by a letter '''<tt>A-Z</tt>''' or '''<tt>a-z</tt>''', but there are other monsters such as apostrophes '''<tt>'</tt>''', semicolons '''<tt>;</tt>''', and colons '''<tt>:</tt>''' including this newt.


Some monsters are ''peaceful''; NetHack not only identifies them as such when you look at them with the colon '''[:]''' key, but also warns you if you try to attack them in melee.
Some monsters are ''peaceful''; NetHack not only identifies them as such when you look at them with the colon '''[:]''' key, but also warns you if you try to attack them in melee.


==== Ouch ====
===Ouch===
 
Yet this newt is apparently not peaceful. When the example player pressed '''[k]''' and move upward, the newt responded with an attack:
Yet this newt is apparently not peaceful. When the example player pressed '''[k]''' and move upward, the newt responded with an attack:


[[image:nethack-kernigh-22oct2005-53.png]]
[[File:nethack-kernigh-22oct2005-53.png]]


Notice the meter for ''health points'', it reads "HP:12(14)". This means that the player is hurt; from 14 points possible, this player has only 12. Should this number reach 0, our player dies.
Notice the meter for ''health points'', it reads "HP:12(14)". This means that the player is hurt; from 14 points possible, this player has only 12. Should this number reach 0, our player dies.
Line 256: Line 254:
* Flee from the newt
* Flee from the newt


==== Attack ====
===Attack===
 
The player attempts to fight. To fight a monster in ''melee'', one simply presses the key to move to the square of the monster. Because the monster is blocking that square, NetHack interprets the key as an instruction to attack the monster.
The player attempts to fight. To fight a monster in ''melee'', one simply presses the key to move to the square of the monster. Because the monster is blocking that square, NetHack interprets the key as an instruction to attack the monster.


Line 264: Line 261:
So the player presses '''[h]''' to attack the newt:
So the player presses '''[h]''' to attack the newt:


[[image:nethack-kernigh-22oct2005-54.png]]
[[File:nethack-kernigh-22oct2005-54.png]]


That was easy! This newt died after only one hit! (Note that there are other monsters which are more difficult to handle...)
That was easy! This newt died after only one hit! (Note that there are other monsters which are more difficult to handle...)


==== Versus a lichen ====
===Versus a lichen===
 
Now consider this situation, later in the example game. The player has explored some more areas, moved some boulders so that they do not block a path. In NetHack, every player gradually heals, so after this exploration the player is again at "HP:14(14)" instead of "HP:12(14)", despite the earlier damage from the newt.
Now consider this situation, later in the example game. The player has explored some more areas, moved some boulders so that they do not block a path. In NetHack, every player gradually heals, so after this exploration the player is again at "HP:14(14)" instead of "HP:12(14)", despite the earlier damage from the newt.


Then the player encounters a letter '''<tt>F</tt>'''. This monster is a ''lichen'':
Then the player encounters a letter '''<tt>F</tt>'''. This monster is a ''lichen'':


[[image:nethack-kernigh-22oct2005-62.png]]
[[File:nethack-kernigh-22oct2005-62.png]]


This lichen seems week. It only "touches", and the HP meter still reads "HP:14(14)". Again, this time the player fights by pressing '''[h]''':
This lichen seems weak. It only "touches", and the HP meter still reads "HP:14(14)". Again, this time the player fights by pressing '''[h]''':


[[image:nethack-kernigh-22oct2005-63.png]]
[[File:nethack-kernigh-22oct2005-63.png]]


"You miss the lichen." In NetHack, an attack sometimes fails to succeed. However the lichen was too slow to respond, and the player has another turn to attack, pressing '''[h]''':
"You miss the lichen." In NetHack, an attack sometimes fails to succeed. However the lichen was too slow to respond, and the player has another turn to attack, pressing '''[h]''':


[[image:nethack-kernigh-22oct2005-64.png]]
[[File:nethack-kernigh-22oct2005-64.png]]


"You kill the lichen!" This is another weak monster, dead after one hit.
"You kill the lichen!" This is another weak monster, dead after one hit.


=== The next dungeon level ===
==The next dungeon level==
 
Now that we have explored the first dungeon level ("Dlvl:1") and found the stairway '''<tt>&gt;</tt>''' down, it is time to proceed to the next lower dungeon level and explore. The player '''<tt>@</tt>''' and pet dog '''<tt>d</tt>''' approach the stairway:
Now that we explored the first dungeon level ("Dlvl:1") and found the stairway '''<tt>&gt;</tt>''' down, it is time to proceed to the next lower dungeon level and explore. The player '''<tt>@</tt>''' and pet dog '''<tt>d</tt>''' approach the stairway:


[[image:nethack-kernigh-22oct2005-65.png]]
[[File:nethack-kernigh-22oct2005-65.png]]


The one thing to remember is to not leave the pet dog (or cat, or other pets that you might have as a beginning player) on this floor! Pets are useful (though these pages have avoided spoiling how pets can help the player). So find your pet before using the stairway, as this player has done here.
The one thing to remember is to not leave the pet dog (or cat, or other pets that you might have as a beginning player) on this floor! Pets are useful (though these pages have avoided spoiling how pets can help the player). So find your pet before using the stairway, as this player has done here.
Line 296: Line 291:
Now move to the stairway:
Now move to the stairway:


[[image:nethack-kernigh-22oct2005-66.png]]
[[File:nethack-kernigh-22oct2005-66.png]]


(The downward stairway '''<tt>&gt;</tt>''' is now not visible, because it is on the same square as the player '''<tt>@</tt>'''.)
(The downward stairway '''<tt>&gt;</tt>''' is now not visible, because it is on the same square as the player '''<tt>@</tt>'''.)
Line 302: Line 297:
The pet must be on any of the eight adjacent squares. (If not, press '''[.]''' to wait for the pet to come, or press '''[s]''' to both wait and search. Press the key repeatedly and carefully without holding it down; one extra key press could move away the pet that came.)
The pet must be on any of the eight adjacent squares. (If not, press '''[.]''' to wait for the pet to come, or press '''[s]''' to both wait and search. Press the key repeatedly and carefully without holding it down; one extra key press could move away the pet that came.)


Now, the key to activate a stairway downward '''<tt>&gt;</tt>''' is conveniently '''[>]''', the key with the same symbol as the stairway on screen. (On many keyboards, one types '''[>]''' by holding '''[SHIFT]''' and pressing '''[.]'''.)
Now, the key to activate a stairway downward '''<tt>&gt;</tt>''' is conveniently '''[>]''', the key with the same symbol as the stairway on the screen. (On many keyboards, one types '''[>]''' by holding '''[SHIFT]''' and pressing '''[.]'''.)


The player appears on the second floor:
The player appears on the second floor:


[[image:nethack-kernigh-22oct2005-67.png]]
[[File:nethack-kernigh-22oct2005-67.png]]


Stepping off the stairway (toward the gold which this player wants) reveals that it is an upward stairway '''<tt>&lt;</tt>''' because we are now at the bottom of the stairway. One can use this stairway to return upward. The only difference is to use the '''[<]''' key to use this stairway.
Stepping off the stairway (toward the gold which this player wants) reveals that it is an upward stairway '''<tt>&lt;</tt>''' because we are now at the bottom of the stairway. One can use this stairway to return upward. The only difference is to use the '''[<]''' key to use this stairway.
Line 312: Line 307:
(If you ever find the Amulet of Yendor, return to the top of the dungeon using these stairways, then use the stairway '''<tt>&lt;</tt>''' on "Dlvl:1" to exit the dungeon. But if you use that stairway to exit the dungeon before you find the Amulet of Yendor, then you end your game early.)
(If you ever find the Amulet of Yendor, return to the top of the dungeon using these stairways, then use the stairway '''<tt>&lt;</tt>''' on "Dlvl:1" to exit the dungeon. But if you use that stairway to exit the dungeon before you find the Amulet of Yendor, then you end your game early.)


=== The inventory ===
==The inventory==
 
Now to press '''[i]''' and see the items. It is good at the beginning of every game to look at our items, but beginning players sometimes forget this. Here is the inventory of the example player:
Now to press '''[i]''' and see the items. It is good at the beginning of every game to look at our items, but beginning players somtimes forget this. Here is the inventory of the example player:


[[image:nethack-kernigh-22oct2005-68.png]]
[[File:nethack-kernigh-22oct2005-68.png]]


This lists every item carried by the player. (There is also the gold "$:51" in the purse.) This includes "g", the puce potion, "h", the gloves, and "i", the gems, that we found earlier.
This lists every item carried by the player. (There is also the gold "$:51" in the purse.) This includes "g", the puce potion, "h", the gloves, and "i", the gems, that we found earlier.


It also includes all of the items that is player started with. Notice that the player is wearing an "elven cloak". An "elven dagger" is marked as the "weapon in hand". This means that the player is wielding the dagger and using it in melee.
It also includes all of the items that this player started with. Notice that the player is wearing an "elven cloak". An "elven dagger" is marked as the "weapon in hand". This means that the player is wielding the dagger and using it in melee.


Wondered what this player was using to attack that newt and that lichen? The player was exclusively using this dagger to hit them. (A player without a weapon can attempt to fight with bare hands.)
Wondered what this player was using to attack that newt and that lichen? The player was exclusively using this dagger to hit them. (A player without a weapon can attempt to fight with bare hands.)


=== A corpse ===
==A corpse==
 
After collecting some gold, the player sees a sewer rat and two grid bugs. This player decides to engage the sewer rat '''r'''. (The player can use '''[;]''' again to identify the sewer rat.)
After collecting some gold, the player [[commons:image:nethack-kernigh-22oct2005-69.png|sees a sewer rat and two grid bugs]]. This player decides to engage the sewer rat '''r'''. (The player can use '''[;]''' again to identify the sewer rat.)


The sewer rat [[commons:image:nethack-kernigh-22oct2005-70.png|attacks with a bite]]; on the next turn the player presses '''[l]''' to fight but [[commons:image:nethack-kernigh-22oct2005-71.png|both sides miss]]. In another turn, the sewer rat dies:
The sewer rat attacks with a bite; on the next turn the player presses '''[l]''' to fight but both sides miss. In another turn, the sewer rat dies:


[[image:nethack-kernigh-22oct2005-72.png]]
[[File:nethack-kernigh-22oct2005-72.png]]


It left a percent sign '''<tt>%</tt>''', which normally refers to a ''comestible'', something one can try to eat. Yes, it is [[commons:image:nethack-kernigh-22oct2005-73.png|a "sewer rat corpse"]]. A player on the same square as a corpse can press '''[e]''' to try to eat it:
It left a percent sign '''<tt>%</tt>''', which normally refers to a ''comestible'', something one can try to eat. Yes, it is a "sewer rat corpse". A player on the same square as a corpse can press '''[e]''' to try to eat it:


[[image:nethack-kernigh-22oct2005-74.png]]
[[File:nethack-kernigh-22oct2005-74.png]]


This is a simple [ynq] menu in NetHack.
This is a simple [ynq] menu in NetHack.
* Press '''[y]''' for ''yes'', eat the corpse.
* Press '''[y]''' for ''yes'', eat the corpse.
* Press '''[n]''' for ''no''. In this case, NetHack does what '''[e]''' normally does when there is no corpse on the square; it presents a menu asking for an inventory item to eat. It is possible at said menu to press '''[f]''' which is the inventory letter of the lembas wafers of this player.
* Press '''[n]''' for ''no''. In this case, NetHack does what '''[e]''' normally does when there is no corpse on the square; it presents a menu asking for an inventory item to eat. It is possible at said menu to press '''[f]''' which is the inventory letter of the lembas wafers of this player.
* Press '''[q]''' to ''quit'' this command if you want not to eat now.
* Press '''[q]''' to ''quit'' this command if you don't want to eat now.


The player decides to eat the corpse. [[commons:image:nethack-kernigh-22oct2005-75.png|"This sewer rat corpse tastes terrible!--More--"]]
The player decides to eat the corpse. "This sewer rat corpse tastes terrible!--More--"


But when the grid bugs <tt>'''x'''</tt> make threatening moves toward the player:
But when the grid bugs <tt>'''x'''</tt> make threatening moves toward the player:


[[image:nethack-kernigh-22oct2005-76.png]]
[[File:nethack-kernigh-22oct2005-76.png]]
 
This player chooses to ignore the grid bugs and continue eating the corpse. (In some cases, this player might have wanted to try immediately to flee.) To continue eating the corpse, the player [[commons:image:nethack-kernigh-22oct2005-77.png|uses again]] the same '''[e]''' command. [[commons:image:nethack-kernigh-22oct2005-78.png|"You resume your meal. You finish eating the sewer rat corpse."]]


=== Using an item from the inventory ===
This player chooses to ignore the grid bugs and continue eating the corpse. (In some cases, this player might have wanted to try to flee immediately.) To continue eating the corpse, the player uses the same '''[e]''' command again. "You resume your meal. You finish eating the sewer rat corpse."


Up to now, this player has not used any item from the inventory, other than the dagger already wielded and the cloak already worn. Often, item use is not early in the game; for example this player has not yet decided about that puce potion.
==Using an item from the inventory==
Up to now, this player has not used any item from the inventory, other than the dagger already wielded and the cloak already worn. Often, items are not used early in the game; for example this player has not yet decided about that puce potion.


There are several commands to use items, here are some:
There are several commands to use items, here are some:
Line 364: Line 356:
This player decides to wear those gloves. Thus the player presses '''[W]''' which makes a menu:
This player decides to wear those gloves. Thus the player presses '''[W]''' which makes a menu:


[[image:nethack-kernigh-22oct2005-80.png]]
[[File:nethack-kernigh-22oct2005-80.png]]


The menu options "[h or ?*]" mean that this player can press one of the following keys:
The menu options "[h or ?*]" mean that this player can press one of the following keys:
Line 371: Line 363:
* '''[*]''' to see the inventory (trying to wear something unusual?)
* '''[*]''' to see the inventory (trying to wear something unusual?)


The player presses '''[h]''' to wear the gloves. [[commons:image:nethack-kernigh-22oct2005-81.png|"You finish your dressing maneuver."]] A press of '''[i]''' to look at the inventory [[commons:image:nethack-kernigh-22oct2005-82.png|shows the gloves "being worn"]].
The player presses '''[h]''' to wear the gloves. "You finish your dressing maneuver." A press of '''[i]''' to look at the inventory shows the gloves "being worn".
 
=== Saving the game ===


==Saving the game==
This is the end of the beginning tutorial, which introduces the controls for the '''tty''' port of NetHack. There are two more keys we will mention:
This is the end of the beginning tutorial, which introduces the controls for the '''tty''' port of NetHack. There are two more keys we will mention:


Line 380: Line 371:
* '''[#]''' for extended commands (type "quit" '''[RETURN]''' to quit the game)
* '''[#]''' for extended commands (type "quit" '''[RETURN]''' to quit the game)


The '''[S]''' feature to save the game is important. A player can save almost anywhere in the game whenever a break from NetHack is necessary. The "#quit" feature, in contrast, should only be used to cowardly give up on the game; it announces your score and prevents you from continuing tghat game.
The '''[S]''' feature to save the game is important. A player can save almost anywhere in the game whenever a break from NetHack is necessary. The "#quit" feature, in contrast, should only be used to cowardly give up on the game; it announces your score and prevents you from continuing that game.


The example player now presses '''[S]''' to save the game:
The example player now presses '''[S]''' to save the game:


[[image:nethack-kernigh-22oct2005-83.png]]
[[File:nethack-kernigh-22oct2005-83.png]]


With a '''[y]''', the game is saved. At the next time when the player starts NetHack (as the same user on the same computer), the game will continue from this point, with the player '''<tt>@</tt>''' in the second dungeon level "Dlvl:2" wearing the gloves.
With a '''[y]''', the game is saved. At the next time when the player starts NetHack (as the same user on the same computer), the game will continue from this point, with the player '''<tt>@</tt>''' in the second dungeon level "Dlvl:2" wearing the gloves.


=== References ===
{{Footer Nav|game=NetHack|prevpage=Walkthrough|nextpage=Combat}}
* [[Learning the vi editor]], [[Learning vi:Basic tasks]]

Latest revision as of 15:51, 26 July 2022

This visual tour introduces one to NetHack. This chapter describes the beginning keys and dungeon exploration. More advanced combat will be at Combat.

NetHack can be difficult to play at first because

  • there are several keys to learn
  • the graphics are drawn with ASCII characters
  • the various types of items are unfamiliar

Windows ports[edit]

This screenshots in this tutorial use the tty (terminal) port of NetHack. This port uses only ASCII characters and runs on a terminal, such as a Unix console (through the curses library), DOS console or a telnet client. By learning the "tty" port, one can play on public telnet servers (like nethack.alt.org). One will also start recognising the ASCII letters of each monster. The ASCII letters are useful for reading Dudley's dungeon webcomic; there is also one item in the game that will ask for them.

Graphical ports, such as the Windows, Macintosh, X11, and Qt versions of NetHack, use the same controls. However, you will also have menus (useful if you forget the key for some command) and you might see the dungeon as graphical tiles, not ASCII characters.

For this tutorial, the screenshots had "color" and "DECgraphics" turned on. (DECgraphics works in xterm and some other Unix terminals and telnet clients, while IBMgraphics looks nice in DOS.) Boulders were configured to display as 8, which is easier to see than the default `. The configuration was:

OPTIONS=color,hilite_pet,lit_corridor,DECgraphics,boulder:8
OPTIONS=showexp,showscore,time,msg_window:f

Starting NetHack[edit]

When you start NetHack, it will automatically load your saved game if you have one. Otherwise, you be prompted for a new character.

Shall I pick a character for you? [ynq]

If you have configured some defaults, for example OPTIONS=race:elf, then the prompt might look different:

Shall I pick your elf's role and gender for you? [ynq]

At this prompt, press [y] to let the game pick your character's race, role, gender, and alignment, or press [n] to use menus to pick them yourself. (Press [q] to quit NetHack.) After choosing the character, the game introduces the plot:

Nethack-kernigh-22oct2005-02.png

The game now stops at a --More-- prompt. This prompt gives the player time to read some text before NetHack decides to show additional text or return to the map. When you see this prompt, read (or skip) the text, then press space bar to proceed.

After proceeding from the plot introduction, the game shows the map for the first time. You always start on dungeon level 1 (shown as Dlvl:1 in the bottom row of the tty port). Here is an example of what dungeon level 1 might look like:

Nethack-kernigh-22oct2005-03.png

There are some things to notice about this screen:

  • In NetHack, you and the other characters are literally characters. The @ with a cursor on it is you, the player.
    • The d is a pet little dog. The d is highlighted because "hilite_pet" is in the configuration.
    • You might start with a cat f or horse u instead. (Remember, "f" means feline and "u" means unicorn. NetHack uses "u" for horses too.)
  • Most of the screen is blank. You can see the room that you are in, because it is lit (with dots .), however you have not explored the other parts of the dungeon so you do not know what is there.

This particular room had a fountain { (or with IBMgraphics - note on symbol) in it. NetHack also drew a box around the room; if you do not use DECgraphics/IBMgraphics, then NetHack will use hyphens - and pipes |.

Moving Around[edit]

keys for movement
[y] [k] [u]
[h] [l]
[b] [j] [n]

Some graphical versions of NetHack let you click on squares to move there. Otherwise, you will need to learn the keys to move around.

If you had switched on the "number_pad" option, then you get to use the number keys [12346789] to move in eight directions. Most ports do not let you use the arrow keys. For the best controls (and also if your keyboard has no numeric keypad), you should leave "number_pad" off and use the [yuhjklbn] keys to move your @ around. This system consists of four "vi" keys to move in four directions (up, down, left, right), and four "diagonal" keys for diagonal movement.

vi keys[edit]

The four vi keys are [h], [j], [k], [l]. The use of these keys was made popular by a program called "vi", a traditional text editor for Unix. (The text in this section originates from Wikibooks:Learning vi:Basic tasks.)

  • The [h] key moves you left.
  • The [j] key moves you down.
  • The [k] key moves you up.
  • The [l] key moves you right.

If you have trouble remembering this, keep in mind that [h] is leftmost, the letter [j] goes down below the line, the letter [k] pokes up above the line, and the [l] key is rightmost. (J also resembles an arrow pointing downward, if you squint a bit.)

The four diagonal keys are [y], [u], [b], [n]. Look at their position on the keyboard to see how they work. The upper-left key "y" moves up and left, and so on.

If you are only using the vi keys, then you should still use the diagonal keys when you need them: to fight monsters diagonally adjacent to you, to squeeze into certain small diagonal paths, and to step around certain obstacles.

It is a matter of personal preference on whether you want to use the vi keys or the number pad. The main advantage of the number pad is it's intuitiveness, although the vi keys allow you to more quickly perform some actions and allow play on a keyboard that has no number pad.

Doors and corridors[edit]

Now let us continue with the example game. To explore the dungeon level, you need to leave the room. Some exits have doors in them, while some are just empty doorways.

The player in the example game is going to try to open a door. First the player walks up to the door. To open a door, stand next to it and press [o]. At the prompt,

In which direction?

press the key for the direction of the door. (If "the door resists" then try using [o] to open the door again.) In the example, the player pressed [h] to open the door on the left:

Nethack-kernigh-22oct2005-05.png

(If you ever want to close a door, then use the [c] command. Some monsters will not be able to pass closed doors, while some others might have to momentarily stop to open the door.) The example player now travels into the corridor.

Nethack-kernigh-22oct2005-06.png

In the darkness of the above corridor, the player can only see as far as a "night vision" radius of one square. (So the pet dog or monsters might be in the corridor that the hero already passed through, but the hero simply cannot see them now.) The game map will always memorise the location of corridors and rooms that you already saw.

If you follow the corridors, you should be able to discover a second room. Because every dungeon is randomly generated, you will never find the rooms in the same place. In the example game, the hero had lost sight of the pet dog. Now the pet dog follows the player into the room:

Nethack-kernigh-22oct2005-08.png

This room was empty, so the example player now opens another door and sees a third room come into view. On entering the room, the player discovers a potion ! on the floor:

Nethack-kernigh-22oct2005-10.png

The dungeon has items in it, but those items are at random places. In some games, the random number generator (or "Random Number God" as some say) might favor you enough in such games that you find good items early in the dungeon.

Taking objects from the floor[edit]

The command to pick up objects from the floor is [,] (comma). First you need to move onto the square with the object, then you press [,] to take it.

In the example game, the player first only knows that there is a potion there. (Because option "color" is on, the potion looks red.) When the player walks onto the square, he discovers that there are two objects on the square:

Things that are here:     (screenshot)
a puce potion
10 gold pieces
--More--

As usual, pressing [SPACE] dismisses the "--More--" prompt. Because there is more than one object, when the player presses [,], a menu appears:

Pick up what?             (screenshot)
Coins
a - 10 gold pieces
Potions
b - a puce potion

The use of this menu is simple. The "a -" and "b -" indicate that you can press [a] and [b] to select the object. These become "a +" and "b +" if you select them; you can also deselect them by pressing [a] or [b] again. When the player selects both objects and presse [SPACE] to dismiss the menu:

Nethack-kernigh-22oct2005-15.png

Both the potion and the money are now in the player's inventory. The inventory is the list of all items that this player carries. You can press [i] to look at your inventory as much as you want; the command does not use any game time, so you can even use [i] if you are surrounded by monsters. The 10 gold pieces go to the purse. Money does not appear in the inventory screen, but the "$:10" on the bottom line here shows how much money this player has.

What about "g - a puce potion"? The "g" is the inventory letter in this potion. You can now use the potion with other game commands; for example [d] [g] would drop this potion back to the floor, while [q] [g] will cause the hero to drink (quaff) this potion. If you forget the letter, then you can check with [i], or you can use [d] [?] or [q] [?] to choose your potion from a menu.

Then what does a "puce potion" do? We do not know. The presence of unidentified items is one of the main traits of most roguelike games. This potion might be healing, it might cause sickness, it might do something else. For now, the example player chooses only to carry the potion around.

Breaking locked doors[edit]

When you encounter a locked door, you cannot open it; you must first unlock or break it somehow. Because NetHack puts locked doors in random places, you need to be able to pass them if you want to explore most of the dungeon.

The game documentation mentions the kick command ^D, which means to hold [Control] and press [D]. (Those using the "number_pad" option can also press [k] to kick.) It also mentions that "D" means door. Is it helpful to kick doors?

Witness the example player, encountering a locked door, kick the door. The player presses ^D and then [l] to kick the door to right. WHAMMM!!! After a second kick, this particular door breaks:

"As you kick the door, it crashes open!"

Whenever you need to pass a locked door, remember to use the ^D command, unless you find another way to deal with it.

Displacing pets[edit]

If your pet is blocking your path, sometimes you can try to move onto its square anyway. Sometimes, "You stop. Fido is in the way!", but sometimes "You displaced Fido." and you and your pet swap positions.

Searching for secret paths[edit]

NetHack generates secret exits out of some of the rooms, and secret continuations of some corridors. By using the [s] command, you can search the eight surrounding squares for secret paths. You will often need to use this command repeatedly. A shortcut for using the command multiple times is to type a number before it, so [1] [0] [s] will search ten times. (In "number_pad" mode, use [n] before the number, like [n] [1] [0] [s].) Avoid holding down the [s] key or any key in NetHack. The command will run repeatedly, but a monster might come and can kill you before you are able to react and release the key.

In the example game, the player followed one such path to its end and searched with [s] several times discovering nothing. So the player went in a different direction. Now the player has reached the end of another path:

"You hear the footsteps of a guard on patrol."

("You hear the footsteps of a guard on patrol." is an example of a sound in NetHack. These sounds can give you hints if you know what they mean.) The player now taps [s] several times to search. The player thus finds a door, a + where the wall had been:

|........|          (screenshot)
|........+@
|........|#
|.........###

Using [o] [h] the player opens the door. First it resists but then it opens.

You can also search from the inside of rooms, trying to find secret doors to exit. Try using [s] to reach seemingly inaccessible parts of the map.

Boulders[edit]

The appearance of a boulder depends on the "boulder" option. By default it is `, but for this game it was set to 8.

A boulder blocks the path of the player. The player is able to push the boulder right using [l]. Note that pressing [l] normally moves the character right, and because a boulder is blocking the path, the player tries to push the boulder right when moving right.

(The player is pushing the boulder into an unknown path. It is better to push it into an already-explored path, so that the player knows that the boulder will not permanently block something.)

The following is a good position for a boulder:

Nethack-kernigh-22oct2005-28.png

Notice that the player can now pass around the boulder by pressing [u] (diagonal up-right movement) or [n] (diagonal down-right movement). This is one of those situations where knowing the four diagonal keys (y,u,b,n) instead of using only the vi keys (h,j,k,l) is important.

Armor, gold, gem, light[edit]

Now, the player encounters another end of path, opens another secret door (finding Fido, the pet dog), goes downward to another room, finds another end of path, and discovers a third secret door. After opening the door, the map looks like this:

Nethack-kernigh-22oct2005-34.png

The player steps in and sees two items:

Nethack-kernigh-22oct2005-36.png

The [ represents armor. Walking to it shows that it is a pair of fencing gloves. The player presses [,] (comma) and takes it. The game assigns inventory letter "h":

Nethack-kernigh-22oct2005-39.png

The $ represents gold. In this case, the player adds 41 gold pieces to the purse for "$:51" total.

Now the player proceeds out the door and discovers another room. Note that from outside the room, only some parts of the lit room are visible:

Nethack-kernigh-22oct2005-41.png

The other parts of the room cannot be seen because the player is looking from the wrong angle. When the player steps in, more of the room is revealed. Stepping in reveals a * representing a gem:

Nethack-kernigh-22oct2005-42.png

The player takes two violet gems and leaves the room (finding Fido, the pet dog). After a walk left, up, right, and down, the player another sound. ("You hear the splashing of a naiad.")

Continuing, the player moves right. Again, the player can at first only see part of the room:

Nethack-kernigh-22oct2005-48.png

But there is a surprise when we step in...

Identifying a character on the screen[edit]

This player has encountered a colon : on the screen. The staircase to the second dungeon level > is visible, but how do we handle the colon?

Nethack-kernigh-22oct2005-49.png

We are now interested in two keys on the keyboard.

  • The colon [:] key (hold [SHIFT] and press [;] on many keyboards), which looks like a pair of eyes, is used to look at the contents of the current square. (Do not confuse the colon key with the colon : currently visible on the screen.)
  • The semicolon [;] key looks at another square. It also looks like a pair of eyes, except one of the eyes is squinting toward a more distant object.

Because the colon : is on a different square than our player, we need to use the semicolon [;] key, not the colon [:] key.

Pressing [;] makes a "Pick an object." prompt. To pick an object, you move with the (h,j,k,l) and (y,u,b,n) keys as normal, except that this moves the cursor without moving the player @.

Here is the result of pressing [;] and then pressing [y] to move the cursor to the colon:

Nethack-kernigh-22oct2005-50.png

Now, with the cursor over the colon : on the screen, press the colon [:] key now to look at that square. (In the "Pick an object." mode, one can use one eye [.] to take a brief look, or both eyes [:] to take a look that involves reading more text, if available.)

We learn that the colon : at the screen is "a lizard (newt)":

Nethack-kernigh-22oct2005-51.png

Note the --More-- prompt, which appears because we pressed colon [:] to ask for more information if it was available. Pressing [SPACE] advances us beyond the prompt. We then read the NetHack "database" entry for newts:

Nethack-kernigh-22oct2005-52.png

As this is another --More-- prompt, the player finishes reading and presses [SPACE].

First combat[edit]

The dungeon contains many monsters which try to kill the player. A monster is normally represented by a letter A-Z or a-z, but there are other monsters such as apostrophes ', semicolons ;, and colons : including this newt.

Some monsters are peaceful; NetHack not only identifies them as such when you look at them with the colon [:] key, but also warns you if you try to attack them in melee.

Ouch[edit]

Yet this newt is apparently not peaceful. When the example player pressed [k] and move upward, the newt responded with an attack:

Nethack-kernigh-22oct2005-53.png

Notice the meter for health points, it reads "HP:12(14)". This means that the player is hurt; from 14 points possible, this player has only 12. Should this number reach 0, our player dies.

This player has options, including the obvious ones:

  • Fight the newt
  • Flee from the newt

Attack[edit]

The player attempts to fight. To fight a monster in melee, one simply presses the key to move to the square of the monster. Because the monster is blocking that square, NetHack interprets the key as an instruction to attack the monster.

  • Pressing [h] can move the player left, push a boulder left, or attack the monster at the left. In "Pick an object." mode (after pressing [;]), pressing [h] moves the cursor left for picking an object.

So the player presses [h] to attack the newt:

Nethack-kernigh-22oct2005-54.png

That was easy! This newt died after only one hit! (Note that there are other monsters which are more difficult to handle...)

Versus a lichen[edit]

Now consider this situation, later in the example game. The player has explored some more areas, moved some boulders so that they do not block a path. In NetHack, every player gradually heals, so after this exploration the player is again at "HP:14(14)" instead of "HP:12(14)", despite the earlier damage from the newt.

Then the player encounters a letter F. This monster is a lichen:

Nethack-kernigh-22oct2005-62.png

This lichen seems weak. It only "touches", and the HP meter still reads "HP:14(14)". Again, this time the player fights by pressing [h]:

Nethack-kernigh-22oct2005-63.png

"You miss the lichen." In NetHack, an attack sometimes fails to succeed. However the lichen was too slow to respond, and the player has another turn to attack, pressing [h]:

Nethack-kernigh-22oct2005-64.png

"You kill the lichen!" This is another weak monster, dead after one hit.

The next dungeon level[edit]

Now that we have explored the first dungeon level ("Dlvl:1") and found the stairway > down, it is time to proceed to the next lower dungeon level and explore. The player @ and pet dog d approach the stairway:

Nethack-kernigh-22oct2005-65.png

The one thing to remember is to not leave the pet dog (or cat, or other pets that you might have as a beginning player) on this floor! Pets are useful (though these pages have avoided spoiling how pets can help the player). So find your pet before using the stairway, as this player has done here.

Now move to the stairway:

Nethack-kernigh-22oct2005-66.png

(The downward stairway > is now not visible, because it is on the same square as the player @.)

The pet must be on any of the eight adjacent squares. (If not, press [.] to wait for the pet to come, or press [s] to both wait and search. Press the key repeatedly and carefully without holding it down; one extra key press could move away the pet that came.)

Now, the key to activate a stairway downward > is conveniently [>], the key with the same symbol as the stairway on the screen. (On many keyboards, one types [>] by holding [SHIFT] and pressing [.].)

The player appears on the second floor:

Nethack-kernigh-22oct2005-67.png

Stepping off the stairway (toward the gold which this player wants) reveals that it is an upward stairway < because we are now at the bottom of the stairway. One can use this stairway to return upward. The only difference is to use the [<] key to use this stairway.

(If you ever find the Amulet of Yendor, return to the top of the dungeon using these stairways, then use the stairway < on "Dlvl:1" to exit the dungeon. But if you use that stairway to exit the dungeon before you find the Amulet of Yendor, then you end your game early.)

The inventory[edit]

Now to press [i] and see the items. It is good at the beginning of every game to look at our items, but beginning players sometimes forget this. Here is the inventory of the example player:

Nethack-kernigh-22oct2005-68.png

This lists every item carried by the player. (There is also the gold "$:51" in the purse.) This includes "g", the puce potion, "h", the gloves, and "i", the gems, that we found earlier.

It also includes all of the items that this player started with. Notice that the player is wearing an "elven cloak". An "elven dagger" is marked as the "weapon in hand". This means that the player is wielding the dagger and using it in melee.

Wondered what this player was using to attack that newt and that lichen? The player was exclusively using this dagger to hit them. (A player without a weapon can attempt to fight with bare hands.)

A corpse[edit]

After collecting some gold, the player sees a sewer rat and two grid bugs. This player decides to engage the sewer rat r. (The player can use [;] again to identify the sewer rat.)

The sewer rat attacks with a bite; on the next turn the player presses [l] to fight but both sides miss. In another turn, the sewer rat dies:

Nethack-kernigh-22oct2005-72.png

It left a percent sign %, which normally refers to a comestible, something one can try to eat. Yes, it is a "sewer rat corpse". A player on the same square as a corpse can press [e] to try to eat it:

Nethack-kernigh-22oct2005-74.png

This is a simple [ynq] menu in NetHack.

  • Press [y] for yes, eat the corpse.
  • Press [n] for no. In this case, NetHack does what [e] normally does when there is no corpse on the square; it presents a menu asking for an inventory item to eat. It is possible at said menu to press [f] which is the inventory letter of the lembas wafers of this player.
  • Press [q] to quit this command if you don't want to eat now.

The player decides to eat the corpse. "This sewer rat corpse tastes terrible!--More--"

But when the grid bugs x make threatening moves toward the player:

Nethack-kernigh-22oct2005-76.png

This player chooses to ignore the grid bugs and continue eating the corpse. (In some cases, this player might have wanted to try to flee immediately.) To continue eating the corpse, the player uses the same [e] command again. "You resume your meal. You finish eating the sewer rat corpse."

Using an item from the inventory[edit]

Up to now, this player has not used any item from the inventory, other than the dagger already wielded and the cloak already worn. Often, items are not used early in the game; for example this player has not yet decided about that puce potion.

There are several commands to use items, here are some:

  • [d] to drop an item (so the player can use [,] to grab it again)
  • [D] to Drop many items
  • [w] to wield a weapon
  • [W] to Wear armor
  • [T] to Take off armor

There are other commands, like [q] to quaff a potion; press [?] to read the NetHack help screens which provide a full list.

This player decides to wear those gloves. Thus the player presses [W] which makes a menu:

Nethack-kernigh-22oct2005-80.png

The menu options "[h or ?*]" mean that this player can press one of the following keys:

  • [h] to Wear item "h" (the gloves)
  • [?] to see a list of armor from the inventory
  • [*] to see the inventory (trying to wear something unusual?)

The player presses [h] to wear the gloves. "You finish your dressing maneuver." A press of [i] to look at the inventory shows the gloves "being worn".

Saving the game[edit]

This is the end of the beginning tutorial, which introduces the controls for the tty port of NetHack. There are two more keys we will mention:

  • [S] to save the game
  • [#] for extended commands (type "quit" [RETURN] to quit the game)

The [S] feature to save the game is important. A player can save almost anywhere in the game whenever a break from NetHack is necessary. The "#quit" feature, in contrast, should only be used to cowardly give up on the game; it announces your score and prevents you from continuing that game.

The example player now presses [S] to save the game:

Nethack-kernigh-22oct2005-83.png

With a [y], the game is saved. At the next time when the player starts NetHack (as the same user on the same computer), the game will continue from this point, with the player @ in the second dungeon level "Dlvl:2" wearing the gloves.