# 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dxs-scripts.gitbook.io/home/documentation/redm/dxs-crafting-book.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
