Cuxial Diseases gives every character a medical state: they can catch a disease, feel its symptoms, get tested, take a treatment and be cured. Every disease is defined in one data file, so you add or change them without touching code.
What it does
- Diseases as data. Six diseases are included as a starting catalog. Each one is an entry in
data/diseases.luawith its stages, symptoms, test, treatment, vaccine and cure plan. - Stages in real hours. A disease moves to its next stage when the time runs out, also while the player is offline. An active treatment can pause it.
- Symptoms the player feels. Cough, dizziness, vomiting, shortness of breath, blurred vision, camera shake and health loss, each at its own interval.
- Three ways to catch one. Proximity to a sick player (off by default), contact between two characters reported by another resource, or manually through an export, a command or the vaccination deadline.
- Tests and diagnosis. A test item returns negative, inconclusive or positive. By default the patient only learns the name of the disease once it is diagnosed.
- Treatment by doses. An item controls the disease for some hours and, for curable diseases, cures it after a set number of doses.
- Vaccines and immunity. Temporary or permanent, from a vaccine item or after being cured.
- Vaccination deadline. Optional: each character gets a number of real hours to get vaccinated; otherwise they fall ill.
- Lethal stages. A terminal stage can make the patient collapse.
- Pregnancy. Months, symptoms, belly clothing, labour and birth, followed from the same resource.
- Health app for the phone, with diagnosed diseases, treatment, immunities and history.
- Staff commands to assign, cure and test everything in game.
Requirements
| Resource | Required | Used for |
|---|---|---|
| OneSync | Yes | Player positions on the server |
ox_lib | Yes | Commands, callbacks, scheduled tasks, locales |
oxmysql | Yes | Cases, immunities, deadlines and history |
cuxial_bridge | Yes | Connects to your framework and your inventory |
ox_inventory or qb-inventory | Yes, one of them | Test, treatment and vaccine items |
cuxial_police | No | EMS side in the MDT: patient file, pharmacy, cure plan with minigames, appointments |
cuxial_medical | No | Knocks the patient down when a lethal stage collapses |
cuxial_emotes | No | Contagion and conception between two characters |
lb-phone | No | Health app on the phone |
The vaccination deadline reads the character table of your framework and needs the columns id and citizenid. QBox and QBCore have them. On ESX, keep onboarding.enabled = false; the rest of the script goes through cuxial_bridge.
What works without the optional resources
Cuxial Diseases runs on its own. This is what each optional resource adds and what happens without it.
| Without | Still works | Not available |
|---|---|---|
cuxial_police | Infection, stages, symptoms, test items, treatment by doses, vaccines, immunity, vaccination deadline, staff commands, every export | The EMS screens, the cure plan steps applied by a doctor (including the minigame), pharmacy, appointments, automatic pregnancy check-ups and the labour alert |
cuxial_medical | The collapse event is still sent to other resources | The patient is not knocked down when a lethal stage collapses |
cuxial_emotes | Contagion and pregnancy through exports and commands | Contagion and conception after an encounter, and the test item marked as external in the catalog |
lb-phone | Notifications on screen | The Health app |
Without Cuxial Police, a disease is cured by completing its doses, with /disease cure, or from your own resource with the exports AdvanceCureStep and Cure.
