Skip to content

Configuration reference

Two files, both open (not escrowed):

Two files, both open (not escrowed):

  • config.lua is shared: every player's game downloads it. Places, labels, switches, colours.
  • server/config.lua never 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

KeyDefaultOff means
leviestrueMayor cannot change levies. GetLevy / ApplyLevy still answer with the defaults.
fundingtrueNo department transfers, no auto-float.
announcementstrueNo city announcements from the office (/govannounce still works for staff).
electionstrueNo candidacy or voting at the kiosk; no auto-close timer.
bartrueNo bar desk, exam, licences, conduct panel or lawyer-job enforcement.

Config.Job, Config.Grades

KeyDefaultNotes
Job'government'The framework job the roster is mirrored onto (when ServerConfig.Jobs.syncGovJob).
Grades.staff / deputy / mayor0 / 1 / 2Must rise. ox_core starts at 1: use 1/2/3.

Config.Locations

A list of terminals. Each:

FieldRequiredMeaning
idyes1-16 characters, unique. The client sends it to say which terminal is open.
kindno'bar' for the bar desk; anything else is an office or kiosk.
labelnoLocale key for the target label (default locations.<id>).
coordsyesvec3(x, y, z).
size, headingnoTarget box size (vec3) and rotation.
publicnofalse = government staff only (re-checked on the server).
blipno{ sprite, colour, scale }.
targetnofalse = no target zone (open it from another script with the client export OpenBar).
portalnoA resource name; while it is started, our own target is hidden (that script opens the desk).
reachnoServer-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

KeyDefaultMeaning
Ace.admin'cc_government.admin'ACE for elections, appointments, staff announcements, sweep, status.
Announcement.maxLength180Characters kept after cleaning.
Announcement.showMs12000How 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

KeyDefaultMeaning
id'city'Row id in cc_government_treasury. Change only before first start.
label'City Treasury'Shown in logs.
maxBalance2000000000Credits stop here; the excess is logged as overflow and leaves the economy.
reserve250000Never spent by funding or payouts.
ledgerRows40Ledger 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

KeyDefaultMeaning
enabledfalseSweep society accounts into the treasury on a timer.
societies{}Bare society names ('government'; cc_lib adds society_ on ESX).
intervalMin60Minutes between sweeps.
maxPerSweep5000000Per society per sweep.
minAmount1000Smaller balances are left alone.
keep{}Per society, an amount always left behind.

5. ServerConfig.Departments, Funding, AutoFloat

Departments (order = UI order):

FieldMeaning
id, labelUnique 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

KeyCalled withUse
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

KeyDefaultMeaning
registry'auto''internal', 'tcc_gms', or 'auto' (tcc_gms when started).
licenceType'lawyer'tcc_gms licence type key.
fee20000Bank -> treasury on apply.
job, jobGrade, giveJob'lawyer', 0, trueThe job a pass gives and a revoke takes.
walletItemnilItem given once on a pass if the player has none.
questions, passMark15, 12Drawn per sitting / needed to pass.
readBaseMs, readPerCharMs, readMaxFloorMs, latencyGraceMs1800, 22, 9000, 400The reading floor.
tooFastStrikes, copyStrikes2, 3Strikes that end a sitting as a fail.
questionSeconds, totalSeconds40, 480Server clocks.
deskDistance6.0Walking further ends the sitting.
retakeMinutes240After a fail.
grandfathertrueExisting lawyer job holders at first start get a licence instead of removal.
enforceJob, enforceEveryMintrue, 10Remove 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.