Jump to content

Baldur1 Dialogues for Continuos Characters


Roxanne

Recommended Posts

Reason to report is that his cre file here is Quayle_.cre in Baldur.gam (saying he is in BG4900)

that doesn't matter, his CRE file is still properly replaced by the engine using NPCLEVEL.2da

 

Since he is in Carnival than you've installed BG1 NPC Project component because normally he should be in Wyrm's Crossing. I had it installed too and it's unrelated to your problem - in my test he gave me an option to refuse taking him into the party. Is this the dialogue you've received?

nFiouYl.png

That second option is actually "no" response. If you didn't get it than probably some mod modified his dialogue file. Could you please post a screenshot of that conversation? Changelog of QUAYLE.DLG on BG:EE (if you still have that installation) and QUAYLE_.DLG on EET would also tell us which mods affected this file.

Link to comment

 

Reason to report is that his cre file here is Quayle_.cre in Baldur.gam (saying he is in BG4900)

that doesn't matter, his CRE file is still properly replaced by the engine using NPCLEVEL.2da

 

Since he is in Carnival than you've installed BG1 NPC Project component because normally he should be in Wyrm's Crossing. I had it installed too and it's unrelated to your problem - in my test he gave me an option to refuse taking him into the party. Is this the dialogue you've received?

nFiouYl.png

That second option is actually "no" response. If you didn't get it than probably some mod modified his dialogue file. Could you please post a screenshot of that conversation? Changelog of QUAYLE.DLG on BG:EE (if you still have that installation) and QUAYLE_.DLG on EET would also tell us which mods affected this file.

 

It is exactly this line - I decompiled the dialogue file and there seems to be an error - both possible answers lead to the same response

(But only for this particular case/direction)

IF ~~ THEN BEGIN 2 // from: 0.10 0.7 0.4 0.1

SAY #153939 /* ~Ah, my loutish friends, that is my direction too. Fate has crossed our paths, and we could all benefit by traveling together. It will be the classic pairing of you, the stalwart adventurers, and I, the intelligent one. How could you refuse?~ */

IF ~~ THEN REPLY #153940 /* ~Whatever. Come if ye must, but watch your mouth.~ */ GOTO 4

IF ~~ THEN REPLY #153941 /* ~How could I refuse? Watch me. Taketh thou a hike!~ */ GOTO 4 >>> this should be 5 like everywhere else

END

 

IF ~~ THEN BEGIN 4 // from: 3.0 2.0 1.0

SAY #153945 /* ~Well, I suppose I'll be on my way then you idi— You said YES! I mean, of course I'll come with you. My intellect and skill as a cleric will undoubtedly make your group much better than it is. Onward.~ */

IF ~~ THEN DO ~JoinParty()

~ EXIT

IF ~ Global("X#SharQuayleJoin","GLOBAL",0)

InParty("sharteel")

InMyArea("sharteel")

!StateCheck("sharteel",CD_STATE_NOTVALID)

~ THEN DO ~SetGlobal("X#SharQuayleJoin","GLOBAL",1)

~ EXTERN ~SHARTJ~ 101

END

 

And strangely enough both changelog runs say there was no mod affecting while obviously BG1NPC did (X#Shar....points to it).

 

Just strange, not game breaking.

Link to comment

strange indeed. Sounds like some random weidu compilation bug since neither BG1 NPC nor EET rearranges these blocks. I've decompiled the dialogue in my EET installation with BG1 NPC Project and the same block you've mentioned looks as expected. Could you please decompile QUAYLE.DLG on BG:EE and see if the error was already there before the EET conversion started?

Link to comment

strange indeed. Sounds like some random weidu compilation bug since neither BG1 NPC nor EET rearranges these blocks. I've decompiled the dialogue in my EET installation with BG1 NPC Project and the same block you've mentioned looks as expected. Could you please decompile QUAYLE.DLG on BG:EE and see if the error was already there before the EET conversion started?

Good point - yes, I checked - it is in the source already, so it is not EET related. It is correct in the unmodded BGEE source. It happened somewhere in BGEE installation but before EET and it is not found by changelog.

It seems to be a random error, definitely not related to EET and I think we may close the issue.

Link to comment

The problem with the Joined dialogue files of some NPCs has improved but is not yet fully solved. Every now and then one or more return to that strange Multig.dlg (Easy to identify by the line ~Why do you wish to waste my time with idle banter?~ which is the line for condition InParty(Myself))

 

The

OnCreation()

trigger used does not always fire the action as it should.

 

1. On area changes it is lost sometimes (I have three of those NPCs currently Neera, Dorn, Imoen which may increase the problem) -

2, on moving between areas by script ActionOverride(Player2,LeaveAreaLUA(....etc it seems to happen frequently.

3, when reloading the game it is reliable.

 

I have read a lot about issues with OnCreation() some time ago, but all documentation is for BG2 engine - is there any information whether it works exactly the same in BG2EE?

Many of those issues are appearing randomly and seem to be depending on which and how other scripts trigger at that very moment.

Save and restore always repairs the situation - but this is not a permanent solution for relaxed gameplay...

 

My suspicion is, that loading a new area after area transit works differently in EE than in BG2, thus OnCreation() also works slightly different...but this is speculation, I confess.

Link to comment

Thanks for the report. I was worried that current implementation is not enough. Please install this code to integrate new PDIALOG workaround. It will clean old code and replace it with new (simpler) one. BG2 override scripts, DPLAYER2 and PDIALOG.2DA no longer need any changes. There are only 2 blocks in BG1 override scripts related to this workaround now. If this won't be reliable than nothing will.

<<<<<<<< .../DIALOG_FILE-old.baf
IF
  OnCreation()
THEN
  RESPONSE #100
    SetGlobal("K#PDIALOG","LOCALS",0)
END

IF
  Global("K#PDIALOG","LOCALS",0)
  InPartyAllowDead(Myself)
THEN
  RESPONSE #100
    SetDialog("%dlg%")
    SetGlobal("K#PDIALOG","LOCALS",1)
    Continue()
END

IF
  Global("K#PDIALOG","LOCALS",1)
  !InPartyAllowDead(Myself)
THEN
  RESPONSE #100
    SetDialog("%dlg_1%")
    SetGlobal("K#PDIALOG","LOCALS",0)
    Continue()
END
>>>>>>>>

<<<<<<<< .../DIALOG_FILE-new.baf
IF
  ActionListEmpty()
  InPartyAllowDead(Myself)
THEN
  RESPONSE #100
    SetDialog("%dlg%")
    Continue()
END

IF
  ActionListEmpty()
  !InPartyAllowDead(Myself)
  GlobalGT("HASBEENINPARTY","LOCALS",0)
THEN
  RESPONSE #100
    SetDialog("%dlg_1%")
    Continue()
END
>>>>>>>>

<<<<<<<< .../DPLAYER2-old.baf
IF
  Global("K#PDIALOG","LOCALS",0)
  GlobalLT("ENDOFBG2","GLOBAL",2)
  !InParty(Myself)
  NumInParty(6)
  ActionListEmpty()
  OR(8)
    Name("Dorn",Myself)
    Name("Edwin",Myself)
    Name("Imoen2",Myself)
    Name("Jaheira",Myself)
    Name("Minsc",Myself)
    Name("Neera",Myself)
    Name("Rasaad",Myself)
    Name("Viconia",Myself)
THEN
  RESPONSE #100
    SetGlobal("K#PDIALOG","LOCALS",1)
END
>>>>>>>>

<<<<<<<< .../blank.baf
>>>>>>>>

ACTION_DEFINE_ASSOCIATIVE_ARRAY table_transition_DIALOG_FILE BEGIN
    DORNJ_   , DORNP_   => DORN_    //BG1 Dorn
    EDWINJ_  , EDWINP_  => EDWIN_   //BG1 Edwin
    IMOEN2_  , IMOENP_  => IMOEN_   //BG1 Imoen
    IMOENJ   , IMOENP   => IMOEN    //BG2 Irenicus Dungeon Imoen
    JAHEIJ   , JAHEIP   => JAHEIRA_ //BG1 Jaheira
    MINSCJ_  , MINSCP_  => MINSC_   //BG1 Minsc
    NEERAJ_  , NEERAP_  => NEERA_   //BG1 Neera
    RASAADJ_ , RASAADP_ => RASAAD_  //BG1 Rasaad
    VICONJ   , VICONP   => VICONIA_ //BG1 Viconia
END

ACTION_PHP_EACH table_transition_DIALOG_FILE AS dlg => res BEGIN
    COPY_EXISTING ~%res%.BCS~ ~override~
        REPLACE_BCS_BLOCK EVALUATE_BUFFER ~.../DIALOG_FILE-old.baf~ ~.../DIALOG_FILE-new.baf~
    BUT_ONLY
END

ACTION_DEFINE_ASSOCIATIVE_ARRAY table_transition_DIALOG_FILE2 BEGIN
    DORNJ    , DORNP    => DORN     //BG2 Dorn
    EDWINJ   , EDWINP   => EDWIN    //BG2 Edwin
    IMOEN2J  , IMOEN2P  => IMOEN2   //BG2 Imoen
    JAHEIRAJ , JAHEIRAP => JAHEIRA  //BG2 Jaheira
    MINSCJ   , MINSCP   => MINSC    //BG2 Minsc
    NEERAJ   , NEERAP   => NEERA    //BG2 Neera
    RASAADJ  , RASAADP  => RASAAD   //BG2 Rasaad
    VICONIJ  , VICONIP  => VICONIA  //BG2 Viconia
END

ACTION_PHP_EACH table_transition_DIALOG_FILE2 AS dlg => res BEGIN
    COPY_EXISTING ~%res%.BCS~ ~override~
        REPLACE_BCS_BLOCK EVALUATE_BUFFER ~.../DIALOG_FILE-old.baf~ ~.../blank.baf~
    BUT_ONLY
END

COPY_EXISTING ~DPLAYER2.BCS~ ~override~
    REPLACE_BCS_BLOCK EVALUATE_BUFFER ~.../DPLAYER2-old.baf~ ~.../blank.baf~
BUT_ONLY

COPY_EXISTING ~PDIALOG.2DA~ ~override~
    PRETTY_PRINT_2DA
    SET_2DA_ENTRY 1 0 1 multig
    PHP_EACH table_transition_DIALOG_FILE2 AS dlg => res BEGIN
        REPLACE_TEXTUALLY ~^%res%[ %TAB%]+\*[ %TAB%]+\*~ ~%res% %dlg_1% %dlg%~
    END
    PRETTY_PRINT_2DA
BUT_ONLY
Link to comment

 

Thanks for the report. I was worried that current implementation is not enough. Please install this code to integrate new PDIALOG workaround. It will clean old code and replace it with new (simpler) one. BG2 override scripts, DPLAYER2 and PDIALOG.2DA no longer need any changes. There are only 2 blocks in BG1 override scripts related to this workaround now. If this won't be reliable than nothing will.

<<<<<<<< .../DIALOG_FILE-old.baf
IF
  OnCreation()
THEN
  RESPONSE #100
    SetGlobal("K#PDIALOG","LOCALS",0)
END

IF
  Global("K#PDIALOG","LOCALS",0)
  InPartyAllowDead(Myself)
THEN
  RESPONSE #100
    SetDialog("%dlg%")
    SetGlobal("K#PDIALOG","LOCALS",1)
    Continue()
END

IF
  Global("K#PDIALOG","LOCALS",1)
  !InPartyAllowDead(Myself)
THEN
  RESPONSE #100
    SetDialog("%dlg_1%")
    SetGlobal("K#PDIALOG","LOCALS",0)
    Continue()
END
>>>>>>>>

<<<<<<<< .../DIALOG_FILE-new.baf
IF
  ActionListEmpty()
  InPartyAllowDead(Myself)
THEN
  RESPONSE #100
    SetDialog("%dlg%")
    Continue()
END

IF
  ActionListEmpty()
  !InPartyAllowDead(Myself)
  GlobalGT("HASBEENINPARTY","LOCALS",0)
THEN
  RESPONSE #100
    SetDialog("%dlg_1%")
    Continue()
END
>>>>>>>>

<<<<<<<< .../DPLAYER2-old.baf
IF
  Global("K#PDIALOG","LOCALS",0)
  GlobalLT("ENDOFBG2","GLOBAL",2)
  !InParty(Myself)
  NumInParty(6)
  ActionListEmpty()
  OR(8)
    Name("Dorn",Myself)
    Name("Edwin",Myself)
    Name("Imoen2",Myself)
    Name("Jaheira",Myself)
    Name("Minsc",Myself)
    Name("Neera",Myself)
    Name("Rasaad",Myself)
    Name("Viconia",Myself)
THEN
  RESPONSE #100
    SetGlobal("K#PDIALOG","LOCALS",1)
END
>>>>>>>>

<<<<<<<< .../blank.baf
>>>>>>>>

ACTION_DEFINE_ASSOCIATIVE_ARRAY table_transition_DIALOG_FILE BEGIN
    DORNJ_   , DORNP_   => DORN_    //BG1 Dorn
    EDWINJ_  , EDWINP_  => EDWIN_   //BG1 Edwin
    IMOEN2_  , IMOENP_  => IMOEN_   //BG1 Imoen
    IMOENJ   , IMOENP   => IMOEN    //BG2 Irenicus Dungeon Imoen
    JAHEIJ   , JAHEIP   => JAHEIRA_ //BG1 Jaheira
    MINSCJ_  , MINSCP_  => MINSC_   //BG1 Minsc
    NEERAJ_  , NEERAP_  => NEERA_   //BG1 Neera
    RASAADJ_ , RASAADP_ => RASAAD_  //BG1 Rasaad
    VICONJ   , VICONP   => VICONIA_ //BG1 Viconia
END

ACTION_PHP_EACH table_transition_DIALOG_FILE AS dlg => res BEGIN
    COPY_EXISTING ~%res%.BCS~ ~override~
        REPLACE_BCS_BLOCK EVALUATE_BUFFER ~.../DIALOG_FILE-old.baf~ ~.../DIALOG_FILE-new.baf~
    BUT_ONLY
END

ACTION_DEFINE_ASSOCIATIVE_ARRAY table_transition_DIALOG_FILE2 BEGIN
    DORNJ    , DORNP    => DORN     //BG2 Dorn
    EDWINJ   , EDWINP   => EDWIN    //BG2 Edwin
    IMOEN2J  , IMOEN2P  => IMOEN2   //BG2 Imoen
    JAHEIRAJ , JAHEIRAP => JAHEIRA  //BG2 Jaheira
    MINSCJ   , MINSCP   => MINSC    //BG2 Minsc
    NEERAJ   , NEERAP   => NEERA    //BG2 Neera
    RASAADJ  , RASAADP  => RASAAD   //BG2 Rasaad
    VICONIJ  , VICONIP  => VICONIA  //BG2 Viconia
END

ACTION_PHP_EACH table_transition_DIALOG_FILE2 AS dlg => res BEGIN
    COPY_EXISTING ~%res%.BCS~ ~override~
        REPLACE_BCS_BLOCK EVALUATE_BUFFER ~.../DIALOG_FILE-old.baf~ ~.../blank.baf~
    BUT_ONLY
END

COPY_EXISTING ~DPLAYER2.BCS~ ~override~
    REPLACE_BCS_BLOCK EVALUATE_BUFFER ~.../DPLAYER2-old.baf~ ~.../blank.baf~
BUT_ONLY

COPY_EXISTING ~PDIALOG.2DA~ ~override~
    PRETTY_PRINT_2DA
    SET_2DA_ENTRY 1 0 1 multig
    PHP_EACH table_transition_DIALOG_FILE2 AS dlg => res BEGIN
        REPLACE_TEXTUALLY ~^%res%[ %TAB%]+\*[ %TAB%]+\*~ ~%res% %dlg_1% %dlg%~
    END
    PRETTY_PRINT_2DA
BUT_ONLY

Wanted to try it but get an error for this block

ACTION_PHP_EACH table_transition_DIALOG_FILE AS dlg => res BEGIN

COPY_EXISTING ~%res%.BCS~ ~override~

REPLACE_BCS_BLOCK EVALUATE_BUFFER ~.../DIALOG_FILE-old.baf~ ~.../DIALOG_FILE-new.baf~

BUT_ONLY

END

 

Invalid character [.]

There are a lot of them?? Also it tells me to use Context editor instead of word (Which is exactly what I do all the time!)

Link to comment

I am so awfully sorry....

 

There still seems to be a problem with dialogue switching under special conditions (however those conditions are part of normal gameplay).

Here is the situation

I want to infiltrate the Bandit Camp, so I talk to Teven in Larswood, we transport to meet Tazok, Tazok talks until a point where there is a Viconia I_C_T from BG1NPC mod - it does not work as Viconia has the wrong dialog file - thus the dialogue breaks.

 

My explanation is this - Viconia has her BG1 dialogue ViconJ right before I talk to Teven ==> directly triggers moving between areas by script ActionOverride(Player2,LeaveAreaLUA(...to bandit camp ===> directly to cutscene to make Tazok appear ===> Tazok dialogue immediately starts triggered from cutscene ====> Viconia dialogue reset never happens.The whole transport scene until the I_C_T is never interrupted to give a chance for the reset script to execute.

 

Problem1 - Viconia is just one of many NPC candidates for this dialogue, the same thing would happen for a couple of others as well

Problem2 - there are a number of such situations in the game where you enter a dialogue and/or cutscene mode, get transported, immediately start another dialogue.

 

Just an idea - such cutscene sequences have MultiplayerSync in them - could something similar be used for dialog re-set? Or would that not be executed until after the whole chain has ended?

 

Additional information

 

 

Teven dialogue ends with Action

SetGlobal("JoinedBandits","GLOBAL",4)
Shout(0)
ClearAllActions()
StartCutSceneMode()
StartCutScene("Bancut02")

 

Then the cutscene

 

IF
True()
THEN
RESPONSE #100
CutSceneId(Player1)
FadeToColor([20.0],0)
Wait(2)
AdvanceTime(8700)
ActionOverride("Teven",DestroySelf())
LeaveAreaLUAPanic("BG1900","trcarvan",[726.1444],NE)
LeaveAreaLUA("BG1900","trcarvan",[726.1444],NE)
ActionOverride(Player2,LeaveAreaLUA("BG1900","trcarvan",[612.1424],NE))
ActionOverride(Player3,LeaveAreaLUA("BG1900","trcarvan",[663.1518],NE))
ActionOverride(Player4,LeaveAreaLUA("BG1900","trcarvan",[500.1447],NE))
ActionOverride(Player5,LeaveAreaLUA("BG1900","trcarvan",[552.1542],NE))
ActionOverride(Player6,LeaveAreaLUA("BG1900","trcarvan",[440.1541],NE))
MultiPlayerSync()
SetGlobal("BANDIT_MOVIE","BG1900",1)
StartMovie("CAMP")
CreateCreature("TEVEN",[806.1392],E) // Teven
CreateCreature("Bandit4",[362.1683],N) // Bandit
ActionOverride("Bandit4",ChangeAIScript("",RACE))
CreateCreature("Bandit2",[445.1719],N) // Bandit
ActionOverride("Bandit2",ChangeAIScript("",RACE))
CreateCreature("Bandcap",[375.1843],N) // Bandit
ActionOverride("Teven",SetNumTimesTalkedTo(1))
CreateCreature("TAZOK_",[1696.1238],S) // Tazok
MultiPlayerSync()
FadeFromColor([20.0],0)
ActionOverride("Banditcr",SetDialog("Bandct"))
ActionOverride("Banditcr",ChangeAIScript("WTARSGT",DEFAULT))
ActionOverride("Banditcr",JumpToPoint([1490.1442]))
ActionOverride("TEVEN",MoveToPoint([1095.1381]))
ActionOverride("Bandit4",MoveToPoint([668.1372]))
ActionOverride("Bandit4",Face(E))
ActionOverride("Bandit2",MoveToPoint([808.1554]))
ActionOverride("Bandit2",Face(NE))
ActionOverride("Bandcap",MoveToPoint([918.1686]))
ActionOverride("Bandcap",Face(N))
MoveViewPoint([1029.1433],VERY_FAST)
ActionOverride(Player2,MoveToPoint([965.1349]))
ActionOverride(Player3,MoveToPoint([986.1456]))
ActionOverride(Player4,MoveToPoint([886.1371]))
ActionOverride(Player5,MoveToPoint([919.1433]))
ActionOverride(Player6,MoveToPoint([852.1445]))
MoveToPoint([1029.1433])
SmallWait(2)
DisplayStringHead("Teven",104553) // Wait a moment! Don't you dare go anywhere!
Wait(1)
ActionOverride("Tazok",SetNumTimesTalkedTo(1))
ActionOverride("Tazok",Wait(1))
ActionOverride("Tazok",SmallWait(6))
ActionOverride("Tazok",MoveToPoint([1244.1347]))
Wait(2)
ActionOverride("Banditcr",Dialogue("Teven"))
END

 

With this we are in the new dialogue that Viconia is supposed to interject (but does not due to not having right joined file)

 

 

 

Link to comment

I am so awfully sorry....

 

There still seems to be a problem with dialogue switching under special conditions (however those conditions are part of normal gameplay).

Here is the situation

I want to infiltrate the Bandit Camp, so I talk to Teven in Larswood, we transport to meet Tazok, Tazok talks until a point where there is a Viconia I_C_T from BG1NPC mod - it does not work as Viconia has the wrong dialog file - thus the dialogue breaks.

 

My explanation is this - Viconia has her BG1 dialogue ViconJ right before I talk to Teven ==> directly triggers moving between areas by script ActionOverride(Player2,LeaveAreaLUA(...to bandit camp ===> directly to cutscene to make Tazok appear ===> Tazok dialogue immediately starts triggered from cutscene ====> Viconia dialogue reset never happens.The whole transport scene until the I_C_T is never interrupted to give a chance for the reset script to execute.

 

Problem1 - Viconia is just one of many NPC candidates for this dialogue, the same thing would happen for a couple of others as well

Problem2 - there are a number of such situations in the game where you enter a dialogue and/or cutscene mode, get transported, immediately start another dialogue.

 

Just an idea - such cutscene sequences have MultiplayerSync in them - could something similar be used for dialog re-set? Or would that not be executed until after the whole chain has ended?

 

Additional information

 

 

Teven dialogue ends with Action

SetGlobal("JoinedBandits","GLOBAL",4)

Shout(0)

ClearAllActions()

StartCutSceneMode()

StartCutScene("Bancut02")

 

Then the cutscene

 

IF

True()

THEN

RESPONSE #100

CutSceneId(Player1)

FadeToColor([20.0],0)

Wait(2)

AdvanceTime(8700)

ActionOverride("Teven",DestroySelf())

LeaveAreaLUAPanic("BG1900","trcarvan",[726.1444],NE)

LeaveAreaLUA("BG1900","trcarvan",[726.1444],NE)

ActionOverride(Player2,LeaveAreaLUA("BG1900","trcarvan",[612.1424],NE))

ActionOverride(Player3,LeaveAreaLUA("BG1900","trcarvan",[663.1518],NE))

ActionOverride(Player4,LeaveAreaLUA("BG1900","trcarvan",[500.1447],NE))

ActionOverride(Player5,LeaveAreaLUA("BG1900","trcarvan",[552.1542],NE))

ActionOverride(Player6,LeaveAreaLUA("BG1900","trcarvan",[440.1541],NE))

MultiPlayerSync()

SetGlobal("BANDIT_MOVIE","BG1900",1)

StartMovie("CAMP")

CreateCreature("TEVEN",[806.1392],E) // Teven

CreateCreature("Bandit4",[362.1683],N) // Bandit

ActionOverride("Bandit4",ChangeAIScript("",RACE))

CreateCreature("Bandit2",[445.1719],N) // Bandit

ActionOverride("Bandit2",ChangeAIScript("",RACE))

CreateCreature("Bandcap",[375.1843],N) // Bandit

ActionOverride("Teven",SetNumTimesTalkedTo(1))

CreateCreature("TAZOK_",[1696.1238],S) // Tazok

MultiPlayerSync()

FadeFromColor([20.0],0)

ActionOverride("Banditcr",SetDialog("Bandct"))

ActionOverride("Banditcr",ChangeAIScript("WTARSGT",DEFAULT))

ActionOverride("Banditcr",JumpToPoint([1490.1442]))

ActionOverride("TEVEN",MoveToPoint([1095.1381]))

ActionOverride("Bandit4",MoveToPoint([668.1372]))

ActionOverride("Bandit4",Face(E))

ActionOverride("Bandit2",MoveToPoint([808.1554]))

ActionOverride("Bandit2",Face(NE))

ActionOverride("Bandcap",MoveToPoint([918.1686]))

ActionOverride("Bandcap",Face(N))

MoveViewPoint([1029.1433],VERY_FAST)

ActionOverride(Player2,MoveToPoint([965.1349]))

ActionOverride(Player3,MoveToPoint([986.1456]))

ActionOverride(Player4,MoveToPoint([886.1371]))

ActionOverride(Player5,MoveToPoint([919.1433]))

ActionOverride(Player6,MoveToPoint([852.1445]))

MoveToPoint([1029.1433])

SmallWait(2)

DisplayStringHead("Teven",104553) // Wait a moment! Don't you dare go anywhere!

Wait(1)

ActionOverride("Tazok",SetNumTimesTalkedTo(1))

ActionOverride("Tazok",Wait(1))

ActionOverride("Tazok",SmallWait(6))

ActionOverride("Tazok",MoveToPoint([1244.1347]))

Wait(2)

ActionOverride("Banditcr",Dialogue("Teven"))

END

 

With this we are in the new dialogue that Viconia is supposed to interject (but does not due to not having right joined file)

 

 

 

And what makes them change their joined dialogue during LeaveAreaLUA in the first place???

 

By setting Viconia's Global of the I_C_T event to 1 (so it does not trigger in the sequence) I worked around it - also proves that my analysis appears to be correct - also Viconia stutters when returning to normal mode after the above sequence until I re-set SetGlobal("K#PDIALOG","LOCALS",0) on her.

 

Question is, how to script this into the game?

Link to comment
also Viconia stutters when returning to normal mode after the above sequence until I re-set SetGlobal("K#PDIALOG","LOCALS",0) on her

K#PDIALOG variable is no longer used anywhere with this implementation. Are you sure it's related to this? The only code now present is:

IF
  ActionListEmpty()
  InPartyAllowDead(Myself)
THEN
  RESPONSE #100
    SetDialog("%dlg%")
    Continue()
END

IF
  ActionListEmpty()
  !InPartyAllowDead(Myself)
  GlobalGT("HASBEENINPARTY","LOCALS",0)
THEN
  RESPONSE #100
    SetDialog("%dlg_1%")
    Continue()
END

I've tested it in various circumstances (walking, fighting, casting, some cutscenes) and no action was interrupted, so not sure why she would stutter after that cutscene. Maybe the patching code from previous post didn't work? Please check her override script.

 

Just an idea - such cutscene sequences have MultiplayerSync in them - could something similar be used for dialog re-set? Or would that not be executed until after the whole chain has ended?

We could fix it for vanilla content by adding SetDialog right into the script but that would be against the goal of this workaround - it's meant to make modders life easier, not to force them adding junk whenever they write a BG1 cutscene like the quoted one. If there will be no way around it than appending dialogue files like in BGT will be easier to handle than this (although with additional Siege of Dragonspear dialogues the files would have awful large size and confusing structure :puke:).

 

What I don't understand is why this even happens. I_C_T code looks like this (example from weidu documentation):

INTERJECT_COPY_TRANS TOLGER 75 AquaTolger
  == AQUALUNJ   IF ~IsValidForPartyDialogue("Aqualung")~ THEN
    ~Hey, that's a really crummy offer! Where did those little girls go? I
    could be sitting on a park bench, I don't need this aggravation! Who
    are you, anyway?~
  == TOLGER     IF ~IsValidForPartyDialogue("Aqualung")~ THEN
    ~You poor old sod, you see it's only me. Now, did anyone else have a
    smart remark they wanted to make?~
END

So, if Aqualung is around, we’ll hear from him and then Tolgerias will respond to him. After that, the game will look for the presence of Edwin, Jaheira, Yoshimo, and Korgan and we’ll get their responses to Tolgerias as well.

so from what I understand "== AQUALUNJ" points directly to the dialogue file, just like if you would use EXTERN. That's why I didn't expect this problem. Are you sure you used correct dialogue file name there, not BG2 one?

 

Also please send me whole code you used to patch dialogue, so I can check how it looks like after decompiling and test that whole cutscene in game (in vanilla game there are no Jaheira interjections there if I remember correctly).

Link to comment

 

also Viconia stutters when returning to normal mode after the above sequence until I re-set SetGlobal("K#PDIALOG","LOCALS",0) on her

K#PDIALOG variable is no longer used anywhere with this implementation. Are you sure it's related to this? The only code now present is:

IF
  ActionListEmpty()
  InPartyAllowDead(Myself)
THEN
  RESPONSE #100
    SetDialog("%dlg%")
    Continue()
END

IF
  ActionListEmpty()
  !InPartyAllowDead(Myself)
  GlobalGT("HASBEENINPARTY","LOCALS",0)
THEN
  RESPONSE #100
    SetDialog("%dlg_1%")
    Continue()
END
Just an idea - such cutscene sequences have MultiplayerSync in them - could something similar be used for dialog re-set? Or would that not be executed until after the whole chain has ended?

We could fix it for vanilla content by adding SetDialog right into the script but that would be against the goal of this workaround - it's meant to make modders life easier, not to force them adding junk whenever they write a BG1 cutscene like the quoted one.

 

What I don't understand is why this even happens. I_C_T code looks like this (example from weidu documentation):

INTERJECT_COPY_TRANS TOLGER 75 AquaTolger
  == AQUALUNJ   IF ~IsValidForPartyDialogue("Aqualung")~ THEN
    ~Hey, that's a really crummy offer! Where did those little girls go? I
    could be sitting on a park bench, I don't need this aggravation! Who
    are you, anyway?~
  == TOLGER     IF ~IsValidForPartyDialogue("Aqualung")~ THEN
    ~You poor old sod, you see it's only me. Now, did anyone else have a
    smart remark they wanted to make?~
END

So, if Aqualung is around, we’ll hear from him and then Tolgerias will respond to him. After that, the game will look for the presence of Edwin, Jaheira, Yoshimo, and Korgan and we’ll get their responses to Tolgerias as well.

so from what I understand "== AQUALUNJ" points directly to the dialogue file, just like if you would use EXTERN. That's why I didn't expect this problem. Are you sure you used right dialogue file name there, not BG2 one?

 

Also please send me whole code you used to patch dialogue, so I can test that whole cutscene myself in game (in vanilla game there are no Jaheira interjections there if I remember correctly).

 

First of all, I did not patch anything,

the dialogue I refer to is Tazok_.dlg which is appended correctly by BG1NPC mod - the Viconia reference is translated by EET from BG1 and is this

IF ~ Global("X#VicTazok","GLOBAL",0)

InParty("viconia")

InMyArea("viconia")

!StateCheck("viconia",CD_STATE_NOTVALID)

~ THEN DO ~SetGlobal("X#VicTazok","GLOBAL",1)

~ EXTERN ~VICONJ~ 172

END

So it is just as expected, only Viconia has ViconiJ.dlg after the transport scene.

 

Also, after some thought, the number of cutscenes in BG1 that may have the issue is limited according to my experience, the technique is more used in BG2 and ToB where we will not face the problem.

 

The problem remains - even the new code changes the joined dialogue only AFTER the complete chain above has terminated - The NPC script that reverts the dialogue file is not running until the whole scene is done, i.e. in thw dialogue that is triggered within the sequence her file referenced is the wrong one.

Link to comment

Thank you very much for this report. Tested it and it's indeed a problem if Viconia is in party.

 

Assigning dialogue directly in the dialogue block that calls the EXTERN doesn't work but it can be fixed directly in the cutscene script with this code:

COPY_EXISTING ~BANCUT01.BCS~ ~override~
~BANCUT02.BCS~ ~override~
DECOMPILE_AND_PATCH BEGIN
    REPLACE_TEXTUALLY ~StartMovie("CAMP")~ ~StartMovie("CAMP")
    ActionOverride("Viconia",SetDialog("VICONJ"))~
END

I think we should consider dropping this workaround considering there may be more vanilla game cutscenes like this one and who knows how many mods add new ones to the game in similar way. If this is widespread issue than maybe it's not worth it.

 

Possible solutions:

1. Someone hacks the exe file to get rid of auto PDIALOG.2DA dialogue swap when LeaveAreaLua is used.

2. I will create a topic on Beamdog forums requesting a new opcode that could disable PDIALOG.2DA dialogue file swap if the effect is present on the creature. In other words something like this. Unlikely that they will add it, because it's not really needed from their perspective.

3. Maybe patch 1.4 will work differently

4. Leave it as it is, find all other cutscenes in vanilla game that forces LeaveAreaLua without giving time for local NPC override script to re-assign correct dialogue. Warn about it in Developer's Documentation and wait for bug reports like the one you posted...

5. Go back to appending files just like in BGT with following rules:

- BG1 dialogues appended at the end of BG2 files filtered with Global("ENDOFBG1","GLOBAL",0)

- Siege of Dragonspear dialogues appended after BG1 ones filtered with Global("ENDOFBG1","GLOBAL",1)

- BG2 dialogues filtered with Global("ENDOFBG1","GLOBAL",2) where it's needed (will check BGT code where exactly it added such filtering)

Mods like BG1 NPC Project (if there will be a version with native compatibility in future) would still need to use standard Fluidstates.tpa to figure out the first state number of BG1 files that had been appended, just like in BGT.

 

The last option sounds the worst to me. Not only silly stuff like "fluidstates" variables but also filtering and files that may end up weighting several MBs. In other words BGT jankiness all over again... Damn.

Link to comment

 

 

also Viconia stutters when returning to normal mode after the above sequence until I re-set SetGlobal("K#PDIALOG","LOCALS",0) on her

K#PDIALOG variable is no longer used anywhere with this implementation. Are you sure it's related to this? The only code now present is:

IF
  ActionListEmpty()
  InPartyAllowDead(Myself)
THEN
  RESPONSE #100
    SetDialog("%dlg%")
    Continue()
END

IF
  ActionListEmpty()
  !InPartyAllowDead(Myself)
  GlobalGT("HASBEENINPARTY","LOCALS",0)
THEN
  RESPONSE #100
    SetDialog("%dlg_1%")
    Continue()
END
Just an idea - such cutscene sequences have MultiplayerSync in them - could something similar be used for dialog re-set? Or would that not be executed until after the whole chain has ended?

We could fix it for vanilla content by adding SetDialog right into the script but that would be against the goal of this workaround - it's meant to make modders life easier, not to force them adding junk whenever they write a BG1 cutscene like the quoted one.

 

What I don't understand is why this even happens. I_C_T code looks like this (example from weidu documentation):

INTERJECT_COPY_TRANS TOLGER 75 AquaTolger
  == AQUALUNJ   IF ~IsValidForPartyDialogue("Aqualung")~ THEN
    ~Hey, that's a really crummy offer! Where did those little girls go? I
    could be sitting on a park bench, I don't need this aggravation! Who
    are you, anyway?~
  == TOLGER     IF ~IsValidForPartyDialogue("Aqualung")~ THEN
    ~You poor old sod, you see it's only me. Now, did anyone else have a
    smart remark they wanted to make?~
END

So, if Aqualung is around, we’ll hear from him and then Tolgerias will respond to him. After that, the game will look for the presence of Edwin, Jaheira, Yoshimo, and Korgan and we’ll get their responses to Tolgerias as well.

so from what I understand "== AQUALUNJ" points directly to the dialogue file, just like if you would use EXTERN. That's why I didn't expect this problem. Are you sure you used right dialogue file name there, not BG2 one?

 

Also please send me whole code you used to patch dialogue, so I can test that whole cutscene myself in game (in vanilla game there are no Jaheira interjections there if I remember correctly).

 

First of all, I did not patch anything,

the dialogue I refer to is Tazok_.dlg which is appended correctly by BG1NPC mod - the Viconia reference is translated by EET from BG1 and is this

IF ~ Global("X#VicTazok","GLOBAL",0)

InParty("viconia")

InMyArea("viconia")

!StateCheck("viconia",CD_STATE_NOTVALID)

~ THEN DO ~SetGlobal("X#VicTazok","GLOBAL",1)

~ EXTERN ~VICONJ~ 172

END

So it is just as expected, only Viconia has ViconiJ.dlg after the transport scene.

 

Also, after some thought, the number of cutscenes in BG1 that may have the issue is limited according to my experience, the technique is more used in BG2 and ToB where we will not face the problem.

 

The problem remains - even the new code changes the joined dialogue only AFTER the complete chain above has terminated - The NPC script that reverts the dialogue file is not running until the whole scene is done, i.e. in thw dialogue that is triggered within the sequence her file referenced is the wrong one.

 

Quote - We could fix it for vanilla content by adding SetDialog right into the script but that would be against the goal of this workaround - it's meant to make modders life easier, not to force them adding junk whenever they write a BG1 cutscene like the quoted one.

 

I found the solution for the particular case at hand and tested it successfully.

It needs to be applied to vanilla scripts

Bancut01.bcs

 

IF

True()

THEN

RESPONSE #100

CutSceneId(Player1)

FadeToColor([20.0],0)

Wait(2)

AdvanceTime(THIRTEEN_HOURS)

ActionOverride("Raiken",DestroySelf())

LeaveAreaLUAPanic("BG1900","trcarvan",[726.1444],NE)

LeaveAreaLUA("BG1900","trcarvan",[726.1444],NE)

ActionOverride(Player2,LeaveAreaLUA("BG1900","trcarvan",[612.1424],NE))

ActionOverride(Player3,LeaveAreaLUA("BG1900","trcarvan",[663.1518],NE))

ActionOverride(Player4,LeaveAreaLUA("BG1900","trcarvan",[500.1447],NE))

ActionOverride(Player5,LeaveAreaLUA("BG1900","trcarvan",[552.1542],NE))

ActionOverride(Player6,LeaveAreaLUA("BG1900","trcarvan",[440.1541],NE))

MultiPlayerSync()

ActionOverride("Viconia",SetDialog("VICONJ"))

Wait(1)

SetGlobal("BANDIT_MOVIE","BG1900",1)

StartMovie("CAMP")

CreateCreature("Raiken",[806.1392],E) // Raiken

CreateCreature("Bandit4",[362.1683],N) // Bandit

ActionOverride("Bandit4",ChangeAIScript("",RACE))

CreateCreature("Bandit2",[445.1719],N) // Bandit

ActionOverride("Bandit2",ChangeAIScript("",RACE))

CreateCreature("Bandcap",[375.1843],N) // Bandit

ActionOverride("Raiken",SetNumTimesTalkedTo(1))

CreateCreature("TAZOK_",[1696.1238],S) // Tazok

MultiPlayerSync()

FadeFromColor([20.0],0)

ActionOverride("Banditcr",SetDialog("Bandcr"))

ActionOverride("Banditcr",ChangeAIScript("WTARSGT",DEFAULT))

ActionOverride("Banditcr",JumpToPoint([1490.1442]))

ActionOverride("Raiken",MoveToPoint([1095.1381]))

ActionOverride("Bandit4",MoveToPoint([668.1372]))

ActionOverride("Bandit4",Face(E))

ActionOverride("Bandit2",MoveToPoint([808.1554]))

ActionOverride("Bandit2",Face(NE))

ActionOverride("Bandcap",MoveToPoint([918.1686]))

ActionOverride("Bandcap",Face(N))

MoveViewPoint([1029.1433],VERY_FAST)

ActionOverride(Player2,MoveToPoint([965.1349]))

ActionOverride(Player3,MoveToPoint([986.1456]))

ActionOverride(Player4,MoveToPoint([886.1371]))

ActionOverride(Player5,MoveToPoint([919.1433]))

ActionOverride(Player6,MoveToPoint([852.1445]))

MoveToPoint([1029.1433])

SmallWait(2)

DisplayStringHead("Raiken",104553) // Wait a moment! Don't you dare go anywhere!

Wait(1)

ActionOverride("Tazok",SetNumTimesTalkedTo(1))

ActionOverride("Tazok",Wait(1))

ActionOverride("Tazok",SmallWait(6))

ActionOverride("Tazok",MoveToPoint([1244.1347]))

Wait(2)

ActionOverride("Banditcr",Dialogue("Raiken"))

END

 

and Bancut02.bcs

 

IF

True()

THEN

RESPONSE #100

CutSceneId(Player1)

FadeToColor([20.0],0)

Wait(2)

AdvanceTime(8700)

ActionOverride("Teven",DestroySelf())

LeaveAreaLUAPanic("BG1900","trcarvan",[726.1444],NE)

LeaveAreaLUA("BG1900","trcarvan",[726.1444],NE)

ActionOverride(Player2,LeaveAreaLUA("BG1900","trcarvan",[612.1424],NE))

ActionOverride(Player3,LeaveAreaLUA("BG1900","trcarvan",[663.1518],NE))

ActionOverride(Player4,LeaveAreaLUA("BG1900","trcarvan",[500.1447],NE))

ActionOverride(Player5,LeaveAreaLUA("BG1900","trcarvan",[552.1542],NE))

ActionOverride(Player6,LeaveAreaLUA("BG1900","trcarvan",[440.1541],NE))

MultiPlayerSync()

ActionOverride("Viconia",SetDialog("VICONJ"))

Wait(1)

SetGlobal("BANDIT_MOVIE","BG1900",1)

StartMovie("CAMP")

CreateCreature("TEVEN",[806.1392],E) // Teven

CreateCreature("Bandit4",[362.1683],N) // Bandit

ActionOverride("Bandit4",ChangeAIScript("",RACE))

CreateCreature("Bandit2",[445.1719],N) // Bandit

ActionOverride("Bandit2",ChangeAIScript("",RACE))

CreateCreature("Bandcap",[375.1843],N) // Bandit

ActionOverride("Teven",SetNumTimesTalkedTo(1))

CreateCreature("TAZOK_",[1696.1238],S) // Tazok

MultiPlayerSync()

FadeFromColor([20.0],0)

ActionOverride("Banditcr",SetDialog("Bandct"))

ActionOverride("Banditcr",ChangeAIScript("WTARSGT",DEFAULT))

ActionOverride("Banditcr",JumpToPoint([1490.1442]))

ActionOverride("TEVEN",MoveToPoint([1095.1381]))

ActionOverride("Bandit4",MoveToPoint([668.1372]))

ActionOverride("Bandit4",Face(E))

ActionOverride("Bandit2",MoveToPoint([808.1554]))

ActionOverride("Bandit2",Face(NE))

ActionOverride("Bandcap",MoveToPoint([918.1686]))

ActionOverride("Bandcap",Face(N))

MoveViewPoint([1029.1433],VERY_FAST)

ActionOverride(Player2,MoveToPoint([965.1349]))

ActionOverride(Player3,MoveToPoint([986.1456]))

ActionOverride(Player4,MoveToPoint([886.1371]))

ActionOverride(Player5,MoveToPoint([919.1433]))

ActionOverride(Player6,MoveToPoint([852.1445]))

MoveToPoint([1029.1433])

SmallWait(2)

DisplayStringHead("Teven",104553) // Wait a moment! Don't you dare go anywhere!

Wait(1)

ActionOverride("Tazok",SetNumTimesTalkedTo(1))

ActionOverride("Tazok",Wait(1))

ActionOverride("Tazok",SmallWait(6))

ActionOverride("Tazok",MoveToPoint([1244.1347]))

Wait(2)

ActionOverride("Banditcr",Dialogue("Teven"))

END

 

 

 

It is really a rare case (if not the only in BG1) as a number of factors must come together a cutscene leading to a transportation scene leading directly into a dialogue in which one of the few candidates for the dialogue issue is involved. I stressed my memory fo a while but cannot remember another instance of those circumstances.

If those are rare and singular cases, they may simply be dealt with individually.

Link to comment

Archived

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

×
×
  • Create New...