Configuration

Configuration

All configuration for legends_stress is done in the config/config.lua file.

Configuration File Structure

Location: config/config.lua

Config = {}
 
Config.Framework = "auto"
Config.Inventory = "auto"
Config.Notify = "auto"
Config.ProgressBar = "auto"
 
Config.Intensity = { ... }
Config.DecreaseStress = { ... }

Framework & Integration Settings

Config.Framework

Config.Framework = "auto"

Description: Determines which framework to use.

Type: string

Default: "auto"

Options:

ValueDescription
"auto"Automatically detects available framework
"qb"Force use QB-Core
"qbx"Force use QBX-Core
"esx"Force use ESX

Config.Inventory

Config.Inventory = "auto"

Description: Determines which inventory system to use for item management.

Type: string

Default: "auto"

Options: "auto", "ox", "qb", "esx"

Config.Notify

Config.Notify = "auto"

Description: Determines which notification system to use.

Type: string

Default: "auto"

Options: "auto", "qb", "qbx", "esx", "ox_lib"

Config.ProgressBar

Config.ProgressBar = "auto"

Description: Determines which progress bar system to use.

Type: string

Default: "auto"

Options: "auto", "qb", "qbx", "esx", "ox_lib"


Stress Effects Intensity

Config.Intensity

Controls how stress effects intensify based on stress level.

Blur Effect

Config.Intensity = {
    ['blur'] = {
        { min = 30, max = 49, duration = 15000, timeout = {min = 15000, max = 20000}},
        { min = 50, max = 59, duration = 1500, timeout = {min = 6000, max = 12000}},
        { min = 60, max = 69, duration = 1500, timeout = {min = 3500, max = 6000}},
        { min = 70, max = 79, duration = 1500, timeout = {min = 2500, max = 3500}},
        { min = 80, max = 89, duration = 1500, timeout = {min = 1500, max = 2500}},
        { min = 90, max = 100, duration = 1500, timeout = {min = 150, max = 200}},
    },
}
PropertyTypeDescription
minnumberMinimum stress level for this tier
maxnumberMaximum stress level for this tier
durationnumberHow long the blur effect lasts (ms)
timeout.minnumberMinimum time between blur effects (ms)
timeout.maxnumberMaximum time between blur effects (ms)

Screen Shake Effect

Config.Intensity = {
    ['shake'] = {
        { min = 60, max = 69, intensity = 0.03, timeout = {min = 3200, max = 3800}},
        { min = 70, max = 79, intensity = 0.04, timeout = {min = 2600, max = 3200}},
        { min = 80, max = 89, intensity = 0.05, timeout = {min = 1500, max = 2200}},
        { min = 90, max = 100, intensity = 0.06, timeout = {min = 850, max = 1200}},
    },
}
PropertyTypeDescription
minnumberMinimum stress level for this tier
maxnumberMaximum stress level for this tier
intensitynumberShake amplitude (0.01-0.1 recommended)
timeout.minnumberMinimum time between shakes (ms)
timeout.maxnumberMaximum time between shakes (ms)

Red Screen Effect

Config.Intensity = {
    ["redscreen"] = {
        { min = 80, max = 84, modifier = "REDMIST_blend", strength = 0.3},
        { min = 85, max = 89, modifier = "REDMIST_blend", strength = 0.4},
        { min = 90, max = 92, modifier = "REDMIST_blend", strength = 0.5},
        { min = 93, max = 95, modifier = "REDMIST_blend", strength = 0.6},
        { min = 96, max = 100, modifier = "REDMIST_blend", strength = 0.8},
    }
}
PropertyTypeDescription
minnumberMinimum stress level for this tier
maxnumberMaximum stress level for this tier
modifierstringTimecycle modifier name
strengthnumberEffect opacity (0.0-1.0)

Stress Gain Settings

Config.GainStressFromShooting

Config.GainStressFromShooting = true
Config.ShootingMulitiplier = 0.69

GainStressFromShooting: Enable/disable stress gain from shooting weapons.

ShootingMultiplier: Amount of stress gained per shot.

Default: 0.69 stress per shot

Config.GainStressFromDriving

Config.GainStressFromDriving = true
Config.VehicleMulitiplier = 0.01

GainStressFromDriving: Enable/disable stress gain from high-speed driving.

VehicleMultiplier: Stress gained based on vehicle speed.

Default: 0.01 (multiplied by speed)


Fallout Effect

Config.Fallout

Config.Fallout = true
Config.FalloutTimeout = 20

Fallout: When enabled, players will ragdoll when stress reaches 100%.

Type: boolean

Default: true

FalloutTimeout: Cooldown between fallout events in seconds.

Default: 20 seconds


Stress Relief Items

Config.DecreaseStress

Config.DecreaseStress = {
    stress_pill = {
        value = 20,
        progressbarduration = 5,
        effectDuration = 35
    },
    joint = {
        value = 25,
        progressbarduration = 5,
        effectDuration = 35
    }
}

stress_pill

PropertyTypeDescription
valuenumberTotal stress reduction (spread over duration)
progressbardurationnumberProgress bar time in seconds
effectDurationnumberTotal duration of stress relief effect in seconds

joint

PropertyTypeDescription
valuenumberTotal stress reduction
progressbardurationnumberProgress bar time in seconds
effectDurationnumberDuration of visual effect in seconds

Admin & Debug

Config.EnableAdminCommands

Config.EnableAdminCommands = true

Description: Enables the /setstress admin command.

Type: boolean

Default: true

Command usage: /setstress [playerId] [stressLevel]

Config.EnableDebug

Config.EnableDebug = true

Description: Enables debug console output.

Type: boolean

Default: true

Config.Wait

Config.Wait = 10

Description: Interval between stress level checks in milliseconds.

Type: number

Default: 10

Keep this at 10ms for smooth gameplay. Higher values may cause noticeable delays in effects.


Example Configurations

Hardcore Server (High Stress)

Config.GainStressFromShooting = true
Config.ShootingMulitiplier = 1.5 -- More stress from shooting
 
Config.GainStressFromDriving = true
Config.VehicleMulitiplier = 0.05 -- More stress from driving
 
Config.Fallout = true
Config.FalloutTimeout = 10 -- More frequent fallouts

Casual Server (Low Stress)

Config.GainStressFromShooting = true
Config.ShootingMulitiplier = 0.3 -- Less stress from shooting
 
Config.GainStressFromDriving = false -- Disable driving stress
 
Config.Fallout = false -- Disable ragdoll at 100%
 
Config.DecreaseStress = {
    stress_pill = { value = 40, ... }, -- Stronger stress relief
    joint = { value = 50, ... }
}

Need Help?

Join our Discord for support: discord.gg/lgnds (opens in a new tab)


Legends Store - Premium FiveM Scripts