Jump to content

[not an EET issue]Khalid in SoD - failsave in case he's permadead?


Recommended Posts

This is not an EET issue. More likely a compatibility thing, probably with Multiplayer Tweaks.

--------

I may have missed something, but as far as i can see, there seems to be no failsave in case Khalid died permanently in BG1. This leads to the issue that the game tries to let him speak in one of the soldier's dialogues at Bridgefort, which leads to a crash.

I see this in the area script (bd2000.bcs) to spawn Khalid in Bridgefort outside area. Both blocks check for "

STATE_REALLY_DEAD

" so he's not spawned if he's dead.

Spoiler
IF
    Global("bd_khal_spawn","bd2000",0)  // Boareskyr Bridge & Bridgefort
    GlobalLT("Chapter","GLOBAL",13)
    !StateCheck("Khalid",STATE_REALLY_DEAD)  // Khalid
    BeenInParty("khalid")  // Khalid
THEN
    RESPONSE #100
        SetGlobal("bd_khal_spawn","bd2000",1)  // Boareskyr Bridge & Bridgefort
        MoveGlobal("bd2000","khalid",[2900.1310])  // Khalid
        ApplySpellRES("bdresurr","khalid")  // No such index
        SmallWait(1)
        ActionOverride("khalid",Face(E))
        ApplySpellRES("bdrejuve","khalid")  // No such index
        ChangeEnemyAlly("khalid",NEUTRAL)  // Khalid
        ChangeSpecifics("khalid",ALLIES)  // Khalid
        ActionOverride("khalid",SetGlobal("bd_joined","locals",0))
        ActionOverride("khalid",SetGlobal("bd_retreat","locals",0))
        ActionOverride("khalid",SaveObjectLocation("LOCALS","bd_default_loc",Myself))
        ActionOverride("khalid",ChangeAIScript("bdkhalid",OVERRIDE))
        ActionOverride("khalid",ChangeAIScript("bdfort",CLASS))
        ActionOverride("khalid",ChangeAIScript("bdshout",RACE))
        ActionOverride("khalid",ChangeAIScript("bdfigh01",GENERAL))
        ActionOverride("khalid",ChangeAIScript("",DEFAULT))
        ActionOverride("khalid",SetDialog("bdkhalid"))
        Continue()
END

IF
    Global("bd_khal_spawn","bd2000",0)  // Boareskyr Bridge & Bridgefort
    GlobalLT("Chapter","GLOBAL",13)
    !StateCheck("Khalid",STATE_REALLY_DEAD)  // Khalid
    !BeenInParty("khalid")  // Khalid
THEN
    RESPONSE #100
        SetGlobal("bd_khal_spawn","bd2000",1)  // Boareskyr Bridge & Bridgefort
        SetGlobal("SPRITE_IS_DEADKHALID","global",0)
        CreateCreature("khalid7",[2900.1310],E)  // Khalid
        ActionOverride("khalid",MakeGlobalOverride())
        ChangeSpecifics("khalid",ALLIES)  // Khalid
        ActionOverride("khalid",ChangeAIScript("bdkhalid",OVERRIDE))
        ActionOverride("khalid",ChangeAIScript("bdfort",CLASS))
        ActionOverride("khalid",ChangeAIScript("bdshout",RACE))
        ActionOverride("khalid",ChangeAIScript("bdfigh01",GENERAL))
        ActionOverride("khalid",ChangeAIScript("",DEFAULT))
        Continue()
END

In "BDBFORTdlg", he is supposed to say something, which lead to a crash for one player:

Spoiler


IF ~  GlobalLT("bd_bridgefort_plot","global",5)
Detect("KHALID")
!IsValidForPartyDialogue("JAHEIRA")
~ THEN BEGIN 2 // from:
  SAY #236837 /* ~Khalid! We have company.~ */
  IF ~~ THEN DO ~SetGlobal("bd_bridgefort_plot","global",5)
~ EXTERN ~BDKHALID~ 27
END

IF ~  GlobalLT("bd_bridgefort_plot","global",5)
Detect("KHALID")
IsValidForPartyDialogue("JAHEIRA")
~ THEN BEGIN 3 // from:
  SAY #236847 /* ~Khalid! We have company.~ */
  IF ~~ THEN DO ~SetGlobal("bd_bridgefort_plot","global",5)
SetGlobal("bd_mdd206","global",2)
~ EXTERN ~BDKHALID~ 28
END

 

Link to comment

Yes, I noticed in the meantime that the dialogue in question shouldn't be able to run at all, since it checks for Khalid's presence.

- I know that the dialogue ends if the detected NPC is there but the wrong dlg is called. Are you sure the dialogue also just ends if there is no valid cre file for the dialogue being called?

Link to comment

Thanks! Good to know.

- In case someone knows how EET treats SoD without Khalid, that would be interesting, too. I'd assume that he shouldn't be there and no conversation with him should happen. But Jaheira would still tell that they got separated and Khalid is in Bridgefort, I guess.

Or I got it all wrong and Khalid is revived somewhere before the player comes to bd2000.are.

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