Crafting Stations Settings

This comprehensive guide covers how to configure crafting stations, add items, create categories, configure blueprints, and customize your crafting system.


πŸ—οΈ 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

1

Find Coordinates

Get your position in-game via /tx command or your other script that supports it.

2

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 = {}
    }
}
3

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


πŸ“‘ 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.id from 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: 1 second

  • Recommendations:

    • Simple items: 5-20s

    • Common items: 20-60s

    • Rare items: 60-180s

    • Epic items: 180-600s


craftingAmount (Optional)

craftingAmount = 3
  • How many items are crafted per operation

  • Default: 1 if not specified


requiredLevel (Required)

requiredLevel = 1
  • Minimum crafting level to unlock this item

  • Range: 1 to max level in Config.Levels

  • Shows as "Locked" in UI with level requirement


resources (Required)

resources = {
    { name = 'wood', amount = 5 },
    { name = 'iron', image = './images/iron.webp', amount = 3 },
    { name = 'cloth', amount = 2 }
}

Resource properties:

  • name (required): Inventory item name (must exist)

  • amount (required): Quantity required

  • image (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

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 /addblueprint command

  • 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 /addblueprint command

  • 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:

  1. Blueprint added to player's database record

  2. Item appears in crafting menu (if level met)

  3. Player can now craft the item

  4. 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:

  1. Verify coordinates are correct (/getcoords)

  2. Check prop model name is valid

  3. Ensure resource is running

  4. Try different prop model

  5. Check console for errors

Items Not Showing

Problem: No items in crafting menu

Solutions:

  1. Check category IDs match between categories and items

  2. Verify items array is not empty

  3. Check for syntax errors (missing commas, brackets)

  4. Ensure requiredLevel is achievable

  5. Check console for Lua errors

Can't Craft Item

Problem: Item visible but can't craft

Solutions:

  1. Check player has required level

  2. Verify player has all resources

  3. Check resource names match inventory items exactly

  4. Ensure resource amounts are not zero

Wrong Item Given

Problem: Crafting completes but wrong item given

Solutions:

  1. Verify respname matches inventory item exactly

  2. Check case sensitivity (bandage β‰  Bandage)

  3. Ensure inventory item exists

  4. Test giving item manually

  5. Check framework's item database

Blueprint Not Appearing

Problem: Blueprint given but item not showing

Solutions:

  1. Check player meets requiredLevel

  2. Verify blueprint is in blueprints table, not items

  3. Check blueprintItem name matches command

  4. Query database to verify blueprint saved

  5. Player may need to reopen menu


  • For images configuration, see Images Settings

  • For level requirements, see Player Progression

  • For blueprint commands, see Admin Permissions

  • For interaction setup, see Interaction Settings

Last updated