Jump to content


Photo

Jaheira stutter bug


  • Please log in to reply
19 replies to this topic

#1 Azaghal

Azaghal
  • Member
  • 67 posts

Posted 08 October 2022 - 12:10 PM

Hello everybody,

 

in my current BGT-Megamod installation I have a problem with Jaheira in SoA (Atkathla, quite early in the game). She stops constantly and my SC turns to her as if to start conversation, but nothing happens. Giving new movement orders to both works, but situation repeats shortly afterward. Also often get the message that I cannot save in dialogue mode (while I'm not talking to anybody actually).

I understand that probably one of Jaheira's variables has to be changed manually to proceed. But which one?

Looked into her CRE-file in the latest save with the help of NI. There's currently 13 effects named "Set Local Variable 187" active with differing values (most of them =1).

What am I to do?

 

Thanks for your help

 

Azaghal



#2 jastey

jastey
  • Administrator
  • 3219 posts

Posted 08 October 2022 - 01:11 PM

Install the Stutter Debug Tool. Load your save with the stutter and note down which scripts and which script block is looping. Look up the script and script block with Near Infininty and post it here for more help.



#3 Azaghal

Azaghal
  • Member
  • 67 posts

Posted 09 October 2022 - 01:25 AM

Installed the stutter debug tool, started the game with the latest save and it showed "block 4 of JAHEIRA.BCS" as looping script.

Then I looked into JAHEIRA.BCS with NI and this is what I found in line 4 (highlighted in red):

 

IF
    Global("AranLove","GLOBAL",12)
    Global("AranJaheiraTalk1","GLOBAL",0)
    See(Player1)
    InParty(Myself)
    !InParty("Anomen")  // Anomen
    !InParty("Rasaad")
    !StateCheck(Myself,CD_STATE_NOTVALID)
    CombatCounter(0)
THEN
    RESPONSE #100
        DisplayStringHead(Myself,1067608)  // Running block 1 of JAHEIRA.BCS
        ActionOverride(Myself,StartDialogueNoSet(Player1))
END

 

Since I have neither met Aran yet nor have I Anomen or Rasaad (from BGEE I guess?) in my group this is odd. So I assume I did understand it wrong and block might mean paragraph/section (sorry, English is not my first language) - not line.

Then block 4 contains this:

 

IF
    Global("ANMyrain","GLOBAL",2)
    See(Player1)
    InParty(Myself)
    !Dead("Jaheira")  // Jaheira
    CombatCounter(0)
    AreaType(OUTDOOR)
    AreaType(CITY)
THEN
    RESPONSE #100
        DisplayStringHead(Myself,1067611)  // Running block 4 of JAHEIRA.BCS
        StartDialog("JAHEIRAJ",Player1)
        Weather(RAIN)
END

 

Looks more fitting.

 

But I need your help to explain what to do about the loop.

 

Thank you

 

Azaghal



#4 jastey

jastey
  • Administrator
  • 3219 posts

Posted 09 October 2022 - 02:17 AM

Yes, it's not the line number, but the script block 4 (or, to be precise, the 4th "RESPONSE #" in the script). Hmm, the Global("ANMyrain","GLOBAL",2) doesn't ring a bell, I don't know which mod it's from. [On an unrelated note, I don't like the "StartDialog("JAHEIRAJ",Player1)" because it sets her dlg to "JAHEIRAJ" which is ok in SoA but it's still not a good way to script this.] Or are you in ToB?

Can you search in NI for Global("ANMyrain","GLOBAL",2) through the dlg files?



#5 Azaghal

Azaghal
  • Member
  • 67 posts

Posted 09 October 2022 - 03:06 AM

I'm not in ToB, but in Athkathla.

Was looking into the dlg files with NI, but there's no such thing as AnMyrain (ANMOD.dlg is followed by ANNO1.dlg in the list).

Is it possible to set the variable to 3 to proceed with the script?

 

Azaghal



#6 jastey

jastey
  • Administrator
  • 3219 posts

Posted 09 October 2022 - 03:17 AM

Is it possible to set the variable to 3 to proceed with the script?


That would stop this stutter, but I am not sure what else it would trigger.

 

What I meant is search the content of the dlg files for the string "Global("ANMyrain","GLOBAL",2)". For this, open the rider "Search" -> "Text Search" -> chose "DLG", enter the search term and hit the search button. You could also search both dlg and bcs for Global("ANMyrain","GLOBAL",3) to see whether there might be any follow-ups if you set it via cheats.

 

I'd be really interested where this comes from, the scripting is less than optimal. Could you search through your mod files for the string, too? I am using grepWin for such instances.



#7 TotoR

TotoR
  • Modder
  • 105 posts

Posted 09 October 2022 - 03:19 AM

Hi, Don't know if this block is the culpit but FWIW, the 'An' prefix is from HTaM and the file that create this block is jaheira1.baf (https://github.com/A...aheira1.baf#L32) Maybe @Austin know what to do ?

#8 jastey

jastey
  • Administrator
  • 3219 posts

Posted 09 October 2022 - 03:27 AM

Thanks for the info, TotoR!



#9 jastey

jastey
  • Administrator
  • 3219 posts

Posted 09 October 2022 - 03:35 AM

Hmm, this is scripted unfortunately. The dialogue has an additional trigger, I assume it's set to something else for you. This is what is patched to JaheiraJ:

 

APPEND_EARLY JAHEIRAJ
(...)

IF ~Global("ANMyrain", "GLOBAL", 2) !InParty("Minsc") !Global("ShadowWork","GLOBAL",0)~ THEN BEGIN jaheirarain
SAY @150
IF ~~ THEN DO ~SetGlobal ("ANMyrain", "GLOBAL", 3)~ EXIT
END
END


The "!InParty("Minsc")" is ok because Minsc has a dialogue about rain, too. But the "!Global("ShadowWork","GLOBAL",0)" wasn't checked in the script block so I guess it's the reason this dialogue can't be called.

 

As a qucik fix, as far as I can see, setting "CLUAConsole:SetGlobal("ANMyrain","GLOBAL",3)" will shut down the stutter and only rob you of a dialogue with Jaheira about rain.

 

EDIT: bug report filed.



#10 Azaghal

Azaghal
  • Member
  • 67 posts

Posted 09 October 2022 - 03:45 AM

I have HTaM installed so that's possible.

There was no hit searching the DLG.

I will try your quickfix. Conversations about rain don't sound overly important.

 

Azaghal



#11 jastey

jastey
  • Administrator
  • 3219 posts

Posted 09 October 2022 - 03:47 AM

There was no hit searching the DLG.


It should have given a hit in JaheiraJ and MinscJ. Maybe it's because it was written with spaces in between.

 

Conversations about rain don't sound overly important.


:P Sometimes it's the start of something very romantic!!1



#12 jastey

jastey
  • Administrator
  • 3219 posts

Posted 09 October 2022 - 03:49 AM

Just out of curiosity: what is "Global("ShadowWork","GLOBAL")" set to in your save?



#13 Azaghal

Azaghal
  • Member
  • 67 posts

Posted 09 October 2022 - 05:11 AM

The quickfix helped. No more stuttering and no smalltalk about rain either, romantic or not :rolleyes:.

 The ShadowWork global is =1.

 

Thank you, ever helpful jastey!

 

Azaghal



#14 jastey

jastey
  • Administrator
  • 3219 posts

Posted 09 October 2022 - 05:52 AM

My pleasure! We're not done yet, if you would spare the time.

 

The ShadowWork global is =1.


Hmm, which is not 0, so that wasn't the case for the stutter... that's odd. Then we seem to have identified the stuttering script file but I don't know why it is stuttering.

- Would you make a search for just 

 

"ANMyrain"

 

with NI in the DLG files as described above and see whether you get any hits in any dlg file? I have a slight suspicion the according dialogue might not have been compiled for you. Alternatively, you could decompile the jaheiraj.dlg and attach it here?



#15 Azaghal

Azaghal
  • Member
  • 67 posts

Posted 09 October 2022 - 10:13 AM

Ok. Attached the result of the search for ANMyrain in the DLG files. 6 hits. About rain. What mod is this from? I can't remember any conversation about rain from my many, many modded BGT playthroughs.

 

Soakenwet greetings

 

Azaghal

 

 

 

 

Attached Files



#16 jastey

jastey
  • Administrator
  • 3219 posts

Posted 09 October 2022 - 10:57 PM

Thank you! This means the files were compiled alright.

Minsc is not in your party, is he?

I don't undertand why this led to a stutter. :crying: But I fear it will be Austin's problem...

The dialogue is from the Hero, Thieves, and Moneylenders mod.



#17 Azaghal

Azaghal
  • Member
  • 67 posts

Posted 10 October 2022 - 12:41 AM

Actually Minsc is present. Hope this doesn't add to the confusion....

So, HTaM it is (as already stated above :doh: ). That's indeed a new mod to my install list.

Let's see what the author makes of this.

 

Thanks again

 

Azaghal



#18 jastey

jastey
  • Administrator
  • 3219 posts

Posted 10 October 2022 - 03:58 AM

Well, at least it explains why Jaheira's comment didn't show. Question for Austin is why Minsc didn't give his comment then Thanks for the info!

#19 Austin

Austin
  • Modder
  • 95 posts

Posted 31 October 2022 - 07:50 AM

Thank you very much for reporting the problem! To be honest, this "rain" script and dialogue was the first thing I did when I was learning to code and started working on this mod. So I took as a sample a code snippet from some other mod where such commands were used.

This dialogue is made in such a way that either Minsc starts it (and then Jaheira and/or Korgan answers him), or Jaheira (if Minsc is not in the party).

 

Now I see that this first code of mine was quite clumsy :( I'll fix it in the next update.


Edited by Austin, 31 October 2022 - 08:08 AM.


#20 Austin

Austin
  • Modder
  • 95 posts

Posted 31 October 2022 - 10:49 AM

I updated the HTaM mod, this bug should not be more. The script and dialog code has been completely redesigned. Other bugs found in the last six months have also been fixed and new content has been added.

https://www.gibberli...d-moneylenders/