RedM documentation

Murphy's Doctor

Configuration

Treatment, medications and grimoire


This page covers shared/config_treatment.lua: the medications a doctor can prescribe, how a signed prescription heals (or harms) the patient, the side effects, the grimoire entries (injuries and diseases) and the visual effects of diseases. It ends with step-by-step guides to add a medication and a disease. Translations of these texts are handled by shared/grimoire_locale.lua and the locale files.

How a treatment works

  1. The doctor opens the treatment form on a patient (within ExamineMaxDistance). The form shows the patient's vitals, symptoms and cause of coma, and every medication of MedicationItems with the doctor's stock (out-of-stock ones are greyed out).
  2. The doctor adds prescription lines: a medication and a dose. Two lines of the same medication need two items.
  3. On signing, the server checks the doctor still carries every item, takes one item per line whose medication has consumeOnSign = true, then evaluates each line:
    • The line is matched with the patient's untreated injury, condition (cold, heat, poison) or disease for which the medication has the highest efficacy. Each line heals at most one thing.
    • Final efficacy = treats[type] x dose multiplier (after dose tolerance) x overdose penalty.
    • At 0.5 or more, the injury, condition or disease is cured. Below, the line is "insufficient" and nothing happens.
    • If the medication treats nothing the patient has, it is a wrong prescription: the patient gets the side effect of the medication's wrongUseDanger level. A medication that treats something already cured by an earlier line (an analgesic after the suture) is a valid adjuvant and is not punished, unless overdosed.
    • An overdosed line also gives an overdose side effect.
  4. Each cured injury restores 25 % of max health, each cured disease 15 %. The health core is raised to match, so the heal sticks.
  5. Injectable medications (Config.Minigames3D.Injection.Items) are given with the syringe minigame; a failed injection uses the dose up without effect (Minigames).

Billing can block the treatment until the patient pays (Billing).

General keys

Key Default Description
Config.Treatment.ShowGrimoire true In the "add prescription" window, shows a notebook page next to the selected medication with its picture, description, symptoms and recommended use (locale texts medications.<item>.*). false hides it.
Config.Treatment.ExamineMaxDistance 15.0 Metres. Maximum doctor to patient distance, checked by the server, to read vitals, build a treatment and sign it. Generous on purpose: the patient may move while the doctor writes.
Config.Treatment.Labels {} Not read by 1.0. Texts come from the locale keys treatment.*.

Medication items

Config.Treatment.MedicationItems lists the medications offered on the form. The key is the item name in your inventory.

Field Type Description
doses list of strings Doses the doctor can choose, in display order. Each string is also the key of the efficacy table and of the locale doses.* table, so keep the exact same spelling in MedicationEfficacy.
consumeOnSign boolean true: one item is taken from the doctor per prescription line when the report is signed. false: prescribing is free.
image string, optional Picture shown on the notebook page: a path under ui/build/assets/images/ without .png (for example "grimoire/morphine").
label, description, symptoms, treatment string, optional Fallback texts when the locale has no medications.<item>.* key. Without either, the label is the item label from your inventory.
lua
MedicationItems = {
["morphine"] = {
doses = { "5ml", "10ml", "25ml", "5mg", "10mg", "15mg" },
image = "grimoire/morphine", -- ui/build/assets/images/grimoire/morphine.png
consumeOnSign = true,
},
},

Medication efficacy

Config.Treatment.MedicationEfficacy says what each medication heals. The key is the same item name as in MedicationItems. A medication present in MedicationItems but missing here is logged as unknown and does nothing.

Field Type Description
treats table type = efficacy pairs, efficacy from 0.0 to 1.0. A type is an injury type (cut, projectile, fractured, bruised, blunt, burned, bleeding, concussion), a condition (hypothermia, heatstroke, poisoned) or a grimoire disease id (grippe, cholera...).
doses table dose = multiplier pairs. Must use the exact dose strings of MedicationItems. A dose missing here counts as 1.0.
overdoseThreshold number A dose multiplier at or above this is an overdose.
wrongUseDanger 0 to 3 Side effect when the medication treats nothing the patient has: index into PrescriptionDebuffs (0 = none, 1 = nausea, 2 = drug intoxication, 3 = drug poisoning with coma). An overdosed wrong prescription goes one level up (max 3).
lua
MedicationEfficacy = {
["laudanum"] = {
treats = {
projectile = 0.8, -- 0.8 x dose: a full dose (1.0) heals a bullet wound
fractured = 0.8,
grippe = 0.6, -- disease id from GrimoireEntries
},
doses = { ["10ml"] = 0.7, ["25ml"] = 1.0, ["50ml"] = 1.8 },
overdoseThreshold = 1.3, -- 50ml (1.8) is an overdose
wrongUseDanger = 2, -- prescribed for nothing: drug intoxication
},
},

Shipped medications

Item English label Doses (multiplier) Treats (efficacy) Overdose at Wrong use
laudanum Laudanum 5ml (0.4), 10ml (0.7), 25ml (1.0), 50ml (1.8), 15 drops (0.55), 20 drops (0.75), 25 drops (0.95), 30 drops (1.15) projectile 0.8, fractured 0.8, burned 0.6, bleeding 0.6, blunt 0.6, concussion 0.4; tetanos 0.9, typhoide 0.7, cholera 0.7, dysentery 0.7, grippe 0.6, fievre_jaune 0.6, paludisme 0.6, pneumonie 0.5, rage 0.5, variole 0.5 1.3 2
morphine Morphine 5ml (0.5), 10ml (1.0), 25ml (1.5), 5mg (0.5), 10mg (0.8), 15mg (1.0) projectile 0.9, fractured 0.9, burned 0.7, cut 0.6, bleeding 0.5; sepsis 0.8, tetanos 0.7, morsure_serpent 0.7, rage 0.6 1.3 2
aspirin Aspirin 100mg (0.5), 250mg (0.8), 300mg (0.9), 500mg (1.0) bruised 0.7, heatstroke 0.5, blunt 0.45, concussion 0.4, cut 0.3, burned 0.3; grippe 0.8, typhoide 0.7 1.1 0
quinine Quinine 100mg (0.5), 250mg (0.8), 500mg (1.0), 600mg (1.1) heatstroke 0.9, poisoned 0.5, hypothermia 0.4; paludisme 0.95, fievre_jaune 0.9 1.2 1
codeine Codeine 5mg (0.4), 10mg (0.7), 15mg (1.0), 25mg (1.3) blunt 0.7, cut 0.5, bruised 0.5, bleeding 0.3, concussion 0.3; tuberculose 0.6 1.4 1
digitaline Digitalin 0.05mg (0.5), 0.1mg (1.0), 0.2mg (1.5) pneumonie 0.85 1.5 3
solutioncreosote Creosote solution 0.1ml (0.5), 0.3ml (1.0), 0.5ml (1.3) tuberculose 0.75 1.5 2
camphreartisanal Camphor Local rub (1.0), Chest poultice (1.2) burned 0.2; pneumonie 0.5 2.0 0
charbonvegetal Charcoal 5g (0.6), 10g (1.0), 15g (1.2) poisoned 0.6; intox_alcool 0.85, dysentery 0.5 2.0 0
antivenin Antivenin 1 ampoule (1.0) poisoned 0.95; morsure_serpent 0.95 1.5 1
vomitif Emetic 1 dose (1.0) poisoned 0.5; dysentery 0.6 1.5 1
baumeclassique Healing balm Local application (1.0) cut 0.5, burned 0.5, bleeding 0.3; sepsis 0.55 2.0 0
baumecamomille Chamomile balm 10g (1.0), 1 dose (1.0) burned 0.6, cut 0.4; syphilis 0.55, variole 0.5 2.0 0
calomel Calomel 1 pill (0.7), 2 pills (1.0) syphilis 0.7 1.2 2
vaccinejenner Jenner vaccine 1 dose (1.0) variole 0.85 2.0 0
vaccincholera Cholera vaccine 1 dose (1.0) cholera 0.6 2.0 0
aiguille Suture needle Suture (1.0) cut 0.7, projectile 0.5, bleeding 0.4 2.0 0

The dose strings in the config are French ("15 gouttes", "1 pilule"...); players see them translated through the locale doses table. Every medication has consumeOnSign = true. Pictures are set for morphine and aspirin only.

Remember that 0.5 is the healing bar: an efficacy under 0.5 never cures alone (aspirin 0.45 on blunt, camphor 0.2 on burned), it only makes the prescription a valid adjuvant. The vaccines also grant immunity through Config.Infection.Vaccines (Infection).

Dose tolerance and overdose

Key Default Description
Config.Treatment.DoseTolerance.enabled true Any dose whose multiplier is at least therapeuticFloor and below the overdose threshold counts as a full dose (1.0). The doctor needs the right order of magnitude, not the exact dose. false: the exact multiplier is used.
Config.Treatment.DoseTolerance.therapeuticFloor 0.7 Multipliers under this stay under-dosed.
Config.Treatment.Overdose.enabled true Graded overdose. false: a single rule (efficacy halved, overdose side effect, or severeOverdose when the multiplier is 0.5 or more above the threshold).
Config.Treatment.Overdose.tiers 3 tiers List checked in order. ratio = dose multiplier / overdoseThreshold; the first tier whose maxRatio is at or above the ratio applies.
Config.Treatment.Overdose.tiers[n].maxRatio 1.15 / 1.40 / 99 Upper ratio of the tier.
Config.Treatment.Overdose.tiers[n].effPenalty 0.90 / 0.65 / 0.35 Efficacy multiplier applied to the line.
Config.Treatment.Overdose.tiers[n].debuff "overdoseMild" / "overdose" / "severeOverdose" Key of PrescriptionDebuffs given to the patient.

Example: laudanum 50ml has a multiplier of 1.8 against a threshold of 1.3. Ratio 1.38, second tier: efficacy on a bullet wound = 0.8 x 1.8 x 0.65 = 0.94 (healed), plus the overdose side effect.

Prescription side effects

Config.Treatment.PrescriptionDebuffs holds the side effects. Numeric keys 1 to 3 are the wrong-use levels, named keys are the overdose tiers.

Field Type Description
id string Stable id for translations: treatment.debuffs.<id>.label and .notification.
injury table Temporary injury added to the patient: bodyPart, type (an injury type), severity, label (fallback), icon.
condition table, optional Conditions set on the patient, for example { poisoned = true }.
coma boolean, optional Puts the patient in a coma (cause poisoned).
comaDelay number, optional Seconds before the coma (default 10).
duration number Seconds. The injury and conditions are removed after this, with a "side effects fading" notification.
notification string Fallback text of the notification shown to the patient.
Key id Injury Condition Coma Duration
1 nausea belly, poisoned, minor - - 120 s
2 drug_intoxication head, concussion, moderate poisoned - 300 s
3 drug_poisoning belly, poisoned, severe poisoned after 15 s 600 s
overdoseMild overdose_mild belly, poisoned, minor - - 90 s
overdose overdose belly, poisoned, moderate poisoned - 300 s
severeOverdose severe_overdose belly, poisoned, severe poisoned after 10 s 600 s
lua
PrescriptionDebuffs = {
[1] = {
id = "nausea",
injury = { bodyPart = "belly", type = "poisoned", severity = "minor", label = "Nausea", icon = "poisoned" },
duration = 120, -- seconds
notification = "You feel nauseous...",
},
},

Grimoire entries

Config.Treatment.GrimoireEntries is a list of entries. It feeds the grimoire, the vitals shown on examination when a disease is active, the symptoms a sick player feels, and the HP drain of diseases. The ids are also the disease ids used everywhere else (infection, epidemics, commands, treats tables).

Fields

Field Type Description
id string Unique id. For injuries it matches an injury type (cut, projectile...).
name string Title in the grimoire.
image string Picture file name in ui/build/assets/images/grimoire/, without .png. A missing file simply shows no picture.
urgency string One of "modérée" / "moderate", "haute" / "high", "critique" / "critical", "variable" (French or English accepted). It colours the grimoire badge, ranks the disease when several are active and sets its HP drain (see below).
description string Shown in the grimoire.
symptoms string Shown in the grimoire.
treatment string Recommended treatment, shown in the grimoire.
vitals table What the doctor reads on examination while the disease is active. Keys: heartRate, temperature, respiratoryRate, bloodPressure, pupillaryReflex, skinColor, tremors, sweating, skinCondition. Each value is a display text. Leave a key out to keep the value computed from the patient's real state. With several diseases, the last one read wins. Also listed in the grimoire.
playerSymptoms list What the sick player feels in their own health panel. When a disease is caught, 2 to 4 of them are picked at random: the player never sees the disease name, only that subset.
context list Circumstances (contaminated water, swamp, animal bite...), shown in the grimoire as a hint.
differential, grimoireText, naturalRemedy, naturalEfficacy string Extra texts kept in the data and translated, not displayed by the 1.0 grimoire.

HP drain of an active, symptomatic disease, every minute, summed over all diseases (never below 1 HP: the coma takes over at 0 through other damage):

Urgency HP per minute
moderate 0
variable 0.5
high 1
critical 3

Annotated example

lua
{ id = "grippe", -- disease id (infection, treats tables, commands)
name = "Grippe", -- fallback title (locale diseases.grippe.name wins)
image = "grippe", -- ui/build/assets/images/grimoire/grippe.png
urgency = "modérée", -- moderate: no HP drain, green badge
description = "Seasonal respiratory infection...",
symptoms = "Light fever, muscle aches, sudden onset.",
differential = "Pneumonia (no cyanosis)...", -- not displayed in 1.0
treatment = "Laudanum 15-20 drops, aspirin 300mg, bed rest.",
grimoireText = "...", -- not displayed in 1.0
naturalRemedy = "...", -- not displayed in 1.0
naturalEfficacy = "...", -- not displayed in 1.0
vitals = { -- overrides on examination
heartRate = "Faible", temperature = "Fièvre légère",
respiratoryRate = "Rapide", skinColor = "Rouge", sweating = "Modérée",
},
playerSymptoms = { "Fièvre / Frissons", "Maux de tête", "Douleurs musculaires", "Toux", "Fatigue intense" },
context = { "Exposition au froid" },
},

The shipped texts in the config file are the French source; every language, French included, is served from shared/locales/<lang>.lua (see Translations).

Shipped entries

id English name Urgency Cured by (efficacy 0.5 or more)
bruised Bruise moderate aspirin, codeine
blunt Blunt-weapon injury high codeine, laudanum
fractured Fracture high morphine, laudanum
cut Cut / Knife wound high suture needle, morphine, codeine, healing balm
projectile Gunshot wound high morphine, laudanum, suture needle
poisoned Poisoning variable antivenin, charcoal, quinine, emetic
grippe Influenza moderate aspirin, laudanum
pneumonie Pneumonia high digitalin, laudanum, camphor
tuberculose Tuberculosis moderate creosote solution, codeine
typhoide Typhoid fever high laudanum, aspirin
fievre_jaune Yellow Fever critical quinine, laudanum
cholera Cholera critical laudanum, cholera vaccine
paludisme Malaria high quinine, laudanum
sepsis Sepsis critical morphine, healing balm
tetanos Tetanus critical laudanum, morphine
dysentery Dysentery high laudanum, emetic, charcoal
rage Rabies critical morphine, laudanum
scorbut Scurvy moderate no medication (diet)
intox_alcool Alcohol poisoning variable charcoal
morsure_serpent Snakebite critical antivenin, morphine
variole Smallpox critical Jenner vaccine, laudanum, chamomile balm
syphilis Syphilis moderate calomel, chamomile balm
dehydration Dehydration moderate no medication
cirrhosis Cirrhosis moderate no medication (irreversible, see Alcohol)

"Cured by" assumes a full, non-overdosed dose. A disease with no medication reaching 0.5 cannot be cured by a prescription: it ends through the systems that created it (diet, drinking, abstinence) or a staff command. How diseases are caught is configured in Infection and Epidemics.

Disease effects

Config.Treatment.DiseaseEffects is indexed by disease id and adds visual and gameplay effects while the disease is symptomatic. When several diseases are active, the most urgent one decides the screen effect and walk style (critical, then high, then variable, then moderate). An injury's own effect always wins over a disease's.

Field Type Description
screenEffect string, optional animpostfx name, for example "ODR3_Injured01Loop", "PlayerDrugsPoisonWell", "PlayerDrunk01".
movementClipset string, optional Walk style, for example "dehydrated_unarmed", "very_drunk", "MOVE_M@DRUNK@VERYDRUNK".
painAnimation table, optional enabled, chance (0.0 to 1.0 per roll), interval (seconds between rolls), and either dict + anim (a raw upper-body clip) or animKey (a key of Animations, for example "vomit").
lockThirstAtZero boolean, optional Thirst is forced to 0 and drinking is disabled while the disease is symptomatic.
incubationSeconds number, optional Seconds before the symptoms appear (effects, HP drain, felt symptoms, infection notification). The player is contagious from the start. Counted from the saved infection time, so a reconnect or a revive does not reset it.
Disease Screen effect Walk Pain animation Other
grippe - - cough, 10 % every 20 s -
pneumonie ODR3_Injured01Loop dehydrated_unarmed cough, 20 % every 12 s -
tuberculose - - cough, 30 % every 15 s -
typhoide ODR3_Injured01Loop dehydrated_unarmed - -
fievre_jaune PlayerDrugsPoisonWell very_drunk - -
cholera ODR3_Injured01Loop - vomit, 20 % every 30 s incubation 300 s, thirst locked at 0
paludisme PlayerDrugsPoisonWell - - -
sepsis ODR3_Injured02Loop very_drunk - -
tetanos ODR3_Injured01Loop very_drunk - -
dysentery - dehydrated_unarmed - -
rage PlayerDrugsPoisonWell very_drunk cough, 15 % every 10 s -
scorbut - - - none
intox_alcool PlayerDrunk01 MOVE_M@DRUNK@VERYDRUNK - -
morsure_serpent PlayerDrugsPoisonWell dehydrated_unarmed - -
variole ODR3_Injured01Loop - - -
syphilis - - - none
dehydration - dehydrated_unarmed - -
cirrhosis - - cough, 12 % every 30 s -

The raw cough clip is mech_loco_m@character@arthur@fidgets@injured@action@unarmed / cough.

lua
DiseaseEffects = {
cholera = {
screenEffect = "ODR3_Injured01Loop",
incubationSeconds = 300, -- 5 min silent (but contagious)
lockThirstAtZero = true,
painAnimation = { enabled = true, animKey = "vomit", chance = 0.2, interval = 30 },
},
},

Translations

shared/grimoire_locale.lua has no setting. It overlays translations on the grimoire at read time:

  • Each text field of an entry comes from diseases.<id>.<field> in shared/locales/<lang>.lua when the key exists, otherwise from the config.
  • vitals values come from diseases.<id>.vitals.<key>, playerSymptoms and context items from diseases.<id>.playerSymptoms.<n> and diseases.<id>.context.<n> (by position).
  • The urgency gets a language-independent code (moderate, high, critical, variable) used for colours and drain.

Medication texts use medications.<item>.label, .description, .symptoms, .treatment; dose texts use doses["<dose string>"]; side effects use treatment.debuffs.<id>.label and .notification. A custom disease or medication without locale keys simply shows its config texts. See Localization.

Add a medication

  1. Create the item in your inventory system (Items).
  2. Add it to Config.Treatment.MedicationItems:
lua
["penicillin"] = {
doses = { "250mg", "500mg" },
consumeOnSign = true,
},
  1. Add its effect to Config.Treatment.MedicationEfficacy, with the exact same dose strings:
lua
["penicillin"] = {
treats = { sepsis = 0.9, cut = 0.4 },
doses = { ["250mg"] = 0.7, ["500mg"] = 1.0 },
overdoseThreshold = 1.5,
wrongUseDanger = 1,
},
  1. Add the texts under medications.penicillin (and doses entries if the dose strings need translating) in each shared/locales/<lang>.lua.
  2. Optional: make it injectable (Config.Minigames3D.Injection.Items), a vaccine (Config.Infection.Vaccines), an addiction cure (treatedBy in Config.Addiction), or a recipe of the apothecary bench (Config.Craft.Recipes).
  3. Restart the resource.

Add a disease

  1. Add an entry to Config.Treatment.GrimoireEntries with a new id, its urgency, texts, vitals, playerSymptoms and context (copy an existing entry).
  2. Add its picture as ui/build/assets/images/grimoire/<image>.png (optional).
  3. Add visual effects in Config.Treatment.DiseaseEffects[<id>] (optional).
  4. Give at least one medication a treats value of 0.5 or more for the new id in MedicationEfficacy, otherwise no prescription can cure it.
  5. Add the translations under diseases.<id> in each shared/locales/<lang>.lua (optional: without them the config texts are shown).
  6. Decide how players catch it: infection triggers in Infection or an epidemic zone in Epidemics. Staff can also apply it with the debug and staff commands (Commands).
  7. Restart the resource.

Last updated: November 20, 2026