# Configuration

Complete configuration reference for the Multiplayer Electrician Job.

***

## Configuration Files

The script uses multiple configuration files located in the `config/` folder:

| File             | Purpose                                           |
| ---------------- | ------------------------------------------------- |
| `config.lua`     | Main configuration (framework, settings, rewards) |
| `coordinate.lua` | Location coordinates for all job areas            |
| `GetCore.lua`    | Framework detection (usually don't modify)        |

***

## Basic Settings

### Framework & Core

```lua
-- Framework Selection
-- Options: 'qb', 'oldqb', 'esx', 'oldesx', 'vrp', 'vrp2', 'standalone'
Config.Framework = 'qb'

-- Language (Available: 'en', 'tr', 'de', 'fr', 'pt', 'ru', 'ar')
Config.Locale = 'en'

-- Currency Display
Config.CurrencyUnit = '$'  -- Options: '$', '€', '₺'

-- Database Resource
Config.SQL = "oxmysql"  -- Options: 'oxmysql', 'mysql-async', 'ghmattimysql'
```

{% hint style="info" %}
**QBox Users:** QBox is fully compatible. Set `Config.Framework = 'qb'` for QBox servers.
{% endhint %}

***

## Inventory Settings

```lua
-- Inventory System (ignored in standalone mode)
Config.Inventory = "qb_inventory"
-- Options: 'qb_inventory', 'esx_inventory', 'ox_inventory', 'qs_inventory', 'tgiann-inventory'
```

***

## Interaction Settings

```lua
-- Interaction Handler
Config.InteractionHandler = 'drawtext'  -- Options: 'drawtext', 'ox-target'
```

***

## Job Settings

### Lobby & Players

```lua
-- Maximum Players in Lobby
Config.MaxPlayersInLobby = 4  -- 1-4 players per lobby

-- Job Cooldown (hours between jobs)
Config.jobCoolDownHours = 0  -- 0 = no cooldown
```

### Commands

```lua
Config.Command = {
    jobReset = "jobresetelectrician",      -- Reset current job
    jobLeave = "jobleaveelectrician",      -- Leave lobby
    openTutorial = "openTutorialelectrician", -- Open tutorial menu
}
```

***

## Vehicle Settings

```lua
-- Utility Trucks (with lift platforms)
Config.Vehicles = {
    "utilitytruc2",
    "utilitytruc3",
}

-- Vehicle Extra Parts (6 configurable parts)
Config.VehicleExtras = {
    [1] = true,
    [2] = true,
    [3] = true,
    [4] = true,
    [5] = true,
    [6] = true,
}

-- Vehicle Key System
Config.Vehiclekey = true

-- Remove Keys on Job End
Config.Removekeys = true
```

### Lift Controls

The utility truck lift can be controlled using configurable keys:

* **Lift Up** - Raise the platform
* **Lift Down** - Lower the platform

***

## Debug Settings

```lua
-- Debug Mode (shows console messages)
Config.Debug = false

-- Debug Commands (enables testing commands)
Config.DebugCommands = false
```

{% hint style="warning" %}
**Production Servers:** Always set `Config.Debug = false` and `Config.DebugCommands = false` for better performance!
{% endhint %}

***

## Traffic Light Models

Supported traffic light models for repair tasks:

```lua
Config.TrafficLightModels = {
    "prop_traffic_03a",
    "prop_traffic_02a",
    "prop_traffic_01a",
    "prop_traffic_01d",
    "prop_traffic_lightset_01",
    "prop_traffic_01b",
    "prop_traffic_03b",
}
```

***

## Region & Rewards

Configure work regions and their rewards:

```lua
['regionData'] = {
    {
        regionID = 1,
        regionInfo = {
            regionName = "Region 1",
            regionMinimumLevel = 0
        },
        regionAwards = {
            money = 5000,
            xp = 1000,
            onlineJobExtraAwards = 1,
            bonusExtraMoney = 500,
            bonusExtraXP = 200,
        },
    },
    -- Regions 2-6 with increasing rewards
}
```

***

## Task Configuration

Configure tasks per region:

```lua
['transformerRepair'] = {
    taskCount = 2,  -- Number of transformers to repair
},
['circuitBoardRepair'] = {
    taskCount = 3,  -- Number of circuit boards to fix
},
['streetLampRepair'] = {
    taskCount = 2,  -- Number of street lamps to repair
},
['trafficLightRepair'] = {
    taskCount = 1,  -- Number of traffic lights to fix
},
['phonePoleRepair'] = {
    taskCount = 2,  -- Number of phone poles to repair
},
```

***

## Level System

Configure XP required for each level (up to level 70):

```lua
Config.RequiredXP = {
    [1] = 1000,
    [2] = 1500,
    [3] = 2000,
    [4] = 2500,
    [5] = 3000,
    -- ... up to level 70
    [70] = 45500,
}
```

***

## Reconnection System

Configure player reconnection settings:

```lua
Config.Reconnection = {
    enabled = true,
    gracePeriodSeconds = 0,
    maxReconnectAttempts = 3,
    resetAttemptsAfterSeconds = 300,
    autoCleanupExpired = true,

    ownerTransfer = {
        enabled = true,
        allowRejoinAsMember = true,
        prioritizeByScore = true,
        minimumLobbyTime = 60,
    },
}
```

***

## UI Positions

Customize UI element positions:

```lua
Config.DefaultUIPositions = {
    teamList = { top = '77.22vh', left = '85.94vw' },
    scoreList = { top = '2.64vh', left = '1.61vw' },
    inviteSide = { top = '2.85vh', left = '73.07vw' },
    notificationDiv = { top = '40.48vh', left = '81.54vw' },
    keyInfoSide = { top = '50%', right = '2.0833vw' },
}
```

{% hint style="info" %}
Players can also adjust UI positions in-game through the settings menu!
{% endhint %}

***

## Need Help?

{% hint style="info" %}
Having configuration issues? Join our [Discord server](https://discord.gg/tworst) and open a support ticket.
{% endhint %}


---

# 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.tworst.com/scripts/electrician-job/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.
