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

# Work stations

CAS Crafting work stations: the Blacksmith's Forge, the Camp Kitchen and the Tobacco Table, their places, points and what each one makes.

Besides the campfire and the satchel, CAS Crafting has work stations. These are places in the world with their own tools and their own work, and each one makes its own things. Walk up to one, hold **Work**, and the crafting menu opens with that station's groups only. Its kicker names the place ("Valentine \~ Blacksmith") and its title names the station.

| Station            | Where by default                                                                                                                                    | Makes                                                                                                  |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| Blacksmith's Forge | the smithies of Valentine and MacFarlane's Ranch, the forge in the yard of Fort Wallace (an anvil on a stump, a grindstone and a tub set beside it) | knives, hatchets, cleaver, machete, hammer, tomahawks, throwing knives, bolas, horseshoes, gold ingots |
| Camp Kitchen       | the yard behind the Valentine Smithing & Farrier (a camp table and a cooking fire with its pot)                                                     | the 19 camp stews                                                                                      |
| Tobacco Table      | the same yard (a round table and a chair)                                                                                                           | cigarettes                                                                                             |

Remedies and horse remedies are made at the campfire, as in the game: the herbs are ground in a mortar first, then brewed over the fire. Cartridges are made from the satchel. The forge's knife grips take `leather`, which comes from your server's own tanning or shops.

The server checks every craft:

* the player stands within the station's radius;
* the recipe is one the station makes;
* the ingredients and the time.

The player walks from tool to tool himself; a marker on the screen shows the next tool, the step and how far it is. The menu closes when the work is done; the station's prompt opens it again. Walking 15 m past the station's radius, or holding Cancel Chore, stops the work. The materials of the piece in hand and of the pieces not yet begun go back to the satchel (`Config.Crafting.refund`), also when the resource is restarted in the middle of the work.

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

`Config.Stations` lists the places. Add your own the same way:

```lua
{ id = 'camp_kitchen', type = 'kitchen', label = 'Camp Kitchen', town = 'Big Valley', at = vector3(x, y, z), radius = 3.0,
  points = { prep = vector4(x, y, z, heading), pot = vector4(x, y, z, heading), potTop = vector3(x, y, z), cut = vector4(x, y, z, heading) },
  props = { { model = 'p_table05x', at = vector4(x, y, z, heading) } } },
```

| Field           |                                                                                                                                      |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `id`            | a unique name                                                                                                                        |
| `type`          | `forge`, `kitchen` or `table`                                                                                                        |
| `label`, `town` | shown in the menu's kicker                                                                                                           |
| `at`, `radius`  | the middle of the place and how far from it a player may work, in metres                                                             |
| `points`        | where the work happens (see below)                                                                                                   |
| `props`         | Rockstar props set down where the map has none: `{ model, at = vector4 }`, set on the ground (`exact = true` keeps the height given) |
| `hide`          | map props hidden while the place is loaded, such as a loose chair a clip would knock over: `{ { model, at = vector3, radius } }`     |
| `enabled`       | `false` switches the place off                                                                                                       |

The points, each a `vector4` on the floor with the heading the player faces:

| Type    | Points                                                                                                                                                                                                                                                                                   |
| ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| forge   | `fire` (at the hearth), `hearth` (the fire effect), `anvil` (its heading turns the smith), `anvilTop` (the anvil's face; the smith stands where the strike clips bring the hammer down on it), `anvilHeading`, `quench`, `water`, `grind` (by the grindstone), `grindModel`, `grindTurn` |
| table   | `seat`: the floor under the chair, turned the way the sitter faces; `seatOut` (optional): where he comes and goes when the space in front of the chair is taken                                                                                                                          |
| kitchen | `prep`: in front of the table; `pot`: beside the cooking fire, a step clear of the flames                                                                                                                                                                                                |

Every default place was lined up with its clips in game.

`Config.StationTypes` holds, for each type:

* its name and its groups (the menu's tabs);
* its prompt;
* `femaleOk`: whether the work clips have a female version. A woman plays Rockstar's female sets where they suit the place (the kitchen's chopping, the tobacco table); elsewhere she plays the male sets, which Rockstar never made in a female version (the forge). Every station was checked with a woman in game.

## What the forge makes

The amounts are CAS's: Rockstar has no blacksmith crafting. The ingredients are the game's own items. To change an amount, edit the recipe in `config/catalog.lua` (the recipes with `station = "forge"`, `"kitchen"` or `"table"`).

| Group  | Result                                           | Takes                               | Time |
| ------ | ------------------------------------------------ | ----------------------------------- | ---- |
| Blades | Hunting Knife                                    | Scrap Metal x2, Coal x1, Leather x1 | 25 s |
| Blades | Wide-Blade Knife, Civil War Knife, Bagshot Knife | Scrap Metal x3, Coal x1, Leather x1 | 25 s |
| Blades | Jawbone Knife                                    | Scrap Metal x2, Coal x1, Leather x2 | 25 s |
| Blades | Lance Knife                                      | Scrap Metal x3, Coal x2, Leather x1 | 25 s |
| Blades | Ornate Dagger                                    | Scrap Metal x4, Coal x2, Leather x1 | 25 s |
| Blades | Cleaver                                          | Scrap Metal x3, Coal x1, Leather x1 | 25 s |
| Blades | Machete                                          | Scrap Metal x4, Coal x2, Leather x1 | 25 s |
| Tools  | Hatchet                                          | Scrap Metal x3, Coal x1             | 18 s |
| Tools  | Hunter Hatchet                                   | Scrap Metal x4, Coal x1, Leather x1 | 18 s |
| Tools  | Double Bit Hatchet, Hewing Hatchet               | Scrap Metal x5, Coal x2             | 18 s |
| Tools  | Hammer                                           | Scrap Metal x2, Coal x1             | 18 s |
| Tools  | Horseshoe x4                                     | Scrap Metal x1, Coal x1             | 18 s |
| Thrown | Tomahawk x1                                      | Scrap Metal x2, Coal x1             | 18 s |
| Thrown | Throwing Knife x4                                | Scrap Metal x2, Coal x1             | 18 s |
| Thrown | Gravesend Bolas x1                               | Scrap Metal x2, Leather x1          | 18 s |
| Metal  | Gold Ingot                                       | Gold Nugget x10, Coal x1            | 15 s |

**The work at the forge:**

* Blades are heated, struck at the anvil, quenched and ground at the grindstone.
* Tools and thrown weapons are heated, struck and quenched.
* At the anvil the smith hammers steadily on his spot; the sparks fly with every strike. The time above is the work's.

**Off by default**, switch them on in `Config.Crafting.enabled`:

* the Antler Knife;
* restoring a Rusted Double Bit or Rusted Hunter Hatchet (the rusted hatchet and Coal x1).

Vanilla VORP's weapon list has none of these.

## The other stations

| Station       | Result            | Takes                   | Time |
| ------------- | ----------------- | ----------------------- | ---- |
| Camp Kitchen  | the 19 camp stews | the game's stew recipes | 20 s |
| Tobacco Table | Cigarettes        | Indian Tobacco x2       | 8 s  |

## Weapons

The forge's knives, hatchets, cleaver, machete and hammer are weapons, not items. Each framework gives them its own way:

* **VORP:** `createWeapon`, so they appear in the weapon list of the inventory.
* **RSG:** the weapon items of rsg-core (`weapon_melee_knife`), with rsg-inventory giving each one its serial number. A weapon your rsg-core does not list cannot be made ("This server has no such weapon.").

Tomahawks, throwing knives and bolas are rounds: on the gunbelt with VORP, as items with RSG.
