> For the complete documentation index, see [llms.txt](https://dxs-scripts.gitbook.io/home/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dxs-scripts.gitbook.io/home/documentation/redm/dxs-crafting-book.md).

# DXS Crafting Book

<figure><img src="/files/yRLylbCtUSXbhZnctFQz" alt=""><figcaption></figcaption></figure>

### Installation & Setup

#### 1. Add the resource

Place the `DXS_crafting` folder into your server's `resources` directory.

#### 2. Add to server.cfg

```
ensure DXS_crafting
```

Make sure it starts **after** its dependencies:

```
ensure vorp_core
ensure vorp_inventory
ensure vorp_progressbar
ensure DXS_crafting
```

#### 3. Import the database table

Run the contents of `sql.sql` in your database. This creates the tables required for XP, levels, and crafting stats.

#### 4. Add crafting book items to your inventory

Register the item names used in `Config.Categories[x].item` inside your VORP inventory items list. The default item used in the example config is `crafting_book`. You can use separate items per category (e.g. `SmeltingBook`, `GunBook`) — each one will open only the categories assigned to it.

#### 5. Configure the script

Open `config.lua` and adjust the following to your needs:

* **`Config.quantityButton`** — show or hide the quantity selector in the UI
* **`Config.quantityTimeIncrease`** — scale crafting time by selected quantity
* **`Config.CraftingLocationsEnabled`** — restrict book usage to defined zones
* **`Config.CraftingLocations`** — define zone coordinates, radius, and blip settings
* **`Config.Animations`** — set default, per-category, or per-recipe crafting animations
* **`Config.CraftingProgress`** — configure XP per level, max level, and default XP per craft
* **`Config.IconBasePath`** — path to item icons used in ingredient badges
* **`Config.Categories`** — define all categories and their recipes (see inline comments for all fields)

#### 6. Job restrictions (optional)

Set `job = 'jobname'` on a category or recipe to restrict access. Use a table for multiple jobs:

```lua
job = { 'blacksmith', 'engineer' }
```

Leave as `job = ''` or omit entirely to allow all players.

#### 7. Verify in-game

Start your server, give yourself the crafting book item, and use it. The recipe book UI should open. Check the server console for any errors — enable `Config.Debug = true` for detailed output during testing.
