RedM documentation
Murphy's Doctor
Configuration
Metabolism
This page covers shared/config_metabolism.lua: the metabolism HUD, hunger and thirst (decay, activity multipliers, starvation and dehydration effects), the threshold notifications and the Discord log settings that live in the same file.
How it works
Hunger and thirst are two values from 0 to 100 (100 = fed / hydrated). They are simulated on the client, synced to the server cache regularly and written to the database on a timer, so they survive reconnects and restarts.
- Every
Decay.Intervalseconds both values drop by their rate, multiplied by the player's current activity (sprinting, swimming, fighting...). - Every
Decay.EffectsIntervalseconds, if a value is at or below its threshold, the configured effects are applied (health or stamina loss). - Eating and drinking raise the values (see Consumables).
- Nothing decays and no effect is applied while the player is in a coma.
Other systems feed into the metabolism:
| Source | Effect |
|---|---|
| Hyperthermia (Temperature) | Thirst decay is multiplied by the active thirstDrainMultiplier (1.5x to 3x by default). |
| Cirrhosis (Alcohol) | Hunger and thirst decay are multiplied by Config.Alcohol.Cirrhosis.HungerThirstMultiplier. |
Cholera and other diseases flagged lockThirstAtZero (Treatment) |
Thirst is locked at 0 while the disease is symptomatic: drinking does not raise it. |
If you run
vorp_metabolism(or any other hunger/thirst script), stop it or setConfig.Metabolism.Enabled = false. The install check prints a warning when both run at the same time.
HUD
| Key | Default | Description |
|---|---|---|
Config.Metabolism.Enabled |
true |
Shows the metabolism HUD. The HUD opens automatically when the character is loaded. When false, the HUD commands answer "HUD disabled". |
Config.Metabolism.EditKeybind |
nil |
Control hash that opens the HUD layout editor (drag and drop the indicators). nil disables the key; the /edithud command still works. Do not use 0x24978A28 (H), it is the health check key. Suggestions: L 0x80F28E95, N 0x4BC9DABB, P 0xD82E0BD2. |
Config.Metabolism.RefreshInterval |
10 |
Seconds. The client fetches the stored values from the server at this rate and, while the HUD is visible, refreshes the indicators. The threshold notifications (see below) are checked on the same tick, with the HUD shown or hidden. |
Config.Metabolism.SaveInterval |
120 |
Seconds. The server writes every cached player to the database at this rate. The client pushes its local values to the server every SaveInterval / 2 seconds. Recommended range: 60 to 300. |
The positions chosen in the layout editor are saved per character in the database.
Indicators shown
The HUD builds its indicators from the player's state. Hunger and thirst are percentages; the others are state icons that only appear when relevant:
| Icon | Shown when |
|---|---|
hungry, thirsty |
Always, when HungerThirstEnabled = true. |
cold / hot |
Body temperature at or below Config.Temperature.FeelingCold, or at or above Config.Temperature.FeelingHot. Also shown for a cold or burn injury. |
bleeding |
The player bleeds. |
poisoned |
The player is poisoned. |
injured |
The player has at least one injury. |
dirty, heavy |
The matching condition is set by another resource through the exports. |
Config.Metabolism.Indicators is kept in the file for reference only: the indicator list is built by the script and this table is not read.
Player commands
These commands are available to every player. Set a value to nil or "" to disable the command.
| Key | Default | Description |
|---|---|---|
Config.Metabolism.Commands.EditHUD |
"edithud" |
Opens the layout editor with every indicator visible. |
Config.Metabolism.Commands.ShowHUD |
"showhud" |
Shows the HUD. |
Config.Metabolism.Commands.HideHUD |
"hidehud" |
Hides the HUD. The threshold notifications keep working while it is hidden. |
Hunger and thirst
| Key | Default | Description |
|---|---|---|
Config.Metabolism.HungerThirstEnabled |
true |
Master switch of hunger and thirst. When false, both bars are hidden, nothing decays, no effect is applied and the AddHunger / AddThirst exports do nothing. The other indicators (temperature, bleeding, poison...) keep working. |
Decay
| Key | Default | Description |
|---|---|---|
Config.Metabolism.Decay.Enabled |
true |
Automatic hunger and thirst decay. Effects (below) still run when this is false, so a player at 0 stays penalised until they eat. |
Config.Metabolism.Decay.Interval |
60 |
Seconds between two decay steps. |
Config.Metabolism.Decay.HungerRate |
0.55 |
Hunger points lost per step (out of 100). At the defaults, a full bar empties in about 3 hours of idle play. |
Config.Metabolism.Decay.ThirstRate |
0.75 |
Thirst points lost per step. At the defaults, a full bar empties in a little over 2 hours of idle play. |
Config.Metabolism.Decay.MinValue |
0 |
Floor of both values. Negative food values (salty food raising thirst) never push below it. |
Config.Metabolism.Decay.EffectsInterval |
5 |
Seconds between two effect ticks. Independent from Interval. |
Activity multipliers
The rate of each step is multiplied by the first matching activity, checked in this order: combat, swimming, sprinting, running. Idle or walking = 1.0.
| Key | Default | Description |
|---|---|---|
Config.Metabolism.Decay.Multipliers.Combat |
1.3 |
While shooting or in melee combat. |
Config.Metabolism.Decay.Multipliers.Swimming |
1.8 |
While swimming. |
Config.Metabolism.Decay.Multipliers.Sprinting |
2.0 |
While sprinting. |
Config.Metabolism.Decay.Multipliers.Running |
1.5 |
While running. |
Hunger effects
Values act on the RedM cores (the inner rings, 0-100) and on the outer bars (health points, stamina bar). An effect applies on every effect tick while hunger is at or below its Threshold.
| Key | Default | Description |
|---|---|---|
Config.Metabolism.Decay.HungerEffects.HealthDamage.Enabled |
true |
Starvation hurts. |
Config.Metabolism.Decay.HungerEffects.HealthDamage.InnerCoreAmount |
5 |
Health core points removed per tick. |
Config.Metabolism.Decay.HungerEffects.HealthDamage.OuterBarAmount |
2 |
Health points removed per tick. 0 = core only. |
Config.Metabolism.Decay.HungerEffects.HealthDamage.Threshold |
0 |
Hunger value at or below which the effect starts (0 = only when empty, 10 = from 10 down). |
Config.Metabolism.Decay.HungerEffects.HealthDamage.CanKill |
false |
true = starvation can bring the player to 0 HP (coma). false = stops at 1 HP. |
Config.Metabolism.Decay.HungerEffects.StaminaDrain.Enabled |
false |
Starvation drains stamina. |
Config.Metabolism.Decay.HungerEffects.StaminaDrain.InnerCoreAmount |
5 |
Stamina core points removed per tick. |
Config.Metabolism.Decay.HungerEffects.StaminaDrain.OuterBarAmount |
10 |
Stamina bar points removed per tick. 0 = core only. |
Config.Metabolism.Decay.HungerEffects.StaminaDrain.Threshold |
0 |
Hunger value at or below which the drain starts. |
Thirst effects
Same structure as hunger, applied on the thirst value.
| Key | Default | Description |
|---|---|---|
Config.Metabolism.Decay.ThirstEffects.HealthDamage.Enabled |
false |
Dehydration hurts. |
Config.Metabolism.Decay.ThirstEffects.HealthDamage.InnerCoreAmount |
5 |
Health core points removed per tick. |
Config.Metabolism.Decay.ThirstEffects.HealthDamage.OuterBarAmount |
2 |
Health points removed per tick. |
Config.Metabolism.Decay.ThirstEffects.HealthDamage.Threshold |
0 |
Thirst value at or below which the effect starts. |
Config.Metabolism.Decay.ThirstEffects.HealthDamage.CanKill |
false |
true = dehydration can bring the player to 0 HP. |
Config.Metabolism.Decay.ThirstEffects.StaminaDrain.Enabled |
true |
Dehydration drains stamina. |
Config.Metabolism.Decay.ThirstEffects.StaminaDrain.InnerCoreAmount |
10 |
Stamina core points removed per tick. |
Config.Metabolism.Decay.ThirstEffects.StaminaDrain.OuterBarAmount |
15 |
Stamina bar points removed per tick. |
Config.Metabolism.Decay.ThirstEffects.StaminaDrain.Threshold |
0 |
Thirst value at or below which the drain starts. |
Example: make hunger start hurting at 10% and thirst kill when it stays at 0.
Threshold notifications
Config.Notifications sends a warning when a value crosses a threshold. A notification is only sent when the state changes (normal to low, low to critical) and the same notification cannot repeat within the cooldown. The hunger, thirst, health and temperature checks run on the refresh tick (RefreshInterval), whether the HUD is shown or hidden.
| Key | Default | Description |
|---|---|---|
Config.Notifications.Enabled |
true |
Enables the threshold notifications. |
Config.Notifications.ThresholdCooldown |
60 |
Seconds before the same notification can be sent again. Also used by the temperature "feeling" notifications. |
Config.Notifications.Thresholds.Hunger.low |
30 |
Hunger percent below which the "low" warning is sent. |
Config.Notifications.Thresholds.Hunger.critical |
15 |
Hunger percent below which the "critical" warning is sent. |
Config.Notifications.Thresholds.Thirst.low |
30 |
Same, for thirst. |
Config.Notifications.Thresholds.Thirst.critical |
15 |
Same, for thirst. |
Config.Notifications.Thresholds.Health.low |
30 |
Health percent (current HP / max HP of the ped). Never sent during a coma. |
Config.Notifications.Thresholds.Health.critical |
15 |
Same, critical level. |
Config.Notifications.Thresholds.Temperature.cold |
35 |
Body temperature (°C) below which the hypothermia warning is sent by this check. |
Config.Notifications.Thresholds.Temperature.hot |
38 |
Body temperature (°C) above which the hyperthermia warning is sent by this check. |
Config.Notifications.Labels |
{} |
Optional text overrides. Empty = the texts of shared/locales/<lang>.lua (metabolism.*) are used. |
The temperature system also sends its own "you start to feel cold / hot" notifications from the thresholds of Temperature.
Labels accepts one table per category. For Hunger, Thirst and Health, define both low and critical when you override a category, otherwise the missing one falls back to a generic text.
Discord logs
Config.DiscordLogs sends embeds to Discord webhooks from the server. A log is sent only when Enabled is true, its LogEvents entry is true and its webhook is filled.
The webhook URLs are not in this file: they go in server/adapters/webhooks.lua (DoctorWebhooks, same type names), a server only file. Every file of shared/ is sent to the players' game, so a webhook written here could be read by anyone. Webhooks left in Config.DiscordLogs.Webhooks from 1.0.0 still work, but the server prints a red warning at start until you move them.
| Key | Default | Description |
|---|---|---|
Config.DiscordLogs.Enabled |
false |
Master switch. |
Config.DiscordLogs.BotName |
"Murphy Doctor" |
Name shown as the webhook author. |
DoctorWebhooks.<type> |
"" |
Webhook URL per log type, in server/adapters/webhooks.lua. |
Config.DiscordLogs.Colors.<type> |
see below | Embed colour per log type, as a decimal number. |
Config.DiscordLogs.LogEvents.<Type> |
true |
Per-type switch. Same names as the webhooks, first letter in capitals. |
| Type | Logged event | Default colour |
|---|---|---|
coma |
A player enters a coma. | 16711680 (red) |
revive |
A revive, natural or by a doctor. | 762640 (green) |
treatment |
A treatment is signed. Outbreak starts are logged here too. | 25087 (blue) |
injury |
A severe injury. | 16743168 (orange) |
infection |
A new infection or an immunity (vaccine). Also requires Config.Infection.LogToDiscord = true. |
10027161 (purple) |
bandage |
A bandage applied by a doctor. | 3066993 (teal) |
billing |
An invoice issued. | 15844367 (gold) |
nurse |
A heal by the nurse NPC. | 3447003 (light blue) |
treasury |
A withdrawal from the dispensary till. | 9807270 (grey) |
Related: Temperature · Consumables · Alcohol · Notifications · Integrations · Client exports
Last updated: November 20, 2026