Author Topic: EffectSpellFailure not removed on rest when applied by itself.  (Read 371 times)

Legacy_leo_x

  • Sr. Member
  • ****
  • Posts: 403
  • Karma: +0/-0
EffectSpellFailure not removed on rest when applied by itself.
« on: November 08, 2012, 08:03:59 pm »


               This might be known already, but I searched and found nothing.  When I was working on my nwnx_effects plugin I noticed a few effects aren't removed by resting, even when not supernatural.  

Of the handful of them most aren't important or are obsolete but EffectSpellFailure and EffectTurnResistanceDecrease might cause people some bugs. 
               
               

               


                     Modifié par pope_leo, 09 novembre 2012 - 06:17 .
                     
                  


            

Legacy_Aelis Eine

  • Full Member
  • ***
  • Posts: 212
  • Karma: +0/-0
EffectSpellFailure not removed on rest when applied by itself.
« Reply #1 on: November 09, 2012, 05:31:15 am »


               EffectSpellFailure should be removed on rest. There's a few Tenser's Transformation mods out there that use it - even wrote one myself, and they remove just fine, or is there a hard override to remove all self-cast effects on rest?
               
               

               
            

Legacy_leo_x

  • Sr. Member
  • ****
  • Posts: 403
  • Karma: +0/-0
EffectSpellFailure not removed on rest when applied by itself.
« Reply #2 on: November 09, 2012, 06:12:57 am »


               They will be removed on rest when linked with other effects because they will share an effect id with one that most likely will be.  The game engine will remove all effects with the same id once a single one is encountered.  Will update the title.  

This is the test code I used, I couldn't remove it via resting in an vanilla server on windows:

void main(){   
    effect eff = EffectSpellFailure(100);   
    ApplyEffectToObject(DURATION_TYPE_PERMANENT, eff, GetEnteringObject());
}

Could someone else try it?  Maybe I'm missing something.
               
               

               


                     Modifié par pope_leo, 09 novembre 2012 - 06:40 .
                     
                  


            

Legacy_Failed.Bard

  • Hero Member
  • *****
  • Posts: 1409
  • Karma: +0/-0
EffectSpellFailure not removed on rest when applied by itself.
« Reply #3 on: November 09, 2012, 02:08:40 pm »


               I seem to remember having an issue in my mod with it as well, though in my case it was getting removed when it shouldn't.  If I applied a permanent spell failure to a character in an area, if a temporary one was applied to them afterwards it removed the permanent one as well when it ended.

 It might be that EffectSpellFailure is stored differently than other effects, I'd be interested in knowing how if that's the case, since I could fix up some of my scripts to work around it then.