Studios
Govhouse-3.jpg

Installation

SoonGovQbox
PAGE 02 OF 06  ·  OVERVIEW → INSTALLATION → CONFIGURATIONdocs.glitchstudios.dev
Browse docs

Requirements#

The server

Framework qbx_core (Qbox). ESX and plain QBCore are not supported.
Resources ox_lib, oxmysql, ox_target
Ledger glitch-treasury (Glitch Studios, any 1.x release). It books the money and owns the ledger the terminal reads. It is a manifest dependency, so glitch-gov will not start without it.
Admin menu glitch-uiElements, for /govadmin. It is checked at run time; the rest of the resource works without it.
Database MariaDB through oxmysql. The tables are created on first start.
Optional sd-phone (budget emails, the tablet app and the web MDT), omes_banking (department society balances and the armoury fund), qbx_management (Boss office place), a clothing resource with an outfit menu event (Wardrobe place), glitch-admin (role tracking for CAD tags), glitch-radio (radio desk on the website), glitch-bridge and glitch-gov-web (website link), qbx_police (reads the armoury and workshop settings)

Each optional resource is detected at run time. When it is not running, its feature is skipped.

Installation steps#

1. Place the folder. Copy the glitch-gov folder into your resources folder. The folder name is case-sensitive and must stay glitch-gov.

2. Database. The tables glitch_gov_levers, glitch_gov_changes, glitch_gov_settings, glitch_gov_members, glitch_gov_armoury_log and gov_source_grants are created when the resource starts. gov_duty_shifts is created when the website link is on. If your database user cannot create tables, run install.sql by hand.

3. Items and images. The resource adds no items. The armoury list in config/armoury.lua names items that must already exist in your inventory (for example handcuffs, radio and plate_armor). Entries for items you do not have cannot be issued.

4. Jobs. Create the parliament jobs in qbx_core and match them in Config.State.Governments and Config.State.Jobs. The shipped config uses federalgov and nswgov.

5. server.cfg. Start glitch-gov after its dependencies:

ensure ox_lib
ensure oxmysql
ensure qbx_core
ensure ox_target
ensure glitch-uiElements
ensure glitch-treasury
ensure glitch-gov

6. Permissions. Give staff access to /govadmin:

add_ace group.admin command.govadmin allow
add_principal identifier.license:YOUR_LICENSE group.admin

7. Places. Start the server, run /govadmin, open the Places tab and add a terminal where members should work.

8. Website link (optional). In server.cfg, use set, not setr:

set glitch_gov_bridge_url "wss://bridge.example.com"
set glitch_gov_bridge_secret "same value as BRIDGE_SECRET in the website .env"
set glitch_gov_server_name "My Server"

The link is off while glitch_gov_bridge_url is empty.

Updating#

  • Back up config.lua, the files in config/ and your database before you replace the folder.
  • Everything admins change in /govadmin is stored in the database and wins over the config files, so those changes survive an update.
  • Compare the new defaults in config/state.lua with your edited copy and merge new levers by hand.
  • If glitch-treasury was updated too, restart it first, then glitch-gov.