# Configuration

```lua
lib.locale('en')

cfg = {}

---@type 'auto' | 'qb' | 'esx'
cfg.framework = 'auto'

---@type 'ox_lib' | 'qb' | 'esx' | 'okokNotify' | 'ps-ui'
cfg.notification = 'ox_lib'

---@type 'ox_lib' | 'esx' | 'qb' | 'okokTextUI' | 'jg-textui'
cfg.textUI = 'ox_lib'

---@type 'ox_lib' | 'qb' | 'esx'
cfg.progressbar = 'ox_lib'

cfg.givenitroCommand = 'givenitro'
cfg.givenitroAlloweds = {
    -- ['steam:00000000a000a00'] = true,
    -- ['license:0aa00a00a00aa000a000000a00000a00a00aa000'] = true,
    -- ['license2:0aa00a00a00aa000a000000a00000a00a00aa000'] = true,
    -- ['fivem:0000000'] = true,
}

cfg.general = {
    databaseTableName = 'player_vehicles', -- QB/QBX -> player_vehicles | ESX -> owned_vehicles
    fakePlate = false, -- Set true if your server uses a fake-plate system (requires fakeplate column)
    requireTurboMod = false, -- Require a turbo mod on the vehicle for nitrous to work

    items = {
        tablet = {
            itemName = 'rm_car_tablet',
            requireOwnership = false,
            allowedJobs = false, -- Or a table like { 'mechanic', 'bennys' }
            allowedClasses = {
                [0] = true, [1] = true, [2] = true, [3] = true, [4] = true,
                [5] = true, [6] = true, [7] = true, [9] = true, [22] = true,
            },
            blacklistedVehicles = {
                [`sultan2`] = true,
            },
            shouldRemove = true,
            progressBar = true,
        },
        nitro_bottles = {
            requireOwnership = false,
            allowedJobs = false,
            -- Each item uses its own bottle texture variant (the physical bottle color).
            -- The nitrous particle flame color is picked at install time via dialog (independent of the item).
            items = {
                { itemName = 'rm_nitro_default', colorVariant = 0 },
                { itemName = 'rm_nitro_white',   colorVariant = 1 },
                { itemName = 'rm_nitro_green',   colorVariant = 3 },
                { itemName = 'rm_nitro_yellow',  colorVariant = 4 },
                { itemName = 'rm_nitro_red',     colorVariant = 5 },
                { itemName = 'rm_nitro_black',   colorVariant = 6 },
                { itemName = 'rm_nitro_dgreen',  colorVariant = 7 },
                { itemName = 'rm_nitro_brown',   colorVariant = 8 },
                { itemName = 'rm_nitro_gray',    colorVariant = 9 },
                { itemName = 'rm_nitro_purple',  colorVariant = 10 },
                { itemName = 'rm_nitro_orange',  colorVariant = 11 },
                { itemName = 'rm_nitro_pink',    colorVariant = 12 },
            },
            allowedClasses = {
                [0] = true, [1] = true, [2] = true, [3] = true, [4] = true,
                [5] = true, [6] = true, [7] = true, [9] = true, [22] = true,
            },
            blacklistedVehicles = {
                [`sultan2`] = true,
            },
            shouldRemove = true,
            progressBar = true,
        },
    },

    nitrous = {
        defaultKey = 'LSHIFT',
        requireTablet = false,
        boost = 75.0, -- Engine power multiplier when nitrous is active
        antiSpamCooldown = 5000, -- ms between activations
        drain = 1.0, -- Drain per tick (100ms)
        minSpeed = 10.0, -- km/h
        minRpm = 0.2, -- 0.0 - 1.0
        purgeOnRelease = true,
        purgeOnReleaseDuration = 1000, -- ms

        commands = {
            nitrobar = 'nitrobar',
            move_nitrobars = 'move_nitrobar',
            reset_nitrobars = 'reset_nitrobar',
        },

        nitro_tanks = {
            max_count = 3, -- Default max tanks per vehicle
            vehicles = {
                [`sultan2`] = 1, -- Per-model override
            }
        },

        installAnim = {
            dict = 'anim@amb@clubhouse@tutorial@bkr_tut_ig3@',
            name = 'machinic_loop_mechandplayer',
            duration = 4000,
        },

        openDoorsOnPlace = true,

        nitro_object = {
            defaultBone = 0, -- Bone the nitrous object is attached to
        },

        ptfx = {
            bones = { "exhaust", "exhaust_2", "exhaust_3", "exhaust_4", "exhaust_5", "exhaust_6", "exhaust_7", "exhaust_8", "exhaust_9", "exhaust_10", "exhaust_11", "exhaust_12", "exhaust_13", "exhaust_14", "exhaust_15", "exhaust_16" },
            colors = {
                [0]  = { size = 0.5, label = 'exhaust_color_blue' },
                [1]  = { size = 0.5, label = 'exhaust_color_white' },
                [2]  = { size = 0.5, label = 'exhaust_color_purple' },
                [3]  = { size = 0.5, label = 'exhaust_color_green' },
                [4]  = { size = 0.5, label = 'exhaust_color_yellow' },
                [5]  = { size = 0.5, label = 'exhaust_color_red' },
                [6]  = { size = 0.5, label = 'exhaust_color_pink' },
                [7]  = { size = 0.5, label = 'exhaust_color_orange' },
                [8]  = { size = 0.5, label = 'exhaust_color_cyan' },
                [9]  = { size = 0.5, label = 'exhaust_color_darkblue' },
                [10] = { size = 0.5, label = 'exhaust_color_darkgreen' },
                [11] = { size = 0.5, label = 'exhaust_color_brown' },
                [12] = { size = 0.5, label = 'exhaust_color_black' },
            },
        }
    },

    purge = {
        defaultKey = 'G',
        bone = 'bonnet',
        sprayCount = 4,
        sprayOffset = { x = 0.5, y = 0.05, z = 0.0 },
        sprayRotation = { left = vector3(40.0, -20.0, 0.0), right = vector3(40.0, 20.0, 0.0) },
        sprayScale = 0.5,
    },

    glowingDiscs = {
        defaultKey = '',
        onlyBackWheels = true,
        ptfx = {
            offset = vector3(-0.02, 0.0, 0.0),
            rotation = vector3(0.0, 0.0, 90.0),
            scale = 0.5,
        },
        customOffsets = {
            [`sultanrs`] = {
                front = { offset_x = 0.0, offset_scale = 1.0 },
                rear  = { offset_x = 0.0, offset_scale = 1.0 },
            }
        }
    },

    drift_mode = {
        defaultKey = 'LCONTROL',
        maxSpeed = 75.0, -- km/h
    },

    drift_hd = {
        defaultKey = 'LCONTROL', -- Same as drift_mode so both can stack
        defaultPreset = 'default',
        vehicles = {
            -- Per-model preset mapping. Presets defined in client/drift/presets.lua
            [`sultan2`] = 'drift_hard',
            [`miata`]   = 'drift_miata',
        },
    },

    sport_mode = {
        defaultKey = '',
        powerMultiplier = 150.0,
        interruptDuration = 200,
    },

    popcorn = {
        defaultKey = '',
        rpm = 0.65,
        ptfx = {
            { size = 0.25, offset = vector3(0.0, -0.1, 0.0), rotation = vector3(0.0, 0.0, -180.0) },
            { size = 0.95, offset = vector3(0.0, -0.1, 0.0), rotation = vector3(0.0, 0.0, 0.0) },
        },
    },

    drift_smoke = {
        defaultKey = '',
        onlyBackWheels = true,
        ptfx = {
            offset = vector3(0.05, 0.0, 0.0),
            rotation = vector3(0.0, 0.0, 0.0),
        }
    },

    throttle_control = {
        defaultKey = '',
        maxRpm = 0.8,
        maxSpeed = 200,
        allowedClasses = {
            [0] = true, [1] = true, [2] = true, [3] = true,
            [4] = true, [5] = true, [6] = true, [7] = true,
        }
    },

    rollback_handbrake = {
        defaultKey = '',
        rollbackConfig = {
            enabled = true,
            duration = 30,
            strength = 10,
        },
        handbrakeTurnConfig = {
            enabled = true,
            strength = 1.5,
        }
    },

    interior_light = { defaultKey = '' },
    neon_light     = { defaultKey = '' },

    shunt = {
        defaultKey = 'LCONTROL',
        magnitude = 18.0,
        upForce = 500 * 100,
        cooldown = 15000, -- ms
        camShakeIntensity = 0.25,
        camShakeDuration = 500, -- ms
        velocityLerpDuration = 500, -- ms
    },

    custom_exhaust = {
        itemName = 'rm_custom_exhaust',
        requireOwnership = false,
        allowedJobs = false,
        allowedClasses = {
            [0] = true, [1] = true, [2] = true, [3] = true, [4] = true,
            [5] = true, [6] = true, [7] = true, [9] = true, [22] = true,
        },
        blacklistedVehicles = {
            [`sultan2`] = true,
        },
        shouldRemove = true,
        progressBar = true,
        installAnim = {
            dict = 'anim@amb@clubhouse@tutorial@bkr_tut_ig3@',
            name = 'machinic_loop_mechandplayer',
            duration = 4000,
        },
        remover = {
            itemName = 'rm_exhaust_remover',
            shouldRemove = true,
            progressBar = true,
        },
        prop = `imp_prop_impexp_exhaust_05`,
        animDict = 'anim@heists@box_carry@',
        animName = 'idle',
        installTime = 5000,
        maxDistance = 5.0,
        throttleLiftRpm = 0.7,
        ptfxDuration = 300, -- ms
        fireCooldown = 100, -- ms between two backfire events on same vehicle
        backfirePtfx = { size = 0.95, offset = vector3(0.0, -0.1, 0.0), rotation = vector3(0.0, 0.0, 0.0) },
        ptfx = {
            bones = { "exhaust", "exhaust_2", "exhaust_3", "exhaust_4", "exhaust_5", "exhaust_6", "exhaust_7", "exhaust_8", "exhaust_9", "exhaust_10", "exhaust_11", "exhaust_12", "exhaust_13", "exhaust_14", "exhaust_15", "exhaust_16" },
            colors = {
                [0]  = { size = 0.5, label = 'exhaust_color_blue' },
                [1]  = { size = 0.5, label = 'exhaust_color_white' },
                [2]  = { size = 0.5, label = 'exhaust_color_purple' },
                [3]  = { size = 0.5, label = 'exhaust_color_green' },
                [4]  = { size = 0.5, label = 'exhaust_color_yellow' },
                [5]  = { size = 0.5, label = 'exhaust_color_red' },
                [6]  = { size = 0.5, label = 'exhaust_color_pink' },
                [7]  = { size = 0.5, label = 'exhaust_color_orange' },
                [8]  = { size = 0.5, label = 'exhaust_color_cyan' },
                [9]  = { size = 0.5, label = 'exhaust_color_darkblue' },
                [10] = { size = 0.5, label = 'exhaust_color_darkgreen' },
                [11] = { size = 0.5, label = 'exhaust_color_brown' },
                [12] = { size = 0.5, label = 'exhaust_color_black' },
            },
        },
    },

    menu = {
        { label = locale('menu_nitrous'),          name = 'nitrous',          icon = 'fire',      enabled = true },
        { label = locale('menu_purge'),            name = 'purge',            icon = 'smog',      enabled = true },
        { label = locale('menu_popcorn'),          name = 'popcorn',          icon = 'bomb',      enabled = true },
        { label = locale('menu_glow'),             name = 'glow',             icon = 'fire',      enabled = true },
        { label = locale('menu_drift'),            name = 'drift',            icon = 'cog',       enabled = true },
        { label = locale('menu_drift_hd'),         name = 'drift_hd',         icon = 'cog',       enabled = true },
        { label = locale('menu_drift_smoke'),      name = 'smoke',            icon = 'smog',      enabled = true },
        { label = locale('menu_sport_mode'),       name = 'sport_mode',       icon = 'cog',       enabled = true },
        { label = locale('menu_throttle_control'), name = 'throttle_control', icon = 'cog',       enabled = true },
        { label = locale('menu_rollback'),         name = 'rollback',         icon = 'cog',       enabled = true },
        { label = locale('menu_neon'),             name = 'neon',             icon = 'lightbulb', enabled = true },
        { label = locale('menu_interior_lights'),  name = 'interior_lights',  icon = 'lightbulb', enabled = true },
        { label = locale('menu_shunt'),            name = 'shunt',            icon = 'bolt',      enabled = true },
    },
}

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.rainmad.com/resources/3d-tuning-tablet/configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
