Jump to content

Lichs and other High Level Mages cause CTD


Recommended Posts

Hi DavidW,

Firstly, let me congratulate you on your amazing mod. It's a thing of beauty and has given me hundreds of hours of enjoyment. Secondly, I was wondering if you could help me find a solution to the CTD I am experiencing.

When facing any lich or higher level mage I get a CTD as soon as they initiate their chain contingency/trigger. Nothing in baldur.err, baldur.log. I decided to reinstall the game and start afresh with a save just before facing the city gate lich. After installing 1PP everything is fine. However after installing SCS 32.7 it crashes. I initially thought it was a hardware issue as I am running on an Intel HD 520 and that a spell contingency trigger was exceeding my VRAM capacity but before SCS install component the Lich kicks off a bunch of spells and it's fine. 

BG2 Classic (GOG - installed to C:\Games)
TobEX updated to build 0.26.3.25
SCS 32.7 

I have uninstalled 32.7, Installed 32 and the Lich managed to trigger Spell Deflection before crashing. Got the following message TobEx.log
[Tue 31 Dec 2019 12:53:48] CEffectSetStat::ApplyEffect(): Tried to set a stat with index < 387 (expected 387-449)

Installed SCS v31 and no Crash :)

TobEx.log Baldur.log

WeiDU.log

Edited by AlexRobbart
Link to comment

I can reproduce this: it's a clash between the Innate HLAs component and Smarter Mages - they work fine on EE but cause CTD on vanilla.

The workaround is not to use both Innate HLAs and Smarter Mages/Priests on v32 and a non-Enhanced install. There will be a fix in the next version.

(It's interesting that more people haven't reported this! - says something about how few people in the community still play the original game, I guess.)

Link to comment
Guest Still a problem.

Hi David, this is still a problem with stratagems-35.9.exe in BGT (ie., not EE).  I have so far met two Lichs, the one in the graveyard (Edwin's quest) and the one in the Crooked Crane, and as soon as their dialogues end to start combat, I got CTD in both cases.  After using the SCS option in CHARNAME special abilities menu, and changed the wizard AI to BASIC, the CTD didn't happen, so this definitely has to do with the Wizard AI mod.   

Link to comment

Note that this bug only occurs because of out-of-bounds opcodes being present in several spells modified by SCS or other mods (for example, Demon Fear and, as a consequence of being a direct copy of it, Liches' Fear aura). As a hotfix you can just install the attached mod (put the .tp2 file on the folder with the chitin.key, rename some setup-*.exe into setup-c7obg2spellfixer.exe and run that), all it does is patch out the opcodes that would cause your game to crash.

If this doesn't fix your crashes, start by posting your WeiDU.log, doing a --change-log on the liches and etc etc. Also you might crash on the Yaga-Shura Lt.s since those haven't been fixed in the latest version of SCS either sadly.

 

c7obg2spellfixer.tp2

Link to comment

Forgot to mention the important part: the bug described in the OP is in fact fixed, however the bug with Liches (and Demon Fear) is different, and rather new, however I wouldn't be able to point out exactly when it was introduced.

Link to comment
Guest Thanks CrevsDaak.

Thanks CrevsDaak, your code worked on a Pit Fiend summoned by the mage in Shangalar's that CTD my game. 

Link to comment
On 1/28/2024 at 6:49 PM, CrevsDaak said:

Note that this bug only occurs because of out-of-bounds opcodes being present in several spells modified by SCS or other mods (for example, Demon Fear and, as a consequence of being a direct copy of it, Liches' Fear aura).

Which are the other examples? I'm normally pretty careful to avoid putting EE opcodes onto oBG2 resources but some may have crept through.

Link to comment
30 minutes ago, DavidW said:

Which are the other examples? I'm normally pretty careful to avoid putting EE opcodes onto oBG2 resources but some may have crept through.

removing op328 from spell DW#LICFI, Fear Aura

removing op321 from spell FINIMOCR, <Invalid Strref -1>

removing op321 from spell SPCL613, Shapeshifts Black Bear

removing op328 from spell SPIN890, Demon Fear

removing op326 from spell SPPR614, Sol's Searing Orb

removing op321 from spell SPWI415, Polymorph Other

removing op321 from spell SPWI416, Polymorph Self

removing op321 from spell SPWI493, Shapeshifts Flind

removing op321 from spell SPWI494, Shapeshifts Ogre

removing op321 from spell SPWI495, Shapeshifts Spider

removing op321 from spell SPWI496, Shapeshifts Mustard Jelly

removing op321 from spell SPWI497, Shapeshifts Brown Bear

removing op321 from spell SPWI498, Shapeshifts Black Bear

removing op321 from spell SPWI499, Shapeshifts Wolf

removing op324 from spell SPWI812, Abi-Dalzim's Horrid Wilting

Unsure if the Ascension spell is SCS's doing or Ascension itself, either way, these are all the hits I get.

Link to comment

So: SPIN890 and DW#LICFI we've already discussed. Horrid Wilting and Searing Orb are from components that should have been flagged as EE-only. FINIMOCR is an Ascension bug, not an SCS bug (although since I maintain Ascension too, it's still my problem.) 

Would you mind running a change-log on SPWI415, SPWI416 and (say) SPWI493? I'm not 100% sure where they're getting patched.

Link to comment
3 hours ago, DavidW said:

Would you mind running a change-log on SPWI415, SPWI416 and (say) SPWI493? I'm not 100% sure where they're getting patched.

All of them are being patched in the spell tweaks component. One second, let me re-install it by parts and see what goes down on each one of them. spwi496, spwi497 and spwi498 are also being affected by the smarter general AI component.

Edit: all of them are being affected by

00000: /* created or unbiffed */ ~STRATAGEMS/SETUP-STRATAGEMS.TP2~ 0 2080 // Spells increased in power35.9

and then spwi496, spwi497 and spwi498 by the genai component, same as above.

Edit 2: OK, I figured out where the issue lies. iron_body.tpa is introducing this bug when it's called by install_spell_resources.tpa when that's called with version=boost.

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...