> For the complete documentation index, see [llms.txt](https://docs.kuzquality.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kuzquality.com/resources/premium-resources/moonshining/config.md).

# Config

{% tabs %}
{% tab title="config.lua" %}

```lua
Config = {}

-- Enables extra debug prints
Config.debug = false

Config.locale = 'en'

-- Item names, can be changed to items that already exist on your server
-- Ingredient items are set in config.shines.lua
Config.items = {
    barrel = 'kq_mash_barrel',
    still = 'kq_moonshine_still',
    jar = 'kq_mason_jar',
    firewood = 'kq_firewood',

    water = 'kq_water_jug',
    yeast = 'kq_yeast',

    -- Used when starting a still run, given back after bottling
    emptyJug = 'kq_jug_empty',

    bucket = 'kq_bucket',
    repairKit = 'kq_still_repair_kit',
}

-- Mash barrel
Config.barrel = {
    maxIngredients = 20,

    -- Show what's inside an open barrel
    showContents = true,

    buckets = {
        -- Bucket loads in one barrel (one barrel = one still run)
        perBarrel = 3,

        -- Whether carrying mash requires the bucket item
        required = true,

        -- Seconds before a carried bucket drops back into its barrel (false = no limit)
        carryTimeout = 300,
    },

    -- A mix that doesn't match any recipe
    wrongMix = {
        -- Minutes before it goes sour
        sourDuration = 10,

        -- Fermentation time shown when checking it, so it looks like a normal mash
        shownDuration = 30,
    },

    quality = {
        -- Minutes a barrel stays at 100% before it starts over-fermenting
        hold = 10,

        -- Quality multiplier when opened fully over-fermented (200%)
        overMin = 0.2,

        -- Lowest quality (%) of a fermented mash
        min = 10,

        -- Quality (%) of sour mash
        sourQuality = 100,

        -- Quality (%) lost per ingredient too many / too few
        lossPerUnit = 25,
        -- Lowest quality (%) of a mix with wrong amounts
        mistakeMin = 10,
    },
}

-- Still
Config.still = {
    -- Starting a run fills the firebox from the player's firewood
    firewood = {
        -- Max logs added at once
        perAdd = 5,

        -- Firebox capacity (logs)
        capacity = 5,
    },

    -- Explosion when the pressure reaches 100%
    explosion = {
        enabled = true,

        -- https://docs.fivem.net/natives/?_0xE3AD2BDBAEE269AC
        type = 0,
        damageScale = 0.0,
    },

    -- A blown still stays in place. Its run, mash, firewood and jug are lost
    damage = {
        -- Chance (0.0 - 1.0) of the still being destroyed instead of damaged
        -- Damaged stills can be repaired, destroyed ones can only be cleared away
        destroyChance = 0.25,

        -- Whether repairing uses up a repair kit
        requireRepairKit = true,

        repairTime = 10, -- seconds
        removeTime = 6, -- seconds

        -- Seconds the wreck keeps smoking
        smokeTime = 120,
    },
}

Config.bottling = {
    -- Jars in one jug (empty jars needed to start bottling)
    jarsPerJug = 6,

    -- How the crate the jars stand on during bottling is spawned
    -- 'client'      = spawned by client, networked (default)
    -- 'server'      = spawned by server, visible to everyone, works with entity lockdown mode
    -- 'unnetworked' = spawned by client, local-only (invisible to other players), works with entity lockdown mode
    crateSpawnMode = 'client',
}

-- Drinking moonshine
-- Duration and strength are set per shine in config.shines.lua
Config.moonshineEffect = {
    -- Walking style by drink strength (0.0 - 1.0)
    clipsets = {
        { minStrength = 0.0, clipset = 'move_m@drunk@slightlydrunk' },
        { minStrength = 0.4, clipset = 'move_m@drunk@moderatedrunk' },
        { minStrength = 0.75, clipset = 'move_m@drunk@verydrunk' },
    },

    timecycle = 'Drunk',

    -- Camera shake at full strength
    shake = 1.0,

    -- Blindness (Sour Moonshine)
    blind = {
        opacity = 0.95,
    },
}

-- NPCs that see a running still call the police
Config.policeAlert = {
    enabled = true,

    -- How far NPCs can see a running still (m)
    viewRange = 40.0,

    -- Seconds the NPC is on the phone. Killing or scaring them stops the call
    callTime = 8,

    -- Minutes before the same still can be reported again
    cooldown = 5,

    -- The alert is placed randomly within this radius of the still (m)
    radius = 50.0,

    -- Jobs that receive the dispatch alert
    jobs = { 'police', 'lspd', 'bcso' },

    code = '10-66',
    blip = {
        sprite = 436,
        color = 1,
        scale = 1.0,
    },
}

-- Item quality metadata (Only for inventories supporting metadata)
Config.qualityMetadata = {
    -- When disabled every jar counts as 100% quality
    enabled = true,
}

-- Placement rules
Config.placing = {
    checks = {
        -- Only allow placement in non-default routing buckets (e.g. housing interiors)
        onlyInNonDefaultRoutingBucket = false,

        -- Whether to disallow placement on/near roads
        disallowPlacementNearRoads = false,

        -- Whether to disallow placement indoors (anything above the spot within roofDistance counts as a roof)
        indoors = {
            disallow = false,
            roofDistance = 5.0, -- (m)
        },

        -- Max objects each player may place, per type
        limits = {
            enabled = false,

            barrel = 4,
            still = 2,
        },

        housing = {
            -- Only allow placement while inside a house
            enabled = false,

            -- Available systems:
            -- nolag_properties
            -- origen_housing
            -- bcs_housing
            -- qs-housing
            -- vms_housing
            -- sn_properties
            -- loaf_housing
            -- rtx_housing
            system = 'nolag_properties',
        },

        -- Restrict placement to specific areas
        whitelistedAreas = {
            enabled = false,

            showBlips = true,
            areas = {
                {
                    coords = vec3(1085.47, 3591.06, 33.30),
                    radius = 200.0
                },
            }
        }
    },

    -- Only the player who placed an object can pick it up
    onlyOwnerCanPickup = false,
}

-- Fixed world objects, they can't be picked up
-- A pre-placed still that blows up is only ever damaged, never destroyed
-- It can be repaired, and works again after a script / server restart
Config.prePlaced = {
    stills = {
        -- { coords = vec3(x, y, z), rotation = vec3(0, 0, 0) },
    },
    barrels = {
        -- { coords = vec3(x, y, z), rotation = vec3(0, 0, 0) },
    },
}

Config.misc = {
    -- Type of the interaction indication in the still view
    -- 'default' (Native FiveM outline) (Problematic for QuantV users but by far the best looking)
    -- 'box' (Custom outline drawn around the entity bounds)
    -- 'glow' (Glow effect on hovered entities)
    -- 'none'
    interactionIndicator = 'default',
}

-- Recommended to remove this vendor and add these items into your existing shops/robberies etc.
Config.vendors = {
    ['moonshine_supplier'] = {
        coords = vec4(2251.49, 5155.65, 56.89, 236.49),
        model = 'a_m_m_hillbilly_01',
        idleAnim = {
            dict = 'amb@world_human_leaning@male@wall@back@foot_up@idle_a',
            anim = 'idle_a',
        },
        items = {
            ['kq_mash_barrel']      = { label = 'Mash Barrel', price = 2500 },
            ['kq_moonshine_still']  = { label = 'Moonshine Still', price = 9000 },
            ['kq_mason_jar']        = { label = 'Mason Jar', amount = 12, price = 180 },
            ['kq_jug_empty']        = { label = 'Empty Jug', price = 150 },
            ['kq_bucket']           = { label = 'Bucket', price = 100 },
            ['kq_still_repair_kit'] = { label = 'Still Repair Kit', price = 1500 },
            ['kq_firewood']         = { label = 'Firewood', amount = 5, price = 100 },
            ['kq_water_jug']        = { label = 'Water Jug', price = 15 },
        },
        blip = {
            enabled = true,

            label = 'Moonshine Supplies dealer',
            sprite = 93,
            color = 21,
            alpha = 255,
            scale = 0.6,
        },
    },
    ['moonshine_ingredients'] = {
        coords = vec4(2516.98, 4992.96, 43.96, 223.25),
        model = 'a_m_m_hillbilly_01',
        idleAnim = {
            dict = 'amb@world_human_leaning@male@wall@back@foot_up@idle_a',
            anim = 'idle_a',
        },
        items = {
            ['kq_corn']             = { label = 'Corn', amount = 3, price = 75 },
            ['kq_sugar']            = { label = 'Sugar', amount = 3, price = 50 },
            ['kq_yeast']            = { label = 'Yeast', amount = 3, price = 50 },
            ['kq_rye']              = { label = 'Rye', amount = 3, price = 120 },
            ['kq_peaches']          = { label = 'Peaches', amount = 3, price = 105 },
            ['kq_apples']           = { label = 'Apples', amount = 3, price = 70 },
            ['kq_cinnamon']         = { label = 'Cinnamon', amount = 3, price = 50 },
        },
        blip = {
            enabled = true,

            label = 'Moonshine Ingredients dealer',
            sprite = 93,
            color = 21,
            alpha = 255,
            scale = 0.6,
        },
    },
}

```

{% endtab %}

{% tab title="config.shines.lua" %}

```lua
-- Mash ingredients, you can add more
Config.ingredients = {
    ['corn']     = { label = 'Corn', item = 'kq_corn' },
    ['sugar']    = { label = 'Sugar', item = 'kq_sugar' },
    ['rye']      = { label = 'Rye', item = 'kq_rye' },
    ['peaches']  = { label = 'Peaches', item = 'kq_peaches' },
    ['apples']   = { label = 'Apples', item = 'kq_apples' },
    ['cinnamon'] = { label = 'Cinnamon', item = 'kq_cinnamon' },
}

-- Moonshine types, you can modify, remove and add shines
Config.shines = {
    ['corn'] = {
        label = 'Corn Shine',

        -- Recipe (keys from Config.ingredients). Wrong amounts lower the quality, a wrong ingredient makes it sour
        ingredients = 'REDACTED',

        -- Liquid colour
        -- 0 base (white)         1 yellow            2 orange              3 slight red
        -- 4 slight blue          5 slight green      6 very dark brown     7 slight purple
        -- 8 deep red/purple      9 caramel           10 pink               11 teal
        -- 12 deep green          13 smoky grey       14 light tea brown    15 deep blue
        tint = 0,

        jugItem = 'kq_jug_corn', -- given by a still run
        item = 'kq_shine_corn', -- jar item

        fermentDuration = 25, -- minutes to ferment
        overfermentDuration = 50, -- minutes from fermentation being finished to it going sour
        distillDuration = 15, -- minutes of a still run

        -- Cosmetic proof (alcohol %) shown on the jug and jars
        maxProof = 60,

        -- Drunk effect at 100% quality. Duration in seconds, strength 0.0 - 1.0
        effect = { duration = 180, strength = 0.7 },
    },

    ['peach'] = {
        label = 'Peach Shine',

        ingredients = 'REDACTED',
        tint = 2,

        jugItem = 'kq_jug_peach',
        item = 'kq_shine_peach',

        fermentDuration = 30,
        overfermentDuration = 60,
        distillDuration = 15,
        maxProof = 45,

        effect = { duration = 150, strength = 0.4 },
    },

    ['rye'] = {
        label = 'Rye Whiskey',

        ingredients = 'REDACTED',
        tint = 6,

        jugItem = 'kq_jug_rye',
        item = 'kq_shine_rye',

        fermentDuration = 40,
        overfermentDuration = 80,
        distillDuration = 15,
        maxProof = 55,

        effect = { duration = 210, strength = 0.6 },
    },

    ['apple_pie'] = {
        label = 'Apple Pie',

        ingredients = 'REDACTED',
        tint = 1,

        jugItem = 'kq_jug_apple_pie',
        item = 'kq_shine_apple_pie',

        fermentDuration = 45,
        overfermentDuration = 90,
        distillDuration = 15,
        maxProof = 40,

        effect = { duration = 180, strength = 0.45 },
    },
}

-- Sour moonshine
-- What every barrel that goes sour turns into
Config.sourShine = {
    label = 'Sour Moonshine',
    tint = 5,

    jugItem = 'kq_jug_sour',
    item = 'kq_shine_sour',

    distillDuration = 15,
    maxProof = 50,

    effect = {
        duration = 120,
        strength = 0.7,

        -- Blindness and ragdoll (seconds). Starts `delay` after drinking, the other times count from then
        blind = { delay = 10, duration = 60, ragdollAt = 30, ragdollDuration = 30 },
    },
}

```

{% endtab %}
{% endtabs %}
