Pawn Crate - KonradHeinser/EBSGFramework GitHub Wiki

This thing class that spawns a pawn when opened or destroyed with the same faction as the destroyer/opener:

        <thingClass>EBSGFramework.Building_PawnCrate</thingClass>
        <modExtensions>
            <li Class="EBSGFramework.EBSGExtension">
            </li>
        </modExtensions>

If the extension isn't added, the defaults will still be used. These are the options available within the extension for the class:

  • xenotype : Default (Baseliner) : The XenotypeDef used for the created pawn
  • developmentalStage : Default (Adult) : The developmental state to assign to each pawn when made. Options are Newborn, Baby, Child, and Adult
  • pawnKind : Default (EBSG_BlankColonistist) : The PawnKindDef to use for the created pawn
    • The default has no apparel, weapons, or implants

This is a variation of the hermetic crate that creates a hussar that has the same faction as the opener/destroyer:

    <ThingDef ParentName="CrateBase">
        <defName>HussarPod</defName>
        <label>hussar pod</label>
        <description>A self-powered crate with a hussar inside, ready to serve whoever releases them.</description>
        <size>(1, 2)</size>
        <fillPercent>0.40</fillPercent>
        <thingClass>EBSGFramework.Building_PawnCrate</thingClass>
        <graphicData>
            <texPath>Things/Building/Ruins/AncientHermeticCrate</texPath>
            <graphicClass>Graphic_Multi</graphicClass>
            <drawSize>(1, 2)</drawSize>
            <shadowData>
                <volume>(1, 0.45, 2)</volume>
            </shadowData>
        </graphicData>
        <statBases>
            <MaxHitPoints>250</MaxHitPoints>
            <WorkToBuild>1000</WorkToBuild>
        </statBases>
        <building>
            <openingEffect>HermeticCrateOpened</openingEffect>
        </building>
        <comps>
            <li Class="CompProperties_EmptyStateGraphic">
                <graphicData>
                <texPath>Things/Building/Ruins/AncientHermeticCrateOpen</texPath>
                <graphicClass>Graphic_Multi</graphicClass>
                <drawSize>(1, 2)</drawSize>
                </graphicData>
            </li>
            <li Class="CompProperties_ThrownFleckEmitter">
                <fleck>TerminalScreenLensFlare</fleck>
                <offsetMin>(-0.3,0,-0.7)</offsetMin>
                <offsetMax>(0.3,0,-0.7)</offsetMax>
                <emissionInterval>90</emissionInterval>
                <scale>1~1.1</scale>
                <colorA>(239,133,50,255)</colorA>
                <colorB>(239,133,50,255)</colorB>
            </li>
            <li Class="CompProperties_Glower">
                <glowRadius>3</glowRadius>
                <glowColor>(239,133,50,0)</glowColor>
            </li>
        </comps>
        <tickerType>Normal</tickerType>
        <modExtensions>
            <li Class="EBSGFramework.EBSGExtension">
                <xenotype>Hussar</xenotype>
            </li>
        </modExtensions>
    </ThingDef>
⚠️ **GitHub.com Fallback** ⚠️