Studios
Govhouse-3.jpg

Configuration

SoonGovQbox
PAGE 03 OF 06  ·  INSTALLATION → CONFIGURATION → EXAMPLESdocs.glitchstudios.dev
Browse docs

Config files#

config.lua, config/state.lua, config/armoury.lua and config/workshop.lua are open in the escrow, along with install.sql and server/source-police.json. You can edit them for your own server.

Everything admins change in /govadmin is saved in the database and wins over the config file.

config.lua#

Key Default Meaning
Config.Debug false Extra console output for MDT refusals and CAD tag changes.
Config.MaxAdminAdjust 100000000 Largest single admin money adjustment (treasury or armoury fund). It also caps admin number inputs.
Config.Web.Enabled true when glitch_gov_bridge_url is set Switch for the website link.
Config.Web.ServerName glitch_gov_server_name, then sv_projectName, then My Server Community name shown on the website.
Config.Departments Five example jobs Government jobs and labels used when sd-phone's MDT department list is not available.
Config.DepartmentOverrides leo label and short name Forces a label and short name for every department of a type. Remove the entry to use each department's own label.
Config.CadTags.Defaults { scc = {} } Discord role ids for the CAD tags until the website sends its own. Empty in the package, which means nobody gets the tag.

config/state.lua#

Key Meaning
Config.State.Governments One block per government: label, short, leader, job, accent, allRank (rank that edits every lever, default 7), ministerRank (rank that edits its portfolio, default 6) and the portfolios list.
Config.State.Jobs The parliament jobs and their grades. Names, pay and boss grades are applied with qbx_core CreateJob on every start and can be edited in /govadmin.
Config.State.StateAccounts omes_banking society accounts shown on the Accounts page.
Config.State.EditableJobs Other jobs whose rank names and pay /govadmin may edit.
Config.State.Locations Default ox_target places. kind is terminal, duty, boss or wardrobe; gov is federal, nsw or any.
Config.State.Blip Parliament blip: enabled, coords, sprite, colour, scale, label.
Config.State.Settings Budget behaviour, see below.
Config.State.Routes Which government each glitch-treasury ledger kind is booked to. The longest matching prefix wins; Default catches the rest.
Config.State.Mail Budget email senders (from), fallbackDomain (gov.au) and avatar, a path inside this resource or a full URL.
Config.State.Actions bossResource (qbx_management) and wardrobeEvent (qb-clothing:client:openOutfitMenu). Set a value to nil to hide that option.
Config.State.App Tablet app identifier, name, developer and description.
Config.Categories Groups shown in the terminal, each tied to a government.
Config.Levers Every lever and its limits.
Config.PaycheckLevers Which lever scales which job's paycheck.

Settings#

Key Default Meaning
cooldownMinutes 30 Wait between two changes of the same lever.
bankruptFloor 0 A treasury below this is bankrupt.
bankruptPay 80 Percent of public wages paid while that treasury is bankrupt.
bankruptLock true While bankrupt, cost levers can only go down.
custodyCostPerMonth 25 Amount the state pays per month of every custody sentence.
announce true Email everyone in the city when a government saves budget changes.

Levers#

Each entry in Config.Levers has these fields:

Field Meaning
id, cat, label, desc Identifier, category, display name and description.
unit % for a rate, x for a percent of normal (100 is normal), $ for dollars.
default, min, max, step Starting value and the range members can move it within.
flow revenue or cost, which decides what the 7-day figure shows.
kinds glitch-treasury ledger kinds the 7-day figure adds up (name% is a prefix).
portfolio The minister portfolio allowed to edit it.
rank A fixed rank requirement. The shipped salary levers for the two parliaments use 100, which makes them admin only.
resources Resources the lever scales, used for industry levers.

The 35 default levers cover income tax, GST, fuel excise, the materials exchange fee, welfare, wage subsidies, food order grants, the state grant, stamp duty, registration, property tax, police, ambulance and judicial salaries, fines, sentence lengths, hospital fees, weekly appropriations and nine industry pay multipliers.

Industry levers only do something when the matching resource runs:

Lever Resource it scales
trucking_pay glitch-truckerJob
electrical_pay glitch-electricalJob
towing_pay glitch-towing
sanitation_pay glitch-scoot
recycling_pay glitch-recycling
mechanic_pay glitch-mechanicJob
fishing_pay glitch-fishingJob
hunting_pay glitch-huntingJob
mining_pay glitch-miningJob

Taxes, fees, welfare and paycheck levers work on any server.

Armoury and workshop#

config/armoury.lua and config/workshop.lua hold defaults for a police armoury catalogue and a vehicle workshop price list. glitch-gov publishes the effective values in GlobalState['glitch-gov:armoury'] and GlobalState['glitch-gov:workshop']. They only do something with a qbx_police build that reads those keys.

Armoury item fields: item, rank, cost, max (0 is no limit), divisions, mobile, rename, image and enabled. Armoury settings include enabled, account (police), minBalance, selfPay, honoraryRank, allRank, refundOnReturn and allGate.

Workshop settings are enabled, account, minBalance, societyShare (default 100) and selfPay. Prices covers paint (250), paintExtra (150), extras (100), livery (400), tint (150) and repair (500).

Example content#

The department labels, lever names, the ui/nsw-waratah.svg mail avatar and server/source-police.json are example data. Replace them with your own or delete what you do not need; nothing in the code depends on them. If source-police.json is missing, the qualification exports answer empty.