REDNODE / GAME API

StatPoolsSystem

classnative name gameStatPoolsSystemnativeimportOnly

extends IStatPoolsSystem › IGameSystem › IScriptable › ISerializable

StatPoolsSystem in scripts: values that go up and down, such as health, stamina and memory. Get it with GameInstance.GetStatPoolsSystem(gameInstance).

Methods 33

native const func GetActiveModifierRecordID(objID: StatsObjectID, statPoolType: gamedataStatPoolType, type: gameStatPoolModificationTypes, out isModifierDefault: Bool) -> TweakDBID
native func GetBonus(objID: StatsObjectID, statPoolType: gamedataStatPoolType, opt perc: Bool) -> Float
native func GetModifier(objID: StatsObjectID, statPoolType: gamedataStatPoolType, type: gameStatPoolModificationTypes, out modifier: StatPoolModifier) -> Bool
native func GetStatPoolMaxPointValue(objID: StatsObjectID, statPoolType: gamedataStatPoolType) -> Float
static native func GetStatPoolType(damageType: gamedataDamageType) -> gamedataStatPoolType
native func GetStatPoolValue(objID: StatsObjectID, statPoolType: gamedataStatPoolType, opt perc: Bool) -> Float

With perc false, the pool's value in points; with true, a percentage. Tested in game on 2.31 (2026-10-12) for V's Health, against the health bar: O6b test.

const pools = await api.GameInstance.GetStatPoolsSystem(game.instance);
const hp = await pools.GetStatPoolValue(statsId, 'Health', false);
native func GetStatPoolValueCustomLimit(objID: StatsObjectID, statPoolType: gamedataStatPoolType, opt perc: Bool) -> Float
native func HasActiveStatPool(objID: StatsObjectID, statPoolType: gamedataStatPoolType) -> Bool
native func HasStatPoolValueReachedCustomLimit(objID: StatsObjectID, statPoolType: gamedataStatPoolType) -> Bool
native func HasStatPoolValueReachedMax(objID: StatsObjectID, statPoolType: gamedataStatPoolType) -> Bool
native func HasStatPoolValueReachedMin(objID: StatsObjectID, statPoolType: gamedataStatPoolType) -> Bool
native const func IsExtraModifierApplied(objID: StatsObjectID, statPoolType: gamedataStatPoolType, modifierRecordID: TweakDBID)
native func IsStatPoolAdded(objID: StatsObjectID, statPoolType: gamedataStatPoolType) -> Bool
native func IsStatPoolModificationDelayed(objID: StatsObjectID, statPoolType: gamedataStatPoolType) -> Bool
native func RequestAddingExtraModifier(objID: StatsObjectID, statPoolType: gamedataStatPoolType, type: gameStatPoolModificationTypes, modifierRecordID: TweakDBID)
native func RequestAddingStatPool(objID: StatsObjectID, statPoolRecordID: TweakDBID, opt forceCreateStatPools: Bool)
native func RequestChangingStatPoolValue(objID: StatsObjectID, statPoolType: gamedataStatPoolType, diff: Float, instigator: wref<GameObject>, forceChunkTransfering: Bool, opt perc: Bool, opt ignoreCustomLimit: Bool)
native func RequestMarkingStatPoolActive(objID: StatsObjectID, statPoolType: gamedataStatPoolType)
native func RequestRegisteringListener(objID: StatsObjectID, statPoolType: gamedataStatPoolType, listener: ref<IStatPoolsListener>)
native func RequestRemovingExtraModifier(objID: StatsObjectID, statPoolType: gamedataStatPoolType, modifierRecordID: TweakDBID)
native func RequestRemovingStatPool(objID: StatsObjectID, statPoolType: gamedataStatPoolType)
native func RequestResetingModifier(objID: StatsObjectID, statPoolType: gamedataStatPoolType, type: gameStatPoolModificationTypes)
native func RequestSettingModifier(objID: StatsObjectID, statPoolType: gamedataStatPoolType, type: gameStatPoolModificationTypes, modifier: StatPoolModifier)
native func RequestSettingModifierWithRecord(objID: StatsObjectID, statPoolType: gamedataStatPoolType, type: gameStatPoolModificationTypes, modifierRecordID: TweakDBID)
native func RequestSettingStatPoolBonus(objID: StatsObjectID, statPoolType: gamedataStatPoolType, bonus: Float, instigator: wref<GameObject>, persistentBonus: Bool, opt perc: Bool)
native func RequestSettingStatPoolMaxValue(objID: StatsObjectID, statPoolType: gamedataStatPoolType, instigator: wref<GameObject>)
native func RequestSettingStatPoolMinValue(objID: StatsObjectID, statPoolType: gamedataStatPoolType, instigator: wref<GameObject>)
native func RequestSettingStatPoolValue(objID: StatsObjectID, statPoolType: gamedataStatPoolType, newValue: Float, instigator: wref<GameObject>, opt perc: Bool, opt ignoreCustomLimit: Bool)

Sets a pool's value. REDnode's game.player.setHealth uses it with perc false and no instigator. Unverified: not tested in game yet.

native func RequestSettingStatPoolValueCustomLimit(objID: StatsObjectID, statPoolType: gamedataStatPoolType, newValue: Float, instigator: wref<GameObject>, opt perc: Bool)
native func RequestSettingStatPoolValueIgnoreChangeMode(objID: StatsObjectID, statPoolType: gamedataStatPoolType, newValue: Float, instigator: wref<GameObject>, opt perc: Bool)
native func RequestUnregisteringListener(objID: StatsObjectID, statPoolType: gamedataStatPoolType, listener: ref<IStatPoolsListener>)
native func ToPercentage(objID: StatsObjectID, statPoolType: gamedataStatPoolType, value: Float) -> Float
native func ToPoints(objID: StatsObjectID, statPoolType: gamedataStatPoolType, percValue: Float) -> Float