People in the Colony - KonradHeinser/EBSGFramework GitHub Wiki
This class creates moods based on how many colonists and prisoners are present. The mood label has 5 stages (if you have less, you'll get errors, and any beyond will be ignored). The first stage is active when alone, the second when there are 5 or fewer people, third at 10 or fewer, fourth at 15 or fewer, and the fifth stage is active when there are 16 or more people. These are just labels, and technically don't have an effect. To set the thought to follow this structure, you need the following worker and thought classes:
<thoughtClass>EBSGFramework.Thought_Situational_PeopleInColony</thoughtClass>
<workerClass>EBSGFramework.ThoughtWorker_PeopleInColony</workerClass>
The moods themselves use a curve within the modExtension. The curve point represent the number of colonists, and the mood to assign. Because it is a curve, you don't technically need to specify every single mood for colonist counts from 1 to 16. A mood curve looks something like this:
<modExtensions>
<li Class="EBSGFramework.EBSGThoughtExtension">
<peopleToMoodCurve>
<points>
<li>(1, -8)</li>
<li>(2, -6)</li>
<li>(3, -5)</li>
<li>(4, -4)</li>
<li>(5, -3)</li>
<li>(6, -2)</li>
<li>(7, 0)</li>
<li>(12, 0)</li>
<li>(13, 4)</li>
<li>(14, 6)</li>
<li>(15, 8)</li>
<li>(16, 12)</li>
</points>
</peopleToMoodCurve>
</li>
</modExtensions>
The pack member gene from Environmental Genes has the following thought related to it. When the colony has between 7 and 12 colonists, there is no mood effect due to the curve having 0 on both ends.
<ThoughtDef>
<defName>EBSG_PackMember</defName>
<thoughtClass>EBSGFramework.Thought_Situational_PeopleInColony</thoughtClass>
<workerClass>EBSGFramework.ThoughtWorker_PeopleInColony</workerClass>
<requiredGenes>
<li>EBSG_PackMember</li>
</requiredGenes>
<stages>
<li>
<label>pack member alone</label>
<description>Being alone makes me feel so nervous. There's nobody here to watch my back.</description>
<baseMoodEffect>-8</baseMoodEffect>
</li>
<li>
<label>pack member in small pack</label>
<description>There's so few of us. What if one of us needs to leave for a while and everyone is attacked while they are gone?</description>
<baseMoodEffect>-4</baseMoodEffect>
</li>
<li>
<label>pack member in growing pack</label>
<description>Life is beginning to become easier as our colony grows.</description>
<baseMoodEffect>0</baseMoodEffect>
</li>
<li>
<label>pack member in sizable pack</label>
<description>I can rest easier now that there are more of us.</description>
<baseMoodEffect>6</baseMoodEffect>
</li>
<li>
<label>pack member in large pack</label>
<description>There are many of us here, and we are strong because of it.</description>
<baseMoodEffect>12</baseMoodEffect>
</li>
</stages>
<modExtensions>
<li Class="EBSGFramework.EBSGThoughtExtension">
<peopleToMoodCurve>
<points>
<li>(1, -8)</li>
<li>(2, -6)</li>
<li>(3, -5)</li>
<li>(4, -4)</li>
<li>(5, -3)</li>
<li>(6, -2)</li>
<li>(7, 0)</li>
<li>(12, 0)</li>
<li>(13, 4)</li>
<li>(14, 6)</li>
<li>(15, 8)</li>
<li>(16, 12)</li>
</points>
</peopleToMoodCurve>
</li>
</modExtensions>
</ThoughtDef>