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 = 5000The 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 |
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.
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.