Need Thoughts - KonradHeinser/EBSGFramework GitHub Wiki

These thought and worker classes allow you to link needs to specific moods without the need for specialized thought and worker classes. At the moment there is only one type available, but in the future more may be added to the framework, and will appear on this page. All of them require the EBSGExtension to link to needs along with whatever the classes require:

        <modExtensions>
            <li Class="EBSGFramework.EBSGExtension">
                <need>InsertNeedDefNameHere</need>
            </li>
        </modExtensions>

Note: If some part of the ThoughtDef's EBSGExtension is missing, then the thought will simply not appear, and no log entries will be made


Basic Curve Need Mood's are needs which only use one stage, but the baseMoodEffect of that stage changes automatically based on the current need level. A vanilla example of this would be the Kill Thirst need, which always displays the same label and description when the mood appears, but mood penalty gets worse as the need goes lower. These are what are required for this type of thoughtdef, though the exact points in the curve can be changed as desired. The curve points should go from low to high, with the left number representing the current percantage satisfaction for the need:

        <thoughtClass>EBSGFramework.Thought_Situational_BasicCurveNeedMood</thoughtClass>
        <workerClass>EBSGFramework.ThoughtWorker_BasicCurveNeedMood</workerClass>
        <modExtensions>
            <li Class="EBSGFramework.EBSGExtension">
                <need>InsertNeedDefNameHere</need>
                <moodOffsetCurve>
                    <points>
                        <li>0, -18</li>
                        <li>0.3, -4</li>
                        <li>0.301, 0</li>
                    </points>
                </moodOffsetCurve>
            </li>
        </modExtensions>

This example is a thought that would be linked to the Murderous Need example. This just provides a curve that is the same as the one kill thirst uses:

    <ThoughtDef>
        <defName>Murderous</defName>
        <thoughtClass>EBSGFramework.Thought_Situational_BasicCurveNeedMood</thoughtClass>
        <workerClass>EBSGFramework.ThoughtWorker_BasicCurveNeedMood</workerClass>
        <developmentalStageFilter>Baby, Child, Adult</developmentalStageFilter>
        <stages>
            <li>
                <label>murderous desires</label>
                <description>Must kill... it has been too long since I have killed somebody.</description>
                <baseMoodEffect>-1</baseMoodEffect>
            </li>
        </stages>
        <modExtensions>
            <li Class="EBSGFramework.EBSGExtension">
                <need>Murderous</need>
                <moodOffsetCurve>
                    <points>
                        <li>0, -18</li>
                        <li>0.3, -4</li>
                        <li>0.301, 0</li>
                    </points>
                </moodOffsetCurve>
            </li>
        </modExtensions>
    </ThoughtDef>
⚠️ **GitHub.com Fallback** ⚠️