Studios
Queuehouse-3.jpg

Configuration

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

Everything is in config/main.lua, with a comment on each setting. Server-specific values can go in an optional config/local.lua. config/main.lua loads it last, so it can overwrite any Config value, and deleting the file runs the defaults. A mistake in local.lua prints an error to the console and the defaults stay.

-- config/local.lua
Config.Card.Title = 'My City'
Config.MaxQueue = 100

Queue behaviour#

Key Default What it does
Config.TestingMode false Everyone waits in the queue even with free slots. Founders still go straight in.
Config.SkipAce 'founder' Ace permission that skips the queue.
Config.SkipRoles {} Roles that skip the queue, in the same format as Config.Priority roles.
Config.MaxQueue 0 Longest the line may get. 0 is off.
Config.MaxPerIp 0 Waiting entries allowed from one IP address. 0 is off.
Config.DisableHardcap true Stops FiveM's hardcap resource at start and blocks it from starting.
Config.RecheckSeconds 30 How often waiting players' priority is worked out again, since Discord roles can arrive late.
Config.ReconnectGrace 60 Seconds a player who lost connection keeps their place.
Config.JoiningTimeout 600 Seconds a player who passed the queue counts as taking a slot while they download.
Config.Refresh 1 Seconds between card updates. Use 2 or 3 on big lines.
Config.StaffResources {} Resource names allowed to call the staff exports.
Config.SteamNames false Rename players to their Steam name. Needs steam_webApiKey in server.cfg and adds one web request per connection.
Config.SteamNamesTimeoutMs 3000 How long to wait for the Steam name.

Discord roles#

Config.RoleProvider picks the source:

Value Role format Notes
'auto' As the provider in use Uses glitch-admin when it is running. Otherwise no roles, though ace and check entries still work. This is the default.
'glitch-admin' The role name from glitch-admin's Discord role list, or a Discord role id Always uses glitch-admin.
'discord' A Discord role id (digits) Needs the glitchqueue_discord_guild and glitchqueue_discord_token convars. Answers are cached for Config.DiscordCacheSeconds (default 300).
'custom' Whatever your function expects Write Config.RoleCheck(discordId, role) and return true or false.
'none' No Discord roles at all.

Priority#

Every entry a player matches is added together. The default file ships three placeholder entries to replace:

Config.Priority = {
    { label = 'Supporter', points = 30, role = 'SUPPORTER_ROLE_ID' },
    { label = 'VIP',       points = 40, role = 'VIP_ROLE_ID' },
    { label = 'Staff',     points = 50, role = 'STAFF_ROLE_ID' },
}

Each entry takes label (shown on the card and in staff tools), points, and one of role (a single role or a list, where any of them matches), ace (an ace permission) or check (function(src) return true end). An entry counts once however many of its roles the player has.

Connect card#

Config.Card holds the card settings:

Key Default What it does
ImageFolder 'images/pass' Folder of pictures for headings, chips, buttons and tiles. A missing picture falls back to plain text.
Banner 'images/banner.png' Your logo. A link or a file in the resource. Keep files under 50 KB.
LogoHeight '52px' Logo height on the pass.
MaxInlineKB 0 Without a CDN, pictures up to this size are sent inside the card. 0 makes the card plain text.
Images {} Replace any picture with a link, for example { ['btn-store'] = 'https://...' }.
SeatHeight, StubWidth '84px', '180px' Size of the seat number and the stub.
ChipsPerRow 3 Role chips per row.
Title 'My Server' Card title.
Destination 'Los Santos' Destination line.
TopCount 10 People listed under NOW BOARDING.
ShowRoles true Role labels next to names in the list.
Buttons Website and Store examples Buttons under the pass, each { label, url, main }. They open in the player's browser. The picture images/pass/btn-<label>.png is used when it exists.

Config.Text holds every message shown to players and returned to staff, so you can translate or reword them.

Card pictures#

The connect screen picks its own fonts, so headings, role chips and buttons are pictures. Each card goes to every waiting player on every refresh, so pictures only work through short links:

  • With glitch-photos running, files are uploaded once and the card carries links.
  • Without it, host the pictures yourself and put their links in Config.Card.Images.
  • With neither, leave Config.Card.MaxInlineKB at 0 for a plain text card. Raising it sends pictures inside the card, which costs bandwidth on a long line.

After you change role labels, points or button labels, redraw the pictures and restart the resource:

python -I tools/make_images.py --out images/pass --font path/to/font.ttf

--font is optional. Without it the script looks for Bahnschrift, DejaVu Sans Bold or Arial Bold. The script also accepts --config.