Configuration · origen_chat
Configuration is split across files inside config/.
config/_main.lua
| Variable | Default | Description |
|---|---|---|
Config.Language | 'en' | UI language — 'en' | 'es' | 'fr' | 'it' |
Config.CustomNotify | false | Use Custom.Notify instead of ox_lib notifications |
Config.CommandName | 'toggleChat' | Command to toggle the chat UI on/off |
Config.ShowEmojisOption | true | Show the emoji picker in the chat UI |
Config.DefaultColor | '#850e49f2' | Default chat background color (RGBA hex) |
Config.ShowServerPrints | false | Show server print() output in the chat |
Config.Debug | false | Enable debug logging |
Allow player customization
lua
Config.AllowEdit = {
color = true, -- player can change chat background color
position = true, -- player can reposition the chat box
size = true, -- player can resize the chat box
}config/commands.lua
Defines all chat commands. Each command supports a different message type.
Message types
| Type | Description |
|---|---|
proximity | Sent to players within distance meters |
global | Sent to all players on the server |
player-to-player | Sent from one specific player to another |
global-announcement | Sent to all players, styled as an announcement |
job-to-job | Sent to all players sharing the same job |
job-to-global | Sent by a job member to all players |
Command fields
| Field | Description |
|---|---|
enabled | Enable or disable the command |
color | Message color (hex) |
icon | Lucide icon name (e.g. 'lucide:user') |
command | The chat command string (e.g. 'me') |
distance | Radius in meters for proximity type. false = global |
preventCollisions | If true, walls/doors block the message |
showNameInsteadOfId | Show player name instead of server ID |
showGradeAndJob | Show job name and grade in the message prefix |
permissions | Array of group names required to use the command |
groups | Table of job_name = min_grade required to use the command |
type | Message type (see table above) |
params | Additional parameter definitions for the command |
Default commands
| Command | Type | Description |
|---|---|---|
/me | proximity (15m) | Roleplay action |
/do | proximity (10m) | Scene description |
/ooc | global | Out-of-character global message |
/msg | player-to-player | Private message to a specific player |
/announcement | global-announcement | Server-wide announcement (admin only) |
/lspd | job-to-job | Police internal chat (disabled by default) |
/ems | job-to-job | EMS internal chat (disabled by default) |
/announce-lspd | job-to-global | Police broadcast to all (disabled by default) |
/announce-ems | job-to-global | EMS broadcast to all (disabled by default) |
Adding a custom command
lua
Config.Commands['my_command'] = {
enabled = true,
color = '#ffffff',
icon = 'lucide:user',
preventCollisions = false,
distance = false,
command = 'my_command',
showNameInsteadOfId = true,
permissions = { 'group.admin' },
groups = { ['police'] = 0 },
type = 'global',
}config/blacklist.lua
Command prefixes that are blocked from appearing as autocomplete suggestions:
lua
Config.BlacklistedPrefixes = {
['+'] = true,
['-'] = true,
['_'] = true,
}config/custom_core.lua
Use this file to provide a custom core object if you are not using a standard framework:
lua
return {
useCustomCore = false,
events = {
load = 'custom:playerLoaded',
unload = 'custom:playerLogout',
},
GetCustomCoreObject = function()
return nil -- return your core object here
end,
}