Configuration reference
Two files, both open (not escrowed):
Two files, both open (not escrowed):
config.luais shared: every player's game downloads it. Places, labels, switches, colours.server/config.luanever leaves the server. Money, caps, allowlists, departments, the exam.
Both are checked at boot. A wrong value prints one line such as [cc_government] config ServerConfig.Funding.maxTransfer: must be a whole number >= 1000 (was abc); using 500000 and the resource carries on with a safe value, or switches the affected feature off.
config.lua
Config.Features
| Key | Default | Off means |
|---|---|---|
levies | true | Mayor cannot change levies. GetLevy / ApplyLevy still answer with the defaults. |
funding | true | No department transfers, no auto-float. |
announcements | true | No city announcements from the office (/govannounce still works for staff). |
elections | true | No candidacy or voting at the kiosk; no auto-close timer. |
bar | true | No bar desk, exam, licences, conduct panel or lawyer-job enforcement. |
Config.Job, Config.Grades
| Key | Default | Notes |
|---|---|---|
Job | 'government' | The framework job the roster is mirrored onto (when ServerConfig.Jobs.syncGovJob). |
Grades.staff / deputy / mayor | 0 / 1 / 2 | Must rise. ox_core starts at 1: use 1/2/3. |
Config.Locations
A list of terminals. Each:
| Field | Required | Meaning |
|---|---|---|
id | yes | 1-16 characters, unique. The client sends it to say which terminal is open. |
kind | no | 'bar' for the bar desk; anything else is an office or kiosk. |
label | no | Locale key for the target label (default locations.<id>). |
coords | yes | vec3(x, y, z). |
size, heading | no | Target box size (vec3) and rotation. |
public | no | false = government staff only (re-checked on the server). |
blip | no | { sprite, colour, scale }. |
target | no | false = no target zone (open it from another script with the client export OpenBar). |
portal | no | A resource name; while it is started, our own target is hidden (that script opens the desk). |
reach | no | Server-side distance for opening and acting (default ServerConfig.MaxInteractDistance). |
A location without vec3 coords is skipped. With no kind = 'bar' location the bar feature switches off.
Others
| Key | Default | Meaning |
|---|---|---|
Ace.admin | 'cc_government.admin' | ACE for elections, appointments, staff announcements, sweep, status. |
Announcement.maxLength | 180 | Characters kept after cleaning. |
Announcement.showMs | 12000 | How long the banner stays. |
UI.accent | '#2f7cf6' | Accent colour for the whole page. |
UI.cityName | 'City Hall' | Header text on the office and kiosk. |
UI.currency | '$' | Symbol printed before money. |
Theme beyond these: the token block at the top of web/style.css (one place). Replace web/img/emblem.svg and web/img/banner-city.webp with your city's own. Every visible string is in locales/en.json; copy it to locales/.json and set setr cc_government_locale "".
server/config.lua
1. ServerConfig.Treasury
| Key | Default | Meaning |
|---|---|---|
id | 'city' | Row id in cc_government_treasury. Change only before first start. |
label | 'City Treasury' | Shown in logs. |
maxBalance | 2000000000 | Credits stop here; the excess is logged as overflow and leaves the economy. |
reserve | 250000 | Never spent by funding or payouts. |
ledgerRows | 40 | Ledger rows in the office. |
2. ServerConfig.Sources (who may Collect)
key = { label, maxPerCall, resources = { 'resource_name', ... } }. Only a listed resource may pay in under that key, at most maxPerCall per call. Shipped keys: registration, insurance, licences, fines, property, other (all with empty allowlists), and lawyer (internal, the bar fee). A source may not list cc_government itself unless it has internal = true.
3. ServerConfig.Payouts (who may PayService)
key = { label, resources, maxPerCall, perHour, perDay }. The only way money leaves the treasury to a player. Hour and day caps are for the whole key, summed from the ledger. Empty by default.
4. ServerConfig.Sweep
| Key | Default | Meaning |
|---|---|---|
enabled | false | Sweep society accounts into the treasury on a timer. |
societies | {} | Bare society names ('government'; cc_lib adds society_ on ESX). |
intervalMin | 60 | Minutes between sweeps. |
maxPerSweep | 5000000 | Per society per sweep. |
minAmount | 1000 | Smaller balances are left alone. |
keep | {} | Per society, an amount always left behind. |
5. ServerConfig.Departments, Funding, AutoFloat
Departments (order = UI order):
| Field | Meaning |
|---|---|
id, label | Unique id (also the ledger ref) and display name. |
kind = 'society' | Pays account through cc_lib's society bridge (esx_society, qb-management, Renewed-Banking, ...). |
kind = 'export' | Calls exports[resource][export](account, amount, note, actorName); must return true. Optional balanceExport(account) -> number for the auto-float. |
Funding caps: minTransfer 1000, maxTransfer 500000, perDeptPerDay 1500000, totalPerDay 4000000 (rolling 24 h, from the ledger).
AutoFloat: enabled (false), checkMin (10), actorName, and depts = { [id] = { below, topUp, perDay } }. Every top-up is an ordinary transfer, so every cap and the reserve still bind.
6. Levies
{ key, label, unit = 'pct'|'pts', default, min, max, maxStep }. LevyCooldownHours (24) between changes to one levy; LevyAppliedWindowHours (24) for "applied by". Shipped: registration, insurance, licences, business_tax, sales_tax, property_tax. A levy with min > default or a duplicate key is removed at boot.
7. Announcements
minGrade (1), cityCooldownSec (600), perDay per author (12), history (10).
8. Staff and jobs
ServerConfig.Staff: hireDistance (5.0), nearbyRadius (8.0), rosterLimit (50), adoptFrameworkJob (true: a player holding Config.Job from /setjob is added to the roster, never above deputy).
ServerConfig.Jobs: mode ('auto' | 'qbox' | 'qb' | 'esx' | 'ox' | 'none'), syncGovJob (true), makePrimary (true, Qbox), unemployed ('unemployed'), unemployedGrade (0). On ESX/QBCore/ox_core a job change for an offline character is queued and applied at their next login.
9. Elections
candidacyFee (25000), maxCandidates (8), sloganMax (80), termDays (30, display only), defaultVotingHours (48), maxVotingHours (168), onePerLicense (false).
10. Interaction, cooldowns, webhooks
MaxInteractDistance (3.5). Cooldowns in ms: state 750, action 1500, vote 3000, announce 5000. Webhooks come from set convars: cc_government_webhook_admin|economy|security|bar.
11. Integrations
| Key | Called with | Use |
|---|---|---|
officeActivity = { resource, export } | (source) | Tell a paycheck activity gate that a staff member worked. |
licenceWithdrawn = { resource, export } | (citizenid, status) | Strike a suspended or disbarred lawyer off an MDT register. |
12. Bar examination
| Key | Default | Meaning |
|---|---|---|
registry | 'auto' | 'internal', 'tcc_gms', or 'auto' (tcc_gms when started). |
licenceType | 'lawyer' | tcc_gms licence type key. |
fee | 20000 | Bank -> treasury on apply. |
job, jobGrade, giveJob | 'lawyer', 0, true | The job a pass gives and a revoke takes. |
walletItem | nil | Item given once on a pass if the player has none. |
questions, passMark | 15, 12 | Drawn per sitting / needed to pass. |
readBaseMs, readPerCharMs, readMaxFloorMs, latencyGraceMs | 1800, 22, 9000, 400 | The reading floor. |
tooFastStrikes, copyStrikes | 2, 3 | Strikes that end a sitting as a fail. |
questionSeconds, totalSeconds | 40, 480 | Server clocks. |
deskDistance | 6.0 | Walking further ends the sitting. |
retakeMinutes | 240 | After a fail. |
grandfather | true | Existing lawyer job holders at first start get a licence instead of removal. |
enforceJob, enforceEveryMin | true, 10 | Remove the lawyer job from unlicensed holders. |
ace | 'cc_government.bar' | Staff commands and the conduct panel. |
ServerConfig.BarConduct: panelJobs ({}; e.g. { judge = 0 }), statementMin/Max (20/600), noteMin/Max (10/300), cooldownSec (1800), perDay (3), maxOpenPerLawyer (5), suspendDays ({ 3, 7, 14, 30, 60 }), liftGraceSec (300), sweepEveryMin (5), showComplainantToLawyer (false), listRows, panelRows (10).
ServerConfig.BarQuestions: { q, options = { 2-6 strings }, answer = index }. Add as many as you like; a question with a bad answer is removed at boot.