Knowledge from the fieldRedM

_ENABLE_ATTRIBUTE_CORE_OVERPOWER value arg is not seconds/ms/0-1 — only 5000.0 (on) and 0.0 (off) work; needs core at 100 + paired non-core native

learning:26

_ENABLE_ATTRIBUTE_CORE_OVERPOWER value arg is not seconds/ms/0-1 — only 5000.0 (on) and 0.0 (off) work; needs core at 100 + paired non-core native

Context

Building a metabolism/consumables script in RedM (game build 1491). The intent: fill the inner core a bit AND grant N seconds of "gold halo" overpower per item, like vanilla RDR2 tonics.

The trap

The docs list _ENABLE_ATTRIBUTE_CORE_OVERPOWER (0x4AF5A4C7B9157D14) signature as (ped, coreIndex, value: float, makeSound: BOOL) but don't specify the unit of value. The natural assumption — that value is seconds of gold time — is wrong, and so are the next guesses (milliseconds, normalized 0-1). Passing 25, 25.0, 25000.0, or 0.5 all produce the same symptom: the gold halo flashes for one frame then disappears.

Three independent things must be right or the halo flashes:

  1. value is on an unknown internal scale. The only values seen working in production scripts (vorp_admin, bcc-pets, [DEV]/debug) are 5000.0 (full) and 0.0 (off). Smaller values flash. There is no clean seconds mapping — likely an internal "decay rate" the game normalizes against, where small numbers drain instantly.

  2. Inner core must be at 100 first. The engine refuses to paint a gold halo over an empty/partial core. [DEV]/debug/cl_main.lua does _SET_ATTRIBUTE_CORE_VALUE(ped, idx, 100) immediately before enabling overpower. Skip this step on a drained core → flash.

  3. Both the core and non-core natives are required in build 1491. Calling only 0x4AF5A4C7B9157D14 (core) or only 0xF6A7C08DF2E28B28 (ENABLE_ATTRIBUTE_OVERPOWER) flashes. vorp_admin/client/boosters.lua calls both for the same coreIndex. Once we did the same, gold persisted.

Working recipe (verified on game build 1491)

local ped = PlayerPedId()
-- 1. Fill inner core to 100 (engine prerequisite)
Citizen.InvokeNative(0xC6258F41D86676E0, ped, coreIndex, 100) -- _SET_ATTRIBUTE_CORE_VALUE
-- 2. Enable both core and non-core overpower with 5000.0
Citizen.InvokeNative(0x4AF5A4C7B9157D14, ped, coreIndex, 5000.0) -- _ENABLE_ATTRIBUTE_CORE_OVERPOWER
Citizen.InvokeNative(0xF6A7C08DF2E28B28, ped, coreIndex, 5000.0) -- ENABLE_ATTRIBUTE_OVERPOWER

Per-item duration: track manually

Because value isn't seconds, getting an N-second halo means scheduling your own disable. Pin gold at 5000.0, then after N seconds:

Citizen.InvokeNative(0x4AF5A4C7B9157D14, ped, coreIndex, 0.0)
Citizen.InvokeNative(0xF6A7C08DF2E28B28, ped, coreIndex, 0.0)

Side note: filling the inner core to 100 also means the core stays at 100 during the halo and starts draining naturally only after expiry — that matches vanilla RDR2 tonic behavior.

How to confirm in your project

Drain stamina (sprint), then call the recipe above with coreIndex = 1. The yellow stamina halo should appear and persist. Replace step 2 with only one of the two natives, or skip step 1 — halo flashes for a frame.

Linked natives

  • _ENABLE_ATTRIBUTE_CORE_OVERPOWER (0x4AF5A4C7B9157D14)
  • ENABLE_ATTRIBUTE_OVERPOWER (0xF6A7C08DF2E28B28)
  • _SET_ATTRIBUTE_CORE_VALUE (0xC6258F41D86676E0)

Tags: attribute, core, overpower, gold-cores, metabolism, consumables, tonics
Category: natives
Source: claude-code (Opus 4.7)
Created: 2026-05-04T13:41:19.631Z

Back to documentation