Aller au contenu

Photo

What the *%&@() is wrong with Spell Resistance??


  • Veuillez vous connecter pour répondre
12 réponses à ce sujet

#1
Jesse_the_Thief

Jesse_the_Thief
  • Members
  • 85 messages
I've been doing some testing for a workaround to some bugs and have a mock up module I use for testing new stuff. I have a field full of badgers with 1000 HPs each and nothing else going on other than I've given them all creature hides with SR of 30 for the sake of testing SR.

Now, get this. I've been using a Warlock without any script mods to his abilities, spells, whatever. When I cast an invocation at these critters SR works normally for the first hit only. After the first attack SR never works again, even if the Warlock I'm using is level 1 attacking an SR of 30.

I've checked and rechecked the creatures to make sure they had the hides on, nothing was changing the hides, I even changed the hides to work when equipped OR when merely in inventory. I double checked the SR invocation scripts to make sure I had nothing custom in them. I've wiped all the badgers clean, rechecked their inventories, and re-scattered a new herd of badgers. I've loaded the mod half a dozen times and it's always the same: first hit SR works, after that, not a once. There seems to be no logical explanation for this.

What the heck is going on?? I can't test anything because even the trouble shooting testing needs trouble shooting! Any one have any idea?

#2
kamal_

kamal_
  • Members
  • 5 250 messages
yes, known bug. Been explained/fixed. Not sure where to look for it though. Someone will chime in.

Modifié par kamal_, 01 juillet 2011 - 12:03 .


#3
Jesse_the_Thief

Jesse_the_Thief
  • Members
  • 85 messages
What's really giving me a migraine is, when I started testing this I was using my custom Warlock SR check which doesn't even rely upon MyResistSpell. It actually makes a check for the creature's SR, compares it to the Warlock's caster level and applicable modifiers + 1d20, then handles the response from there. At first when it wasn't working I assumed my script had an error, but after using other invocations which I had not linked to my custom Warlock SR check it still does the same thing(!?!?!?) The only way it could be glitching at that point would be if the SR itself was somehow wonky. I think?

#4
Jesse_the_Thief

Jesse_the_Thief
  • Members
  • 85 messages
"n.b. Spell Resistance granted by equipped items seems to be bugged (v.1.23). This does not apply to a character's Innate or spell-granted SR, but only to equipped items; after a character makes a spell resistance check against a hostile spell, the SR granted by any item will be incorrectly removed and subsequent hostile spell attacks effectively bypass the character's Spell Resistance. (Check the SR value on your Character Sheet to verify, then unequip/re-equip the item to get your SR back.) Opponent monsters might also suffer this dismal drawback - although there are fixes available on the Neverwinter Vault. (Google Searches for further information: bug fix) "

Er. Right. Ok. Well, at least I'm right. I AM A DETECTIVE! (sigh)

#5
kamal_

kamal_
  • Members
  • 5 250 messages
iirc, Pain has fixed this. I'm sure other PW's have as well.

#6
kevL

kevL
  • Members
  • 4 061 messages
Guess i should chime in on this,

first, i guess ya need a custom Character Sheet that shows SR to verify - like Charlie's UI.

secondly the bug is apparent on Creature Hides w/ SR (that's what your badgers are experiencing .. sound like). This can be fixed on the onSpawn event, by examining the hides and
if (SR) EffectSpellResistanceIncrease()
( note this is not an increase, it sets SR value from scratch, zero ) my Pia, thanks to Reeron, accomplishes this. (yay)

Kaedrin's PrC Pack goes through efforts to fix the bug on Characters. I've experienced some wonkiness with it, viz. sometimes SR sticks even when the SR item is then unequipped. But it comes back online again (i suppose it could be used as an exploit, but this seems uncommon and, as yet, unpredictable)

Warlocks penetrate SR at only half-casterLevel, unless this has been fixed somewhere.

lastly. I read recently that what i call lingering AoE's do not calculate SR Penetration properly; my 20 Cleric liked to use Battletide and wade into melee, but i found that any critter with SR was always resisting. dratt!


interested on Pain's take on SR .......

#7
Dann-J

Dann-J
  • Members
  • 3 161 messages
The SR bug occurs on any equipped items (which includes hides). Only SR granted by feats work properly. A quick-and-nasty work-around is to give a creature the drow or yuan-ti SR feat, the extact SR value then depending on the creature's level (I think it's 11 + level for drow).

#8
Jesse_the_Thief

Jesse_the_Thief
  • Members
  • 85 messages
Yeah, I have them the Drow feat for a quick fix. Now I can move onto other glitches! Yay!

Actually, I did hit another one that's been bugging me for a while. I made a custom Warlock SR check that I think is quite clever if I say so myself. Yet nothing I'm doing in the script changes anything. I went back and added some debug text to see and sure enough, nothing. For some reason no matter what I do to the script that controls the Warlock's invocations it will not use my custom changed script. I've ran into this before and it drives me crazy; one of the major spell scripts back in NWN 1 that included the DoCamoflage command would never accept any edits I recall. I've compiled everything three ways from Sunday but nada.

If any one has an idea what that's about it sure would be nice to know.

#9
painofdungeoneternal

painofdungeoneternal
  • Members
  • 1 799 messages
You are compiling the wrong script, or have multiple copies and it's using the ones you are not compiling. Basically messy work environment and you should get organized. ( Note that using the libraries provided with the game, which happen to include code from bioware, stormfront, baldurs gate, obsidian and quite a few summer interns is by defintion a messy environment and veteran PW scripters of established worlds usually avoid this completely and create their own libraries. Eventually you just realize it's less trouble to create completely new code than it is to figure out the issues in the code that comes with the game. )

Only way to fix Spell Resistance ( short of redoing the game engine via NWNx ) is to recreate it, which is basically how all the issues have to be fixed. In this case its just a matter of keeping track of the item based SR, the other sources of SR ( spells and class/racial abilities ) and doing some simple die rolls.

Here is my take on that project HkResistSpell

Note that i am still calling the core function -> ResistSpell

int iProtection = ResistSpell(oCaster, oTarget);

Which creates the problem, but the values are cached on equipping of items, this is superfluous at this point and can just be commented out. Only reason i am maintaining it is as a safety in case i miss something it might be blocking, and it's completely removed in my next version i have in process.

If you scroll up thru the link you will notice i am tackling almost all the functions in the engine used in spells in a single file which should make it very clear which functions are being used. Basically it's giving the capability of modding how spells work, and i've done it in such a way that you can add simple vars in the spellhook which give the PW owner complete control over caster level, metamagic, etc. For example on the plane of elemental fire all cold spells can be impeded, and fire spells are empowered and double the radius.

Modifié par painofdungeoneternal, 01 juillet 2011 - 06:58 .


#10
kevL

kevL
  • Members
  • 4 061 messages
tks P.

( Tis inspiring )

#11
The Fred

The Fred
  • Members
  • 2 516 messages
The OnSpawn fix is easily done, but are we saying that no equipped items work properly? This seems like a pretty big bug. Is there a fix available (I already have code in my mod similar to what I'd do to fix it myself, but there are a lot of players out there who ought to be able just to download a little patch for it)? I know you said Kaedrin's contains a fix, but is there a stand-alone one?

#12
painofdungeoneternal

painofdungeoneternal
  • Members
  • 1 799 messages
This fix has been around forever, reeron initially developed it, and kaedrin perfected it. The item equip is only a partial fix, does not help warlocks, domain spells from clerics and myriad other issues. It's more of a band aid which only can be addressed properly by taking control of spellcasting itself.

It's not going to be something you see as a standalone thing really - basically my CSL library would not exist if not for the practiced spell caster bug and spell resistance issues.

#13
Dann-J

Dann-J
  • Members
  • 3 161 messages

Jesse_the_Thief wrote...
Yeah, I have them the Drow feat for a quick fix. Now I can move onto other glitches! Yay!

I read somewhere recently that dragons are supposed to have an SR of 11 + challenge rating, so the Drow feat should approximate things well enough.

I did a quick experiment with an epic-level spell caster and some level 20 and 30 dragons who had the Drow SR feat. I managed to get spells to hit about 50% of the time against a level 20 dragon, but none of them got through at all at level 30. It made me pine for the days of the earlier Forgotten Realms RPGs (like the Baldur's Gate series), where the first thing you did during a dragon fight was to cast 'reduce resistance' (and hope that it got past the dragon's SR to begin with!).

Level 30 dragons with functioning SR are almost impossible to fight in NWN2 without feats like 'Spell Penetration' or SR-reducing spells. Otherwise magic won't touch them, and their 'Improved Disarm' ability plucks your weapons from your hands almost before you can take a swing (unlike ordinary disarm, they don't just fall to the ground - they end up in the dragon's inventory).

Where's an epic-level monk when you need one? Posted Image