Effects

Drug effect configuration (sh_effects.lua)

Drug effects

-- Drug effects configuration
Config.Effects = {
    -- Effect category definitions
    TYPES = {
        MOVEMENT = 'movement',  -- Player movement effects (speed, stagger, etc)
        STATUS = 'status',     -- Status effects (health, armor, etc)
        VISUAL = 'visual',     -- Visual effects (timecycle modifiers, etc)
        BEHAVIOR = 'behavior', -- Behavior effects (animations, scenarios, etc)
        CUSTOM = 'custom'      -- Custom function effects
    },

    -- Available effects for each category
    EFFECTS = {
        MOVEMENT = {
            SPEED_BOOST = 'speed_boost',      -- Increases player movement speed
            STAGGER = 'stagger',              -- Makes player movement unstable
            SUPER_JUMP = 'super_jump',        -- Enhances jump height
            RAGDOLL_CHANCE = 'ragdoll_chance',-- Chance to fall over
            SWIM_SPEED = 'swim_speed'         -- Modifies swimming speed
        },
        STATUS = {
            HEALTH_BOOST = 'health_boost',    -- Temporary health increase
            HEALTH_REGEN = 'health_regen',    -- Health regeneration over time
            STAMINA_BOOST = 'stamina_boost',  -- Increased stamina
            ARMOR_BOOST = 'armor_boost',      -- Temporary armor increase
            HUNGER_RATE = 'hunger_rate',      -- Modifies hunger depletion
            THIRST_RATE = 'thirst_rate'       -- Modifies thirst depletion
        },
        VISUAL = {
            TIMECYCLE = 'timecycle',          -- Screen filter effects
            BLUR = 'blur',                    -- Screen blur effect
            COLOR_CORRECTION = 'color_correction', -- Color modification
            SHAKE = 'shake'                   -- Screen shake effect
        },
        BEHAVIOR = {
            COMBAT_BEHAVIOR = 'combat_behavior',     -- Modifies combat abilities
            MOVEMENT_CLIPSET = 'movement_clipset',   -- Changes walking/running animation
            DRUNK_MASTER = 'drunk_master'            -- Drunk movement effect
        }
    },

    -- Drug item configurations
    Items = {
        -- White Widow Joint configuration
        ["white_widow_joint"] = {
            -- Animation when using the drug
            useAnimation = {
                type = 'animation',
                dict = 'timetable@gardener@smoking_joint',
                anim = 'smoke_joint_gardener',
                flag = 49,
                duration = 8000,
                prop = {
                    model = 'p_cs_joint_02',
                    bone = 47419,
                    pos = { x = 0.015, y = -0.009, z = 0.003 },
                    rot = { x = 55.0, y = 0.0, z = 110.0 }
                }
            },
            duration = 120, -- Effect duration in seconds
            -- Applied effects
            effects = {
                {
                    type = 'movement',
                    name = 'stagger',
                    intensity = 0.3
                },
                {
                    type = 'movement',
                    name = 'ragdoll_chance',
                    chance = 0.1,
                    interval = 15
                },
                {
                    type = 'visual',
                    name = 'timecycle',
                    modifier = 'drug_flying_02',
                    strength = 0.8
                },
                {
                    type = 'behavior',
                    name = 'movement_clipset',
                    clipset = 'move_m@drunk@slightlydrunk',
                    transition = 1.0
                },
                {
                    type = 'custom',
                    name = 'munchies',
                    interval = 20,
                    func = function()
                        print("Munchies")
                    end
                }
            }
        },

        -- Cocaine configuration
        ["cocaine"] = {
            useAnimation = {
                type = 'animation',
                dict = 'switch@trevor@trev_smoking_meth',
                anim = 'trev_smoking_meth_loop',
                flag = 49,
                duration = 5000,
                prop = {
                    model = 'prop_meth_bag_01',
                    bone = 0xDEAD,
                    pos = { x = 0.12, y = 0.0, z = 0.0 },
                    rot = { x = -45.0, y = 35.0, z = -40.0 }
                }
            },
            duration = 60, -- Effect duration in seconds
            effects = {
                {
                    type = 'movement',
                    name = 'speed_boost',
                    multiplier = 1.3
                },
                {
                    type = 'movement',
                    name = 'super_jump',
                    enabled = true
                },
                {
                    type = 'status',
                    name = 'stamina_boost',
                    value = 100
                },
                {
                    type = 'visual',
                    name = 'timecycle',
                    modifier = 'drug_flying_01',
                    strength = 1.0
                },
                {
                    type = 'behavior',
                    name = 'combat_behavior',
                    accuracy = 2.0,
                    damage_mult = 1.2
                }
            }
        },

        -- Meth configuration
        ["meth_bag"] = {
            useAnimation = {
                type = 'scenario',
                scenario = 'WORLD_HUMAN_SMOKING_POT',
                duration = 6000
            },
            duration = 20, -- Effect duration in seconds
            effects = {
                {
                    type = 'movement',
                    name = 'speed_boost',
                    multiplier = 1.45
                },
                {
                    type = 'status',
                    name = 'health_boost',
                    value = 25
                },
                {
                    type = 'visual',
                    name = 'timecycle',
                    modifier = 'drug_flying_base',
                    strength = 0.2
                },
                {
                    type = 'visual',
                    name = 'shake',
                    intensity = 0.5,
                    interval = 10
                },
                {
                    type = 'behavior',
                    name = 'drunk_master',
                    intensity = 0.5
                }
            }
        },

        -- Oxy configuration
        ["oxy"] = {
            useAnimation = {
                type = 'animation',
                dict = 'mp_suicide',
                anim = 'pill',
                flag = 49,
                duration = 2800
            },
            duration = 45, -- Effect duration in seconds
            effects = {
                {
                    type = 'status',
                    name = 'health_regen',
                    value = 5,
                    interval = 5
                },
                {
                    type = 'movement',
                    name = 'stagger',
                    intensity = 0.2
                },
                {
                    type = 'visual',
                    name = 'blur',
                    intensity = 0.3,
                    fadeIn = 2.0,
                    fadeOut = 3.0
                }
            }
        }
    }
}

Last updated