Blueprints
Various information regarding the blueprint system.
Blueprints are physical inventory items that gate access to certain crafting recipes. A player must carry the matching blueprint in their inventory to craft the recipe. Without it, the recipe appears locked. Because blueprints are real items, players can trade, store, and sell them just like any other item.
#Table of Contents
- How Blueprints Work
- Blueprint Uses (Durability)
- Marking a Recipe as Blueprint-Required
- Registering the Blueprint Item in Your Inventory
- Giving Blueprints to Players
- Admin Commands
- Configuration Reference
- Blueprint Metadata Reference
- Troubleshooting
- FAQ
#How Blueprints Work
- A craft in
Config.Craftsis marked withblueprint = true. - When a player opens a crafting bench, the system scans their inventory for
blueprintitems and reads each one'smetadata.recipefield. - If no matching blueprint is found, the craft is greyed out with a "Missing Blueprint" message.
- If the player has the blueprint, the craft is available (assuming level and material requirements are also met).
- After a successful craft, if the blueprint has finite uses, one use is deducted. When uses reach 0 the blueprint item is removed from inventory.
- If the player's inventory changes while they have the crafting menu open (e.g. they lose a blueprint in a trade), the menu refreshes automatically.
Blueprints use a generic item pattern. A single inventory item name (blueprint) is reused for all recipes. Differentiation happens entirely through metadata, the same way packs work in zyke_consumables. This means the inventory shows a custom label and image per blueprint (e.g. "Blueprint: SNS Pistol" with the pistol's icon) if the inventory supports it.
#Blueprint Uses (Durability)
Each blueprint has a uses value that determines how many times it can be used for crafting:
| Uses Value | Behavior |
|---|---|
-1 | Infinite: the blueprint never expires. This is the default. |
> 0 | Finite: one use is deducted per craft. When it reaches 0, the blueprint is removed from inventory. |
Uses are configured per recipe in Config.Settings.blueprintUses. A wildcard (["*"]) sets the default for all recipes not explicitly listed.
When giving a blueprint via the export or admin command, you can also pass a custom uses value that overrides the config. The priority is:
- Custom value: passed directly via export or command
- Specific config value:
Config.Settings.blueprintUses["weapon_snspistol"] - Wildcard config value:
Config.Settings.blueprintUses["*"] - Fallback:
-1(infinite)
When a blueprint has finite uses, its inventory description updates after each craft to show the remaining count (e.g. "Uses: 2"). When infinite, it shows "Uses: Infinite".
#Marking a Recipe as Blueprint-Required
In Config.Crafts, add blueprint = true to any craft entry:
Recipes without blueprint = true (or with it set to false) are always available as long as level and material requirements are met.
#Registering the Blueprint Item in Your Inventory
You need to register a single blueprint item in your inventory resource. This is required. Blueprints will not work without it.
#ox_inventory
#qb-core
A
blueprint.pngimage is included inextras/items/images/that you can copy to your inventory's images folder. However, each blueprint item will display the craft's own image viametadata.imageurl, so this image is only used as a fallback since some inventories don't support dynamic image changes.
#Giving Blueprints to Players
For the export reference (AddBlueprint) and usage examples, see Exports & Events.
#Admin Commands
All commands are defined in server/unlocked.lua and configurable in Config.Settings.commands. Each command supports multiple aliases (pass an array of strings) and permission gating.
#/craft:addbp
Gives you a blueprint item in your inventory.
| Argument | Description |
|---|---|
<item> | The item field from a craft in Config.Crafts (e.g. weapon_snspistol). Must be a recipe that has blueprint = true. |
random | Gives a random blueprint from all recipes that require one. |
[uses] | Optional. Override the number of uses. -1 for infinite, or any positive number. If omitted, uses the config value. |
Examples:
If the blueprint item is not registered in your inventory, you will see a console warning and an in-game error. See Troubleshooting.
#/craft:removebp
Removes a blueprint from your inventory matching the specified recipe.
| Argument | Description |
|---|---|
<item> | The recipe item name to match against (e.g. weapon_snspistol). Removes the first matching blueprint. |
Example:
#/craft:checkbp
Prints all blueprints in your inventory to the server console. Useful for debugging.
Output example:
#/craft:addxp
Gives you crafting XP.
| Argument | Description |
|---|---|
<amount> | Amount of XP to add (number). |
Example:
#Customizing Commands
All command names and permissions are configured in Config.Settings.commands:
To change a command name, just update the string. To add aliases, add more strings to the array. To change the permission, update the permission field (uses Z.hasPermission under the hood; server console always has access).
#Configuration Reference
#Config.Settings
| Field | Type | Description |
|---|---|---|
blueprintItem | string | The inventory item name used for blueprints. Must match the item registered in your inventory resource. |
blueprintUses | table<string, number> | Uses per recipe. Keys are item values from Config.Crafts. The special key "*" sets the default. -1 means infinite. |
#Config.Crafts (blueprint-related fields only)
| Field | Type | Description |
|---|---|---|
blueprint | boolean? | If true, the player must carry a matching blueprint item to craft this recipe. |
img | string? | Image used for the blueprint's inventory display. Falls back to the inventory image, then the placeholder. |
#Blueprint Metadata Reference
Each blueprint inventory item carries the following metadata:
| Field | Type | Description |
|---|---|---|
recipe | string | The item field from the matching Config.Crafts entry. Used to match the blueprint to its recipe. |
label | string | Display label in inventory (e.g. "Blueprint: SNS Pistol") |
imageurl | string | URL or path for the inventory image. Set from the craft's img field. |
uses | number | Remaining uses. -1 for infinite, positive integer for finite. Decremented after each craft. |
description | string | Inventory description text (e.g. "Crafting blueprint for SNS Pistol\nUses: Infinite") |
#Troubleshooting
#"Blueprint item is not registered in your inventory"
You tried to give a blueprint but the blueprint item doesn't exist in your inventory resource. Make sure you've added the item definition to your inventory:
- ox_inventory: Add the entry to
ox_inventory/data/items.lua - qb-core: Add the entry to
qb-core/shared/items.lua
See Registering the Blueprint Item for the exact code to copy.
#"No blueprint-required recipe found for that item"
You ran /craft:addbp <item> but the item you specified doesn't have blueprint = true in Config.Crafts. Either the item name is wrong, or the recipe isn't configured to require a blueprint.
#"Failed to add blueprint, check inventory space"
The blueprint item is registered but addItem returned false. The player's inventory is most likely full.
#Blueprint shows in inventory but recipe is still locked
The blueprint's metadata.recipe must exactly match the craft's item field. If you gave the blueprint before the config was updated, the metadata may be stale. Remove the old blueprint and give a new one.
#FAQ
Q: Do I need a separate inventory item for each blueprint? No. A single blueprint item is used for all recipes. The metadata differentiates them.
Q: Can players trade blueprints? Yes. Since blueprints are regular inventory items, players can drop, trade, or store them like any other item.
Q: What happens when a blueprint runs out of uses? The blueprint item is removed from the player's inventory. They'll need to obtain a new one to continue crafting that recipe.
Q: Can a blueprint be used at multiple crafting locations? Yes. As long as the recipe is available at that location and the player has the blueprint, it works anywhere.
Q: What if multiple recipes share the same item but only some require a blueprint? The blueprint check only applies to recipes where blueprint = true. Other recipes for the same item are unaffected.
Q: Does the crafting menu update in real-time when my inventory changes? Yes. When your inventory changes (items added, removed, or moved), the crafting menu automatically refreshes to reflect your current blueprint ownership and materials.
Q: Can I change the inventory item name from blueprint to something else? Yes. Change Config.Settings.blueprintItem and register that item name in your inventory resource instead. All blueprint logic uses this config value.
Q: How do I change how many uses a blueprint has? There are three ways:
- Per-blueprint: Pass a custom
usesvalue when giving the blueprint via export or command - Per-recipe: Set
Config.Settings.blueprintUses["weapon_snspistol"] = 3for a specific recipe - Global default: Set
Config.Settings.blueprintUses["*"] = -1for all recipes without a specific override
Note: changing the config only affects newly created blueprints. Existing ones in player inventories keep their original uses count.
