SetPedDecomposed — RedM Natives
0x674B90BE1115846D · PED · all
Enables the engine's corpse decomposition state on a dead ped/animal. This is not a full "make corpse rotten" one-liner. It acts as the ON/OFF switch — visual rot still needs damage packs and persistence natives for time-based progression. Observed behavior: - SET_PED_DECOMPOSED(true) alone on a fresh corpse does very little visually. - For an aged/rotten look you typically also need: 1. APPLY_PED_DAMAGE_PACK with _aged_carcass_ (Lit / Med / Hvy) 2. Persistence natives below for progression over time Getter: - BOOL _IS_PED_DECOMPOSED(Ped ped) Damage pack examples: - PD_Deer_aged_carcass_Lit / _Med / _Hvy - PD_Human_aged_carcass_ - PD_Ex_Small_aged_carcass_ Related natives: - APPLY_PED_DAMAGE_PACK - _PERSIST_SET_LIFETIME(ped, minutes) (~40–50 slow decay) - _PERSIST_SET_RATE(ped, rate) (1.0 normal, 1.25 faster) - _PERSIST_SET_TIME_OFFSET(ped, offset) (skip to later stage) - _PERSIST_GET_RATE(ped) - _PERSIST_CAN_TRACK(ped) Useful SetPedConfigFlag: - 186 = CorpseIsPersistent - 48 = ShouldFixIfNoCollision - 336 = ForceInjuredMovement Patterns: Slow hunt-style decay: `` kill → damage pack Hvy → lifetime 40-50 → rate 1.25 → SET_PED_DECOMPOSED(true) ` Instant aged corpse (static): ` kill → damage pack Hvy (damage 0.0) → SET_PED_DECOMPOSED(true) ` (no persistence needed) Force max rot (testing): ` lifetime=1, rate=100.0, timeOffset=50, damage pack Hvy, SET_PED_DECOMPOSED(true) ` Notes: - Ped must be dead first. - Flies/maggots are separate PTFX on bones (e.g. SKEL_Spine3`), not this native. - Works on animals and human corpses; pack prefix must match ped type.
Parameters
| Name | Type | Description |
|---|---|---|
| ped | Ped | Target ped (should be dead). |
| toggle | BOOL | true = enable decomposition state; false = disable decomposition state. |