Page 1 of 2

Closed: Diseases

Posted: Thu Feb 22, 2018 11:12 pm
by Hazelnut
Can anyone answer the following queries about how diseases work in Daggerfall. (not Vampirism or Lycathropy, the normal ones)

All the info I can find is here: http://en.uesp.net/wiki/Daggerfall:Diseases

1) How long is the incubation period?
2) Do stats reduce during incubation?
3) How often / fast do stats reduce from disease?
4) Do you really die if any stat reaches 0?
5) How does medical skill affect incubation?
6) WHat are chances of contracting diseases from foes?

Re: Open: Diseases

Posted: Thu Feb 22, 2018 11:55 pm
by Interkarma
It's an interesting conversation, thanks for opening.

On a related subject, I'm planning for back-end of diseases to operate via the effect system. You'll see more of how this works as it unfolds. Some of the early work is already in the entity classes to handle permanent and live stat mods.

Basically any effects on entities (spells, diseases, potions, advantages, disadvantages, etc.) are added to an effect stack on the entity. This stack handles the +/- changes as effect is applied/removed and allows effects to communicate amongst themselves (e.g. resistance to poison will help reduce power of incoming poison effects) and with other systems where needed.

I should be ready for diseases somewhere before the end of the effect system implementation.

Re: Open: Diseases

Posted: Fri Feb 23, 2018 12:06 am
by Hazelnut
Good to know, will put effects on the backburner then.

Re: Open: Diseases

Posted: Thu Mar 01, 2018 10:22 am
by R.D.
6) WHat are chances of contracting diseases from foes?
I can add a skeleton function for this, which can be filled out when the diseases are ready.

I can probably help with the other ones, too. I just need the time and motivation.

Re: Open: Diseases

Posted: Thu Mar 01, 2018 10:32 am
by Hazelnut
I have already added a function for the chance. (in a branch, not submitted yet) I've assumed that animals and undead are same chance, so that's more the question - are there different chances depending on foe.

No worries mate, whenever you get time and motivation will be fine.

Re: Open: Diseases

Posted: Thu Mar 01, 2018 11:40 am
by R.D.
Yes, the disease chance varies by foe. I can probably stick the function in this weekend, including calling it from the proper spot of the damage function, and it should be simple to start filling in the blanks from there.

Re: Open: Diseases

Posted: Thu Mar 01, 2018 11:44 am
by Hazelnut
Okay, I'll get my code submitted so Interkarma can merge into master and you can start with the base I've already done. No problem if you don't get time this weekend though. We will see if I found the right spot or you need to move it. ;)

I got completely sidetracked by guilds and I have lots to do on that in the meantime. :)

Re: Open: Diseases

Posted: Thu Mar 01, 2018 12:42 pm
by R.D.
OK, well there's a specific spot I would like to call the "disease on monster hit" check from, in the damage function, to get it working like classic. It's the same function used for other effects like spider's paralysis, and I figured I would just put comments in for things like that which aren't ready yet but could be dropped in later. Would it be OK with you if I need to rearrange or maybe remove some of the stuff you've done if it's coming at the problem from a different direction?

Re: Open: Diseases

Posted: Thu Mar 01, 2018 1:19 pm
by Hazelnut
If you need to change something in EnemyAttack I am fine with that. Disease only has a chance if you take damage so I stuck the check into ApplyDanageToPlayer() but feel free to mave this as you think is right.

If you think that the basic disease enum/class needs changing fundamentally I'd like to discuss it first if you don't mind. So change the incubation time calc in there by all means. I completely guessed that one!

Thanks.

Re: Open: Diseases

Posted: Thu Mar 01, 2018 5:39 pm
by R.D.
If you think that the basic disease enum/class needs changing fundamentally I'd like to discuss it first if you don't mind.
That's fine, I'll try to work with what's there and not make unnecessary changes. Whenever I send in the PR I'll ask Interkarma to wait until you've had a chance to take a look and comment before merging.