Identity & Dialogue
NPC identity, config_identity.lua
Every NPC and vehicle gets a random identity the first time it matters. All chances are in %.
Config.Identity = {
age = { min = 18, max = 78 },
licenseOdds = { valid = 82, suspended = 6, expired = 7, none = 5 }, -- driver's licence (must add up to 100)
extraLicenses = { bike = 25, truck = 8, boat = 6, pilot = 2 },
flags = {
wanted = 4, -- active warrant (also created in the MDT)
armed = 2, -- armed & dangerous
probation = 3,
gang = 2,
},
situation = { drunk = 5, drugs = 4 },
vehicle = {
registrationValid = 90,
insuranceValid = 88,
stolen = 2,
bolo = 1,
ownerIsDriver = 72,
},
warrantReasons = { 'Failure to appear', 'Outstanding traffic fines', ... },
nationalities = { ... },
cities = { ... },
streets = { ... },
firstNames = { male = { ... }, female = { ... } },
lastNames = { ... },
}Raise flags.wanted for a busier server, or rename the cities and streets to match your map.
Questioning, config_dialogue.lua
Config.Dialogue = {
honesty = { base = 60, drunk = 80, wanted = 25 }, -- % an NPC tells the truth about incriminating facts
questions = { ... },
answers = { ... },
}Each question decides who it is shown for:
{ id = 'warrants', label = 'Any warrants I should know about?', icon = 'shield',
roles = { 'suspect', 'civilian' }, services = { 'police' } },| Field | Values |
|---|---|
roles | suspect, victim, civilian, patient |
contexts | foot, vehicle |
services | Service ids that can ask it |
scene | Only on scenes of this kind (e.g. 'suspect') |
answers holds the lines per question and role. The deny pools are the lies an NPC tells when they decide not to be honest.
Negotiation
Used by the Barricaded Suspect and Overdose (hostile friend) callouts. Trust starts at a random value in start. The person complies at success and gives up at fail.
Config.Negotiation = {
barricade = {
start = { 25, 45 }, success = 80, fail = 0,
options = {
{ id = 'listen', label = 'Talk to me. What happened today?', icon = 'message-circle', delta = { 8, 16 } },
{ id = 'threat', label = 'Drop it now or we come in!', icon = 'siren', tone = 'danger', delta = { -30, -12 }, uses = 1 },
-- ...
},
replies = { low = { ... }, mid = { ... }, high = { ... } },
},
friend = { ... },
}| Field | Meaning |
|---|---|
delta | Trust change { min, max } when the line is said |
uses | How often a line can be said (default 2). Repeats work half as well |
tone = 'danger' | Shown in red, as a risky option |
replies | What they say back at low, mid and high trust |