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

# Wear and maintenance

How benches wear from use, what a worn bench does, and the three maintenance kits.

Benches wear out from **use** (never from time) and are repaired with maintenance kits. A worn bench crafts slower, and a broken one refuses new crafts until it's overhauled. **Wear never destroys a player's items.** Everything is in `config/condition.lua`.

```lua
Config.Condition = {
    enabled = true,
    debug   = false,

    starting = 100.0, -- condition of a brand new bench
    maximum  = 100.0,
    minimum  = 0.0,
    -- ...
}
```

Set `enabled = false` to turn the whole system off.

## Wear

Wear is applied once per **completed** craft. Cancelled crafts cost nothing.

```lua
wear = {
    tiers = {
        simple  = { min = 0.10, max = 0.30 },
        normal  = { min = 0.30, max = 0.80 },
        complex = { min = 0.80, max = 1.50 },
    },

    classify = {
        weights = {
            level           = 1.0,
            ingredientTypes = 2.0,
            durationMinutes = 1.5,
            xp              = 0.05,
        },
        thresholds = { simple = 8.0, normal = 22.0 },
    },

    perRecipe = {
        -- ['weapon_pistol'] = 'complex',
        -- ['bandage']       = { min = 0.05, max = 0.10 },
    },
    perCategory = {
        -- ['weapons'] = 'complex',
    },

    scaleWithQuantity = true,
    quantityExponent  = 0.85,

    maxPerCraft       = 6.0,
    failureMultiplier = 1.0,

    globalMultiplier = 0.80,
},
```

| Option                                   | Default         | What it does                                                                                                                                                        |
| ---------------------------------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `tiers`                                  |                 | Condition lost per craft (random in the range) for each recipe tier.                                                                                                |
| `classify`                               |                 | Each recipe's tier is worked out from its own numbers: `level×1 + ingredientTypes×2 + minutes×1.5 + xp×0.05`. Up to 8 = simple, up to 22 = normal, above = complex. |
| `perRecipe` / `perCategory`              | empty           | Force a tier name or an exact `{ min, max }` for a recipe or a whole category.                                                                                      |
| `scaleWithQuantity` / `quantityExponent` | `true` / `0.85` | Batches wear more, but less than linear.                                                                                                                            |
| `maxPerCraft`                            | `6.0`           | Cap per craft, however large the batch.                                                                                                                             |
| `failureMultiplier`                      | `1.0`           | Wear of a failed craft, as a fraction.                                                                                                                              |
| `globalMultiplier`                       | `0.80`          | **One dial for everything.** `0.5` = benches last twice as long.                                                                                                    |

The player's **Careful Handling** perk reduces wear further (see [Crafting Mastery](/visionstore-docs/scripts/crafting/configuration/mastery.md)).

## Condition stages

```lua
stages = {
    { key = 'pristine', min = 76.0, label = 'bench.stage_pristine', tone = 'good'   },
    { key = 'used',     min = 51.0, label = 'bench.stage_used',     tone = 'fair'   },
    { key = 'worn',     min = 26.0, label = 'bench.stage_worn',     tone = 'warn'   },
    { key = 'critical', min =  0.1, label = 'bench.stage_critical', tone = 'danger' },
    { key = 'offline',  min =  0.0, label = 'bench.stage_offline',  tone = 'dead'   },
},
```

On the bench these show as **Well Maintained**, **Used**, **Worn**, **Critical Condition** and **Out of Service**.

## Effects

```lua
effects = {
    craftSpeed = {
        enabled = true,
        byStage = {
            pristine = 1.00,
            used     = 1.05,
            worn     = 1.15,
            critical = 1.35,
        },
    },

    outOfServiceAt = 0.0,

    minimumConditionForTier = {
        simple  = 0.0,
        normal  = 0.0,
        complex = 20.0,
    },

    minimumConditionForRecipe = {
        -- ['weapon_microsmg'] = 35.0,
    },

    warnBelow = 50.0,
},
```

| Option                      | Default        | What it does                                                               |
| --------------------------- | -------------- | -------------------------------------------------------------------------- |
| `craftSpeed.byStage`        | 1.00 → 1.35    | Craft time multiplier per stage. A critical bench takes 35% longer.        |
| `outOfServiceAt`            | `0.0`          | At or below this the bench refuses new crafts (running ones still finish). |
| `minimumConditionForTier`   | complex `20.0` | Minimum condition to start a recipe of each tier. `0` = no gate.           |
| `minimumConditionForRecipe` | empty          | Per-recipe override of the gate above.                                     |
| `warnBelow`                 | `50.0`         | Below this the screen recommends a service.                                |

## Maintenance kits

Three ox\_inventory items, weakest to strongest. They're used from the bench screen (**Service Bench**) and are craftable on the Tools Bench.

| Kit                          | Restores | Usable from                                 | Bench out of service for |
| ---------------------------- | -------- | ------------------------------------------- | ------------------------ |
| `workbench_service_kit`      | 15-25%   | 26% condition                               | 5 hours                  |
| `industrial_maintenance_kit` | 35-50%   | 6% condition                                | 3 hours                  |
| `precision_overhaul_kit`     | 65-85%   | 0% (the only kit that revives a dead bench) | 1 h 30 min               |

```lua
kits = {
    {
        item       = 'workbench_service_kit',
        label      = 'bench.kit_service',
        restore    = { min = 15.0, max = 25.0 },
        usableFrom = 26.0,
        usableTo   = 99.0,
        duration   = 5 * 60 * 60, -- 5 hours
    },
    -- industrial_maintenance_kit, precision_overhaul_kit ...
},
```

| Field                     | What it does                                                       |
| ------------------------- | ------------------------------------------------------------------ |
| `item`                    | The ox\_inventory item name.                                       |
| `label`                   | Locale key for its display name.                                   |
| `restore`                 | Condition restored, rolled in this range.                          |
| `usableFrom` / `usableTo` | The condition range the kit can be used in.                        |
| `duration`                | **Real** seconds the bench is out of service while being repaired. |

The player's **Table Maintenance** perk shortens the repair time.

## Maintenance flow

```lua
repair = {
    serviceableBelow      = 99.0,
    brokenRequiresTopTier = true,
    cooldownMs            = 3000,
    tickSeconds           = 30,
    resyncSeconds         = 60,
    cancellable           = false,
},
```

| Option                  | Default | What it does                                       |
| ----------------------- | ------- | -------------------------------------------------- |
| `serviceableBelow`      | `99.0`  | At or above this condition, a service is refused.  |
| `brokenRequiresTopTier` | `true`  | A dead bench needs the last (strongest) kit.       |
| `cooldownMs`            | `3000`  | Per-player gap between attempts.                   |
| `tickSeconds`           | `30`    | How often finished repairs are noticed.            |
| `resyncSeconds`         | `60`    | How often nearby screens re-sync the repair timer. |
| `cancellable`           | `false` | A started repair can't be cancelled.               |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://visionstore.gitbook.io/visionstore-docs/scripts/crafting/configuration/condition.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
