> 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-owned-shops/configuration.md).

# Configuration

Every CAS Owned Shops option in config/shared\_config.lua: framework, admins, categories, blips, logo, peds, Discord logs and languages.

All settings are in `config/shared_config.lua`. Restart the resource after you change something.

## General

| Option                       | Default                                                           | What it does                                                                                                                    |
| ---------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `Config.Framework`           | `"auto"`                                                          | Finds VORP Core on start. `"vorp"` forces it.                                                                                   |
| `Config.DevMode`             | `false`                                                           | Development mode: prints debug lines and moves you to the general store when the resource starts. Keep it off on a live server. |
| `Config.Commands`            | see [Commands](/script-documentation/cas-owned-shops/commands.md) | Command names.                                                                                                                  |
| `Config.WhoCanCreateStore`   | `{}`                                                              | Steam hex identifiers (`steam:...`) allowed to use `/createstore` and `/removestore`.                                           |
| `Config.DefaultPed`          | `"MSP_GANG2_MALES_01"`                                            | Shopkeeper model used when `/createstore` gets a model that does not exist.                                                     |
| `Config.EnableOwnedShopPeds` | `true`                                                            | Spawns shopkeepers at player-owned shops.                                                                                       |
| `Config.DefaultLogo`         | image URL                                                         | Logo that a new player-owned shop starts with.                                                                                  |
| `Config.Imagepath`           | `nui://vorp_inventory/html/img/items`                             | Folder for item pictures. Replace it with your own `nui://` path to use another folder.                                         |
| `Config.PlayerOwnedShops`    | `{}`                                                              | Filled from the database at runtime. Don't edit it.                                                                             |

## Categories

```lua
Config.ItemCategories = {
    { id = "weapons", label = "Weapons", color = "#FF6B6B" },
    { id = "consumables", label = "Food & Drinks", color = "#4ECDC4" },
    { id = "tools", label = "Tools", color = "#45B7D1" },
    { id = "materials", label = "Materials", color = "#96CEB4" },
    { id = "clothing", label = "Clothing", color = "#FFEAA7" },
    { id = "misc", label = "Miscellaneous", color = "#DDA0DD" }
}
Config.DefaultCategory = "misc"
```

Each category has an `id` (used by items and listings), a `label` shown in the filter and a `color`. Items without a category go into `Config.DefaultCategory`.

## Blips for player-owned shops

```lua
Config.DefaultBlipsForOwnedShops = {
    blipSprite = "blip_shop_market_stall",
}
```

`blipSprite` is the icon used for every player-owned shop. These blips are drawn at a fixed small size, and the blip name follows the shop's name.

## NPC general stores

`Config.DefaultShops` holds the fixed stores. See [NPC General Stores](/script-documentation/cas-owned-shops/general-stores.md) for every field.

## Discord logs

Set `Config.DiscordWebhook` to a Discord webhook URL to log shop activity. Each log includes the character's name, their Discord id and the shop id:

* A shop is created or removed.
* An item is listed or taken off sale.
* A purchase is made in a player-owned shop.
* Money is withdrawn from a cash box.
* A co-owner is added.

Leave it as `""` to turn the logs off.

## Languages

`config/locale.lua` has English, French, Spanish, Italian, German and Portuguese.

* `Locale = 'en'` at the top of the file sets the language of the notifications and prompts.
* The shop screen follows each player's game language when it is one of the six, and uses English otherwise.

To translate the script, copy the `["en"]` block, give it a new language code and translate the values.
