Config
Explanations for all config values.
General Information
The editable configuration is located in
shared/unlocked/config.lua.Because we have extensive configuration files, nested tables is an inevitability. To keep track of which values are for which table we use the
tablename.valueconvention. This can also stack, for examplePlaceableBenches[x].boxZone.length.Blueprints are real inventory items, so you also have to register the blueprint item in your inventory resource. See Blueprints for the exact code.
#Config.Settings
Master settings that control debug logging, leveling, blueprints, and the admin commands.
#debug
Enables debug logging for the resource. Only enable this in development environments because it prints extra diagnostic output to the console.
Example:luadebug = false
#Levels
Controls how much experience it takes to reach each level. XP is earned from a craft's
experienceToGive, and the required amount grows every level so the progression keeps a curve instead of flattening out.
Example:luaLevels = { baseXp = 100, xpMultiplier = 1.5, }
#Levels.baseXp
The base amount of XP required for the first level-up. Every level after that builds on top of this value.
Example:luabaseXp = 100
#Levels.xpMultiplier
The factor the required XP is multiplied by for each next level. With
1.5, the requirement grows 50% per level: 100 for level 1, 150 for level 2, 225 for level 3, 337.5 for level 4, and so on. Note that these stack, so reaching level 3 takes 100 + 150 = 250 XP in total.
Example:luaxpMultiplier = 1.5
#blueprintItem
The inventory item name used for blueprints. This has to match the item you register in your inventory resource, otherwise blueprints will not work.
Example:luablueprintItem = "blueprint"
#blueprintUses
Controls how many times a blueprint can be used before it is consumed. A value of
-1means infinite uses, any other number limits the blueprint to that many crafts. The["*"]entry is the default for all recipes that don't have a specific number set, and an exact recipe name takes precedence over the wildcard. This can be overridden per blueprint when giving it through the export or the admin command.
Example:luablueprintUses = { ["*"] = -1, }
#blueprintUses[x]
A per-recipe override. Use a craft's
itemname as the key to set a fixed amount of uses for that recipe only, falling back to the["*"]default for everything else.
Example:luablueprintUses = { ["weapon_snspistol"] = 3, }
#commands
The admin commands the resource registers. Each entry defines the command strings that trigger it and the permission required to run it.
Example:luacommands = { addBlueprint = { commands = {"craft:addbp"}, permission = "command", }, removeBlueprint = { commands = {"craft:removebp"}, permission = "command", }, checkBlueprints = { commands = {"craft:checkbp"}, permission = "command", }, addXp = { commands = {"craft:addxp"}, permission = "command", }, }
#commands.addBlueprint
Gives you a blueprint for a specific recipe, or a random blueprint if you pass
random. The full command reference lives in Blueprints.
Example:luaaddBlueprint = { commands = {"craft:addbp"}, permission = "command", }
#commands.removeBlueprint
Removes a matching blueprint from your inventory.
Example:luaremoveBlueprint = { commands = {"craft:removebp"}, permission = "command", }
#commands.checkBlueprints
Prints all blueprints in your inventory to the console. Useful for debugging.
Example:luacheckBlueprints = { commands = {"craft:checkbp"}, permission = "command", }
#commands.addXp
Gives you crafting XP.
Example:luaaddXp = { commands = {"craft:addxp"}, permission = "command", }
#commands[x].commands
The command strings that trigger the action. Pass an array with multiple strings to register aliases.
Example:luacommands = {"craft:addbp", "addbp"}
#commands[x].permission
The permission required to run the command. The default uses the
commandACE permission, and the server console always has access.
Example:luapermission = "command"
#Config.BenchTypes
The workbench types you can assign to your workbenches. A type is just a name and a label; the real work happens when a craft or a bench references it. Every bench placed in the world has a type, and crafts can be restricted to one or more types.
#BenchTypes[x]
A bench type entry. The key is the type name you reference in
Config.Crafts.benchType, the label is what players see in the UI.
Example:lua["weapons"] = {label = "Weapon Workbench"},
#BenchTypes[x].label
The label shown in the UI for this bench type.
Example:lualabel = "Weapon Workbench"
#Config.PlaceableBenches
The workbenches players can place directly in the world. Each entry defines the prop that spawns, how close you need to be to interact, and the box zone used for targeting.
#PlaceableBenches[x]
A placeable workbench entry. The key is the bench's item name — this is the item players hold to place the bench.
Example:lua["crafting_bench"] = { label = "Crafting Workbench", prop = "prop_tool_bench02", targetDistance = 1.5, boxZone = {length = 2.0, width = 1.2, minZ = -1.0, maxZ = 0.0}, },
#PlaceableBenches[x].label
The label shown when targeting the placed bench.
Example:lualabel = "Crafting Workbench"
#PlaceableBenches[x].prop
The prop model spawned when the bench is placed. Find models here.
Example:luaprop = "prop_tool_bench02"
#PlaceableBenches[x].targetDistance
How close a player has to be to interact with the placed bench.
Example:luatargetDistance = 1.5
#PlaceableBenches[x].boxZone
The box zone used for targeting the bench. The child values define the zone dimensions and vertical bounds.
Example:luaboxZone = {length = 2.0, width = 1.2, minZ = -1.0, maxZ = 0.0}
#PlaceableBenches[x].boxZone.length
The length of the box zone.
Example:lualength = 2.0
#PlaceableBenches[x].boxZone.width
The width of the box zone.
Example:luawidth = 1.2
#PlaceableBenches[x].boxZone.minZ
The lower vertical bound of the box zone.
Example:luaminZ = -1.0
#PlaceableBenches[x].boxZone.maxZ
The upper vertical bound of the box zone.
Example:luamaxZ = 0.0
#Config.Images
Lets you override the inventory images of the items used in your crafts, so you don't have to paste the same URL everywhere. The resource normally pulls the image from your inventory's image path, so this table is only needed when you want a specific image or your inventory doesn't ship one for the item. You can use a direct URL, or reference an image name you placed in
zyke_crafting/nui/images.
#Images[x]
An image entry. The key is the item name, the value is the image URL or the image filename from the
nui/imagesfolder.
Example:lua["iron"] = "https://r2.fivemanage.com/mS9apQyi6ahmBBRtVnQAv/iron.png"
#Config.Crafts
The crafting recipes. Each entry defines what gets crafted, what it costs, the level and bench type required, and how much XP it awards. The script ships with example recipes you can copy and build from.
#Crafts[x]
A single crafting recipe.
Example:lua{ item = "weapon_snspistol", label = "SNS Pistol", level = 3, timeToCraft = 5, amount = 1, experienceToGive = 50, blueprint = true, benchType = "weapons", img = "https://r2.fivemanage.com/mS9apQyi6ahmBBRtVnQAv/weapon_snspistol.png", items = { {label = "Iron", item = "iron", amount = 3, img = Config.Images["iron"]}, }, tools = { {label = "Screwdriver", item = "screwdriverset", amount = 1, img = Config.Images["screwdriverset"]}, }, },
#Crafts[x].item
The name of the item given when the craft finishes. This is also what you reference when giving blueprints and when restricting blueprint uses per recipe.
Example:luaitem = "weapon_snspistol"
#Crafts[x].label
The display name of the crafted item, shown throughout the UI.
Example:lualabel = "SNS Pistol"
#Crafts[x].level
The crafting level required to craft this item. If you're below it, the recipe stays locked until you level up. Combined with
benchType, this also lets you keep certain benches for higher-level crafters.
Example:lualevel = 3
#Crafts[x].timeToCraft
How long the craft takes, in seconds.
Example:luatimeToCraft = 5
#Crafts[x].amount
How many of the item are given per craft. Defaults to
1if omitted.
Example:luaamount = 1
#Crafts[x].experienceToGive
The XP awarded when the craft finishes. Defaults to
0if omitted.
Example:luaexperienceToGive = 50
#Crafts[x].blueprint
Set to
truewhen this recipe requires a blueprint to craft. Defaults tofalse. The blueprint is matched by the craft'sitemname, so the same item can have both blueprint-locked and free recipes at different levels.
Example:luablueprint = true
#Crafts[x].benchType
Restricts the craft to benches placed with a matching type. Use a single string like
"weapons"to allow it at one bench type, or a table like{"weapons", "general"}to allow it at several. Remove the field or set it tonilto make the craft available at every bench.
Example:luabenchType = "weapons"
#Crafts[x].img
The image shown for the craft in the UI. Falls back to your inventory's image for the item if omitted.
Example:luaimg = "https://r2.fivemanage.com/mS9apQyi6ahmBBRtVnQAv/weapon_snspistol.png"
#Crafts[x].items
The materials consumed when you craft the item. Every listed item is removed from your inventory on craft.
Example:luaitems = { {label = "Iron", item = "iron", amount = 3, img = Config.Images["iron"]}, }
#Crafts[x].items[y]
A single material requirement.
Example:lua{label = "Iron", item = "iron", amount = 3, img = Config.Images["iron"]},
#Crafts[x].items[y].label
The display name of the material, shown in the UI.
Example:lualabel = "Iron"
#Crafts[x].items[y].item
The inventory item name of the material.
Example:luaitem = "iron"
#Crafts[x].items[y].amount
How many of the material are consumed per craft.
Example:luaamount = 3
#Crafts[x].items[y].img
The image shown for the material. Falls back to your inventory's image for the item if omitted.
Example:luaimg = Config.Images["iron"]
Items vs. Tools
The difference between
itemsandtoolsis that materials are consumed when you craft, while tools are not. Tools just need to be in your inventory — and they stay there.
#Crafts[x].tools
The tools required to craft the item. Unlike
items, tools are not consumed — they just need to be in your inventory, and they stay there after the craft.
Example:luatools = { {label = "Screwdriver", item = "screwdriverset", amount = 1, img = Config.Images["screwdriverset"]}, }
#Crafts[x].tools[y]
A single tool requirement.
Example:lua{label = "Screwdriver", item = "screwdriverset", amount = 1, img = Config.Images["screwdriverset"]},
#Crafts[x].tools[y].label
The display name of the tool, shown in the UI.
Example:lualabel = "Screwdriver"
#Crafts[x].tools[y].item
The inventory item name of the tool.
Example:luaitem = "screwdriverset"
#Crafts[x].tools[y].amount
How many of the tool are required.
Example:luaamount = 1
#Crafts[x].tools[y].img
The image shown for the tool. Falls back to your inventory's image for the item if omitted.
Example:luaimg = Config.Images["screwdriverset"]
Having trouble?
If you feel like we have explained any value poorly, please let us know on Discord so that we can update the documentation so that everyone understands it easily.