# Interaction Settings

***

## 🔧 Configuration Options

All interaction settings are located in `shared/config.lua` under the **INTERACTION SETTINGS** section.

{% code title="shared/config.lua" %}

```lua
-- ════════════════════════════════════════════════════════════════════════════════════
--  INTERACTION SETTINGS
-- ════════════════════════════════════════════════════════════════════════════════════

Config.Target = {
    enabled = false,
    resource = 'ox_target',
    icon = 'fas fa-sign-in-alt'
}

Config.Interact = {
    key = 'E',
    text = 'Press ~INPUT_CONTEXT~ to open crafting'
}
```

{% endcode %}

***

## 📝 Setting Descriptions

### Target System Configuration

{% code title="Config.Target" %}

```lua
Config.Target = {
    enabled = false,
    resource = 'ox_target',
    icon = 'fas fa-sign-in-alt'
}
```

{% endcode %}

**Purpose**: Enable interaction through target systems (third-eye, eye-target) instead of key press.

Options:

| Setting    | Type    | Description                  | Default                |
| ---------- | ------- | ---------------------------- | ---------------------- |
| `enabled`  | Boolean | Enable/disable target system | `false`                |
| `resource` | String  | Target resource name         | `'ox_target'`          |
| `icon`     | String  | Font Awesome icon class      | `'fas fa-sign-in-alt'` |

***

### Key Press Configuration

{% code title="Config.Interact" %}

```lua
Config.Interact = {
    key = 'E',
    text = 'Press ~INPUT_CONTEXT~ to open crafting'
}
```

{% endcode %}

**Purpose**: Configure key-based interaction when target system is disabled.

Options:

| Setting | Type   | Description                  | Default                                    |
| ------- | ------ | ---------------------------- | ------------------------------------------ |
| `key`   | String | Key to press for interaction | `'E'`                                      |
| `text`  | String | Help text shown on screen    | `'Press ~INPUT_CONTEXT~ to open crafting'` |

***

***

## 🔧 Configuration Examples

### Example: Using ox\_target

**Configuration**:

{% code title="Config.Target" %}

```lua
Config.Target = {
    enabled = true,
    resource = 'ox_target',
    icon = 'fas fa-hammer'
}
```

{% endcode %}

**Requirements**:

{% stepper %}
{% step %}
Install ox\_target
{% endstep %}

{% step %}
Add to server.cfg: `ensure ox_target`
{% endstep %}

{% step %}
Ensure ox\_target starts before koja-crafting
{% endstep %}

{% step %}
Restart koja-crafting
{% endstep %}
{% endstepper %}

**Result**: Players can aim at tables and see "LABEL" option with ICON.

***

### Example: Traditional Key Press

**Configuration**:

{% code title="Config.Target + Config.Interact" %}

```lua
Config.Target = {
    enabled = false, -- Disable target
}

Config.Interact = {
    key = 'E',
    text = 'Press ~INPUT_CONTEXT~ to open crafting'
}
```

{% endcode %}

**Result**: Simple help text appears when near station, press E to open.

***

## 🎨 Font Awesome Icons

### Popular Icons for Crafting

| Icon Class               | Visual | Use Case               |
| ------------------------ | ------ | ---------------------- |
| `'fas fa-hammer'`        | 🔨     | Weapon crafting        |
| `'fas fa-toolbox'`       | 🧰     | Tool crafting          |
| `'fas fa-wrench'`        | 🔧     | Vehicle crafting       |
| `'fas fa-cog'`           | ⚙️     | Mechanical crafting    |
| `'fas fa-flask'`         | 🧪     | Chemical/drug crafting |
| `'fas fa-mortar-pestle'` | 🏺     | Medical crafting       |
| `'fas fa-tshirt'`        | 👕     | Clothing crafting      |
| `'fas fa-utensils'`      | 🍴     | Food crafting          |
| `'fas fa-box'`           | 📦     | General crafting       |
| `'fas fa-industry'`      | 🏭     | Industrial crafting    |

### Icon Syntax

{% code title="Icon example" %}

```lua
icon = 'fas fa-hammer'
--     │   └─ Icon name
--     └─ Icon style (fas = solid, far = regular, fab = brands)
```

{% endcode %}

Find more icons: <https://fontawesome.com/icons>

***

## 🎯 Help Text Formatting

### Text Formatting Options

The help text supports GTA V formatting codes:

{% code title="Examples" %}

```lua
-- Basic text
text = 'Press ~INPUT_CONTEXT~ to craft'

-- With color
text = '~g~Press ~INPUT_CONTEXT~ to craft~s~' -- Green text

-- Multiple controls
text = 'Press ~INPUT_CONTEXT~ to craft or ~INPUT_CANCEL~ to exit'

-- Custom styling
text = '~b~[CRAFTING]~s~ Press ~INPUT_CONTEXT~ to open'
```

{% endcode %}

### Color Codes

| Code  | Color         | Example           |
| ----- | ------------- | ----------------- |
| `~r~` | Red           | `~r~Warning~s~`   |
| `~g~` | Green         | `~g~Available~s~` |
| `~b~` | Blue          | `~b~Info~s~`      |
| `~y~` | Yellow        | `~y~Caution~s~`   |
| `~p~` | Purple        | `~p~Special~s~`   |
| `~o~` | Orange        | `~o~Alert~s~`     |
| `~s~` | White (reset) | `~s~Normal`       |

### Control Input Codes

| Code                      | Result      | Display     |
| ------------------------- | ----------- | ----------- |
| `~INPUT_CONTEXT~`         | E key       | "E"         |
| `~INPUT_CANCEL~`          | Backspace   | "Backspace" |
| `~INPUT_ENTER~`           | Enter       | "Enter"     |
| `~INPUT_FRONTEND_ACCEPT~` | Space/Enter | "Space"     |

Example configurations are shown above.

***

## 📚 Related Documentation

* For crafting station setup, see [Crafting Stations](broken://pages/71ce483508826e5fe6118726be7d1e044f0f6615)
* For queue configuration, see [Crafting Queue Settings](broken://pages/feb0d3265dc75eb932c4234f5d443548b11e5be3)
* For general setup, see [General Settings](broken://pages/79c083d13e47b341eaf1fc9d0e16cfaf555ab53c)
* For installation, see [Installation](broken://pages/bc5858830f82a16e425bc5f006ec0da37097adf0)

***

## 🔗 Useful Resources

* ox\_target: <https://github.com/overextended/ox\\_target>
* Font Awesome Icons: <https://fontawesome.com/icons>
* GTA V Control Codes: <https://docs.fivem.net/docs/game-references/controls/>


---

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