glhackrc(5)

πŸ’– glhackrc β€” bestie's guide to the glHack config file πŸ’–

okay so. this is glhackrc(5), from the File Formats Manual section, and it's literally just the little file where glHack keeps all your settings. it's giving "settings app but make it a text file". let's get into it 🫢

✨ NAME ✨

glhackrc β€” the configuration file for the glHack game, bestie. that's it, that's the vibe.


🌸 DESCRIPTION 🌸

so the glHack config file is where you store settings for both the standard NetHack options (think stuff like hilite_pet) and the glHack-specific ones (like keyrepeat). options that take a value are shown in this page with example values so you can see what they look like.

the config file is always ~/.glhackrc. no cap. that's the path, always, don't fight it πŸ’…


πŸŽ€ FORMAT πŸŽ€

the format is a superset of the standard NetHack config file format (.nethackrc), which basically means it does everything that one does plus more. iconic.

  • Lines beginning with a hash (#) are comments and are ignored. πŸ’¬
  • Blank lines are also ignored. (silence is valid)
  • The remaining lines have the form:
KEYWORD=data...

(the keywords are uppercase as a matter of convention, but they don't actually need to be β€” the caps are just for the aesthetic, iykyk)

the two main keywords are OPTIONS and GL_OPTIONS:

  • OPTIONS is used for standard NetHack options.
  • GL_OPTIONS is new and is used for glHack-specific options.

NetHack also defines some additional keywords: DUNGEON, EFFECTS, MONSTERS, TRAPS, and BOULDER. these have little relevance to glHack since they only control the text map view. so like, lowkey not your problem here πŸ™ˆ

the data after the = sign depends on the keyword. for both OPTIONS and GL_OPTIONS, the data consists of one or more option names (possibly with values) separated with commas (,). a colon (:) is used in between an option name and its value. for example:

GL_OPTIONS=windowed,depth:32

that contains two glHack options: windowed (without any value), and depth (with the value 32). see how the colon did that? chef's kiss.

options can be booleans, integers, or strings:

  • Boolean options are enabled simply by including their name, and are disabled by using an exclamation mark (!) before their name (e.g. !windowed).
  • String values should not be quoted. (no quotation marks, bestie, they're not invited)

πŸ¦‹ GLHACK OPTIONS πŸ¦‹

these options must appear after the GL_OPTIONS keyword:

  • mode:1024x768 β€” use the specified video mode. normally glHack will autodetect the mode, but using this option will override that. the default value (when all else fails) is 800x600.
  • depth:32 β€” video depth, aka bits per pixel. possible values are 15, 16, 24 and 32, and 8 when using the software renderer. the default value is autodetected.
  • windowed β€” open in a window. default is fullscreen. (tiny box enjoyers rise πŸͺŸ)
  • gamma:+1 β€” gamma correction value. range is -5 to +5, where positive values make the screen brighter, and negative values make it darker. zero is the default value (no adjustment).
  • jailsize:60 β€” sets the "jail" size, which is a percentage of the size of the screen. usable range is 1 to 100.

the jail controls when the map window scrolls: when set to 1, the player will always be centered on the screen, and the map always scrolls when moving. when set to 100, the map will only scroll if the player tries to move off the edge of the screen.

this option is ignored when jumpscroll is enabled (see below). πŸ‘€
  • defzoom:16 β€” sets the default zoom factor, in pixels. use 0 to make it the same as the tile size (i.e. 1:1 scale), which is the default. use 8 to mean the text-mode view.
  • keyrepeat:never β€” enables/disables keyboard auto-repeat. use never to disable it everywhere, always to enable it everywhere, and partial is a compromise which enables auto-repeat for scrolling windows (etc) but disables it for game commands (moving, etc).
  • altprev β€” enables the alternate previous history (CTRL-P) mode, which is more like the TTY version: the lines are limited to the message window, and you don't need to press CTRL-O, space or escape to dismiss the window.
  • prevstep:3 β€” number of lines to step through the previous message history. for altprev mode, using the same value as the message window height (vary_msgcount) gives the best results. that is the default for altprev mode; for normal mode the default is 1.
  • reformat β€” causes text windows that don't fit across the screen to be reformatted. the default is off.
  • shrinkwrap β€” shrinks the fonts on text windows if they don't fit across the screen. it's mainly an alternative to the reformat option. default is off.
  • flipping β€” flips monster tiles horizontally so the direction they face on-screen matches the direction they are moving in.
NOTE: this only works in GL mode, and it doesn't work with the Isometric tileset. 😭
  • jumpscroll β€” scrolls the map window in large jumps, rather than single steps, which improves speed when using the software renderer. when enabled, the standard NetHack option scroll_margin will be used to decide when to scroll.
  • invisfx β€” draws monsters which are invisible (but can be seen by the player) using alpha blending (i.e. translucently). default is off.

⭐ NETHACK OPTIONS ⭐

heads up bestie: this manpage only documents a few standard NetHack options (the ones particularly relevant to glHack). there are many more available, so please consult the NetHack Guidebook for the complete list. this page is a highlight reel, not the whole album πŸ’–

these options must appear after the OPTIONS keyword:

  • windowtype:SDL β€” the windowtype option is very important for glHack. this is the only way to select between the OpenGL renderer and the pure software renderer.
    • The GL value (without quotes) selects the OpenGL renderer. this is the default. πŸ”₯
    • The SDL value selects the software renderer.
  • tile_height:64 β€” choose the tileset to use. allowable values are 16, 32 and 64. the 16x16 tiles are the same as the standard NetHack 3.4.0 ones. the other tiles have been created (from many sources) specially for glHack. the value 64 selects the Isometric (pseudo-3D) tileset. the default is 32.
  • font_size_map:20, font_size_message:8, font_size_status:14, font_size_menu:22, font_size_text:22 β€” these options set the font size used in various windows on the screen. each number represents the font's height, and there are currently four fonts available: 8, 14, 20 and 22. all fonts use the IBM VGA character set (cp437), and the IBMgraphics option can be enabled for the text map view.

the default for font_size_map is 14, and for font_size_message is 20. the default values for the rest will be copied from font_size_message (allowing them to all share the same size). teamwork makes the dream work 🫢

  • vary_msgcount:4 β€” sets the number of lines in the message window. acceptable range is between 2 and 8. the default is 3.
  • scroll_margin:4 β€” when the glHack option jumpscroll is enabled, the value of scroll_margin is used to determine when to scroll. it specifies (roughly) the number of tiles to leave at the edge of the screen, so when the player crosses that line, the map scrolls.
  • splash_screen β€” can be used to enable/disable the initial splash screen. it is enabled by default.

🌈 EXAMPLES 🌈

here is an example configuration file, copy it, remix it, make it your own:

#
# glHack Config file
#
OPTIONS=windowtype:SDL
OPTIONS=tile_height:32,vary_msgcount:3
OPTIONS=font_size_message:20,font_size_map:14
OPTIONS=dogname:Woofer,catname:Morris
OPTIONS=horsename:Tally,fruit:mango
OPTIONS=color,hilite_pet,safe_pet
OPTIONS=verbose,lit_corridor,confirm
OPTIONS=pickup_burden:U,pickup_types:$?!/="
OPTIONS=!showexp,showscore,splash_screen,!time
OPTIONS=toptenwin,tombstone,menustyle:partial
OPTIONS=!prayconfirm,pushweapon,disclose:yi ya yv
#
GL_OPTIONS=!windowed,keyrepeat:always
GL_OPTIONS=altprev,prevstep:3
GL_OPTIONS=flipping,!jumpscroll

not me about to copy this whole thing into ~/.glhackrc and call it a personality πŸ’…


πŸ‘‘ SEE ALSO πŸ‘‘

The glHack Homepage: http://glhack.sourceforge.net/

The official NetHack page: http://www.nethack.org/


and that's the whole page, bestie πŸ’– this was glhackrc(5) from January 2003, and the page footer literally just says glhackrc(5) again because it's that girl. go forth, configure your tiles, and slay βœ¨πŸ‘‘

πŸ“¦ where this page comes from