Jump to content

Blade Barrier bugfix for vBG2 with ToBEx ran through wine


Recommended Posts

Big disclaimer: this issue ONLY applies to vBG2 with ToBEx with Casting Fixes disabled. Toggling it off is sadly necessary to run the game on wine, since that ToBEx option causes the game to crash whenever a spell is cast otherwise (note that it does not occur under actual Windows).

Now, there is no need for this fix outside of this very specific situation which happens to me, as this bug does not occur normally, since it IS fixed by setting Casting Fixes=1 on the ToBEx ini files.

So, with that said, the issue is caused by opcode 232 (cast spell on condition) being applied infinitely when the game is paused on the same tick that it is applied in. I'm not sure if it occurs when other conditions aside from 8 - PersonalSpaceDistance('Target',4) are set, but that's exactly what's breaking here so, yeah... You'd imagine this happens very rarely but in my experience not only it is extremely easy to replicate but also will permanently kill off your party members constantly, as it happens very often on regular play due to so many SCS Clerics using the spell or any of its variants.

The way I got around fixing this is not the most convenient, it uses multiple delayed applications of opcode 146 (cast spell on creature) in order to simulate the per-round application of the effect upon nearby creatures that opcode 232 caused, and only works because of the party-friendly AoE projectile from sppr603d,spl (the secondary spell Blade Barrier uses to apply its damage). If that causes any bugs or differing behavior, well... It's probably minor compared to how bad this bug was.

Amelyssan's Blade Barrier from Ascension, Globe of Blades and Circle of Bones are all patched if found, together with their respective SCS pre-buff variants.

Hopefully this is of some use to anyone else. I coded it for my own use and for whatever fun I had wrangling with Circles of Bones, but it's a "common enough" bug under these odd conditions that I thought I'd share it.

You can find this fix on its own github repo

Edited by CrevsDaak
Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...