Heya, first of all thanks for this mod! It never made sense to me that I couldn't visit expansion content after finishing the main story...
I'm on BG:EE 2.6 (beta) and found a bug. After Sarevok's death, when I visit the Palace, Belt and Jannath are hostile (red) and start fighting with Flaming Fist mercenaries. Soon after, that one NPC teleports in to kill my PC. (Like automatic game over when Belt dies.)
I'm a programmer but not very familiar with Infinity scripting yet. Do you have any pointers regarding how I could debug the issue? Following is some info I was able to scrape together.
First of all the WeiDU log:
Script dumps I got via C:WriteScript("blah") from the in-game console follow. It seems that there's a problem with their decompilation though, because some parameters seem blank.
AR0108.baf: (Duchal Palace area script)
BELT.baf (Belt's character script):
DW#URBHL.baf: (don't know what this is but it was dumped together with BELT.baf; might be an addition by SCS or so)
DW1MELGE.baf: (also don't know what it is, was also dumped together with BELT.baf)
EDIT: Forgot to mention that I installed EBG1 *after* having killed Sarevok. I then continued from the "Final Save" the game creates. Don't know if this might cause some problems. As you can see from the install log though, I'm mostly just interested in the main component and don't care for Sarevok's item drops and such.
EDIT 2: Some further info that may be helpful in figuring out the problem: When I loaded my save file from just before starting the fight with Sarevok (standing just outside his vision in the Cathedral), and then went to the Palace (used the console as a shortcut), the problem didn't trigger. Belt and Jannath were neutral (blue). So I guess it could be one of the actions triggered via the Dead("Sarevok") checks that cause the problem.
- - -
EDIT 3 / Solution:
OK, so calling C:SetGlobal("SarevokBehavior", "GLOBAL", 4) from the console, before entering the palace, fixed the issue. Perhaps this is done by some script that the mod adds which didn't run in my case because I loaded a game where Sarevok was already dead? I can't find it in any TPL file in the "maincomponent" directory of the mod though. Perhaps it used to be done by the game itself but BG:EE 2.6 removed it, thinking it's unnecessary? Or maybe SCS fools with the value?
I'm also curious as to why Jannath and Belt turned hostile though. I think it relates to this part of the AR0108 script:
IF
Global("GLOBAL","SarevokBehavior",3) // <TRUE>
Global("ar0108","bd_once",0) // <FALSE>
THEN
RESPONSE #100
SetGlobalTimerRandom("GLOBAL","EndGame",ONE_MINUTETHREE_MINUTES)
Enemy()
Enemy()
Enemy()
SetGlobal("ar0108","bd_once",1)
END
(The check for "bd_once" = 0 says <FALSE> but that's because I invoked WriteScript() after entering the place (don't know if I can do it before) so it had already set bd_once to 1. When I called GetGlobal() on that variable before entering the palace, I was able to confirm that it was unset, meaning that this script runs when I enter the palace the first time.)
Sadly, this decompiled script doesn't show the parameters for the three invocations of the Enemy() action, but I'm sure that whatever their parameters are, it causes Jannath and Belt to become hostile. And the "EndGame" timer seems to be what's responsible for spawning "WINSKI" (further down in the AR0108 script) who insta-kills the PC to force a game over.
I really wonder what the original script (with the real parameters) does, and why my "SarevokBehavior" global was set to 3 and not 4... Just my curiosity as a programmer.