> For the complete documentation index, see [llms.txt](https://acestudios.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://acestudios.gitbook.io/docs/tactical-and-military/building-menu/configuration.md).

# Configuration

Configure ace\_buildingmenu through Config.lua.

All settings are in `ace_buildingmenu/Config.lua`. Key names follow the [FiveM keyboard input mapper names](https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/).

## General settings

| Option                 | Type    | Default           | Description                                                                                           |
| ---------------------- | ------- | ----------------- | ----------------------------------------------------------------------------------------------------- |
| `MenuName`             | string  | `'Building Menu'` | Title shown on the menu. Keep it short.                                                               |
| `DefaultMenuKey`       | string  | `'E'`             | Default key that opens the building menu.                                                             |
| `PlayDeletionAnim`     | boolean | `true`            | Plays an animation when removing objects. If `false`, deletion is instant.                            |
| `DeletionTime`         | number  | `5`               | Seconds it takes to delete an object. Only applies when `PlayDeletionAnim = true`.                    |
| `OnlySLCanDeployZones` | boolean | `true`            | Only players in `SquadLeaders` can deploy supply zones. **Recommended**, so players can't spam zones. |
| `SquadLeaders`         | table   | *example ID*      | Identifiers allowed to deploy zones. See [Squad leaders](#squad-leaders).                             |

## Realism Mode settings

`Config.Settings.RealismModeSettings`

| Option                       | Type    | Default | Description                                                                                                                                                                                       |
| ---------------------------- | ------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `RealismMode`                | boolean | `true`  | `true` = building uses materials. `false` = **Simple Mode**, with no material limits and no limit on how many props can be placed. In Simple Mode you can skip the rest of this table.            |
| `AllowDeployableZones`       | boolean | `true`  | Lets players deploy supply zones in-game with the Deployable Supply Point prop.                                                                                                                   |
| `ShowDeployableZones`        | boolean | `true`  | Shows deployable zones on the map **for every player**.                                                                                                                                           |
| `PlayerMaxBuildingMaterial`  | number  | `500`   | Maximum materials one player can carry.                                                                                                                                                           |
| `ShowStaticZones`            | boolean | `true`  | Shows static zones on the map for every player.                                                                                                                                                   |
| `UsePlayerMatsForBuild`      | boolean | `false` | `true` = players spend the materials they **carry** and can build **anywhere**. `false` = players must be **inside a zone** with enough materials and can only build in static or deployed zones. |
| `ZoneBlipColor`              | number  | `3`     | Blip color of zones. See [blip colors](https://docs.fivem.net/docs/game-references/blips/#blip-colors).                                                                                           |
| `MinDistanceToDeployNewZone` | number  | `1000`  | Minimum distance from existing zones needed to deploy a new one.                                                                                                                                  |

### Placement buttons

`RealismModeSettings.ObjectPlacementButtons`

| Option               | Default      | Description                                                                                                                                                                |
| -------------------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ConfirmBuild`       | `'G'`        | Confirms placement.                                                                                                                                                        |
| `RotateRight`        | `'RIGHT'`    | Rotates right (right arrow).                                                                                                                                               |
| `RotateLeft`         | `'LEFT'`     | Rotates left (left arrow).                                                                                                                                                 |
| `AllowUpDownControl` | `false`      | Lets players move objects along the Z-axis. This allows precise placement but also **objects in the air**. If `false`, objects snap to the ground. `false` is recommended. |
| `MoveUp`             | `'RBRACKET'` | Moves the object up (only when `AllowUpDownControl = true`).                                                                                                               |
| `MoveDown`           | `'LBRACKET'` | Moves the object down (only when `AllowUpDownControl = true`).                                                                                                             |

## Squad leaders

```lua
OnlySLCanDeployZones = true,

SquadLeaders = {
    'discord:000000000000000000',
    -- 'steam:123456789123456789', -- EXAMPLE
}
```

Add one identifier string per squad leader. The config shows `discord:` and `steam:` identifiers as examples.

{% hint style="warning" %}
The shipped config contains an example Discord identifier. Replace it with your own squad leaders.
{% endhint %}

## Categories

```lua
Config.AllowedCategories = {
    Fortifications = true,
    TechStructures = true,
    Miscellaneous = true
}
```

Set a category to `false` to hide it from the menu.

## Resupply stations

```lua
Config.ResupplyStations = {
    SupplyPointPropModel = 'acestudios_radio_point',
    ZoneRadius = 220.0,

    -- Static zones
    {location = vector3(-2324.6057, 3276.4360, 32.827-0.9), materialAmount = 800},
    {location = vector3(-1892.2039, 2954.7659, 32.8103-0.9), materialAmount = 800},
}
```

| Option                 | Description                                                                                                                                                             |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `SupplyPointPropModel` | Prop used to detect deployable zones. It must be in the **Tech Structures** category. Changing it is **not recommended**. Only used when `AllowDeployableZones = true`. |
| `ZoneRadius`           | Radius of **every** zone, static and deployed.                                                                                                                          |
| Static zone entries    | `{location = vector3(X, Y, Z - 0.9), materialAmount = N}`. `materialAmount` is the zone's starting materials.                                                           |

## Props

Each category in `Config.Props` (`FortificationObjects`, `TechStructuresObjects`, `MiscellaneousObjects`) is a list of objects:

```lua
{ name = "Hesco Wall", cost = 150, model = "prop_mb_sandblock_03", distance = 1.8, time = 10, zoffset = 0, RotationOffset = 90 },
```

| Field            | Description                                     |
| ---------------- | ----------------------------------------------- |
| `name`           | Label in the menu.                              |
| `cost`           | Materials needed to build.                      |
| `model`          | Prop model name.                                |
| `distance`       | How far in front of the player the prop spawns. |
| `time`           | Build time in seconds.                          |
| `zoffset`        | Z-axis offset of the object.                    |
| `RotationOffset` | Rotation offset of the object.                  |

{% hint style="info" %}
You can add any prop that's streamed on your server. Adjust `zoffset` and `RotationOffset` until it sits correctly on the ground.
{% endhint %}

## Interface & notifications

`Config.Interface` holds all menu labels and descriptions. `AceNotifictions` holds all notification messages. Edit them to translate or reword the text. The `MaxPlayerCarry` message automatically includes `PlayerMaxBuildingMaterial`.
