> For the complete documentation index, see [llms.txt](https://5scripts-1.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://5scripts-1.gitbook.io/docs/assets/5s_gathering/config.md).

# Config

```lua
Config = {}

Config.debug = false -- If true, prints extra debug info to the server console

Config.serverMultiplier = 1 -- 1 = ore drop * 1, 2 = ore drop * 2, etc.
Config.distanceBetweenOres = 5 -- Distance between ores in the same zone
Config.renderDistance = 150.0 -- Render distance for the zone
Config.checkCanCarry = false -- If true, items will be checked before being added to the inventory and dropped if they can't be carried
Config.drawOutline = true -- If true, the outline will be drawn for the objects
Config.outlineColor = { r = 10, g = 170, b = 210, a = 200 } -- Outline color for the objects in the zone
Config.canMineGlobalOres = false -- If true, you must configure the Config.globalOres table
Config.globalMiningDistance = 10 -- Max distance in meters from the global ore to the player to be able to mine (increase for props with centers far from player)
Config.globalMiningRaycastDistance = 5 -- Raycast distance for detecting global ores (from camera)
Config.showHpBarOnlyWhenPlayerHasProperlyWeapon = false -- (Only for global ores) If true, the hp bar will only be shown when the player has a properly weapon | If false, the hp bar will be shown always

Config.ores = {
    ["barrel"] = {
        strength = 40, -- Health of the object
        label = "Barrel", -- Label of the object
        dropMode = "destroy", -- "destroy" or "hit"
        dropCount = 1, -- How many items should drop from the items table
        items = { -- Items
            { item = "scrap",        min = 1, max = 50, chance = 30 }, -- Item name, minimum amount, maximum amount, chance of dropping
            { item = "circut_board", min = 1, max = 5,  chance = 20 }, -- Item name, minimum amount, maximum amount, chance of dropping
            { item = "spring",       min = 1, max = 5,  chance = 20 }, -- Item name, minimum amount, maximum amount, chance of dropping
            { item = "rope",         min = 1, max = 10, chance = 15 }, -- Item name, minimum amount, maximum amount, chance of dropping
        },
        models = { -- Models of the object
            "prop_barrel_01a",
        },
        particle = "ent_brk_metal_frag", -- Particle effect when the object is hit
        particleScale = 1.5, -- Scale of the particle effect (defaults to 1.5)
        sound = { name = "Barge_Door_Metal", ref = "dlc_h4_Prep_FC_Sounds" }, -- Sound that plays when the object is hit
        distance = 3, -- Max distance in meters from the object to the player to be able to mine
        respawnTime = 10, -- Time in minutes before the object respawns
        propWithoutCollisions = false, -- Set True if the object doesn't have collisions with the player
    },
    ["barrel-oil"] = {
        strength = 40, -- Health of the object
        label = "Barrel", -- Label of the object
        dropMode = "destroy", -- "destroy" or "hit"
        dropCount = 1, -- How many items should drop from the items table
        items = { -- Items
            { item = "fuel", min = 1, max = 10, chance = 100 }, -- Item name, minimum amount, maximum amount, chance of dropping
        },
        models = { -- Models of the object
            "prop_barrel_exp_01a",
        },
        particle = "ent_brk_metal_frag", -- Particle effect when the object is hit
        particleScale = 1.5, -- Scale of the particle effect (defaults to 1.5)
        sound = { name = "Barge_Door_Metal", ref = "dlc_h4_Prep_FC_Sounds" }, -- Sound that plays when the object is hit
        distance = 3, -- Max distance in meters from the object to the player to be able to mine
        respawnTime = 10, -- Time in minutes before the object respawns
        propWithoutCollisions = false, -- Set True if the object doesn't have collisions with the player
    },
    ["wood"] = {
        strength = 200, -- Health of the object
        dropMode = "hit", -- "destroy" or "hit"
        dropCount = 1, -- How many items should drop from the items table
        items = { -- Items
            { item = "wood", min = 30, max = 40, chance = 100 }, -- Item name, minimum amount, maximum amount, chance of dropping
        },
        label = "Tree", -- Label of the object
        distance = 3, -- Max distance in meters from the object to the player to be able to mine
        respawnTime = 10, -- Time in minutes before the object respawns
        models = { -- Models of the object
            "prop_tree_birch_03",
            "prop_tree_birch_04",
            "prop_tree_birch_03b",
        },
        particle = "bul_wood_splinter", -- Particle effect when the object is hit
        particleScale = 1.5, -- Scale of the particle effect (defaults to 1.5)
        bonus = { -- Bonus items that can be dropped when the object is destroyed only for dropMode "hit"
            {
                item = "wood", -- Item name
                min = 100, -- Minimum amount of the item to drop
                max = 300, -- Maximum amount of the item to drop
            },
        },
        propWithoutCollisions = false, -- Set True if the object doesn't have collisions with the player
    },
    ["stone"] = {
        strength = 200, -- Health of the object
        dropMode = "hit", -- "destroy" or "hit"
        dropCount = 1, -- How many items should drop from the items table
        items = { -- Items
            { item = "stone", min = 100, max = 200, chance = 100 }, -- Item name, minimum amount, maximum amount, chance of dropping
        },
        label = "Rock", -- Label of the object
        models = { -- Models of the object
            "cs_x_rubsmla",
        },
        particle = "ent_dst_rocks", -- Particle effect when the object is hit
        particleScale = 1.5, -- Scale of the particle effect (defaults to 1.5)
        distance = 5, -- Max distance in meters from the object to the player to be able to mine
        respawnTime = 10, -- Time in minutes before the object respawns
        bonus = { -- Bonus items that can be dropped when the object is destroyed only for dropMode "hit"
            {
                item = "stone", -- Item name
                min = 100, -- Minimum amount of the item to drop
                max = 200, -- Maximum amount of the item to drop
            },
        },
        propWithoutCollisions = false, -- Set True if the object doesn't have collisions with the player
    },
    ["metal"] = {
        strength = 200, -- Health of the object
        item = "metal-ore", -- Item name
        label = "Metal Ore", -- Label of the object
        dropMode = "hit", -- "destroy" or "hit"
        dropCount = 1, -- How many items should drop from the items table
        items = { -- Items
            { item = "metal-ore", min = 2, max = 15, chance = 100 }, -- Item name, minimum amount, maximum amount, chance of dropping
        },
        models = { -- Models of the object
            "prop_rock_3_d",
        },
        particle = "ent_dst_rocks", -- Particle effect when the object is hit
        particleScale = 1.5, -- Scale of the particle effect (defaults to 1.5)
        distance = 3, -- Max distance in meters from the object to the player to be able to mine
        respawnTime = 10, -- Time in minutes before the object respawns
        bonus = { -- Bonus items that can be dropped when the object is destroyed only for dropMode "hit"
            {
                item = "hqm-ore", -- Item name
                min = 2, -- Minimum amount of the item to drop
                max = 15, -- Maximum amount of the item to drop
            },
        },
        propWithoutCollisions = false, -- Set True if the object doesn't have collisions with the player
    },
    ["sulfur"] = {
        strength = 200, -- Health of the object
        item = "sulfur-ore", -- Item name
        label = "Sulfur Ore", -- Label of the object
        dropMode = "hit", -- "destroy" or "hit"
        dropCount = 1, -- How many items should drop from the items table
        items = { -- Items
            { item = "sulfur-ore", min = 50, max = 150, chance = 100 }, -- Item name, minimum amount, maximum amount, chance of dropping
        },
        models = { -- Models of the object
            "csx_coastsmalrock_02_",
        },
        particle = "ent_dst_rocks", -- Particle effect when the object is hit
        particleScale = 1.5, -- Scale of the particle effect (defaults to 1.5)
        distance = 3, -- Max distance in meters from the object to the player to be able to mine
        respawnTime = 10, -- Time in minutes before the object respawns
        bonus = { -- Bonus items that can be dropped when the object is destroyed only for dropMode "hit"
            {
                item = "sulfur-ore", -- Item name
                min = 50, -- Minimum amount of the item to drop
                max = 150, -- Maximum amount of the item to drop
            },
        },
        propWithoutCollisions = false, -- Set True if the object doesn't have collisions with the player
    },
}

Config.weapons = {
    ["WEAPON_HATCHET"] = {
        ["wood"] = {
            damage = 10, -- Damage of the weapon
            itemMultiplier = 1, -- Multiplier for the item drop
        },
        ["barrel"] = {
            damage = 10, -- Damage of the weapon
        },
        ["barrel-oil"] = {
            damage = 10, -- Damage of the weapon
        },
    },
    ["WEAPON_PICKAXE"] = {
        ["metal"] = {
            damage = 10, -- Damage of the weapon
            itemMultiplier = 1, -- Multiplier for the item drop
        },
        ["stone"] = {
            damage = 10, -- Damage of the weapon
            itemMultiplier = 1, -- Multiplier for the item drop
        },
        ["sulfur"] = {
            damage = 10, -- Damage of the weapon
            itemMultiplier = 1, -- Multiplier for the item drop
        },
        ["barrel"] = {
            damage = 20, -- Damage of the weapon
        },
        ["barrel-oil"] = {
            damage = 20, -- Damage of the weapon
        },
    },
}

Config.weaponAnims = {
    ["WEAPON_HATCHET"] = {
        { -- Animations for the weapon
            animDict = "anim@melee@machete@streamed_core@",
            animName = "plyr_walking_attack_a",
            wait = 800,
        },
        { -- Animations for the weapon
            animDict = "melee@small_wpn@streamed_core",
            animName = "small_melee_wpn_long_range_-180",
            wait = 700,
        },
        {
            animDict = "melee@small_wpn@streamed_core",
            animName = "small_melee_wpn_long_range_-90",
            wait = 700,
        }
    },
    ["WEAPON_PICKAXE"] = {
        {
            animDict = "melee@large_wpn@streamed_core",
            animName = "car_down_attack",
            wait = 600,
        },
        {
            animDict = "melee@large_wpn@streamed_core",
            animName = "ground_attack_0",
            wait = 600,
        },
        {
            animDict = "melee@large_wpn@streamed_core",
            animName = "ground_attack_on_spot",
            wait = 800,
        }
    },
}

Config.globalOres = { -- Global ores that can be mined
    ["prop_rub_carwreck_11"] = "metal", -- Model of the ore, type of the ore
    ["prop_bush_lrg_02"] = "wood", -- Model of the ore, type of the ore
}

Config.zones = {
    {
        coords = vector3(1683.1881, 2177.7495, 82.4044), -- Coords of the zone
        radius = 80.0, -- Radius of the zone
        ores = { -- Ores that can be mined in the zone
            ["wood"] = 10, -- Amount of ores
            ["stone"] = 10, -- Amount of ores
            ["metal"] = 10, -- Amount of ores
            ["sulfur"] = 10, -- Amount of ores
            ["barrel"] = 10, -- Amount of ores
            ["barrel-oil"] = 10, -- Amount of ores
        },

        blip = { -- Blip of the zone
            enabled = true, -- If true, the blip will be shown
            sprite = 836, -- Sprite of the blip
            color = 1, -- Color of the blip
            label = "Gathering Zone", -- Label of the blip
            scale = 1.0, -- Scale of the blip
            alpha = 255, -- Alpha of the blip
        },

        zoneBlip = { -- Blip of the zone
            enabled = true, -- If true, the blip will be shown
            color = 0, -- Color of the blip
        },

        checkGroundZ = true, -- If true, props are snapped to the ground Z. Set to false if the zone is underground, or to keep the exact Z from forcedCoords

        forcedCoordsRandomRotation = false, -- If true, props on forced coords get a random heading (overrides the heading taken from vec4)

        forcedCoords = { -- Optional. If set, props spawn on these exact coords instead of random ones. Accepts vec3(x, y, z) or vec4(x, y, z, heading). If there are fewer coords than the total ore count, only that many props spawn
            -- vec3(1930.602173, -970.602173, 78.835205),
            -- vec4(1928.742920, -968.927490, 78.936279, 90.0)
        }
    },
}
```
