Interface DamageProps

Source
Expand description

damage configuration

interface DamageProps {
    armor?: Partial<{ category: string; defaultPenetration: number }>;
    behavior: {
        animalsFlee: boolean;
        explosion?:
            | false
            | {
                affectOutsidePartsOnly: boolean;
                heatEnergyPerCell: number;
                propagationSpeed: number;
            };
        externalViolence: boolean;
        forcefulImpact: boolean;
        ranged: boolean;
    };
    damage?: Partial<
        {
            default: number;
            defaultStopping: number;
            minToFragment: number;
            overkillPctToDestroyPart: string;
        },
    >;
    effects?: {
        explosion?: {
            cellFleck: string;
            colorCenter: [number, number, number];
            colorEdge: [number, number, number];
            sound: string;
        };
        impactSoundType?: string;
    };
    environmentFactors?: Partial<
        {
            buildingImpassable: number;
            buildingPassable: number;
            corpse: number;
            plant: number;
        },
    >;
    health?: {
        harmAllLayersUntilOutside?: boolean;
        hediff?: string;
        hediffSolid?: string;
    };
    label: string;
    messages?: Partial<{ combat: string; death: string; description?: string }>;
    name: string;
    workerClass?: string;
}

Properties§

Source§

armor?: Partial<{ category: string; defaultPenetration: number }>

Armor and penetration configuration

Source§

behavior: {
    animalsFlee: boolean;
    explosion?:
        | false
        | {
            affectOutsidePartsOnly: boolean;
            heatEnergyPerCell: number;
            propagationSpeed: number;
        };
    externalViolence: boolean;
    forcefulImpact: boolean;
    ranged: boolean;
}

Behavior configuration

Source§

damage?: Partial<
    {
        default: number;
        defaultStopping: number;
        minToFragment: number;
        overkillPctToDestroyPart: string;
    },
>

Damage values configuration

Source§

effects?: {
    explosion?: {
        cellFleck: string;
        colorCenter: [number, number, number];
        colorEdge: [number, number, number];
        sound: string;
    };
    impactSoundType?: string;
}

Audio and visual effects configuration

Source§

environmentFactors?: Partial<
    {
        buildingImpassable: number;
        buildingPassable: number;
        corpse: number;
        plant: number;
    },
>

Building and environment damage configuration

Source§

health?: { harmAllLayersUntilOutside?: boolean; hediff?: string; hediffSolid?: string }

Health effect configuration

Source§

label: string

Source§

messages?: Partial<{ combat: string; death: string; description?: string }>

Message configuration

Source§

name: string

Source§

workerClass?: string

Damage worker class - defines how damage is applied to targets

example
"DamageWorker_*"