Crafting System

๐Ÿ“„ Config file: shared/crafting_config.lua

This file configures the crafting workbench โ€” categories of items, recipes, required levels, and the default crafting time. Mechanics use the crafting zone in their shop to create parts and items from raw materials.


Crafting Categories

Config.CraftingCategories = {
    { id = 'engines', label = "Performance Engines", icon = 'wrench', restriction = 'Engine' },
    { id = 'parts',   label = "Mechanical Parts",    icon = 'cog',    restriction = 'Repair' },
    { id = 'misc',    label = "Miscellaneous",        icon = 'box',    restriction = 'Stash' },
}
Property
What it does

id

Internal identifier for the category (used in recipe definitions).

label

Display name shown in the crafting UI.

icon

Icon displayed next to the category.

restriction

Permission restriction โ€” only employees with this permission can craft in this category.


Default Craft Time

Config.DefaultCraftTime = 5000

The default crafting duration in milliseconds. 5000 = 5 seconds. Individual recipes can override this if needed.


Crafting Recipes

Each recipe is defined with a category, output item, required level, and ingredients:

Performance Engines

Stage 1 Performance Engine

Output: engine_stage1

Level Required: 1

4ร— piston_s1

Piston (Stage 1)

1ร— crankshaft_s1

Crankshaft (Stage 1)

1ร— valves_s1

Valves (Stage 1)

Stage 2 Performance Engine

Output: engine_stage2

Level Required: 2

4ร— piston_s2

Piston (Stage 2)

1ร— crankshaft_s2

Crankshaft (Stage 2)

1ร— valves_s2

Valves (Stage 2)

1ร— turbo_s2

Turbo (Stage 2)

Stage 3 Performance Engine

Output: engine_stage3

Level Required: 3

4ร— piston_s3

Piston (Stage 3)

1ร— crankshaft_s3

Crankshaft (Stage 3)

1ร— valves_s3

Valves (Stage 3)

1ร— supercharger_s3

Supercharger (Stage 3)


Mechanical Parts

Basic Repair Kit

Output: repairkit

Level Required: 1

5ร— iron

Iron

2ร— plastic

Plastic

Advanced Repair Kit

Output: advanced_repairkit

Level Required: 2

10ร— iron

Iron

5ร— steel

Steel

2ร— electronics

Electronics


Miscellaneous

Vehicle Cleaning Kit

Output: cleaningkit

Level Required: 1

2ร— plastic

Plastic

1ร— water

Water

circle-info

Adding new recipes: To add a new craftable item, add a new entry to the Config.CraftingRecipes table with a category, item, label, requiredLevel, and recipe list. Make sure the output item exists in your inventory system.

circle-info

Crafted items are placed into the shop's crafting stash, not directly into the player's inventory. Mechanics need to go to the shop stash zone to claim their crafted items.

Last updated