> For the complete documentation index, see [llms.txt](https://cactus-code.gitbook.io/cactus-code-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cactus-code.gitbook.io/cactus-code-docs/documentation/scripts/cactus-poster-creator/configuration.md).

# Configuration

## Configuration

Configure the resource in `shared/config.lua`.

### General settings

| Key                             |    Type | Default | Description                                 |
| ------------------------------- | ------: | ------: | ------------------------------------------- |
| `Config.Debug`                  | boolean | `false` | Enables detailed client and server logs.    |
| `Config.Locale`                 |  string |  `'en'` | Global language: `'en'`, `'fr'`, or `'es'`. |
| `Config.Framework`              |  string | `'RSG'` | Framework: `'RSG'` or `'standalone'`.       |
| `Config.StreamDistance`         |  number |  `28.0` | Prop streaming distance.                    |
| `Config.BoardPlacementDistance` |  number |   `3.0` | Nearby board-selection distance.            |
| `Config.BoardPlacementRadius`   |  number |  `4.75` | Server-validated placement radius.          |
| `Config.MaxPostersPerBoard`     |  number |     `6` | Total poster limit per board.               |
| `Config.MaxTitleLength`         |  number |    `64` | Maximum short-title length.                 |
| `Config.MaxBodyLength`          |  number |   `420` | Maximum body-text length.                   |

#### Standalone mode

```lua
Config.Framework = 'standalone'
```

Props, the creator, MySQL, prompts, and exports remain available. Jobs, item access, and RSG copies are unavailable. Use `AllowEveryone` or ACE for management.

### Languages

Select one global language:

```lua
Config.Locale = 'fr' -- 'en', 'fr', or 'es'
```

Translations are stored in `shared/locales.lua`.

| Value | Language |
| ----- | -------- |
| `en`  | English  |
| `fr`  | French   |
| `es`  | Spanish  |

Players cannot select a language. Configure it once for the resource.

### Creator access

```lua
Config.CreatorAccess = {
    Mode = 'both', -- 'command', 'item', or 'both'
    Command = 'postercreator',
    Item = {
        Enabled = true,
        Name = 'white_paper',
        ConsumeOnUse = false,
        AutoRegisterRSGItem = true,
    },
    Preview = {
        RaycastDistance = 6.0,
        SurfaceOffset = 0.018,
        FallbackDistance = 1.25,
    },
}
```

| Mode      | Command | Item |
| --------- | :-----: | :--: |
| `command` |   Yes   |  No  |
| `item`    |    No   |  Yes |
| `both`    |   Yes   |  Yes |

`RaycastDistance` controls camera range. `SurfaceOffset` prevents clipping. `FallbackDistance` defines the fallback position.

### Permissions, jobs, and grades

Creation, updates, and removals use `Config.Permissions.Management`.

```lua
Config.Permissions = {
    Management = {
        AllowEveryone = false,
        Ace = {
            Enabled = true,
            Name = 'cactus_poster_creator.use',
        },
        JobTypes = { leo = 0 },
        Jobs = {
            sheriff = 0,
            police = 0,
        },
    },
}
```

The value is the minimum RSG grade:

* `sheriff = 0` allows every sheriff grade.
* `sheriff = 2` allows grade 2 and above.
* `leo = 1` allows every `leo` job from grade 1.

Checks run in this order: `AllowEveryone`, ACE, exact `Jobs` name, `JobTypes`, then minimum grade. An exact job name takes priority over its job type.

{% hint style="info" %}
The server validates sensitive actions again. Hidden target options are not the primary security layer.
{% endhint %}

### Interactions and actions

```lua
Config.Interaction = {
    System = 'ox_target',
    Distance = 2.6,
    RenderDistance = 5.0,
    TargetRadius = 0.26,
    ServerValidationDistance = 4.0,
}
```

| Value            | Description                    |
| ---------------- | ------------------------------ |
| `ox_target`      | Actions directly on the prop.  |
| `pc_interaction` | Uses the `pc_interaction` API. |
| `prompt`         | Native RedM prompts.           |

If the selected dependency is not running, native prompts act as a fallback.

```lua
Config.Interaction.Actions = {
    Inspect = { Enabled = true, Icon = 'fas fa-file-lines', PromptControl = 0xCEFD9220, Hold = false },
    Copy = { Enabled = true, AuthorizedOnly = false, Icon = 'fas fa-copy', PromptControl = 0x760A9C6F, Hold = false },
    Remove = { Enabled = true, AuthorizedOnly = true, Icon = 'fas fa-hand', PromptControl = 0xCEE12B50, Hold = true },
}
```

* **Inspect** uses a local clone. The original stays on the wall.
* **Copy** adds a unique, read-only inventory copy.
* **Remove** sets `status = 'removed'` for every client.

### Boards and placement

```lua
Config.Boards = {
    valentine_sheriff = {
        Label = 'Valentine Sheriff Office',
        Model = 'mp005_p_mp_bountyboard01x',
        Coords = vector3(-270.07, 807.20, 119.36),
        Rotation = vector3(0.0, 0.0, 100.0),
        Spawn = true,
        PlacementOffset = 0.004,
    },
}
```

Add every new model to `Config.ValidBoardModels`.

RDR2 provides `Poster0..2` for standard posters. It provides `legendaryPoster0..2` for legendary posters. Each board supports six posters total.

```lua
Config.Placement = {
    RotationStep = 1.5,
    FineRotationStep = 0.25,
    Animation = {
        Enabled = true,
        Mode = 'scenario',
        Scenario = 'WORLD_HUMAN_HAMMER_WALL',
        Duration = 4500,
        TurnDuration = 450,
        FreezePlayer = true,
        DisableControls = true,
    },
}
```

The native scenario already provides the hammer. Use `Mode = 'animation'` for a custom animation.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://cactus-code.gitbook.io/cactus-code-docs/documentation/scripts/cactus-poster-creator/configuration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
