Meme Extension - Vanilla-Expanded/VanillaExpandedFramework GitHub Wiki

<- Back

ExtendedMemeProperties is the def extension that provides new meme behaviours

    //Used to make a meme only be choosable for a certain structure
    public string neededMeme;

    //Used to make a meme only be choosable if another different meme is chosen too
    public List<string> requiredMemes;

    //Used to make all members of the Ideoligion acquire a given trait
    public TraitDef forcedTrait;

    //Used to make the colony start with an opinion offset with all factions
    public int factionOpinionOffset;

    //Used to make all members of the Ideoligion acquire a given ability
    public List<AbilityDef> abilitiesGiven;

    //Used to remove designators if meme is part of the primary ideo
    public List<ThingDef> removedDesignators;

How do I use this code?

Def Extensions are added to the MemeDef of the meme you want to add them to.

If you aren't sure if the MemeDef ALREADY has an extension (for example, if you think another mod will add their own), always use XPATH (xml patching) to add an extension, as there is already a PatchOperationAddModExtension to ensure they don't collide.

For example, this is the Biological Reconstructors meme in Alpha Memes

<modExtensions>
	<li Class="VEF.Memes.ExtendedMemeProperties">
		<abilitiesGiven>
			<li>AM_AnalyzeCreature</li>
		</abilitiesGiven>
	</li>
</modExtensions>

And this is the Monastic meme:

<modExtensions>
	<li Class="VEF.Memes.ExtendedMemeProperties">
		<forcedTrait>Ascetic</forcedTrait>
	</li>
</modExtensions>
⚠️ **GitHub.com Fallback** ⚠️