Skill Change Hediff - KonradHeinser/EBSGFramework GitHub Wiki

This hediff comp allows you to change a pawn's skills for however long they have the hediff. It uses a list of items similar to what Skill Changing Genes uses. The basic comp looks like this:

        <comps>
            <li Class="EBSGFramework.HediffCompProperties_TemporarySkillChange">
                <skillChanges>
                    <li>
                    </li>
                </skillChanges>
            </li>
        </comps>

Each additional skill you want to change will require an extra li on the list. Each li has these tags available in it:

  • skill : The skill you want to change. If it's left blank, then the code will pick a random skill that has not been altered by the comp before that point

  • skillChange : Default (0~0) : How many levels to add to the skill. If negative, the number of levels to subtract from the skill

  • passionChange : Default (0) : The number of steps you want passion to change by (i.e. 1 would make None become Minor, and Minor become Major, while -1 would make Major become Minor, and Minor become None)

  • passion : The desired passion to be set to. The vanilla options are None, Minor, and Major. To use this, setPassion must be true and passionChange will be ignored

  • setPassion : Default (False) : Tells the comp that instead of using passionChange, you're using passion to statically set the new passion

Note about passionChange, if a mod adds passions, negative changes will likely not be processed properly (will default to vanilla passions, usually None if currently a modded passion). Positive values will work for it as long as the mod in question updates IncrementPassion.


This example makes a pawn have maximum intellectual and no passion in intellectual for however long the hediff is active. Additional comps could be added to it to make the hediff go away by itself

    <HediffDef>
        <defName>Smertness</defName>
        <label>smertness</label>
        <description>They're smarter now</description>
        <everCurableByItem>false</everCurableByItem>
        <initialSeverity>0.001</initialSeverity>
        <stages />
        <hediffClass>HediffWithComps</hediffClass>
        <scenarioCanAdd>false</scenarioCanAdd>
        <comps>
            <li Class="EBSGFramework.HediffCompProperties_TemporarySkillChange">
                <skillChanges>
                    <li>
                        <skill>Intellectual</skill>
                        <setPassion>True</setPassion>
                        <passion>None</passion>
                        <skillChange>20</skillChange>
                    </li>
                </skillChanges>
            </li>
        </comps>
    </HediffDef>
⚠️ **GitHub.com Fallback** ⚠️