Skip to content

Configurazione

Configurazione

La configurazione di BUPA Chat è suddivisa in shared/config/*.lua. Tutti questi file si trovano in escrow_ignore, quindi rimangono modificabili dopo l'acquisto. Questa pagina descrive le impostazioni generali, di visualizzazione, delle emoji, delle emote e dei messaggi. Le categorie e Discord hanno pagine dedicate.

Generale — general.lua

Tasti, suoni, valori predefiniti e il sistema delle maschere.

shared/config/general.lua
config.chatKey = "T"            -- key to open the chat input
config.chatVisibilityKey = ""    -- key to cycle visibility mode ("" = unbound)
config.clearCommand = { "clear", "temizle" } -- commands that clear chat history
config.closeOnOutsideClick = true            -- click outside closes the input
config.typingSound = true                    -- keyboard sound while typing
config.allowNoSlashCommands = true           -- run commands without a leading slash
config.uiUpdateRate = 24                      -- ms update rate for head indicators
config.defaultAddTag = true                   -- first arg becomes a tag when no tags given
config.showPrintsOnChat = false               -- mirror server prints into chat
config.discordTagCacheTime = 60 * 60          -- Discord role cache (seconds)
config.defaultChatCategory = "command"        -- tab focused on open

I messaggi di accesso e disconnessione seguono i convar standard:

lua
config.showJoinMessages = GetConvarInt('chat_showJoins', 1) == 0
config.showQuitMessages = GetConvarInt('chat_showQuits', 1) == 0

Origine del nome della chat admin

La categoria admin può mostrare un'origine del nome diversa rispetto al nome del personaggio:

shared/config/general.lua
config.adminChatName = {
    mode = "discord",   -- "character" | "steam" | "discord"
    discord = {
        botToken = "",  -- required for "discord" mode
        guildId  = "",
        cacheTime = 600,      -- nick cache seconds
        fallback  = "steam",  -- used when a nick can't be resolved
    },
}

Nomi basati sulle maschere — config.noneMask

config.noneMask elenca gli elementi indossabili delle maschere (per modello ped, collezione e indice) che non devono nascondere il nome di un giocatore in chat. Quando attivo, il nome di un giocatore mascherato viene mostrato come Sconosciuto a meno che la categoria non imposti showWearingMask = true, o che la maschera indossata sia presente in questa whitelist.

Display — display.lua

Messaggi privati — config.pm

shared/config/display.lua
config.pm = {
    active = true,
    command = { "pm", "dm" },     -- send a private message
    webhookKey = "chatMessage",   -- Discord log key
    maxLength = 300,
    sender   = { --[[ tags/color/name/id/job/discordTag/hour for the sender copy ]] },
    receiver = { --[[ same shape for the receiver copy ]] },
}

Mittente e destinatario hanno entrambi uno stile indipendente (tag, color, showPlayerName, showPlayerId, showPlayerJob, discordTag, showHour).

Testo sopra la testa e visualizzazione ID giocatore

shared/config/display.lua
config.headTextMaxStack = 4      -- max head texts stacked on one player

config.playerIdDisplay = {
    active = false,              -- show IDs above heads while chat is open
    showOwn = true,             -- include your own ID
    dist = 5.0,                 -- max display distance (m)
    template = "[{serverId}] {discordId}", -- {serverId}{name}{steamId}{discordId}{fivemId}
    headText = { bone = 31086, offset = vector3(0.3, 0.0, 0.0), maxRenderDist = 30.0 },
    cssStyle = { color = "#fff", fontSize = "1.8vh", fontWeight = "600" },
}

Il template supporta i segnaposto {serverId}, {name}, {steamId}, {discordId}, {fivemId}, le interruzioni di riga \n e HTML/CSS inline.

Emoji — emojis.lua

Il selettore di emoji è completamente basato sui dati. Ogni categoria è { tab = "<icon emoji>", label = "<HEADER>", list = { ... } } e ogni emoji è { emoji, name, code }.

shared/config/emojis.lua
config.emojis = {
    {
        tab = "😀", label = "SMILEYS",
        list = {
            { emoji = "😀", name = "Grinning", code = ":grinning:" },
            { emoji = "😂", name = "Joy",      code = ":joy:" },
            -- ...
        },
    },
    -- GESTURES (👍), SYMBOLS (❤️), OBJECTS (🚗)
}

Fornito con quattro gruppi: Smileys, Gestures, Symbols e Objects. Aggiungi, rimuovi o riordina liberamente; code è lo shortcode ricercabile mostrato sotto l'anteprima.

Emote — emotes.lua

Indicatore di digitazione — config.chatOpenEmote

Punti animati sopra la testa del giocatore mentre scrive:

shared/config/emotes.lua
config.chatOpenEmote = {
    active = true,
    texts = { { text = "•", time = 500 }, { text = "••", time = 500 }, { text = "•••", time = 500 } },
    cssStyle = { color = "#fff", fontSize = "1.6vh" },
    dist = 8.0,   -- how far others can see it (m)
}
config.emoteOneAtATime = true  -- one active instance of each emote command per player

Comandi emote — config.emoteCommands

Fornito con /me, /do, /dice (/zar) e /rps (/tkm). Ogni emote può riprodurre un'animazione, mostrare del testo sopra la testa e opzionalmente duplicarlo in chat:

shared/config/emotes.lua
{
    command = "me",
    desc = "EMOTE_ME_COMMAND_DESC",
    webhookKey = "emoteCommand",   -- Discord log (optional)
    dist = 8.0,
    time = 10000,                   -- head text duration (ms)
    template = "{text}",            -- {text} {playerName} {playerCensoredName}
    cssStyle = { color = "#b6a8ff", fontStyle = "italic" },
    sendToChat = { active = true, tags = { { tag = "ME" } }, color = { 182, 168, 255 } },
}

Campi aggiuntivi: anim (dict, clip, flag, duration), headText (osso/offset/scala), params (argomenti personalizzati digitati con tasti di aiuto) e msgCb(args) per l'output calcolato (usato da /dice e /rps).

Messaggi — messages.lua

Broadcast automatici, messaggi di benvenuto e stili degli eventi txAdmin — tutti disabilitati per impostazione predefinita.

config.autoMessages = {
    active = false,
    messages = {
        { interval = 3600000, tags = { { tag = "Auto Message" } }, color = { 88, 166, 255 },
          args = { "Test message for auto message (1)" } },
    },
}

config.welcomeMessages = {
    active = false,
    messages = { { tags = { { tag = "Welcome" } }, color = { 255, 255, 255 },
                   args = { "Welcome to the BUPA Test server!" } } },
}

config.txAdmin