Hidden Designators - Vanilla-Expanded/VanillaExpandedFramework GitHub Wiki

<- Back

HiddenDesignatorsDef is a custom def class that specified a list of buildings that won't appear in the architect panel for players.

So... why is this useful, at all? Some of the systems we use require the game to auto generate a designator, but we DON'T want it to be on the architect panel, and by default, they do.

  • First use for this is Props. We need the designator of each prop to be created, so we can use it on our custom prop build menu, but we don't want all the props to appear on the architect menu. This doesn't apply to all props, only those that can be built using their defined materials, instead of just silver. I explain it a bit more here
  • Second use is the ARC generators in Vanilla Quests Expanded - The Generator. We want colonists to be able to build the ARCs, but their frames are generated by the code, and they don't appear in the architect menu
        public List<BuildableDef> hiddenDesignators;

How do I use this code?

It is a custom def class, so you just add it in an xml file. For example, this is the hidden designators list in Vanilla Quests Expanded - The Generator:

<?xml version="1.0" encoding="UTF-8"?>
<Defs>
	<VEF.Buildings.HiddenDesignatorsDef>
		<defName>VQE_HiddenDesignators</defName>
		<hiddenDesignators>
			<li>VQE_Genetron_WoodFired</li>
			<li>VQE_Genetron_WoodFueled</li>
			<li>VQE_Genetron_WoodPowered</li>
			<li>VQE_Genetron_WoodBlasting</li>
			
			<li>VQE_Genetron_ChemfuelPowered</li>
			<li>VQE_Genetron_ChemfuelBoosted</li>
			<li>VQE_Genetron_ChemfuelCharged</li>
			<li>VQE_Genetron_ChemfuelFortified</li>
			
			<li>VQE_Genetron_Geothermal</li>
			<li>VQE_Genetron_SteamPowered</li>
			<li>VQE_Genetron_ThermalVent</li>
			<li>VQE_Genetron_HeatPowered</li>
			
			<li>VQE_Genetron_UraniumPowered</li>
			<li>VQE_Genetron_Nuclear</li>
			<li>VQE_Genetron_Isotopic</li>
			<li>VQE_Genetron_Atomic</li>
		</hiddenDesignators>
	</VEF.Buildings.HiddenDesignatorsDef>
</Defs>
⚠️ **GitHub.com Fallback** ⚠️