Studios
Craftinghouse-3.jpg

Installation

SoonCraftingQBCore · Qbox · ESX
PAGE 02 OF 07  ·  OVERVIEW → INSTALLATION → CONFIGURATIONdocs.glitchstudios.dev
Browse docs

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#

  1. Put the glitch-crafting folder in your resources folder. The folder name is case-sensitive and must stay glitch-crafting, because the item definitions call its exports by that name.

  2. Add the items. install/ox_inventory_items.lua has every item the default recipes use, for ox_inventory/data/items.lua. install/qb_core_items.lua and install/esx_items.sql cover 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.

  3. Copy install/images/*.png into your inventory's image folder (ox_inventory/web/images). That folder has pictures for the three bench items and the blueprint.

  4. 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.sql once by hand.

  5. Add to server.cfg, after ox_lib, oxmysql, your framework, ox_inventory and ox_target:

    ensure glitch-crafting
    add_ace group.admin command.craftadmin allow
    

    Start any of the optional Glitch Studios resources before it, for example:

    ensure glitch-xpSystem
    ensure glitch-criminaltablet
    ensure glitch-uiElements
    ensure glitch-crafting
    
  6. Permissions. ServerConfig.AdminGroup (group.admin) gets the /craftadmin command, and every panel action checks the ServerConfig.AdminAce ace (command.craftadmin). Grant that ace to anyone else who should use the panel.

  7. Restart the server and place your first benches with /craftadmin (Benches tab). The package ships with no benches in the world. Config.Benches has two commented examples.

[!NOTE] Items other than the benches and the blueprint use <item name>.png from your image folder. Common item packs cover the usual materials. The custom ones (hardened_alloy_plate, firearm_parts, military_circuit, nylon_webbing, blasting_cap and the car_* parts) need a picture of your own, and so do hacking_device.png, glass_cutter.png and heavy_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.