Patch

From NetHackWiki
(Redirected from Patches)
Jump to navigation Jump to search

In the context of NetHack, a patch is a modification to the vanilla game or one of its variants not created by that game's DevTeam. Hundreds of patches can be found at the NetHack Patch Database.

Some things that patches do:

The practice of releasing individual patches, common in the 1990s and 2000s, has declined in popularity, particularly since NetHack's development source became publicly available. Instead, developers tend to fork NetHack on GitHub and make pull requests there. A pull request versus vanilla is functionally equivalent to a patch, though.

Examples

Many artifact YANIs have been made into patches.

Influential patches

Patch design is not only a popular activity for the NetHack community, but has also influenced the development of the game itself. The NetHack source includes some code that originated in patches for older versions. For example, many features of modern spellcasting first appeared in the Wizard Patch, which was written for NetHack 3.2.0 to 3.2.3 but proved so popular that it became a part of version 3.3.0.

The release of NetHack 3.6.0 in December 2015 saw the addition of a number of patches, including the Dull Book and Moving Clouds patches, to the code.

Many variants of NetHack also use content from existing patches, in addition to creating new content. For example, SLASH'EM included Lethe water and torches, and UnNetHack includes grudges and the Convict role.

Adding patches to NetHack

If you want to know how to patch your NetHack sources, see the article on patching.

patch is also a program that can apply specially formed patch (also known as "diff" after the program that creates them) files. The usual invocation of patch is along the lines of

patch -p1 < patch_file

patch for the Windows platform may be downloaded from http://gnuwin32.sourceforge.net/ (though it seems to have problems under Vista and Win 7, fix: http://jameswynn.com/2010/03/gnu-patch-in-windows-7-or-vista/). After downloading, the patch.exe file needs to be placed in the system PATH, so that it can be found when it is invoked from the command line. One possible place would be in the same directory as the compiler used to compile NetHack (e.g. \mingw\bin) for the MinGW compiler).