Suty
Queue System

Configuration

Configuration

config.lua at the resource root. All settings use the new QueueConfig.* namespace — the bottom of the file maps to the legacy Config.* namespace for backwards compatibility (don't edit that section).

Locale

QueueConfig.Locale = 'es'                   -- 'es' (Spanish) | 'en' (English)

Translations live in locales/ files referenced by the locale helper.

Server behavior

QueueConfig.Server = {
    StartupDelay     = 5,                   -- initial delay on server startup (seconds)
    ConnectionSpeed  = 3,                   -- per-player connection speed
    QueueSize        = 10,                  -- visible queue list size
    RefreshRate      = 1000,                -- UI refresh interval (ms)
    ShowInServerName = true,                -- show queue in server name
    LogToConsole     = true,
    DeveloperMode    = false,               -- debug spam
    KeepAliveInterval = 10,                 -- keep-alive ping (seconds)
    MaxWaitTime      = 2400,                -- 40 min before suggesting reconnect
    AllowDuplicateDiscord = false,          -- testing only
    PreQueueCheck    = 10,                  -- pre-queue check window (seconds)
    ConnectionDelay  = 25,                  -- max delay between connections (when <5 slots free)
    MinQueueTime     = 10,                  -- minimum seconds in queue (for branding)

    DynamicDelay     = true,                -- scale connection delay by slot count
    DynamicDelayTiers = {
        { slots = 20, delay = 3 },          -- 20+ slots free → 3s between connections
        { slots = 10, delay = 8 },          -- 10-19 → 8s
        { slots = 5,  delay = 15 },         -- 5-9 → 15s
        -- < 5 slots → ConnectionDelay (25s)
    },

    ChatEnabled      = true,                -- chat between players in queue
    ChatMaxMessages  = 8,
    ChatRateLimit    = 1,                   -- seconds between messages per player
    ChatRefreshRate  = 5000,
}

Priority system

QueueConfig.Priority = {
    CombinePoints = true,                   -- stack multiple roles together
    ReconnectGrace = {
        Enabled     = true,
        BonusPoints = 40000,                -- higher than any role for instant reconnect
        Duration    = 3000,                 -- grace duration (seconds) = 50 min
    },
    BaseLevel = {
        Points = 10,                        -- base priority for non-role players
        Name   = "Player",
    },

    -- Silent ban — players with this role NEVER leave the queue
    PermanentQueue = {
        Enabled = true,
        Roles   = {
            1422487708571271178,             -- "silent ban" Discord role ID
        },
    },
}

Silent ban is the kill feature: tag a Discord role as "permanent queue" and assign suspected cheaters to it. They see a normal queue, position updates, never get angry-pings — but they NEVER enter the server. They eventually rage-quit thinking it's a slow server.

Discord bot

QueueConfig.DiscordBot = {
    Active         = true,
    RequireLink    = true,                  -- player must have Discord linked
    MustBeInServer = true,                  -- player must be in your guild
    UseWhitelist   = true,                  -- require WhitelistRole
    WhitelistRole  = 1422487076003119114,
    Token          = 'YOUR_BOT_TOKEN',
    ServerID       = 'YOUR_GUILD_ID',
    CacheUsers     = true,
    CacheExpiry    = 120,                   -- seconds
}

Role hierarchy (priority tiers)

QueueConfig.RoleHierarchy = {
    {name = 'Owner',     discordRole = 1320233886214787072, value = 850000},
    {name = 'Admins',    discordRole = 1320234519873323082, value = 200000},
    {name = 'Support',   discordRole = 1320235842580647967, value = 250000},
    {name = 'VIP',       discordRole = 1320237013395443794, value = 150000},
    {name = 'ByPass',    discordRole = 1435018023097602088, value = 100000},
    {name = 'Streamer',  discordRole = 1320237171915096165, value = 65000},
    -- Player progress milestones (5k miles, 10k, 20k, ...)
    {name = '5k Millas', discordRole = 1435018915427123270, value = 5000},
    {name = '10k Millas',discordRole = 1435018788830580816, value = 10000},
    -- ...
}

Higher value = better position. With CombinePoints = true, a VIP+Streamer+Booster player gets the SUM of all role values.

Welcome card / branding

QueueConfig.Interface = {
    HeaderImage    = 'https://cdn.discordapp.com/.../Banner.gif',
    WelcomeMessage = L('WelcomeMessage'),
    Elements = {
        QueueList = {
            show = true,
            text = L('QueueList'),
            iconURL = 'https://cdn.n4.gg/queue.png',
            style = 'destructive',
        },
        DiscordInvite = {
            show = true,
            text = 'Discord',
            iconURL = 'https://cdn.n4.gg/discord.png',
            link = 'https://discord.gg/yourinvite',
            style = 'destructive',
        },
    },
}

Live embed

QueueConfig.LiveEmbed = {
    Enabled         = true,
    WebhookURL      = 'https://discord.com/api/webhooks/...',
    UpdateInterval  = 3,                    -- min seconds between updates (Discord limit)
    Color           = 0xFF0000,
    Title           = L('LiveEmbedTitle'),
    FooterText      = 'Queue System',
    ServerName      = 'HoodLife',
    ShowPlayerList  = true,
    MaxPlayersShown = 15,
}

Force queue

QueueConfig.ForceQueue = {
    Enabled = false,                        -- true = ALL players go through queue even with empty slots
}

Useful for showing the welcome card to every connection.

Test mode

QueueConfig.TestEnvironment = {
    Activate       = false,                 -- DON'T enable in prod
    MaxTestPlayers = 1,                     -- forces queue at 1 player connected
}