Skip to content

Configuration

Konfiguration

Die Konfiguration von BUPA Chat ist aufgeteilt in shared/config/*.lua. Alle diese Dateien befinden sich in escrow_ignore, sodass sie nach dem Kauf bearbeitbar bleiben. Diese Seite führt durch die allgemeinen Einstellungen, Anzeige-, Emoji-, Emote- und Nachrichteneinstellungen. Kategorien und Discord haben ihre eigenen Seiten.

Allgemein — general.lua

Tasten, Sounds, Standardwerte und das Maskensystem.

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

Beitritts- / Verlassen-Nachrichten folgen den Standard-Convars:

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

Admin-Chat-Namenquelle

Die admin-Kategorie kann eine andere Namenquelle als den Charakter ולnamen anzeigen:

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
    },
}

Masken-bewusste Namen — config.noneMask

config.noneMask listet Masken-Drawables auf (nach Ped-Modell, Kollektion und Index), welche den Namen eines Spielers im Chat nicht verbergen sollen. Wenn aktiv, wird der Name eines maskierten Spielers als Unbekannt angezeigt, es sei denn, die Kategorie setzt showWearingMask = true oder die getragene Maske befindet sich in dieser Whitelist.

Anzeige — display.lua

Private Nachrichten — 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 ]] },
}

Absender und Empfänger haben jeweils ein unabhängiges Styling (Tags, color, showPlayerName, showPlayerId, showPlayerJob, discordTag, showHour).

Kopftext & Spieler-ID-Anzeige

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" },
}

Das template unterstützt die Platzhalter {serverId}, {name}, {steamId}, {discordId}, {fivemId}, \n Zeilenumbrüche und Inline-HTML/CSS.

Emojis — emojis.lua

Der Emoji-Picker ist vollständig datengesteuert. Jede Kategorie ist { tab = "<icon emoji>", label = "<HEADER>", list = { ... } } und jedes Emoji ist { 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 (🚗)
}

Wird mit vier Gruppen geliefert — Smileys, Gesten, Symbole und Objekte. Beliebig hinzufügen, entfernen oder neu anordnen; code ist der durchsuchbare Shortcode, der unter der Vorschau angezeigt wird.

Emotes — emotes.lua

Tipp-Indikator — config.chatOpenEmote

Animierte Punkte über dem Kopf eines Spielers, während er tippt:

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

Emote-Befehle — config.emoteCommands

Wird mit /me, /do, /dice (/zar) und /rps (/tkm) geliefert. Jedes Emote kann eine Animation abspielen, Kopftext rendern und optional in den Chat spiegeln:

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 } },
}

Zusätzliche Felder: anim (dict, clip, flag, duration), headText (Knochen/Offset/Skalierung), params (benutzerdefinierte eingegebene Argumente mit Hilfetasten) und msgCb(args) für berechnete Ausgaben (verwendet von /dice und /rps).

Nachrichten — messages.lua

Automatische Broadcasts, Willkommensnachrichten und txAdmin-Event-Styling — standardmäßig alles aus.

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 = {
    announcement