Skip to content

Activating Curses Interface on Public Servers

Tommi Gustafsson edited this page Mar 26, 2020 · 53 revisions

Curses interface is an alternative user interface for GnollHack. It also supports arrow keys for movement on public servers.

This is a guide how to get it working on public servers using an SSH client.

1. Set Remote Character Set to CP437 in the SSH client

First, you need to set the remote chatacter set to CP437 on your SSH Client. If you are using PuTTY, you can set Window → Translation → Remote Character Set to "CP437".

Normal SSH

If you are using the terminal on macOS or Linux, you can follow these instructions.

2. Increase the size of the SSH window to at least 110x32

Next, you need to increase the size of the SSH terminal window. Let's make it 110x32. Below is an example how to do it in PuTTY:

SSH Window Size

You can also use higher numbers according to your liking, for example, 120x34, or even more, whatever can fit on your screen.

3. Adjust the terminal font

Next, you can adjust the terminal font and its size to fit your needs. Consolas is a good choice for a font and it works well with 10, 12, and 16-point sizes. In PuTTY, you can set the font size in Window → Appearance. Below is an example of this using the font size 16:

Terminal Font Size

Terminal Font Size 2

4. Save settings

Next, save the session settings. Here's an example how to do it with PuTTY:

Save Settings

5. Modify the Options on the Public Server

Login to the public server. After you have logged in, select 'o' Edit options in your starting screen.

Server Options

Then add the following lines at the end of the configuration file:

OPTIONS=windowtype:curses
OPTIONS=IBMgraphics
OPTIONS=term_cols:110
OPTIONS=term_rows:32
OPTIONS=popup_dialog
OPTIONS=petattr:i
OPTIONS=guicolor
OPTIONS=perm_invent
OPTIONS=windowborders:2

If you use higher column and row counts, please adjust term_cols and term_rows accordingly.

Use Ctrl-O to save the file and Ctrl-X to exit the editor.

6. It works

Now play the game. The below image is taken with OPTIONS=windowborders:2:

Curses Works

And also the arrow keys work for movement!

7. Refine Options

Finally, let's add all useful options.

  1. Log in to the server and edit options.
  2. Press Alt–A to mark the beginning of the document.
  3. Scroll down to the end of the document by pressing Page Down and Down Arrow as necessary.
  4. Press Ctrl-K to cut all text.
  5. Copy the options file contents below to your clipboard.
  6. Paste it to your SSH client by right-clicking (works in PuTTY, at least).
  7. Save with Ctrl-O, then exit with Ctrl-X.

Full Options File

Here's a very good full options file for the Curses Interface, which uses

  • terminal size of 120x34
  • windowborders:0
  • statuslines:3
# This is an example gnollhackrc file. You should edit this to suit the needs
# of your personal GnollHack build and add some reasonable default options
# for your users.

# Curses Interface Options
OPTIONS=windowtype:curses
OPTIONS=symset:IBMgraphics
OPTIONS=popup_dialog
OPTIONS=term_cols:120
OPTIONS=term_rows:34
OPTIONS=windowborders:0
OPTIONS=petattr:i
OPTIONS=guicolor
OPTIONS=perm_invent

# General Options
OPTIONS=noshowexp,showscore,time,color,!autopickup
OPTIONS=autodig,fruit:slime mold,boulder:0
OPTIONS=number_pad:2,altmeta,force_invmenu,hilite_pet
OPTIONS=lit_corridor,statuslines:3

# Highlight menu lines with different colors. You need to define the colors
# with MENUCOLOR lines.
#  Toggle menucolor use on or off
OPTIONS=menucolors
# Define color used for a certain menu line. Format is
#    MENUCOLOR="regular expression"=color
# or
#    MENUCOLOR="regular expression"=color&attribute
#  Show all blessed items in green
MENUCOLOR=" blessed " = green
#  Show all holy water in green
MENUCOLOR=" holy water" = green
#  Show all cursed items in red
MENUCOLOR=" cursed " = red
#  Show all unholy water in red
MENUCOLOR=" unholy water" = red
#  Show all cursed worn items in orange and underlined
MENUCOLOR=" cursed .* (being worn)" = orange&underline
#  Show all cooling down items in black
MENUCOLOR="(cooling down)" = black
#  Show all forgotten spells in black
MENUCOLOR="(You cannot recall this spell)" = black
#  Show all spells that do not have any components in black
MENUCOLOR="(Not required)" = black

# Status hilites
OPTIONS=statushilites
# HP
OPTIONS=hitpointbar
OPTIONS=hilite_status:hitpoints/100%/gray&normal
OPTIONS=hilite_status:hitpoints/<100%/green&normal
OPTIONS=hilite_status:hitpoints/<66%/yellow&normal
OPTIONS=hilite_status:hitpoints/<50%/orange&normal
OPTIONS=hilite_status:hitpoints/<33%/red&bold
OPTIONS=hilite_status:hitpoints/<15%/red&inverse

## Pw
OPTIONS=hilite_status:power/100%/gray&normal
OPTIONS=hilite_status:power/<100%/green&normal
OPTIONS=hilite_status:power/<66%/yellow&normal
OPTIONS=hilite_status:power/<50%/orange&normal
OPTIONS=hilite_status:power/<33%/red&bold

## Carry
OPTIONS=hilite_status:cap/burdened/yellow/stressed/orange/strained/red&bold/overtaxed/red&inverse/overloaded/red&inverse&blink

## Hunger
OPTIONS=hilite_status:hunger/satiated/yellow/hungry/orange/weak/red&bold/fainting/red&inverse/fainted/red&inverse&blink

## Skill
OPTIONS=hilite_status:skill-availability/skill/green
 
## Skill
OPTIONS=hilite_status:two-weapon-fighting/2weap/yellow

## Mental
OPTIONS=hilite_status:condition/hallu/yellow
OPTIONS=hilite_status:condition/conf/orange
OPTIONS=hilite_status:condition/stun/red&bold
OPTIONS=hilite_status:condition/slow/yellow
OPTIONS=hilite_status:condition/fear/yellow
OPTIONS=hilite_status:condition/cancl/yellow
OPTIONS=hilite_status:condition/silent/yellow
OPTIONS=hilite_status:condition/blind/yellow

## Health
OPTIONS=hilite_status:condition/termill/red&inverse
OPTIONS=hilite_status:condition/foodpois/red&inverse
OPTIONS=hilite_status:condition/slime/red&inverse
OPTIONS=hilite_status:condition/stone/red&inverse
OPTIONS=hilite_status:condition/suffoc/red&inverse
OPTIONS=hilite_status:condition/strngl/red&inverse
OPTIONS=hilite_status:condition/paral/red&inverse
OPTIONS=hilite_status:condition/sleep/red&inverse

# St, Dx, Co, In, Wi, Ch
OPTIONS=hilite_status:characteristics/up/green/down/red
Clone this wiki locally