Double post time! I felt that I had created a pretty solid framework here, so I set out to expand it some more and see what it can do. Turns out it can handle contagious disease, noncontagious disease and epidemics just as well. All that is needed is to copy the interactions and change the parameters. The raws below include annotation so as to how to do that.
New DFFD:
http://dffd.wimbli.com/file.php?id=7758Again free for all use you may have for it! Now includes the following:
Disease name - prevalence - spread - nature - effect
Plagues:
Black plague - approx. 0,03%/migrant - spreads 1x/day/diseased dwarf/touch - permanent, permanent immunity - intense pain, fevers, nausea, oozing and small chance of permanent eye, limb or organ necrosis per month (to death). Also small chance of a deity cursing someone with this.
Bubonic plague - approx. 0,03%/migrant - spreads 1x/day/diseased dwarf/touch - permanent, permanent immunity - blisters, fevers, vomiting blood. Also small chance of a deity cursing someone with this.
Hemorrhagic smallpox - approx. 0,04%/migrant - spreads 1x/day/diseased dwarf/touch - permanent, permanent immunity - bruising, coughing blood, bleeding (to death). Also small chance of a deity cursing someone with this.
Epidemics:
Influenza - 2,5%/migrant - spreads 1x/day/diseased dwarf/touch - lasts 1 month, preventable with medicine, no lasting immunity - fevers, nausea, slight pains all over
Meningococcal meningitis - 1%/migrant - spreads 1x/day/diseased dwarf/touch - lasts 1 month, preventable with medicine, no lasting immunity - fever and strong pain, chance of unconsciousness, tiny chance of psychosis
Pneumococcal pneumonitis - 1,5%/migrant - spreads 1x/day/diseased dwarf/touch - lasts 1 month, preventable with medicine, no lasting immunity - coughing blood, small chance of lung necrosis leading to death
Noncontagious diseases:
High blood pressure: affects 7,5% of dwarves - does not spread - permanent, treatable with blood pressure medicine - if untreated, 33% chance of dizziness lasting one month per month, 1% chance per month of cerebral infarction leading to permanent unconsciousness
Paranoid schizophrenia: affects 1% of dwarves - does not spread - permanent, treatable with psychiatric medicine - if untreated, 50% chance of vastly increased creativity for one month per month, 33% chance of no emotions for one month per month, 10% chance of psychosis for one month per month
Liver cancer: affects 1% of dwarves - does not spread - permanent, liver necrosis can be prevented with cancer medicine - if untreated, liver will eventually undergo necrosis.
Other
Rabies: initially affects 1% of animals you give it to, can be given to animals only - permanent - affected animal starts spreading it by touch (1 victim/day) at 3 weeks, animal goes permanently berserk at 4 weeks; animal can infect dwarves after 3 weeks, dwarves go berserk and become contagious at 4 weeks and unavoidably die at 5 weeks.
Medicine:
MEDICINE_EPIDEMIC: stops epidemics spreading, which makes them go away. The only other way to survive them is to isolate dwarves so they don't keep re-infecting each other.
MEDICINE_BLOOD_PRESSURE: well, just about what you would expect. Makes dwarves not stroke out and become vegetables eventually.
MEDICINE_PSYCHIATRIC: keeps schizophrenic dwarves from acting on their delusions but also lowers their creativity
MEDICINE_CANCER: does not cure cancer, but makes it not destroy organs
All medicine currently works for 2 months per dose.
This is a minimal upload for compatibility. All the diseases are there, but you must add the 4 lines per disease category that are in ADD TO CREATURE and ADD TO MEDICINE to make creatures susceptible to disease and to make plants medical.
Comments, ideas, requests? 'Cause I could be persuaded to make more diseases too. (nurgleface)
- To avoid migrants bringing communicable diseases to your fort, the easiest way by far is to build migrant quarters where they and their animals can be quarantined for 1 month before they are let loose in your fort. However, note that if their race is affected by disease, merchants and invaders can bring epidemics to your fort too! Strategic merchant containment is also a possibility, and may even be safer for you for other reasons as well - if they die of pneumonia they caught from your dwarves, you will get the blame (but also the goods, so there's that).
- You should be able to tell if an animal has rabies, because once it goes berserk, it and its corpse should be marked as "rabid". If there is a rabies outbreak in your fort, don't feel too bad. It will have infected at most 7-10 other creatures unless you were really unlucky. Isolate everyone who was in contact with that animal, and observe them for 1 month. Some will die, but because rabies becomes contagious very slowly, there should be no further casualties.
- Now that there are diseases, large and well-stocked hospitals are a thing. Hospitals should have plenty of medicine, wards where disease-bearing dwarves can be contained and observation chambers for dwarves who were in contact with a rabid animal. For epidemics, lock everyone in the infectious disease ward and feed them medicine until the epidemic has stopped. Unless you made wine lower blood pressure or are really good at micro, you'll also probably eventually have a collection of dwarves who had a stroke (but the chances of stroke are only 0,075% per month per dwarf, so not too many). Consider magma-based euthanasia unless you really love those dwarves. Important dwarves who you know have blood pressure could have their own chambers have stockpiles of blood pressure medication.
- The same goes for asylums. Schizophrenic dwarves should have their own little fort stocked with medicine so they can live relatively normal lives. However, since their occasional bonus creativity improves item quality, you may instead take the risks involved and let them live among your dwarves normally, preferably working as craftsdwarves - but they may eventually do something unwise. It's not particularly humane, but if you surround their craftsdwarf's workshop with cage traps, you'll most likely catch them if/when something goes wrong and can release them once they come back to their senses.