Features

Feature-by-feature reference for oxide-medical — the medical record, conditions, injury detection, vitals, contagion, treatment, and the integration surface.

What oxide-medical does, from a server owner's point of view. For how to tune any of it, see Configuration; for the admin tools, see Admin.

The Medical Record

Every character — not every account — gets a medical record the first time they load in:

FieldWhat it is
Blood typeOne of the eight real blood types, assigned at random on first load
DNA hashA unique identifier used for forensic blood evidence
Immune stat0–100. Starts at 100. Erodes when a player neglects themselves and regenerates when they look after themselves. Lower immunity means illnesses take hold more easily
Immunity windowsAfter curing a disease, a grace period during which they cannot catch it again
Allergies / chronicReserved for future use

Alongside it sits the list of active conditions — everything currently wrong with them. Untreated conditions are written to the database as they happen, and reload on the next login. An injury you walk away from is still an injury tomorrow.

The Four Kinds of Condition

Everything the system tracks is one of four categories, each with its own catalog you can edit.

Fractures — 13 types

Broken bones, each tied to a body part, each with physical consequences:

FractureEffect
Broken left / right armAim drifts, slight slowdown
Broken left / right handAim drifts
Broken left / right legHeavy limp, badly slowed
Broken left / right footLimp, slowed
Fractured ribsAim drifts, slight slowdown
Broken spineSevere limp, aim drifts, barely mobile
Cracked skullAim drifts
Fractured neckAim drifts, slowed
Fractured pelvisLimp, badly slowed

Arms, hands and feet can be splinted by anyone. Legs, ribs, spine, skull, neck and pelvis are medic-only.

Wounds — 3 types

WoundBleedsTreatment
GunshotYesA bandage. Anyone can do it
LacerationYesA bandage. Anyone can do it
Retained bulletNoMedic-only. A surgical extraction — there is no item that fixes it

Bleeding wounds stack into a bleeding tier (0–5) that drives blood loss, blood decals and damage over time.

Diseases — 4 types

Diseases get worse over real time, moving through stages that raise their severity and change their symptoms.

DiseaseContagiousStagesCure
InfluenzaYesMinor → moderate at 10 min → severe at 30 minAntiviral. Anyone
Wound infectionNoMinor → moderate at 15 min → severe at 45 min → critical at 90 minAntibiotics. Anyone
PneumoniaYesModerate → severe at 20 min → critical at 60 minAntibiotics. Medic-only
HepatitisYesMinor → moderate at 60 min → severe at 3 hrsAntiviral. Medic-only

Curing influenza grants 24 hours of immunity; pneumonia, 12 hours. Infection and hepatitis grant none — you can catch those again straight away.

Sicknesses — 6 types

Lighter ailments that mostly clear on their own.

SicknessClears afterCure
Nausea5 minAntacid
Fever10 minPainkillers
Dizziness4 minTime only
DehydrationWhen you drinkTime only — it mirrors your thirst
Food poisoning9 minAntacid
Cardiac arrestNever on its ownMedic-only. Raised by the vitals engine

How Injuries Happen

oxide-medical does not read a health bar. It watches the game's own damage events and works out what actually hit you.

Two things decide the injury:

  1. What hit you. Around a hundred weapons and damage sources are sorted into twelve classes — small, medium and high calibre, shotgun, cutting, light and heavy impact, explosive, fire, suffocating, wildlife, and everything else. Falls and being run over are in there too.
  2. Where it landed. The ped bone that took the damage maps onto one of fifteen body parts. A shotgun blast to the leg and the same blast to the head produce different injuries.

From those two, plus how much damage the hit did, the server decides:

  • Does it fracture? High calibre, shotgun, heavy impact and explosive hits always break something. Light impact, wildlife and environmental damage can. Severity scales with the damage — over 60 is critical, over 40 severe, over 20 moderate.
  • Does it wound? Bullet classes leave a gunshot wound; blades and animals leave a laceration.
  • Is a bullet still in there? Any bullet-class hit rolls separately for a retained bullet, from 25% for a small calibre up to 55% for a high calibre — and the higher the calibre, the worse the retained bullet is.

A single hit can raise both a fracture and a wound, which is exactly right for a mauling or a point-blank shotgun.

Repeat hits escalate rather than stack. Shooting somebody in the same leg five times gives them one wound that keeps getting worse, not five identical wounds. Fingers are ignored — too small to model a fracture on.

Everything here is server-decided. The client only reports what it saw; the server validates the body part, the severity and the rate, and makes the call.

What Injuries Feel Like

All of it comes off the condition list, so it clears the instant a player is treated.

  • Limping. Any fracture that limps swaps the movement animation and applies a slowdown, using whichever active fracture is the worst.
  • Aim drift. Arm, hand, rib, skull and neck fractures shake the camera while aiming or shooting — and only then, so it doesn't interfere with normal movement.
  • Blood on the ground. From bleeding tier 2 upward, a bleeding player drops blood decals as they move. Throttled, and only after moving, so standing still doesn't create a pool.
  • Coughing and retching. Diseases and sicknesses emit symptom tokens; those play periodic animations — a cough for the flu, vomiting for nausea.
  • Screen sway. Dizziness, queasiness and blurred vision apply continuous camera shake, the strongest active symptom winning.
  • Damage over time. Severe untreated conditions drain health on a tick — 1 HP for a critical fracture, up to 3 for a critical disease or wound. It is applied so that reaching zero puts the player down through your server's normal death handling, exactly like any other damage.

Every one of these pauses while the player is downed or dead, and while they are in godmode.

Vitals

Every couple of seconds the server recalculates each player's pulse, blood pressure and blood oxygen, and publishes them for anything that wants to display them — the operating-table monitor and the examine overlay in oxide-ems, for instance.

They are not decorative. They come out of a model:

  • Blood volume (0–100, never saved to the database) drains while a player is bleeding — faster the higher the bleeding tier — and regenerates while they are on their feet and not bleeding. A tier-5 bleed empties them in under three minutes; recovering from empty takes a little over twenty.
  • Pulse rises with pain (the summed severity of everything wrong with them) and with blood loss, as the body compensates. Below 35 blood volume that compensation fails and the pulse collapses.
  • Blood pressure falls with bleeding and with lost volume.
  • Blood oxygen falls with chest wounds, with respiratory illnesses like pneumonia, and with the hypotension that comes from a low blood pressure.

Being stabilized by a medic freezes blood volume entirely, which is what makes stabilizing a patient before transport meaningful.

Cardiac arrest

If the pulse stays at or below 20 for three ticks running, the player goes into cardiac arrest: a critical condition is added, the pulse and blood pressure flatline to zero, blood oxygen decays, and a player still on their feet is dropped where they stand.

Cardiac arrest never clears itself. It is cleared by a revive, or treated by a medic. Because it is a critical-severity condition, oxide-ems counts that patient as critical — so they cannot be revived in the street and have to reach a hospital bed or an operating table.

Vitals keep simulating on a downed patient. That is the point: a medic watching the monitor should see them deteriorate.

A cardiac arrest that survives a server crash is swept on next login if the player loads in up and walking, so nobody comes back permanently critical.

Getting Ill

Five different routes, each independently switchable.

Contagion

A player carrying a contagious disease periodically nominates the players standing within 3 metres of them. The server re-checks the distance, checks the reporter genuinely has that disease, checks the target isn't already infected or immune, and rolls.

Masks cut it. Either party wearing one multiplies the chance down to a quarter — both wearing one, to a sixteenth. A healthy immune system resists it too.

New infections start at stage 1, so they escalate from there like any other.

Rain

Standing outdoors in the rain rolls a chance to catch a cold every twenty seconds. The client confirms it is raining and that the player is not inside using the game's own natives, so there is no weather-resource dependency; the server does the rolling.

Dirty wounds

A wound or fracture from a blade, an animal or a fall can turn septic and become a wound infection.

Neglect

Going hungry or staying stressed erodes the immune stat, and rolls for nausea or dizziness. A well-fed, unstressed player regenerates immunity instead. The chance scales directly with immunity — a player at full immunity is essentially immune, one at zero rolls the full base chance.

Thirst

Dehydration is not a chance roll. It is a direct mirror of the thirst stat: it sets in at or below 30 thirst and clears at or above 40. The gap between the two is deliberate, so it doesn't flicker on and off at the boundary.

Where hunger, thirst and stress come from. All three live in character metadata on QBCore, ESX and Qbox, and oxide-medical reads them through o-link. With oxide-needs installed, it receives those values pushed on every decay tick; without it, it polls them on an interval instead. Either way both triggers work. ESX has no stress stat, so the stress rule never fires there.

What the Player Is Told

Never the diagnosis. That is the single most important design decision in this resource.

A player with fractured ribs is told "your chest aches with every breath". A player with hepatitis is told "your skin looks sallow in the mirror". A player with a gunshot wound is told "warm blood soaks your clothes".

They are never told "you have fractured ribs". Working out what is actually wrong is the medic's job — and it is what makes an examination worth roleplaying.

One message is sent when a condition appears or gets worse, and a random one is sent periodically while it lingers, throttled so a badly hurt player is not spammed. Fractures draw from a pool for the body region; wounds from a bleeding pool; illnesses from pools keyed to their symptoms.

Every line is in a config file. Rewrite them, add to them, or turn notifications off entirely.

Treatment

What players can do themselves

Using a cure item runs a progress bar and, on completion, treats the worst matching condition. The server re-validates that they still have the item and the condition is still active before consuming anything.

ItemTreats
medical_bandageGunshot wounds, lacerations
medical_splintBroken arms, hands, feet
antibioticsWound infection
antiviralInfluenza
antacidNausea, food poisoning
painkillersFever

If a player uses an item that only matches a medic-only condition, they are told a medic is needed rather than the item being wasted.

What needs a medic

Eleven of the twenty-six treatable conditions are marked medic-only:

  • broken legs (both), fractured ribs, broken spine, cracked skull, fractured neck, fractured pelvis
  • retained bullets
  • pneumonia, hepatitis
  • cardiac arrest

Seven of those have no cure item at all — there is nothing a player could buy that would fix them. They exist to give a hospital a reason to exist.

oxide-ems treats them through its own pipeline, which bypasses the medic-only flag entirely — that flag only governs a player using an item on themselves.

Suspension and Godmode

The whole system suspends for a player who is:

  • in godmode — detected automatically from the replicated flag your admin resource sets, with no dependency on that resource. Conditions, effects and symptoms all blank out, their identity is kept, and everything comes back the instant godmode is turned off.
  • downed or dead — no new injuries, no illness rolls, no damage over time, no notifications, and physical effects clear. Read through o-link, so it works on every framework.

Any resource can also suspend it deliberately for a player and resume it later.

Vitals are the deliberate exception to the downed rule: they keep simulating on a downed patient, because a deteriorating patient is the product.

What Other Resources Can Build On

oxide-medical is designed to be read from. It provides:

  • fifteen server exports and two client exports covering the record, conditions, vitals, immunity and exemption
  • an o-link medical namespace, so consumers stay framework-agnostic
  • a replicated statebag per player carrying their blood type, immune stat, active conditions, physical flags and symptom set — readable by any client for any player
  • a separate vitals statebag, published quantized and only when a value actually changes
  • four events for every condition change, plus an o-link relay
  • a blood-evidence event carrying the character's DNA, for a police resource to turn into forensic evidence — deliberately limited to non-firearm bleeds so firearm blood isn't dropped twice

Full reference: Exports & API Reference.