Kartik Scripts

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' },
}
PropertyWhat it does
idInternal identifier for the category (used in recipe definitions).
labelDisplay name shown in the crafting UI.
iconIcon displayed next to the category.
restrictionPermission 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_stage1Level Required: 1
4× piston_s1Piston (Stage 1)
1× crankshaft_s1Crankshaft (Stage 1)
1× valves_s1Valves (Stage 1)

Stage 2 Performance Engine

Output: engine_stage2Level Required: 2
4× piston_s2Piston (Stage 2)
1× crankshaft_s2Crankshaft (Stage 2)
1× valves_s2Valves (Stage 2)
1× turbo_s2Turbo (Stage 2)

Stage 3 Performance Engine

Output: engine_stage3Level Required: 3
4× piston_s3Piston (Stage 3)
1× crankshaft_s3Crankshaft (Stage 3)
1× valves_s3Valves (Stage 3)
1× supercharger_s3Supercharger (Stage 3)

Mechanical Parts

Basic Repair Kit

Output: repairkitLevel Required: 1
5× ironIron
2× plasticPlastic

Advanced Repair Kit

Output: advanced_repairkitLevel Required: 2
10× ironIron
5× steelSteel
2× electronicsElectronics

Miscellaneous

Vehicle Cleaning Kit

Output: cleaningkitLevel Required: 1
2× plasticPlastic
1× waterWater

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.

On this page