Configuration

Configuration

Learn how to configure Legends Stress System for your server's specific needs.

Basic Configuration

The main configuration is located in /config/config.lua. Here is a quick breakdown of each setting:

Configurating your framework, inventory and notify

Supported frameworks are qb, esx and qbx

Supported Inventory Systems are qb, esx and ox

Supported Notification Systems are qb, esx, qbx and ox_lib

You can use "auto" in each of them for automatic detection

Config.Framework = "auto"
Config.Inventory = "auto"
Config.Notify = "auto"

Configuring different effects

Each different effect supports covering different stress levels with different effect intensities and or duration. Each cell has its own min and max ranges which are used for defining the range that the effect covers.

The first setting is for the blur effect. duration is how long should the blur be applied for and timeout is the period between appling the blur effect again.

The second setting is for screen shake. intensity is for how strong should the shaking be and timeout is the time between screen shakes.

The third setting is for appling a red screen effect. The modifier is the type of the red screen shade, we recommend keeping it as it is and the strength is used for the intensity of the red shade increasing it makes the red more dense.

The fallout causes the player to fall on the ground when their stress has hit 100%. The Config.FalloutTimeout is the time between each fallout on the ground.

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}},
    },
    ['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}},
    },
    ["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},
    }
}
Config.Fallout = true -- Enable Fallout effect when stress is 100%
Config.FalloutTimeout = 20 -- Cooldown between fallouts

Configuring stress gain

You can enable / disable gaining stress from interactions like shooting with different weapons or driving above certain speeds and adjusting how much stress does the player gain.

Config.GainStressFromShooting = true -- Enable stress gain from shooting
Config.ShootingMulitiplier = 0.69 -- Multiplier for stress gain from shootingPed
 
Config.GainStressFromDriving = true -- Enable stress gain from shooting
Config.VehicleMulitiplier = 0.01 -- Multiplier for stress gain from shootingPed

Configuring stress decrease

Each item should be named the same way that it is defined in your inventory system / core /database.

value determines how much stress should be decreased, progressbarduration sets the duration of the progressbar and effectDuration is the time that the stress will be gradually decreasing untill it reaches the value set in value

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

Other settings

Config.EnableAdminCommands = true

Enables admin command /setstress followed by the target player's id and target stress level.

Example usage: /setstress 1 70

Config.EnableDebug = true

Enables helpfull debug prints if encountering any errors.

Need Help?

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