@its-not-rocket-science/ananke
    Preparing search index...

    Interface Entity

    Core entity shape.

    Fields are annotated with one of three stability tiers:

    • @core — Required by stepWorld on every tick. Always present; never optional. Removing or renaming any @core field is a Tier 1 breaking change.

    • @subsystem(name) — Optional state consumed only by a specific sub-module (src/sim/sleep.ts, src/sim/aging.ts, etc.). Omitting a subsystem field disables that module's behaviour for this entity; the kernel continues to run correctly without it. Adding new optional subsystem fields is never a breaking change.

    • @extension — Not consumed by Ananke at all. Reserved for host-application data that travels alongside entities (e.g. renderer-side metadata, network session IDs). Currently no built-in fields carry this tag; hosts may add their own ? fields freely.

    interface Entity {
        action: ActionState;
        activeConcentration?: ConcentrationState;
        activeDiseases?: DiseaseState[];
        activeIngestedToxins?: ActiveIngestedToxin[];
        activeVenoms?: ActiveVenom[];
        age?: AgeState;
        ai?: AIState;
        anatomyHelpers?: AnatomyHelperRegistry;
        armourState?: Map<string, { resistRemaining_J: number }>;
        attributes: IndividualAttributes;
        bodyPlan?: BodyPlan;
        capabilitySources?: CapabilitySource[];
        compiledAnatomy?: CompiledAnatomyModel;
        condition: ConditionState;
        cumulativeExposure?: CumulativeExposureRecord[];
        energy: EnergyState;
        extendedSenses?: ExtendedSenses;
        faction?: string;
        foodInventory?: Map<string, number>;
        grapple: GrappleState;
        id: number;
        immunity?: ImmunityRecord[];
        injury: InjuryState;
        intent: IntentState;
        limbStates?: LimbState[];
        loadout: Loadout;
        molting?: {
            active: boolean;
            softeningSegments: string[];
            ticksRemaining: number;
        };
        mount?: MountState;
        party?: string;
        pendingActivation?: PendingActivation;
        personality?: PersonalityTraits;
        physiology?: SpeciesPhysiology;
        position_m: Vec3;
        reputations?: Map<string, number>;
        skills?: SkillMap;
        sleep?: SleepState;
        substances?: ActiveSubstance[];
        teamId: number;
        traits: TraitId[];
        traumaState?: TraumaState;
        vaccinations?: VaccinationRecord[];
        velocity_mps: Vec3;
        willpower?: WillpowerState;
        withdrawal?: WithdrawalState[];
    }
    Index

    Properties

    action: ActionState

    Attack cooldowns, swing momentum, weapon-bind state.

    activeConcentration?: ConcentrationState

    @subsystem(capability) Active concentration aura — cleared when willpower reserve depletes or shock interrupts. Consumed by src/sim/capability.ts.

    activeDiseases?: DiseaseState[]

    @subsystem(disease) Active systemic disease states (incubating or symptomatic). Consumed by src/sim/disease.ts.

    activeIngestedToxins?: ActiveIngestedToxin[]

    @subsystem(toxicology) Active ingested toxins (alcohol, sedatives, alkaloids, heavy metals, radiation). Consumed by src/sim/systemic-toxicology.ts.

    activeVenoms?: ActiveVenom[]

    @subsystem(toxicology) Active venom/toxin injections — ticked at 1 Hz. Consumed by src/sim/toxicology.ts.

    age?: AgeState

    @subsystem(aging) Elapsed life-seconds for aging calculations. Consumed by src/sim/aging.ts.

    ai?: AIState

    @subsystem(ai) AI decision state (target selection, last-seen position, threat map). Consumed by src/sim/ai/system.ts; absent for player-controlled or scripted entities.

    anatomyHelpers?: AnatomyHelperRegistry

    @subsystem(anatomy) Anatomy helper registry — cached on first access by ensureAnatomyRuntime. Do not set manually.

    armourState?: Map<string, { resistRemaining_J: number }>

    @subsystem(armour) Mutable resist state for ablative armour items. Key = item id; value = remaining resist in joules. Initialised automatically by stepWorld for entities with ablative items.

    Physical and cognitive capabilities (mass, force, reaction time, etc.).

    bodyPlan?: BodyPlan

    @subsystem(anatomy) Body plan defining injury segments, mass distribution, and data-driven impairment tables. Consumed by src/sim/injury.ts, src/model3d.ts, and the anatomy compiler.

    capabilitySources?: CapabilitySource[]

    @subsystem(capability) Attached capability sources (mana pools, fusion cells, divine reserves). Consumed by src/sim/capability.ts.

    compiledAnatomy?: CompiledAnatomyModel

    @subsystem(anatomy) Compiled anatomy model — cached on first access by ensureAnatomyRuntime. Do not set manually.

    condition: ConditionState

    Physiological condition: fear, morale, sensory modifiers, fatigue, thermal.

    cumulativeExposure?: CumulativeExposureRecord[]

    @subsystem(toxicology) Cumulative lifetime dose records for heavy metals and radiation. Consumed by src/sim/systemic-toxicology.ts.

    energy: EnergyState

    Energy reserve and fatigue accumulator — drained by movement and combat.

    extendedSenses?: ExtendedSenses

    @subsystem(sensory) Extended sensory modalities (echolocation, electroreception, olfaction). Consumed by src/sim/sensory-extended.ts.

    faction?: string

    @subsystem(faction) Faction membership identifier. Consumed by src/faction.ts and AI targeting.

    foodInventory?: Map<string, number>

    @subsystem(nutrition) Consumable food items and counts. Consumed by the nutrition accumulator in src/sim/kernel.ts when present.

    grapple: GrappleState

    Active grapple relationships, grip strength, positional lock.

    id: number

    Unique entity identifier — must be stable across ticks.

    immunity?: ImmunityRecord[]

    @subsystem(disease) Post-recovery immunity records preventing re-infection. Consumed by src/sim/disease.ts.

    injury: InjuryState

    Per-region damage, shock, consciousness, fluid loss, death flag.

    intent: IntentState

    Movement and defence intent derived from the previous tick's commands.

    limbStates?: LimbState[]

    @subsystem(anatomy) Per-limb state for multi-limb entities (octopoids, arachnids). Consumed by src/sim/limb.ts.

    loadout: Loadout

    Equipped items: weapons, armour, held objects.

    molting?: {
        active: boolean;
        softeningSegments: string[];
        ticksRemaining: number;
    }

    @subsystem(anatomy) Molting state for arthropod-type entities. Active molt: segments in softeningSegments take reduced kinetic structural damage. When ticksRemaining reaches 0, regeneratesViaMolting segments receive partial repair. Consumed by src/sim/injury.ts.

    Type Declaration

    • active: boolean
    • softeningSegments: string[]

      Segment IDs currently softening — take reduced kinetic structural damage (×q(0.70)).

    • ticksRemaining: number
    mount?: MountState

    @subsystem(mount) Rider/mount pair state for cavalry and mounted combat. Consumed by src/sim/mount.ts.

    party?: string

    @subsystem(party) Adventuring party membership identifier. Consumed by src/party.ts for morale and formation bonuses.

    pendingActivation?: PendingActivation

    @subsystem(capability) In-flight capability activation — cleared on completion or concentration break. Consumed by src/sim/capability.ts.

    personality?: PersonalityTraits

    @subsystem(ai) Individual AI personality traits (aggression, caution, loyalty). Consumed by src/sim/ai/personality.ts.

    physiology?: SpeciesPhysiology

    @subsystem(thermoregulation) Species-level physiological overrides. Consumed by src/sim/thermoregulation.ts for heat/cold stress modelling.

    position_m: Vec3

    World-space position in fixed-point metres (SCALE.m = 1 m).

    reputations?: Map<string, number>

    @subsystem(faction) Entity-level faction-standing overrides. Map<factionId, Q> — takes priority over faction-default standings when set. Consumed by src/faction.ts.

    skills?: SkillMap

    @subsystem(skills) Per-skill proficiency map. Consumed by skill-contest resolution in src/sim/combat.ts and src/sim/ai/.

    sleep?: SleepState

    @subsystem(sleep) Sleep-phase state, debt accumulator, and continuous wake time. Consumed by src/sim/sleep.ts.

    substances?: ActiveSubstance[]

    @subsystem(pharmacology) Active pharmacological substances currently in the bloodstream. Consumed by src/sim/substance.ts.

    teamId: number

    Combat team / allegiance used by attack resolution and AI targeting.

    traits: TraitId[]

    Permanent trait flags that modify combat and skill outcomes.

    traumaState?: TraumaState

    @subsystem(wound-aging) PTSD-like trauma state accumulated from severe shock events. Reduces effective fear threshold via deriveFearThresholdMul. Consumed by src/sim/wound-aging.ts.

    vaccinations?: VaccinationRecord[]

    @subsystem(disease/seir) Phase 73: vaccination records granting partial-efficacy protection. Consumed by computeTransmissionRisk in src/sim/disease.ts.

    velocity_mps: Vec3

    Velocity in fixed-point metres per second (SCALE.mps = 1 m/s).

    willpower?: WillpowerState

    @subsystem(willpower) Cognitive stamina reserve — depleted by sustained concentration, replenished by rest. Consumed by src/competence/willpower.ts.

    withdrawal?: WithdrawalState[]

    @subsystem(toxicology) Active withdrawal states from addictive toxin removal. Consumed by src/sim/systemic-toxicology.ts.