Alter Xenotype on Ingest - KonradHeinser/EBSGFramework GitHub Wiki

This ingestion outcome doer allows you to make ingestibles that alter a pawn's xenotype similar to the Alter Xenotype Ability. If you are familiar with that comp, all the same options apply:

            <outcomeDoers>
                <li Class="EBSGFramework.IngestionOutcomeDoer_AlterXenotype">
                </li>
            </outcomeDoers>

These are the options available in the outcome doer:

  • xenotypes : A weighted list that uses xenotype defNames as the tag, and the weight as the value
  • filth : A ThingDef to create around the pawn when the comp triggers
  • filthCount : Default (4-7) : How many of the filth to create, if filth is used
  • 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 has a 98% chance of turning the ingester into a sanguophage, and a 1% chance of turning them into a hussar and neanderthal. Because setXenotype is set to False, most of their old genes will remain as long as they are not incompatible with one of the new xenotype's genes:

    <ThingDef>
        <defName>EvolvingHemogenPack</defName>
        <label>evolving hemogen pack</label>
        <description>A special pack of hemogen that tries to turn the ingester into a mix of a sanguophage and their former xenotype.</description>
        <category>Item</category>
        <thingClass>ThingWithComps</thingClass>
        <drawerType>MapMeshOnly</drawerType>
        <useHitPoints>true</useHitPoints>
        <healthAffectsPrice>false</healthAffectsPrice>
        <selectable>true</selectable>
        <stackLimit>10</stackLimit>
        <tickerType>Rare</tickerType>
        <possessionCount>5</possessionCount>
        <socialPropernessMatters>true</socialPropernessMatters>
        <alwaysHaulable>true</alwaysHaulable>
        <pathCost>14</pathCost>
        <allowedArchonexusCount>-1</allowedArchonexusCount>
        <resourceReadoutPriority>Last</resourceReadoutPriority>
        <drawGUIOverlay>true</drawGUIOverlay>
        <graphicData>
            <texPath>Things/Item/Resource/HemogenPack</texPath>
            <graphicClass>Graphic_StackCount</graphicClass>
            <drawSize>0.85</drawSize>
        </graphicData>
        <statBases>
            <MaxHitPoints>60</MaxHitPoints>
            <DeteriorationRate>5</DeteriorationRate>
            <Mass>0.50</Mass>
            <Flammability>0.7</Flammability>
            <Nutrition>0.1</Nutrition>
            <Beauty>0</Beauty>
            <MarketValue>5</MarketValue>
        </statBases>
        <thingCategories>
            <li>Foods</li>
        </thingCategories>
        <ingestible>
            <foodType>Fluid</foodType>
            <preferability>DesperateOnly</preferability>
            <canAutoSelectAsFoodForCaravan>false</canAutoSelectAsFoodForCaravan>
            <ingestSound>HemogenPack_Consume</ingestSound>
            <outcomeDoers>
                <li Class="EBSGFramework.IngestionOutcomeDoer_AlterXenotype">
                    <setXenotype>False</setXenotype>
                    <xenotypes>
                        <Sanguophage>98</Sanguophage>
                        <Hussar>1</Hussar>
                        <Neanderthal>1</Neanderthal>
                    </xenotypes>
                </li>
            </outcomeDoers>
        </ingestible>
        <comps>
            <li Class="CompProperties_Forbiddable"/>
        </comps>
    </ThingDef>
⚠️ **GitHub.com Fallback** ⚠️