RedM documentation

Murphy's Doctor

Getting Started

Installation


This page takes you from the download to a working first doctor. Follow the steps in order: most support requests come from a skipped step 5 (the framework's own death handling left on).

1. Requirements

Requirement Notes
RedM server A recent FXServer build (1491 or newer)
OneSync Enabled (set onesync on). The server checks the distance between doctor and patient from the players' positions, and the contagion system reads a replicated state bag
oxmysql The only dependency declared in fxmanifest.lua. The resource will not start without it
One framework and its inventory See the table below
Framework Resource detected Inventory used
REDEM:RP 2023 redem_roleplay redemrp_inventory
VORP Core vorp_core vorp_inventory
RSG-Core rsg-core rsg-inventory (notifications through ox_lib, a dependency of rsg-core)

Everything else is optional and detected while the server runs: murphy_interact, murphy_radialmenu, murphy_notify, murphy_platform, murphy_politics, murphy_craft, murphy_clothing, weathersync. Without them the script uses its own built-in fallbacks (native prompts, its own notification box, neutral weather). See Integrations.

Framework specifics (jobs, staff groups, money, death flag) are on Frameworks.

2. Package contents

Both packages contain the same resource folder, murphy_doctor/:

Path Content
fxmanifest.lua Resource manifest
shared/ All configuration files (config.lua, config_*.lua), framework resolver, injury definitions, Lua locales (shared/locales/)
client/ Client scripts, including client/adapters/
server/ Server scripts, including server/adapters/
ui/build/ The compiled interface, with its 22 language files in ui/build/locales/
stream/ Custom props (mw_dr_*) used by the minigames, the apothecary bench and the stretcher
install/ Item definitions for each framework (not loaded by the resource)
database.sql The database schema, for reference or manual provisioning

The difference between the two editions:

Edition What you can read and edit
Premium (escrow) Everything under shared/, client/ and server/adapters/. The rest of server/ is protected bytecode
Open source Every file, plus ui_src/, the source of the interface (React). You only need ui_src/ to change the interface itself; the shipped ui/build/ works as it is

Do not download the repository source of the interface instead of the release package: without ui/build/index.html the interface does not load (the self test reports it, see below).

3. Place the resource

Copy the folder into your resources directory and keep its name murphy_doctor. Events, exports and interface callbacks are named after it.

text
resources/[murphy]/murphy_doctor/

4. server.cfg

Start murphy_doctor after oxmysql, your framework and its inventory. Optional Murphy resources should start before it too, so they are picked up at once (they are also picked up if they start later).

cfg
ensure oxmysql
# your framework and inventory, for example:
# ensure redem_roleplay / ensure redemrp_inventory
# ensure vorp_core / ensure vorp_inventory
# ensure ox_lib / ensure rsg-core / ensure rsg-inventory
# optional
# ensure murphy_interact
# ensure murphy_radialmenu
# ensure murphy_notify
ensure murphy_doctor

With Config.framework = "auto" (the default), the framework is detected when murphy_doctor starts. If murphy_doctor starts first, nothing is detected and the console prints NO SUPPORTED FRAMEWORK DETECTED.

5. Turn off the framework's death handling

murphy_doctor owns the whole death flow: coma screen, help call, doctor revive, and getting up when the coma timer ends. It also runs its own hunger and thirst. Two systems doing the same job give two death screens, a respawn timer racing the coma, or two hunger bars draining the player.

REDEM:RP 2023

cfg
stop redemrp_respawn
stop redemrp_status

redemrp_status is only needed while you keep murphy_doctor's hunger and thirst (Config.Metabolism.HungerThirstEnabled = true, the default). If you prefer your own hunger and thirst, keep redemrp_status and set that option to false in shared/config_metabolism.lua.

The adapter also listens to redemrp_respawn:client:Revived, so a revive fired by another REDEM:RP script still closes the coma. The startup check does not warn about redemrp_respawn.

VORP

  1. In vorp_core/config/config.lua:

    UseDeathHandler = false,
    
  2. Stop the stock medic and metabolism resources:

    stop vorp_medic
    stop vorp_metabolism
    

    vorp_medic registers the same usable items (such as bandage) and would heal around murphy_doctor's wounds and bleeding. If you want to keep vorp_metabolism, set Config.Metabolism.Enabled = false in shared/config_metabolism.lua instead.

RSG-Core

cfg
stop rsg-medic

If your HUD or another resource drains hunger and thirst, keep only one system: either stop it, or set Config.Metabolism.HungerThirstEnabled = false in shared/config_metabolism.lua.

All the conflicts the script can detect are reported at startup, see the install check.

6. Database

There is nothing to import. On every start the server creates the missing murphy_doctor_* tables and adds the missing columns of older installs. The MySQL user of oxmysql needs the CREATE and ALTER privileges on the database.

database.sql holds the same schema. Importing it is optional: use it if your host does not give oxmysql the CREATE/ALTER rights, then the server only verifies the tables.

Tables, columns and maintenance: Database.

7. Items

The item definitions are in install/. These files are not loaded by the resource: copy their content into your inventory once. Skip the items you already have.

Framework File Where it goes Item images
REDEM:RP install/items_redemrp.lua Paste the entries into Config.Items in redemrp_inventory/config.lua redemrp_inventory/html/items/
VORP install/items_vorp.sql Run it on your database (INSERT IGNORE into the items table) vorp_inventory/html/img/items/
RSG-Core install/items_rsg.lua Paste the entries into rsg-core/shared/items.lua rsg-inventory/html/images/

Each file holds the same 37 items: the grimoire, the bandage, the revive item, 17 medications, 4 poison vials, ether, the extracted bullet, the stretcher and the apothecary bench ingredients and instruments. The package does not ship inventory icons: use your own .png files, named as in the seed (<item>.png).

Three items are named at the top of shared/config.lua and must exist for the core features:

Setting Default item Used for
Config.Grimoire.Item grimoire_medical Opens the medical grimoire
Config.Interactions.Bandage.Item bandage The doctor's quick bandage
Config.Interactions.Revive.Item concentrestimulant Consumed by the doctor to revive a patient in a coma

Food, drinks, tobacco and other consumables use your existing items: map them in shared/config_consumables.lua. Full list, usable flags and renaming: Items.

8. First configuration

Open shared/config.lua. The block at the top lists what most servers check before the first start:

lua
Config.framework = "auto" -- or "REDEMRP2k23", "vorp", "rsg"
Config.Locale = "en" -- texts of the script and of the interface
Config.NotifyStyle = "murphy" -- see notifications.md
Config.AdminGroups = { "admin", "superadmin" }
Config.Interactions.DoctorDetection = "database"
Config.DoctorJobs = { "doctor", "medecin", "physician", "medic" }
Config.DoctorWhitelist = {}
  • Config.Locale: see Localization.
  • Config.AdminGroups: the staff groups allowed to use the staff commands. How each framework reports the group is explained on Frameworks.
  • Config.Interactions.DoctorDetection: who counts as a doctor, see step 10.
  • Dispensaries: Config.Dispensaries in shared/config_dispensary.lua. Five are configured: 1 Saint Denis Hospital, 2 Blackwater Clinic, 3 Rhodes Clinic, 4 Strawberry Clinic, 5 Valentine Clinic. Their id is the number used everywhere else (commands, database, benches, nurses).

Every module (surgery, billing, duty, diseases, poisons, temperature...) has its own shared/config_*.lua file. See Configuration overview.

9. Startup messages and the install check

Start the server and read the console. A healthy start shows, among other lines:

text
[Murphy Doctor] Using <framework> adapter
[Murphy Doctor] <framework> adapter loaded
[Murphy Doctor] Initializing database tables...
[Murphy Doctor] Database initialization complete!
[Murphy Doctor] Usable items registered ... grimoire: 1, poison: 4, poisonable: N, consumables: N

<framework> is REDEMRP2k23, VORP or RSG. The client console (F8) shows Client adapter: <framework>.

Install warnings

About 3 seconds after the start, server/sv_install_check.lua looks for known conflicts and prints one red line per problem:

text
[Murphy Doctor] INSTALL WARNING: <message>
Message starts with Shown when What to do
vorp_core has UseDeathHandler = true VORP, and UseDeathHandler = true is found in vorp_core/config/config.lua Set UseDeathHandler = false, restart the server
vorp_metabolism is running while Config.Metabolism.Enabled = true VORP, vorp_metabolism started and murphy_doctor's metabolism on stop vorp_metabolism, or set Config.Metabolism.Enabled = false
vorp_medic is running VORP, vorp_medic started Add stop vorp_medic (or remove the resource)
rsg-medic is running RSG, rsg-medic started Add stop rsg-medic (or remove the resource)

No warning line means no known conflict. If the check itself fails, a yellow line install check skipped: <reason> is printed instead. Nothing is checked on REDEM:RP.

Other console messages

Message Meaning What to do
NO SUPPORTED FRAMEWORK DETECTED No framework was found when murphy_doctor started Start your framework before murphy_doctor, or set Config.framework explicitly
Unknown Config.framework value '<value>' ... falling back to auto-detection Config.framework holds a value the script does not know Use "auto", "REDEMRP2k23", "vorp" or "rsg"
No FrameworkRegisterUsableItem primitive ... usable items disabled The server adapter is incomplete (custom framework) See Framework adapters
DoctorJobRequireDuty=true but framework '<name>' has no on-duty flag The on-duty restriction cannot work on this framework Set Config.Interactions.DoctorJobRequireDuty = false, see Frameworks
Discord webhooks are set in Config.DiscordLogs.Webhooks ... Webhook URLs are still in the shared config, which players can read Move them to server/adapters/webhooks.lua and delete them from shared/config_metabolism.lua
Migration: ... An older table was upgraded (printed once) Nothing
Removed N row(s) of deleted characters. The cleanup of deleted characters ran, one minute after start Nothing, see Database

10. First doctors

Config.Interactions.DoctorDetection (in shared/config.lua) decides who is a doctor:

Value A player is a doctor when
"database" (default) Their character is a member of a dispensary (murphy_doctor_members table). The roster is managed in game from the dispensary board
"job" Their framework job is listed in Config.DoctorJobs
"whitelist" Their character id or an account identifier (license:, steam:, discord:, fivem:) is listed in Config.DoctorWhitelist
"both" job or database
"any" job or database or whitelist
a table Any of the listed modes, for example { "job", "whitelist" }

With the default "database" mode the roster starts empty. Name the first chief from the server console (or in game as staff), with the player connected and their character loaded:

text
doc_addchief <serverId> [dispensaryId]
doc_adddoctor <serverId> [dispensaryId]
  • doc_addchief adds the character as chief of that dispensary, or promotes an existing member.
  • doc_adddoctor adds a regular member.
  • dispensaryId defaults to 1 and must be an id of Config.Dispensaries. A wrong id is refused and the valid ids are listed.
  • In game, these are restricted commands: the player needs the ACE permission for the command (for example add_ace group.admin command allow) and a group listed in Config.AdminGroups. The server console is always allowed.

The chief then recruits and dismisses doctors from the dispensary board. doc_wipedispensary <dispensaryId> removes every member of one dispensary. The full list of commands is on Commands and keybinds.

With the "job" mode, give the job to your doctors with your framework's usual tool. The job must be one of Config.DoctorJobs; the default list (doctor, medecin, physician, medic) already includes medic, the stock medical job of RSG. See Frameworks.

11. Verify the install

Self test

Run in the server console:

text
doc_selftest [serverId]

Staff can also run it in game (the result is printed in the server console and shown in the chat). It changes nothing. It prints [OK], [WARN] and [FAIL] lines, then Summary: X OK, Y WARN, Z FAIL. Paste its output in your support ticket.

Line Meaning
[OK] framework: <key> / [FAIL] framework not resolved Framework detection, see step 4
[OK] server adapter complete / [FAIL] adapter functions missing: ... The server adapter defines every required function
[FAIL] oxmysql is not started Start oxmysql before murphy_doctor
[FAIL] PromptType = "murphy_interact" but murphy_interact is not started Start murphy_interact or set Config.Interactions.PromptType = "auto"
[OK] interactions: native prompts (murphy_interact not started) Information only
[WARN] Billing.Tax enabled but murphy_politics is not started Invoices are not taxed until murphy_politics runs
[WARN] <install warning> The same conflicts as the install check
[FAIL] tables missing: ... The tables could not be created: check the MySQL user's rights, or import database.sql
[FAIL] database query failed: ... oxmysql cannot reach the database
[FAIL] ui/build/index.html missing Download the release package, not the source
[FAIL] locale not loaded The language files in shared/locales/ are missing or broken
[WARN] no dispensary configured / [FAIL] N dispensary(ies) without coords Check Config.Dispensaries
[WARN] items not in your inventory: ... Medications (or the surgery item) missing from your inventory, see step 7
[WARN] N/M consumables are not in your inventory Consumables mapped in config_consumables.lua that your inventory does not have. They are ignored; delete or rename them if you like
[WARN] item list unavailable from the inventory The item names could not be checked: the inventory returned no item list. On VORP, each item is looked up in vorp_inventory by name, so this line should not appear
[OK] character: ..., health cache: ..., doctor: ..., staff: ..., in coma (...) With a server id: the live state of that player
[FAIL] player N is not connected / no character loaded for player N Use the server id of a connected player with a loaded character
[WARN] no health cache yet The player's client has not sent its health yet. Wait a few seconds after the character loads

In game

  1. Join with a character listed as a doctor. Press F3: your health panel opens.
  2. Stand next to another player: the doctor actions appear (examine, treatment, revive, bandage).
  3. Press K or use the grimoire_medical item: the grimoire opens.
  4. Visit a dispensary: the board, the archives and the duty point are there.

12. Updating

  1. Back up your database, your shared/config*.lua files and any language file you edited (shared/locales/, ui/build/locales/).
  2. Replace the whole murphy_doctor folder with the new package.
  3. Re-apply your settings in the new config files. Do not copy old config files over the new ones: new versions add settings, and a missing setting falls back to a default you may not want.
  4. If you edited an adapter in server/adapters/ or client/adapters/, compare it with the new one before copying your changes back.
  5. Coming from 1.0.0: move your Discord webhook URLs from Config.DiscordLogs.Webhooks (shared/config_metabolism.lua) to server/adapters/webhooks.lua, same keys, and delete them from the shared config. Old webhooks still work, but the server prints a red warning at start until they are moved. See Integrations.
  6. Restart the server, then run doc_selftest.

No SQL has to be run by hand. On start, the server upgrades older tables and prints a Migration: line once for each change:

  • murphy_doctor_reports: dispensary_id added, signature widened to TEXT;
  • murphy_doctor_members: is_chief added, status changed from an enumeration to text;
  • murphy_doctor_health: diseases, immunities and alcohol_wear added, and rows whose max_health is below health repaired.

13. Uninstalling

  1. Remove ensure murphy_doctor from server.cfg and delete the folder.
  2. Turn your framework's own systems back on: UseDeathHandler = true and vorp_medic / vorp_metabolism on VORP, rsg-medic on RSG, redemrp_respawn / redemrp_status on REDEM:RP.
  3. Remove the items you added from your inventory, if no other script uses them.
  4. To delete the data, drop the tables (server stopped, after a backup):
sql
DROP TABLE IF EXISTS murphy_doctor_health, murphy_doctor_coma, murphy_doctor_reports,
murphy_doctor_members, murphy_doctor_dispensary, murphy_doctor_metabolism_layout,
murphy_doctor_duty, murphy_doctor_treasury, murphy_doctor_treasury_log,
murphy_doctor_invoices, murphy_doctor_addictions, murphy_doctor_incidents,
murphy_doctor_records, murphy_doctor_certificates;

Conflicts with other scripts

Script What to do
vorp_medic, rsg-medic, redemrp_respawn Stop them: murphy_doctor replaces them
Framework death handler (UseDeathHandler on VORP) Turn it off
vorp_metabolism, redemrp_status, a HUD that drains hunger and thirst Stop it, or turn murphy_doctor's hunger and thirst off (Config.Metabolism.HungerThirstEnabled = false)
Another death, respawn or ambulance script Keep only one. A script that revives players must call exports.murphy_doctor:AuthorizeComaExit(serverId) first, otherwise the server refuses the early coma exit (Config.Coma.ServerExitCheck). See Server exports
Admin revive of vorp_core or rsg-adminmenu Already handled, nothing to do

Only the four cases of the install check are detected automatically. Help with specific symptoms: Troubleshooting.


Last updated: November 20, 2026