Requirements#
| Framework | qbx_core (Qbox), qb-core (QBCore) or es_extended (ESX), detected at start. Built and tested on Qbox. |
| Resources | ox_lib, oxmysql, ox_target (qb-target also works), ox_inventory |
| Inventory | ox_inventory for the gunsmith and the serial scratcher. Crafting, the queue, salvage and placed benches also run on qb-inventory and the ESX inventory. The ESX inventory has no item metadata, so blueprint items cannot carry a recipe there. |
| Server | A FiveM server artifact with OneSync enabled. |
| Database | MariaDB, or MySQL 8. The SQL avoids MariaDB-only syntax. |
| Optional | glitch-xpSystem (levels, XP, boosters, perks), glitch-criminaltablet (crew access to placed benches, REP requirements, robbery rewards, blueprint buy-back at its Fence, bench cards on its map), glitch-lootBox (loot crates), glitch-uiElements (the /blueprints drawer), glitch-mechanicJob (the mechanic bench tier and its recipes), glitch-abstraction (client notifications), glitch-admin (reasons behind loot drops in staff item logs), screencapture (prop photos in the admin panel) |
Every optional resource is checked at run time. When one is not running, the feature that needs it is skipped.
Tested with qbx_core 1.24.0, ox_inventory 2.48.0, ox_lib 3.40.0, ox_target 1.17.2 and oxmysql 2.14.2 on MariaDB.
Installation steps#
Put the
glitch-craftingfolder in your resources folder. The folder name is case-sensitive and must stayglitch-crafting, because the item definitions call its exports by that name.Add the items.
install/ox_inventory_items.luahas every item the default recipes use, forox_inventory/data/items.lua.install/qb_core_items.luaandinstall/esx_items.sqlcover QBCore and ESX. Skip items your server already has. Recipes whose item does not exist on your server are hidden, and the console lists them at start.Copy
install/images/*.pnginto your inventory's image folder (ox_inventory/web/images). That folder has pictures for the three bench items and the blueprint.The tables are created when the resource starts, and older tables get their new columns. If your database user cannot create tables, run
install/crafting.sqlonce by hand.Add to
server.cfg, after ox_lib, oxmysql, your framework, ox_inventory and ox_target:ensure glitch-crafting add_ace group.admin command.craftadmin allowStart any of the optional Glitch Studios resources before it, for example:
ensure glitch-xpSystem ensure glitch-criminaltablet ensure glitch-uiElements ensure glitch-craftingPermissions.
ServerConfig.AdminGroup(group.admin) gets the/craftadmincommand, and every panel action checks theServerConfig.AdminAceace (command.craftadmin). Grant that ace to anyone else who should use the panel.Restart the server and place your first benches with
/craftadmin(Benches tab). The package ships with no benches in the world.Config.Bencheshas two commented examples.
[!NOTE] Items other than the benches and the blueprint use
<item name>.pngfrom your image folder. Common item packs cover the usual materials. The custom ones (hardened_alloy_plate,firearm_parts,military_circuit,nylon_webbing,blasting_capand thecar_*parts) need a picture of your own, and so dohacking_device.png,glass_cutter.pngandheavy_drill.png.
Updating#
Back up the config/ folder and locales/, replace the rest of the resource, then copy your changes back in. Compare your files with the new defaults first, since an update can add settings. New database columns are added on start. Benches and recipes made in /craftadmin live in the database, so an update does not touch them.