TheDocumentation Index
Fetch the complete documentation index at: https://v2-docs.n4.gg/llms.txt
Use this file to discover all available pages before exploring further.
n4_queue resource ships as a folder named n4_queue.At the root of that folder is a
config.cfg file with sane defaults.
By default, you should execute this file before starting the resource:
set "queue:..." convars into any other .cfg file (for example, your main server.cfg) as long as that file is executed before ensure n4_queue.
Core behavior
| Convar | Default | Description |
|---|---|---|
queue:locale | "en" | Locale file used from locales/<locale>.json. Controls all queue messages. |
queue:server_startup_delay | 60 | Seconds to hold all players in the queue when the server first starts before allowing joins. |
queue:connection_delay | 1 | Seconds to wait between each player being allowed to connect. Helps avoid timeouts on join. |
queue:modify_hostname | 0 | If 1, adds the current queue count in front of your server name on the public server list. |
queue:stack_priority | 1 | If 1, combines all priority rows/roles together. If 0, only the row/role with the highest points is used. |
queue:manual_connection | 0 | If 1, you handle the connection process manually via the HandleConnection export instead of the built‑in plug‑and‑play handler. |
queue:manual_connection (advanced)
- When
0(default):n4_queueautomatically hooks theplayerConnectingevent and manages the entire join flow. You just install the resource and configure convars; it is plug‑and‑play. - When
1:n4_queueexposes a server exportHandleConnection(name, source, deferrals, identifier?).- You must create your own
playerConnectinghandler and callHandleConnectionlast, after all your own checks (bans, frameworks, whitelists, etc.). - Once
HandleConnectionis called, the queue takes over and runs its normal connection logic (deferrals, queue UI, etc.).
queue:manual_connection at 0 for the simplest setup.
Grace priority
| Convar | Default | Description |
|---|---|---|
queue:grace_priority_enabled | 0 | If 1, players receive temporary priority after disconnecting (useful for crashes). |
queue:grace_priority_points | 1000 | Temporary priority points granted when the player disconnects. |
queue:grace_priority_timer | 180 | Seconds the player has to reconnect before their grace priority expires. |
Discord integration
| Convar | Default | Description |
|---|---|---|
queue:discord:enabled | 0 | Enable Discord integration. |
queue:discord:guild_id | "" | The guild (server) ID of your Discord. |
queue:discord:require_identifier | 0 | If 1, the player must have a Discord identifier to connect. |
queue:discord:require_in_guild | 0 | If 1, the player must be in your Discord server to connect. |
queue:discord:whitelist_enabled | 0 | If 1, only players with specific Discord roles may connect. |
queue:discord:whitelist_role_ids | ["123", "1234", "1345"] | Role IDs allowed when whitelist is enabled. Replace with your real role IDs. |
queue:discord:prio_roles | { "123": 5000, "1234": 2500, "1345": 1000 } | Map of role ID → priority points. Higher points = higher queue priority. |
queue:discord:use_nickname | 0 | If 1, uses the player’s Discord nickname instead of their username. |
queue:discord:allow_on_api_failure | 1 | If 1, players are allowed to connect when Discord/API is unavailable (fail open). If 0, they are blocked with a discord_api_unavailable message (fail closed). |
For
queue:discord:prio_roles, do not put a comma after the last role ID, and do not include comments inside the object.Card, UI & timing
| Convar | Default | Description |
|---|---|---|
queue:fallback_avatar | "https://cdn.n4.gg/misc/default-user.webp" | Fallback avatar URL if the player’s avatar is not found. |
queue:logo_url | "https://cdn.n4.gg/branding/blue-512.png" | Logo image URL shown on the queue card (default and subpages). |
queue:card | "default" | Name of the card file (without .json) in cards/. "default" uses cards/default.json. |
queue:queue_list_display | 15 | Number of players shown on the “Queue list” subpage (1–50). |
queue:card_refresh_interval | 1 | Seconds between each card refresh for a waiting player. Higher = less CPU, less responsive. |
queue:queue_list_refresh | 10 | Seconds between rebuilding the “Queue list” subpage (minimum 5). |
{{logo_url}}, {{position}}, {{queueLength}}, {{points}}, {{timeEmoji}}, {{hours}}, {{minutes}}, {{seconds}}, {{estimatedWait}}, {{card_*}}, {{website_url}}, {{discord_url}}, {{server_name}}, {{max_slots}}, {{reserved_slots}}, and {{available_slots}}.
For Queue List / View Points / Back to work actions, use Action.Submit with ids players_card, points_card, or go_back. See cards/example.json in the resource.
Slots, bypass & logging
| Convar | Default | Description |
|---|---|---|
queue:reserved_slots | 0 | Number of slots never filled by the queue (e.g. 48 max, 3 reserved = 45 queueable). Bypass users can use these slots. |
queue:bypass_identifiers | "[]" | JSON array of full identifiers that skip the queue (e.g. ["license2:abc123...", "discord:123456789"]). When the server is full, bypass users are still added to the queue. |
queue:console_logging | 1 | If 1, enables console logging for the queue. |
queue:debug | 0 | If 1, enables debug mode. Only enable this while troubleshooting. |
Website / Discord links
These convars are used by the queue for website and Discord links shown on the card.You can set them here or reuse the same values across other resources:
Full example configuration
Below is a full example you can paste intoserver.cfg and then adjust for your server:

