Modding Tutorials/Docs/Pawn
also check out solutions
API[edit]
public class Pawn : ThingWithComps
Notable inherits:
GetComp<T>()
Info[edit]
public PawnKindDef kindDef;
Defines the pawn species
public Gender gender;
Where Gender is an enum
public Pawn_AgeTracker ageTracker;
public DevelopmentalStage DevelopmentalStage
public Pawn_StoryTracker story;
Contains a pawns backstory, traits, appearence (hair and skin), favourite color, birth names and title
public Pawn_RecordsTracker records;
Contains a pawns records
Name[edit]
public immutable Name Name;
public TaggedString NameShortColored;
A TaggedString of the pawns nickname if the pawn has a triple, or its name if the pawn has a single.
public TaggedString NameFullColored;
A TaggedString of the pawns full name.
Faction[edit]
public readonly bool IsColonist;
public readonly bool IsFreeColonist;
public readonly bool IsFreeNonSlaveColonist;
public readonly bool IsPrisoner;
public readonly bool IsPrisonerOfColony;
public readonly bool IsSlave;
public readonly bool IsSlaveOfColony;
public readonly bool IsFreeman;
Is not part of any Faction (wild pawns)
public Faction HomeFaction;
Guests[edit]
public GuestStatus? GuestStatus;
public Faction HostFaction;
public Faction SlaveFaction;
TODO: unsure if these are specifically for guests
Mental[edit]
public Pawn_MindState mindState;
The following are null safe references to its inner values:
public bool InMentalState; => mindState.mentalStateHandler.inMentalState
public bool InAggroMentalState; => mindState.mentalStateHandler.CurStateDef
public MentalState MentalState; => mindState.mentalStateHandler.CurState | null
public MentalStateDef MentalStateDef; => mindState.mentalStateHandler.CurStateDef | null
public bool Inspired; => mindState.inspirationHandler.Inspired
public Inspiration Inspiration; => mindState.inspirationHandler.CurState
public InspirationDef InspirationDef; => mindState.inspirationHandler.CurStateDef
public Pawn_NeedsTracker needs;
public Pawn_Thinker thinker;
public Pawn_GuiltTracker guilt;
Skills[edit]
Health[edit]
public Pawn_HealthTracker health
Contains pawn health hediffs, operation bills, downed state and more.
public Pawn_InfectionVectorTracker infectionVectors;
Surgery[edit]
public BillStack BillStack
The BillStack for Operation Bills. Returns health.surgeryBills
public overrides bool CurrentlyUsableForBills()
If this pawn is currently able to be operated on.
public overrides bool UsableForBillsAfterFueling()
Returns CurrentlyUsableForBills()
public void Notify_BillDeleted(Bill bill)
Call this if you ever remove an operation scriptually from billstack
Combat[edit]
public Pawn_DraftController drafter;
public readonly bool Drafted
public Pawn_MeleeVerbs meleeVerbs;
public Pawn_StanceTracker stances;
public Pawn_AbilityTracker abilities;
Psycast[edit]
public bool HasPsylink;
public Pawn_PsychicEntropyTracker psychicEntropy;
Contains everything psylink related
Inventory[edit]
public Pawn_InventoryTracker inventory;
public Pawn_EquipmentTracker equipment;
public Pawn_ApparelTracker apparel;
Jobs[edit]
pathfinding[edit]
Policies[edit]
Rendering[edit]
Anomaly[edit]
public readonly bool IsCreepJoiner
Biotech[edit]
Mechs[edit]
public Pawn_MechanitorTracker mechanitor;
Sanguines =[edit]
Other/To be categorized[edit]
-->