Bay 12 Games Forum

Dwarf Fortress => DF Modding => Topic started by: Halfling on June 14, 2013, 03:35:02 pm

Title: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Halfling on June 14, 2013, 03:35:02 pm
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)
Title: Re: Tiny mod: Contagious disease - free for use
Post by: Brilliand 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...
Title: Re: Tiny mod: Contagious disease - free for use
Post by: Halfling 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).
Title: Re: Tiny mod: Contagious disease - free for use
Post by: Halfling 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)

Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: scamtank on June 15, 2013, 10:34:52 am
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?
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Godlysockpuppet on June 15, 2013, 10:38:57 am
Maybe make demons capable of inflicting disease upon your fortress? I.e the angel of decay, or a demon of pestilence/blight? :)
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Halfling on June 15, 2013, 10:48:43 am
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.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Deon on June 15, 2013, 11:08:48 am
I suggest making animals spread rabies only when they actually bite, otherwise it's a bit too... much :).
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Halfling on June 15, 2013, 11:18:04 am
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.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Godlysockpuppet on June 15, 2013, 12:00:41 pm
I know it's easy to make, if I wanted to make one I would. I just thought you were looking for suggestions
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Halfling on June 15, 2013, 12:05:58 pm
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.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: evictedSaint on June 15, 2013, 10:05:10 pm
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]).
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Putnam on June 15, 2013, 10:32:41 pm
Add saliva to all creatures with the material templates; after that, have rabies add a syndrome effect that makes saliva spread the disease.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Brilliand on June 15, 2013, 11:31:04 pm
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.)
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Hugo_The_Dwarf on June 15, 2013, 11:39:53 pm
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
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Meph on June 16, 2013, 12:10:08 am
Haha, I actually have rabies and flu and the black plague in my todo list, this will make it quite a bit easier. I plan a system for stopping/healing them as well, but this is nice groundwork. The current system I use is similar, but for made up sicknesses and not quite as refined.

I would like to expand on this and add it to masterwork, probably in with the second next update.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Brilliand on June 16, 2013, 01:49:16 am
Dwarven diagnosers do diagnose syndromes... I'm not clear on what they try to do about them, though.

Sometimes when a dwarf succumbs to "grossed out in the kitchen syndrome" or whatever in Masterwork, he heads off to the hospital and gets diagnosed with... whatever the actual name of the syndrome was, I forget.  Then he goes back to work, because the doctor barely had time to identify the syndrome before it wore off (my doctor being a Lifemancer might have contributed to that).
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Halfling on June 16, 2013, 03:48:55 am
Add saliva to all creatures with the material templates; after that, have rabies add a syndrome effect that makes saliva spread the disease.

That's a pretty sweet idea. I'll do that later today.

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]).

Thanks! Making any new disease with this takes literally as much time as copying and editing existing raws (e.g. EPIDEMIC_1 -> NONCOMMUNICABLE_5), changing the syndrome and changing the frequency in the relevant "switch" or adding a new switch. So I could make a metric ton of them. I think I might just add at least noncommunicable blindness for 1% of dwarves later. Insomnia is a good idea too, I'm just not sure I want to give some dwarves superpowers.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Halfling on June 16, 2013, 04:36:11 am
Haha, I actually have rabies and flu and the black plague in my todo list, this will make it quite a bit easier. I plan a system for stopping/healing them as well, but this is nice groundwork. The current system I use is similar, but for made up sicknesses and not quite as refined.

I would like to expand on this and add it to masterwork, probably in with the second next update.

I'd be honored!

I'll give you a short summary of how this works to help you decide how to customize it.

1. The bit in add to creature makes creature capable of performing the relevant SET_EPIDEMIC_BOOL on itself. This has e.g. 5% chance of giving it the EPIDEMIC_BOOL_TRUE syndrome and 100% chance of giving it EPIDEMIC_BOOL_SET syndrome (to prevent repeating this ever).

2. EPIDEMIC_BOOL_TRUE allows a creature to perform EPIDEMIC_SWITCH, which is just what it says - adds random epidemic(s) to the creature. It contains a set of probabilities for a creature to be able to perform SPREAD_EPIDEMIC_1, SPREAD_EPIDEMIC_2, etc. on itself. If prob SPREAD_EPIDEMIC_1 = 50%, any creature of that race now has 2.5% chance of instantly becoming sick with influenza once after entering the map. This happens only once per creature because EPIDEMIC_BOOL_TRUE lasts a shorter time than is required to perform the interaction twice, while EPIDEMIC_BOOL_SET is permanent.*

3. SPREAD_EPIDEMIC_1 is the disease model. A creature that it is performed on can now do SPREAD_EPIDEMIC_1 according to the CDI parameters (this part is to be removed for noncommunicable disease), and will now perform DISEASE_EPIDEMIC_1 on itself at defined intervals for as long as the disease lasts.

4. DISEASE_EPIDEMIC_1 is the disease's symptoms. It's actually an interaction that gives a creature one or several of the disease's syndromes when performed. For example pneumonia has two: [SYN_NAME:is wracked by a violent cough!] (95%) - Coughing blood and fever lasting 1 month, and [SYN_NAME:is losing their lungs to pneumonia!] (10%) - lung necrosis.

Currently my "vanilla" diseases cause a creature to perform DISEASE_X_Y on itself either only once (epidemics) or every month to choose syndromes, and all syndromes last 1 month once chosen, so a diseased dwarf gains and loses symptoms every month, but it could just as well be every day or year.

5. MEDICINE_X is added to IT_CANNOT_HAVE_SYNDROME_CLASS in SPREAD_EPIDEMIC_1 and DISEASE_EPIDEMIC_1 targeting. Currently all my medicines work as both cures for symptoms and for preventing the spread of disease, but for example the following is possible too:

a) Vaccines - add token to SPREAD_EPIDEMIC_1 only. Prevents spread, but does not cure; make permanent by removing the END: in the medicine syndrome
b) Symptomatic drugs - add token to DISEASE_EPIDEMIC_1 only. Prevents symptoms, but not spread.
c) Drugs that relieve particular symptoms of a disease only: split  DISEASE_EPIDEMIC's targeting into two creatures (A and B), define both as SELF_ONLY in the CDI, make syndromes target separately and add IT_CANNOT_HAVE_SYNDROME_CLASS to one syndrome's target only.

Hope that made it more approachable. I'm not assuming you can't read the raws just fine; you're much better at this than I am. Just thought I'd save you some time rather than have you read it line by line. :D



*You may notice this can lead to some clustering of a class of diseases and it does, but it's mostly insignificant in actual play since you still generally get the epidemics and diseases separately so long as their probabilities aren't very high (current: prob: flu=2.5%, pneumonia=1.5%, flu AND pneumonia =0.75%). Why it works this way is I started with diseases with cross-immunity, where a system like this gives no clustering and you can use cumulative probability, plus it's faster to write. I kept it this way because it's faster to write and easier to add to creatures as is for lazy people - to remove clustering, just have every disease have its own EPIDEMIC_SWITCH; then you have to decide individually which gets what. EDIT: I just realized how to fix this if desirable without doing that - make creatures' probability to get epidemics relatively high and individual epidemics' probabilities really low, which would give e.g. bool_epidemic: 50%, flu 5%, pneumonia 3% -> flu 2.5%, pneumonia 1.5%, flu AND pneumonia = 0.0625% ~ 0.0375%=2.5%*1,5%.

Later edit 2: Clustering is now fixed by default in the newest updates.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Halfling on June 16, 2013, 10:07:49 am
Made an update to further test what can be done. This:

Spoiler (click to show/hide)

New disorders:

Developmental disorders:

Gigantism: affects 0,1% of dwarves - does not spread - permanent - dwarf is permanently 2 times the size of regular dwarves and described as "extremely tall". Grants visible label: giant
Dwarfism: affects 0,1% of dwarves - does not spread - permanent - dwarf is permanently 50% the size of regular dwarves and described as "very small". Grants visible label: midget
Congenital blindness: affects 1% of dwarves - does not spread - permanent, treatable with MEDICINE_MIRACLE if defined - dwarf is permanently blind. Grants visible label: blind

Abnormal psychology:

Insomnia: affects 1% of dwarves - does not spread - permanent, treatable with psychiatric medicine - dwarf cannot sleep for one year and then is somewhat drowsy (and sleeps) for half a year. Grants visible label: insomniac
Depression: affects 2% of dwarves (not as depressed as humans) - does not spread - permanent, treatable with psychiatric medicine - unless treated, dwarf is emotionless, moves 20% slower and does sloppy work (lower creativity)
Psychopathy: affects 0,1% of dwarves - does not spread - permanent, not treatable - dwarf is permanently bloodsucker and will sometimes drain sleeping dwarves of blood. Dwarf occasionally goes berserk for ½ day (avg: 1 per 10 months) and attacks any nearby dwarves, then returns to completely normal (and will not be discoverable if there were no witnesses and you missed it). Grants hidden label: serial killer

Also plagues were changed for more realism. Now smallpox is the one that gives blisters (and only occasionally hemorrhagia), and bubonic plague and black plague resemble each other more.

People were feeling like only berserk animals should spread rabies, so I made it spread by attack only. However, I was unable to make it spread by saliva. Creating saliva went fine:


and so adding it to creatures:

Spoiler: creature_domestic (click to show/hide)

However, I then tried making rabies do this:
Spoiler: new raws (click to show/hide)

which didn't work at all, no matter what I tried, so I abandoned that. Anybody want to help me with this?
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Warmist on June 16, 2013, 02:36:20 pm
Oh this is very cool. I would love to see fantasy pack too.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Brilliand on June 16, 2013, 05:03:49 pm
which didn't work at all, no matter what I tried, so I abandoned that. Anybody want to help me with this?

Did you see Hugo's post at the end of the last page?  He suggested that instead of having the bit inject saliva, you could just have the creature's mouth by constantly coated in saliva, which would then spread the disease when it came in contact with the skin (i.e. through biting).

Ideally, only creatures with rabies should have saliva coming out of their mouths... not sure whether that's possible, though.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Putnam on June 16, 2013, 05:04:13 pm
It isn't.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Hugo_The_Dwarf on June 16, 2013, 06:08:08 pm
which didn't work at all, no matter what I tried, so I abandoned that. Anybody want to help me with this?

Did you see Hugo's post at the end of the last page?  He suggested that instead of having the bit inject saliva, you could just have the creature's mouth by constantly coated in saliva, which would then spread the disease when it came in contact with the skin (i.e. through biting).

Ideally, only creatures with rabies should have saliva coming out of their mouths... not sure whether that's possible, though.

Of course most bite attacks use TEETH instead of MOUTH to attack now so you'd need to slap [SECRETION:LOCAL_CREATURE_MAT:SALIVA:LIQUID:BY_CATEGORY:TOOTH:ALL] so now all animals with this (and hopefully saliva material on them) will coat their teeth with saliva, then by somehow  reverse engineering the vampire curse interaction
Spoiler (click to show/hide)

so that it gives the infected creatures saliva the interaction or syndrome to pass on rabies, I've never dabbled into this so this is all the suggestions I can give on a biting attack (I was thinking of suggestions looking at were beast bite attacks + interaction but you can't give or alter an attack through an interaction/syndrome (or can you?))

Also here is an example from an old minior mod I released about how an external syndrome can work.
Spoiler (click to show/hide)

Uses another creatures venom which has ENTERS_BLOOD in it.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Putnam on June 16, 2013, 06:11:59 pm
CE_BODY_MAT_INTERACTION:MAT_TOKEN:LOCAL_CREATURE_MAT:SALIVA
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Halfling on June 16, 2013, 06:19:17 pm
CE_BODY_MAT_INTERACTION:MAT_TOKEN:LOCAL_CREATURE_MAT:SALIVA
Ha ha oh wow. Thanks. I feel very stupid now, thinking it was something more complex. I'll try it again later. :D

I'm not really a fan of the contact poison saliva because that tends to lead to cascades where dwarves covered in such stuff spread the disease very fast, compare to thralls.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: evictedSaint on June 16, 2013, 09:28:36 pm
I really think this whole "saliva" thing is unnecessary. I like it the way you had it, adding saliva as a poison that spread the disease, being secreted by teeth that can be washed off in the rain and leave puddles of drool...it seems like you're making this way too complicated. 
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Putnam on June 16, 2013, 09:45:59 pm
I like just having it inject better.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Halfling on June 16, 2013, 10:41:30 pm
Well, the saliva bit is cool because it actually makes it dependent on how the battles go who gets rabies. Wrestling a dog with rabies - bad idea. Engaging one in steel armor - still somewhat bad idea but much less dangerous. Plus it might open some new modes of contagion for use later.

As it is a rabid creature will use a special attack interaction to transmit it once per day, and there's nothing you can do to prevent it. This is very reliable, predictable and works. If I can get the saliva working, I'll then arena test it to see how reliably and how fast it actually transmits disease to see if it's better.

Can't deny that there's bigger fish to fry though. I just recently discovered I had forgotten a bunch of CDI tokens from the instructions on how to add disease to creatures which lead to the game just plain crashing on embark if you followed them. Fortunately very few people had downloaded those :P but still very bad. It's fixed now. In my own playtesting all seems to be working fine. But definitely needs more "beta" testing.

It also seems that as it is, epidemics are not as bad as you would expect. Dwarves tend to be somewhat apart from each other and epidemics just sometimes die out and vanish without you doing anything if people aren't just chilling in a crowded dining hall. But in an overcrowded, small fort, well... you're going to have meningitis, pneumonia and flu bonanza. And vomit all over your hallways. I like it.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: evictedSaint on June 17, 2013, 04:46:33 pm
Two questions:

1) Will your starting 7 or the first two migrant waves ever have one of the diseases, or are they excluded? I ask because vampires don't show up in either one (I think), but you mentioned earlier that units perform this interaction whenever they entered the map.

2) Are there any suggestions on how to implement medicine?  Obviously, you could make wine a medicine, but I was wondering if there was any way to make medicine that is only used by infected dwarves while they're in the hospital (like a real medicine, I guess.)
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Halfling on June 17, 2013, 05:24:55 pm
1) No, these interactions target all dwarves. I don't know how I could make it work like that - haven't come across any tags that would let me do that. If someone does know, I'll gladly implement it. I'm currently getting that the probability of you not getting any epidemics at all with your starting 7 is about 70%. Treating them with so few dwarves is easy, just separate them and it'll die out very soon. I'd like some player feedback on if this is too much or not, I'm probably biased myself since I like having my cool interactions flash on the map. Will adjust it as needed.

You could make a "wait" interaction that makes it take one year before an epidemic starter starts the epidemic, but then quarantining migrants, a real-life procedure to avoid epidemics, would be impossible.

2) Currently my suggestion is as drinks, for simplicity's sake. It really is a bit clumsy, though. Store them like you would vauables, and only let dwarves at them when there's need. An airlock system should work for regulating traffic and preventing thirsty dwarves from drinking your potions... that's about it for epidemics. Now delivering blood pressure medication to needy dwarves without permanently hospitalizing them, that's a real problem I haven't yet figured out.

if it were possible to target materials with interactions, then making drugs that dwarves take only when needed would be trivial. I think IT_MATERIAL doesn't work like that, unfortunately. As it is, I think it's either the above or e.g. reactions that generate gas. A third possibility is to make a "doctor" dwarf caste or syndrome that can give the medicine syndromes to others via interactions. You would become one by birth or by drinking a doctor potion (or by a custom "become a doctor" reaction that creates gas that transforms dwarves into doctors).

Or am I missing something? Currently I'm slightly distracted by my attempt to perfect something I started earlier, dwarves brewing creatures into drinks... brewing warmblooded creatures into blood wine and invertebrates into fermented ichor is easy peasy, but apparently how vermin remains are handled means I have to make a separate reaction and material for EVERY SINGLE vermin I want dwarves to make into mezcal (and I want that fluffy wambler mezcal), unless I want one of several bugs


EDIT: If it's something that's good, then I could also easily make this give "profession" syndromes too, such as 1% of dwarves randomly being "doctors" (and while we're at it, 1% could be counselors for psychiatric patients). But I think it sounds a little... stupid.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: evictedSaint on June 17, 2013, 07:59:51 pm
What WOULD be cool is if you could make inherited disease (such as blindness, dwarven dwarfism, psychosis, etc) actually pass down from parent to child. 

I'm not sure if it's possible, but I remember reading something similar happening with a dog-breeding mod a while back...
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Broken on June 18, 2013, 06:27:24 am
i have to point that hospitalized dwarfs only drink water... so if the medicine is a drink they will never use it.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Halfling on June 18, 2013, 09:31:02 am
That's actually a hell of a good point. I salute you. In fact I just experienced it first hand, since I just had a fun little uncontained meningitis epidemic and given the chance, dwarves do go to the hospital beds because of the PAIN symptom apparently. I didn't think they would because it's not a physical injury, but they do because apparently it counts as a yellow wound.

Here's my face when I realized how right you are here:
Spoiler (click to show/hide)

I guess either it has to be that ambulant dwarves get medical treatment while bedridden dwarves get isolation til their epidemics go away, to remove the pain symptom, or to make medicines food. Hmm. What do you guys think?
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Godlysockpuppet on June 18, 2013, 10:03:05 am
Make them food :)
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Brilliand on June 18, 2013, 11:00:57 am
How about making them something actually hospital-related... such as soap.  :o  The cures doesn't have to be the same thing, actually - if the disease causes use of hospital supplies, make those supplies out of the cure material.  Otherwise, build a mobile pharmacy (a building requiring no materials) in the hospital (or perhaps the meeting area), and give it reactions that take barrels of medicine as reagents and release medicine vapor.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Halfling on June 18, 2013, 11:46:35 am
Might just as well do all three. Herbs that dwarves will not steal before you're ready to use them, and then can be made into either edible, potable or burnable at an incenser. Probably using herbalist labor at a custom workshop.

Medicine should also last a longer time (6 months per go) and epidemics should be a bit more rare. From my playtesting, while this is probably more realistic for the setting as is, you're walking on really thin ice all the time and it's not that much fun. If you have superb micro and play this like a machine, constantly knowing how long it has been since which dwarf went where, you wouldn't even need medicine because epidemics can be dissipated so fast just by using doors; but let one infected dwarf out of quarantine early (many wicked diseases can have no symptoms for a while if you're very unlucky) and you're just screwed, everyone is sick again. So it might be better to make it a little easier. Maybe that'll attract more people who would like to try it too.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Meph on June 18, 2013, 09:45:55 pm
I was away a couple of days, but I like where this is going.

For medicine: Use a workshop (Apothecary's Study) to transform a dwarf into an "Apothecary", who can cure nearby dwarves. To transform him you need the reagents you want to use for the medicine. The Apothecary can either move around freely, or it is a immobile unit, simulating that he works in his study, and the patients have to come visit him.

The cure could be administered by interactions. It would allow the use of VERB and TARGET_VERB to give feedback to the player about which dwarf is cured of what. Potions do not do that.

Alternatively, the cure could be added by boiling rock directly to a single dwarf using the workshop, but I personally prefer the first one, since people only need to micromanage the single "healer-unit", and not every single infected dwarf.

EDIT: Another info: You can use CE_ADD_TAG:CRAZED, it will lead to loyality cascades. You have to transform another creature (berserk dwarf, or something like that) which already has the crazed tag.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Brilliand on June 18, 2013, 11:23:46 pm
The Apothecary can either move around freely, or it is a immobile unit, simulating that he works in his study, and the patients have to come visit him.

Though, immobile units can still be moved around using pens.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Halfling on June 19, 2013, 02:54:02 am
The cure could be administered by interactions. It would allow the use of VERB and TARGET_VERB to give feedback to the player about which dwarf is cured of what. Potions do not do that.

Alternatively, the cure could be added by boiling rock directly to a single dwarf using the workshop, but I personally prefer the first one, since people only need to micromanage the single "healer-unit", and not every single infected dwarf.

EDIT: Another info: You can use CE_ADD_TAG:CRAZED, it will lead to loyality cascades. You have to transform another creature (berserk dwarf, or something like that) which already has the crazed tag.

On the first part: Medicine could just as easily be made to give dwarves interactions that actually cure them and that results in the messages. That might be the best of both worlds.

Second: Are you sure about that? I haven't had that with this mod yet but I don't remember that happening when I was messing around with dwarves having a 1% chance of going berserk every time they drink booze. An affected dwarf moved into the "others" tab from the "citizens" tab and was killed by a recruit wave without incident. Request more info.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Meph on June 19, 2013, 03:28:53 am
i used crazed a lot in syndromes and adding it like this causes loyality cascades. it depends who gets the kill... caravan guards and pets are ok, but otherwise you are in trouble. i think the same holds true for interactions, i deleted my "hulk"-plague because of that.

in testforts with 7 dwarves it makes sense to use single reactions for the medicine, curing the worker.  but managing 200 dwarves that way is a horror and would take ages.

EDIT: Anyway, that is all up to you. Before I start using your current raws for anything, how far do you plan to take this? It seems to me that your developement is still ongoing, so I'd rather wait till you are satisfied with your own product. ;)
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Halfling on June 19, 2013, 11:24:02 am
I obviously need to rework psychosis then if that's what it does. I'll update that when I do the next update, which is sometime this week.

But as for using it in your mod... well, the mechanics are going to stay the same. The diseases need fine-tuning and balancing which is going to take some time, because DF doesn't play any faster than it does. As it is they make playing a little less fun unless you're a real sucker for realistic medieval-style epidemics. The medicine administration system will need to be thought out so it's usable. That's about it, then I would say it's done.

However, if you think you're going to tweak the diseases and define the medicines yourself, then you might just as well use it as is, since I'm not working on the disease interactions themselves anymore, only PROBs and syndromes... except the rabies thing, possibly, but it works as is. But this probably won't take me more than a few weeks to get to the point where I'm happy with the balancing and medicine too. Furthermore if there are things you'd possibly like such as more plagues, I can add things like that with very small effort.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: narhiril on June 19, 2013, 05:28:12 pm
i used crazed a lot in syndromes and adding it like this causes loyality cascades. it depends who gets the kill... caravan guards and pets are ok, but otherwise you are in trouble. i think the same holds true for interactions, i deleted my "hulk"-plague because of that.

I think you can get around that with [OPPOSED_TO_LIFE].
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: evictedSaint on June 25, 2013, 09:44:58 pm
Do children born in the fort have a chance to be born with a disease (such as the black plague or the flu)?
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Halfling on June 25, 2013, 09:56:07 pm
Yes they do. Also, if you are somehow transformed into a disease-bearing creature you can catch it.

Also, sorry - I got a little bit excited about this thing (http://www.bay12forums.com/smf/index.php?topic=127552.0) and didn't work on this for a while. Pending. As before, the interactions and epidemic spreading and ending work, but there's some errors in CDI verbs, a sample medicine implementation and maybe removing the CRAZED part left to do.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Meph on June 28, 2013, 05:37:35 am
I did download everything and I am a bit stuck.

How does your medicine work? It seems like a vaccination, but it doesnt do anything to treat diseases once they broke out. For example insomnia, it has START:0:END:400000-something, so about a year. So dwarf gets insomnia, player gets a message about insomnia, wants to treat the dwarf, administers medicine... and nothing. The dwarf gets the syn_class:medicine, but he is already affected of the syndrome, so the medicine does not do anything.

Also, players will never see the SYN_NAME ingame. [SYN_NAME:is in a state of encephalitic psychosis!] is completely invisible to them. Each of those would have to be made into a self-targetting interaction, which is harmless, like changing speed to 99%, START:1:END:2, just for them to use CDI:VERB or CDI:TARGET_VERB.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Halfling on June 28, 2013, 06:53:47 am
Oh, right - good point, didn't think about that when making insomnia. It must be prevented.

Likewise with all the other symptoms. Since you can't, I don't think? ...Make a medicine that would remove a fever already affecting the dwarf, instead the diseases refresh and re-pick the symptoms monthly. The disease core is just a syndrome that makes them re-perform the disease symptoms interaction on themselves monthly. Having the medicine syndrome prevents that because the symptoms interaction specifies target can't have medicine syndrome, so you get no more symptoms even if you have the disease, but it will take the time until symptoms are refreshed to remove them. However, insomnia instead works with longer periods so the drugs will only take effect after the dwarf has been through one cycle if he is still medicated at that time. Which is an oversight.

It would be extremely simple to add an interaction which does nothing and just use a find & replace command for syn_name on the text to make the dwarves able to do that interaction with the message about the symptoms instead. But since those interactions are not attacks, would the messages about the dwarves using them be shown anyway?
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: scamtank on June 28, 2013, 07:09:00 am
It would be extremely simple to add an interaction which does nothing and just use a find & replace command for syn_name on the text to make the dwarves able to do that interaction with the message about the symptoms instead. But since those interactions are not attacks, would the messages about the dwarves using them be shown anyway?

announcements.txt should alter this behavior, even if I don't know exactly which one the "not attacks" would fall under.

[INTERACTION_ACTOR:A_D:UCR]
[INTERACTION_TARGET:A_D:UCR]
[SIMPLE_ANIMAL_ACTION:A_D]

Interactions are visible only in existing combat reports in forts, while stuff like headbumps only show in adventure mode.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Halfling on June 28, 2013, 07:27:35 am
It would be extremely simple to add an interaction which does nothing and just use a find & replace command for syn_name on the text to make the dwarves able to do that interaction with the message about the symptoms instead. But since those interactions are not attacks, would the messages about the dwarves using them be shown anyway?

announcements.txt should alter this behavior, even if I don't know exactly which one the "not attacks" would fall under.

[INTERACTION_ACTOR:A_D:UCR]
[INTERACTION_TARGET:A_D:UCR]
[SIMPLE_ANIMAL_ACTION:A_D]

Interactions are visible only in existing combat reports in forts, while stuff like headbumps only show in adventure mode.

K.
I am going to fix that right now. The diseases actually DO have target verbs for the disease symptoms already (e.g. [CDI:TARGET_VERB:feel a predatory urge stirring within you. What right do they have to tell you what to do?:suddenly makes you feel very scared, but you are not sure why]) but they used to have incorrect format because of my lack of experience.

Edit: like so. This is pretty damn spammy though:
(http://s10.postimg.org/8hcbw40eh/dis1.png)
(http://s22.postimg.org/za74pexox/dis2.png)
(http://s22.postimg.org/8vjq6lvrl/dis3.png)
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Halfling on June 28, 2013, 08:44:42 am
Okay. Made the following changes for now:

- Diseases are announced properly: Disease spreading to a new dwarf is announced, and the start of symptoms in a dwarf is announced every month that the dwarf is affected by symptoms. Individual symptoms are not announced for now.

- Serial killers no longer use transient [CRAZED] to kill people. Instead I stole the slasher interaction from this: http://www.bay12forums.com/smf/index.php?topic=127552.msg4354017#msg4354017 and gave it to them.

Uploaded: http://dffd.wimbli.com/file.php?id=7758
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Meph on June 28, 2013, 09:44:18 am
You are quick. :)

Psychopaths lash out randomly now and then? That sounds like fun. More dangerous versions of crazed could also use opposed-to-life, as narhiril said. Or they get a insta-kill reaction that kills one of your dwarves, but has a year-long cooldown. Serial-killer dwarf strikes again. Only with target verb, this way the player doesnt know who did it. ;)

I didnt quite find it in the raws, but did you do anything with the idea of adding the syndrome to animal saliva, and make normal bites inject saliva as a carrier? That seems like the most logical way of an outbreak. Animal bites, vermin (rats, mosquitos), migration and curses.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Halfling on June 28, 2013, 06:49:58 pm
Currently they kill on average about 2x/year. With a 75% chance of killing at least 1x/year. The vampire slasher interaction I used kills instantly, but here this kills over a period of a day or two to make the killer more obscure. To make it harder for the player, may want to remove the announcements that point at someone becoming a psychopath. I'm not sure which would be better, since the average player probably doesn't read announcements that much and maybe it's good to have a way to figure out unexplained murders if you look closely. :)

About the others... well, I don't know. I should assume any loyalty cascades will happen if the creature stops being crazed and transforms back into a member of your civilization, and then is killed/kills? As it definitely does not always happen. If that's how it goes, then opposed to life would do the exact same thing except without any buffs from berserking. And if that's how it goes, it should work as is, since the issue will DEFINITELY be settled one way or another if a creature is insane for a month. But could use more playtesting.

I'll need to investigate the saliva thing (I forgot about it, actually), but honestly, it's probably going to work better with attack interactions as now. This way, you don't have to add a saliva attack to every creature to enable rabies, and it's simple and reliable. And anyway, rabies, despite sounding terrible, is nowhere near your top concern compared to epidemics. The current system for those works well since it encourages quarantines as the most important part of prevention, which are the real life thing that was done in older times.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Askot Bokbondeler on June 28, 2013, 07:00:28 pm
ptw
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: evictedSaint on June 29, 2013, 05:36:40 pm
Hey! I'm not sure if you've fixed this since I last downloaded, but I've noticed a pretty glaring error in Fortress Mode.  Here are some snippets from my [R]eports tab...

Dwarf 1:
Spoiler (click to show/hide)

Dwarf 2:
Spoiler (click to show/hide)

Do you see it?

Dwarf 1 is suffering from insomnia, depression, and serial-killer...ness, all of which are in the Psychology interactions.

Dwarf 2 is suffering from schizophrenia, liver cancer, and high blood pressure, all of which are in the Noncontagious interactions.

Granted, there is a *chance* that they both rolled those three specific diseases purely by luck, but it's pretty unlikely.  And, seeing as how all their afflictions are in the same group of interactions, it probably means that you somehow linked insomnia, depression and serial-killer together, and somehow you linked schizophrenia, liver cancer, and high blood pressure together in the same way.

I'm pretty sure this is unintentional.

Also, the reports incorrectly use 2nd person rather than 3rd person perspective, but that's a trivial error at the very worst.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Halfling on June 29, 2013, 06:58:15 pm
That's not the latest version as is visible from the silly broken announcements (I originally made some mistakes with target verbs). There was a problem with my switches for the diseases inadvertently clustering them, but if should be fixed now (The last few lines in http://www.bay12forums.com/smf/index.php?topic=127265.msg4324360#msg4324360 detail that problem and how to fix it. It was actually worse for noncommunicative disease than I make it seem there due to the high probs. I then fixed it later by default. It was visible on the file page at DFFD for a while but not anymore). So that's probably... something like my 2nd version of this, where I had just added all the diseases but none of the fixes? Since the clustering should be fixed in the ready to play one too.

Just to make sure it doesn't happen anymore, I created a bunch of 40 fresh dwarves in arena and observed them for 40k phases. Didn't notice unintentional disease clustering. If it still exists in the newest version, I'll be happy to look into it.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Meph on June 30, 2013, 05:37:52 am
My point for the saliva from bites is that it is more realistic. If lets say dogs have an attack interaction that has a very low chance of giving rabies, then this still might happen:

Dwarf figths dog.
Dwarf dodges/blocks every attack.
Dwarf kills dog.
Dwarf is affected by rabies, because you cant block interactions.

Same about vermin bites. You will have a definite source of the problem, one that an experienced player can navigate (kill all vermins, attack rabid animals with armor-wielding dwarves), and not a random interaction that might spring up from dwarves.

One could toggle the switch for psychosis and insomnia and all those pesky mental illnesses with the ALCOHOLIC trigger. Sober dwarves develope psychosis. :) Or agoraphobia from cave_adaption ;)
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Halfling on July 01, 2013, 12:38:55 am
I'll look into that one next. For now, I made one important update: Replaced all instances of CRAZED with OPPOSED_TO_LIFE, having verified that the former was indeed causing cascades if you gave kill orders and this does not. ::)
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Vattic on July 01, 2013, 02:04:43 am
This looks really interesting Halfling, good work! I was planning on adding some diseases to my own private mod and it looks like you've done most of the work for me.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: evictedSaint on July 08, 2013, 12:18:25 pm
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.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Halfling on July 08, 2013, 06:25:45 pm
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.

Not that it wasn't fun making it, but that just made it all so worth it. Thanks for sharing. :D

All in all then, the basic mechanics seem to be working well and not just for me! Great. I reapplied the idea to make vampires in "DF from scratch" and works as intended there too. More features and the saliva will be a future project. Any new bugs, though, report to me ITT and I'll fix ASAP.

The mother-child-dilemma is... interesting. I have absolutely no idea how to prevent that other than medicating the mother.

There is one extra caveat in adventure mode: fast traveling seems to reset any countdowns before you can use an interaction again, so I assume that that could lead to some massive symptoms and very high infection rates if you're traveling with a companion who is ill. But why would you, though, unless your goal is to unleash biological weapons on a town.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Brilliand on July 08, 2013, 08:09:16 pm
There is one extra caveat in adventure mode: fast traveling seems to reset any countdowns before you can use an interaction again, so I assume that that could lead to some massive symptoms and very high infection rates if you're traveling with a companion who is ill. But why would you, though, unless your goal is to unleash biological weapons on a town.

Fast traveling also causes all syndromes that can expire to expire instantly, so my guess would be that it will result in the elimination of diseases, rather their uncontrolled spread.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Halfling on July 09, 2013, 04:19:26 am
There is one extra caveat in adventure mode: fast traveling seems to reset any countdowns before you can use an interaction again, so I assume that that could lead to some massive symptoms and very high infection rates if you're traveling with a companion who is ill. But why would you, though, unless your goal is to unleash biological weapons on a town.

Fast traveling also causes all syndromes that can expire to expire instantly, so my guess would be that it will result in the elimination of diseases, rather their uncontrolled spread.

Right. That makes the expected adv. mode behavior as follows:
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: evictedSaint on July 09, 2013, 01:17:23 pm
I don't know if it matters all that much, but I'm still noticing some odd clustering.  My Blind Depressed Serial-Killer engineer just got 50 hammer strikes for the murder of 'Farmer' Unguerst. 

His blindness is labeled in the medical screen as only "Partial impairment."

Also, when my dwarves contract meningitis, and go unconscious, it gets spammed in the [r]eports screen.

"Urist McDiseaseburg has fallen unconscious x814
Urist McDiseaseburg has fallen unconscious x346
Urist McDiseaseburg has fallen unconscious x1024"

I'm using your most recent version, too.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Halfling on July 09, 2013, 03:21:03 pm
That should be just a very anomalous dwarf. Blindness and psych issues are governed by different switches so they shouldn't cluster even in theory, unless something is very wrong with the whole concept. Psychopathy and depression should have some clustering, with only a 0.02% a priori chance of having both psychopathy and depression, but a 20% chance of any given psychopath being depressed (psychology is still the worst switch here - for example with epidemics the similar figure is 5% rather than 2.5% of meningitis epidemic starters also having influenza, and developmental disorders and plagues are mutually exclusive and don't cluster). I've learned how to use c_variations more effectively now, so I think I could do away with the whole switches thing, and all the clustering, if this seems excessive, while keeping it easy to implement. Not going to do it straight away because at that level it doesn't bother me and requires rewriting about half of the mod. Thoughts?

Alternatively now that I think about it I could just make the psychology issues mutually exclusive too. There's no real reason why you need to have depressed psychopaths.



The unconsciousness spam, yeah. It happens, I believe, because syndromatic unconsciousness as I've managed to implement it is not a steady state according to my observations. Dwarves keep waking only to be put to sleep again by the syndrome. I was unable to make it stop. Now that you say it, it seems obvious this can be a performance issue if a large part of the population has meningitis and may fall unconscious for a long time.

In this thread (http://www.bay12forums.com/smf/index.php?topic=124831.msg4163266#msg4163266) Putnam suggested setting SEV high, but setting the unconsciousness severity absurdly high does not make a difference, except when it's high enough that it overflows it stops making them unconscious. Applying NOSTUN beforehand to exploit a bug like Meph suggested makes them stop falling unconscious altogether, while having them apply it after is impossible because the patients are unconscious and can't apply new tokens to themselves. Could make someone else apply it but I don't know that I could make it discriminate for just meningitis patients that are unconscious. Setting a NOSTUN effect start with a timed delay after the unconsciousness as part of the same syndrome resulted in the patients waking up and not falling unconscious again.

I also tried making it extreme pain all over - this might result in slightly reduced spam but does not make them permanently unconscious either, and combos similarly with NOSTUN.

If it's very bothersome, could cull the unconsciousness effects.

Anybody else, any help/ideas?
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: evictedSaint on July 09, 2013, 11:23:30 pm
...Well, that's odd...

Two of my insomniacs spontaneously developed depression and serial-killer...ism.
I had saved and was starting up the fortress, and they just...suddenly became depressed serial killers. :\

I don't know if it has anything to do with me reloading the game or anything else. :(
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Halfling on July 10, 2013, 02:47:06 am
Thanks for finding that. I think it could be a missing [SYN_CLASS:PSYCHOLOGY] which is supposed to be there after

[IE_ARENA_NAME:Psychology switch check test]
[SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]

Yeah, saving and reloading can cause weird behavior by syndromes, and related issues do tend to escape testing by me, because I binge through forts and test things in arena... in another thread I had forgotten to add syn_affected_class which lead to the syndrome spreading to everyone upon save and reload. The exact issue I imagine could be at work here is if the cooldown is voided by the save and reload, then if you save and reload within 7.5 days after someone developed abnormal psychology, they can gain another form of it for free because the only protection against that was the cooldown due to the missing syndrome class.

Here's a full fixed interaction_psychology_switch file, can copy, paste and overwrite:

Spoiler (click to show/hide)

Later today, I'll try to confirm the problem, and if that fixes it, I'll update the upload. And if it doesn't I'll figure it out.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: evictedSaint on July 10, 2013, 01:08:52 pm
Your "fixed" interaction_psychology_switch file is, quite literally, identical to the previous file.  I used a online text-comparer tool and it is the exact same as the file I've already downloaded.  Did you accidentally paste the wrong one?
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Halfling on July 10, 2013, 01:57:31 pm
Your "fixed" interaction_psychology_switch file is, quite literally, identical to the previous file.  I used a online text-comparer tool and it is the exact same as the file I've already downloaded.  Did you accidentally paste the wrong one?

Yes. Yes I did. I'm such a ditz I'll just get a tattoo of bubbles this weekend. Was in a hurry though. :P

Anyway, what I was trying to do there wasn't working at all. Your issue is confirmed, serial killers do immediately gain all other forms of abnormal psychology if you save and reload. My idea there was not the cause.

Furthermore I thought the switches would make this stuff easier to read but it's actually a pain and confusing to go through all the raws. So I'm just going to rewrite all this with matryoshka creature variations and remove the switches, also removing all clustering and hopefully this issue too since that's where it obviously is. I'll upload the new raws later at a new DFFD.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Halfling on July 10, 2013, 04:49:30 pm
Fixed version up! Did away with all the switches. It seemed like 90% of the problem pretty much every single problem reported were those. It wasn't that much work after all, just wrote a script to do it.

New files at http://dffd.wimbli.com/file.php?id=7818 !

This should eliminate all the above problems even in theory. It could have new bugs and needs playtesting, but looks promising.

(http://s24.postimg.org/z5e62sxit/diseases.png)

New name of the game:

Spoiler (click to show/hide)

Looking back, that's how it should have been done from the start, but I didn't know enough about how useful creature variations can be. Too bad CV_NEW_TAG:APPLY_CREATURE_VARIATION doesn't appear to work.

I also "officially" made epidemics less frequent because they were too destructive and annoying in fort mode for my taste, and fixed some typos that had managed to evade previous fixing attempts.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: evictedSaint on July 10, 2013, 05:58:36 pm
What am I supposed to do with the .sh files?
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Halfling on July 10, 2013, 06:07:09 pm
Hm, maybe I shouldn't have included those if they're confusing. Or should have written instructions about them. I just assumed people who don't need them would stick them into /raw where they don't do anything :P
If you've created a snazzy new disease that's in the same format as mine, you can run those (assuming you have access to bash) to add it to the files with the probabilities it prompts you for as you run the script...

I think maybe I'll just remove them from the download. This also gives me a chance to fix a design oversight that's there that I just noticed, that a dwarf may gain new illnesses out of nowhere after about 4 years in a fort.



Edit: and it's up. No need to regen world for this update, just changed some durations.

Serial killers no longer seem to get lots of other psychology conditions by saving and reloading, as expected.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: evictedSaint on July 10, 2013, 07:00:44 pm
You left a "Note to Self" file in the download... >.>
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Halfling on July 10, 2013, 07:01:57 pm
I am so bad at this :D



New: Found bug. Adventurer companions getting new diseases eventually. My script had made it rely on cooldowns instead of repetition preventing syndromes I had called "fake booleans" earlier. However, because cooldowns don't work in adv mode, this would lead to companions eventually getting one of every disease, except mutually exclusive ones like gigantism and dwarfism, if you fast travel around them enough. Funky. So I brought those back in. That unfortunately makes 12 new permanent syndromes whose only action it is to prevent getting same disease again later when it's been determined they don't get that per dwarf, now that the diseases are independent.

(http://s17.postimg.org/yh3uswwsv/checklist.png)

Also changed probabilities in a way to make DF need to make fewer checks (outer prob=small, inner prob=large rather than the other way) and changed epidemic numbers halfway back because it was silly getting to 100 dwarves without a single case of the flu.

Fixed version uploaded. This time hopefully without shell scripts, my personal notes etc.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: evictedSaint on July 11, 2013, 05:14:45 pm
Companions are still developing diseases like crazy in adv mode.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Halfling on July 11, 2013, 05:41:57 pm
accidental doublepost
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Halfling on July 11, 2013, 05:42:35 pm
Ugh. Fo sho? My 5 testing companions during a short adventure didn't show signs of disease after 20? times of traveling and saving and reloading, but maybe that's too few trials.

Stupid question first: Is it newest version? If not sure, in newest version line 9, 5th line with text, of interaction_disease_probabilities.txt reads [IT_CANNOT_HAVE_SYNDROME_CLASS:DEPRESSION_CHECK_MADE]

If yes, can you give circumstances so I can replicate and investigate? How long did it take for symptoms to manifest?
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: evictedSaint on July 12, 2013, 12:06:15 am
Yep, it was the newest version.  I played as a dwarf, picked up a few soldiers from town and traveled around a bit.

After 4 or 5 quick travels, they were blind, yellow, cancer-riddled insomniacs who all had high blood pressure.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: evictedSaint on July 16, 2013, 10:17:22 pm
Also, saving and reloading in dwarf mode brings in a plethora of new diseases in a similar fashion.

Edit:

Actually, saving and reloading guarantees some sort of disease and defect for every single dwarf.  So, this version is a little worse. :(
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Halfling on July 17, 2013, 04:11:04 am
Holy mother...

I downloaded the new version myself and added it to a fresh install. Yeah, it happens apparently. I have no idea how I did not see that upon testing it myself. I have no idea how I was able to confirm in play that serial killers no longer get all mental disorders upon save & reload without noticing. Possibly

1. Either I had an undetected file in my diseases version of DF that "fixed" it, or
2. Conversion to a windows form somehow borked it, or
3. I did not upload the same version as I was testing.

Anyway, very sorry. Edit: fixed in next post.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Halfling on July 17, 2013, 05:35:14 am
Well, actually it was giving every dwarf every disease. Found & fixed this critical issue. I assume that's what was causing the adventure mode problems too since I didn't find them myself. Thanks for reporting it. I wonder what those 17 other downloaders did :(

It was as follows:
A disease's first probability check gives the following:
1. You may not use this interaction if you have the syndrome already
2. Syndrome: Permanently set body broadness to 99%, and with e.g. 2% probability, be able to do interaction to make secondary disease check for 3000 phases

this works fine, except upon saving and reloading DF apparently interprets this as "Permanently set: body broadness is 99%, able to make secondary disease check, with 100% probability" for some reason that I really can't be bothered to figure out as it's not my day job.

To fix this, I changed it to:
1. You may not use this interaction if you have syndrome 1 already
2. Syndrome 1: permanently set body broadness to 99%
3. Syndrome 2: With e.g. 2% probability, be able to do interaction to make secondary disease check for 3000 phases

This does not cause the same issue with saving and reloading. My theory is it is interpreted as "Body broadness is permanently 99%, other syndrome has expired"

Furthermore for some obscure reason I had made this change for myself but uploaded a version without it, possibly assuming it was superfluous or just making an honest mistake.

Uploaded the fixed version... (http://dffd.wimbli.com/submit.php?action=edit&eid=7818) This time I downloaded, unpacked it myself into a fresh dwarf install and tried. Did not see extra diseases on save/reload (2 forts, 3 tries).



I'm also going to post the fixed disease probability raw for reference.


And the script to make it:
Spoiler: diseasemaker.sh (click to show/hide)
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: evictedSaint on July 17, 2013, 10:40:54 am
It's all fine. I just hadn't played much during the past week, and last night I loaded it up to find that all my dwarves were giant blind insomniatic serial killers with depression, cancer, high blood pressure, and pnemonia and was like, whaaaaat.

I'll check your new version out later. :P
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: thistleknot on November 24, 2013, 12:09:53 am
If... (I'm really asking for mwmod's, but I figured I'd ask here since it's only just been implemented)


Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Putnam on November 24, 2013, 02:24:01 am
1. PROB
2. IT_CANNOT_HAVE_SYNDROME_CLASS along with an interaction that does absolutely nothing but lingers on the dwarf permanently; such a thing will not affect gameplay and can be stacked on top of or overwritten (unlike effects like speed change)
3. Yes, have the aforementioned do-nothing can-do-interaction have a 98% chance of actually applying
4. RESISTABLE
5. I don't think so?
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: thistleknot on November 24, 2013, 02:30:04 am
On 1 question

PROB:

for influenza

has 3 things associated with it
nausea
pain
fever

so... for this syndrome to have an affect on a dwarf, those 3 subcategory (probabilities) have to be modded?
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Putnam on November 24, 2013, 03:00:01 am
Have the probability be a probability to get a self-inflicted interaction that then has a 100% chance of applying all three
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: thistleknot on November 24, 2013, 10:37:09 am
1st.  I have no idea how to do any of that Putnam, but I do appreciate the input, as maybe someone else who has more syndrome experience can give me specific raw examples.

2nd.  I had a better idea than mutable diseases.  Rather than having to code the chance of mutation as well as the new modified disease.  I thought instead, why not just have the dwarf immune to the disease for a set period of time.  Say a year.  Generally in real world experience.  Diseases mutate from year to year (although, I hear as one gets older, they are less likely to get colds as they may have had the variety already, but there are no colds in this game, it's pneumonia, flu, and meningitis, which I do believe do mutate yearly).

So it would make perfect sense to just make the dwarf immune until next sick season.  This I think would be a lot easier, you could just have the syndrome's affects only occur during a certain (incubation) period, while after the incubation period is over, the dwarf has the sickness, or has a new syndrome that show's he's immune to whatever sickness he had before (like yearly_immune_pneumonia syndrome).
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Putnam on November 24, 2013, 11:12:25 pm
1st.  I have no idea how to do any of that Putnam, but I do appreciate the input, as maybe someone else who has more syndrome experience can give me specific raw examples.

1. Make a syndrome that has a SELF_ONLY CE_CAN_DO_INTERACTION with a PROB of less than 100%
2. Make the interaction impart a syndrome that is the flu, all with a PROB of 100

that's pretty much it
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: thistleknot on November 25, 2013, 12:15:04 am
ok. im starting to get it now.

what do you mean by resistable a few posts up?

why cant recuperation affect syndrome length?  if its dfhack i should be able to call up a check on a dwarfs attribute value and maybe apply a medicine to syndrome cure a disease early and rely on the incubation period ending to give me a 1 year immumity afterwards.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Putnam on November 25, 2013, 12:42:22 am
what do you mean by resistable a few posts up?

http://dwarffortresswiki.org/index.php/Syndrome#Creature_effect_tokens

RESISTABLE is a token that allows you to resist syndromes (probably SEV-wise) with DISEASE_RESISTANCE

why cant recuperation affect syndrome length?  if its dfhack i should be able to call up a check on a dwarfs attribute value and maybe apply a medicine to syndrome cure a disease early and rely on the incubation period ending to give me a 1 year immumity afterwards.

Maybe with a plugin, yeah, but when I post here, I usually mean with raws only
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: thistleknot on November 25, 2013, 09:24:08 am
could i invoke a lua script within the syndrome? if not... then the only way to donit i think woul be a plugin
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Putnam on November 25, 2013, 04:35:07 pm
Yeah, you can, with syndromeTrigger in r4
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: thistleknot on November 26, 2013, 11:40:15 pm
Quote
2. Make the interaction impart a syndrome that is the flu, all with a PROB of 100

How do I do this?

I'm looking at the syndromes in the interaction files, i'm not sure how I can get one syndrome to beget another.  That is the key to 60% of my questions.

Please understand, i'm a complete noob with syndromes (hence why I was asking for specific raw examples).  If I could see how a (complete) syndrome calls an empty (completed) syndrome, that would help a lot.


Update, I think I might have it
"[CDI:INTERACTION:INFLUENZA_PROB_INNER]"
called by [INTERACTION:INFLUENZA_PROBABILITY]
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Putnam on November 27, 2013, 02:00:44 am
It's [CE_CAN_DO_INTERACTION:START:X:PROB:Y:END:Z]. PROB and END are optional. After that, it's identical to CAN_DO_INTERACTION:I, but you have to put in [CDI:INTERACTION:I] into the symptom.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: thistleknot on November 27, 2013, 09:08:59 pm
just to make this easy

say I have 2 diseases, influenza, as well as pneumonia (this is pulled from halfling's mod), and I want influenza to immediately beget pnuemonia after it :end's

how would I modify this set of raws to do that?

Code: [Select]
[INTERACTION:INFLUENZA_PROBABILITY]
   
   [I_TARGET:A:CREATURE][IT_LOCATION:CONTEXT_CREATURE]
   [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED][IT_CANNOT_HAVE_SYNDROME_CLASS:INFLUENZA_A]
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [SYN_CLASS:INFLUENZA_A][CE_BODY_APPEARANCE_MODIFIER:APPEARANCE_MODIFIER:BROADNESS:99:START:0][SYN_NAME:influenza check made]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:2:START:0:END:3000]
   
   [CDI:INTERACTION:INFLUENZA_PROB_INNER]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]
   
[INTERACTION:INFLUENZA_PROB_INNER]
   
   [I_TARGET:A:CREATURE][IT_LOCATION:CONTEXT_CREATURE]
   [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED][IT_CANNOT_HAVE_SYNDROME_CLASS:INFLUENZA_B]
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [SYN_CLASS:INFLUENZA_B][CE_BODY_APPEARANCE_MODIFIER:APPEARANCE_MODIFIER:BROADNESS:99:START:0][SYN_NAME:influenza secondary check made]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:100:START:0:END:3000]
   [CDI:INTERACTION:SPREAD_INFLUENZA]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]
   
   
[INTERACTION:PNEUMONITIS_PROBABILITY]
   
   [I_TARGET:A:CREATURE][IT_LOCATION:CONTEXT_CREATURE]
   [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED][IT_CANNOT_HAVE_SYNDROME_CLASS:PNEUMONITIS_A]
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [SYN_CLASS:PNEUMONITIS_A][CE_BODY_APPEARANCE_MODIFIER:APPEARANCE_MODIFIER:BROADNESS:99:START:0][SYN_NAME:pneumonitis check made]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:1:START:0:END:3000]
   
   [CDI:INTERACTION:PNEUMONITIS_PROB_INNER]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]
   
[INTERACTION:PNEUMONITIS_PROB_INNER]
   
   [I_TARGET:A:CREATURE][IT_LOCATION:CONTEXT_CREATURE]
   [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED][IT_CANNOT_HAVE_SYNDROME_CLASS:PNEUMONITIS_B]
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [SYN_CLASS:PNEUMONITIS_B][CE_BODY_APPEARANCE_MODIFIER:APPEARANCE_MODIFIER:BROADNESS:99:START:0][SYN_NAME:pneumonitis secondary check made]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:100:START:0:END:3000]
   [CDI:INTERACTION:SPREAD_PNEUMONITIS]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]



Update: I think I get it.  I just need to have

   [CE_CAN_DO_INTERACTION:PROB:1:START:0:END:3000]
   
   [CDI:INTERACTION:PNEUMONITIS_PROB_INNER]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]

which calls the pneumonitis_prob_inner.

In the case of a fake disease placeholder that has no effect, I could add to pneumonitis_prob_inner

[IT_CANNOT_HAVE_SYNDROME_CLASS:PNEUMONITIS_C]
  [CE_CAN_DO_INTERACTION:PROB:100:START:0:END:3000]
   [CDI:INTERACTION:IMMUNE_PNUEMONIA]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]

and define interaction:IMMUNE_PNUEMONIA as syn_class:pneumonitis_c?

btw, if wait_period is set to 300001 does that mean the dwarf can't get the disease again for that amount of time?  If so, I don't think an immunity of 400k (i.e. 1 year) is going to make that much of a difference...
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: thistleknot on November 27, 2013, 10:00:39 pm
Okay, I think I got it.  Is this right?

Code: [Select]
   
[INTERACTION:PNEUMONITIS_PROBABILITY]
   
   [I_TARGET:A:CREATURE][IT_LOCATION:CONTEXT_CREATURE]
   [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED][IT_CANNOT_HAVE_SYNDROME_CLASS:PNEUMONITIS_A][IT_CANNOT_HAVE_SYNDROME_CLASS:PNEUMONITIS_C]
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [SYN_CLASS:PNEUMONITIS_A][CE_BODY_APPEARANCE_MODIFIER:APPEARANCE_MODIFIER:BROADNESS:99:START:0][SYN_NAME:pneumonitis check made]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:1:RESISTABLE:START:0:END:3000]
   
   [CDI:INTERACTION:PNEUMONITIS_PROB_INNER]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]
   
[INTERACTION:PNEUMONITIS_PROB_INNER]
   
   [I_TARGET:A:CREATURE][IT_LOCATION:CONTEXT_CREATURE]
   [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED][IT_CANNOT_HAVE_SYNDROME_CLASS:PNEUMONITIS_B]
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [SYN_CLASS:PNEUMONITIS_B][CE_BODY_APPEARANCE_MODIFIER:APPEARANCE_MODIFIER:BROADNESS:99:START:0][SYN_NAME:pneumonitis secondary check made]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:20:START:0:END:3000]
   [CDI:INTERACTION:SPREAD_PNEUMONITIS]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:100:START:3000:END:406200]
   [CDI:INTERACTION:PNEUMONITIS_IMMUNE]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]


[INTERACTION:PNEUMONITIS_IMMUNE]
   
   [I_TARGET:A:CREATURE][IT_LOCATION:CONTEXT_CREATURE]
   [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED][IT_CANNOT_HAVE_SYNDROME_CLASS:PNEUMONITIS_B]
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [SYN_CLASS:PNEUMONITIS_C][CE_BODY_APPEARANCE_MODIFIER:APPEARANCE_MODIFIER:BROADNESS:99:START:0][SYN_NAME:pneumonitis clear for 1 year]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:100:START:3000:END:406200]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]

One thing I'm not sure of

   [CE_CAN_DO_INTERACTION:PROB:100:START:3000:END:406200]

I have two of them, I'm not sure if I need to remove one
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: thistleknot on November 28, 2013, 12:51:32 pm
why not exactly what I wanted (edit: as in it doesn't give dwarfs a one year immunity, but to be honest, it's not really needed with the nerfed #'s), but it seems to be working well.

I reduced the chance of the disease by 80% from where they were at before, and added resistable tags.  So far, 2 dwarfs got sick with the flu, but when they went to rest, far less people got sick around them (before it was 100% I believe of spreading, but now it's only 20%) and the endemic cleared itself up

Code: [Select]
interaction_disease_probabilities
[OBJECT:INTERACTION]

   
[INTERACTION:DEPRESSION_PROBABILITY]
   
   [I_TARGET:A:CREATURE][IT_LOCATION:CONTEXT_CREATURE]
   [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED][IT_CANNOT_HAVE_SYNDROME_CLASS:DEPRESSION_A]
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [SYN_CLASS:DEPRESSION_A][CE_BODY_APPEARANCE_MODIFIER:APPEARANCE_MODIFIER:BROADNESS:99:START:0][SYN_NAME:depression check made]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:2:START:0:END:3000]
   
   [CDI:INTERACTION:DEPRESSION_PROB_INNER]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]
   
[INTERACTION:DEPRESSION_PROB_INNER]
   
   [I_TARGET:A:CREATURE][IT_LOCATION:CONTEXT_CREATURE]
   [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED][IT_CANNOT_HAVE_SYNDROME_CLASS:DEPRESSION_B]
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [SYN_CLASS:DEPRESSION_B][CE_BODY_APPEARANCE_MODIFIER:APPEARANCE_MODIFIER:BROADNESS:99:START:0][SYN_NAME:depression secondary check made]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:100:START:0:END:3000]
   [CDI:INTERACTION:SPREAD_DEPRESSION]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]
   
   
[INTERACTION:BLACK_PLAGUE_PROBABILITY]
   
   [I_TARGET:A:CREATURE][IT_LOCATION:CONTEXT_CREATURE]
   [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED][IT_CANNOT_HAVE_SYNDROME_CLASS:BLACK_PLAGUE_A]
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [SYN_CLASS:BLACK_PLAGUE_A][CE_BODY_APPEARANCE_MODIFIER:APPEARANCE_MODIFIER:BROADNESS:99:START:0][SYN_NAME:black plague check made]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:1:RESISTABLE:START:0:END:3000]
   
   [CDI:INTERACTION:BLACK_PLAGUE_PROB_INNER]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]
   
[INTERACTION:BLACK_PLAGUE_PROB_INNER]
   
   [I_TARGET:A:CREATURE][IT_LOCATION:CONTEXT_CREATURE]
   [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED][IT_CANNOT_HAVE_SYNDROME_CLASS:BLACK_PLAGUE_B]
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [SYN_CLASS:BLACK_PLAGUE_B][CE_BODY_APPEARANCE_MODIFIER:APPEARANCE_MODIFIER:BROADNESS:99:START:0][SYN_NAME:black plague secondary check made]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:3:RESISTABLE:START:0:END:3000]
   [CDI:INTERACTION:SPREAD_BLACK_PLAGUE]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]
   
   
[INTERACTION:BUBONIC_PLAGUE_PROBABILITY]
   
   [I_TARGET:A:CREATURE][IT_LOCATION:CONTEXT_CREATURE]
   [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED][IT_CANNOT_HAVE_SYNDROME_CLASS:BUBONIC_PLAGUE_A]
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [SYN_CLASS:BUBONIC_PLAGUE_A][CE_BODY_APPEARANCE_MODIFIER:APPEARANCE_MODIFIER:BROADNESS:99:START:0][SYN_NAME:bubonic plague check made]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:1:RESISTABLE:START:0:END:3000]
   
   [CDI:INTERACTION:BUBONIC_PLAGUE_PROB_INNER]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]
   
[INTERACTION:BUBONIC_PLAGUE_PROB_INNER]
   
   [I_TARGET:A:CREATURE][IT_LOCATION:CONTEXT_CREATURE]
   [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED][IT_CANNOT_HAVE_SYNDROME_CLASS:BUBONIC_PLAGUE_B]
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [SYN_CLASS:BUBONIC_PLAGUE_B][CE_BODY_APPEARANCE_MODIFIER:APPEARANCE_MODIFIER:BROADNESS:99:START:0][SYN_NAME:bubonic plague secondary check made]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:3:RESISTABLE:START:0:END:3000]
   [CDI:INTERACTION:SPREAD_BUBONIC_PLAGUE]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]
   
   
[INTERACTION:SMALLPOX_PROBABILITY]
   
   [I_TARGET:A:CREATURE][IT_LOCATION:CONTEXT_CREATURE]
   [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED][IT_CANNOT_HAVE_SYNDROME_CLASS:SMALLPOX_A]
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [SYN_CLASS:SMALLPOX_A][CE_BODY_APPEARANCE_MODIFIER:APPEARANCE_MODIFIER:BROADNESS:99:START:0][SYN_NAME:smallpox check made]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:1:RESISTABLE:START:0:END:3000]
   
   [CDI:INTERACTION:SMALLPOX_PROB_INNER]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]
   
[INTERACTION:SMALLPOX_PROB_INNER]
   
   [I_TARGET:A:CREATURE][IT_LOCATION:CONTEXT_CREATURE]
   [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED][IT_CANNOT_HAVE_SYNDROME_CLASS:SMALLPOX_B]
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [SYN_CLASS:SMALLPOX_B][CE_BODY_APPEARANCE_MODIFIER:APPEARANCE_MODIFIER:BROADNESS:99:START:0][SYN_NAME:smallpox secondary check made]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:3:RESISTABLE:START:0:END:3000]
   [CDI:INTERACTION:SPREAD_SMALLPOX]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]
   
   
[INTERACTION:INFLUENZA_PROBABILITY]
   
   [I_TARGET:A:CREATURE][IT_LOCATION:CONTEXT_CREATURE]
   [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED][IT_CANNOT_HAVE_SYNDROME_CLASS:INFLUENZA_A]
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [SYN_CLASS:INFLUENZA_A][CE_BODY_APPEARANCE_MODIFIER:APPEARANCE_MODIFIER:BROADNESS:99:START:0][SYN_NAME:influenza check made]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:2:RESISTABLE:START:0:END:3000]
   
   [CDI:INTERACTION:INFLUENZA_PROB_INNER]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]
   
[INTERACTION:INFLUENZA_PROB_INNER]
   
   [I_TARGET:A:CREATURE][IT_LOCATION:CONTEXT_CREATURE]
   [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED][IT_CANNOT_HAVE_SYNDROME_CLASS:INFLUENZA_B]
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [SYN_CLASS:INFLUENZA_B][CE_BODY_APPEARANCE_MODIFIER:APPEARANCE_MODIFIER:BROADNESS:99:START:0][SYN_NAME:influenza secondary check made]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:20:RESISTABLE:START:0:END:3000]
   [CDI:INTERACTION:SPREAD_INFLUENZA]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]
   
   
[INTERACTION:MENINGITIS_PROBABILITY]
   
   [I_TARGET:A:CREATURE][IT_LOCATION:CONTEXT_CREATURE]
   [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED][IT_CANNOT_HAVE_SYNDROME_CLASS:MENINGITIS_A]
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [SYN_CLASS:MENINGITIS_A][CE_BODY_APPEARANCE_MODIFIER:APPEARANCE_MODIFIER:BROADNESS:99:START:0][SYN_NAME:meningitis check made]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:1:RESISTABLE:START:0:END:3000]
   
   [CDI:INTERACTION:MENINGITIS_PROB_INNER]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]
   
[INTERACTION:MENINGITIS_PROB_INNER]
   
   [I_TARGET:A:CREATURE][IT_LOCATION:CONTEXT_CREATURE]
   [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED][IT_CANNOT_HAVE_SYNDROME_CLASS:MENINGITIS_B]
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [SYN_CLASS:MENINGITIS_B][CE_BODY_APPEARANCE_MODIFIER:APPEARANCE_MODIFIER:BROADNESS:99:START:0][SYN_NAME:meningitis secondary check made]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:15:RESISTABLE:START:0:END:3000]
   [CDI:INTERACTION:SPREAD_MENINGITIS]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]
   
   
[INTERACTION:PNEUMONITIS_PROBABILITY]
   
   [I_TARGET:A:CREATURE][IT_LOCATION:CONTEXT_CREATURE]
   [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED][IT_CANNOT_HAVE_SYNDROME_CLASS:PNEUMONITIS_A]
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [SYN_CLASS:PNEUMONITIS_A][CE_BODY_APPEARANCE_MODIFIER:APPEARANCE_MODIFIER:BROADNESS:99:START:0][SYN_NAME:pneumonitis check made]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:1:RESISTABLE:START:0:END:3000]
   
   [CDI:INTERACTION:PNEUMONITIS_PROB_INNER]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]
   
[INTERACTION:PNEUMONITIS_PROB_INNER]
   
   [I_TARGET:A:CREATURE][IT_LOCATION:CONTEXT_CREATURE]
   [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED][IT_CANNOT_HAVE_SYNDROME_CLASS:PNEUMONITIS_B]
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [SYN_CLASS:PNEUMONITIS_B][CE_BODY_APPEARANCE_MODIFIER:APPEARANCE_MODIFIER:BROADNESS:99:START:0][SYN_NAME:pneumonitis secondary check made]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:20:RESISTABLE:START:0:END:3000]
   [CDI:INTERACTION:SPREAD_PNEUMONITIS]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]
   
   
[INTERACTION:BLOOD_PRESSURE_PROBABILITY]
   
   [I_TARGET:A:CREATURE][IT_LOCATION:CONTEXT_CREATURE]
   [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED][IT_CANNOT_HAVE_SYNDROME_CLASS:BLOOD_PRESSURE_A]
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [SYN_CLASS:BLOOD_PRESSURE_A][CE_BODY_APPEARANCE_MODIFIER:APPEARANCE_MODIFIER:BROADNESS:99:START:0][SYN_NAME:blood pressure check made]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:15:START:0:END:3000]
   
   [CDI:INTERACTION:BLOOD_PRESSURE_PROB_INNER]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]
   
[INTERACTION:BLOOD_PRESSURE_PROB_INNER]
   
   [I_TARGET:A:CREATURE][IT_LOCATION:CONTEXT_CREATURE]
   [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED][IT_CANNOT_HAVE_SYNDROME_CLASS:BLOOD_PRESSURE_B]
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [SYN_CLASS:BLOOD_PRESSURE_B][CE_BODY_APPEARANCE_MODIFIER:APPEARANCE_MODIFIER:BROADNESS:99:START:0][SYN_NAME:blood pressure secondary check made]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:50:START:0:END:3000]
   [CDI:INTERACTION:SPREAD_BLOOD_PRESSURE]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]
   
   
[INTERACTION:SCHIZOPHRENIA_PROBABILITY]
   
   [I_TARGET:A:CREATURE][IT_LOCATION:CONTEXT_CREATURE]
   [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED][IT_CANNOT_HAVE_SYNDROME_CLASS:SCHIZOPHRENIA_A]
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [SYN_CLASS:SCHIZOPHRENIA_A][CE_BODY_APPEARANCE_MODIFIER:APPEARANCE_MODIFIER:BROADNESS:99:START:0][SYN_NAME:schizophrenia check made]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:1:START:0:END:3000]
   
   [CDI:INTERACTION:SCHIZOPHRENIA_PROB_INNER]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]
   
[INTERACTION:SCHIZOPHRENIA_PROB_INNER]
   
   [I_TARGET:A:CREATURE][IT_LOCATION:CONTEXT_CREATURE]
   [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED][IT_CANNOT_HAVE_SYNDROME_CLASS:SCHIZOPHRENIA_B]
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [SYN_CLASS:SCHIZOPHRENIA_B][CE_BODY_APPEARANCE_MODIFIER:APPEARANCE_MODIFIER:BROADNESS:99:START:0][SYN_NAME:schizophrenia secondary check made]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:100:START:0:END:3000]
   [CDI:INTERACTION:SPREAD_SCHIZOPHRENIA]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]
   
   
[INTERACTION:LIVER_CANCER_PROBABILITY]
   
   [I_TARGET:A:CREATURE][IT_LOCATION:CONTEXT_CREATURE]
   [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED][IT_CANNOT_HAVE_SYNDROME_CLASS:LIVER_CANCER_A]
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [SYN_CLASS:LIVER_CANCER_A][CE_BODY_APPEARANCE_MODIFIER:APPEARANCE_MODIFIER:BROADNESS:99:START:0][SYN_NAME:liver cancer check made]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:1:RESISTABLE:START:0:END:3000]
   
   [CDI:INTERACTION:LIVER_CANCER_PROB_INNER]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]
   
[INTERACTION:LIVER_CANCER_PROB_INNER]
   
   [I_TARGET:A:CREATURE][IT_LOCATION:CONTEXT_CREATURE]
   [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED][IT_CANNOT_HAVE_SYNDROME_CLASS:LIVER_CANCER_B]
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [SYN_CLASS:LIVER_CANCER_B][CE_BODY_APPEARANCE_MODIFIER:APPEARANCE_MODIFIER:BROADNESS:99:START:0][SYN_NAME:liver cancer secondary check made]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:10:RESISTABLE:START:0:END:3000]
   [CDI:INTERACTION:SPREAD_LIVER_CANCER]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]
   
   
[INTERACTION:GIGANTISM_PROBABILITY]
   
   [I_TARGET:A:CREATURE][IT_LOCATION:CONTEXT_CREATURE]
   [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED][IT_CANNOT_HAVE_SYNDROME_CLASS:GIGANTISM_A]
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [SYN_CLASS:GIGANTISM_A][CE_BODY_APPEARANCE_MODIFIER:APPEARANCE_MODIFIER:BROADNESS:99:START:0][SYN_NAME:gigantism check made]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:1:START:0:END:3000]
   
   [CDI:INTERACTION:GIGANTISM_PROB_INNER]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]
   
[INTERACTION:GIGANTISM_PROB_INNER]
   
   [I_TARGET:A:CREATURE][IT_LOCATION:CONTEXT_CREATURE]
   [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED][IT_CANNOT_HAVE_SYNDROME_CLASS:GIGANTISM_B]
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [SYN_CLASS:GIGANTISM_B][CE_BODY_APPEARANCE_MODIFIER:APPEARANCE_MODIFIER:BROADNESS:99:START:0][SYN_NAME:gigantism secondary check made]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:10:START:0:END:3000]
   [CDI:INTERACTION:SPREAD_GIGANTISM]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]
   
   
[INTERACTION:DWARFISM_PROBABILITY]
   
   [I_TARGET:A:CREATURE][IT_LOCATION:CONTEXT_CREATURE]
   [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED][IT_CANNOT_HAVE_SYNDROME_CLASS:DWARFISM_A]
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [SYN_CLASS:DWARFISM_A][CE_BODY_APPEARANCE_MODIFIER:APPEARANCE_MODIFIER:BROADNESS:99:START:0][SYN_NAME:dwarfism check made]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:1:START:0:END:3000]
   
   [CDI:INTERACTION:DWARFISM_PROB_INNER]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]
   
[INTERACTION:DWARFISM_PROB_INNER]
   
   [I_TARGET:A:CREATURE][IT_LOCATION:CONTEXT_CREATURE]
   [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED][IT_CANNOT_HAVE_SYNDROME_CLASS:DWARFISM_B]
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [SYN_CLASS:DWARFISM_B][CE_BODY_APPEARANCE_MODIFIER:APPEARANCE_MODIFIER:BROADNESS:99:START:0][SYN_NAME:dwarfism secondary check made]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:10:START:0:END:3000]
   [CDI:INTERACTION:SPREAD_DWARFISM]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]
   
   
[INTERACTION:BLINDNESS_PROBABILITY]
   
   [I_TARGET:A:CREATURE][IT_LOCATION:CONTEXT_CREATURE]
   [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED][IT_CANNOT_HAVE_SYNDROME_CLASS:BLINDNESS_A]
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [SYN_CLASS:BLINDNESS_A][CE_BODY_APPEARANCE_MODIFIER:APPEARANCE_MODIFIER:BROADNESS:99:START:0][SYN_NAME:blindness check made]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:1:RESISTABLE:START:0:END:3000]
   
   [CDI:INTERACTION:BLINDNESS_PROB_INNER]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]
   
[INTERACTION:BLINDNESS_PROB_INNER]
   
   [I_TARGET:A:CREATURE][IT_LOCATION:CONTEXT_CREATURE]
   [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED][IT_CANNOT_HAVE_SYNDROME_CLASS:BLINDNESS_B]
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [SYN_CLASS:BLINDNESS_B][CE_BODY_APPEARANCE_MODIFIER:APPEARANCE_MODIFIER:BROADNESS:99:START:0][SYN_NAME:blindness secondary check made]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:20:RESISTABLE:START:0:END:3000]
   [CDI:INTERACTION:SPREAD_BLINDNESS]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]
   
   
[INTERACTION:INSOMNIA_PROBABILITY]
   
   [I_TARGET:A:CREATURE][IT_LOCATION:CONTEXT_CREATURE]
   [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED][IT_CANNOT_HAVE_SYNDROME_CLASS:INSOMNIA_A]
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [SYN_CLASS:INSOMNIA_A][CE_BODY_APPEARANCE_MODIFIER:APPEARANCE_MODIFIER:BROADNESS:99:START:0][SYN_NAME:insomnia check made]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:1:START:0:END:3000]
   
   [CDI:INTERACTION:INSOMNIA_PROB_INNER]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]
   
[INTERACTION:INSOMNIA_PROB_INNER]
   
   [I_TARGET:A:CREATURE][IT_LOCATION:CONTEXT_CREATURE]
   [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED][IT_CANNOT_HAVE_SYNDROME_CLASS:INSOMNIA_B]
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [SYN_CLASS:INSOMNIA_B][CE_BODY_APPEARANCE_MODIFIER:APPEARANCE_MODIFIER:BROADNESS:99:START:0][SYN_NAME:insomnia secondary check made]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:100:START:0:END:3000]
   [CDI:INTERACTION:SPREAD_INSOMNIA]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]
   
   
[INTERACTION:PSYCHOPATHY_PROBABILITY]
   
   [I_TARGET:A:CREATURE][IT_LOCATION:CONTEXT_CREATURE]
   [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED][IT_CANNOT_HAVE_SYNDROME_CLASS:PSYCHOPATHY_A]
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [SYN_CLASS:PSYCHOPATHY_A][CE_BODY_APPEARANCE_MODIFIER:APPEARANCE_MODIFIER:BROADNESS:99:START:0][SYN_NAME:psychopathy check made]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:1:START:0:END:3000]
   
   [CDI:INTERACTION:PSYCHOPATHY_PROB_INNER]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]
   
[INTERACTION:PSYCHOPATHY_PROB_INNER]
   
   [I_TARGET:A:CREATURE][IT_LOCATION:CONTEXT_CREATURE]
   [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED][IT_CANNOT_HAVE_SYNDROME_CLASS:PSYCHOPATHY_B]
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [SYN_CLASS:PSYCHOPATHY_B][CE_BODY_APPEARANCE_MODIFIER:APPEARANCE_MODIFIER:BROADNESS:99:START:0][SYN_NAME:psychopathy secondary check made]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:10:START:0:END:3000]
   [CDI:INTERACTION:SPREAD_PSYCHOPATHY]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]
   
   
[INTERACTION:RABIES_PROBABILITY]
   
   [I_TARGET:A:CREATURE][IT_LOCATION:CONTEXT_CREATURE]
   [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED][IT_CANNOT_HAVE_SYNDROME_CLASS:RABIES_A]
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [SYN_CLASS:RABIES_A][CE_BODY_APPEARANCE_MODIFIER:APPEARANCE_MODIFIER:BROADNESS:99:START:0][SYN_NAME:rabies check made]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:1:RESISTABLE:START:0:END:3000]
   
   [CDI:INTERACTION:RABIES_PROB_INNER]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]
   
[INTERACTION:RABIES_PROB_INNER]
   
   [I_TARGET:A:CREATURE][IT_LOCATION:CONTEXT_CREATURE]
   [IT_CANNOT_TARGET_IF_ALREADY_AFFECTED][IT_CANNOT_HAVE_SYNDROME_CLASS:RABIES_B]
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [SYN_CLASS:RABIES_B][CE_BODY_APPEARANCE_MODIFIER:APPEARANCE_MODIFIER:BROADNESS:99:START:0][SYN_NAME:rabies secondary check made]
   
   [I_EFFECT:ADD_SYNDROME][IE_TARGET:A][IE_IMMEDIATE][SYNDROME][SYN_AFFECTED_CLASS:GENERAL_POISON]
   [CE_CAN_DO_INTERACTION:PROB:20:RESISTABLE:START:0:END:3000]
   [CDI:INTERACTION:SPREAD_RABIES]
   [CDI:TARGET:A:SELF_ONLY][CDI:FREE_ACTION][CDI:MAX_TARGET_NUMBER:A:1][CDI:WAIT_PERIOD:300001]

update:
apparently a reason my dwarfs were getting so sick quickly before was due to me having barrack style beds of 2x3's next to each other... that was just stupid of me.

update #2:
I think the #'s are really really nerfed.  I get a dwarf sick every now and then, but it NEVER cycles through the fort.  I think the #'s of the contagious diseases could be x .4 vs x .2 (that's the change I made, plus resistable).

I still hate the micromanaging of ensuring sick dwarves don't "stroke out".  There is no "easy" way of doing this.  Even with burrows, it's hard.  It would be better to have a building that is a pharmacy and the sick dwarf can get his "medicine".  Then maybe the player can turn on "medicine time" burrow, and the dwarf's that are workshopped to that pharmacy can get their med's...  That's the only way I can think of doing it.  The rest of the diseases kind of cure themselves (except meningitis I believe)

I think it would be better if a dwarf could somehow get his med's every so often when it's needed.  Like another syndrome that injects medicine if it's currently available (would require scripting magic to check stockpile quantities, of course... the stockpile would have to be reduced)
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Meph on November 28, 2013, 04:33:41 pm
I can compare the versions once I'm back in Germany. (something I say way, way too often... I'm in Bucharest atm, in a student house, so not the best place to work in peace.)
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: thistleknot on November 28, 2013, 05:38:55 pm
while the nerfed version is working okay, i'd like to build on the comprehensive version

I think I need to beget my immune inside disease_influenza (for influenza vs pneumonia) because it's called by spread, which is called by inner.  I'm glad I haven't bothered implementing it yet.  Because I would have done so at the wrong point in the chain

Code: [Select]
[INTERACTION:DISEASE_INFLUENZA]
  [I_TARGET:A:CREATURE]
  [IT_LOCATION:CONTEXT_CREATURE]
  [IT_REQUIRES:CAN_LEARN]
  [IT_CANNOT_HAVE_SYNDROME_CLASS:MEDICINE_EPIDEMIC]
  [I_EFFECT:ADD_SYNDROME]
  [IE_TARGET:A]
  [IE_IMMEDIATE]

  [SYNDROME]
[SYN_CLASS:INFLUENZA]
[SYN_AFFECTED_CLASS:GENERAL_POISON]
[CE_NAUSEA:SEV:50:PROB:33:START:1200:PEAK:16800:END:33600]
[CE_PAIN:SEV:100:PROB:20:LOCALIZED:VASCULAR_ONLY:START:1200:PEAK:16800:END:33600]
[CE_FEVER:SEV:100:PROB:20:START:1200:PEAK:16800:END:33600]
    [CE_CAN_DO_INTERACTION:START:0:END:100][CDI:INTERACTION:ANNOUNCE_SYMPTOMS][CDI:VERB:nt:is sick with influenza] ##no actual cough for now, unfortunately
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: VotanPhasors on November 28, 2013, 11:45:56 pm
Help, I want to make a zombie transformation plague that has a chance to be cured by using a specific item, (maybe traded for, found or crafted), how would this look like?

im not afraid of having to learn DFhack I just really want one.

Please.

thank you. It can be gotten from drinking like stagnant water or something, or bit by undead creatures.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Putnam on November 28, 2013, 11:46:42 pm
Stagnant water no, undead creatures yes, cured not really.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: thistleknot on November 29, 2013, 03:16:19 am
here's my 3rd try.

I did some other things to nerf diseases in other ways (not shown here), such as making medicine needed only 3 times per year vs 5.2 times per year, I also extended the length a dwarf is immune to the flu, pneumonia, and meningitis from taking medicine by up to a year, only the non contagious diseases are needed 3 times a year (IMO, this type of medicine should be separate, i.e. vaccine vs prescription for treating an ailment).

Now with a dwarf being immune to catching the flu for up to one year, I don't think I need to reduce the chances of a dwarf from starting with it.  As a wave of flu, pneumonia, meningitis will sweep through a fortress, but will die out once everyone gets it until the following year.

Code: [Select]
[INTERACTION:SPREAD_INFLUENZA]

  [I_TARGET:A:CREATURE]
  [IT_LOCATION:CONTEXT_CREATURE]
  [IT_REQUIRES:CAN_LEARN]
  [IT_CANNOT_HAVE_SYNDROME_CLASS:INFLUENZA] ## prevents a creature from getting this multiple times - this MUST NOT be added to DISEASE_INFLUENZA or a creature will not fall sick at all
  [IT_CANNOT_HAVE_SYNDROME_CLASS:MEDICINE_EPIDEMIC]

  [I_EFFECT:ADD_SYNDROME]
[IE_TARGET:A]
[IE_IMMEDIATE]
[IE_ARENA_NAME:Epidemic 1]
[SYNDROME]
[SYN_NAME:bears influenza]
[SYN_CLASS:INFLUENZA]
[SYN_AFFECTED_CLASS:GENERAL_POISON]
[CE_CAN_DO_INTERACTION:START:1200:END:33600] ## note!! the END: in both these tags makes it a possibly recurring epidemic
  [CDI:INTERACTION:SPREAD_INFLUENZA]
  [CDI:TARGET:A:TOUCHABLE]
  [CDI:FREE_ACTION]
  [CDI:MAX_TARGET_NUMBER:A:1]
  [CDI:WAIT_PERIOD:1200]
  [CDI:ADV_NAME:Spread influenza]
  [CDI:TARGET_VERB:feel sick to your stomach:looks pale and sickly]
[CE_CAN_DO_INTERACTION:START:0:END:33600] ## note! the END: here makes the symptoms end
  [CDI:INTERACTION:DISEASE_INFLUENZA]
  [CDI:TARGET:A:SELF_ONLY]
  [CDI:FREE_ACTION]
  [CDI:MAX_TARGET_NUMBER:A:1]
  [CDI:WAIT_PERIOD:33600]
  [CDI:ADV_NAME:Suffer from influenza]
  [CDI:TARGET_VERB:feel sick to your stomach:looks pale and sickly]

[CE_CAN_DO_INTERACTION:START:33600:END:403200] ## note! the END: here makes the symptoms end ## immune to the sickness for 1 year.
  [CDI:INTERACTION:IMMUNE_INFLUENZA]
  [CDI:TARGET:A:SELF_ONLY]
  [CDI:FREE_ACTION]
  [CDI:MAX_TARGET_NUMBER:A:1]
  [CDI:WAIT_PERIOD:403200]
  [CDI:ADV_NAME:Recovered from influenza]
  [CDI:TARGET_VERB:recovered from the flue:lost some weight from the flu]


[INTERACTION:DISEASE_INFLUENZA]
  [I_TARGET:A:CREATURE]
  [IT_LOCATION:CONTEXT_CREATURE]
  [IT_REQUIRES:CAN_LEARN]
  [IT_CANNOT_HAVE_SYNDROME_CLASS:MEDICINE_EPIDEMIC]
  [I_EFFECT:ADD_SYNDROME]
  [IE_TARGET:A]
  [IE_IMMEDIATE]

  [SYNDROME]
[SYN_CLASS:INFLUENZA]
[SYN_AFFECTED_CLASS:GENERAL_POISON]
[CE_NAUSEA:SEV:50:PROB:33:START:1200:PEAK:16800:END:33600]
[CE_PAIN:SEV:100:PROB:20:LOCALIZED:VASCULAR_ONLY:START:1200:PEAK:16800:END:33600]
[CE_FEVER:SEV:100:PROB:20:START:1200:PEAK:16800:END:33600]
    [CE_CAN_DO_INTERACTION:START:0:END:100][CDI:INTERACTION:ANNOUNCE_SYMPTOMS][CDI:VERB:nt:is sick with influenza] ##no actual cough for now, unfortunately

[INTERACTION:IMMUNE_INFLUENZA]
  [I_TARGET:A:CREATURE]
  [IT_LOCATION:CONTEXT_CREATURE]
  [IT_REQUIRES:CAN_LEARN]
  [I_EFFECT:ADD_SYNDROME]
  [IE_TARGET:A]
  [IE_IMMEDIATE]

  [SYNDROME]
[SYN_CLASS:INFLUENZA]
[SYN_AFFECTED_CLASS:GENERAL_POISON]
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: thistleknot on November 29, 2013, 03:55:54 am
If... (I'm really asking for mwmod's, but I figured I'd ask here since it's only just been implemented)

  • I wanted to reduce the % chance of certain diseases considerably... how would I do so?

  • Is there a way to ensure a dwarf who has been cured already of a disease, doesn't get it again (i.e. via modding?).  I know I can remove the end token from the syndrome of an item such as medicine.  But... to my understanding, some diseases have a natural run length.  It would make more sense game wise if a dwarf who is already sick couldn't catch the same sickness (although, I don't think that's really an issue), but it would be better if a dwarf who was sick with pneumonia, can't get it again.

  • Although, I am ALL FOR MUTATIONS of diseases... but the chance of mutation should be like 2%... So... there's only a small chance that a dwarf who has had pneumonia once, could get it again, but it would have been from a mutated variety...

  • Also, is there any way disease resistance can be taken into account for chance of sickness?

  • What about length of sickness based on recuperation?

I've hit on all these points but the last one, as that one needs an r4 plugin, also the resistance was only useable for specific applications of diseases (such as ce_necrosis), but I applied them.

Here are the changes to mwmod 4d
https://www.mediafire.com/?w5rlab90iwv14b5
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: VotanPhasors on November 29, 2013, 03:47:49 pm
Stagnant water no, undead creatures yes, cured not really.

ok so I want the undead creatures bite and scratch to carry it, not any other kind of attack, how do I do that??

also:

I want to spawn my zombies at the start of the map but in all biomes ALONG  with other creatures, and to have a high chance of being in all biomes??
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Putnam on November 29, 2013, 04:27:23 pm
Stagnant water no, undead creatures yes, cured not really.

ok so I want the undead creatures bite and scratch to carry it, not any other kind of attack, how do I do that??

[SPECIALATTACK_INTERACTION:X]

I think that's what it is, could be something else.

I want to spawn my zombies at the start of the map but in all biomes ALONG  with other creatures, and to have a high chance of being in all biomes??

[UBIQUITOUS]
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: thistleknot on November 29, 2013, 09:22:11 pm
using showunitsyndromes.rb

I see a mekton of syndromes, some repeated checks being made... apparently this version of my mod is just applied wrong.  I don't know how, but I think there getting the syndromes multiple times

example: smallpox came up more than 10 times...

but maybe it's the character's entire history?  I don't know, it was pages of stuff.


nevermind, apparently it dumps all my dwarf's :)
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: thistleknot on November 29, 2013, 11:07:11 pm
sorry to be mucking up this thread...

but I thought I had things working with this file, but apparently I don't

errors


file

any help?


yeah, I don't get it.

i've been working on this for days.

I thought I had it.

So I did a simple test, I tried copying disease_influenza as such

with the same errors



I also tried this



with the same errors as posted up top.

Please help me...

update:
what's interesting is I can call disease_influenza twice as a ce_can_do_interaction

but if I try to copy that to disease_influenza2 and copy the interaction:disease_interaction to a _interaction2... I get the error again


looks like i learned a valuable lesson about modding saved raws.

I guess the game freaks out when you introduce new interactions as the objects are not derived in the save folder.

derp
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Putnam on November 30, 2013, 02:35:27 am
Yeah, adding things should always be done in a new world.
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: thistleknot on November 30, 2013, 05:10:21 pm
btw, as I finished all my modding questions here, I've moved my discussion to this post (and all relevant updates, which includes some neat tricks to lower chances of catching a disease from a sick dwarf)

http://www.bay12forums.com/smf/index.php?topic=133312.msg4800057#msg4800057
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Asin on June 08, 2017, 09:07:50 pm
Sorry for necroing, but could someone make this compatible with 43.05?
Title: Re: Customizable disease mod for contagious, non-communicable and epidemics. Reuse!
Post by: Hugo_The_Dwarf on June 09, 2017, 08:50:17 pm
Most cases if you downloaded it, it's probably interactions. And some maybe custom castes to contain it. It should already be compatible