# Configuration

This script has three real configuration areas:

* `config.lua`
* `escrow/bench/config.lua`
* `escrow/craft/config.lua`

Some builds may also use:

* `data/in_game_benches.json`

If you remember only one rule, remember this:

* `config.lua` = level system, money settings, debug, image path
* `escrow/bench/config.lua` = where benches are, what object they use, and who can access them
* `escrow/craft/config.lua` = what can be crafted, what ingredients it needs, and which item sets belong to which benches

## Quick Answers

* Change item image path: `config.lua` -> `Config.InventoryImagesFolder`
* Change level system or XP table: `config.lua` -> `Config.LevelSystem` and `Config.Levels`
* Change money handling: `config.lua` -> `Config.Money`
* Add, move, disable, or restrict a bench: `escrow/bench/config.lua`
* Change which recipes a bench shows: `escrow/bench/config.lua` -> `itemSetKey` and `escrow/craft/config.lua` -> `CRAFT_BENCH_ITEM_SETS`
* Change one recipe or ingredient list: `escrow/craft/config.lua` -> `CRAFTABLE_ITEMS`
* Change supported weapon components: `escrow/craft/config.lua` -> `WEAPON_COMPONENTS`
* Remove the default Camp Fire bench: `escrow/bench/config.lua`

## What Is Inside config.lua?

The real source file controls:

* `Config.InventoryImagesFolder`
* `Config.LevelSystem`
* `Config.Levels`
* `Config.Money`
* `Config.debug`

This file is for system-wide behavior, not for bench locations or recipe lists.

## What Is Inside escrow/bench/config.lua?

This file controls bench placement and access. Real source sections include:

* `targetableModels`
* `blipOptions`
* `commands.adminMenu`
* `makePedInvisibleOnBenchUse`
* `benches`

Real source examples include benches such as:

* Police Bench
* Ballas Bench
* Camp Fire

Each bench entry can define:

* `active`
* `label`
* `blip`
* `location`
* `objectModel`
* `itemSetKey`
* `groups`
* `job`
* `gang`

## How Do I Add Or Edit A Bench?

Open:

```lua
escrow/bench/config.lua
```

Then edit or add a bench entry under:

```lua
benches = {
    ...
}
```

This is where you change:

* bench label
* coordinates
* object model
* blip state
* job or gang restriction
* recipe set shown on that bench

## How Do I Restrict A Bench To One Job Or Gang?

Use the bench entry fields:

* `groups`
* `job`
* `gang`

If a bench is visible but not usable by the correct players, this is the first file to inspect.

## What Is Inside escrow/craft/config.lua?

This file controls the actual crafting data. Real source sections include:

* `CRAFTABLE_ITEMS`
* `CRAFT_BENCH_ITEM_SETS`
* `WEAPON_BONES`
* `WEAPON_COMPONENTS`

That means this file is where you change:

* recipe ingredients
* crafted outputs
* craft duration
* reward XP
* required craft level
* which items belong to each bench item set
* supported attachment or component logic

## How Do Bench Item Sets Work?

This is the part many server owners miss:

* the bench uses `itemSetKey`
* the recipes shown on that bench come from `CRAFT_BENCH_ITEM_SETS`

So if you add a recipe and it does not appear on the bench, check both:

1. did you add or keep the recipe inside `CRAFTABLE_ITEMS`?
2. did you place that recipe inside the correct item set inside `CRAFT_BENCH_ITEM_SETS`?
3. does the bench use the same `itemSetKey`?

If one of those three does not match, the recipe will not show on the bench.

## What About Weapon Components?

The real source includes weapon attachment and component logic in:

```lua
WEAPON_COMPONENTS
```

If your attachment recipes do not work, check both sides:

* the component recipe item exists in your inventory
* the weapon component mapping exists in `WEAPON_COMPONENTS`

## What About The Camp Fire Bench?

The default source includes a Camp Fire bench with:

```lua
objectModel = '3fe_beach_fire'
```

If your server does not have that object, do not keep debugging recipes first. Disable or replace the bench object in `escrow/bench/config.lua`.

## If Your Changes Do Not Apply

Check these in order:

1. Did you edit `config.lua`, `escrow/bench/config.lua`, or `escrow/craft/config.lua` in the correct place?
2. Did you restart `0r-craft-v2` after the change?
3. Did you change the recipe in `CRAFTABLE_ITEMS` but forget to add it to the right `CRAFT_BENCH_ITEM_SETS` entry?
4. Did you change the recipe set but forget the bench `itemSetKey`?
5. Is the problem actually the bench object model, not the recipe?
