Skip to content

Configuration

設定

BUPA Chat の設定は shared/config/*.lua に分割されています。これらのファイルはすべて escrow_ignore に含まれているため、購入後も編集可能です。このページでは、一般、表示、絵文字、エモート、メッセージの設定について説明します。カテゴリと Discord にはそれぞれ専用のページがあります。

一般 — general.lua

キー、サウンド、デフォルト、およびマスクシステム。

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

参加 / 退出メッセージは標準の convar に従います:

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

管理者チャット名のソース

admin カテゴリでは、キャラクター名とは異なる名前のソースを表示できます:

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

マスク認識名 — config.noneMask

config.noneMask には、チャットでプレイヤーの名前を非表示にしないマスクのドローアブル(ペッドモデル、コレクション、インデックス別)がリストされます。これが有効な場合、カテゴリで showWearingMask = true が設定されているか、着用しているマスクがこの許可リストに含まれていない限り、マスクを着用したプレイヤーの名前は Unknown として表示されます。

表示 — display.lua

プライベートメッセージ — 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 ]] },
}

送信者と受信者はそれぞれ独立したスタイリング(タグ、colorshowPlayerNameshowPlayerIdshowPlayerJobdiscordTagshowHour)を持ちます。

頭上テキストとプレイヤーIDの表示

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

template は、プレースホルダー {serverId}{name}{steamId}{discordId}{fivemId}\n の改行、およびインライン HTML/CSS をサポートしています。

絵文字 — emojis.lua

絵文字ピッカーは完全にデータ駆動型です。各カテゴリは { tab = "<icon emoji>", label = "<HEADER>", list = { ... } } であり、各絵文字は { 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 (🚗)
}

SmileysGesturesSymbolsObjects の4つのグループが同梱されています。自由に追加、削除、並び替えが可能です。code はプレビューの下に表示される検索可能なショートコードです。

エモート — emotes.lua

タイピングインジケーター — config.chatOpenEmote

プレイヤーが入力している間、頭上にアニメーションするドットが表示されます:

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

エモートコマンド — config.emoteCommands

/me/do/dice (/zar)、/rps (/tkm) が同梱されています。各エモートはアニメーションの再生、頭上テキストの描画、およびオプションでチャットへのミラーリングを行うことができます:

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

追加のフィールド:anim (dictclipflagduration)、headText(ボーン/オフセット/スケール)、params(ヘルプキー付きのカスタム入力引数)、および計算された出力用の msgCb(args)/dice および /rps で使用)。

メッセージ — messages.lua

自動ブロードキャスト、ウェルカムメッセージ、および txAdmin イベントのスタイリング — すべてデフォルトでオフになっています。

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