Wikihack
Advertisement

The Shirts are within "ifdef Tourist": in objects.c#line400 of the source. Would this make random generation impossible for everyone else? (the article implies shops are the exception).

The tourist seems to get an '8' for the Hawaiian shirt, '2' for a T shirt and as a result loses '10' for a bronze plate mail.--PeterGFin 12:44, August 7, 2010 (UTC)

The #ifdef and #endif blocks are for conditional compilation. Some places on the wiki will make reference to "if SOMEVALUE is defined then...". For example, if MAIL is not defined (by '#define MAIL', then mail daemons cannot exist - this is distinct from the mail option simply being turned off. This is done during compilation, and there is no way to change these without recompiling the nethack source code.
The result is that if tourists exist, then Tshirts exist too (both types), and if tourists don't exist, neither do Tshirts. All references to Tshirts, e.g. when checking armor slots for destroy armor, will include the #ifdef TOURIST - if TOURIST is not defined, then there isn't even a Tshirt armor slot. There is no change in whether or not you are a tourist when playing the game, only if you could play as a tourist.
I don't know what you mean for the 2nd half. Could you elaborate? That sounds like player monster generation. -- Qazmlpok 14:12, August 7, 2010 (UTC)
Advertisement