Jump to content


Photo

Spell protection glitch


  • Please log in to reply
25 replies to this topic

#1 Suslik

Suslik

    Investigator

  • Member
  • 500 posts

Posted 07 November 2011 - 12:26 AM

I am sorry for creating a separate topic for this problem, it was already discussed in my thread, but i think i have finally cornered it and i want to share my experience with the community so that it may be solved someday.

Problem:
In BWP 9.2-9.10 sometimes spell turning spell and similar(minor spell turning, spell deflection, minor spell deflection and so on) start absorbing infinite amount of spells cast on them(without redirecting them back if this is turning- spell).

Easiest way to reproduce the glitch is following:
Two mage-partymembers cast "minor spell turning" on themselves. Then one mage casts "magic missle" on another one. Magic missle should bounce from one mage to another four times, then the limit of rebounded spells is reached, "spell turning" on both wizards wears off, and one of them gets harmed by magic missle.
Then if you load and try to do this again 1-2 times, one(or sometimes both) wizards start absorbing "magic missles" without rebounding them back, infinitely until "minor spell turning" duration is expired.

If you try to reproduce this bug with original BGII-SoA:
If you try and do the same thing in original SoA, sometimes "minor spell turning" can start behaving just like that: absorbing all spells(let's say, 3 fingers of death, though it should reflect only one and wear off). But after about 10 seconds(sometimes more, sometimes less) all those spells are reflected back at caster. This delay is quite random and I was unable to figure out when it happens, because spells are mostly reflected back as soon as they hit wizard.

Other cases when you can encounter this bug:
"Spell shield" is supposed to absorb one protection-penetrating spell(pierce magic, breach, spellstrike, secret word, etc), but if the glitch activates, it will absorb infinite amount of such spells, and it will be pretty impossible to dispel such protection at all.

Suggested reason:
Probably the reason is with a lot of mods, that delay before reflecting a spell back is prolonged so much, that spells will not be reflected during any reasonable period of time(protection duration expires earlier). Apparently no mod alone is guilty in such behavior, because it can be partially reproduced even in original SoA.

Question to the community:
Is it possible to find a workaround for this issue or at least to make it less frequent?

Edited by Suslik, 07 November 2011 - 12:28 AM.


#2 Galactygon

Galactygon

    Modding since 2002

  • Member
  • 938 posts

Posted 07 November 2011 - 01:18 AM

I think it's an opcode bug, hardcoded in the .exe.

My theory is that this is intentional and tied to projectile timing, as Magic Missile hitting 5 times should only absorb/reflect as one spell level, not five times one. The game does this by allowing a delay for the reflector/absorber to be hit more than once by the same spell and consider that as a single hit.

In order to fix this, something completely different has to be done, like hardcode the opcode to check for certain projectiles, and make sure that if hit more than once, the caster of those spells is the same. Only Ascension64 can fix this, but only if he makes this a priority.

-Galactygon

Edited by Galactygon, 07 November 2011 - 01:18 AM.

Posted Image

#3 Suslik

Suslik

    Investigator

  • Member
  • 500 posts

Posted 07 November 2011 - 01:30 AM

Thanks a lot for response. I should've stated it before but it works with any direct spells, not only magic missile: like domination, acid arrow and so on.

Indeed it seems to be hardcoded in the executable, but maybe there's some kind of console/script command that allows to "flush" projectiles that should be absorbed/reflected?

#4 Suslik

Suslik

    Investigator

  • Member
  • 500 posts

Posted 08 November 2011 - 08:59 PM

I have contacted Ascension64, he said he will take a look. The only thing left for me is looking forward to his reply.

#5 Suslik

Suslik

    Investigator

  • Member
  • 500 posts

Posted 14 November 2011 - 06:48 AM

bump

#6 Fennek

Fennek
  • Member
  • 355 posts

Posted 15 November 2011 - 01:56 PM

You might also write Miloch, Turambar etc., who certainly are happy for getting an infinite supply of problems and bugs... :whistling:

#7 Suslik

Suslik

    Investigator

  • Member
  • 500 posts

Posted 16 November 2011 - 02:44 PM

Fennek

You might also write Miloch, Turambar

Accomplished.
Are there any other active modders familiar with infinity engine's binary disassembling?

#8 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 20 November 2011 - 08:07 PM

You might also write Miloch, Turambar etc., who certainly are happy for getting an infinite supply of problems and bugs...

:P

You should know better :new_bottom:.

I seem to recall you (Suslik) had an older post in which I made some technical recommendations. I don't recall if I ever saw any results but you should at least link that original post so we can look at the history.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#9 Suslik

Suslik

    Investigator

  • Member
  • 500 posts

Posted 21 November 2011 - 04:04 AM

Yeah, I have been forcing this issue to be discussed for quite a while already, but I have decided to make a new topic when I have found that it may be partially reproduced in vanilla game and as a summary of all info I currently have.

Link to previous thread with that issue first mentioned: http://www.shsforums...post__p__521209

Apparently a lot of other problems are discussed in that thread, most of those are solved already but they distract from the only problem i am not able to solve on my own - this one.

You suggested --change-logging those protection spells, but it will not help since it is native BG2's problem(details in first post of this thread, section "If you try to reproduce this bug with original BGII-SoA"). It means that it cannot be helped without investigating in infinity engine's binaries.

#10 GeN1e

GeN1e

    A very GAR character

  • Modder
  • 1604 posts

Posted 21 November 2011 - 04:40 AM

Spell Shield bug has been successfully fixed, and SCS/SCS2 ship the solution with the initializztion component.

Retired from modding.


#11 Suslik

Suslik

    Investigator

  • Member
  • 500 posts

Posted 21 November 2011 - 04:44 AM

Whoa, really? Can i have a link?("google: "initializztion" baldur's gate" - nothing found) Can it be installed on my current BWP? Who did this and where was the previous discussion that led to the solution?

#12 GeN1e

GeN1e

    A very GAR character

  • Modder
  • 1604 posts

Posted 21 November 2011 - 05:02 AM

Everything's on G3, so wait till it gets up...
As for the initializztion, I meant the first component of both SCS mods. If you play BWP, you might already have it installed, btw.

Retired from modding.


#13 Suslik

Suslik

    Investigator

  • Member
  • 500 posts

Posted 21 November 2011 - 05:13 AM

I have BWP 9.10 installed. Following entries are present in my WeiDU.log:
~SETUP-SCS.TP2~ #0 #10 // Initialise (required by almost all other mod components): v17
~SCSII/SETUP-SCSII.TP2~ #0 #1000 // Initialise mod (all other components require this): v17
was it fixed in v17 revision? is it possible to update it without reinstalling the whole BWP?

#14 GeN1e

GeN1e

    A very GAR character

  • Modder
  • 1604 posts

Posted 21 November 2011 - 05:44 AM

It should be working in v17. Looking at v19's readme I see there was an update to it in v18, but v17's version should work regardless. Dunno what's wrong then.

Retired from modding.


#15 Suslik

Suslik

    Investigator

  • Member
  • 500 posts

Posted 21 November 2011 - 05:49 AM

Are you sure it's that particular issue fixed with all turning- deflecting- spells, not spell shield only? Once again - is it possible to install v19(last update?) on an existing BWP 9.10 installation?

Edited by Suslik, 21 November 2011 - 05:50 AM.


#16 GeN1e

GeN1e

    A very GAR character

  • Modder
  • 1604 posts

Posted 21 November 2011 - 06:47 AM

Only Spell Shield, sorry if I wasn't clear enough. Upgrading theoretically is possible, but it's never a good idea to do so the middle of playing.

Retired from modding.


#17 Suslik

Suslik

    Investigator

  • Member
  • 500 posts

Posted 21 November 2011 - 06:59 AM

I have a backup of my whole BWP so i'd gladly test it but unfortunately it fixes only spell shield, and no any other protections. Sigh..

Edited by Suslik, 21 November 2011 - 08:11 AM.


#18 Fennek

Fennek
  • Member
  • 355 posts

Posted 22 November 2011 - 02:06 PM

One might ask DavidW if he's willing to update SCS, but he seems to be busy... and it's not a bug with SCS... wouldn't that be something to be implemented for example into the BG2Fixpack, necessary for everyone? :blink:

#19 Suslik

Suslik

    Investigator

  • Member
  • 500 posts

Posted 23 November 2011 - 09:01 AM

Fennek
Well, implementing such fix to a fixpack sounds reasonable. Who can i adress the issue to?

#20 Fennek

Fennek
  • Member
  • 355 posts

Posted 23 November 2011 - 11:08 AM

Interesting question, considering that G3 is down... :blink: Whoever might have some feelings of responsibility for the BG2Fixpack, I guess.