Configuration

Blueprint Items

Learn how to set up blueprints as items.

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.)

Dynamic Blueprint Items

To create a more dynamic item system, items can be linked to specific blueprints. This allows items to have unique variations based on their blueprint association.

For example, a Pistol blueprint should be stored as:

['pistol_blueprint'] = {
    name = 'pistol_blueprint',
    label = 'Pistol Blueprint',
    weight = 50,
    type = 'item',
    image = 'pistol_blueprint.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'A blueprint for crafting a pistol.'
}

This system ensures that blueprints can define item properties dynamically.

How the Search Function Works

In our script, everything before _blueprint acts as a search key. This means when searching for an item, the script will recognize pistol as the base item and match it to the pistol_blueprint. This allows easy categorization and retrieval of blueprint-linked items.


Giving the Item

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.


Item Image

You can use the following image for the item in your inventory:

Blueprint Image

Developer Note

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.

On this page