GetCommonDisease bug

Post » Sun May 01, 2011 3:15 pm

Well it's not exactly a bug with GetCommonDisease, as such...

It seems that if you use RemoveSpellEffects to remove a disease, it doesn't remove the disease spell itself (which makes sense) - and since GetCommonDisease checks for the spell (not the effects) it still returns 1. But cures don't work for diseases that aren't showing effects, which makes GetCommonDisease completely useless after RemoveSpellEffects has been used for a common disease.

However - this doesn't seem to happen all the time. When I tested it, there were a couple of times when RemoveSpellEffects seemed to remove the spell completely. So I'm not sure what exactly is going on here.

Does anyone have some info on this?
User avatar
Javier Borjas
 
Posts: 3392
Joined: Tue Nov 13, 2007 6:34 pm

Post » Mon May 02, 2011 1:18 am

Not that anybody seems to care :P but:

I finally got round to testing this with a better script, and now I'm getting consistent results (the difference being that I waited before testing getCommonDisease and GetSpell this time) - RemoveSpellEffects and RemoveEffects both remove *only* the effects, not the spell. Which is a problem for diseases, since it will make the getCommon/BlightDisease return true forever afterwards (and also getSpell, which means the player has immunity to that disease forever afterwards). Only way to remove a disease not showing effects is using the removeSpell function - you can't cure it normally.
User avatar
stacy hamilton
 
Posts: 3354
Joined: Fri Aug 25, 2006 10:03 am

Post » Sun May 01, 2011 9:47 pm

Huh, that's interesting. Is there any reason for this behavior, do you think, or is it just a bug? If only a bug, perhaps the Code Patch can another few cogs... :)
User avatar
james kite
 
Posts: 3460
Joined: Sun Jul 22, 2007 8:52 am

Post » Sun May 01, 2011 12:31 pm

I don't think it's a bug, it's how the functions sound like they ought to work. But SfD is wrong about RemoveEffects so that needs updating, and people should probably be a bit careful about using it too. :shrug:
User avatar
Marcin Tomkow
 
Posts: 3399
Joined: Sun Aug 05, 2007 12:31 pm

Post » Sun May 01, 2011 1:37 pm

Aside from being immune to disease, I was wondering if that would also cause NPC greetings to be changed to the "I don't want what you have" dialogue. That would screw up a quest where dialogue in the greeting gives conditions and sets journal entries, eh?
User avatar
Shaylee Shaw
 
Posts: 3457
Joined: Wed Feb 21, 2007 8:55 pm

Post » Sun May 01, 2011 4:15 pm

No, the dialogue checks for PC diseases work on effects, so it won't come up. Shrine cures are affected though, becuase they use GetCommon/BlightDisease.

BTW, this may not be the only way to break GetCommonDisease. I haven't worked out how it happened in my game yet (the mods in my load list should not have done that, as far as I can determine).

Edit: typo.
User avatar
Milad Hajipour
 
Posts: 3482
Joined: Tue May 29, 2007 3:01 am

Post » Sun May 01, 2011 7:54 pm

@Melian: I saw this but forgot about it before I found the time to perform any tests. However your results seem perfectly reasonable - it is the outcome I would expect if a mod removes a diseases spell effects.

No it is not an engine glitch that might be addressed by the Morrowind Code Patch. It is more like the blight disease bug introduced by Bethesda's pestulent blight storms - something that is avoidable with sound scripting. It is good to raise modders' awareness of these mechanics so they do not make the same mistake as Bethesda.

I have not encountered any other ways of breaking cure disease, but then I have not played Morrowind in nearly six years.
User avatar
Kay O'Hara
 
Posts: 3366
Joined: Sun Jan 14, 2007 8:04 pm


Return to III - Morrowind