Orbit StudiosOrbit Studios
Orbit Studios Resourcesorbit-dynamichud-stress

Configuration

Configure orbit-dynamichud-stress speed, weapon, job, blur, and effect settings.

Configuration

All public stress behavior lives in resources/[orbit]/orbit-dynamichud-stress/config.lua.

Stress is stored from 0 to 100. The client can add stress from speeding and weapon usage, while server events can add or remove stress from other integrations.

Prop

Type

resources/[orbit]/orbit-dynamichud-stress/config.lua
Config.Stress.stressSpeedFormat = 'kmh'
Config.Stress.minForSpeeding = 1000
Config.Stress.minForSpeedingUnbuckled = 50

stressSpeedFormat decides whether the thresholds are read as KMH or MPH. minForSpeeding is used while the player is buckled, and minForSpeedingUnbuckled is used while unbuckled. The default buckled value is very high, which effectively makes normal buckled speeding much less likely to add stress.

resources/[orbit]/orbit-dynamichud-stress/config.lua
Config.Stress.chance = 0.1
Config.Stress.whitelistedWeapons = {
    `weapon_petrolcan`,
    `weapon_hazardcan`,
    `weapon_fireextinguisher`,
}

chance is a decimal chance from 0 to 1. For example, 0.1 means a 10 percent chance per eligible shot. Weapons in whitelistedWeapons never add weapon stress.

resources/[orbit]/orbit-dynamichud-stress/config.lua
Config.Stress.minForShaking = 50
Config.Stress.blurIntensity = {
    [1] = { min = 50, max = 60, intensity = 1500 },
    [2] = { min = 60, max = 70, intensity = 2000 },
    [3] = { min = 70, max = 80, intensity = 2500 },
    [4] = { min = 80, max = 90, intensity = 2700 },
    [5] = { min = 90, max = 100, intensity = 3000 },
}

minForShaking is the first stress value where effects can run. Each blurIntensity range controls how strong blur can be for that stress band. Each matching effectInterval range controls how often the effect can repeat.

resources/[orbit]/orbit-dynamichud-stress/config.lua
Config.Stress.whitelistedJobs = {
    'police'
}

Whitelisted jobs skip server-side stress gain from hud:server:GainStress. They can still have their state changed directly by custom code that writes to Player(source).state.stress.

Framework Notes

Whitelisted jobs should match the ESX job names returned by orbit-lib.

Whitelisted jobs should match PlayerData.job.name.

The stress logic is adapted from the QBX HUD stress system and keeps the same state-bag style integration.

Whitelisted jobs are based on the job data returned by Config.Standalone.fetchJob in orbit-lib, or the Config.Standalone.defaultJob fallback.

On this page