Skip to content

Configuration

All configuration is done in config.lua. Below is a breakdown of each section.

Framework

lua
Framework = 'qb-core',                    -- 'qb-core' or 'esx'
FrameworkResource = 'qb-core',            -- Resource name
NewFrameworkVersion = true,               -- ESX only: false for < 1.8
SharedObject = 'esx:getSharedObject',     -- ESX only (old versions)

Target System

The script auto-detects your target system:

lua
UseQbTarget = GetResourceState('qb-target') == 'started',
UseOxTarget = GetResourceState('ox_target') == 'started',

No manual configuration needed — it checks which target resource is running. If neither is found, the script falls back to proximity-based interaction.

Blips

lua
BlipSprite = 237,
BlipColor = 26,
BlipText = 'Workbench',

Experience System

Players earn XP by crafting items. XP gates which recipes they can craft.

lua
ExperienceMode = 'per_workbench',  -- 'global' or 'per_workbench'
ModeDescription
globalSame experience level across all workbenches
per_workbenchIndividual experience tracked per workbench

Experience Scaling

To prevent farming low-level recipes, XP gain decreases as the player out-levels the recipe:

lua
decreaseExperienceGain = function(defaultExperience, playerLevel, recipeLevel)
    local levelDifference = playerLevel - recipeLevel
    if levelDifference <= 0 then
        return defaultExperience
    end
    local reduction = math.min(levelDifference * 0.1, 0.8) -- Max 80% reduction
    return math.floor(defaultExperience * (1 - reduction))
end,

TIP

Each level above the recipe reduces XP by 10%, up to a maximum 80% reduction.

Queue System

lua
QueueSystem = {
    QueueMode = 'per_player',         -- 'per_player' or 'per_workbench'
    CancelReturnItems = true,         -- Return items when cancelling
    OnlyOwnerCanCancel = false,       -- Only crafter can cancel their items
    OnlyOwnerGetsItemsBack = false,   -- Items go to whoever cancels
    MaxQueueSize = 10,                -- Max items in queue (-1 = unlimited)
},
ModeDescription
per_playerEach player has their own queue at each workbench
per_workbenchAll players share one queue per workbench

Proximity Queue Display

Shows a live queue display when near a workbench:

lua
ProximityQueue = {
    Enable = true,
    Distance = 8.0,
    Position = { right = '2%', top = '70vh' },
    MaxVisibleItems = 3,
    ShowWorkbenchLabel = true,
    AnimationDuration = 500,
    FadeGradientHeight = '30px',
    StopCraftingWhenEmpty = true,  -- per_workbench mode only
},

Blueprint System

Blueprints are discoverable recipes that players unlock through a discovery mechanic.

lua
BlueprintSystem = {
    DiscoveryCostType = 'money',       -- 'money' or 'item'
    DiscoveryCost = 5000,              -- Cost per discovery attempt
    DiscoveryCostItem = 'metalscrap',  -- Item name (if using 'item' type)
    DiscoverableItems = {
        ['firstaid'] = 0.4,            -- Common
        ['weapon_pistol'] = 0.25,      -- Common
        ['cokebaggy'] = 0.1,           -- Uncommon
        ['drug_workbench_item'] = 0.08, -- Rare
    },
},

INFO

Weights are relative — they don't need to add up to 1.0 or 100. Higher weight = higher chance to discover that blueprint.

Permanent Items

Items that are required for crafting but not consumed in the process (tools):

lua
PermanentItems = {
    ['screwdriverset'] = true,
    ['wrench'] = true
},

UI

lua
MainColor = '#7DDA58',               -- Main accent color
HideWhenCantCraft = false,           -- Hide uncraftable items vs. dimming them

Notification

Customize the notification function at the bottom of config.lua:

lua
function SendTextMessage(msg)
    SetNotificationTextEntry('STRING')
    AddTextComponentString(msg)
    DrawNotification(0, 1)
end

Replace with your own notification system (e.g., ox_lib, core_notify).