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

# Configuration

The CAS Crafting config reference: general settings, languages, the campfire, crafting, pamphlets, ammunition, using what you make and the tobacco table.

Everything you can switch is in `config/config.lua`. The recipes themselves are in `config/catalog.lua`: the game's own ingredients, amounts, results, pamphlets and stacks. Leave that file as it is unless you really want to leave the game's balance; switch single recipes off in `config.lua` instead.

## General

| Setting                   | Default   |                                                                                                                                                                                  |
| ------------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Config.Framework`        | `'auto'`  | `'auto'`, `'vorp'` or `'rsg'`                                                                                                                                                    |
| `Config.Locale`           | `'en'`    | the language: `'en'` English, `'de'` German, `'fr'` French, `'es'` Spanish, `'pt-BR'` Brazilian Portuguese (files in `locales/`). A line missing in a language shows in English. |
| `Config.RSGRegisterItems` | `true`    | RSG: add the script's items to rsg-core at start                                                                                                                                 |
| `Config.Command`          | `'craft'` | the satchel crafting command                                                                                                                                                     |
| `Config.KeyMapping`       | J         | the key for the command (players can change it in their key settings)                                                                                                            |
| `Config.SatchelTool`      | `nil`     | an item the player must carry to craft from the satchel (the game uses its Crafting Tools)                                                                                       |

The prompts use the game's own controls (Rest by fire, Craft/Cook, Put out fire, Craft Faster, Eat, Stow), so each player sees the key he bound.

## The campfire (`Config.Campfire`)

| Setting                                      | Default      |                                                          |
| -------------------------------------------- | ------------ | -------------------------------------------------------- |
| `item`                                       | `'kit_camp'` | the item that makes a fire (the game's camp kit)         |
| `consume`                                    | `false`      | `true`: the kit is used up by each fire                  |
| `minutes`                                    | `20`         | how long a fire burns                                    |
| `perPlayer`                                  | `1`          | fires one player can have; a new one replaces the oldest |
| `useRadius`                                  | `2.6`        | how close to a fire you cook and craft                   |
| `blockTowns`, `blockInteriors`, `blockWater` | `true`       | the game's places where you cannot make camp             |
| `putOutBy`                                   | `'owner'`    | `'owner'` or `'anyone'`                                  |

`Config.WorldFires.enabled` (`true`): the game's camp fires and fireplaces count as fires. The server cannot see map props, so it checks that the player stands where his client says the fire is. Switch it off if only player fires should count.

## Work stations (`config/stations.lua`)

The forge, the camp kitchen and the tobacco table live in their own file: `Config.StationTypes` (what each kind is) and `Config.Stations` (the places). See [Work stations](/script-documentation/cas-crafting/stations.md).

## Crafting (`Config.Crafting`)

| Setting       | Default      |                                                                                                                                                 |
| ------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| `maxQuantity` | `10`         | the most a player can make in one go                                                                                                            |
| `timeScale`   | `1.0`        | every craft and cook time times this (the game: 10 s at the fire, 7 s / 6 s with Craft Faster)                                                  |
| `refund`      | `'rockstar'` | a craft cut short: from the satchel and at a work station nothing is lost, at the fire the pot is lost (like the game); `'always'` or `'never'` |
| `stackLimits` | `true`       | refuse a craft that would go over the game's satchel stack                                                                                      |
| `disabled`    | `{}`         | recipe ids to switch off, e.g. `{ 'ammo_arrow_dynamite' }`                                                                                      |
| `enabled`     | `{}`         | Online-only recipes that ship off, to switch on (see below)                                                                                     |

Off by default, because most inventories cannot carry or use them: the Online confusion, disorient, drain, trail, wound and tracking arrows and throwing knives, the antidotes and the animal reviver; at the forge the Antler Knife and the two rusted hatchet restores (vanilla VORP has none of those weapons). The camp stews are on, at the camp kitchen.

## Pamphlets (`Config.Pamphlets`)

| Setting    | Default |                                                                                |
| ---------- | ------- | ------------------------------------------------------------------------------ |
| `consume`  | `false` | `false`: the pamphlet stays after reading (the game keeps it); `true`: used up |
| `allKnown` | `false` | every recipe is known from the start                                           |

The script does not sell pamphlets. Put the `document_pamphlet_*` items in your shops; the list with Rockstar's story prices is in [Pamphlets](/script-documentation/cas-crafting/pamphlets.md).

## Ammunition (`Config.Ammo`)

| Setting | Default  |                                                                                                                                                                                                                  |
| ------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `mode`  | `'auto'` | VORP: rounds on the gunbelt; RSG: rounds as items. Or `'belt'` / `'items'`                                                                                                                                       |
| `items` | `{}`     | `'items'` mode: the item for each ammo type, e.g. `{ AMMO_PISTOL = 'ammo_pistol' }`. On RSG the thrown weapons and arrows already map to rsg-core's own items (`weapon_thrown_tomahawk`, `ammo_arrow_small` ...) |

RSG keeps cartridges only in boxes (rsg-ammo: a box refills 12 rounds), so a single crafted cartridge has no item there and those recipes stay off unless `items` names one.

## What your server has

At start the script checks every name its recipes use against your inventory: the items table (VORP) or the shared items (RSG), the weapon list, and the gunbelt's ammo types (VORP's `config/weapons.lua` and `config/ammo.lua`).

* A recipe whose result or pamphlet your server lacks is switched off; so is one left without a choice of ingredients it can take. A missing by-product is left out.
* The console names what is missing and which recipes went, e.g. on VORP's default ammo list: `not in this server's inventory: AMMO_TOMAHAWK_HOMING ... Switched off: ammo_tomahawk_homing ...`. Add the item (or the ammo type) to your inventory and restart the script to bring the recipe back.
* The menu shows your inventory's own names for items, weapons and rounds.

## Using what you make (`Config.Use`)

| Setting              | Default    |                                                                                                                                                                                                                                                                           |
| -------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `mode`               | `'auto'`   | the script makes its results usable with the game's animations and effects; `'off'` if another script does                                                                                                                                                                |
| `skip`               | cigarettes | items another script makes usable (cigarettes are left to your smoking script)                                                                                                                                                                                            |
| `skipWithMetabolism` | coffee     | left to CAS Metabolism v2 while it runs (it also gets the hunger of every meal)                                                                                                                                                                                           |
| `horseRadius`        | `4.0`      | how close your horse is for horse items (riding it always works)                                                                                                                                                                                                          |
| `deadEye`            | `'auto'`   | whether players have Dead Eye: `'auto'` reads VORP's `vorp_core` `Config.ActiveDeadEye` (off by default) and takes the game's own on RSG (on); or `true` / `false`. Off: the menu shows no Dead Eye effect or word of it, and the snake oils (Dead Eye only) are left out |

The menu shows what using a result really does on your server:

* the results this script makes usable: the game's effects it applies (cores, fortify, gold cores, horse), and the hunger a meal gives CAS Metabolism v2 when it runs;
* the results CAS Metabolism v2 handles (coffee, its cigarette): its own numbers, read from its config files (`config/items_vorp.lua` / `items_rsg.lua`, `Config.Smoking`), with your inventory's description;
* a result no script here makes usable: no effects.

When CAS Metabolism v2 starts or stops while this script runs, the items are checked again and every player's menu is sent again.

## The tobacco table (`Config.Tobacco`)

| Setting | Default  |                                                                                                                                                                                                                                |
| ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `item`  | `'auto'` | what one rolled cigarette is: `'auto'` gives CAS Metabolism v2's smokable `cigarette` (lit with its lighter or matches) when it runs and the item exists, else the game's box of cigarettes; or name an item of your inventory |
