Everything is in config/main.lua. The config/, locales/ and sql/ folders are open under Tebex escrow, so you can edit them. The config file is also read on the client, so keep secrets out of it.
Main settings#
| Setting | Default | What it does |
|---|---|---|
Config.Locale |
'en' |
Language file in locales/. |
Config.Debug |
false |
Prints every staff edit, failed save and refused Wear to the server console. |
Config.Preset |
false, or 'nsw' |
Name of a file in config/presets/, or false for the generic departments. Defaults to 'nsw' when that file exists and glitch-admin is installed. |
Config.Permissions |
'auto' |
'auto', 'glitch-admin' or 'ace'. Auto uses glitch-admin when it is running and ACE otherwise. |
Config.FounderLevel |
3 |
glitch-admin staff level that sees every tab and outfit. Also the level ACE glitch-uniforms.all maps to. |
Config.EditLevel |
2 |
glitch-admin staff level that can set outfits up. Also the level ACE glitch-uniforms.edit maps to. |
Config.AllGateRoles |
{} |
Default roles of the uniforms.all gate. Unused in ACE mode. |
Config.MenuGateRoles |
{} |
Default roles of the uniforms.menu gate. Unused in ACE mode. |
Config.EditGateRoles |
{} |
Default roles of the uniforms.edit gate. Unused in ACE mode. |
Config.MenuCommand |
false |
Name of the clothing menu command. Off by default. |
Config.OpenRange |
15.0 |
Metres from a locker the server accepts an open request. false turns the check off. |
Config.OpenPoints |
{} |
Extra vec3 spots that count as a locker for the range check. |
Config.Appearance |
'auto' |
'auto', 'glitch-appearance', 'illenium-appearance' or 'none'. |
Config.EditCooldown |
250 |
Milliseconds between edits from one staff member. |
Config.MaxOutfits |
200 |
Outfits per department. |
Config.Components |
{ 1, 3, 4, 5, 6, 7, 8, 9, 10, 11 } |
Clothing components an outfit sets. Hair, face and props other than the hat are left alone. |
Config.SlideComponent |
10 |
Component that holds shoulder slides (decals). |
Config.HatKinds |
nine kinds | Hat categories staff can save: cap, cap back, beanie, peaked, bike, ballistic, flight, rescue and beret. Each has id, label and icon. |
Config.Camera |
see below | Preview camera. |
Config.Camera holds distance (2.4), height (0.15), fov (40.0) and a close table (distance = 1.0, height = 0.55, side = 0.25) for the shoulder zoom button.
Departments#
Config.Depts is keyed by department id. The package ships police and ems.
| Key | What it does |
|---|---|
jobs |
Qbox job names that belong to the department. |
label, short |
Names shown on the page. |
exeFrom |
Grade at which a player sees every tab. |
marks |
Shoulder slide pictures drawn per grade: chev, star, crown, baton, bar or txt. |
tabs |
Tabs on the page. Each has id, short, label and icon. exe = true marks the executive tab, and roles = { ... } limits a division tab to those roles. |
extras |
Add-on pieces players can switch on over an outfit. Each has id, label and slots (the components it sets). |
slideRule |
Optional. One decal model and a start texture that fill every rank at once. |
outfits |
Seed outfits. They only seed a department the first time. After that the database is the source of truth. |
An outfit entry takes tab, name, desc, min and max (grade range) and slides = false to hide shoulder slides on it.
Who sees what:
| Rule | Result |
|---|---|
| General tab | Everyone in the job, only the outfits for their grade (min / max). |
| Division tab | Players holding the uniforms.<dept>.<tab> permission. |
| Executive tab | Grade exeFrom and up. |
Grade exeFrom and up |
Every tab. Outfits still follow min and max. |
uniforms.all or staff level Config.FounderLevel |
Every tab and every outfit. |
Slide rule#
slideRule takes from, start, skip, copy, m and f. Rank from gets texture start, the next rank the next texture, skipping the textures listed in skip. Ranks below from wear no decal, except those in copy ([grade] = grade whose slide it wears). m and f give the decal model per gender as col (collection) and d (local drawable). The rule is only the first-run default. Staff change it in the locker under Set up, Shoulders.
Lockers#
Config.Lockers is a list of ox_target box zones:
{ dept = 'police', coords = vec3(461.12, -999.07, 30.69), size = vec3(1.8, 1.8, 2.0), rotation = 0 }
Only players with one of the department's jobs see the option. Zones are removed when the resource stops.
Permissions#
| Permission | ACE name | Allows |
|---|---|---|
uniforms.edit |
glitch-uniforms.edit |
Set outfits up. |
uniforms.all |
glitch-uniforms.all |
See every tab and outfit. Also counts as edit. |
uniforms.menu |
glitch-uniforms.menu |
Use the clothing menu command. |
uniforms.<dept>.<tab> |
glitch-uniforms.<dept>.<tab> |
See one division tab, for example glitch-uniforms.police.hwp. |
With glitch-admin running and Config.Permissions on 'auto', the package registers these as glitch-admin role gates at start. Grade rules (min, max, exeFrom) always apply to normal players.
Database#
One table, glitch_uniforms, with columns k (VARCHAR(64), primary key) and v (LONGTEXT). Rows named dept:<id> hold a department's catalogue as JSON. Rows named civvies:<citizenid> hold the clothes a player wore before their first uniform. Civvies rows of characters that no longer exist are removed on start.