RedM documentation

Murphy's Doctor

Configuration

Minigames and apothecary bench


This page covers shared/config_minigames.lua: the care minigames played in the world on the patient's body (bullet extraction, suture, fracture, injection), and the apothecary bench where doctors prepare remedies with craft minigames (mortar, scale, still, pill machine, sterilising). Which wounds lead to a care game is set in Surgery.

The games use the custom props streamed from stream/ (mw_dr_*). If you prefer the classic on-screen games, set Config.Minigames3D.Enabled = false.

The games

Game key Where What the player does
bullet Patient's body Brings the forceps down the wound channel, grips the ball, pulls it out, packs and binds the wound
suture Patient's body Pierces 5 to 7 mm from the edge of the cut and draws across, stitch after stitch
fracture Patient's body Pulls the limb to put the bone back, lays two splints, wraps a bandage. Skull and ribs: bandage only
inject Patient's arm Finds the vein, goes in until blood shows, pushes the plunger slowly
mortar Bench Grinds round the bowl at a steady pace
scale Bench Weighs a target amount in grams, then validates
still Bench Keeps the thermometer in the red band by playing with the flame
pills Bench Cuts, rounds and dusts pills
sterile Bench Drops each instrument in boiling water for 8 to 14 seconds

Each game ends with a quality from 0 to 100 %.

General settings

Key Default Description
Config.Minigames3D.Enabled true Master switch of the world minigames. false: surgeries use the 2D games, injections are skipped (the medication works directly), and the apothecary bench is disabled.
Config.Minigames3D.Sounds.Enabled true Gesture sounds (forceps, needle, bone, plunger, mortar...), played by the interface.
Config.Minigames3D.Sounds.Volume 0.8 Volume of these sounds, 0 to 1.
Config.Minigames3D.DefaultTone "sc03" Skin tone of the skin patch when the patient's is unknown. Codes of the multiplayer heads: sc01, sc02, sc03, sc04, sc05, sc08. A character creator can publish the real tone on the player's state bag: LocalPlayer.state:set("murphy_doctor:skinTone", "sc03", true).
Config.Minigames3D.Lamp.Height 0.50 Metres. Height of the operating lamp above the wound.
Config.Minigames3D.Lamp.Range 2.0 Metres. Reach of the lamp light.
Config.Minigames3D.Lamp.Power 1000.0 Light intensity on the patient.
Config.Minigames3D.Lamp.BenchPower 900.0 Light intensity on the apothecary bench.
Config.Minigames3D.PoseWait 1800 Milliseconds given to the patient's operating pose before the skin patch is laid on the limb. Raise it if the patch appears before the patient has lain down.
Config.Minigames3D.MinScore 0.5 Quality from 0 to 1. A game finished under this counts as a failure (surgery, injection and preparation).
Config.Minigames3D.Disabled {} Games turned off, for example { fracture = true }. A disabled care game falls back to its 2D game; a disabled injection is skipped; a disabled craft game hides its recipes.
Config.Minigames3D.DebugTable "p_tablesur01x" Debug only (/doc:mg with Config.Debug): the table slid under the test NPC. nil = none.

Care body parts

Config.Minigames3D.CareParts lists the body parts a care game can be played on. A part missing here uses the 2D games.

Field Description
from, to Bone names. The skin patch is laid along the line from from to to.
lift Metres above the bone line. Clears a coat sleeve; the spine runs along the back, so the belly patch sits 26 cm above it.
along Optional. Metres to slide the patch along the bone line, towards to (negative = towards from).
games Optional set of allowed games, for example { bullet = true, suture = true }. nil = all games.
fracture Optional. "wrap" sets a fracture of that part with the bandage alone, no traction and no splints (skull, ribs).
Part from to lift Other
left-arm skel_l_forearm skel_l_hand 0.045 -
right-arm skel_r_forearm skel_r_hand 0.045 -
left-leg skel_l_calf skel_l_foot 0.075 -
right-leg skel_r_calf skel_r_foot 0.075 -
left-foot skel_l_foot SKEL_L_Toe0 0.040 -
right-foot skel_r_foot SKEL_R_Toe0 0.040 -
belly skel_spine0 skel_spine2 0.26 fracture = "wrap"
head skel_neck1 skel_head 0.090 along = -0.03, fracture = "wrap"
lua
-- head wounds: no 3D bullet extraction, only suture and fracture
["head"] = { from = "skel_neck1", to = "skel_head", lift = 0.090, along = -0.03, fracture = "wrap",
games = { suture = true, fracture = true } },

Timing and anti-cheat

Both tables are indexed by game key and counted in seconds. The server checks them when the result comes back.

Key Description
Config.Minigames3D.TimeLimit.<game> Time allowed to finish the game. Past this, the session expires.
Config.Minigames3D.MinSeconds.<game> Shortest time the server accepts. A faster result is rejected.
Game TimeLimit MinSeconds
bullet 150 4
suture 150 4
fracture 180 6
inject 120 3
mortar 120 4
scale 120 3
still 120 8
pills 120 3
sterile 150 8

Injection

When a doctor signs a treatment that contains an injectable medication, the syringe game is played on the patient's arm first. A failed injection uses the dose up without effect: the item is consumed, but that prescription line neither heals nor vaccinates. The other lines of the treatment still apply.

Key Default Description
Config.Minigames3D.Injection.Enabled true false: injectable medications work directly, no game.
Config.Minigames3D.Injection.Items { "morphine", "antivenin", "vaccinejenner", "vaccincholera" } Medication items given with the syringe. Item names of Config.Treatment.MedicationItems (Treatment).

Operating table

Key Default Description
Config.Minigames3D.OperatingTable "p_tablesur01x" The operating pose lies the patient back; without a bed under them they would float. During an operation or an injection, the patient's client places this prop under them (networked, everyone sees it) and removes it at the end. nil = no table, for dispensaries that have beds or tables where patients lie down.

Apothecary bench

Doctors prepare remedies at a bench in the dispensary. The bench needs Config.Craft.Enabled and Config.Minigames3D.Enabled.

Key Default Description
Config.Craft.Enabled true Master switch of the bench.
Config.Craft.RequireDoctor true Only doctors (as detected by Config.Interactions.DoctorDetection) may use the bench. false opens it to everyone.
Config.Craft.Distance 1.6 Metres. Prompt distance around the bench.
Config.Craft.PromptKey 0xCEFD9220 (E) Native prompt key, used without murphy_interact.
Config.Craft.LoseOnFail true A failed preparation uses the ingredients up. false: the ingredients are kept on failure.
Config.Craft.BonusScore 0.9 Quality from 0 to 1. At or above it, one extra item is given. Under Config.Minigames3D.MinScore the preparation fails.
Config.Craft.Benches one bench List of benches, see below.
Config.Craft.Recipes 6 recipes See Recipes.

Bench entry fields:

Field Description
coords vector4(x, y, z, w): x, y, z = the centre of the bench top, w = the heading the doctor faces while working.
SpawnBench true: the script places its own bench prop there. false: use a table of your map, with its top at z.
dispensary Informational: the dispensary this bench belongs to. Not read by the code.

The shipped bench is at the Saint Denis hospital (dispensary = 1). Add one entry per dispensary that should have a bench:

lua
Config.Craft.Benches = {
{ dispensary = 1, coords = vector4(2722.94, -1234.20, 50.23, 270.0), SpawnBench = true },
{ dispensary = 2, coords = vector4(x, y, z, heading), SpawnBench = false }, -- a table of your map
}

Replace x, y, z, heading with the values taken in game at your table.

Recipes

Field Description
id Unique recipe id.
game The minigame played: mortar, scale, still, pills or sterile.
ingredients List of { item, count } taken from the doctor (on success, and on failure when LoseOnFail = true).
output { item, count } given on success (plus one at BonusScore).
dose Scale game only: grams to weigh.

The recipe list shows the output item's label from your inventory and greys out recipes whose ingredients the doctor lacks.

id Game Ingredients Output
camphor mortar 2 medicinal_herbs, 1 animal_fat 2 camphreartisanal
charcoal mortar 1 charcoal_lump 3 charbonvegetal
quinine scale (15 g) 2 cinchona_bark 2 quinine
laudanum still 2 opium_poppy, 1 grain_alcohol 1 laudanum
aspirin pills 2 willow_bark, 1 chalk_powder 4 aspirin
sterile sterile 1 surgical_kit 1 sterile_kit
lua
Config.Craft.Recipes = {
-- ...shipped recipes...
{ id = "codeine", game = "pills", output = { item = "codeine", count = 3 },
ingredients = { { item = "opium_poppy", count = 1 }, { item = "chalk_powder", count = 1 } } },
}

Every ingredient and output must exist in your inventory (Items). The sterile_kit output is the sterile instruments used by Surgery.


Last updated: November 20, 2026