Opinions About Genes - KonradHeinser/EBSGFramework GitHub Wiki
This thought worker seeks to make it easy for you to create genes that cause people around them to experience very particular opinions about carriers of specific genes. This allows you to create genes that everyone loves or hates, and also allows you to create genes that only like seeing one of themselves in the colony.
For the basic portions of the ThoughtDef, you'll need a special worker class, along with the EBSGThoughtExtension. If you want to check for more than one gene, add however many list items you need:
<thoughtClass>Thought_SituationalSocial</thoughtClass>
<workerClass>EBSGFramework.ThoughtWorker_Gene_GeneSocial</workerClass>
<modExtensions>
<li Class="EBSGFramework.EBSGThoughtExtension">
<relatedGenes>
<li></li>
</relatedGenes>
</li>
</modExtensions>
Here are all of the tags related to this worker. compoundingHatred is the only non-list tag:
- relatedGenes : This is the only required tags. The list of genes is checked, and if any thought is found, then the opinion becomes active
- nullifyingGenes : If a pawn has one of these genes, then they will not have an opinion of the checked genes, and the thought will always be inactive for them. It is important to note that if a checked gene is not on this list, then you'll create a gene that loves/hates others with their gene, or any other checked gene
- requiredGenes : This acts as a reverse to nullifyingGenes. The pawn must have one of these genes to consider looking through the genes of the pawn they are developing an opinion of
- compoundingHatred : Default (False) : Named as such because this was initially for negative opinions, this causes the thought stage to increase based on how many of the relatedGenes are present. If you only have one relatedGene, then this should remain false
- For example, if you have a ThoughtDef with 3 stages and 5 genes to check. A target that only has 2 of those genes will activate stage 2, while a target with all 5 will activate stage 3 (the maximum stage).
Example from SHG - Just the Psionist. The purpose of the universally liked gene was to increase the opinion everyone had of the Empath by 20, multiplied by whatever their psychic sensitivity is. The gene itself doesn't contain any additional things related to the opinion:
<ThoughtDef>
<defName>SHG_Psionist_UniversallyLiked</defName>
<thoughtClass>Thought_SituationalSocial</thoughtClass>
<workerClass>EBSGFramework.ThoughtWorker_Gene_GeneSocial</workerClass>
<validWhileDespawned>true</validWhileDespawned>
<effectMultiplyingStat>PsychicSensitivity</effectMultiplyingStat>
<developmentalStageFilter>Baby, Child, Adult</developmentalStageFilter>
<stages>
<li>
<label>universally liked</label>
<baseOpinionOffset>20</baseOpinionOffset>
</li>
</stages>
<modExtensions>
<li Class="EBSGFramework.EBSGThoughtExtension">
<relatedGenes>
<li>SHG_Psionist_UniversallyLiked</li>
</relatedGenes>
</li>
</modExtensions>
</ThoughtDef>