RestInPeace Posted January 4, 2009 Share Posted January 4, 2009 Special abilities such as cs, ww and shapechange are affected by spell failure effects caused by spell failure, wildsurge, silence, etc. Can this be fixed? Link to comment
aVENGER_(RR) Posted January 4, 2009 Share Posted January 4, 2009 Heh, I just got a player report on my forum that Barbarian Rage is subject to Wild Magic and Dead Magic zones. Looking at the unmodded version of SPCL152.SPL I can see that it's missing the flag which DLTCEP calls "Simplified Duration" and which actually serves as a non-magical flag in BG2. The secondary part of the Berserker Enrage ability (SPCL321D.SPL) seems to suffer from the same problem. This is fairly easy to test: simply create a Barbarian protagonist, use CLUAConsole:MoveToArea("AR3004") or CLUAConsole:MoveToArea("AR3005") and try using your Barbarian Rage there. For reference, those are Dead Magic and Wild Magic zones, respectively. And here's the fix: // Barbarian Rage and Berserker Enrage shouldn't be affected by Wild Magic and Dead Magic zones COPY_EXISTING ~spcl152.spl~ ~override~ // Barbarian Rage ~spcl321d.spl~ ~override~ // Berserker Enrage secondary effect (becoming winded) READ_BYTE 0x19 "flags" WRITE_BYTE 0x19 ("%flags%" BOR 0b01000000) // add "Simplified Duration" flag (this actually marks the ability as non-magical) BUT_ONLY_IF_IT_CHANGES Link to comment
Guest Guest Posted January 4, 2009 Share Posted January 4, 2009 Hey, is this issue anything like the one that means shapechanging can be interrupted - http://www.shsforums.net/index.php?showtopic=31472 Link to comment
aVENGER_(RR) Posted January 4, 2009 Share Posted January 4, 2009 Hey, is this issue anything like the one that means shapechanging can be interrupted - http://www.shsforums.net/index.php?showtopic=31472 No, that occurs because all shapeshifting abilities have a casting time of 1 (rather than 0). Hmm... I might rectify that in aTweaks. Link to comment
aVENGER_(RR) Posted January 5, 2009 Share Posted January 5, 2009 I've slightly expanded the code to include the Paladin's and Monk's Lay On Hands abilities and the Druids' shapeshifting abilities. In the unmodded game, these abilities were all affected by Wild Magic and Dead Magic zones. // Non-magical innate abilities shouldn't be affected by Wild Magic and Dead Magic zones COPY_EXISTING ~spcl152.spl~ ~override~ // Barbarian Rage ~spcl211.spl~ ~override~ // Paladin Lay On Hands ~spcl321d.spl~ ~override~ // Berserker Enrage secondary effect (becoming winded) ~spcl611.spl~ ~override~ // Druid Shapeshift Brown Bear ~spcl612.spl~ ~override~ // Druid Shapeshift Wolf ~spcl613.spl~ ~override~ // Druid Shapeshift Black Bear ~spcl632.spl~ ~override~ // Avenger Shapeshift Spider ~spcl633.spl~ ~override~ // Avenger Shapeshift Baby Wyvern ~spcl634.spl~ ~override~ // Avenger Shapeshift Fire Salamander ~spcl643.spl~ ~override~ // Shapeshifter Werewolf Transformation ~spcl644.spl~ ~override~ // Shapeshifter Greater Werewolf Transformation ~spcl815.spl~ ~override~ // Monk Lay On Hands ~sppr731.spl~ ~override~ // Druid Fire Elemental Transformation ~sppr732.spl~ ~override~ // Druid Earth Elemental Transformation READ_BYTE 0x19 "flags" PATCH_IF (("%flags%" BAND 0b01000000) != 0b01000000) BEGIN // only patch if the "simplified duration" flag is unchecked WRITE_BYTE 0x19 ("%flags%" BOR 0b01000000) // add the "simplified duration" flag (this actually marks the ability as non-magical) END BUT_ONLY_IF_IT_CHANGES Link to comment
Guest Guest Posted January 5, 2009 Share Posted January 5, 2009 Then I shall investigate this aTweaks! Link to comment
aVENGER_(RR) Posted January 5, 2009 Share Posted January 5, 2009 Heh, I'm afraid you'll have to wait for aTweaks v1.1 in order to get the "Make druidic shapeshifting uninterruptable" component. But, if all goes well, that should be out in about a week or so. BTW, the code I posted will also be used in aTweaks although in a slightly altered form. However, since it contains redundancy checks, when/if it's integrated into the G3 BG2 Fixpack installing aTweaks over it won't cause any problems. Link to comment
devSin Posted January 5, 2009 Share Posted January 5, 2009 Since BUT_ONLY will always be evaluated, the PATCH_IF statement does nothing (whether it happens by not writing or by writing a bit that's already on, the BUT_ONLY code will still compare the two and eject the files which already had this bit set). That would likely be the only suggested change for its incorporation into the fixpack (it'll definitely get tossed in someday, with permission). Well, it'd probably get a SOURCE_SIZE sanity check, but it's not something that would ever be necessary... Link to comment
aVENGER_(RR) Posted January 5, 2009 Share Posted January 5, 2009 Cool, I suspected that BUT_ONLY might make the PATCH_IF check redundant, but I still wanted to be on the safe side. And yes, permission to integrate the code into the G3 BG2 Fixpack is given, as always. BTW, devSin, can you confirm my suspicion that Silence preventing the activation of non-magical innates is hardcoded? Link to comment
devSin Posted January 5, 2009 Share Posted January 5, 2009 BTW, devSin, can you confirm my suspicion that Silence preventing the activation of non-magical innates is hardcoded?Details? It may take another couple weeks for me to truly get back in the swing of things; if you're saying that silence prevents the ability from firing at all, it would be hardcoded (silence already has hardcode checks to do terrible things like disable soundsets and prevent dialogue, so preventing spellcasting altogether is very likely). Link to comment
aVENGER_(RR) Posted January 5, 2009 Share Posted January 5, 2009 Silenced characters cannot activate non-magical special abilities like Set Snare, Offensive Spin, Whirlwind Attack... etc. Clicking on the ability simply does nothing... it's not expended but it doesn't activate either. Link to comment
devSin Posted January 5, 2009 Share Posted January 5, 2009 Yeah, that would be hardcode. I can't think right now of any way you'd be able to get around it. Link to comment
aVENGER_(RR) Posted January 5, 2009 Share Posted January 5, 2009 Me neither. To my knowledge, the Vocalize spell (SPWI219.SPL) is the only thing in the game that you can cast while silenced. I've tried cloning its effects to other spells in hopes of having them bypass silence as well but that didn't work. Link to comment
devSin Posted January 5, 2009 Share Posted January 5, 2009 Undoubtedly hardcoded into the executable. You can likely copy Magic Missile or another spell to SPWI219.SPL to confirm. Link to comment
aVENGER_(RR) Posted January 5, 2009 Share Posted January 5, 2009 Yup. I just overwrote SPWI219.SPL (Vocalize) with SPWI212.SPL (Mirror Image) and I was able to cast that while silenced. That confirms it, the engine seems to be configured to allow 2219 to be cast while silenced, no matter what the actual spell does. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.