Jump to content

Bug report - Xzar´s quest


Linn

Recommended Posts

Searching for: charmsmontaron

Searching for: xzarcharm

bg1npc_docs\bg1npcvarindex.htm(18557): <td>X#XzarCharmMontaron</td>

phase2\baf\x#xzdqu.baf(187): Global("X#XzarCharmMontaron","GLOBAL",0)

phase2\baf\x#xzdqu.baf(188): Global("X#XzarCharmMontaron","GLOBAL",4)

phase2\baf\x#xzdqu.baf(194): IncrementGlobal("X#XzarCharmMontaron","GLOBAL",1)

phase2\baf\x#xzdqu.baf(203): Global("X#XzarCharmMontaron","GLOBAL",1)

phase2\baf\x#xzdqu.baf(204): Global("X#XzarCharmMontaron","GLOBAL",5)

phase2\baf\x#xzdqu.baf(216): Global("X#XzarCharmMontaron","GLOBAL",6)

phase2\baf\x#xzdqu.baf(219): SetGlobal("X#XzarCharmMontaron","GLOBAL",7)

phase2\baf\x#xzdqu.baf(227): Global("X#XzarCharmMontaron","GLOBAL",7)

phase2\baf\x#xzdqu.baf(239): Global("X#XzarCharmMontaron","GLOBAL",2)

phase2\baf\x#xzdqu.baf(243): SetGlobal("X#XzarCharmMontaron","GLOBAL",3)

phase2\baf\x#xzdr2.baf(11): SetGlobal("X#XzarCharmMontaron","GLOBAL",4)

phase2\dlg\x#xzqu.d(180): IF WEIGHT #-2 ~%BGT_VAR% Global("X#XzarCharmMontaron","GLOBAL",1)~ THEN BEGIN MontyCharming1

phase2\dlg\x#xzqu.d(183): IF ~~ THEN DO ~SetGlobal("X#XzarCharmMontaron","GLOBAL",2)~ EXIT

phase2\dlg\x#xzqu.d(312): IF WEIGHT #-2 ~%BGT_VAR% Global("X#XzarCharmMontaron","GLOBAL",7)~ THEN BEGIN AfterCharm

phase2\dlg\x#xzqu.d(314): ++ @78 DO ~SetGlobal("X#XzarCharmMontaron","GLOBAL",8)~ + XZACHRM1.1

phase2\dlg\x#xzqu.d(315): ++ @79 DO ~SetGlobal("X#XzarCharmMontaron","GLOBAL",8)~ + XZACHRM1.2

phase2\dlg\x#xzqu.d(316): ++ @80 DO ~SetGlobal("X#XzarCharmMontaron","GLOBAL",8)~ + XZACHRM1.3

phase2\dlg\x#xzqu.d(317): ++ @81 DO ~SetGlobal("X#XzarCharmMontaron","GLOBAL",8)~ + XZACHRM1.4

phase2\dlg\x#xzqu.d(431): CHAIN IF ~%BGT_VAR% OR(2) Global("X#XzarCharmMontaron","GLOBAL",5) Global("X#XzarCharmMontaron","GLOBAL",1)~ THEN ~%XZAR_JOINED%~ XzarCharmMonty2

phase2\dlg\x#xzqu.d(435): DO ~SetGlobal("X#XzarCharmMontaron","GLOBAL",6)~ EXIT

Found 21 occurrence(s) in 4 file(s)

 

 

bleh. The whole sequence only checks for Xzar.

 

OK,

E:\BG1NPC_Workspace\bg1npcv17-final\bg1npc\phase2\baf\x#xzdqu.baf

/* Xzar Charms Montaron */
IF %BGT_VAR%
!AreaCheck("%EBaldursGate_SorcerousSundries_L1%")
InParty(Myself)
InMyArea(Player1)
!StateCheck(Player1,CD_STATE_NOTVALID)
OR(2)
Global("X#XzarCharmMontaron","GLOBAL",0)
Global("X#XzarCharmMontaron","GLOBAL",4)
PartyHasItem("X#XZRING")
THEN
RESPONSE #100
GiveItem("X#XZRING","xzar")
DisplayStringHead(Myself,@0)
IncrementGlobal("X#XzarCharmMontaron","GLOBAL",1)
END

IF %BGT_VAR%
InParty(Myself)
!StateCheck(Myself,CD_STATE_NOTVALID)
InMyArea(Player1)
!StateCheck(Player1,CD_STATE_NOTVALID)
OR(2)
Global("X#XzarCharmMontaron","GLOBAL",1)
Global("X#XzarCharmMontaron","GLOBAL",5)
THEN
RESPONSE #100
StartDialogueNoSet(Player1)
END


IF %BGT_VAR%
InParty(Myself)
!StateCheck(Myself,CD_STATE_NOTVALID)
InMyArea(Player1)
!StateCheck(Player1,CD_STATE_NOTVALID)
Global("X#XzarCharmMontaron","GLOBAL",6)
THEN
RESPONSE #100
SetGlobal("X#XzarCharmMontaron","GLOBAL",7)
END

IF
InParty(Myself)
!StateCheck(Myself,CD_STATE_NOTVALID)
InMyArea(Player1)
!StateCheck(Player1,CD_STATE_NOTVALID)
Global("X#XzarCharmMontaron","GLOBAL",7)
THEN
RESPONSE #100
StartDialogueNoSet(Player1)
END

/* Intro of Cutscene */
IF %BGT_VAR%
InParty("xzar")
!StateCheck("xzar",CD_STATE_NOTVALID)
InMyArea(Player1)
!StateCheck(Player1,CD_STATE_NOTVALID)
Global("X#XzarCharmMontaron","GLOBAL",2)
THEN
RESPONSE #100
ClearAllActions()
SetGlobal("X#XzarCharmMontaron","GLOBAL",3)
StartCutSceneMode()
StartCutScene("X#XZDR2")
END

 

I hate to say this, but the safest way to fix this is to reload from a save where Montaron is not dead. Advancing the variable via CLUAConsole to X#XzarCharmMontaron = 8 would close the whole sequence - and therefore the loop - but means you skip the whole encounter.

 

Before closing this loophole, I need to check CD_S_NV and make sure it does NOT include STATE_CHARMED. And we need to test run with all of the above blocks moved from

 

InParty("xzar")

!StateCheck("xzar",CD_STATE_NOTVALID)

InMyArea(Player1)

!StateCheck(Player1,CD_STATE_NOTVALID)

 

to

 

InParty("xzar")

!StateCheck("xzar",CD_STATE_NOTVALID)

InParty("montaron")

!StateCheck("montaron",CD_STATE_NOTVALID)

InMyArea(Player1)

!StateCheck(Player1,CD_STATE_NOTVALID)

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...