GhiaccioScripts

Weapon Editor

Installation

Dependencies, ensure order and permissions for the Weapon Editor.

#1. Copy the resources

  1. Copy ghiaccio_weaponeditor into resources/. Keep the folder name: the NUI and the patch path depend on it.
  2. Copy ghiaccio_weaponeditor_patch (the sibling folder in the download) into resources/ as a separate resource.

#2. server.cfg

cfg
ensure ox_lib
# ensure oxmysql                        # only with Config.Storage = 'oxmysql'
# ... your framework (es_extended / qb-core / qbx_core) and every other resource (weapon packs included)
ensure ghiaccio_weaponeditor
ensure ghiaccio_weaponeditor_patch      # AFTER every other WEAPONINFO resource so the patch wins

# REQUIRED: lets the editor write the patch (without it HOT/RESTART values never reach players)
add_filesystem_permission ghiaccio_weaponeditor write ghiaccio_weaponeditor_patch

# permissions (cumulative: admin > hot > edit > use)
add_ace group.admin ghiaccio_weaponeditor.admin allow   # everything: global presets, rollback, rescan
add_ace group.admin ghiaccio_weaponeditor.hot allow     # HOT fields, ammo, attachments
add_ace group.mod   ghiaccio_weaponeditor.edit allow    # LIVE fields
add_ace group.mod   ghiaccio_weaponeditor.use allow     # read-only and preview

# per-player example:
# add_ace identifier.license:YOUR_LICENSE ghiaccio_weaponeditor.admin allow

# optional Discord audit webhook (or ServerConfig.Webhook in config_server.lua; never in config.lua)
# set gwe_webhook "https://discord.com/api/webhooks/..."

#3. Permission levels

Levels are cumulative: admin > hot > edit > use.

ACEAllows
ghiaccio_weaponeditor.useRead-only and preview
ghiaccio_weaponeditor.editLIVE fields
ghiaccio_weaponeditor.hotHOT / RESTART fields, ammo, attachments
ghiaccio_weaponeditor.adminEverything: global presets, rollback, rescan

Besides ACE you can map framework groups (Config.Permissions.groups) and jobs with a minimum grade (Config.Permissions.jobs, limited to the edit level) in config.lua. See Configuration.

#4. Framework notes

Detection is automatic (Config.Framework = 'auto'); force 'esx', 'qbcore', 'qbox' or 'standalone' if needed. The framework is only used for permissions (ESX xPlayer.getGroup(), QBCore HasPermission, Qbox/standalone ACE group.<name>).

#5. First start

  1. Start the server and check the console for errors.
  2. In game run /weaponeditor (optionally set a key with Config.Keybind).
  3. If the mouse stays locked, use the emergency exit /weaponeditor_close.
  4. Run /wepeditor_selftest once (see Commands) to verify the patch can be written.