> For the complete documentation index, see [llms.txt](https://code-after-sex.gitbook.io/script-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://code-after-sex.gitbook.io/script-documentation/cas-advanced-gang/configuration/structures.md).

# Structures

Configure camp structures in CAS Advanced Gang System: what each flag does, prop models and the default structure set.

`Config.Structures` lists everything a gang can set down in camp.

{% code title="config.lua" %}

```lua
{ id = 'supply_wagon', name = 'Supply Wagon', tier = 2, limit = 1, icon = 'kit_upgrade_camp_wagon.png',
  model = 'p_chuckwagon01x', desc = 'Holds the shared stash. Capacity scales with tier.', isStash = true },
```

{% endcode %}

| Field       | Meaning                                                                                                                                            |
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`        | Stored with every placed structure. Used by `Config.FoundingOrder`.                                                                                |
| `name`      | Shown in the placing tool, on the Camp tab and in the record.                                                                                      |
| `tier`      | The camp tier that unlocks it.                                                                                                                     |
| `limit`     | How many a camp may have.                                                                                                                          |
| `icon`      | A PNG in the interface's item icon folder. See [Customising the interface](/script-documentation/cas-advanced-gang/developers/interface.md#icons). |
| `model`     | The RDR3 prop that is spawned.                                                                                                                     |
| `desc`      | One line shown on the Camp tab, in the structure's sheet and in the gang creator.                                                                  |
| `isLedger`  | Carries the ledger prompt. One structure should have it.                                                                                           |
| `isStash`   | The stash lives here. One structure should have it. With none standing, the stash is closed.                                                       |
| `isLookout` | Warns the gang of riders within `Config.Lookout.range` of it.                                                                                      |
| `isAlarm`   | Rings for the whole gang when a rider holds its prompt. One structure should have it.                                                              |

## What the flags do

| Flag        | Default structure | See                                                                                                  |
| ----------- | ----------------- | ---------------------------------------------------------------------------------------------------- |
| `isLedger`  | Ledger Table      | [The camp ledger](/script-documentation/cas-advanced-gang/playing/the-ledger.md)                     |
| `isStash`   | Supply Wagon      | [The shared stash](/script-documentation/cas-advanced-gang/playing/stash.md)                         |
| `isLookout` | Lookout Post      | [Lookout settings](/script-documentation/cas-advanced-gang/configuration/territory.md#lookout-post)  |
| `isAlarm`   | Alarm Bell        | [Alarm bell settings](/script-documentation/cas-advanced-gang/configuration/territory.md#alarm-bell) |

Every structure counts toward the `structures` challenge. Structures without a flag are props that build out the camp.

{% hint style="info" %}
Keep `desc` lines true to what the structure does. If you connect your own systems to a structure through the [exports](/script-documentation/cas-advanced-gang/developers/exports.md), say so in its line. If you don't, describe how it looks, so players aren't promised a feature that isn't there.
{% endhint %}

## Models

Every `model` must be a prop that exists in RDR3. When the client starts, it checks every model and prints any that doesn't exist:

```
[cas-advanced-gang] Config.Structures "lookout" uses model "p_crate06x", which does not exist in RDR3
```

The placing tool refuses a structure whose model is missing rather than showing an invisible ghost. Props from the game's camp set (`p_...`) are the safest choice. Some map props (`s_...`, `mp005_s_...`) exist but won't spawn as objects.

## The default set

| Tier | Structures (limit)                                                                   |
| ---- | ------------------------------------------------------------------------------------ |
| I    | Campfire (2), Leader's Tent (1), Ledger Table (1)                                    |
| II   | Sleeping Tent (6), Supply Wagon (1), Lookout Post (2), Hitching Post (4)             |
| III  | Medical Tent (1), Crafting Bench (1), Palisade and Barricades (8), Camp Lanterns (6) |
| IV   | Armoury Rack (2), Moonshine Still (1), Drying Rack (2), Horse Corral (4)             |
| V    | Gang Strongbox (1), Blacksmith's Forge (1), Powder Store (3), Alarm Bell (1)         |
