nwn2fixes / player

Fixes for the casual NwN2 player
27 stars 11 forks source link

SOZ : Mind flayer mind blast ignores immunities #13

Closed Question2 closed 5 years ago

Question2 commented 5 years ago

Ive been testing various effects to see if anything will block the stun effect from the mind flayer mind blast.

I read that the mind blast is considered a spell like ability, but protection from evil and lesser mind blank do not protect against it, despite clearly stating that they protect against mind affecting abilities.

I cant seem to find any spell that will protect you against the effect (at least, not the ones available for the CR of the encounter).

kevL commented 5 years ago

I'd like to look into it if/when i've got time ...

Question2 commented 5 years ago

Is there anyone else who can do it atm?

kevL commented 5 years ago

anyone who can open the toolset

Question2 commented 5 years ago

I found the problem in spells.2da....row 713, mindflayer_mindblast_10, has no immunities so will affect ANYTHING....row 714 has the same problem.

Row 716 is also missing mind immunity.

In total : rows 713, 714, 716, 789, 551, 693.

Edit : That didnt fix it, it seems the mind flayers in SOZ use a script based mind blast that doesnt check for any immunities at all.

It looks like they use x2_m1_mindblast which is row 551 in spells.2da. The script only checks for mind flayer appearance and doesnt check for anything else...wow...cant believe they screwed this up so badly...

Unfortunately i dont have any idea how to fix the script or compile it.

kevL commented 5 years ago

I'd like you to test an alternate spellscript for MindBlast, against the MindFlayers in the BlackMarket specifically (because i'm pretty confident they'll use this script...)

https://drive.google.com/file/d/1RFRtUPosyZAaXrNx3yb5zYTp6JSqb2M0/view?usp=sharing

- unzip to \Override and check there's no other files named 'x2_m1_mindblast' in \Override


Notes: The stock spellscript for SpellID #551 MONSTER_MindBlast 'x2_m1_mindblast' does not pass the caster into its SavingThrow check, so in theory it doesn't check the alignment of the caster against Protection from Alignment/Evil.

This alternate spellscript does pass the caster into the SavingThrow check.

-- btw, the "ImmunityType" column in Spells.2da in Nwn2 has no hardcoded ramifications. It doesn't do anything (unless a custom script queries its value, so yes the entries should be kept consistent). Immunities, in Nwn2, are generally handled by the engine (ie, not in script).

Question2 commented 5 years ago

Thanks, will do. Does it also check for mind immunity from mind blank or from the undead race, etc?

Question2 commented 5 years ago

I just tested protection from evil, lesser mind blank and skeleton warriors from animate dead. They all still get stunned by the mindblast. Your script is the only mindblast script in my override folder.

Question2 commented 5 years ago

Heres the weird part...i just got to the zecorien fight, which uses the same mind blast. The alternate mindblast script message popups for both the underdark market and the zecorien fight...but for the zecorien fight, i had the staff of command equipped which grants mind immunity. And when zecorien hit me with the mind blast, i got a message saying that i was immune to mind affecting spells.

With lesser mind blank against the underdark market mind flayers, i never got the mind immunity message.

Maybe the staff of command just gives a special kind of mind immunity?

kevL commented 5 years ago

well, the staff is apparently granting immunity because it's an item ... I'll likely look into this more deeply when i have the time & inclination, since I want it fixed in my game too.

Question2 commented 5 years ago

Does your script differentiate between item and spell granted mind immunity? Im not sure how your script is checking for mind immunity exactly.

kevL commented 5 years ago

it was just a test script. the function WillSave() in the original script, or MySavingThrow() which is the usual function to call, which in turn simply calls WillSave(), can take a parameter 'oSaveVersus' into account. If the caster is not passed into the function, OBJECT_INVALID is used instead. The stock MindBlast script uses OBJECT_INVALID for 'oSaveVersus' so I figured it'd be worthwhile to test if passing the caster in as 'oSaveVersus' might correct the fact that ProtEvil is being bypassed (under the assumption that a valid creature-object has to be passed in to determine the caster's alignment)

it doesn't differentiate between item and spell granted immunity. A part of what we're looking at is hardcoded and that's what makes it a b*tch to sort through ...

kevL commented 5 years ago

uh... i finally got around to checking ProtEvil vs. the MindFlayers in the BlackMarket and, with an Override that contains only Nwn2Fixes (everything else stock), my two chars who had ProtEvil buffs were immune to the MindBlasts – my other chars succumbed and had their brains extracted.