Configuration

Learn how to configure the Crafting resource.


Changing the Framework

  1. Open config.lua located in the resource folder.

  2. Locate the following line:

    Framework = 'auto'
  3. Update the value to your desired framework. Supported frameworks include:

    • auto - Automatically detect the framework.
    • esx-legacy
    • esx
    • qbcore
    • qbox

    If you want to add a custom framework, refer to the custom framework guide.

  4. Save the file and restart the resource.


Changing the Translation

  1. Open config.lua in the resource folder.

  2. Locate the following line:

    Translation = 'en-US'
  3. Replace 'en-US' with the language code of your choice. A list of supported languages can be found in the translations folder.

    • To add a new language, copy the en-US.lua file and rename it with your desired language code. Modify the file contents as needed.
  4. Save the file and restart the resource.


Configuring Bench Options

  1. Open config.lua in the resource folder.

  2. Find the BenchOptions section:

    BenchOptions = {
         allowMultipleUsers = false, -- Allow multiple users to use the same bench at the same time
         isInvincible = false, -- Make the player invincible while using the bench (can only be false if allowMultipleUsers is disabled)
         removeBlueprintOnCraft = false, -- Remove the blueprint from the player after crafting
         enableSpotlight = true, -- Enable the spotlight for the bench
         enablePortableBenches = true, -- Enable portable benches. This will allow the player to place the bench themselves with items. (this needs to be setted up, check out the documentation)
         enableBlueprintItems = false, -- Enable the blueprint items. The player will need to have the blueprint item in their inventory to craft the item. (this needs to be setted up, check out the documentation)
         colors = {
             primary = '#00d9ff', -- The primary color of the bench
             neutral = 'hsl(20, 14.3%, 4.1%)' -- The neutral color of the bench
         },
         hideUnavailableRecipes = false, -- Hide the recipes that the player can't craft
         filterMissingBlueprintRecipes = false, -- Filter out the recipes that the player doesn't have the blueprint for
         blueprintDurability = { -- Only works if enableBlueprintItems and removeBlueprintOnCraft is enabled
             isEnabled = false, -- Enable or disable blueprint durability
             defaultUses = 5 -- The default uses of the blueprint
         },
         adminBenchAccess = true, -- Allow admins to use all benches
    }
  3. Modify the options as needed. Available options include:

    • allowMultipleUsers: Allow multiple users to use the bench simultaneously.
    • isInvincible: Make the player invincible while crafting (only works if allowMultipleUsers is false).
    • removeBlueprintOnCraft: Remove the blueprint from the player after crafting.
    • enableSpotlight: Enable spotlight effects for the bench.
    • enablePortableBenches: Enable portable benches, allowing players to place them with specific items.
    • colors: Customize the primary and neutral colors for the bench.
    • hideUnavailableRecipes: Hide recipes that the player can't craft.
    • filterMissingBlueprintRecipes: Filter out recipes that the player doesn't have the blueprint for.
    • blueprintDurability: Set blueprint item durability options. Only works if enableBlueprintItems and removeBlueprintOnCraft are enabled.
    • adminBenchAccess: Allow admins to use all benches.
  4. Save the file and restart the resource.


Setting Up Portable Benches

  1. Open config.lua in the resource folder.

  2. Find the BenchOptions section:

    BenchOptions = {
        enablePortableBenches = false,
        ...
    }
  3. Change enablePortableBenches to true.

  4. Save the file and restart the resource.

  5. Navigate to your inventory resource (or item configuration), and add the following item:

    ['crafting_bench'] = {
        name = 'crafting_bench',
        label = 'Crafting Bench',
        weight = 100,
        type = 'item',
        image = 'crafting_bench.png',
        unique = true,
        useable = true,
        shouldClose = true,
        combinable = nil,
        description = 'Place a crafting bench.'
    },

    (Example for QBCore. Configuration may vary depending on your inventory resource. The item name must be crafting_bench and must be unstackable.)

  6. Save the file and restart the resource.

Players can now place benches using the crafting_bench item. The item must include metadata like this:

metadata = {
    benchType = 'UUID', -- The UUID of the bench type
}

Replace UUID with the desired bench type UUID, which can be found in the editor.

To give the item to a player:

  • Open the editor and click the "Give item" button on the desired bench type.
  • Use one of the resource's commands.
  • Use one of the resource's exports.

Setting Up Blueprints as Items

  1. Open config.lua in the resource folder.
  2. Locate the BlueprintItems section:
    BlueprintItems = {
        enableBlueprintItems = false,
        ...
    }
  3. Change enableBlueprintItems to true.
  4. Save the file and restart the resource.
  5. Navigate to your inventory resource (or item configuration), and add the following item:
    ['blueprint'] = {
        name = 'blueprint',
        label = 'Blueprint',
        weight = 100,
        type = 'item',
        image = 'blueprint.png',
        unique = true,
        useable = true,
        shouldClose = true,
        combinable = nil,
        description = 'Craft items with blueprints.'
    },
    (Example for QBCore. Configuration may vary depending on your inventory resource. The item name must be blueprint.)

Blueprint items must include metadata:

metadata = {
    blueprint = 'UUID', -- The UUID of the blueprint
}

Replace UUID with the UUID of the desired blueprint, which can be found in the editor.

To give the item to a player:

Blueprints are recognized based solely on the metadata and the item name. For example, if you have an item named pistol_blueprint, the resource will identify it as a blueprint for the pistol.