Introduction

Welcome to the Repair Workbench plugin documentation

Edit worldFolder/mods/BjornV_RepairBench/config.json to customize the plugin.

Basic Settings

DefaultRepairCost

The default repair cost settings apply to all items unless overridden by a custom repair cost pattern.

ItemId / ResourceTypeId

The material used for repairs. Only one can be used per definition.

ItemId - Use specific ingredient items:

  • Ingredient_Bar_Iron

  • Ingredient_Stick

  • etc.

ResourceTypeId - Use resource types:

  • Wood_Trunk

  • Stone

  • etc.

Default: "ItemId": "Ingredient_Bar_Iron"

Quantity

How many of the material to charge for repairs.

Default: 2

ScalingFactor

Multiplier for cost based on damage.

  • 0.0 = Fixed cost regardless of damage

  • 1.0 = Cost scales with damage (default)

  • 2.0 = Double scaling

The formula for calculating the final cost using the scaling factor:

FinalCost=max(1,BaseQuantity×(1+ScalingFactor×(1CurrentDurabilityOriginalMaxDurability))+0.5)\text{FinalCost} = \max\left(1, \left\lfloor \text{BaseQuantity} \times \left(1 + \text{ScalingFactor} \times \left(1 - \frac{\text{CurrentDurability}}{\text{OriginalMaxDurability}}\right)\right) + 0.5 \right\rfloor\right)

RepairMaxDurability

Controls whether repairs can restore permanent durability loss.

Default: true

  • true = Repairs restore both current and maximum durability

  • false = Repairs only restore current durability

Custom Repair Costs

Define custom costs for specific item patterns:

Match Patterns

Patterns use * as a wildcard to match item names:

  • *Adamantite* = Any item with "Adamantite" in the name

  • *Wood* = Any item with "Wood" in the name

  • Tool_Pickaxe_* = All items starting with "Tool_Pickaxe_"

  • *_Sword_* = Any item containing "Sword"

Per-Pattern Overrides

Each pattern can override the default settings with optional fields:

  • ItemId or ResourceTypeId - The material to charge (required, only use one)

  • Quantity - Override the default quantity for this pattern

  • ScalingFactor - Override the default scaling factor for this pattern

  • RepairMaxDurability - Override the default permanent repair setting for this pattern

If optional fields are omitted, the pattern will use the values from DefaultRepairCost.

Example using default settings:

Example with custom overrides:

Example using ResourceTypeId:

Excluded Matches

Prevent specific items from being repaired:

Patterns use the same wildcard matching as custom repair costs. Excluded items will not appear in the repair menu.

Default: ["*_State_Filled_Water"]

Resource Type IDs

Common resource types that can be used with ResourceTypeId:

Note: This is a partial list. The exact available resource types may vary by game version. If you need a specific resource type ID, check your game's data files or mod documentation.

  • Wood_Trunk - Wood logs/trunks

  • Stone - Stone resources

  • Metal_Ore - Metal ores

  • Clay - Clay resources

  • Sand - Sand resources

Example Configuration

Default Configuration

If no config file exists, the plugin will automatically create one with these defaults:

  • DefaultRepairCost:

    • ItemId: Ingredient_Bar_Iron

    • Quantity: 2

    • ScalingFactor: 1.0

    • RepairMaxDurability: true

  • CustomRepairCosts: Includes patterns for Adamantite, Cobalt, Thorium, Iron, Copper, and Wood items

  • ExcludedMatches: ["*_State_Filled_Water"]

Reload Configuration

After editing the config file, reload it without restarting the server:

Or restart the server to apply changes.

Last updated