# Crafting Queue Settings

***

## 🔧 Configuration Options

All queue settings are located in `shared/config.lua` under the **CRAFTING QUEUE SETTINGS** section.

```lua
-- ════════════════════════════════════════════════════════════════════════════════════
--  CRAFTING QUEUE SETTINGS
-- ════════════════════════════════════════════════════════════════════════════════════

Config.CraftingQueue = {
    maxDistance = 5.0,
    checkInterval = 1000,
    warningTime = 15,
}
```

***

## 📝 Setting Descriptions

### Maximum Distance

```lua
maxDistance = 5.0
```

**Purpose**: Define how far (in meters) a player can move from the crafting station before receiving a warning.

**Type**: Number (decimal)

**Unit**: Meters

**Range**: Recommended `5.0` - `10.0`

**How it works**:

* Script continuously monitors player's distance from active crafting station
* When distance exceeds this value, warning system activates
* Player has `warningTime` seconds to return
* If player doesn't return in time, crafting is cancelled

**Examples**:

| Value  | Description               | Use Case                                  |
| ------ | ------------------------- | ----------------------------------------- |
| `3.0`  | Very strict (3m radius)   | Hardcore RP, realistic crafting           |
| `5.0`  | Balanced (5m radius)      | **Default, recommended for most servers** |
| `7.0`  | Relaxed (7m radius)       | Casual servers, more freedom              |
| `10.0` | Very relaxed (10m radius) | Public servers, lenient rules             |

***

### Check Interval

```lua
checkInterval = 1000
```

**Purpose**: How often (in milliseconds) the script checks if the player has moved too far.

**Type**: Number (integer)

**Unit**: Milliseconds (1000ms = 1 second)

**Range**: Recommended `700` - `1000`

**How it works**:

* Script runs a distance check every X milliseconds
* Lower value = more frequent checks = more responsive
* Higher value = less frequent checks = better performance

***

### Warning Time

```lua
warningTime = 15
```

**Purpose**: How long (in seconds) the player has to return to the crafting station after moving too far.

**Type**: Number (integer)

**Unit**: Seconds

**Range**: Recommended `10` - `30`

{% stepper %}
{% step %}

### How the warning works — Step 1

Player moves beyond `maxDistance`.
{% endstep %}

{% step %}

### Step 2

Warning notification appears: "Return to crafting station! (15s)"
{% endstep %}

{% step %}

### Step 3

Countdown starts.
{% endstep %}

{% step %}

### Step 4

If player returns within time, crafting continues.
{% endstep %}

{% step %}

### Step 5

If time expires, crafting is cancelled and resources are lost.
{% endstep %}
{% endstepper %}

**Examples**:

| Value | Description               | Use Case                            |
| ----- | ------------------------- | ----------------------------------- |
| `5`   | Very strict (5 seconds)   | Hardcore servers, no second chances |
| `10`  | Strict (10 seconds)       | Realistic RP, quick return needed   |
| `15`  | Balanced (15 seconds)     | **Default, fair warning**           |
| `20`  | Relaxed (20 seconds)      | Casual servers, more time           |
| `30`  | Very relaxed (30 seconds) | Lenient servers, lots of time       |

***

### Example 2: Balanced (Default/Recommended)

```lua
Config.LetPlayerMoveAwayFromTable = false

Config.CraftingQueue = {
    maxDistance = 5.0,      -- Reasonable range (5m)
    checkInterval = 1000,   -- Standard checks (1s)
    warningTime = 15,       -- Fair warning (15s)
}
```

**Effect**: Good balance between realism and playability, forgiving but not exploitable.

***

### Example 3: Casual/Relaxed Server

```lua
Config.LetPlayerMoveAwayFromTable = false

Config.CraftingQueue = {
    maxDistance = 7.0,      -- Generous range (7m)
    checkInterval = 2000,   -- Relaxed checks (2s)
    warningTime = 30,       -- Lots of time (30s)
}
```

**Effect**: Very forgiving, players have plenty of freedom, good for public servers.

***

### Example 4: Ultra-Hardcore

```lua
Config.LetPlayerMoveAwayFromTable = false

Config.CraftingQueue = {
    maxDistance = 2.0,      -- Must stay very close (2m)
    checkInterval = 500,    -- Instant detection (0.5s)
    warningTime = 5,        -- Almost no time (5s)
}
```

**Effect**: Extremely realistic, players must be dedicated, no room for mistakes.

***

### Example 5: No Restrictions

```lua
Config.LetPlayerMoveAwayFromTable = true -- Can move anywhere

-- Queue settings don't matter when movement is allowed
Config.CraftingQueue = {
    maxDistance = 5.0,
    checkInterval = 1000,
    warningTime = 15,
}
```

**Effect**: Players can walk away completely, no penalties. See [General Settings](broken://pages/ab7d766e9c22793165085bcc8b6e12740104add7) for `LetPlayerMoveAwayFromTable`.

***

## 📚 Related Documentation

* For movement configuration, see [General Settings](broken://pages/ab7d766e9c22793165085bcc8b6e12740104add7)
* For recovery system, see [Server Settings](broken://pages/9d1de838827866e25366ccf8a93dffe2b7c22c8a)
* For crafting setup, see [Crafting Stations](broken://pages/c1ea338d9ec5067480e807c6abb4fdb36531fefb)
* For interaction settings, see [Interaction Settings](broken://pages/0c139182206153cc7ee2a01ea0417079410e5bbf)


---

# 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://docs.kojascripts.eu/new/crafting/configuration/crafting-queue-settings.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.
