Source:NetHack 5.0.0/dat/usagehlp
Jump to navigation
Jump to search
Below is the full text to usagehlp from the source code of NetHack 5.0.0. To link to a particular line, write [[Source:NetHack 5.0.0/dat/usagehlp#line12]], for example.
The NetHack General Public License applies to screenshots, source code and other content from NetHack.
This content was modified from the original NetHack source code distribution (by splitting up NetHack content between wiki pages, and possibly further editing). See the page history for a list of who changed it, and on what dates.
1. This is a terse description of nethack's command line arguments. 2. It is oriented toward UNIX (including descendants such as linux and macOS) 3. and might not be accurate for other platforms. 4. 5. When starting play, if there is a save file for the chosen character name 6. then it will be restored, otherwise a new game using that name will begin. 7. 8. nethack 9. with no arguments; uses character name from run-time configuration file's 10. OPTIONS=name:character-name entry, or player's username if none. 11. 12. nethack -u character-name [-X or -D] 13. '-u character-name' specifies the name to use for this game's character; 14. -u must be lowercase; the space between it and character-name may 15. be omitted; 16. '-X' play in non-scoring explore mode also known as discovery mode; 17. -X must be uppercase; character starts with a wand of wishing and 18. player may opt to be life-saved and keep going if character dies; 19. '-D' run in debug mode also known as wizard mode; -D must be uppercase; 20. if player is not allowed then nethack will switch to -X; if player 21. is allowed, character name will be changed to "wizard". 22. 23. A character name may have a suffix specifying any or all of role, race, 24. gender, and alignment such as -u Conan-Bar-Hum-Mal-Neu or -u Tim-Wiz. 25. The components present must be at least three letters long but can be 26. longer; their case doesn't matter. See also -p and -r, next, 27. 28. nethack -p Ppp -r Rrr [-@] 29. '-p Ppp' specify role; p for "profession" is used because -r is in use; 30. 'Ppp' is three or more letters of the role name such as Val for 31. Valkyrie; unlike -p itself, upper/lower case of Ppp doesn't matter 32. '-r Rrr' specify race or species: Hum[an], Elf, Orc, Dwa[rf], Gno[me]; 33. '-@' force non-interactive start; any of role, race, gender, and 34. alignment that is not specified on the command line or in the 35. run-time configuration file gets chosen randomly without prompting; 36. the at-sign might need to be quoted by preceding it with backslash. 37. 38. The old form for role is also still accepted: -A or -Arc[heologist], 39. -B or -Bar[barian], -C or -Cav[eman] or -Cavew[oman], -H or -Hea[ler], 40. -K or -Kni[ght], -M or -Mon[k], -P or -Pri[est] or -Prieste[ss], 41. -Ran[ger], -R or -Rog[ue], -S or -Sam[urai], -T or -Tou[rist], 42. -V or -Val[kyrie], -W or -Wiz[ard]. The single-letter form must be in 43. uppercase, the three or more letter form can be in any case. There is 44. no single-letter option for the Ranger role. 45. 46. nethack -DEC[graphics] 47. nethack -IBM[graphics] 48. selects the DEC or IBM symbol set to use line-drawing characters on a 49. text map; might be ignored depending on interface, or ineffective or 50. even scrambled depending on display capability; -DECgraphics and 51. -IBMgraphics are mutually exclusive; they can be any case but must use 52. at least three letters. 53. 54. nethack -wIii 55. nethack --windowtype:Iii 56. where 'Iii' represents an interface designation: tty, curses, X11, or 57. Qt; only useful if the program was built to support more than one 58. interface (the game's '#version' command will disclose that); overrides 59. OPTIONS=windowtype:Iii in run-time configuration file and build-time 60. default; '-w' or '--windowtype' must be lowercase, the interface 61. designation itself may be any case; variations '--windowtype Iii' and 62. '-w Iii' work too. 63. 64. On Windows, nethack.exe supports tty or curses or both depending on 65. settings at the time the program is built from source; nethackW.exe 66. supports mswin (also referred to as Win GUI) and optionally curses. 67. For MS-DOS, the program supports tty or curses or both. 68. 69. nethack -n 70. don't show the 'news' file if one is present in nethack's directory. 71. 72. nethack --nethackrc:RC-file 73. use RC-file instead of the default run-time configuration file (which is 74. usually '~/.nethackrc'); the file name should include full path unless 75. located in nethack's directory; 76. nethack --no-nethackrc 77. don't use any run-time configuration file; equivalent to 78. --nethackrc:/dev/null which behaves as if an empty file. 79. 80. nethack -dDir 81. nethack --directory:Dir 82. could be used to override the build-time value of NETHACKDIR with 83. location Dir; if used, it should precede other command line arguments. 84. 85. The assorted options above can be combined on a single command line; 86. they're listed separately for readability. 87. 88. ******* 89. 90. Other options which perform some action and then exit rather than play 91. the game: 92. 93. nethack -s 94. nethack --scores 95. show scores for the default character; optional additional arguments: 96. nethack -s -v 97. show scores for all versions present in the high scores file (record) 98. if it contains scores for any older versions; by default, only scores 99. for current version of nethack are shown; when '-v' is used, it should 100. immediately follow -s or --scores, preceding any name(s) or -p or -r; 101. nethack -s character-name [character-name2 [character-name3 [...]]] 102. show scores for one or more specific character names (might not be 103. effective if PERS_IS_UID=1 is specified in nethack's sysconf file); 104. character names may be preceded by '-u' but that isn't required; 105. special character-name "all" is used to display all scores that pass 106. other criteria; 107. nethack -s -p Ppp -r Rrr 108. show scores for specific roles or races; multiple instances can be used; 109. if both '-p' and '-r' are used, scores that match either will be shown 110. rather than scores that match both; 111. nethack -dDir -s 112. nethack --directory:Dir -s 113. as above; alternate directory, if specified, should come first. 114. 115. nethack --version or --version:copy or --version:dump or --version:show 116. '--version' display the program's version number plus the date and 117. time it was built from source code, then exit; 118. '--version:copy' display version number and also copy it into system 119. pasteboard (should work on macOS and Windows; might not work on other 120. systems) so that it could be pasted from there into a subsequent email 121. or web contact form, then exit; 122. '--version:dump' display several internal values, then exit; 123. '--version:show' same as '--version'. 124. 125. nethack --showpaths 126. list expected locations for various files and directories, then exit; 127. includes the name and location for the run-time configuration file which 128. can vary from platform to platform. 129. 130. nethack --usage 131. nethack --help 132. show this text; 'nethack -?' and 'nethack ?' also work but the question 133. mark may need to be quoted to prevent the shell from intercepting it. 134. 135. ******* 136. 137. This text is available during play in the menu for the game's '?' command 138. or can be viewed via 'nethack --usage | more' at the shell prompt. 139.