Desired Genes Precept - KonradHeinser/EBSGFramework GitHub Wiki
This allows you to make precepts to judge any gene, which had to be made because the bloodfeeder precept only allows for one, very specific gene. This has two parts, the opinion of other pawns who have/lack the gene, and a mood for the pawn themselves having/lacking the gene:
This extension is checked for the list of genes to check for. Pawns only ever need to have one of the genes on the list. When checkNotPresent (Default False) is set to True, then it checks to make sure none of the genes are present:
<modExtensions>
<li Class="EBSGFramework.EBSGThoughtExtension">
<relatedGenes>
<li>DefNameHere</li>
</relatedGenes>
<checkNotPresent>False</checkNotPresent>
</li>
</modExtensions>
The thought and worker class for opinions:
<thoughtClass>Thought_SituationalSocial</thoughtClass>
<workerClass>EBSGFramework.ThoughtWorker_Precept_GeneExtension_Social</workerClass>
The thought and worker class for moods:
<thoughtClass>Thought_Situational</thoughtClass>
<workerClass>EBSGFramework.ThoughtWorker_Precept_HasRelatedGene</workerClass>
Example of the variations used in the Superhero Genes mod
<ThoughtDef>
<defName>SHG_Supers_Loved_Opinion_Super</defName>
<thoughtClass>Thought_SituationalSocial</thoughtClass>
<workerClass>EBSGFramework.ThoughtWorker_Precept_GeneExtension_Social</workerClass>
<validWhileDespawned>true</validWhileDespawned>
<stages>
<li>
<label>loved super</label> <!--Innate love for those with the Superhero Gene-->
<baseOpinionOffset>10</baseOpinionOffset>
</li>
</stages>
<modExtensions>
<li Class="EBSGFramework.EBSGThoughtExtension">
<relatedGene>SuperHeroBase</relatedGene> <!--Gene that the code checks for-->
</li>
</modExtensions>
</ThoughtDef>
<ThoughtDef>
<defName>SHG_Supers_LovedSuper</defName>
<thoughtClass>Thought_Situational</thoughtClass>
<workerClass>EBSGFramework.ThoughtWorker_Precept_HasRelatedGene</workerClass>
<stages>
<li>
<label>super self appreciation</label>
<description>I am a super. I can make a difference.</description>
<baseMoodEffect>5</baseMoodEffect>
</li>
</stages>
<modExtensions>
<li Class="EBSGFramework.EBSGThoughtExtension">
<relatedGenes>
<li>SuperHeroBase</li>
</relatedGenes>
</li>
</modExtensions>
</ThoughtDef>
<ThoughtDef>
<defName>SHG_Supers_Supremacy_Opinion_Super</defName>
<thoughtClass>Thought_SituationalSocial</thoughtClass>
<workerClass>EBSGFramework.ThoughtWorker_Precept_GeneExtension_Social</workerClass>
<validWhileDespawned>true</validWhileDespawned>
<stages>
<li>
<label>super supremacy</label> <!--Innate hatred for those without the Superhero Gene-->
<baseOpinionOffset>-40</baseOpinionOffset>
</li>
</stages>
<modExtensions>
<li Class="EBSGFramework.EBSGThoughtExtension">
<relatedGenes>
<li>SuperHeroBase</li>
</relatedGenes>
<checkNotPresent>True</checkNotPresent> <!--Defaults to false, and while true it makes this active if the pawn does NOT have the gene-->
</li>
</modExtensions>
</ThoughtDef>
<ThoughtDef>
<defName>SHG_Supers_SupremacySuper</defName>
<thoughtClass>Thought_Situational</thoughtClass>
<workerClass>EBSGFramework.ThoughtWorker_Precept_HasRelatedGene</workerClass>
<stages>
<li>
<label>non-super self hatred</label>
<description>I am what I hate. I must find a way to discover my true potential.</description>
<baseMoodEffect>-15</baseMoodEffect>
</li>
</stages>
<modExtensions>
<li Class="EBSGFramework.EBSGThoughtExtension">
<relatedGenes>
<li>SuperHeroBase</li>
</relatedGenes>
<checkNotPresent>True</checkNotPresent>
</li>
</modExtensions>
</ThoughtDef>