💬 Chat
Documentation relating to the spooni_chat.
1. Installation
spooni_chat needs spooni_libs (it works alongside your framework through its bridge).
To install spooni_chat:
- Download the resource
- Ensure that all requirements are installed
- spooni_libs
- oxmysql
- xsound (optional — only for the
/playmusic feature)
- Drag and drop the resource into your resources folder
spooni_chat
- Add this ensure in your server.cfg (after spooni_libs and oxmysql)bash
ensure oxmysql ensure spooni_libs ensure spooni_chat # OPTIONAL — Discord role tags. Shared with spooni_admin, so you set them once # for both. Use "set" (never "sets") so the token stays on the server. set spooni_discord_token "YOUR_BOT_TOKEN" set spooni_discord_guild_id "YOUR_DISCORD_SERVER_ID" - (Optional) Open
server/config_server.luaand paste your Discordwebhook/report_webhookURLs to log chat and reports to Discord. Leave them empty to disable logging. - Now you can configure and translate the script as you like
config.lualanguage.lua
- At the end, restart the server, then open /spoonicfg → CHAT SETTINGS → Chat Colours to give each job a chat tag + colour.
TIP
If you also run spooni_admin, the Discord token and guild ID only need to be set once — both scripts read the same convars.
If you have any problems, you can always open a ticket in the Spooni Discord.
2. Usage
spooni_chat replaces the default game chat. Players cycle Local, Global and Staff channels, send emojis and photos, and see messages float above the speaker's head in their job's colour and tag. Each player tunes their own chat look — background, scale, font and opacity — with /setchat.
Chat tags per job are managed in /spoonicfg → CHAT SETTINGS, and can optionally come from a player's Discord roles.
Commands
| Command | Who | Description |
|---|---|---|
/me /do /try | Everyone | Roleplay actions and dice-style attempts |
/whisper /reply | Everyone | Private message a player / answer the last whisper |
/setchat | Everyone | Change your own chat background, scale, font and opacity |
/raport | Everyone | Send an in-game report to the staff Discord webhook |
/mute /unmute /muted | Staff | Persistent global mute and list of muted players |
/nick | Staff | Set a per-player nickname |
/play /stopmusic | Staff | Music player (requires xsound) |
3. For developers
Reference
Chat tags, permissions and commands are managed from /spoonicfg → CHAT SETTINGS; these server-side exports back that panel and let other scripts read / write the same data.
-- a player's chat display name (nickname if set, else character name)
local name = exports.spooni_chat:getName(source)
-- read the configured chat ranks / permissions / commands
local ranks = exports.spooni_chat:GetChatRanks()
local perms = exports.spooni_chat:GetChatPerms()
local cmds = exports.spooni_chat:GetChatCommands()
-- Discord-role chat tags + the guild roles available to map
local dranks = exports.spooni_chat:GetChatDiscordRanks()
local groles = exports.spooni_chat:GetChatGuildRoles()
-- save / delete (used by the CHAT SETTINGS panel)
exports.spooni_chat:SaveChatRank(rank)
exports.spooni_chat:DeleteChatRank(job)
exports.spooni_chat:SaveChatPerms(perms)
exports.spooni_chat:SaveChatCommands(cmds)
exports.spooni_chat:SaveChatDiscordRank(rank)
exports.spooni_chat:DeleteChatDiscordRank(role)