NPC Pro – talking, remembering street NPCs with trust, gossip and errands NPC PRO - talk to ANY ped. They remember, they gossip, they snitch. €29.99 See NPC PRO
Requirements

Installation

nCore Chat – roleplay chat with proximity speech, 3D /me, 911 cards and emoji emotes installation

v1.0.10 Updated 5 sections · 5 min
On this page
  1. Requirements
  2. Steps
  3. Database
  4. Logs
  5. Good to know

Requirements#

  • FXServer build 6116 or newer. The manifest asks for it, older builds refuse to start the resource.
  • OneSync on (set onesync on in server.cfg, or the OneSync setting in txAdmin). The server reads player positions to route IC speech.
  • A framework is optional: QBox, QBCore, ESX, ox_core or ND_Core. It gives character names, jobs and duty (departments, 911 cards), money (paid adverts) and items (mask and Darknet item checks). Without one the chat runs standalone: names show as "Unknown", adverts are free, and the department and 911 channels have nobody in them.
  • oxmysql is optional. It's only used when you set Config.logs.database = true (see Database).
  • No ox_lib and no build step are needed.

Optional resources the chat picks up by itself when they run:

Resource What it adds
screenshot-basic /photo (also needs an upload URL, see step 5)
pma-voice radio auto-tune, speech mode sets your mic range, talking ring on avatars
ncore_hud RP mode shared with the HUD, voice range sync, staff toasts for reports and mutes
ps-dispatch or cd_dispatch 911 and 311 calls are forwarded to it as well
loaf_headshot_base64 or MugShotBase64 avatars of players who are far away
illenium-appearance, fivem-appearance, esx_skin, qb-clothing, ncore_inventory, ncore_character your avatar is retaken after an outfit change

Steps#

  1. Copy the ncore_chat folder into resources/[ncore] (create the [ncore] folder if you do not have one yet). Do not rename it.

  2. Remove the stock chat resource: delete its folder (in the default server data it's resources/[gameplay]/chat) and remove ensure chat from server.cfg. ncore_chat provides chat, so resources that list chat as a dependency still start.

  3. Add ncore_chat to server.cfg. The framework is detected once, at start, so your framework (and oxmysql) go above it. Put it before your other scripts so their chat suggestions arrive.

    Standalone

    server.cfg
    ensure ncore_chat

    QBCore

    server.cfg
    ensure oxmysql
    ensure qb-core
    ensure ncore_chat
    # your qb- resources after this line

    QBox

    server.cfg
    ensure ox_lib
    ensure oxmysql
    ensure qbx_core
    ensure ncore_chat

    ESX

    server.cfg
    ensure oxmysql
    ensure es_extended
    ensure ncore_chat
    # your esx_ resources after this line

    ox_core

    server.cfg
    ensure oxmysql
    ensure ox_lib
    ensure ox_core
    ensure ox_inventory
    ensure ncore_chat

    ND_Core

    server.cfg
    ensure oxmysql
    ensure ND_Core
    ensure ncore_chat

    Optional resources from the table above can go before or after ncore_chat. screenshot-basic has to be running when a player uses /photo.

    If the detection picks the wrong framework, force it above the ensure line:

    server.cfg
    set lrc:framework "qb"    # auto | esx | qb | qbx | ox | nd | standalone

    Only force a framework that is really running.

  4. Give your staff the staff permission. Framework admins already count as staff (QBCore admin and god, QBox admin and qbx.admin, ox_core admin and staff groups, ND_Core admin, ESX every group except user, set in Config.staff). On any setup, the ACE works too:

    server.cfg
    add_ace group.admin lrc.staff allow
    add_principal identifier.license:<license> group.admin

    Two smaller ACEs let someone do one thing without being staff: lrc.announce for /announce and lrc.pin for pinning messages.

  5. Optional webhooks. Set these above the ensure line. They stay on the server and are never sent to players.

    server.cfg
    set lrc:logWebhook "https://..."        # every channel, private messages included
    set lrc:logWebhookStaff "https://..."   # staff channel and staff actions
    set lrc:logWebhook911 "https://..."     # 911 and 311
    set lrc:photoWebhook "https://..."      # where /photo uploads go
    set lrc:photoWebhookField "files[]"     # the multipart field name of the upload

    The photo endpoint has to answer with the image URL: JSON with url or attachments[1].url, or a plain link in the reply. Without lrc:photoWebhook, /photo tells the player photos are not set up.

    Keep the URLs in convars, not in config/config.lua. A URL in config.lua still works, but that file is also sent to every client, and the console warns you at start. Use set for these. A setr convar is sent to every client, which would give the URL away again.

  6. Config.demoMode in config/config.lua ships false, leave it that way on a live server. On a test server you can set it to true to try the chat with nobody online: staff get /lrcdemo, which puts ten scripted characters around you in three groups so you can hear the ranges work, and /lrcshowcase, which I use to record videos. The showcase changes the staff member's model, framework job, time and weather while it runs. README.md has the details under "Trying it on a test server".

  7. Restart the server. The console prints the language and the framework it picked, for example [lrc] framework bridge: qbx.

Database#

The database is off by default. To turn it on:

  1. Run oxmysql and start it above ncore_chat.
  2. Set Config.logs.database = true in config/config.lua.
  3. Restart. The 7 tables in sql/ncore_chat.sql are created at start. Your database user needs CREATE rights, and the JSON columns need MySQL 5.7.8+ or MariaDB 10.2.7+. You can also import the file by hand.

With the database on you get a message archive, saved Chirp posts, report numbers that keep counting after a restart, mutes that survive a restart, and stored avatars.

Logs#

Config.logs.file = true (the default) writes daily files to logs/ inside the resource folder. They hold message text, private messages included, with license and position. Nothing is deleted on its own. Delete old files by hand, or set Config.logs.file = false. Don't zip and share the resource folder with that logs/ folder in it.

lrc_forget <license> in the server console removes a player from the database and from today's log file. Older log files are not touched. README.md has the details.

Good to know#

  • Do not run the stock chat resource next to ncore_chat.
  • Players' settings are saved on their own PC.
  • setr ncore_chat:debug true in server.cfg prints extra debug lines while you look for a problem. It wins over the older lrc:debug convar, which still works.
  • Scripts that use stock chat:addMode / registerMode tables need a small change. Everything else written for the stock chat keeps sending to it.