Change Def if Not Unique - AndroidQuazar/VanillaExpandedFramework GitHub Wiki

CompChangeDefIfNotUnique swaps the animal for a different one if it isn't the only one with its defName in the map, therefore making it unique

   public string defToChangeTo = "";

How do I use this code?

It is a comp class, so you just add it in XML in the <comps> tag. For example, this allows the Ancient Giant Spider in Vanilla Animals Expanded - Caves to be unique (turns a second one into a rat, which the player will most likely ignore)

<comps>
	<li Class="AnimalBehaviours.CompProperties_ChangeDefIfNotUnique">
		<defToChangeTo>Rat</defToChangeTo>
	</li>
</comps>
⚠️ **GitHub.com Fallback** ⚠️