Object materials is the name of an item system that allows various objects to generate made of something different from their ordinary base material. It was first introduced in NetHack brass, and L later made it into a standalone patch.
The general purpose of the patch is to increase the variance in equipment that a player may come across in NetHack and/or its variants, as well as the strategies employed with such items. This can have diverse effects on a given game: one hero may realize too late that their gold wand of death is a valid target for an overlooked leprechaun; another may employ a pair of mithril short swords to slice their way through hordes of orcs; still others may try to assemble an all-silver full-body set of armor to thoroughly "demon-proof" themselves before entering Gehennom; and aspiring casters may try to wear as much non-metallic armor as possible.
Artifacts, including artifact weapons, tend to have a set base material; it is sometimes possible to name or create certain artifacts such as Sting and Excalibur, with a weapon of the desired material, though whether this is allowed depends on the variant.
Monsters and object materials
In games with some form of object materials included (typically variants), monsters also have various interactions with each type of object, the more common of which are listed below.
Material hatred is used to refer to any particular material that deals extra damage to a certain type of monster and cannot be safely touched by them, much like the interactions between werecreatures and silver in vanilla NetHack - e.g., elves may have an aversion to iron weapons. Monsters with a material hatred will usually avoid using items of that material where possible, and racial equipment is generally expanded and/or altered to avoid generating monsters with weapons or armor of a hated material; death drops will naturally ignore this restriction.
Croesus often generates with weapons and/or armor that are made of gold.
Object materials by variant
Variants that incorporate some kind of object materials include GruntHack, dNetHack, xNetHack, SpliceHack, and EvilHack; GruntHack's implementation diverges the most from that of L's patch, and is thus much different from other variant implementations.
Below is a list of each variant's implementation of object materials.