RedM documentation
Murphy's Doctor
Configuration
Infection
This page covers shared/config_infection.lua: how players catch diseases on their own (untreated wounds, cold, animal bites, contaminated food or water, contact with a sick player), how a face mask reduces contagion, and how vaccines grant immunity.
The diseases themselves (symptoms, incubation, screen effects, health loss, cures) are defined in the medical encyclopedia, see Treatment and the Medical reference. Town-wide outbreaks are configured in Epidemics.
How it works
Each trigger rolls one or more chances. A chance is a disease id from the encyclopedia and a probability from 0 to 1. Chances are rolled in order and the first one that passes infects the player. A player is never infected:
- with a disease they already have (until it is cured),
- with a disease they are immune to (vaccine, staff immunity).
If a passed roll is refused for one of these reasons, the next chance of the list is still rolled.
On infection, the player only gets a vague "you don't feel well" notification, never the name of the disease: they have to see a doctor. A disease with an incubation time stays silent (and contagious) until its symptoms appear.
Disease ids available in the shipped encyclopedia: grippe (influenza), pneumonie (pneumonia), tuberculose (tuberculosis), typhoide (typhoid), fievre_jaune (yellow fever), cholera, paludisme (malaria), sepsis, tetanos (tetanus), dysentery, rage (rabies), scorbut (scurvy), intox_alcool (alcohol intoxication), morsure_serpent (snakebite), variole (smallpox), syphilis, dehydration, cirrhosis.
General settings
| Key | Default | Description |
|---|---|---|
Config.Infection.Enabled |
true |
Master switch. When false, no trigger infects anyone, and the alcohol diseases (cirrhosis, intoxication) and epidemics cannot infect either. Staff commands that infect also stop working. |
Config.Infection.NotifyOnInfection |
true |
Sends the vague "you don't feel well" notification on infection (not for diseases with an incubation time). |
Config.Infection.InfectionNotifyText |
not set | Optional text override of that notification. Default: infection.feel_sick in shared/locales/<lang>.lua. |
Config.Infection.LogToDiscord |
true |
Logs infections and immunities to Discord. Also needs Config.DiscordLogs enabled and an infection webhook in server/adapters/webhooks.lua (see Metabolism). |
Config.Infection.Debug |
false |
Prints every roll in the server console and in the rolled player's F8 console. |
Untreated wounds
A server check runs every 5 minutes. Each cut or gunshot wound left untreated for long enough rolls its chances, at most once per RollIntervalSeconds per body part.
| Key | Default | Description |
|---|---|---|
Config.Infection.Wound.Enabled |
true |
Enables this trigger. |
Config.Infection.Wound.Types |
{ "cut", "projectile" } |
Injury types that can get infected. Fractures and bruises cannot. |
Config.Infection.Wound.MinAgeSeconds |
600 |
Seconds a wound must exist before it can get infected (10 minutes). |
Config.Infection.Wound.RollIntervalSeconds |
3600 |
Seconds between two rolls on the same body part (1 hour). |
Config.Infection.Wound.SeverityMultiplier.minor |
0.5 |
Probability multiplier for a minor wound. |
Config.Infection.Wound.SeverityMultiplier.moderate |
1.0 |
For a moderate wound. |
Config.Infection.Wound.SeverityMultiplier.severe |
1.5 |
For a severe wound. |
Config.Infection.Wound.Chances |
sepsis 0.04, tetanus 0.01 |
Chances rolled in order. |
A doctor who treats the wound in time removes the risk.
Cold exposure
The client counts how long the player stays in the "cold" state (body temperature at or below Config.Temperature.cold, see Temperature). Past MinExposureSeconds of continuous cold, the server rolls the chances, then the count restarts.
| Key | Default | Description |
|---|---|---|
Config.Infection.Cold.Enabled |
true |
Enables this trigger. |
Config.Infection.Cold.MinExposureSeconds |
120 |
Seconds of continuous cold before a roll. Keep it short: hypothermia damage runs at the same time. |
Config.Infection.Cold.RollIntervalSeconds |
3600 |
Seconds between two cold rolls for the same player. |
Config.Infection.Cold.Chances |
flu 0.05, pneumonia 0.02 |
Chances rolled in order. |
Animal bites
When a hostile animal listed below damages the player, the rabies chances are rolled. Only the models of the list count.
| Key | Default | Description |
|---|---|---|
Config.Infection.AnimalBite.Enabled |
true |
Enables this trigger. |
Config.Infection.AnimalBite.RollIntervalSeconds |
60 |
Seconds between two rolls for the same player, so a pack attack gives a few rolls rather than one per bite. |
Config.Infection.AnimalBite.HostileModels |
13 models | Animal model names that can transmit rabies: a_c_wolf, a_c_wolf_medium, a_c_wolf_small, a_c_coyote_01, a_c_coyote_02, a_c_bearblack_01, a_c_bear_01, a_c_cougar_01, a_c_dogchowchow_01, a_c_dogcatahoula_01, a_c_dogaustraliansheperd_01, a_c_doghobo_01, a_c_dogrufus_01. |
Config.Infection.AnimalBite.Chances |
rabies 0.10 |
Chances rolled in order. |
Contaminated food and water
When a player consumes an item listed here (see Consumables), its chances are rolled on the server. No item is mapped by default: plain drinking water is not penalised. Create dedicated items (stagnant water, raw meat...) and map them.
| Key | Default | Description |
|---|---|---|
Config.Infection.Consumable.Enabled |
true |
Enables this trigger. Does nothing while Items is empty. |
Config.Infection.Consumable.RollIntervalSeconds |
1200 |
Seconds between two rolls for the same player and the same item (20 minutes), so ten sips are not ten rolls. |
Config.Infection.Consumable.Items |
{} |
{ [itemName] = { { diseaseId = "...", proba = 0.0 }, ... } }. |
The item must also be a consumable (an entry of Config.Consumables.Items) to be usable.
Contagion between players
Every TickIntervalSeconds, the server looks at every player carrying a contagious disease and rolls an infection on every other player within Radius. Players in different instances (routing buckets) never infect each other.
| Key | Default | Description |
|---|---|---|
Config.Infection.Proximity.Enabled |
true |
Enables contagion. |
Config.Infection.Proximity.TickIntervalSeconds |
30 |
Seconds between two scans. |
Config.Infection.Proximity.Radius |
4.0 |
Metres around a carrier. |
Config.Infection.Proximity.RollIntervalSeconds |
180 |
Seconds between two rolls for the same exposed player and the same disease (3 minutes). |
Config.Infection.Proximity.Diseases |
see below | { [diseaseId] = probability per roll }. Only the diseases listed here are contagious. |
Shipped contagious diseases: cholera 0.07, grippe 0.06, variole 0.05, pneumonie 0.04, typhoide 0.04, dysentery 0.04, tuberculose 0.03.
Example: a player standing next to a flu carrier for 10 minutes gets about 3 rolls at 6%, roughly a 17% chance to catch it.
Face mask
A player whose face is covered by a mask or bandana is less likely to catch a contagious disease. The detection is built in (no clothing resource needed): the client checks the equipped clothing categories and publishes the result to the server.
| Key | Default | Description |
|---|---|---|
Config.Infection.Proximity.FaceCovered.Enabled |
true |
Enables the mask reduction. |
Config.Infection.Proximity.FaceCovered.Multiplier |
0.35 |
Probability multiplier for a masked player (0.35 = 65% less likely). 0 = full protection (not recommended: a mask is not a vaccine). |
Config.Infection.Proximity.FaceCovered.Categories |
{ "masks", "masks_large" } |
Clothing categories that count as a face mask. A scarf simply pulled up cannot be detected. |
Config.Infection.Proximity.FaceCovered.CheckIntervalSeconds |
4 |
Seconds between two checks of the player's mask. |
The mask only protects the person wearing it. It does not reduce what a masked carrier spreads.
Vaccines
A vaccine is a medication: when a doctor signs a treatment that prescribes a vaccine item, the patient becomes immune to the disease for the given time (on top of the normal effect of the prescription). The vaccine item must also be a medication of the treatment screen (see Treatment).
| Key | Default | Description |
|---|---|---|
Config.Infection.Vaccines.<item>.diseaseId |
- | Disease the vaccine protects against. |
Config.Infection.Vaccines.<item>.durationSeconds |
- | Immunity duration in seconds. A new dose only extends an immunity, never shortens it. |
Config.Infection.Vaccines.<item>.notifyText |
not set | Optional text of the "you are now immune" notification. |
Shipped vaccines:
| Item | Disease | Duration |
|---|---|---|
vaccinejenner |
variole (smallpox) |
30 days |
vaccincholera |
cholera |
30 days |
Smallpox and cholera have a built-in translated notification. For any other vaccine, set notifyText, otherwise the immunity is granted without a notification.
Immunities are saved with the character. Staff can infect, immunise and inspect players with the doc:infect:* commands (see Commands), and other resources can use the TryInfect server export (see Server exports).
Related: Epidemics · Temperature · Consumables · Treatment · Medical reference · Alcohol
Last updated: November 20, 2026