This page contains all information you need to configure gfg_crafting, if you have any questions feel free to reach out to us on our discord.
If you would like to use the benches used in the preview video, head to our discord and look for the snippets channel of that script.
Variables that are marked as (Optional) do not need to be set (but can be in the case of further customization). In the instances where (Optional) variables are related to "counts" the default value is always 1
Language sets which Locale to use, you can find available locales in [gfg_crafting/locale/], we will add more as they become available but feel free to add your own.
language ="en",
debug
Debug should only used in a development environment.
Determines whether to send debug print statements to the client and server when using the script.
debug =false
enhancedDebug
Enhanced Debug should only be used in a development environment.
Determines whether to send enhanced debug print statements to the client and server when using the script.
enhancedDebug =false,
interactionMethod
Determines the method in which players interact with a bench. Currently supported options are: "target", "textui", "3dtext".
interactionMethod ="target",
interactionDistance
Determines the distance from the bench that the interaction is activated.
interactionDistance =2,
target
Determines wich target resource to use.
Currently supported options are"
"ox_target"
"qb_target"
target ="ox_target",
inventory
Determines wich inventory resource to use.
Currently supported options are:
"ox_inventory"
"qb_inventory"
inventory ="ox_inventory",
canBenchTableInWater
Your housing script may place certain shells under the map, in those cases the shell may be registered as "Underwater" if this is the case you may need to set this to false.
Determines if the player can place a bench while in or under water.
canPlaceBenchInWater =false
canPlaceBenchOnRoad
May or may not work on all roads.
Determines if the player can place a bench on a road
canPlaceBenchOnRoad =false,
Config.Bench
This is the configuration section for when the player is placing, and packing a bench.
Skill Check that is used when the player attempts to place or pack the bench.
enable = Determines whether the skill check will be used or not.
difficulty = Determines the difficulty of the skill check, information on how to customize this can be found here (https://overextended.github.io/docs/ox_lib/Interface/Client/skillcheck).
keys = Determines the keys used during the skill check, information on how to customize this can be found here (https://overextended.github.io/docs/ox_lib/Interface/Client/skillcheck).
If 'true' the player will succeed with the place/pack of the bench regardless of the result of the skill check. If 'false' the bench will remain if the player fails the skill check.
getItemOnFailedPack =true,
durabilityLossOnFailedPack
If 'true' the bench will experience random durability loss when the player fails the place/pack skill check.
durabilityLossOnFailedPack =true,
durabilityLossOnFailedPackAmount
Durability Loss can be a float! (00.01 = 100.00)
Determines the amount of durability the bench loses when the player fails the place/pack skill check. If you want it to be a static value set the 'min' and 'max' to the same number.
durabilityLossOnFailedPackAmount = { min =1, max =5,},
progressBar
Progress Bar that is used when the player is placing or packing the bench.
time = Determines the time it takes for the progress bar to complete (in milliseconds).
progressBar = { time =1000, },
propRotateSpeed
Determines how fast the preview prop spins in the bench menu.
propRotateSpeed =1.0,
placementKeys
Determines the keys used when placing a bench.
place = This key is used to place the bench (Default: Space).
cancel = This key is used to cancel placement (Default: G).
rotateRight = This key is used to rotate the bench right (Default: Arrow Right).
rotateLeft = This key is used to rotate the bench left (Default: Arrow Left).
rotateSpeed = This Determines the speed that the bench is rotated.
If 'true' shows all crafting options when viewing a bench. Otherwise, only shows items the player can assemble based on what they have in their inventory.
showAllCraftingOptions =true,
showAllRepairOptions
If 'true' shows all repair options for that bench. Otherwise, only shows repair options the player can use based on what they have in their inventory.
showAllRepairOptions =true,
showItemsNeeded
If 'true' shows the items needed when hovering over the item in the crafting menu.
showItemsNeeded =true,
returnItemsOnFail
If 'true' returns the items needed to a player when they fail crafting.
returnItemsOnFail =true,
repairOptions
Determines the default repair options.
label = Determines the label of the repair option in the menu.
items = Determines the items needed for this repair option.
label = Determines the label of the item in the menu.
name = The item name within your inventory resource.
count = (Optional) Determines the amount the player needs.
minAmount = Determines the minimum amount this option will repair a crafting bench.
maxAmount = Determines the maximum amount this option will repair a crafting bench.
skillCheck = Determines the skillcheck for this repair option.
This is a list of static crafting benches, these are saved in the database but do not have a prop associated with them and cannot be packed up or moved.
Static Benches are based on box zones, since you already have ox_lib installed you have a tool to create them with ease, simply run the zone creation tool for a box zone (/zone box). More information on how this tool works can be found here (https://overextended.github.io/docs/ox_lib/Zones/Shared#zone-creation-script)
Each static bench can have an entry in this table.
The key is the internal name of the static bench (what would be seen in the database) and needs to be unique.
label = This is the label of the static bench that is used in menu's and does not need to be unique.
type = Determines the bench options to use based on type, needs to match the 'type' of one of the benches in 'Config.Benches'.
coords = The coordinates of the box.
size = The size of the box (length, width, height).
rotation = The rotation of the box.
camera = Determines the camera settings of static bench. All static benches use a "Faux Prop" to point the camera at even though it will never be seen.
forwardOffset = Determines how far off the front of the bench to set the camera. (Should always be negative as positive will put you on the other side of the bench).
offset = Determines the positional offset of the camera (In this example the 'Z' value is 0.5, wich means the camera will be 0.5 higher than usual).
entityAngleOffset = Determines the rotational offset of the camera (In this example the 'Z' value is -0.5, wich means the camera will be pointed 0.5 lower than usual).
transitionTime = Determines the time it takes for the camera to transition.
propForwardOffset = Determines how far off the front of the bench to set the preview prop.
propOffset = Determines the preview prop offset relative to the box zone coords.
propHeading = Determines the preview prop heading.
The key of each bench is the internal name of the bench, needs to be unique.
name
The name of the bench type used in menu's.
name ="Showcase",
type
The type of the bench, needs to match the internal name of the bench set above.
type ="showcase",
benchNoun
The noun describing the bench, mainly used in menu's.
benchNoun ="Bench",
assembleVerb
The verb describing action on the bench, mainly used in menu's.
assembleVerb ="Assemble",
benchItem
The item used to place this type of bench.
benchItem ="showcasebench",
prop
The prop that represents this bench type.
prop ="gr_prop_gr_bench_04b",
camera
Determines the camera settings of static bench. All static benches use a "Faux Prop" to point the camera at even though it will never be seen.
forwardOffset = Determines how far off the front of the bench to set the camera. (Should always be negative as positive will put you on the other side of the bench).
offset = Determines the positional offset of the camera (In this example the 'Z' value is 0.5, wich means the camera will be 0.5 higher than usual).
entityAngleOffset = Determines the rotational offset of the camera (In this example the 'Z' value is -0.5, wich means the camera will be pointed 0.5 lower than usual).
transitionTime = Determines the time it takes for the camera to transition.
propForwardOffset = Determines how far off the front of the bench to set the preview prop.
propOffset = Determines the preview prop offset relative to the box zone coords.
propHeading = Determines the preview prop heading.
Animations and SkillChecks can be set here with their full variables (as done in Config.Defaults) or by referencing one the default options.
Determines the default steps for this bench type that are used if a specific item's steps are omitted. (If you wish to not use these then set steps = { {label = "NULL"}, }, ).
label = The label of the step, used in menu's.
animation = (Optional) Determines the animation to be used for this step (In this example it uses the animation defined in 'Config.DefaultAnimations.drilling').
time = (Optional) Determines the progress bar time for this step (In Seconds).
skillCheck = (Optional) Determines the skillcheck to be used for this step (In this example it uses the skillcheck defined in 'Config.DefaultSkillchecks.medium').
Determines the default items needed for this bench type if a specific item's needed are omitted (If you wish to not use this then set itemsNeeded = { {label = "NULL"}, },)
name = The item name in your inventory resource.
label = The label of the item, used in menu's.
count = (Optional) The amount of the item that is needed.
Determines the items that can be crafted at this bench type.
Items are sorted into "Categories" which can be named whatever you like, in this example we have "Category 1" and "Category 2".
Each craft able item in each category can have the following variables:
rewardedItem = Determines the item that is rewarded when crafted.
label = The label of the item, used in menu's.
name = The item name in your inventory resource.
count = (Optional)The amount of the item the player receives.
prop = The prop that is displayed when this item is selected.
itemsNeeded = (Optional) Determines the items needed to craft this item, if omitted, uses the bench's itemsNeeded.
steps = (Optional) Determines the items steps needed to craft, if omitted, uses the bench's steps. (Steps are completed in the order given in this list.)