Adding Content
The script is built so you can add your own medical content without writing any code. Everything below is a config entry.
🦠 Adding a disease
Add an entry to Config.Diseases:
radiation_sickness = {
label = 'Radiation Sickness',
tokens = { 'toxic', 'systemic' },
stages = {
{ duration = 600, symptoms = { 'nausea', 'fatigue' } },
{ duration = 1800, symptoms = { 'nausea', 'health_loss', 'high_fever' } },
{ duration = 0, symptoms = { 'health_loss', 'confusion', 'passing_out' } },
},
recoverNaturally = false,
fieldDiagnosis = { 'thermometer', 'bp_cuff' },
confirm = 'bloodtest',
treatment = { tokens = { 'bacterial' }, doses = 3, recovery = 900 },
},| Field | |
|---|---|
tokens | Categories it belongs to |
stages | Each with a duration and a symptom list. duration = 0 means it stays at this stage forever |
recoverNaturally | Seconds after the last stage until it clears, or false |
fieldDiagnosis | Tools that make it suspected |
confirm | Which hospital test confirms it, or false for field diagnosis only |
treatment.tokens | Any medication whose treats list contains one of these counts as a dose |
treatment.doses | How many doses cure it |
treatment.recovery | Seconds of recovery after the final dose |
Optional:
contagious = { radius, chance } | It spreads |
randomChance | Percentage per random roll |
chronic = true | Never cured, only controlled, with courseHours and flareEvery |
complicationOf / complicationChance | Develops out of another disease |
environmental = true | Only given by the environment system |
overdose = true / collapseAfter | Behaves like an overdose |
Symptoms are composed from Config.Symptoms, and the doses system reads existing medications. No code is needed, the disease appears in diagnosis, the tablet, records and the AI callout pool automatically.
😷 Adding a symptom
Add to Config.Symptoms:
hallucination = {
label = 'Hallucinations',
effect = 'blur',
interval = { 40, 90 },
strength = 0.7,
duration = 10,
vitals = { hr = 15 },
},Available effects:
cough · sneeze · vomit · faint · blur · shake · stamina · health · clutch · drunk · heartbeat · sweat · none
vitals shifts the patient's readings so a medic can actually detect it. signs sets what tools report, for example signs = { lungs = 'wheezing' }.
💊 Adding a medication
Add to Config.Medications:
ketamine = {
label = 'Ketamine', item = 'ketamine', route = 'IV',
duration = 240, class = 'sedative', anim = 'inject',
effects = { pain = -70, hr = 10 },
sedate = 120,
fee = 220,
},| Field | |
|---|---|
route | IV, Oral, Nasal, SubQ, Inhaled, External |
class | Used by reverse and addiction relief |
effects | pain, hr, sys, rr, spo2, temp, glucose, blood |
treats | Disease tokens it counts as a dose for |
sedate | Seconds unconscious |
reverse | Classes it cancels, how naloxone works |
addiction / overdose | See Addictions |
prescription / dosages | Makes it prescribable |
selfUse | Patients can use it on themselves |
consume = false | Not used up |
prop | A visible prop on the patient |
Running Lua
Any medication can execute code:
blood_drip = {
label = 'Blood Drip', item = 'blood_bag', route = 'IV',
duration = 60, class = 'fluid', anim = 'iv', prop = 'iv',
tickInterval = 2,
onUse = function(ctx) ctx.notify('drip_started') end,
onTick = function(ctx) ctx.addBlood(15) end,
onFinish = function(ctx) ctx.notify('drip_finished') end,
},ctx gives you source, key, patient, medication, doses, remaining, addBlood(ml), addPain(n) and notify(localeKey, kind, ...).
🩹 Adding a treatment
Add to Config.Treatments:
chest_seal = {
label = 'Chest Seal', item = 'chest_seal',
target = 'zone', duration = 6000, anim = 'bandage',
zones = { 'chest' },
condition = 'wound',
requires = { bleedingControlled = true },
effects = { wound = 'close', pain = -10 },
prop = 'bandage', fee = 200,
},| Field | |
|---|---|
target | zone (a body part) or body (the whole patient) |
zones | Restrict it to specific body parts |
condition | Which injury it applies to, or any |
requires | bleedingControlled, minWound, known, location = 'hospital', grade |
effects | bleedControl, wound, infection, fracture, burn, bruise, pain, tourniquet |
fee | Added to the patient's bill |
selfUse | Patients can apply it themselves |
heal | Direct health restore, amount, duration, stopBleedingChance, maxBleeding, clearStunChance |
💥 Adding a damage type
Add to Config.DamageClasses, then map weapons to it:
Config.DamageClasses.acid = {
label = 'Chemical Burn',
burn = { chance = 100, min = 2, max = 3 },
wound = { chance = 60, min = 1, max = 2, type = 'chemical' },
pain = 40,
infectionRisk = 2,
}
Config.Weapons.WEAPON_ACID = 'acid'Each injury type takes chance, min, max, and optionally heavy (damage that adds +1 severity), zones (restrict it to body parts), open (chance a fracture is open) and limbsOnly.
🚑 Adding an AI callout
Add to Config.AIPatients.complaints:
{
id = 'overdose_alley',
label = 'Possible Overdose',
dispatch = 'Caller found someone slumped in an alley, barely breathing.',
posture = 'unconscious',
diseases = { 'opioid_overdose' },
weight = 4,
transport = 'required',
},Postures: sit · lie · writhe · stand · unconscious · seizure
Transport: 'required' · 'optional' · false
Add locations as vec4 entries in Config.AIPatients.locations, the Z is snapped to the ground automatically.
📄 Adding a report template
Do this in game, EMS tablet → Report templates, or /emsadmin → Templates. See Reports & Templates.
🏥 Adding a hospital
Do this in game, /emsadmin → World → Hospitals. See Hospital Creator.