ReplaceLib lets RimWorld mod authors replace a ThingDef everywhere it is referenced, including inside crafting and cooking recipes. This is useful for compatibility patches that consolidate overlapping resources or buildings. Add ReplaceLib as a dependency…

ReplaceLib v12.10.2026 · 6.5 МБ · 0 downloads Link verified · ModsFire

ReplaceLib lets RimWorld mod authors replace a ThingDef everywhere it is referenced, including inside recipes. This is useful for compatibility patches that consolidate overlapping resources or buildings. Add ReplaceLib as a dependency and define each replacement in a ReplacerDef. It is compatible with Resource Dictionary.

The example below replaces Medieval Overhaul apiaries and honey with their Vanilla Factions Expanded Medieval 2 counterparts.

xml
<ReplaceLib.ReplacerDef>
    <defName>MedievalOverhaul_VFEMedieval2_Agriculture</defName>
    <replacers>
        <li>
            <replace>DankPyon_Apiary</replace>
            <with>VFEM2_Apiary</with>
        </li>
        <li>
            <replace>DankPyon_Honey</replace>
            <with>VFEM2_Honey</with>
        </li>
    </replacers>
</ReplaceLib.ReplacerDef>

Thanks to Taranchuk for the C# work.

Add to collection Report