Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3 ... 8

Author Topic: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!  (Read 31098 times)

Halfling

  • Bay Watcher
    • View Profile

A small mod to give you contagious diseases that cause epidemics in fortresses, plagues, developmental disorders (blindness, midgets), psychiatric conditions and medicine in fortress mode and for adv mode NPCs. Free for use and compatible with most everything, I imagine.

DFFD: http://dffd.wimbli.com/file.php?id=7818
(old, more complex and buggy version: http://dffd.wimbli.com/file.php?id=7758)
Major update! See: http://www.bay12forums.com/smf/index.php?topic=127265.msg4322030#msg4322030



I was playing adventure mode with this mod when I cam across a camp of human bandits.  The archer was a midget, the maceman was a giant, and the swordsman captain was blind.  It certainly gave their crew more flavor than any other nameless, faceless bandits, but what I didn't realize was that one of the pikemen was a Ghastly Plague Bearer.  He infected me as I was chopping his arms off, which was disappointing because I wanted to retire my dwarf and relocate him to a fortress I would start up later. 

In fortress mode, I had a mother give birth to her child, who was infected with meningitis. I locked them in their room with some food and drink and watched them constantly re-infect one another for five years, until the baby grew up to become a child and I could separate the two and let the disease die out.

In another case of fortress mode, I had a migrant wave bring a case of the flu with them. I quarantined them for 29 days instead of 30, then let them into my fortress.  The fps fucking crashed as 80+ dwarves all began to simultaneously infect one another CONSTANTLY.  I locked everyone into their respective rooms and waited out the disease.  30 days after I locked the final dwarf away, I had lost about 60% of my population to starvation, thirst, and insanity, including my Legendary Blind Weaponsmith.

In conclusion, I love your mod.

-- Spontaneous testimony



Spoiler: Old first post (click to show/hide)

Spoiler: Long story (click to show/hide)

Spoiler: Old notes (click to show/hide)

Brilliand

  • Bay Watcher
    • View Profile
Re: Tiny mod: Contagious disease - free for use
« Reply #1 on: June 14, 2013, 03:55:45 pm »

Masterwork Mod has diseases - I don't think dwarves who catch the disease are contagious, though, just dwarves who are born with it (yes, dwarves are born with the diseases).  Also, no Masterwork diseases are quick as devastating as the ones in your mod.

Is rabies spread through a ranged interaction?  I think it would make more sense (and be easier for the fortress to survive) if it was spread only through bites, like a werecurse.  Not sure whether that's possible to do in a general way...
Logged
The blood of our enemies is but a symbol.  The true domain of Armok is magma - mountain's blood.

Halfling

  • Bay Watcher
    • View Profile
Re: Tiny mod: Contagious disease - free for use
« Reply #2 on: June 14, 2013, 04:02:17 pm »

Actually all the diseases are spread at touching range with no usage hint, meaning that the AI will use them at any opportunity. Spreading plague can only target nonself while plague effects only target self. This is more realistic for rabies than just spreading it through bites, since it can be spread by creatures that are not fully rabid yet such as a dog infected with rabies licking you.

I'm not sure if rabies actually exists in the fortress mode world at this time, however, since it would require a creature to be cursed by a deity and then come to your fort and it's my understanding that animals are randomly generated upon entering the fortress mode map. An easy fix for that is to add rabies to animal raws, such as dog raws, in the same way as the "add-on" does, or to make a separate creature such as a "rabid dog" that exists in all desired biomes and can do the rabies interaction(s).

Halfling

  • Bay Watcher
    • View Profile
Re: Tiny mod: Contagious disease - free for use
« Reply #3 on: June 15, 2013, 09:34:05 am »

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=7758

Again 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)

scamtank

  • Bay Watcher
    • View Profile

How do you administer the medicine in practice? Make food items have medical powers and just hope/jump through hoops to make sure that a given dwarf can only eat the one thing?
Logged

Godlysockpuppet

  • Bay Watcher
  • [Insert wit here]
    • View Profile

Maybe make demons capable of inflicting disease upon your fortress? I.e the angel of decay, or a demon of pestilence/blight? :)
Logged

Halfling

  • Bay Watcher
    • View Profile

How do you administer the medicine in practice? Make food items have medical powers and just hope/jump through hoops to make sure that a given dwarf can only eat the one thing?

Yes, that's the idea. Although I would personally make them drinks instead. You can basically add the "medicine syndrome" to anything you want, so you could also make, say, a reaction that generates gas that acts as medicine, although that's very convoluted.

To make it not insanely hard, you'd probably want the medicine to not be very inaccessible. Either that, or start dwarf hospitals - schizophrenic dwarves are burrowed somewhere and that burrow contains the only stockpile of antipsychotic drinks and no other drink. Alternatively you could make the medicines give a permanent curative effect by removing their syndrome's END: token

Maybe make demons capable of inflicting disease upon your fortress? I.e the angel of decay, or a demon of pestilence/blight? :)

Very easy :) here's a syndrome that makes a dwarf catch the black plague (and also become capable of transmitting it) by fast-forwarding him to a particular part of "plague switch":

Spoiler (click to show/hide)

Just add that to... anything that you want to transmit it, be it creature, interaction or mushroom.

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile

I suggest making animals spread rabies only when they actually bite, otherwise it's a bit too... much :).
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Halfling

  • Bay Watcher
    • View Profile

Unfortunately I don't think that's even possible, because it would require (I think?) rabies adding a [SPECIALATTACK_* token to a creature and syndromes and interactions can't do that, I don't think. If it worked similarly to a werecurse you'd have to have a rabid creature with that token for them to turn into. Fortunately, rabies is really spread by animals that don't bite too, so I can claim this is more realistic :P

If rabies seems like it's a bit too much, you can make it very rare by editing the probs in rabies_switch (the probability of animal having rabies is the product of both probabilities given there), or just not define it for any creature.

As it is any rabid creature will only have 7 victims before it goes berserk and is noticeable, and it will take a long time before the victims become contagious. So the procedure for "vanilla" rabies should be something like: if you have a rabies outbreak in your fort - the originator creature should even be called a "turned rabid" creature - after it's dealt with, lock EVERYBODY and actually everything you are not 100% positive was not affected in observation rooms, wait 1 month and see who survives. This is pretty realistic procedure for a time before rabies vaccines.

Incidentally, does anyone know how diagnosis works? How these things work is they actually define sets of syndromes for diseases that diseased dwarves choose from each month. They have cool names like "is wracked by a violent cough" or "is losing their lungs to pneumonia" or something like "has suffered a stroke" or "is acting on a paranoid delusion" - will these ever be visible to a player, other than in arena mode? If so, how to assure it? Would make medical treatment easier.

Godlysockpuppet

  • Bay Watcher
  • [Insert wit here]
    • View Profile

I know it's easy to make, if I wanted to make one I would. I just thought you were looking for suggestions
Logged

Halfling

  • Bay Watcher
    • View Profile

I know it's easy to make, if I wanted to make one I would. I just thought you were looking for suggestions

Sorry. Confused that with a request. My bad.

I figured I'll not make ready-made creatures or medicine items to go with this so it's not too gimmicky and can just be slapped on any mod or df itself while staying otherwise "vanilla", unless someone wants some for their use.

evictedSaint

  • Bay Watcher
  • if (ANNOYED_W_FANS==true) { KILL_CHAR(rand()); }
    • View Profile

Oh man, this is all just so cool.  I've never seen diseases implemented quite as well as you have.

Do you think you'll make more various diseases? It might be interesting to see "Useful" diseases, such as insomnia (adds [NO_SLEEP]) or just plain curious ones, like mutism (removes [CAN_SPEAK]).

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile

Add saliva to all creatures with the material templates; after that, have rabies add a syndrome effect that makes saliva spread the disease.

Brilliand

  • Bay Watcher
    • View Profile

Add saliva to all creatures with the material templates; after that, have rabies add a syndrome effect that makes saliva spread the disease.

I suppose all bite attacks would be modded to inject saliva?

Can a single attack inject more than one substance?  (I'm thinking of a spider with rabies.)
Logged
The blood of our enemies is but a symbol.  The true domain of Armok is magma - mountain's blood.

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution

could just have the saliva secreted on the mouth (or whatever part is used for biting) no injection needed, of course rain and water will rinse off the "drool" spreading it everywhere (in which more drool will be made)

giving the syndrome [ENTERS_BLOOD] and [SYN_CONTACT] will make it so lathering or a attack that is edged and reaches "blood" will infect
Logged
Pages: [1] 2 3 ... 8