Page cover image

Creating a new crafting table

Welcome to the Brutal Crafting guide, here you can learn how to create a new crafting table or edit correctly the existing ones.

Where to add?

You can add as many crafting tables in config.lua as many you need.

You have to add a table like the example to this table: 'CraftingTables'

Example
{
    Label = "DRUG CRAFTING",
    Model = 'prop_tool_bench02_ld',
    Coords = vector3(244.732, 3111.310, 41.491),
    Heading = 94.5842,
    CameraSettings = {xOffset = 0.9, yOffset = 0.0, zOffset = 1.4, xRotate = 0.0, yRotate = 0.0, zRotate = 90.0}, -- The Camera's position and rotation relative to the table  
    LightSettings = {xOffset = 4.0, yOffset = 0.0, zOffset = 3.0}, -- Where should the light come to the table, also relative to the table
    Spawn = true, -- Wether the script should spawn the given prop for the crafting bench, or not spawn, instead use the existing prop which is at the coords.
    StopCraftingRadius = 5.0, -- After this distance the crafts will be stopped
    ShowBlipradius = 30.0, -- Show the blip on the map after this distance
    Color = '#789461', -- The main color of the menu | Give the value in hex | https://www.google.com/search?q=color+picker&sca_esv=0573b43c5c641ce9&sxsrf=ACQVn0_-hMLWl_zzSwut9j_3K-mWUc4NRQ%3A1707927207554&ei=p-bMZfmqIcOO9u8P3IOsqAQ&udm=&ved=0ahUKEwi5mojUnKuEAxVDh_0HHdwBC0UQ4dUDCBA&uact=5&oq=color+picker&gs_lp=Egxnd3Mtd2l6LXNlcnAiDGNvbG9yIHBpY2tlcjIKEAAYRxjWBBiwAzIKEAAYRxjWBBiwAzIKEAAYRxjWBBiwAzIKEAAYRxjWBBiwAzIKEAAYRxjWBBiwAzIKEAAYRxjWBBiwAzIKEAAYRxjWBBiwAzIKEAAYRxjWBBiwA0jMGlD9A1j2FXABeAGQAQCYAYoBoAGfCaoBAzEuObgBA8gBAPgBAcICBxAjGLACGCfCAgcQABiABBgNwgIHECMYsQIYJ8ICBxAAGIAEGArCAgoQIxiABBiKBRgnwgIFEAAYgATCAggQABiABBjLAeIDBBgAIEGIBgGQBgg&sclient=gws-wiz-serp
    Blip = {use = true, size = 0.9, sprite = 500, color = 2},
    Marker = {use = true, marker = 20, rgb = {233, 88, 69}, bobUpAndDown = false, rotate = false, position = {xOffset = 0.7, yOffset = -0.0, zOffset = 0.6}},
    Crafts = {
        {
            Item = 'drug', 
            Label = 'Pack of drug',
            Object = 'hei_prop_hei_drug_pack_01a', -- Use this if you don't find the right objects for the craft: prop_cs_cardbox_01 
            ObjectSettings = {xOffset = 0.3, yOffset = -0.0, zOffset = 1.3, xRotate = 90.0, yRotate = 0.0, zRotate = 90.0}, -- The Object's position and rotation relative to the table
            MoveToMouse = true, -- The object is moving as you move your mouse
            CreatedAmount = 1,
            XpGive = 2, -- How many xp should one crafting give 
            SuccessChance = 70, -- In percentages
            CraftingTime = 10, -- The time to craft the item in seconds
            Level = 1, -- The level which is needed to use this craft
            Jobs = {''},
            Requirements = {
                {'drug_elements', 'Bolt', 6, false}, -- Item/amount/if the item should be removed when crafting
            },
        },
    },

},

Offset settings

The offset settings can be found at three places during the configuration at the camera or light settings and in the object settings. These offset coords means that they are relative to the crafting table object. Change these values to create the perfect looking crafting table.


Examples

The item is too low

ObjectSettings = {xOffset = 0.95, yOffset = -0.4, zOffset = 0.7, xRotate = 0.0, yRotate = 0.0, zRotate = 0.0},

With the wrong settings

ObjectSettings = {xOffset = 0.95, yOffset = -0.4, zOffset = 1.0, xRotate = 0.0, yRotate = 0.0, zRotate = 0.0},

With the good settings

Rotation is not right

ObjectSettings = {xOffset = 0.2, yOffset = -0.0, zOffset = 1.2, xRotate = 0.0, yRotate = 90.0, zRotate = 0.0},

With the wrong settings

ObjectSettings = {xOffset = 0.2, yOffset = -0.0, zOffset = 1.2, xRotate = 0.0, yRotate = 0.0, zRotate = 90.0},

With the good settings

Last updated

Was this helpful?