Skip to content

cc_crafting: install

Back to the overview. Next: configuration.

Back to the overview. Next: configuration.

Requirements

cc_lib1.6.0 or newer (hard dependency). 1.5.x boots, but ready notices fall back to a toast
oxmysqlhard dependency (jobs, XP and cards are stored)
Frameworkoptional: Qbox, QBCore, ESX, ox_core, or none
Inventoryoptional: ox_inventory (full support, incl. tool durability per slot), qb-inventory, qs, codem, ... through cc_lib
Targetoptional: ox_target, qb-target, interact. With none, cc_lib shows [E] prompts at the same spots
Phoneoptional: lb-phone, yseries, gksphone, qs, npwd (ready notices). Toast otherwise

Install (five minutes)

  1. Drop the cc_crafting folder into your resources.
  2. server.cfg, in this order:
    ensure oxmysql
    ensure <your framework>        # qbx_core / qb-core / es_extended / ox_core, if any
    ensure <your inventory>        # ox_inventory / qb-inventory / ..., if any
    ensure cc_lib
    ensure cc_crafting
    add_ace group.admin cc_crafting.admin allow
  3. Items. Paste the block for your inventory from install/items/: ox_inventory.lua (into ox_inventory/data/items.lua), qb-core.lua (into qb-core/shared/items.lua) or esx.sql (run it). Skip any item you already have; keep yours. Images: install/README.md.
  4. Start the server. The database tables create themselves. The console prints database schema migrated to version 2 the first time, and lists any recipe item your inventory does not define.

Done: 16 stations are on the map (hidden, no blips). Turn blips on with Config.Features.blips = true while you learn where they are.

Upgrading

  1. Stop the server, replace the folder, keep your config.lua, server/config.lua, locales/ and custom/ (they stay open under escrow; diff them against the new ones).
  2. Start. The schema migrates itself (database schema migrated to version N).
  3. Read the CHANGELOG.md (in the download) for anything marked Breaking.

Uninstall

Remove ensure cc_crafting. The three tables (cc_crafting_meta, cc_crafting_players, cc_crafting_jobs) stay until you drop them.

Data

Three tables, created and upgraded on boot: cc_crafting_meta (schema version), cc_crafting_players (XP, card state) and cc_crafting_jobs (open jobs and 30 days of closed ones). sql/install.sql is the reviewable copy. Keyed by the framework's character id.

Importing from acc_crafting / acc_manufacturing

Stop both resources (the importer refuses while either runs), then:

cc_crafting_import acc dry     # counts only, changes nothing
cc_crafting_import acc run     # copy

Players' XP and card state merge (the greater value wins, so running it twice changes nothing); open jobs copy once per database and can be collected but not cancelled (their inputs were not recorded). Jobs acc_crafting was in the middle of delivering are listed for you to check by hand, never copied. The acc tables are only read.