> For the complete documentation index, see [llms.txt](https://atiysus-organization.gitbook.io/aty-scripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://atiysus-organization.gitbook.io/aty-scripts/weapon-editor/getting-started/configuration.md).

# Configuration

## Configuration

Two files. `shared/config.lua` is sent to clients; `server/config.lua` never is.

Both stay editable on the escrow build — they are on the escrow ignore list, along with `locales/`, the compiled UI and `sql/`.

{% hint style="info" %}
There is no framework or inventory key anywhere in the config. `aty_lib` detects both automatically.
{% endhint %}

### General

```lua
Config.Debug    = false
Config.Language = 'en'
```

| Key        | Default | Description                                             |
| ---------- | ------- | ------------------------------------------------------- |
| `Debug`    | `false` | Verbose console output from every module                |
| `Language` | `'en'`  | A file in `locales/`. Missing keys fall back to English |

`en` and `tr` ship. To add a language, copy `locales/en.lua`, translate the values, and load it in `fxmanifest.lua` alongside the others.

### Access and workbenches

Covered in full on Permissions and Workbenches.

### Publishing lanes

`Config.Lanes` decides who sees a skin, and it is the part worth understanding.

| Lane        | Default | What it does                                                   |
| ----------- | ------- | -------------------------------------------------------------- |
| `composite` | on      | The Skin Studio itself — patterns, decals, text, brush, images |
| `prop`      | on      | Full-body skin sync for ten weapons                            |
| `camo`      | on      | Sync through the game's own Mk II camo slots                   |
| `live`      | on      | Push an image URL straight onto a weapon, visible only to you  |
| `baked`     | on      | Send a design through moderation to be baked into a YTD        |

Each can be switched off independently. The mechanics are on Who sees your skin; changing which weapons a lane covers is on Adding weapons.

#### Image hosts

```lua
Config.Lanes.composite.images = {
    enabled        = true,
    allowRemoteUrl = true,
    whitelist      = { 'i.imgur.com', 'cdn.discordapp.com', 'media.tenor.com', ... },
    artResource    = 'aty_gunsmith_assets',
    allowGif       = true,
}
```

| Key              | Meaning                                                                                   |
| ---------------- | ----------------------------------------------------------------------------------------- |
| `allowRemoteUrl` | `false` disables remote images entirely                                                   |
| `whitelist`      | Exact host match, https only. **An empty list blocks everything** — it is not "allow all" |
| `artResource`    | Local art pool, read as `nui://` — no network, no allow-list. `false` hides the gallery   |
| `allowGif`       | `false` draws the first frame and nothing animates                                        |

{% hint style="warning" %}
The image gate is separate from the `live` lane's URL rules on purpose. A design is a definition every client redraws, so a hostile URL reaches everyone who sees the weapon, not just its author. Treat this list as a security setting.
{% endhint %}

Adding your own artwork to the local pool needs no code change — drop the file into `aty_gunsmith_assets/art/patterns/` or `art/decals/` and add one line to `art/index.json`.

### Skin sync

```lua
Config.Sync = {
    enabled    = true,
    radius     = 25.0,
    interval   = 700,
    maxModels  = 12,
    hysteresis = 0.8,
    conflict   = 'mine',
}
```

Explained field by field on Who sees your skin.

### Moderation

```lua
Config.Moderation = { enabled = false }
```

Off by default. Moderation only pays for itself on a server that actually has someone reviewing the queue — with nobody reviewing, every design a player makes sits in `pending` forever and simply never appears in game, which reads as "the feature is broken" rather than "it is awaiting review".

See Moderation.

### Balance

```lua
Config.Balance = {
    liveApply       = true,
    deployCountdown = 10,
    applyMode       = 'safe',
    autoRollback    = true,
    metaEmitFields  = true,
    lint = { ttkFloorMs = 220, ttkClassBand = 0.35 },
}
```

`applyMode` is the one to read before you change anything — see Balance lab.

### Server authority

```lua
Config.Authority = {
    enabled         = true,
    tolerance       = 5.0,
    flagStreak      = 4,
    action          = 'correct',
    ignoreResources = {},
}
```

An anti-cheat clamp on claimed damage, not a balance tool.

| `action`  | Behaviour                                                           |
| --------- | ------------------------------------------------------------------- |
| `flag`    | Record it and fire a webhook after `flagStreak`                     |
| `correct` | Claw back over-claimed damage by returning the excess to the victim |
| `kick`    | Remove the player                                                   |

{% hint style="warning" %}
`correct` can only reduce damage, never increase it. Setting a limb multiplier above 1.0 and expecting limb shots to hurt more will do nothing — the damage the game deals is already below expected, so there is no excess to claw back. Multipliers only take effect downward through this path. For balance, use the instant fields in the lab.
{% endhint %}

`ignoreResources` lists resources that legitimately override damage — a PvP arena script, for example — so their hits are not flagged.

### Rate limits and performance

```lua
Config.RateLimit = { skinsPerMinute = 6, deploysPerHour = 3 }

Config.Perf = {
    editorTickMs     = 50,
    statebagDebounce = 150,
    skinCacheSize    = 200,
    previewLodDist   = 25.0,
}
```

### Showcase

An admin-gated scene for cover art and screenshots: your skinned weapons float on an arc, the background blurs, the interface hides. It changes nothing on the server — the props and the camera are local, and leaving restores everything.

```lua
Config.Showcase = { enabled = true, command = 'gunsmithshowcase', scope = 'lab', ... }
```

It is admin-gated because it spawns props. Left open, it becomes a way to litter the world.

### Server-only

`server/config.lua` carries the Discord webhooks and the hooks:

```lua
Config.Webhooks = { deploy = '', moderation = '', damageFlag = '' }
```

The hook table is documented on Permissions.
