FiveM · QBox · Roleplay Framework

Every NPC is a person. The city wakes up.

Intel NPC turns GTA V's empty crowds into a city of actual people — personality, memory, mood and a real trust arc on every pedestrian — and gives your server the calm-RP police experience native dispatch never could.

10,000+ lines of Lua Full source, no obfuscation Lifetime updates
server console — txAdmin
> ensure lrr_intel_npc
[lrr_intel_npc] loaded with 1 static persona(s)
[lrr_intel_npc police] module loaded — pedHit=true redlight=true
[lrr_intel_npc dev_population] density boost on — ped=2.0 veh=2.0
>
The problem

You built a world. It's full of mannequins.

Every FiveM server hits the same wall — and the police side breaks for the exact opposite reason.

// The crowd

A city that feels staged

Hand-painted MLOs, years of lore, a whole writing room — and a new player still walks past dozens of identical idle peds with the same blank stare and nothing to say. Persona resources cover one or two named NPCs. None of it reaches the random ped you pass on the street — and that's 95% of the population.

// The police

War zone or ghost town

A wanted level pops and native dispatch guns the player down for jaywalking. Disable dispatch to fix it and now there are no cops at all. Your city flips between a shooting gallery and an empty street with one config flag — and neither is roleplay.

Intel NPC is the answer to both — in one framework.

The four pillars

One framework. Four systems that change the room.

Every system has a master toggle. Ship the whole thing, or flip three flags and ship just the parts you want.

01

Every NPC is a person

Random ambient peds and scripted characters alike get a category, a personality archetype, a session mood and a persistent memory of every interaction with the player.

  • 6 categories + 7 personality types
  • Per-NPC memory: met, topics, states, last exit
  • Action memory — they remember the crime they saw
02

Recursive dialogue trees

Not a "press 1 of 4" menu. A chat-style NUI panel with topic trees that recurse to any depth, typewriter lines, a mood badge and a live trust meter.

  • Conditional responses by world & player state
  • post_action: buy item, open shop, fire events
  • Topic randomization keeps revisits fresh
Alpha
03

The calm-RP police system

Hit a car, the driver reacts by personality. Pay damages, bribe, apologize or fight. A scripted RP cop unit drives in calmly — no native dispatch gunning you down on sight.

  • Pay-or-bluff damage assessment
  • Witness-driven cop calls + responding unit
  • Hard-capped at 1 star — delegate the rest
04

The social intelligence layer

A witness, gossip, disguise, alibi, trauma and informant network that gives your wanted system real consequence — and lets detective RP actually function.

  • Witness reliability tiers + disguise scoring
  • NPC-to-NPC gossip that degrades per hop
  • Alibi windows + silent informant leaks
Reputation

A trust meter where actions matter — not chatter.

A single-digit −10 to +10 scale across six tiers. Casual conversation doesn't move the meter; physical and material choices do.

Hostile
Wary
Neutral
Familiar
Friendly
Trusted
−10−4−1+1+4+7+10
Help an NPC up+4
Bribe to look away+3
Tip on a purchase+2
Flirt / banter / hire+1
Just chatting0
Threaten / provoke / beg−1
Pickpocket−3
Mug−5
Rob at gunpoint−6
Ambient cast

Six built-in categories. Each one feels different.

Every category routes its own greeting pool, topic tree, refusal pool, voice profile and behavioral baseline — determined automatically by the ped's model.

Civilian~15% refusal

The default citizen — small talk, directions, the social fabric. Reacts sharply to a bloody or armed player, and most likely to dial 911 if you do something nasty in front of them.

Gang~75% refusal

Short, hostile, territorial. "Wrong block." Wired into GTA's native gang dispatch via relationship groups — hit one and his crew backs him up.

Cop~85% refusal

"Move along, citizen." Won't usually chat — but a corruptible cop exposes a star-scaled "look the other way" bribe branch gated behind reputation.

Homelessthey hail you

They call out first. Give them a smoke or a dollar and trust shifts instantly. Build it high enough and they start dropping street-level intel.

Prostitutecalls constantly

A dedicated category. Hails 8× more often, dialed up 40% at night. Four service tiers from "just talk" to "spend the night", each firing a server event.

Default~20% refusal

The quiet fallback for ped types the heuristics don't recognize. Shorter trees, minimal greetings, animals rejected entirely.

Personality

Seven archetypes. Deep behavioral differences.

Bump a coward with a bat in hand and they sprint. Bump a brave one and they tell you to put it away. Bump a cunning one — they smile, give you directions, then call 911 the moment you turn your back.

Coward

Bows to threats, runs from violence, panic-dials 911.

Compliant

The average citizen — follows polite asks, won't pick a fight.

Brave

Stands their ground, will talk while armed but tells you to holster.

Aggressive

Squares up fast, draws first, zero patience.

Cunning

Calm outside, computing inside — takes bribes, calls cops smiling.

Stoic

Minimal reaction, walks from problems, won't be drawn into a fight.

Cop

Overrides everything — won't street-fight, won't be bribed at the scene.

All tunable

Patience, provoke threshold, fight curve, bribe price — one config table.

Scriptable NPCs

A character authoring engine. Your imagination is the limit.

The static persona system is pure declarative data — name, model, coords, routine, dialogue tree, shop catalog, archetype, appearance. Your writers decide who they are; the framework handles how they live.

Gas-station attendant
Catalog, gossip, night-shift regular
Black-market fence
Rep-gated inventory, tiered reveals
Weapon dealer
Branded refusals for known criminals
Drug supplier
Paranoid archetype, leaks if you burn him
Underground medic
Patches you up, calls cops if your story stinks
Mechanic / chop shop
Dialogue-driven repair & chop services
Loan shark
Clock-aware repayment, sends his crew
Informant
Better tips at higher rep, sells you out
Hostage / victim
State-aware negotiation RP
Crooked accountant
Laundering at the right tier
Forger
Fake IDs & plates, fires job events
Quest-giver
post_action branches fire your events

That's 12 roles. You'll think of 30 more before lunch. Ships with Maggie, a complete 24/7 gas-station persona, as a reference build.

The police system · Alpha

Calm cops. Real choices. No shooting on sight.

The biggest feature in the script — a dialogue-driven police experience built on top of the persona, witness and trust systems. Honest disclosure: this module is in alpha; run it on a test server first.

A

You ram an NPC's car

The driver reacts by personality archetype and damage tier — fight you, pull a phone, curse, flip you off, or flee. Ram the same driver four times in a minute and the next hit guarantees their worst-case reaction.

B

The pre-call window

A driver dialing 911 stands by their car with a phone in hand. You have a window — extended per metre of distance — to walk over, press G and talk them down.

Pay damagesApologizeBribeThreatenWalk away
C

The bystander mechanic

Even if the driver doesn't call, the corner might. A witness scan classifies every ped nearby — a cop sighting is a 100% report, 3+ witnesses 95%, down to 25% with none. After dark, +35%. Drive 80m clear and you're gone.

D

The responding RP unit

A scripted cruiser drives in with a siren, parks 12–15m away and one officer walks over — calmly. They do not open fire on arrival. Within 5m the lead cop stops and waits. You press G to engage; the NUI never auto-opens.

E

The cop scene

Seven choices, each with its own animations, voice lines and consequences. Cooperate or pay in full and you never see a star.

Sorry, officerPay damagesWhat's the problem?BribeGet out of my faceFloor it
Also in the module

Red-light running near a cop · speeding past a patrol · up to 3 visible cruise patrols · star-scaled corruption bribes on persona cops · server-side cash validation with rate-limiting, range clamps and cooldowns.

By the numbers

Built like a real product.

0
Lines of Lua
0
Source files
0
Lines of config
0
Stress tested
Operator-first

Configurable down to the bolt.

Roughly 1,300 lines of richly commented config. Every interval, every probability, every cooldown, every reputation delta, every line of dialogue — a knob away.

Master toggles

Want only the dialogue and trust layers? Flip three flags. Want the police module off entirely? One line. Most modules early-return at file top, so disabled really means disabled.

police_system_enabledambient_dialogue_enabledhails_enabledtrauma_enableddisguise_enabledgossip_enabledinformants_enabledcorruption_enabledroutines_enabled

Exports & server events

Every public action fires a server event so an external resource — your wanted system, jobs, Discord webhooks — can listen and react. Cash callbacks are validated, rate-limited and clamped.

OpenStaticDialogueGetReputationTierAddPersonaSetPoliceSystemEnabledTriggerReactionwitnessReportedpoliceEventdispatchRequested
Get Intel NPC

Buy once. Own it. Update forever.

Intel NPC — first commercial release

One purchase. Lifetime updates.

The first commercial release of a system in private development for over a year. Early buyers receive every major feature shipped from this point forward — free. The price goes up as the roadmap delivers; your access doesn't.

  • Full source code — zero obfuscation, no escrow, no licence-check phoning home
  • ~1,300 lines of commented config — every system has a master toggle
  • 600+ line README, full exports / events / callbacks reference
  • Direct support — Discord channel, issue tracker, email
Buy on Tebex → Read the docs first

Pricing & refund policy per Tebex terms.

Honest FAQ

The questions worth answering.

No. Full source, fully readable, fully editable — no obfuscation, no escrow, no licence-check phoning home. It runs entirely on your box, and you can fork it the day you decide to take it in a different direction.

It's in alpha. Run it on a test server, get a feel for it, ship it when you're comfortable. Every other layer — dialogue, memory, trust, witness, hail, disguise, gossip, trauma, alibi, persona, informant, corruption, daily routines — is production-ready independently. One config flag turns the police module off.

No. The police module fires server events for every action — policeEvent, dispatchRequested, witnessReported, informantReported. Your existing wanted resource can listen and react. The internal wanted ceiling is one star; anything bigger is delegated to the external system you bolt on.

Yes. Persona schemas and dialogue trees are pure declarative data tables in data/personas.lua and data/dialogue_lines.lua. Add entries and restart, or use the runtime AddPersona export to hot-patch without a restart.

Yes. Tested up to 64-slot ranges. Hot paths use spatial pre-filtering, per-ped cooldowns and a zone-aware density manager. If you spot a tick-budget concern, every scan interval is a config knob away from being slower.

QBox (qbx_core) today. The rest of the script is framework-agnostic via clean adapter files in shared/adapters/, so an ESX, QBus or Standalone port is a single-file swap — on the roadmap as buyer demand confirms each platform.

Stop populating your city with mannequins. Start populating it with people.

Get Intel NPC on Tebex →
Documentation

Install & integrate

Everything you need to drop lrr_intel_npc into a QBox server — requirements, installation, the smallresources pre-step, exports, events, callbacks and dev tooling.

Requirements

Intel NPC targets the modern QBox stack. These are the same dependencies most QBox servers already run — no exotic stack required.

DependencyUsed for
qbx_corePlayer identity (citizen ID, character name) and money transactions.
ox_libNotifications, NUI callbacks, the points API for static persona spawn zones, model-request helpers.
ox_targetThe third-eye interaction surfacing Talk / Buy item / Open shop on persona NPCs.
ox_inventoryThe buy-item callbacks and in-dialogue shop catalogs. Falls back to lib.context if the catalog ID isn't registered as an ox shop.

Installation

  1. Drop the resource. Place lrr_intel_npc into your resources/ folder.
  2. Ensure it. Add ensure lrr_intel_npc to your server.cfg.
  3. Restart the server. You should see the boot lines below in the server console.
[lrr_intel_npc] loaded with 1 static persona(s)
[lrr_intel_npc police] module loaded — pedHit=true redlight=true speeding=true
[lrr_intel_npc dev_population] density boost on — ped=2.0 veh=2.0

By default Config.debug = false, so the dev menu, dev commands, 3D overlays and map blips are all off. To enable dev mode without editing files, add a convar to server.cfg:

setr lrr_intel_npc:debug 1

Pre-installation: defang qbx_smallresources

Several qbx_smallresources resources actively fight the police features — they suppress ambient cop spawning, clamp SetMaxWantedLevel to 0 and hide the wanted-stars HUD. Intel NPC keeps per-frame safety nets that re-assert each flag, so it works without these edits — it's just cleaner to disable the upstream interference once instead of racing it forever.

Optional but recommended

The edit is ~10 lines total across three files. Skipping it still works — you'll just see mild flicker in the millisecond windows where a competing resource momentarily wins the race.

1 — qbx_ignore/client.lua

Comment out the three cop-suppression lines, otherwise no cops appear in traffic.

-- SetCreateRandomCops(false)
-- SetCreateRandomCopsNotOnScenarios(false)
-- SetCreateRandomCopsOnScenarios(false)

2 — qbx_disableservices/config.lua

Lift the max-wanted clamp so the 1-star RP heat sticks. Keep police-related dispatch services off so native dispatch can't stack shooting cops on the scripted RP unit; emergency services (fire, ambulance) and NPC-faction backup stay on.

return {
    maxWantedLevel = 5,   -- was 0
    enabledServices = {
        [1]  = false,   -- PoliceAutomobile
        [3]  = true,    -- FireDepartment
        [5]  = true,    -- AmbulanceDepartment
        [11] = true,    -- Gangs (faction backup)
        [14] = false,   -- ArmyVehicle
    },
}

3 — qbx_hudcomponents/config.lua

Remove HUD component 1 (HUD_WANTED_STARS) from the disable list so players can see the heat building.

hudComponents = {2, 3, 4, 7, 9, 13, 19, 20, 21, 22}   -- 1 removed

After the three edits, restart qbx_ignore, qbx_disableservices, qbx_hudcomponents and lrr_intel_npc.

Quick map of the resource

FileWhat it does
shared/config.luaEvery tunable knob. Read this first.
data/personas.luaStatic persona definitions (Maggie).
data/dialogue_lines.luaPer-persona dialogue trees — greetings, topics, recursive followups.
data/dialogue_ambient.luaAmbient dialogue trees by category.
data/character_archetypes.luaReaction → archetype mapping.
client/dialogue.luaThe NUI session machinery — recursive topic rendering, post-actions, patience, mood.
client/reactions.luaAll reaction handlers — scream_flee, get_out_and_fight, call_cops_at_scene, etc.
client/police.luaThe police system — triggers, calm RP cop spawning, mid-call NUI, pay-damages.
client/shop.luaPersona shop catalogs, with a lib.context fallback.
server/main.luaServer callbacks — payDamages, preCallBribe, bribeRespondingCop, shopBuy.

Adding a persona at runtime

From any external resource, register a persona on the fly. The trigger zone is registered immediately; the ped spawns the next time the player walks within Config.spawn_distance of the coords.

exports.lrr_intel_npc:AddPersona({
    id          = 'andrew',
    name        = 'Andrew',
    model       = 'a_m_y_business_03',
    coords      = vec4(123.0, 456.0, 78.0, 90.0),
    scenario    = 'WORLD_HUMAN_SMOKING',
    dialogue_id = 'andrew',
    archetype   = 'compliant',
    interactions = {
        { type = 'dialogue', label = 'Talk', icon = 'fa-solid fa-comments' },
    },
})

To remove: exports.lrr_intel_npc:RemovePersona('andrew')

Exports

All client-side. Call from any other resource via exports.lrr_intel_npc:Name(args).

Dialogue & reputation

ExportDescription
OpenStaticDialogue(id)Open the NUI chat with a static persona.
OpenAmbientDialogue(entity)Open the NUI chat with any ped via ambient routing.
IsDialogueOpen()Bool — is the NUI panel currently open?
GetReputation(id)Number, default 0.
SetReputation(id, v)Sets reputation, clamped to [−10, +10].
AddReputation(id, d)Adds a delta, same clamping.
GetReputationTier(id)trusted / friendly / familiar / neutral / wary / hostile.

Personas, police & reactions

ExportDescription
AddPersona(data)Registers a persona; returns true, or false if the id is taken.
RemovePersona(id)Despawns and unregisters a persona.
GetPersona(id) / ListPersonas()Returns a persona table, or the live persona array.
SetPoliceSystemEnabled(bool)Runtime toggle for the police module.
IsPoliceSystemEnabled() / IsInPoliceScene()Police module state checks.
TriggerReaction(ped, name)Fires a named reaction directly.

Server events you can hook

Every player action that involves the server fires a public event, so an external resource can listen.

-- Item purchase completed
RegisterNetEvent('lrr-intel-npc:server:itemBought', ...)
-- Job request (take_job interaction)
RegisterNetEvent('lrr-intel-npc:server:jobRequested', ...)
-- A witness saw a crime
RegisterNetEvent('lrr-intel-npc:server:witnessReported', ...)
-- An informant leaked an event to dispatch
RegisterNetEvent('lrr-intel-npc:server:informantReported', ...)
-- Cop bribery succeeded
RegisterNetEvent('lrr-intel-npc:server:copBribed', ...)
-- Prostitute service paid
RegisterNetEvent('lrr-intel-npc:server:prostituteServicePaid', ...)
-- Police trigger fired (red_light, speeding, ped_hit)
RegisterNetEvent('lrr-intel-npc:server:policeEvent', ...)
-- Dispatch requested (NPC called 911)
RegisterNetEvent('lrr-intel-npc:server:dispatchRequested', ...)

Server callbacks

Cash-validated, rate-limited, range-clamped and cooldown-gated. Each returns a structured success/failure object.

lib.callback('lrr-intel-npc:payDamages', source, { amount = 250 })
  -- → { success = true, amount = 250 }
  -- → { success = false, reason = 'no_money' }

lib.callback('lrr-intel-npc:preCallBribe', source, { amount = 200, refuse_chance = 0.3 })
lib.callback('lrr-intel-npc:bribeRespondingCop', source, { amount = 500, refuse_chance = 0.3 })
lib.callback('lrr-intel-npc:shopBuy', source, persona_id, shop_id, item_name, count)
lib.callback('lrr-intel-npc:prostituteService', source, 'full_night', ctx)

Dev commands

/intel_talk is always available (also bound to G). All commands below are NO-OP unless Config.debug = true.

CommandWhat it does
/intel_devOpen the dev menu (F7 keybind by default).
/intel_statusPrint persona / target / integration diagnostics.
/intel_tp <id>Teleport to a persona for testing.
/intel_whatPrint category / archetype / sex / model of the closest ped.
/intel_hit_test light|moderate|severeSimulate a car hit on the closest civilian.
/intel_force_callForce the closest NPC to call cops.
/intel_force_fight / /intel_force_fleeForce a fight or flee reaction.
/intel_police_spawn / /intel_police_clearForce-spawn a patrol, or reset all police state.

Compatibility notes

The script ships with per-frame safety nets that re-assert its required flags every tick, so it works out of the box even on a stock qbx_smallresources setup. For cleaner operation, apply the three-file edit in the pre-installation step above.

For ox_inventory native shop UI instead of the lib.context fallback, register persona catalogs in your ox_inventory/data/shops.lua:

['kati_neni_247'] = {
    name = "Maggie's 24/7",
    inventory = {
        { name = 'cigarette', price = 2  },
        { name = 'pack_cigs', price = 18 },
    },
},
Need the full reference?

The shipped 600+ line README walks through every config knob, export, server event and callback. The Config reference page covers the key tunables.

Configuration

Config reference

A guided tour of shared/config.lua — every system has a master toggle, every interval and probability is a knob. Pick what you want, turn the rest off.

Master toggles

Every system has a master switch. Most modules early-return at file top when their flag is false, so disabling really means disabled — not "still running, just silent".

Config.debug                       = false  -- dev menu, /intel_force_*, overlays
Config.police_system_enabled       = true   -- red-light, ped-hit, speeding
Config.police_redlight.enabled     = true
Config.police_ped_hit.enabled      = true
Config.police_speeding.enabled     = true
Config.prostitute_dialogue_enabled = true
Config.ambient_dialogue_enabled    = true
Config.hails_enabled               = true
Config.dynamic_persona_pool_enabled= false  -- disabled; old picker put peds in roads
FlagDefaultControls
police_system_enabledtrueThe entire police module — hit detection, cop spawn, wanted bumps.
trauma_enabledtruePer-NPC trauma counter that shifts mood after violence.
disguise_enabledtrue0–100 obscurity scoring from masks, helmets and hoods.
gossip_enabledtrueNPC-to-NPC rumor propagation that degrades per hop.
informants_enabledtruePersonas tagged informant leaking crimes to dispatch.
corruption_enabledtrueStar-scaled bribe topics on corruptible cop personas.
routines_enabledtruePer-time-of-day persona schedules (napszak).
alibi_enabledtrueStatic personas vouching for the player within a time window.

Debug & dev mode

Production default for Config.debug is false. The dev population module boosts GTA's natural ambient density rather than custom-spawning peds.

Config.show_debug_blips  = true     -- map blips per persona (dev only)
Config.show_debug_3d     = true     -- 3D overlay above NPCs

Config.dev_mode_enabled  = true
Config.dev_population = {
    enabled                = true,
    density_ped            = 2.0,  -- "dense, still stable" sweet spot
    density_vehicle        = 2.0,
    density_random_vehicle = 2.0,
    density_parked         = 2.0,
}
Zone-aware density

The density manager applies a per-GTA-zone multiplier — 1.5× downtown, 1.2× South LS, 0.5× Blaine County, 0.2× wilderness — so the world isn't uniformly dense everywhere.

Reputation

The trust system runs on a single-digit −10 to +10 scale. Talk-only actions stay tiny so chat barely moves the meter; physical and material actions carry weight.

Config.reputation_interaction_delta = {
    rob        = -6,   -- one rob ≈ 60% to hostile
    mug        = -5,
    pickpocket = -3,
    bribe      =  3,
    tip        =  2,
    help_up    =  4,
    threaten   = -1,
    flirt      =  1,
}
TierRange
trustedv >= 7
friendlyv >= 4
familiarv >= 1
neutral-1 .. 1
waryv >= -4
hostilev < -4

Per-topic rep_delta values in the dialogue data override the kind default for that specific choice.

Dialogue & patience

NPCs get bored. Ask too much and the mood shifts, then the conversation shuts down with a configurable kick line.

Config.topics_per_session            = 4      -- random subset per session
Config.dialogue_idle_timeout_ms      = 22000  -- inactivity → kick
Config.dialogue_mood_shift_threshold = 5      -- questions → grumpy
Config.dialogue_angry_close_threshold= 9      -- questions → done

Config.quick_talk_key = 'G'                  -- talk to who you're looking at
Config.mood_pool = { 'friendly', 'neutral', 'grumpy', 'distracted', 'curious' }

Conditional responses are filtered by live tags — time of day, weather, player state (armed, bloody, wanted, masked), proximity props and witness memory.

Hails

NPCs that call out to the player first. By default only homeless and prostitutes hail randomly — everyone else needs a custom hail_lines pool.

Config.hails_enabled         = true
Config.hail_scan_interval_ms = 15000
Config.hail_chance_per_tick  = 0.18
Config.hail_global_cooldown_ms = 25000

Config.hail_categories = {
    civilian = false, homeless = true,
    gang = false, cop = false, prostitute = true,
}

Time-of-day multipliers tune frequency — prostitutes hail 40% more at night, homeless 20% less.

Police system

The module hosts three core triggers — red-light, ped-hit and speeding-past-patrol. The whole thing is hard-capped at 1 star; anything bigger is delegated to an external wanted resource via server events.

Config.police_redlight = {
    enabled              = true,
    cop_scan_radius      = 50.0,
    min_player_speed_kmh = 25.0,
    chance_per_violation = 0.55,
    wanted_stars         = 1,
}

Config.police_ped_hit = {
    fight_chance_range = { min = 0.70, max = 0.90 },
    bystander_call_chance       = 0.75,
    night_witness_multiplier    = 1.35,
    pre_call_window_ms          = 25000,
    guaranteed_escalation_after = 4,
}
WitnessesChance someone calls 911
Cop on scene100%
3+ witnesses95%
1–2 witnesses75%
0 witnesses25%

Server-side cash callbacks are clamped — pay_damages $50–2500, bribes $50–5000 — with per-source rate-limiting and a 3-second cooldown.

Prostitutes

A dedicated category with four service tiers; the server validates every price.

Config.prostitute_services = {
    chat       = { price = 0,   label = 'Just talk'           },
    flirt      = { price = 10,  label = 'Buy her a drink'     },
    company    = { price = 100, label = 'Company for a while' },
    full_night = { price = 500, label = 'Spend the night'     },
}

To disable: set prostitute_dialogue_enabled = false and hail_categories.prostitute = false.

Common recipes

Keep only the dialogue & trust layers

Config.police_system_enabled       = false
Config.hails_enabled               = false
Config.prostitute_dialogue_enabled = false

Visible cops, no native auto-engage

Config.cops_passive_mode = true   -- cops in traffic, no wanted auto-shoot

Softer NPCs

Lower the fight_chance_range, raise apology acceptance in pre_call_personas, and reduce ambient_refusal_chance per category. A grim-dark server flips it the other way.

Reminder

This page covers the key tunables. The shipped shared/config.lua is ~1,300 lines, every parameter individually commented.