Page cover

👨‍🍳Crafting Recipes

Define crafting recipes available for each related crafting location

The first key is the location name defined in interactionLocations.lua

The second key is the Category name for the craft types

The third key is the Craftable Item and must be in your items.lua

Config.Recipes = {
    ['My Custom Crafting'] = { -- the key is the recipe type defined in Config.InteractionLocations
        ['Custom Category'] = { -- this is the category name and this contains the list of craftable items
            ['my_custom_item'] = { -- this is the craftable item name
                ---
            },
            --add other items as required
        },
        --add other categories as required
    },
}

  • Define required items to craft this item

  • Name is the item name

  • Amount is the amount required of that item

  • Remove is a boolean value if that item should be removed or not for things like an item check of a toolbox or similar

Config.Recipes = {
    ['My Custom Crafting'] = { -- the key is the recipe type defined in Config.InteractionLocations
        ['Custom Category'] = { -- this is the category name and this contains the list of craftable items
            ['my_custom_item'] = { -- this is the craftable item name
                recipe = { -- this is a table of items required to make the item name above
                    --name is item name
                    --amount is amount of that item required
                    --removed is a boolean if that item should be removed or just an item check for things like tools
                    { name = 'gunpowder',       amount = 1, remove = true, },
                    { name = 'cottonwadding',   amount = 1, remove = true, },
                    { name = 'bulletcasing',    amount = 1, remove = true, },
                },
                ---
            },
            --add other items as required
        },
        --add other categories as required
    },
}

  • Define the amount returned from this craft

  • For weapons only ever set the return amount to 1 and ensure you have listed the item name in either the Prefixes or Names table in the Unique Item Filter

Config.Recipes = {
    ['My Custom Crafting'] = { -- the key is the recipe type defined in Config.InteractionLocations
        ['Custom Category'] = { -- this is the category name and this contains the list of craftable items
            ['my_custom_item'] = { -- this is the craftable item name
                ---
                returned = {--return amounts for crafting the item
                    amount = 5,
                },
                ---
            },
            --add other items as required
        },
        --add other categories as required
    },
}

  • Define progress circle settings

  • Duration is the time in MS to craft a single item (this is multiplied if crafting multiple)

  • Label is the progress circle label

Config.Recipes = {
    ['My Custom Crafting'] = { -- the key is the recipe type defined in Config.InteractionLocations
        ['Custom Category'] = { -- this is the category name and this contains the list of craftable items
            ['my_custom_item'] = { -- this is the craftable item name
                ---
                progress = {
                    duration = 5000, -- this is multiplied by the amount the player chooses to process
                    label = 'Crafting pistol ammo', -- label for progressCircle
                },
                --
            },
            --add other items as required
        },
        --add other categories as required
    },
}

  • Define animation and prop settings for each craft type

  • Dict is the anim dictionary

  • Anim is the anim name

  • Flag is the anim flag

  • Model is the prop model name

  • Bone is the bone index to attach the prop to

  • Pos is a vec3 value for prop position

  • Rot is a vec3 value for prop rotation

  • Set props = nil, for no props during animation

Config.Recipes = {
    ['My Custom Crafting'] = { -- the key is the recipe type defined in Config.InteractionLocations
        ['Custom Category'] = { -- this is the category name and this contains the list of craftable items
            ['my_custom_item'] = { -- this is the craftable item name
                ---
                anim = {
                    dict = 'amb@prop_human_parking_meter@female@base', -- name of anim dict used (set to nil for nothing)
                    anim = 'base_female', -- name of anim used (set to nil for nothing)
                    flag = 41,  -- flag number
                    props = { -- prop settings
                        {
                            model = 'prop_tool_screwdvr03',  -- name of prop model used (set to nil for nothing)
                            bone = 57005, -- bone index used (set to nil for nothing)
                            pos = vec3(0.1, 0.1, 0.06), -- vec3 value for prop position (set to nil for nothing)
                            rot = vec3(124.0, 0.0, 16.0), -- vec3 value for prop rotation (set to nil for nothing)
                        },
                        {
                            model = 'prop_piercing_gun',  -- name of prop model used (set to nil for nothing)
                            bone = 18905, -- bone index used (set to nil for nothing)
                            pos = vec3(0.14, 0.04, -0.02), -- vec3 value for prop position (set to nil for nothing)
                            rot = vec3(186.0, 40.0, 186.0), -- vec3 value for prop rotation (set to nil for nothing)
                        },
                    },
                },
            },
            --add other items as required
        },
        --add other categories as required
    },
}

Last updated