RimWorld

RimWorld

Gloomy Extra - Kitchen
Semo  [developer] 5 Jul, 2019 @ 12:11pm
Example - How to add linkables to other items
This is an example of adding the gloomy extra - kitchen items to the electric butcher table mod. The principle is the same for any other production table or furniture so you can use this as an example for other items as well. Like beds.

You might want to make a local copy of the mod so any updates won't override your changes.
The best way to do this is by using Mod manager:
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1507748539

Making a patch would be better but is a bit more complex and requires a tutorial on it's own.

1. Download Notepad++[notepad-plus-plus.org]
2. Open the xml file for the electric butcher table with notepad++
(probably located in ..\mods\Modname\Defs\ThingDefs_Buildings\Production)

3. Look for <comps> and add the Defname of the item you wish to link to it.

<comps>
<li Class="CompProperties_AffectedByFacilities">
<linkableFacilities>
<li>ToolCabinet</li>
</linkableFacilities>
</li>
</comps>


In this case that would look like this:

<comps>
<li Class="CompProperties_AffectedByFacilities">
<linkableFacilities>
<li>ToolCabinet</li>
<li>SM_ButcherShelf</li>
</linkableFacilities>
</li>
</comps>


If you want the rest of the gloomy kitchen items linked as well just add all of these:

<li>SM_Sink</li>
<li>SM_ButcherShelf</li>
<li>SM_KitchenCupboard_A</li>
<li>SM_KitchenCupboard_B</li>
<li>SM_KitchenCupboard_C</li>
Last edited by Semo; 7 Oct, 2019 @ 6:31pm