Forum:Compiling alt.org/competition style Nethack and variants

From NetHackWiki
Revision as of 15:13, 24 August 2011 by StevenAus (talk | contribs)
Jump to navigation Jump to search


It's not essential or the end of the world or anything, but what files do you need to compile a version of Nethack or variants similar to what alt.org or other competition sites/competitions use? If this is not allowed, I'll just practice with standard 3.4.3 or standard variants, but if it is allowed, I'd like to be able to practice in competition style to prepare myself for the real thing. What are the ground rules?

Best regards, Steven.

--StevenAus 00:36, 24 August 2011 (UTC)

Any reason not to just play online, possibly under a different account than you use on tourneys and such? Even if so, the standard 3.4.3 is no different than NAO's version, other than a few trivial interface/message changes. It's the same game. -Ion frigate 01:39, 24 August 2011 (UTC)
First you need to learn how to compile, then patch, after which you can apply the nh343-nao.diff and recompile to get the exact same version as used on NAO. --paxed 09:13, 24 August 2011 (UTC)

How long does it take for patch.exe to apply the na343-nao.diff to the source files? Just so I know how long to wait before I try the 0 or 2 after the -p command ("patch -p1 > nh343-nao.diff").

--StevenAus 13:15, 24 August 2011 (UTC)

If it takes long enough that you have to ask, you're not doing it right. Note that the command is patch -p1 < nh343-nao.diff, notice the less-than sign... --paxed 13:32, 24 August 2011 (UTC)

Yes, sorry about that, I did actually use < when on the Windows command line. I successfully compiled the original 3.4.3 program following the instructions on the Compiling page, and on the Patching page, am up to:

"Start cmd.exe and do the following: cd c:\nh343 path=%path%;c:\mingw\bin patch -p1 < nh343-menucolor.diff"

where I think nh343-nao.diff needs to replace the filename there. However, it says "NetHack is up to date" when compiling after the instructions there, and I can't see any difference in the binary (in fact it doesn't produce an updated binary). What do I need to do differently to get the .diff file to edit some of the source files and then be compiled into an updated binary?

Thanks for all your help!

--StevenAus 14:48, 24 August 2011 (UTC)

Are you getting an error message from the patch command? Also, I think the second line of the cmd instructions should be "set path=%path%;c:\mingw\bin", with an extra "set" at the start; leaving it off is a UNIXism. Ais523 14:52, 24 August 2011 (UTC)
No, not that I can see on the command line. And the original Windows instructions for compiling an install.bat file used "PATH=" rather than "SET PATH=" I using SET PATH/set path without success. I copied the text and saved in in Notepad2 to make sure it was saved in the right format (even though it said in Notepad++ that the .diff file was already in ANSI format). Any ideas of what to do next? --StevenAus 15:13, 24 August 2011 (UTC)