# Configuration

his document explains every section of the `Config` file used to control the RTS (Real-Time Strategy) game mode.

You can fully customize:

* Framework integration
* How players access the RTS menu
* Match settings
* Platoon system
* Units & categories
* Battlefield maps

***

## Server Framework & Core

```lua
Config.Framework = "ESX"
Config.DebugMode = false
```

#### `Config.Framework`

Defines which framework your server uses.

**Available Options:**

* `"QB"` → QBCore
* `"ESX"` → ESX
* `"VRP"` → vRP
* `"STANDALONE"` → No framework required

> Make sure this matches your server core.

***

#### `Config.DebugMode`

* `true` → Shows debug errors in F8 console
* `false` → Hides debug messages

✅ Keep `true` during setup\
❌ Set to `false` in production

***

## Dedicated RTS Server Mode

```lua
Config.DedicatedServerMode = false
```

#### What This Does

If set to `true`:

1. RTS UI opens automatically when a player joins.
2. If they close the UI → they are kicked from the server.

#### Important

Use this ONLY if:

* Your server is **100% RTS-based**
* No roleplay or other gameplay modes exist

For normal RP servers → keep `false`.

***

## How Players Open the RTS Menu

You can enable multiple access methods.

***

### Command Access

```lua
Config.UseCommand = true
```

Players can type:

```
/rts
```

***

### Key Mapping (FiveM Settings)

```lua
Config.UseKeyMapping = false
```

If enabled:

* Players bind a key via **ESC → Settings → Keybindings**

***

### Interaction Points (Press E)

```lua
Config.UseKeybind = false
```

Players walk to configured coordinates and press **E**.

Requires `Config.Locations`.

***

### Third Eye / Target Systems

```lua
Config.UseOxTarget = false
Config.UseQbTarget = false
```

If using:

* **ox\_target** → set `UseOxTarget = true`
* **qb-target** → set `UseQbTarget = true`

Players can Alt-Eye specific computer props.

***

## Locations & Props

### Interaction Coordinates

```lua
Config.Locations = {
    vector3(123.45, -567.89, 30.00),
}
```

Add positions where players can press **E** to open RTS.

Format:

```lua
vector3(x, y, z)
```

***

### Computer Models (Target Systems)

```lua
Config.ComputerModels = {
    'prop_pc_01',
}
```

These are object models players can target using Third Eye.

***

## Match Settings

```lua
Config.MatchSettings = { ... }
```

Controls gameplay mechanics.

***

### Time & Economy

| Setting                  | Description            |
| ------------------------ | ---------------------- |
| `MatchDuration`          | Match length (seconds) |
| `CommandPointsStart`     | Starting points        |
| `CommandPointsPerMinute` | Passive income         |
| `RespawnCooldown`        | Unit respawn delay     |

Example:

```lua
MatchDuration = 900 -- 15 minutes
```

***

### &#x20;Camera Controls

| Setting               | Description            |
| --------------------- | ---------------------- |
| `CameraDefaultHeight` | Starting zoom height   |
| `CameraMinHeight`     | Zoom-in limit          |
| `CameraMaxHeight`     | Zoom-out limit         |
| `CameraSmoothSpeed`   | Camera drag smoothness |
| `EdgePanSpeed`        | Screen-edge pan speed  |
| `EdgePanMargin`       | Edge distance (pixels) |

⚠️ Not recommended to change unless experienced.

***

### Combat

| Setting             | Description                     |
| ------------------- | ------------------------------- |
| `UnitSightRange`    | Detection/shooting range        |
| `WinOnEliminations` | Instant win if all enemies dead |

***

## Platoon System (Advanced)

```lua
Config.Platoon = { ... }
```

Controls squad system & army weight limits.

***

### MaxWeight System

```lua
MaxWeight = {
    starts = 20,
    capped = 40,
    milestone = 5,
    capLevel = 60
}
```

| Field       | Meaning                       |
| ----------- | ----------------------------- |
| `starts`    | Starting weight capacity      |
| `capped`    | Maximum possible              |
| `milestone` | Weight increase per milestone |
| `capLevel`  | Level where max cap unlocks   |

***

### Platoon Slots

Defines UI squad groups.

Example:

```lua
{ name = "ALPHA", key = 1, icon = "fas fa-chess-pawn", color = "#00a8ff" }
```

| Field   | Description      |
| ------- | ---------------- |
| `name`  | Squad name       |
| `key`   | Keyboard number  |
| `icon`  | FontAwesome icon |
| `color` | UI color         |

***

## Unit Categories (UI Only)

```lua
Config.UnitCategories = { ... }
```

Sorts units inside shop UI.

⚠️ Do NOT delete categories unless modifying frontend.

Example:

```lua
infantry = {
    name = "INFANTRY",
    color = "#4a90e2",
    sort = 1,
    icon = "fas fa-person-rifle"
}
```

***

## Unit Definitions

```lua
Config.Units = { ... }
```

Defines every playable unit.

Units are divided into tiers:

***

### Unit Structure Breakdown

Example:

```lua
["rifleman"] = {
    id = 1,
    category = "infantry",
    unlockLevel = 1,
    teamModels = {...},
    weapons = {...},
    weight = 1,
    cost = 120,
    health = 340,
    accuracy = 0.70,
    blip = 150
}
```

#### Common Fields

| Field         | Description          |
| ------------- | -------------------- |
| `id`          | Unique unit ID       |
| `category`    | UI category          |
| `unlockLevel` | Required level       |
| `model`       | Vehicle model        |
| `teamModels`  | Ped models per team  |
| `weapons`     | Weapon list          |
| `weight`      | Army weight usage    |
| `cost`        | Purchase cost        |
| `health`      | Unit HP              |
| `accuracy`    | AI shooting accuracy |
| `blip`        | Radar icon           |

***

## Battlefield Maps

```lua
Config.Maps = { ... }
```

Defines playable maps.

***

### Included Maps

| Map        | Theme             |
| ---------- | ----------------- |
| Grapeseed  | Rural farm combat |
| Zancudo    | Military base     |
| Carrier 96 | Aircraft carrier  |
| Mirage     | Desert operations |

***

### Map Structure

Example:

```lua
["grapeseed"] = {
    id = 1,
    name = "Grapeseed",
    description = "...",
    music = "farm_theme.mp3",
    time = { h = 18, m = 30 },
    weather = 'SMOG',
}
```

***

#### Core Fields

| Field         | Description           |
| ------------- | --------------------- |
| `id`          | Map ID                |
| `name`        | Display name          |
| `description` | Mission briefing      |
| `music`       | Background music      |
| `time`        | In-game time          |
| `weather`     | Weather type          |
| `center`      | Center of battlefield |
| `range`       | Playable radius       |

***

#### 🪖 Spawn Points

```lua
spawns = {
    team1 = { x, y, z, h },
    team2 = { x, y, z, h }
}
```

* `h` = heading direction

***

#### 🎯 Objectives

```lua
{
    name = "Safe House",
    type = "victory",
    radius = 35.0,
    captureRate = 0.5
}
```

| Type       | Meaning              |
| ---------- | -------------------- |
| `victory`  | Capturing wins match |
| `resource` | Provides bonuses     |

Optional:

* `bonus` → multiplier for resources

***

#### Decorative Objects

Used for immersive battlefield setup.

```lua
{
    model = "prop_name",
    x = ...,
    y = ...,
    z = ...,
    h = 0.0
}
```

Optional:

* `net = true` → networked object

***

## Customization Tips

#### To Add a Unit

1. Copy an existing unit
2. Change:
   * `id`
   * `model`
   * `cost`
   * `stats`
3. Add matching thumbnail in UI

***

#### To Add a Map

1. Duplicate an existing map entry
2. Change coordinates
3. Define spawns & objectives
4. Add thumbnail image

***

#### To Adjust Game Balance

Modify:

* Unit `cost`
* Unit `weight`
* `CommandPointsPerMinute`
* `MatchDuration`


---

# 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://enyo-scripts.gitbook.io/documentations/fivem-scripts/warfare-tactics-real-time-strategy-mode/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.
