Alter Xenotype (Hediff) - KonradHeinser/EBSGFramework GitHub Wiki

This hediff comp alters the xenotype of the pawn when the hediff is within the severity range given. Once the comp activates, the hediff is removed to avoid accidental re-triggers. The basic comp looks like this:

        <comps>
            <li Class="EBSGFramework.HediffCompProperties_AlterXenotype">
                <xenotypes>
                    <InsertXenotypeDefNameHere>1</InsertXenotypeDefNameHere>
                </xenotypes>
            </li>
        </comps>

These are the options available in the comp:

  • xenotypes : A weighted list that uses xenotype defNames as the tag, and the weight as the value
  • severities : Default (0~999) : The severity range the hediff needs to be in for the hediff to activate
  • filth : A ThingDef to create around the pawn when the comp triggers
  • filthCount : Default (4-7) : How many of the filth to create, assuming one is listed
  • setXenotype : Default (True) : While true, most old genes are removed, with the only exceptions being hair and skin color endogenes. When false, only genes that are incompatible with genes from the new xenotype are removed, creating a type of hybrid that still uses the new xenotype's name
  • sendMessage : Default (True) : Send a message when the genes are overwritten

This example turns the pawn into a mix between a hussar and whatever xenotype they originally were after a day passes. Before the hussar genes are applied after all incompatible genes are removed. It also has a 1% chance of instead applying the neanderthal xenotype:

    <HediffDef>
        <defName>Hussarish</defName>
        <label>hussarish</label>
        <description>Turns the pawn into a blend of a hussar and their original xenotype after a day. Very rarely, the process fails and applies the neanderthal xenotype instead.</description>
        <everCurableByItem>false</everCurableByItem>
        <initialSeverity>0.001</initialSeverity>
        <stages />
        <hediffClass>HediffWithComps</hediffClass>
        <scenarioCanAdd>false</scenarioCanAdd>
        <comps>
            <li Class="EBSGFramework.HediffCompProperties_AlterXenotype">
                <xenotypes>
                    <Hussar>0.99</Hussar>
                    <Neanderthal>0.01</Neanderthal>
                </xenotypes>
                <severities>1~999</severities>
                <setXenotype>False</setXenotype>
            </li>
            <li Class="HediffCompProperties_SeverityPerDay">
                <severityPerDay>1</severityPerDay>
            </li>
        </comps>
    </HediffDef>
⚠️ **GitHub.com Fallback** ⚠️