Skip to content

Stamina ​

Description ​

Stamina changes how much stamina characters have, how carried weight affects the cap and how movement, melee and holding breath consume or recover stamina.

Configuration ​

Default configuration ​

Stamina.json
json
{
    "m_Enable": 0,
    "m_StaminaMax": 100.0,
    "m_StaminaMinCap": 5.0,
    "m_Cargo": {
        "m_Infinity": 0,
        "m_WeightLimitThreshold": 6000.0,
        "m_KgToGrams": 1000.0,
        "m_KgToPercentPenalty": 1.75
    },
    "m_Gain": {
        "m_Jog": 2.0,
        "m_Walk": 4.0,
        "m_Idle": 5.0,
        "m_Swim": 1.0,
        "m_Ladder": 1.0,
        "m_Sprint": 0.0,
        "m_Roll": 0.0
    },
    "m_Drain": {
        "m_StandingSprint": 4.0,
        "m_CrouchedSprint": 1.0,
        "m_SwimFast": 5.0,
        "m_LadderFast": 8.0
    },
    "m_Consumers": {
        "m_HoldBreathThresholdActivate": 10.0,
        "m_HoldBreathThresholdDrain": 0.0,
        "m_JumpThreshold": 25.0,
        "m_VaultThreshold": 20.0,
        "m_ClimbThreshold": 42.0,
        "m_MeleeHeavyThreshold": 25.0,
        "m_MeleeEvadeThreshold": 8.0,
        "m_RollThreshold": 5.0
    },
    "m_Modifiers": {
        "m_DrainHoldBreathStart": 0.2,
        "m_DrainHoldBreathExponent": 4.0,
        "m_DrainHoldBreathDuration": 5.0,
        "m_DrainDrown": 10.0,
        "m_DrainJump": 25.0,
        "m_DrainVault": 20.0,
        "m_DrainClimb": 42.0,
        "m_DrainMeleeLight": 5.0,
        "m_DrainMeleeHeavy": 25.0,
        "m_DrainMeleeEvade": 8.0,
        "m_DrainRoll": 5.0
    },
    "m_Sway": {
        "m_TimeIn": 1.5,
        "m_TimeStable": 3.0,
        "m_TimeExhausted": 1.5,
        "m_TimeOut": 0.5
    }
}

Options ​

OptionTypeDescription
m_EnableboolWith 1, enables the module. With 0, disables it.
m_StaminaMaxfloatMaximum stamina capacity, in stamina units.
m_StaminaMinCapfloatMinimum stamina cap after the weight penalty, in stamina units.
m_CargoobjectWeight penalty settings.
m_GainobjectRecovery rates.
m_DrainobjectContinuous movement drain.
m_ConsumersobjectMinimum stamina thresholds for actions.
m_ModifiersobjectAction-specific stamina costs.
m_SwayobjectTiming for sway while holding the breath.

m_Cargo ​

OptionTypeDescription
m_InfinityboolWith 1, removes the carry-weight stamina penalty. With 0, applies the configured penalty.
m_WeightLimitThresholdfloatCarried weight in grams above which the penalty increases.
m_KgToGramsfloatDivisor used to convert excess load in grams to kilograms.
m_KgToPercentPenaltyfloatStamina capacity lost per kilogram above the threshold.

m_Gain ​

OptionTypeDescription
m_JogfloatStamina recovery in units per second while jogging.
m_WalkfloatStamina recovery in units per second while walking.
m_IdlefloatStamina recovery in units per second while idle.
m_SwimfloatStamina recovery in units per second while swimming slowly.
m_LadderfloatStamina recovery in units per second on a ladder at normal speed.
m_SprintfloatStamina recovery in units per second when the sprint state permits recovery.
m_RollfloatStamina recovery in units per second while rolling.

m_Drain ​

OptionTypeDescription
m_StandingSprintfloatStamina used per second while sprinting upright.
m_CrouchedSprintfloatStamina used per second while sprinting crouched.
m_SwimFastfloatStamina used per second while swimming fast.
m_LadderFastfloatStamina used per second while climbing a ladder fast.

m_Consumers ​

OptionTypeDescription
m_HoldBreathThresholdActivatefloatStamina needed to start holding the breath.
m_HoldBreathThresholdDrainfloatStamina threshold while holding the breath.
m_JumpThresholdfloatStamina needed to jump.
m_VaultThresholdfloatStamina needed to vault.
m_ClimbThresholdfloatStamina needed to climb.
m_MeleeHeavyThresholdfloatStamina needed for a heavy melee attack.
m_MeleeEvadeThresholdfloatStamina needed for a melee evade.
m_RollThresholdfloatStamina needed to roll.

m_Modifiers ​

OptionTypeDescription
m_DrainHoldBreathStartfloatInitial stamina drain rate while holding the breath.
m_DrainHoldBreathExponentfloatExponent used to increase stamina drain while holding the breath.
m_DrainHoldBreathDurationfloatTime in seconds used for the breath-holding drain ramp.
m_DrainDrownfloatStamina cost for drowning.
m_DrainJumpfloatStamina cost of jumping.
m_DrainVaultfloatStamina cost of vaulting.
m_DrainClimbfloatStamina cost of climbing.
m_DrainMeleeLightfloatStamina cost of a light melee attack.
m_DrainMeleeHeavyfloatStamina cost of a heavy melee attack.
m_DrainMeleeEvadefloatStamina cost of a melee evade.
m_DrainRollfloatStamina cost of rolling.

m_Sway ​

OptionTypeDescription
m_TimeInfloatSeconds for sway to settle when holding the breath.
m_TimeStablefloatSeconds of steady aim before fatigue.
m_TimeExhaustedfloatFade duration in seconds for the exhausted sway phase.
m_TimeOutfloatSeconds for sway to return after releasing the breath.

Released under the MIT License.