Spawn Humanlike - KonradHeinser/EBSGFramework GitHub Wiki

This hediff def will cause humanlikes to pop out of the pawn on occasion without having to rely on the standard birthing process. You can set the minimum and maximum hediff severity required for the hediff, along with what developmental stage they will pop out in. The basic comp looks like this:

        <comps>
            <li Class="EBSGFramework.HediffCompProperties_SpawnHumanlike">
            </li>
        </comps>

One important thing to note is that the hediff will view the carrier as the "mother", regardless of gender. This is to make it easier to standardize stuff (i.e. if only the giver's xenotype should be used, gender won't break the effect), and shouldn't usually have any notable in-game effect.

If you plan on adding this hediff via ability, use Give Multiple Hediffs specifically to make the hediff always use the caster's faction (if available), and to set the father to the caster


These are the basic spawn setup options available:

  • maxTotalSpawn : Default (1) : The total number of children that can be spawned. If set to -1, it will spawn indefinitely
  • spawnPerCompletion : Default (1~1) : How many pawns to try to spawn. This number will be limited by how many total spawns are left
  • completionTicks : Default (600~600) : How many ticks there are between spawns. This should probably be set to a number higher than 10 seconds. Only needed if onInterval is left as True
  • validSeverity : Default (0~99999) : Causes the effect to only activate when in this range. If a single value is entered, then any severity above that number will be considered valid
  • onInterval : Default (True) : Causes the spawns to happen when the interval set in completionTicks runs out
  • onDeath : Default (False) : Causes spawning to occur when the pawn dies. This is subject to the same maxTotalSpawn limit as onInterval
  • onRemoval : Default (False) : Causes spawning to occur when the hediff is removed. This is subject to the same maxTotalSpawn limit as onInterval, and will check to make sure the pawn isn't dead
  • spawnRemainingOnRemovalOrDeath : Default (True) : Overrides spawnPerCompletion to ensure all remaining pawns will be spawned
  • developmentalStage : Default (Adult) : The developmental state to assign to the child when made via intervals. Options are Baby, Child, and Adult
  • devStageForRemovalOrDeath : Default (Child) : The developmental state to assign to the child when made post host death or hediff removal. Options are Baby, Child, and Adult
  • removeHediffOnFinalSpawn : Default (True) : When it runs out of the spawns listed in maxTotalSpawn, the hediff is removed
  • killHostOnFinalSpawn : Default (False) : When it runs out of the spawns listed in maxTotalSpawn, the pawn is killed
  • staticXenotype : XenotypeDef to always apply to the pawn
  • xenotypeSource : Default (Hybrid) : If there is no static xenotype, then this will attempt to inherit genes from the related parent(s). The options are Hybrid, Mother, and Father. If staticXenotype is empty and this fails, the child will be born as a baseliner
  • staticPawnKind : A static PawnKindDef to use. If not filled in, the game will attempt to use the mother's pawn kind def, followed by the father's, followed by colonist if both of those fail

Some miscellaneous things that apply post-"birth":

  • sendLetters : Default (False) : Send standard birth letters for each pawn made. Generally speaking, it's better to leave this as False if the pawn will not be a baby on creation, but if it is spawning a baby, it's recommended to use it as the game isn't very good at naming colonist babies unprompted
  • letterLabelNote : Default (born) : The label of the letter is the pawn's name followed by whatever is put here
  • letterTextPawnDescription : Default ("became a healthy baby!) : The end portion of the description text in the letter
  • filthOnCompletion : ThingDef to create for every spawn. If left empty, nothing is made
  • filthPerSpawn : Default (4~7) : The amount of filth to make for each baby made
  • miscarriageThought : Default (False) : If the hediff is removed before all children are created, this attempts to apply a mood penalty to known parents. Does not apply to the mother if the child's faction is not the same as theirs
  • motherMiscarriageThought : Default (Miscarried) : The ThoughtDef to try to apply to the mother if miscarriageThought is True and the object is destroyed
  • fatherMiscarriageThought : Default (PartnerMiscarried) : The ThoughtDef to try to apply to the father if miscarriageThought is True and the object is destroyed
  • bornThought : Default (True) : Apply a baby born thought to parents when the child is born. Doesn't apply to the mother if the child's faction is not the same as theirs
  • motherBabyBornThought : Default (BabyBorn) : The ThoughtDef to try to apply to the mother if bornThought is True and a child is born
  • fatherBabyBornThought : Default (BabyBorn) : The ThoughtDef to try to apply to the father if bornThought is True and a child is born

This example will kill the pawn after up to an hour passes, and spawn 3 adult hussars around the death location. A letter is not sent so the game can handle the naming of the hussars automatically. The hussars will be in the player faction unless an ability is made to make it usable in-game

    <HediffDef ParentName="EBSG_TestHediffBase">
        <defName>SurpriseMurderPawns</defName>
        <comps>
            <li Class="EBSGFramework.HediffCompProperties_SpawnHumanlike">
                <staticXenotype>Hussar</staticXenotype>
                <maxTotalSpawn>3</maxTotalSpawn>
                <spawnPerCompletion>3</spawnPerCompletion>
                <completionTicks>2000~2500</completionTicks>
                <killHostOnFinalSpawn>True</killHostOnFinalSpawn>
                <developmentalStage>Adult</developmentalStage>
                <sendLetters>False</sendLetters>
            </li>
        </comps>
    </HediffDef>
⚠️ **GitHub.com Fallback** ⚠️