-
Notifications
You must be signed in to change notification settings - Fork 3
Interchangeable Categories
Interchangeable Items can be assigned to Item Categories. This allows the creation of a connected list between two or more different mods. Defining your item in a "Category" allows other mod authors to make their items interchangeable with yours, or allows you to make your items interchangeable with a category someone else has defined. For example:
<Defs>
<Replace_Stuff_Compatibility.InterchangeableItems MayRequire="Ludeon.RimWorld.Royalty">
<defName>ReplacementMod_Royalty</defName>
<replaceLists>
<li>
<category>Lights</category>
<items>
<li>Brazier</li>
<li>DarklightBrazier</li>
</items>
</li>
</replaceLists>
</Replace_Stuff_Compatibility.InterchangeableItems>
</Defs><Defs>
<Replace_Stuff_Compatibility.InterchangeableItems MayRequire="Ludeon.RimWorld.Ideology">
<defName>ReplacementMod_Ideology</defName>
<replaceLists>
<li>
<category>Lights</category>
<items>
<li>Darktorch</li>
<li>DarktorchFungus</li>
</items>
</li>
</replaceLists>
</Replace_Stuff_Compatibility.InterchangeableItems>
</Defs>In this example, we have two different .xml files defining a list of Interchangeable items in the category of Lights. This means that Brazier, DarklightBrazier, Darktorch and Darktorch are all considered Interchangeable. If another mod comes along and adds their own def with the category of Lights, such as
<Defs>
<Replace_Stuff_Compatibility.InterchangeableItems MayRequire="vanillaexpanded.vfespacer">
<defName>ReplacementMod_VanillaExpandedSpacer</defName>
<replaceLists>
<li>
<category>Lights</category>
<items>
<li>Light_SpacerLamp</li>
<li>Spacer_OutdoorLamp</li>
</items>
</li>
</replaceLists>
</Replace_Stuff_Compatibility.InterchangeableItems>
</Defs>Then Light_SpacerLamp and Spacer_OutdoorLamp become part of the same interchangeable list.
The list of categories is not limited to what's already defined. Putting in a category name that does not exist yet will create that new category. With that said, here are some of the Categories defined by this mod for the Vanilla base game, so that you can add your Things to the list of Vanilla replaceable items:
- Lights
- PoweredGenerators
- SolarGenerators
- ArtTables
- Dressers
- EndTables
- Wardrobes
- Columns
- TVs
- PowerConduits
- Sunlamps
- ResearchBenches
- Smelters
- Smithys
- MachiningTables
- Stoves
- TailoringBenches
- Fabricators