Configuration
Configuration
config.lua holds how the system behaves. What each substance does lives in the editor and the database.
General
Config.Debug = false
Config.Inventory = 'auto'
Config.Target = 'auto'
Config.ToleranceDamping = trueToleranceDamping is the chasing loop — as a character's tolerance climbs, the high they feel gets weaker.
Access
Config.Creator decides who opens the editor and the admin panel: an ACE (bupa.substances), ACE fallbacks, framework admin groups, and a developer identifier list for a bare dev server. Config.Admin.Command and Config.Admin.Refresh set the panel command and how often it refreshes.
Overdose and mixing
Config.Overdose = {
Enabled = true,
Threshold = 100,
BleedOut = 120,
Hospital = vec4(298.6, -584.7, 43.26, 68.0),
AllowRescue = true,
MixMultiplier = 1.5,
DangerousMixes = {
{ 'opioid', 'depressant', 2.2 },
{ 'stimulant', 'opioid', 2.0 },
{ 'depressant', 'stimulant', 1.8 },
},
}Restrictions
Config.Restrict = {
BlacklistJobs = { 'police', 'sheriff' },
SafeZones = {
-- { coords = vec3(441.0, -982.0, 30.7), radius = 80.0 },
},
}A blacklisted job cannot use substances at all; inside a safe zone, using one is refused.
Drug test and rehab
Config.DrugTest sets which jobs can run /drugtest and how close they must stand. Config.Rehab places the clinic — see the Rehab clinic page.
Withdrawal
Config.Withdrawal = {
Enabled = true,
RunsOffline = true,
OfflineCap = 12,
ClearOnDeath = false,
PauseWhileTreated = true,
}Interface and sounds
Config.UI sets the accent, whether the HUD shows, the crisis warning, and the inventory image path for a renamed fork. Config.Sounds toggles the interface sounds and their volume — there is no audio bank to install.
Webhook
Config.Webhook = {
Enabled = false,
Url = '',
Log = {
Use = false, Addicted = true, Overdose = true, Death = true,
Treated = true, Edited = true, Admin = true, Rehab = true,
},
}Admin logs clears, doses and revives; Rehab logs each check-in with what cleared and what relapsed.
Exports
exports['bupa-addictioncreator']:GetAddictions(source)
exports['bupa-addictioncreator']:IsAddicted(source, 'meth_syringe')
exports['bupa-addictioncreator']:ClearAddictions(source)