Skip to content

ResearchBuildingExtension

juanosarg edited this page Jun 4, 2026 · 1 revision

<- Back

ResearchBuildingExtension extends the behaviour of a research building

    // List of all research benches (if any) that are treated as equivalent to this one and can be used as replacements.
    public List<ThingDef> equivalentBenches;
    // List of all research facilities (if any) that are treated as equivalent to this one and can be used as replacements.
    public List<ThingDef> equivalentFacilities;

How to use this code?

It is a def extension, so you just add it in XML in the <modExtensions> tag.

For example, this is patched into the base game Multianalyzer so the compact multianalyzer in Vanilla Gravship Expanded works:

<Patch>
  <!-- Make compact multi-analyzer an equivalent building to a multi-analyzer -->
	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="MultiAnalyzer"]</xpath>
		<value>
     			<li Class="VEF.Buildings.ResearchBuildingExtension">
        			<equivalentFacilities>
          				<li>VGE_CompactMultiAnalyzer</li>
        			</equivalentFacilities>
      			</li>
		</value>
	</Operation>
</Patch>

Clone this wiki locally