Limited time Limited time: 20% off every script
Docs/Advanced Chat System/Config

Config

Every option of the Advanced Chat System lives in the open config — themes, channels, moderation, commands and locales.

Note: The snippets below mirror the structure of the shipped config.lua. Option names can differ slightly between versions — the file is fully commented, so treat it as the source of truth.

Config files

FilePurpose
config.luaGeneral settings, UI, channels, moderation, commands.
locales/Every string the players see. Copy en to add a language.
html/Open UI layer (CSS variables for colours, fonts and sizing).

Appearance

Choose a built-in theme or match your branding. Players can still resize, reposition and fade the chat client-side; these are the server defaults.

Config.UI = {
    theme          = 'midnight',   -- built-in theme name, or 'custom'
    accent         = '#a9f60e',    -- used when theme = 'custom'
    font           = 'Inter',
    fontSize       = 14,
    position       = 'top-left',   -- top-left | top-right | bottom-left | bottom-right
    width          = 480,
    fadeAfter      = 8,            -- seconds without activity before the chat fades
    allowResize    = true,
    allowMove      = true,
    timestamps     = false,
}

Channels

Global, Local, Team, OOC and Admin ship enabled. Each channel has a colour, a range (in game units; 0 = server-wide), an optional permission and its own slash command.

Config.Channels = {
    { id = 'global', label = 'Global', command = 'g',     color = '#ffffff', range = 0 },
    { id = 'local',  label = 'Local',  command = 'local', color = '#a1a1aa', range = 20 },
    { id = 'team',   label = 'Team',   command = 'team',  color = '#8ab4ff', range = 0, sameJob = true },
    { id = 'ooc',    label = 'OOC',    command = 'ooc',   color = '#f5a97f', range = 0 },
    { id = 'admin',  label = 'Admin',  command = 'a',     color = '#ff8a8a', range = 0, permission = 'venomchat.admin' },
    -- your own channel
    { id = 'police', label = 'Dispatch', command = 'pd',  color = '#60a5fa', range = 0, jobs = { 'police', 'sheriff' } },
}

Name colours by job and rank

Config.NameColors = {
    byJob  = { police = '#60a5fa', ambulance = '#f87171', mechanic = '#fbbf24' },
    byRank = { admin = '#ff8a8a', mod = '#c4b5fd' },      -- rank = ACE group or framework group
    default = '#ffffff',
}

Rich messaging

  • Emojis:smile: style shortcodes plus the emoji picker in the input bar.
  • Mentions@name highlights the message for that player and plays the mention sound.
  • Links — URLs become clickable; set Config.Messaging.allowLinks = false to disable.
  • Formatting**bold**, *italic* and ~~strike~~ when Config.Messaging.markdown is on.

Moderation

Config.Moderation = {
    profanityFilter = { enabled = true, action = 'mask', words = { 'example' } },  -- mask | block
    antiSpam        = { enabled = true, maxRepeats = 3, window = 10 },
    rateLimit       = { enabled = true, messages = 5, perSeconds = 8 },
    adminPermission = 'venomchat.admin',
}

Staff with the admin permission get mute, clear and announce tools inside the interface and as commands:

CommandWhat it does
/mute [id] [minutes]Silence a player in every channel for a period (blank = until unmuted).
/unmute [id]Lift a mute early.
/clearchatClear the chat for everyone.
/announce [text]Send a highlighted server announcement.

Custom commands and templates

Create commands and reusable message templates without another resource:

Config.Commands = {
    { name = 'me',  template = '* {name} {message}', color = '#c4b5fd', range = 20 },
    { name = 'do',  template = '* {message} ({name})', color = '#a1a1aa', range = 20 },
    { name = 'ad',  template = '[AD] {message}', color = '#d9ff70', permission = 'venomchat.ad' },
}

Scheduled announcements

Config.Announcements = {
    enabled  = true,
    interval = 15,                                -- minutes between messages
    messages = {
        'Join our Discord for support and updates.',
        'Type /report to reach the staff team.',
    },
}

Localization

Set Config.Locale = 'en' and edit or add files under locales/. Every string, including channel labels and moderation messages, is translatable.

Performance notes

The chat is event-driven and idles at 0.00ms. Range checks for local channels run only when a message is sent. Scheduled announcements use a single server timer.