Author Topic: Bug in the Dialogue Restoration component  (Read 3054 times)

ZFR77

  • Guest
Bug in the Dialogue Restoration component
« on: January 01, 2012, 10:51:52 AM »
It appears there is a small bug in the FTOBE5 dialogue. UB did some minor restorations to her dialogue.

She's the lady in the house next to Jovial Juggler that summons her Flaming Fist husband if talked to repeatedly.

She nevers summons him now. The reason is that her second (and third) line of dialogue has the conditions:
Code: [Select]
StateCheck(Myself,STATE_NORMAL)
NumTimesTalkedTo(1)

StateCheck(Myself,STATE_NORMAL) seems to be the culprit. I presume it was put there to prevent her summoning her husband while being charmed, but now because of the bug she never summons him.

Offline jastey

  • Moderator
  • Planewalker
  • *****
  • Posts: 1136
  • Gender: Female
Re: Bug in the Dialogue Restoration component
« Reply #1 on: January 01, 2012, 05:37:22 PM »
This is not BG1UB. The changes to the dialogue concens the charmed dialogue. BG1UB introduces a check whether she has the ring she is talking about, and makes her give it to the PC.

Could it be you have other mods installed? What platform are you on (Tutu, BGT)?

The ftobe5.dlg with BG1UB installed looks like this (Bg1+TotSC, no other mods installed). The only difference to the original dialogue is in state no 4.

Code: [Select]
// creator  : weidu (version 22900)
// argument : FTOBE5.DLG
// game : .
// source : ./override/FTOBE5.DLG
// dialog : ./dialog.tlk
// dialogF  : (none)

BEGIN ~FTOBE5~
//////////////////////////////////////////////////
// WARNING: this file contains non-trivial WEIGHTs
//////////////////////////////////////////////////

IF WEIGHT #1 /* Triggers after states #: 4 even though they appear after this state */
~NumTimesTalkedTo(0)
ReactionGT(LastTalkedToBy(),NEUTRAL_UPPER)
~ THEN BEGIN 0 // from:
  SAY #8142 /* ~Well, hello there.  I fear you have....um...."mistaken".... my unlocked door as an invitation to enter.  Forgive me if this was misleading, as it was not my intent to allow entry to just any stranger off the street.  Please accept my.....apologies, but I should appreciate it if you would leave.  Mine husband is one of the guards and I should think he would be perturbed if there were people milling about his house when he got home.  ~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #2 /* Triggers after states #: 4 even though they appear after this state */
~NumTimesTalkedTo(0)
ReactionLT(LastTalkedToBy(),FRIENDLY_LOWER)
ReactionGT(LastTalkedToBy(),HOSTILE_UPPER)
~ THEN BEGIN 1 // from:
  SAY #8143 /* ~I should not like to appear rude, but you have entered mine house without permission.  I hardly think merely having an unlocked door is an invitation.  Leave, lest my husband extricate you himself when he returns from guard duty.  ~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #3 /* Triggers after states #: 4 even though they appear after this state */
~NumTimesTalkedTo(0)
ReactionLT(LastTalkedToBy(),NEUTRAL_LOWER)
~ THEN BEGIN 2 // from:
  SAY #8144 /* ~You must be a considerable fool to enter this house uninvited.  Best that you should leave, because if I call the guard there is a good chance my husband will be with them.  No doubt he would expel you from his own house with....extra vigor.   ~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #4 /* Triggers after states #: 4 even though they appear after this state */
~NumTimesTalkedTo(1)
~ THEN BEGIN 3 // from:
  SAY #8145 /* ~My husband should be here soon; I would suggest that you leave.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #0 ~StateCheck(Myself,8192)
HasItem("RING01",Myself)
~ THEN BEGIN 4 // from:
  SAY #8146 /* ~I wish I could run away with you darling, but my husband can be such a jealous man.  I wouldn't want to arouse his wrath.  Take this ring, with which you may always remember me.~ */
  IF ~~ THEN DO ~GiveItem("RING01",LastTalkedToBy)
~ EXIT
END

IF ~~ THEN BEGIN 5 // from:
  SAY #9063 /* ~Get away from me!~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #5 ~NumTimesTalkedTo(2)
~ THEN BEGIN 6 // from:
  SAY #15755 /* ~I told you my husband would be here!~ */
  IF ~~ THEN DO ~CreateCreature("FLAMHUSB",[490.458])
~ EXIT
END


ZFR77

  • Guest
Re: Bug in the Dialogue Restoration component
« Reply #2 on: January 02, 2012, 04:03:32 AM »
Your are right of course. I just assumed it's UB, since it's the only mod that changed this file...

I turned out, that the real culprit is Dudley Fix pack (http://forgottenwars.com/dudleyfix/bg1_scripts.htm)

Quote
FTOBE5.DLG, DIALOG.TLK string 1250* Dialog Error

    Commoner, AR3327 - when charmed the commoner fails to give the ring she says she is giving you. No specific ring is mentioned in the original dialogue so I suggest a Gold Ring which would seem in keeping with her spellbound love. The dialogue fix should only allow her to offer the gift once.
        Add trigger in [State 3] StateCheck(Myself,STATE_NORMAL).
        Add trigger in [State 4] Global("DXFtobe5","GLOBAL",0).
        Add actions in [State 4] GiveItemCreate("RING10",LastTalkedToBy()) and SetGlobal("DXFtobe5","GLOBAL",1).
        Add trigger in [State 6] StateCheck(Myself,STATE_NORMAL).
        Edit [State trigger 5] to read StateCheck(Myself,STATE_CHARMED) Global("DXFtobe5","GLOBAL",1).
        Create new string 1250 "Is there anything else I can do to please you?"
        Change Response in [State 5] to StringRef 1250.
        Re-order State triggers as follows: Charmed (Global 0) then (Global 1), NumTimesTalked To (0) as original sequence, Normal (Num1) then (Num2); this is order 4, 5, 0, 1, 2, 3, 6.


Some fixes overlap, and in this case, the fixpack introduced this bug. This also explains why I get 2 rings from her as well as from another charmed Noble (one ring added by the fixpack, another by UB).

Can anyone tell me then whether the fixpack is needed at all? Are all the fixed already introduced in UB? I can't find any contact information on the forgottenwars webiste, other than a link to PocketPlane...


Offline jastey

  • Moderator
  • Planewalker
  • *****
  • Posts: 1136
  • Gender: Female
Re: Bug in the Dialogue Restoration component
« Reply #3 on: January 02, 2012, 07:53:27 AM »
Thank you for the heads up. It seems a check whether the Dudley fix is already installed would be appropriate here to prevent doubling!

I would say it is a good thing to have a fixpack, yes. I am not sure the Dudley Fixpack gets updated. The fix would be easy by changing the check for STATE_NORMAL which for some reason isn't working in your game with a check for "not STATE_CHARMED", i.e. ~!StateCheck(Myself,STATE_CHARMED)~.

There is also one in the make at G3: http://forums.gibberlings3.net/index.php?showtopic=9019
I don't know which status it is in currently but usually people are very, very happy if they have people who playtest. (winkwink).

Thank you for reporting! It's a huge help to get the mods less buggy.

ZFR77

  • Guest
Re: Bug in the Dialogue Restoration component
« Reply #4 on: January 02, 2012, 09:54:04 AM »
Thanks jatsey!

I just removed that line completely. Figured that after all, it's not her summoning her husband, but rather her husband is returning from work. So his coming back home should be done regardless whether she's charmed or not.

The only small problem is that now if you talk to her while she is charmed exactly the third time, her charmed dialogue will take place instead of the one that spans her husband, so her husband will never appear in this case. This could be solved by adding a separate counter for example, or it could be left as it is, after all her husband might be working late...

I also found that this file is the only file that uses STATE_NORMAL. Not sure whether it's just my machine or not... STATE_CHARMED works correctly.

ZFR77

  • Guest
Re: Bug in the Dialogue Restoration component
« Reply #5 on: January 02, 2012, 09:55:33 AM »
^jastey!

Sorry for the typo  :-[, and I can't edit my post as a guest.

Offline jastey

  • Moderator
  • Planewalker
  • *****
  • Posts: 1136
  • Gender: Female
Re: Bug in the Dialogue Restoration component
« Reply #6 on: January 02, 2012, 10:10:29 AM »
The only small problem is that now if you talk to her while she is charmed exactly the third time, her charmed dialogue will take place instead of the one that spans her husband, so her husband will never appear in this case. This could be solved by adding a separate counter for example, or it could be left as it is, after all her husband might be working late...
The thing is that this isn't solved by adding the STATE_NORMAL check - still the player could click her the third time while she is charmed, and the dialogue with summoning the husband would still not work afterwards. That, or I don't understand the logic..

And no worries about the typo! I wouldn't have spot it, tbh  :)

ZFR77

  • Guest
Re: Bug in the Dialogue Restoration component
« Reply #7 on: January 02, 2012, 10:58:37 AM »
The only small problem is that now if you talk to her while she is charmed exactly the third time, her charmed dialogue will take place instead of the one that spans her husband, so her husband will never appear in this case. This could be solved by adding a separate counter for example, or it could be left as it is, after all her husband might be working late...
The thing is that this isn't solved by adding the STATE_NORMAL check - still the player could click her the third time while she is charmed, and the dialogue with summoning the husband would still not work afterwards. That, or I don't understand the logic..

Precisely, that's my point. This has to be solved separately... :)

I didn't mean that removing STATE_NORMAL introduced this problem, I just wanted to point out that it's there.

Offline jastey

  • Moderator
  • Planewalker
  • *****
  • Posts: 1136
  • Gender: Female
Re: Bug in the Dialogue Restoration component
« Reply #8 on: January 02, 2012, 11:01:40 AM »
I didn't mean that removing STATE_NORMAL introduced this problem, I just wanted to point out that it's there.
I understood, and I meant that introducing it wouldn't solve it, either (assuming it worked as intended).

I will tweak BG1UB so only one ring will be given, but I am afraid that's all I can do from here. Thank you again, and post anything you notice while playing with BG1UB (or the other BG1 mods you have in your install)!

Offline jastey

  • Moderator
  • Planewalker
  • *****
  • Posts: 1136
  • Gender: Female
Re: Bug in the Dialogue Restoration component
« Reply #9 on: July 03, 2014, 08:41:14 AM »
To my shame I just noticed I never finished implementing this. Next version will have the compatibility with Dudleyville fix for FTOBE5 (only one ring will be given).

Quote
This also explains why I get 2 rings from her as well as from another charmed Noble (one ring added by the fixpack, another by UB).

ZFR77: I know this is a really long time, but do you remember which other noble that the noble woman gives two rings for Dudleyville and UB installed?

ZFR77

  • Guest
Re: Bug in the Dialogue Restoration component
« Reply #10 on: July 03, 2014, 09:43:29 AM »
I still haven't completed this game so I should be able to find it if I go through my save games. I'll take a look when I get home today evening.

ZFR77

  • Guest
Re: Bug in the Dialogue Restoration component
« Reply #11 on: July 03, 2014, 02:41:54 PM »
Found it. It's not rings actually.

Nobl10 gives you a "trinket" when charmed. Dudleyville fixpack adds a sunstone gem, while UB adds an amulet. You get both with both installed.

ZFR77

  • Guest
Re: Bug in the Dialogue Restoration component
« Reply #12 on: July 03, 2014, 03:08:50 PM »
There is also Nobl11 in Lower lantern, who if charmed feels so generous he gives you 10gp twice. Again it seems Dudlefix/UB overlap.


Offline jastey

  • Moderator
  • Planewalker
  • *****
  • Posts: 1136
  • Gender: Female
Re: Bug in the Dialogue Restoration component
« Reply #13 on: July 03, 2014, 03:42:40 PM »
Thank you very much! Keep them coming!

-This turns out to be a can of worms, btw. For BGT, all those instances are fixed, too...

EDIT: All three instances will be fixed for the relevant installs (BG, BGT) in the next version. Thank you for pointing it out!
« Last Edit: July 05, 2014, 05:02:04 AM by jastey »

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: