RC Interactions: Build NPC Dialogues & Interactions in Minutes (Visual Editor + In‑Game Runtime)

RC Interactions v1.1.0

Node-based NPC dialogue & interaction system for FiveM

Design rich NPC conversations visually — give items, check conditions, branch randomly, play animations — all without writing a single line of code.

Links:



What it does

A visual, drag-and-drop node editor to build NPC dialogue flows. Connect nodes, save, and the system spawns NPCs in-world with a Talk interaction. Players get a cinematic camera, typewriter dialogue, and keyboard controls — no code needed from you.

16 Node Types

Category Nodes
Flow Start, End
Dialogue Dialogue (text + choices, per-node NPC animation)
Logic Condition, Set Variable, Event, Random
Economy Give Item, Remove Item, Give Money, Remove Money
Effects Animation, Wait, Teleport, NPC Change, Sound

Economy nodes are fully validated server-side — session tracking, per-node cooldowns, input sanitization, and cached interaction data. No client-side trust.

24 Game Variables for Conditions

Check player state without any code: player:health, player:job_name, player:in_vehicle, money:cash, money:bank, item:<name>, job:<name>, and more. Supports 6 operators (==, !=, >, <, >=, <=) and variable-to-variable comparison with $ prefix.

Editor Features

  • Multi-select (marquee + Ctrl+click), multi-drag, multi-delete
  • Auto-layout (Ctrl+L) — hierarchical graph algorithm
  • Command palette (Ctrl+K) — quick node search
  • Undo/Redo, duplicate (Ctrl+D), fit-to-view, cursor-centered zoom
  • In-browser simulator to test flows without joining a server
  • EN / ES translations (~170 keys)

NPC Runtime

  • Configurable idle animation on the START node
  • Per-dialogue custom NPC animations
  • Optional NPC speech/lipsync (Config.EnableNpcSpeech)
  • Dialogue end event (rc-interactions:dialogueEnded) for external script integration
  • Public API: exports['rc-interactions']:StartInteractionById(uuid, customVars)

Perfect for

Quest NPCs · Job givers · Shop/vendor NPCs · Tutorial/onboarding · Seasonal events · Branching storylines

Requirements

  • oxmysql (required)
  • qb-target or ox_target (optional)
  • Compatible with QBCore, ESX, and Standalone (auto-detected)
  • Inventory support: ox_inventoryqb-inventory → legacy QBCore (automatic fallback)

Quick Install

  1. Drop rc-interactions into your resources folder
  2. Import interactions.sql
  3. Add to server.cfg:
ensure oxmysql
ensure rc-interactions

Configuration

Only file: shared/config.lua

Option What it does Default
Config.Framework auto / qbcore / esx / standalone auto
Config.UseTarget Enable qb-target / ox_target true
Config.EditorCommand Chat command to open editor interactioneditor
Config.EditorGroup Who can open the editor admin
Config.EnableNpcSpeech NPC lipsync during dialogue true
Config.CheckForUpdates Version check on start true

Player Controls

Key Action
↑ / ↓ Navigate options
Enter Select
1–5 Quick select
ESC Exit dialogue

License

PolyForm Noncommercial 1.0.0 — free for non-commercial use. Check the repo license before using commercially.

Code is accessible Yes
Subscription-based No
Lines (approx.) ~10.000
Requirements oxmysql
Support Yes
18 Likes

node based npc dialogue editing?

this is sick! great release!

1 Like

Thank you!! Pending to see what the people want to add :grin:

Any suggestion is welcome!

1 Like

I’ll be getting around to working with this next week so I will let you know of anything I come across!

1 Like

Changelog - v1.0.1

New Features

  • Project Export & Import System:
    • Integrated a new modal-based export system that generates a JSON representation of logic flows.
    • Added “Copy to Clipboard” functionality within the export modal for easy sharing.
    • Implemented project importing via raw JSON text or direct file upload (.json).
    • Automatically handles ID regeneration and naming (adding “Imported” suffix) to prevent conflicts with existing projects.
  • Advanced Deletion Workflow:
    • Replaced standard browser confirm() dialogs with custom-styled, non-intrusive UI modals for deleting projects and groups.
    • Visual warnings with rose-colored accents to highlight destructive actions.

Improvements

  • Localization & Internationalization:
    • Comprehensive translation support for English and Spanish across all new Dashboard features.
    • Added new localized strings for export/import labels, confirmation titles, and warning messages.
  • Dashboard UI Enhancements:
    • Added an “IMPORT JSON” button to the Dashboard header for quicker access to project management.
    • Improved responsive design for modal overlays with backdrop blur and animation effects.
  • Global Keybindings:
    • Added an ‘Escape’ key listener to globally handle closing modals and UI views, improving navigation speed.

Bug Fixes

  • Improved File Downloads: Optimized the export process to force download prompts across different environments, falling back to a manual copy modal if necessary.
  • Group Management Logic: Fixed a potential issue where deleting a group didn’t clearly communicate the migration of its projects to the “General” category.
2 Likes

:new_button: Update 1.1.0 — Major Feature Release

:date: 2026-02-20


:bullseye: Overview

v1.1.0 transforms RC Interactions from a basic dialogue system into a full-featured NPC Interaction Engine.

This update introduces:

  • :white_check_mark: 10 new node types
  • :locked: Complete server-side security model
  • :video_game: 24 dynamic game variables
  • :artist_palette: Fully rewritten editor UX
  • :test_tube: Comprehensive test coverage (Web, Client & Server)

This is the biggest update since initial release.


:sparkles: New Node Types (Phase 2 Complete)

You can now build complex gameplay logic without writing code.

Node Description
GIVE_ITEM Give item(s) to the player (server validated)
REMOVE_ITEM Remove item(s) from the player
GIVE_MONEY Give cash or bank money (server-side limits enforced)
REMOVE_MONEY Remove cash or bank money
ANIMATION Play animation on NPC or player
WAIT Timed delay before continuing
RANDOM Weighted random branching
TELEPORT Teleport player to coordinates
NPC_CHANGE Change NPC model mid-conversation
SOUND Play GTA sound during dialogue

:1234: Total node types: 16 (previously 6)


:locked: Server-Side Security Model

All economy-related nodes are now fully protected.

:check_mark: Single secure endpoint

processNode(projectId, nodeId)

The server resolves everything from its own cache — never trusts client data.

:check_mark: Active Session Tracking

Prevents unauthorized node execution.

:check_mark: Per-node Cooldowns

  • 3s cooldown per node
  • 1s global economy cooldown per player

:check_mark: Input Sanitization

  • Max item count: 100
  • Max money amount: 1,000,000
  • Special characters stripped

:check_mark: Automatic Cleanup

Sessions are cleared on playerDropped.


:video_game: Game Variables System (24 Variables)

Condition nodes now support dynamic gameplay checks.

Player Variables

player:health
player:armor
player:stamina
player:is_dead
player:is_wanted
player:in_vehicle
player:speed
player:weapon
player:is_swimming
player:is_falling
player:is_running
player:name
player:job_name
player:job_grade
player:gang_name
player:citizenid
player:gender
player:phone_number

Money

money:cash
money:bank

Dynamic

item:<name>
job:<name>
memory:<custom_var>

New Features

  • Variable-to-variable comparison ($money:cash)
  • Full operator support: == != > < >= <=
  • Typed variable picker inside editor

:artist_palette: Editor UX Overhaul

The node editor has been significantly improved.

New Features

  • Dot grid background
  • Categorized toolbar (Flow / Dialogue / Logic / Economy / Effects)
  • Command palette (Ctrl + K)
  • Multi-selection (box select + Ctrl click)
  • Multi-drag / delete / duplicate
  • Auto-layout (Ctrl + L)
  • Fit-to-view
  • Cursor-centered zoom
  • Zoom percentage indicator
  • Live node & connection counter
  • Undo/Redo now tracks property changes

Keyboard Shortcuts

Shortcut Action
Ctrl+Z Undo
Ctrl+Y / Ctrl+Shift+Z Redo
Ctrl+S Save
Ctrl+D Duplicate
Ctrl+L Auto-layout
Ctrl+K Command palette
Delete Delete selected
Escape Deselect / Close palette

:robot: NPC Improvements

  • Idle animation configurable in START node
  • Per-dialogue animation override
  • Ambient NPC speech & lipsync (Config.EnableNpcSpeech)
  • NPC model switching mid-dialogue (NPC_CHANGE)

:electric_plug: Dialogue End Event

New event:

rc-interactions:dialogueEnded

Payload:

{
    projectId: string,
    cancelled: boolean
}

Allows integration with missions, quest systems, etc.

Contributed by @BlackDahlia313 (2) :heart:


:globe_with_meridians: Framework Bridge Improvements

QBCore

  • Inventory fallback chain:
    ox_inventory → qb-inventory → Player.Functions
  • pcall protection added

ESX

  • Full implementation:

    • HasItem
    • GetMoney
    • AddItem
    • RemoveItem
    • AddMoney
    • RemoveMoney

Standalone

  • Fully implemented overridable stubs
  • Warning logs included

Important Fix

GetMoney now works across all frameworks
(Money conditions previously always returned false)


:test_tube: Test Coverage

Web (Vitest)

30 tests

cd web && npx vitest run

Client (Lua)

7 test suites (~40+ tests)

/rctest all

Server (Lua)

4 test suites (~20+ tests)

/rctest_sv all

Test commands only available when:

Config.Debug = true

:counterclockwise_arrows_button: Automatic Version Check

  • GitHub release comparison on startup
  • Semantic version validation
  • 3-second delayed execution
  • Controlled via:
Config.CheckForUpdates = true

:globe_showing_europe_africa: Internationalization

  • ~170 translation keys

  • English & Spanish

  • All editor strings now translatable

  • New keys for:

    • 10 new nodes
    • 24 game variables
    • Editor improvements
    • Categories
    • Animations
    • Command palette
    • Auto-layout

:satellite_antenna: Public API Update

You can now inject memory variables on start:

exports['rc-interactions']:StartInteractionById('project-uuid', {
    quest_stage = 'started',
    player_reputation = 50
})

Available inside CONDITION and SET_VARIABLE nodes.


:gear: New Config Options

Option Default
Config.CheckForUpdates true
Config.EnableNpcSpeech true

No breaking changes.


:bug: Bug Fixes

  • Fixed missing HasItem in ESX & Standalone
  • Fixed missing GetMoney in all bridges
  • Fixed SET_VARIABLE runtime issue
  • Replaced Date.now() IDs with crypto.randomUUID()
  • Added JSON import validation
  • Fixed GameSimulator navigation
  • Fixed QBCore AddItem nil with ox_inventory
  • Replaced binary replay protection with cooldown-based system

:file_folder: New Files

  • server/versioncheck.lua
  • server/tests.lua
  • client/tests.lua
  • web/utils/flowEngine.ts
  • web/utils/gameVariables.ts
  • web/utils/uuid.ts
  • web/__tests__/flowEngine.test.ts
  • CHANGELOG.md

:up_arrow: Upgrade Notes

Database

No schema changes required.

Config

Two new optional settings (enabled by default).

Bridge

If you use custom overrides, ensure new functions are implemented:

  • AddItem
  • RemoveItem
  • AddMoney
  • RemoveMoney
  • GetMoney

Web (Source Users)

cd web
npm install
npm run build

:rocket: Summary

1.1.0 turns RC Interactions into a complete, secure, production-ready NPC interaction framework.

More powerful.
More secure.
More scalable.

1 Like

Thanks, finally something other than just Lua writing!

I only had to add a few lines to client/main.lua so it could open our shops from ox_inventory.

Unfortunately, that wouldn’t work under ESX by default.

Thanks again for the script though! <3

1 Like

this is really cool, well done!

1 Like

We will deliver a update soon, so tell us all the problems related to the script!!!

1 Like

So I had to modify the client/main.lua file.

I had to enter each shop name individually, along with all the coordinates. I’ll just attach my Lua file here.

main.lua (8.9 KB)