The NetHack Code and the NetHack Purity Test

A bit of history

In 1996, Raisse the Thaumaturge (in real life: Irina Rempt-Drijfhout) posted a message on presenting the NetHack Code, a geek code for NetHack players. A bugfix version, version 1.1, was posted by her before she dropped the project. This version can still be found at Viljo Viitanen's site.

In response to the articles about the NetHack Code, some NetHack Purity Tests were posted to the newsgroup. The idea was that your Purity score should be part of your NetHack Code, as was done in Geek codes at that time.

Some time later, in the year 2000, the NetHack Code was revived and updated by Dylan O'Donnell, who kept version 1.2 on his site. Somewhere around that time I wrote NHCodec, a NetHack Code Decoder that took the work out of trying to read a NetHack Code. That also was hosted on Dylan's site.

Boudewijn Wayers finally added even more to the NetHack Code and posted his version, version 1.2.2, on the newsgroup. This version never made it to Dylan O'Donnell's site.

Here you can find all versions of the NetHack Code known to mankind, the NetHack Code Decoder, and the NetHack Purity Tests; furthermore, I keep a list of additions to the code that were suggested on the newsgroup, but were never released.

All versions of the NetHack Code

Version 1.0
The first version, as was posted by Raisse the Thaumaturge on Feb 26, 1996. Of historical interest only.
Version 1.1
The bugfix version that was posted by Raisse on Mar 13, 1996.
Version 1.2
Dylan O'Donnell's updated version, that was posted to the newsgroup on Mar 14, 2000 and subsequently refined; the final version appeared on his website.
Version 1.2.2
Boudewijn Wayers' version as it was posted on the newsgroup on Dec 5, 2000. Some minor changes where suggested and seem to have made it to the version on Dylan's site, but unfortunately I don't have that version.

Suggested additions to the NetHack Code

Once in a while, someone has an idea to add something to the NetHack code; usually this idea is posted to This is a list of articles with suggested additions that were never released.

The NetHack Purity Test

One particularly big addition was suggested by Erwin Mascardo in 1996; he wrote a NetHack Purity Test and suggested to add the score for that test as a "PT"-entry to you NetHack Code.

His Purity Test was not the first one, though; in answer to his posting Walter Puller reposted his Purity Test that he made in 1990.

The NHCodec program

The NetHack Code Decoder (nhcodec) is a Perl program that looks up the meaning of a NetHack code in the text versions of the NetHack Code description files as they appear above. Almost no knowledge about the contents of a valid NetHack Code are built into the program; i.e. the program does not know whether "Sp" is a valid tag, but looks it up in the description file instead. This means that when new tags are added to the NetHack Code, nhcodec will recognise these automatically. If changes are made to the way tags are displayed, changes will be needed to nhcodec.

To run nhcodec, you need Perl (and a computer). I would love to make an online version available that allows you to paste a NetHack Code into a form, but my webserver has no scripting facilities. If anyone is interested in doing that, please contact me at

Version 1.1
This version is capable of reading all versions of the NetHack code from 1.0 to 1.2.2.

Dion Nicolaas