Nethack Tournament Patch

The Nethack Tournament Patch adds a "tournament mode" to Nethack. In tournament mode, the dungeon is pregenerated at the beginning of the game from the given random number seed. A particular seed always yields the same dungeon as well as the same starting attributes and equipment for each character class.

The purpose of the tournament mode is to allow people to play Nethack from the same starting point and see who does better. "Better" might mean getting the highest score, the deepest descent, the fastest ascension, or the most pet cockatrices; all the Tournament Patch does is provide an even playing field, as far as such a thing is possible in Nethack.

Differences from Regular Nethack

In tournament mode, some things work slightly differently from regular Nethack.

When the dungeon levels are generated, the difficulty is adjusted to approximate the experience level a typical character is likely to have when first entering that dungeon level. If this guess is badly off, you might end up with an initial monster population that is either too easy or an interesting challenge. However, any new monsters spawned will be of the appropriate level.

It is possible for some artifacts to get randomly generated in the dungeon, especially on the deeper levels. This will of course make them unavailable through wishing or sacrifice, and you'll either have to go looking for them or make do with something else.

Full moon, new moon, and Friday the 13th have no effect in tournament mode.

Bones are never used or saved in tournament mode.

Potential Surprises And Known Issues

The endgame levels are not pregenerated. This is because of the relatively high probability of artifact generation, and because the player's level can vary wildly (from 15 to 30) when entering the endgame.

Due to differences between random number generators on various platforms, the random number seeds are currently platform-dependent. Using Nethack's built-in RNG might make them portable between at least some platforms. Unfortunately there does not seem to be any simple way to enable the built-in RNG for all systems, but I'm planning to look into this more carefully later.

Screenshots

As the RNG seeds are not yet system independent, your dungeon layouts may not resemble these screenshots. However, if you're using an Intel x86 Linux system with modern libraries, you should get the following map with tournament seed 12345:

                                                                                
                                                                                
 ------------     ---------                                                     
 |          |     |       +#             ---------------                        
 |          |#    |       |#             |             |                        
 |          |#    |       |#             |             |                        
 ------------#    |       |#             |             .#####                   
             #    |       |#             |   ^       > |    #  -----------      
             #    |       |###           -.-------+-----    ###|         |      
             #    ------+--  #        #####      ##           #|         |      
             #      #  ##    ###      #          #             |         |      
             #         #     ##################################.         |      
           ###     #####       ###  --------+--                --------.--      
           #-------+-            #  |$........|                  #     #        
           #.       -########    ###|.........|                                 
            |       |              #..........|    ----                         
            |  {    .#######        |.f.......|    |  |                         
            ---------               |.@.......|    |  |                         
                                    -----------    ----                         
                                                                                
                                                                                
                                                                                
Wizard the Evoker         St:7 Dx:13 Co:15 In:18 Wi:11 Ch:14  Neutral           
Dlvl:1  $:0  HP:12(12) Pw:6(6) AC:9  Xp:1/0 T:1                                 
                                                                                

... and a neutral male human wizard's starting inventory should look like this:

                       Weapons                                                  
                       a - a blessed +1 quarterstaff (weapon in hands)          
 ------------     ---- Armor                                                    
 |          |     |    b - a blessed +0 cloak of magic resistance (being worn)  
 |          |#    |    Scrolls                                                  
 |          |#    |    i - an uncursed scroll of identify                       
 ------------#    |    j - an uncursed scroll of enchant armor                  
             #    |    k - an uncursed scroll of scare monster                  
             #    |    Spellbooks                                               
             #    ---- l - a blessed spellbook of force bolt                    
             #      #  m - an uncursed spellbook of cure sickness               
             #         Potions                                                  
           ###     ### f - an uncursed potion of invisibility                   
           #-------+-  g - an uncursed potion of oil                            
           #.       -# h - an uncursed potion of monster detection              
            |       |  Rings                                                    
            |  {    .# d - an uncursed +1 ring of increase damage               
            ---------  e - an uncursed ring of teleport control                 
                       Wands                                                    
                       c - a wand of light (0:12)                               
                       (end)                                                    
                                                                                
Wizard the Evoker         St:7 Dx:13 Co:15 In:18 Wi:11 Ch:14  Neutral           
Dlvl:1  $:0  HP:12(12) Pw:6(6) AC:9  Xp:1/0 T:1                                 
                                                                                

These are for Tournament Patch version 0.1 on Nethack 3.4.1, and will almost certainly change if and when platform-independent seeds are implemented or the patch is revised or applied to any other Nethack version.

Download

You can download the patch here (use your browser's "Save link to disk" feature if your browser mangles text files):

Nethack Tournament Patch 0.1 (13kB)
Initial release for Nethack 3.4.1.

Installation

To install the patch, perform the following steps:

  1. Download the patch above.
  2. Patch your Nethack source. This would go something like:
    cd /path/to/nethack-3.4.1-source
    patch -p1 < /path/to/nethack-tournament-0.1.diff
  3. Recompile Nethack and install as appropriate for your system.

Usage

To enable tournament mode, add the following line to your .nethackrc or other options file:

OPTIONS=tournament:12345
Now start your patched copy of Nethack. You should get a message telling you that you're in tournament mode with the seed 12345, and you should get the same dungeon every time you restart. The seed must be a positive integer.

Tournament mode is disabled by default if the tournament option is not given, or if the seed is not positive. You can also explicitly disable it with:

OPTIONS=!tournament

Contact Information

Bug reports and comments are welcome at nht@waah.dyndns.org.
Page served by waah.dyndns.org.