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:
| Value | Description |
|---|---|
"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}},
},
}| Property | Type | Description |
|---|---|---|
min | number | Minimum stress level for this tier |
max | number | Maximum stress level for this tier |
duration | number | How long the blur effect lasts (ms) |
timeout.min | number | Minimum time between blur effects (ms) |
timeout.max | number | Maximum 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}},
},
}| Property | Type | Description |
|---|---|---|
min | number | Minimum stress level for this tier |
max | number | Maximum stress level for this tier |
intensity | number | Shake amplitude (0.01-0.1 recommended) |
timeout.min | number | Minimum time between shakes (ms) |
timeout.max | number | Maximum 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},
}
}| Property | Type | Description |
|---|---|---|
min | number | Minimum stress level for this tier |
max | number | Maximum stress level for this tier |
modifier | string | Timecycle modifier name |
strength | number | Effect opacity (0.0-1.0) |
Stress Gain Settings
Config.GainStressFromShooting
Config.GainStressFromShooting = true
Config.ShootingMulitiplier = 0.69GainStressFromShooting: 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.01GainStressFromDriving: 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 = 20Fallout: 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
| Property | Type | Description |
|---|---|---|
value | number | Total stress reduction (spread over duration) |
progressbarduration | number | Progress bar time in seconds |
effectDuration | number | Total duration of stress relief effect in seconds |
joint
| Property | Type | Description |
|---|---|---|
value | number | Total stress reduction |
progressbarduration | number | Progress bar time in seconds |
effectDuration | number | Duration of visual effect in seconds |
Admin & Debug
Config.EnableAdminCommands
Config.EnableAdminCommands = trueDescription: Enables the /setstress admin command.
Type: boolean
Default: true
Command usage: /setstress [playerId] [stressLevel]
Config.EnableDebug
Config.EnableDebug = trueDescription: Enables debug console output.
Type: boolean
Default: true
Config.Wait
Config.Wait = 10Description: 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 falloutsCasual 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)