Crafting Stations Settings
ποΈ Station Configuration
Basic Structure
Crafting stations are configured in shared/config.lua under Config.Craftings:
Config.Craftings = {
{
id = 'unique_station_id',
coords = vector4(x, y, z, heading),
blip = { ... },
title = 'STATION TITLE',
desc = 'Station description',
prop = 'prop_name',
categories = { ... },
items = { ... },
blueprints = { ... }
},
-- Add more stations...
}
Station Properties
| Property | Type | Required | Description |
|---|---|---|---|
id | String | β Yes | Unique identifier for the station |
coords | Vector4 | β Yes | Location (x, y, z, heading) |
blip | Table | β Yes | Map blip configuration |
title | String | β Yes | Display title in UI (uppercase recommended) |
desc | String | β Yes | Short description shown in UI |
prop | String | β Yes | Object model to spawn at location |
categories | Table | β Yes | List of item categories |
items | Table | β Yes | Craftable items list |
blueprints | Table | β Optional | Special blueprint-locked items |
π Adding New Stations
-
Find Coordinates
Get your position in-game via/txcommand or your other script that supports it. -
Add Station Configuration
Config.Craftings = { -- Existing stations... -- Your new station { id = 'my_custom_station', coords = vector4(123.45, -678.90, 28.50, 180.0), blip = { name = 'My Crafting Station', sprite = 478, colour = 2, scale = 0.7, visible = true, }, title = 'CUSTOM CRAFTING', desc = 'Craft custom items here', prop = 'prop_tool_bench02', categories = { { id = 'custom_category', label = 'Custom Items' } }, items = { { respname = 'custom_item', name = 'Custom Item', category = 'custom_category', image = './images/custom.webp', craftingTime = 30, requiredLevel = 1, resources = { { name = 'iron', amount = 5 } }, exp = 25 } }, blueprints = {} } } -
Test and Adjust
- Restart resource:
restart koja-crafting - Go to coordinates in-game
- Verify prop spawns correctly
- Test crafting interaction
- Adjust position/heading if needed
- Restart resource:
π Categories
Purpose
Categories organize items in the crafting menu for better navigation.
Structure
categories = {
{
id = 'category_unique_id',
label = 'Display Label'
},
-- More categories...
}
Example - Multiple Categories
categories = {
{
id = 'medical',
label = 'Medical Items'
},
{
id = 'tools',
label = 'Tools & Equipment'
},
{
id = 'weapons',
label = 'Weapons'
},
{
id = 'food',
label = 'Food & Drink'
},
{
id = 'materials',
label = 'Raw Materials'
}
}
π¨ Items Configuration
Basic Item Structure
items = {
{
respname = 'item_id', -- Item name in inventory
name = 'Display Name', -- Name shown in UI
category = 'category_id', -- Category it belongs to
image = './images/item.webp', -- Image path
craftingTime = 30, -- Seconds to craft
craftingAmount = 1, -- Amount crafted per operation
requiredLevel = 1, -- Minimum level needed
resources = { ... }, -- Required materials
exp = 25 -- XP gained on completion
}
}
Item Properties Explained
respname (Required)
respname = 'bandage'
- Must match your inventory item name exactly (case-sensitive)
- Used to give item to player on completion
- Examples:
'bandage','weapon_pistol','lockpick'
name (Required)
name = 'Bandage'
- Display name shown in crafting UI
- Can include spaces and special characters
- Doesn't need to match inventory name
category (Required)
category = 'medical'
- Must match a
category.idfrom categories table - Determines which tab item appears in
- Case-sensitive
image (Required)
-- Option 1: Local image (starts with ./)
image = './images/bandage.webp'
-- Option 2: Inventory image (no ./)
image = 'bandage.png'
-- Option 3: Full path
image = 'nui://ox_inventory/web/images/bandage.png'
See Images Settings for detailed image configuration.
craftingTime (Required)
craftingTime = 30
- Time in seconds to craft one batch
- Minimum:
1second - Recommendations:
- Simple items:
5-20s - Common items:
20-60s - Rare items:
60-180s - Epic items:
180-600s
- Simple items:
craftingAmount (Optional)
craftingAmount = 3
- How many items are crafted per operation
- Default:
1if not specified
requiredLevel (Required)
requiredLevel = 1
- Minimum crafting level to unlock this item
- Range:
1to max level inConfig.Levels - Shows as "Locked" in UI with level requirement
resources (Required)
resources = {
{ name = 'wood', label = 'Wood', amount = 5 },
{ name = 'iron', label = 'Iron Brick', image = './images/iron.webp', amount = 3 },
{ name = 'cloth', amount = 2 }
}
Resource properties:
name(required): Inventory item name (must exist)label(optional): Label for the item in the UIamount(required): Quantity requiredimage(optional): Custom image for this resource
exp (Required)
exp = 25
- Experience points gained on successful craft
- Typically scales with crafting difficulty/time
- Example balancing:
- Simple 10s craft:
exp = 10 - Medium 30s craft:
exp = 30 - Complex 60s craft:
exp = 60 - Or use formula:
exp = craftingTime / 2
- Simple 10s craft:
See Player Progression for XP balancing.
Complete Item Example
{
respname = 'medikit',
name = 'Medical Kit',
category = 'medical',
image = './images/medikit.webp',
craftingTime = 45,
craftingAmount = 1,
requiredLevel = 3,
resources = {
{ name = 'bandage', image = './images/bandage.webp', amount = 3 },
{ name = 'pills', amount = 2 },
{ name = 'syringe', amount = 1 }
},
exp = 50
}
π Blueprints System
What Are Blueprints?
Blueprints are special items that require:
- Finding/earning a blueprint item
- Admin giving blueprint with
/addblueprintcommand - Purchasing/unlocking through gameplay
Once unlocked, the item becomes available to craft (if level requirement met).
Blueprint Structure
blueprints = {
{
respname = 'item_id',
name = 'Display Name',
category = 'category_id',
image = './images/item.webp',
blueprintItem = 'blueprint_item_name', -- π KEY DIFFERENCE
craftingTime = 60,
requiredLevel = 3,
resources = { ... },
exp = 100
}
}
Key property:
blueprintItem = 'parachute_blueprint'
- This is the "key" item that unlocks crafting
- Must be given via
/addblueprintcommand - Stored in player's database record
- Can be rare drop, quest reward, or admin gift
Blueprint vs Regular Item
| Feature | Regular Item | Blueprint Item |
|---|---|---|
| Visible by default | β Yes (if level met) | β No |
| Unlock method | Reach level | Admin command or drop |
| Config location | items = { ... } | blueprints = { ... } |
| Special property | None | blueprintItem required |
Blueprint Example
blueprints = {
{
respname = 'parachute',
name = 'Parachute',
category = 'advanced',
image = './images/parachute.webp',
blueprintItem = 'parachute_blueprint', -- Required blueprint
craftingTime = 120,
requiredLevel = 4,
resources = {
{ name = 'cloth', amount = 10 },
{ name = 'rope', amount = 5 },
{ name = 'metal_frame', amount = 2 }
},
exp = 150
},
{
respname = 'night_vision',
name = 'Night Vision Goggles',
category = 'advanced',
image = './images/nvg.webp',
blueprintItem = 'nvg_blueprint',
craftingTime = 180,
requiredLevel = 5,
resources = {
{ name = 'electronics', amount = 15 },
{ name = 'glass', amount = 5 },
{ name = 'battery', amount = 3 }
},
exp = 200
}
}
Giving Blueprints
Admin command:
/addblueprint [playerID] [blueprintItem]
# Examples:
/addblueprint 1 parachute_blueprint
/addblueprint 5 nvg_blueprint
What happens:
- Blueprint added to player's database record
- Item appears in crafting menu (if level met)
- Player can now craft the item
- Blueprint persists through restarts/disconnects
See Admin Permissions for command details.
πΊοΈ Blip Configuration
Blip Structure
blip = {
name = 'Weapon Crafting',
sprite = 89,
colour = 1,
scale = 0.7,
visible = true,
}
Blip Properties
| Property | Type | Description | Example |
|---|---|---|---|
name | String | Text shown when hovering blip | 'Weapon Crafting' |
sprite | Number | Icon sprite ID | 89, 478, 402 |
colour | Number | Color ID (0-85) | 1 (red), 2 (green) |
scale | Number | Size (0.5-1.5) | 0.7, 0.8, 1.0 |
visible | Boolean | Show on map | true, false |
Common Blip Sprites
| Sprite | Icon | Use Case |
|---|---|---|
89 | π« Pistol | Weapon crafting |
478 | π¨ Hammer | Tool/general crafting |
402 | π Pills | Medical crafting |
409 | π Food | Food/cooking |
499 | π οΈ Repair | Repair station |
566 | π¦ Crate | Materials |
521 | βοΈ Gear | Mechanical |
Find more: https://docs.fivem.net/docs/game-references/blips/
Blip Colors
| ID | Color | Hex | Use Case |
|---|---|---|---|
0 | White | #FFFFFF | General |
1 | Red | #E03232 | Weapons/Danger |
2 | Green | #32E032 | Medical/Safe |
3 | Blue | #3232E0 | Police/Official |
5 | Yellow | #FFD700 | Gold/Premium |
25 | Purple | #B432E0 | Special/Rare |
27 | Orange | #FF8C00 | Warning/Tools |
Blip Examples
Weapon Crafting (Red pistol):
blip = {
name = 'Weapon Crafting',
sprite = 89,
colour = 1, -- Red
scale = 0.8,
visible = true
}
Medical Crafting (Green pills):
blip = {
name = 'Medical Station',
sprite = 402,
colour = 2, -- Green
scale = 0.7,
visible = true
}
π οΈ Props/Objects
Common Crafting Props
| Prop Name | Description | Best For |
|---|---|---|
prop_tool_bench02 | Workbench | General crafting |
prop_tool_bench01 | Small bench | Tool crafting |
gr_prop_gr_bench_02a | Garage bench | Vehicle work |
prop_toolchest_01 | Tool chest | Small items |
prop_ld_bench01 | Long bench | Large projects |
bkr_prop_meth_table01a | Lab table | Medical/chemical |
bkr_prop_weed_table_01b | Processing table | Materials |
π Troubleshooting
Station Not Spawning
Problem: No prop appears at coordinates
Solutions:
- Verify coordinates are correct (
/getcoords) - Check prop model name is valid
- Ensure resource is running
- Try different prop model
- Check console for errors
Items Not Showing
Problem: No items in crafting menu
Solutions:
- Check category IDs match between
categoriesanditems - Verify items array is not empty
- Check for syntax errors (missing commas, brackets)
- Ensure
requiredLevelis achievable - Check console for Lua errors
Can't Craft Item
Problem: Item visible but can't craft
Solutions:
- Check player has required level
- Verify player has all resources
- Check resource names match inventory items exactly
- Ensure resource amounts are not zero
Wrong Item Given
Problem: Crafting completes but wrong item given
Solutions:
- Verify
respnamematches inventory item exactly - Check case sensitivity (
bandageβBandage) - Ensure inventory item exists
- Test giving item manually
- Check framework's item database
Blueprint Not Appearing
Problem: Blueprint given but item not showing
Solutions:
- Check player meets
requiredLevel - Verify blueprint is in
blueprintstable, notitems - Check
blueprintItemname matches command - Query database to verify blueprint saved
- Player may need to reopen menu
π Related Documentation
- For images configuration, see Images Settings
- For level requirements, see Player Progression
- For blueprint commands, see Admin Permissions
- For interaction setup, see Interaction Settings
Related pages
- General Settings β This page covers the basic configuration options for Koja-Crafting that control debug mode, language, and player behavior.
- Server Settings β This page covers server-side configuration options including database management, crafting recovery, and shared table functionality.
- Images Settings β This page explains how to configure item images, add custom graphics, and manage image paths in Koja-Crafting.
- Player Progression Settings β This page covers the player progression system including levels, experience points, and how to configure the leveling system in Koja-Crafting.
- Admin Settings β This page covers admin permission configuration and available admin commands for managing Koja-Crafting.
- Interaction Settings β This page covers how players interact with crafting stations - either through key press or target system (ox_target,qb-target,).
- Configuration β back to the section overview