Jump to content

[bg] A casual 200ish dialogue fixes


CamDawg

Recommended Posts

While I've got this all coded, I wanted to write it all out while I decide how to organize and integrate this into the existing fixes. I'll add a commit link when I do.

edit: committed

The broad strokes

BGEE dialogues suffer from three systematic problems, traceable back to their oBG roots:

  1. If a creature didn't have anything to say in the oBG engine, it would play one of their common selection sounds. In BG2 (and EEs) you get a 'X has nothing to say to you' error message.
  2. oBG didn't have LOCALS-scoped variables, so many dialogues rely on triggers that track how many times they've spoken (NumberOfTimesTalkedTo, or NTTT triggers)
  3. Most oBG creatures have special dialogues for when they're charmed

We've run into #1 a couple of times already (Oberan and Glanmarie or Tiax) and the general solution has been to simply copy in their common selection sounds into the dialogue proper to avoid the error message.

#2 isn't really a problem on its own, but combined with #3, it can potentially break a lot of stuff. Many quest NPCs give their quest the very first time you speak with them (when NTTT=0) with no way of coming back to it. So if your first dialogue with them is when they're charmed, you can never receive their quest since NTTT=1 (or more). Even when it's not a quest-giver, the initial dialogue is typically a longer introduction and the subsequent dialogues are either minimal (a simple greeting) or assume you received the information from the first time you spoke. I had fixed a handful of these in previous official patches (Garrick, Tranzig, Gandolorian) as they were reported.

So, I had some free time and thought I'd do a review of the BGEE charmed dialogues, thinking I'd turn up a handful of issues, spend a couple of hours fixing them, and go on my merry way. That was a week ago: I ended reviewing over 300 dialogue files and adding fixes for about 200.

Weighting

The first batch is easy: charmed dialogues need to be weighted more or less at the top of the dialogue stack, otherwise you would charm the creature and get one of their normal dialogues. Only a handful of things should be weighted higher, like post-cutscene dialogues or other high-priority dialogues. This affected about 100 dialogues:

Spoiler

alyth.dlg, amnis2.dlg, amnis4.dlg, bandct.dlg, bandic.dlg, beggba.dlg, bentan.dlg, boyba2.dlg, boyba3.dlg, boybe1.dlg, boybe2.dlg, brevli.dlg, dabron.dlg, druidc.dlg, farm2.dlg, farm5.dlg, farmbe.dlg, fcook2.dlg, fcook3.dlg, flam2.dlg, flam5.dlg, flam7.dlg, flam7.dlg, flam8.dlg, flam9.dlg, friend.dlg, friwen.dlg, ftowba.dlg, ftowbe.dlg, ftowfr.dlg, ftowna.dlg, gantol.dlg, girba1.dlg, girba2.dlg, girba3.dlg, greywo.dlg, haffg2.dlg, halffg.dlg, halfg2.dlg, halfg3.dlg, halfg4.dlg, halfg6.dlg, hobgo5.dlg, housg1.dlg, housg4.dlg, housg6.dlg, iron11.dlg, iron12.dlg, iron14.dlg, iron2.dlg, iron3.dlg, iron4.dlg, iron5.dlg, iron6.dlg, ironm4.dlg, kivanp.dlg, mcook2.dlg, mcook5.dlg, minern.dlg, minern.dlg, minern.dlg, monken.dlg, mtbe3.dlg, mtbe4.dlg, mtbe5.dlg, mtbe7.dlg, mtbe8.dlg, mtbe9.dlg, mtob2.dlg, mtob3.dlg, mtob4.dlg, mtob5.dlg, mtowf2.dlg, nemagreb.dlg, nobl10.dlg, nobl11.dlg, nobl12.dlg, nobl14.dlg, nobl2.dlg, nobl3.dlg, nobl5.dlg, nobl6.dlg, nobl7.dlg, nobl8.dlg, nobw2.dlg, nobw5.dlg, nobw6.dlg, nobw9.dlg, perdue.dlg, poghm7.dlg, prost3.dlg, prost5.dlg, prost7.dlg, prost8.dlg, pumberl.dlg, read3.dlg, rielta.dlg, servan.dlg, serwen.dlg, sil.dlg, smith.dlg, tiaxp.dlg, trave2.dlg, travel.dlg, viconi.dlg, viconp.dlg, xanp.dlg, yeslic.dlg

Preserving NumberOfTimesTalkedTo (NTTT) Triggers

For previous fixes, I had swapped out NTTT triggers for local variables. However, I found an easier way that required a lot fewer changes: if a dialogue has a NTTT=0 trigger, then have the charmed dialogue check if NTTT=0 and set NTTT=0 manually to prevent the counter from incrementing, and otherwise letting it increment normally. The upside is that triggers for all non-charmed dialogues are preserved (which makes life easier for mods) and eliminates the need for major script changes. This was done semi-automatically for about 170 dialogues:

Spoiler

aldeth.dlg, alora.dlg, alyth.dlg, amnis2.dlg, amnise.dlg, ardeno.dlg, bandct.dlg, bentan.dlg, boyba2.dlg, boyba3.dlg, boybe1.dlg, boybe2.dlg, branwe.dlg, brathl.dlg, brevli.dlg, brielb.dlg, brilla.dlg, centeo.dlg, charle.dlg, davaeo.dlg, deagan.dlg, delthy.dlg, dillar.dlg, drienn.dlg, druidc.dlg, drunk.dlg, dynahe.dlg, fahrin.dlg, faldor.dlg, farm3.dlg, farm5.dlg, farmbr.dlg, fcook2.dlg, fcook3.dlg, flam10.dlg, flam2.dlg, flam4.dlg, flam5.dlg, flam7.dlg, flam7.dlg, flam8.dlg, flam9.dlg, flambg.dlg, flamen.dlg, flamgg.dlg, friend.dlg, friwen.dlg, ftobe2.dlg, ftobe3.dlg, ftobe4.dlg, ftobe5.dlg, ftobe6.dlg, ftobe7.dlg, ftobe8.dlg, ftowb6.dlg, ftowb7.dlg, ftown2.dlg, gallor.dlg, gantol.dlg, girba1.dlg, girba2.dlg, girba3.dlg, glanma.dlg, haffg2.dlg, halfen.dlg, halffg.dlg, halfg2.dlg, halfg3.dlg, halfg4.dlg, halfg5.dlg, halfg6.dlg, halftr.dlg, hobgo5.dlg, housen.dlg, housg1.dlg, housg3.dlg, housg4.dlg, housg6.dlg, hunter.dlg, iron11.dlg, iron12.dlg, iron14.dlg, iron3.dlg, iron4.dlg, iron5.dlg, iron6.dlg, ironm2.dlg, ironm3.dlg, ironm4.dlg, ithtyl.dlg, jebado.dlg, jhasso.dlg, landri.dlg, laurel.dlg, lena.dlg, lobar.dlg, marl.dlg, mcook2.dlg, mcook3.dlg, mcook5.dlg, minec5.dlg, minern.dlg, monken.dlg, mtbe10.dlg, mtbe11.dlg, mtbe3.dlg, mtbe4.dlg, mtbe5.dlg, mtbe9.dlg, mtob2.dlg, mtob3.dlg, mtob4.dlg, mtob5.dlg, mtob7.dlg, mtob8.dlg, mtob9.dlg, mtowf2.dlg, mtown2.dlg, niklos.dlg, nila.dlg, nobl10.dlg, nobl11.dlg, nobl12.dlg, nobl14.dlg, nobl4.dlg, nobl5.dlg, nobl6.dlg, nobl7.dlg, nobl8.dlg, nobw5.dlg, nobw9.dlg, oberan.dlg, oublek.dlg, perdue.dlg, poe.dlg, poghm4.dlg, prat.dlg, prost7.dlg, prost8.dlg, quayle.dlg, ragefa.dlg, raiken.dlg, ramazi.dlg, read4.dlg, rielta.dlg, safana.dlg, safana.dlg, seniya.dlg, serva2.dlg, servan.dlg, serwen.dlg, sewerc.dlg, sil.dlg, silenc.dlg, skie.dlg, smith.dlg, smuggl.dlg, sonner.dlg, telman.dlg, tenya.dlg, teven.dlg, thalan.dlg, thaldo.dlg, tiax.dlg, torlob.dlg, trave2.dlg, travel.dlg, viconi.dlg, volose.dlg, wilton.dlg, xzar.dlg, yago.dlg, yeslic.dlg

Fixing 'X has nothing to say to you'

While this wasn't a focus of the review, I found about 50 of these anyway and fixed them. The creature's common selection sounds were added to their dialogue as a base state, similar to the existing fixes for Tiax et al.

Spoiler

boyba2.dlg, boybe1.dlg, boybe2.dlg, brilla.dlg, dillar.dlg, farm3.dlg, fcook2.dlg, fcook3.dlg, flam10.dlg, flam2.dlg, flam7.dlg, flam8.dlg, flam9.dlg, flambg.dlg, flamgg.dlg, ftobe7.dlg, ftowb4.dlg, ftowb6.dlg, ftowb7.dlg, girba1.dlg, haffg2.dlg, halfg5.dlg, housg1.dlg, housg2.dlg, housg3.dlg, housg4.dlg, hunter.dlg, iron3.dlg, ironm3.dlg, ironm4.dlg, jhasso.dlg, mtbe10.dlg, mtbe11.dlg, mtbe2.dlg, mtbe3.dlg, mtbe4.dlg, mtbe8.dlg, mtob3.dlg, mtob4.dlg, mtob5.dlg, mtob7.dlg, mtob8.dlg, mtob9.dlg, mtown2.dlg, nobl12.dlg, nobw3.dlg, nobw5.dlg, nobw9.dlg, poe.dlg, prost7.dlg, prost8.dlg, rededg.dlg, serva2.dlg, serwen.dlg, trave2.dlg, volose.dlg

Additional fixes

In the course of reviewing these, I found other errors in the dialogues to be fixed:

  • Zelma (SoD) can be charmed to get your money back. In the gap between getting it back and the charm wearing off, she had nothing to say. (bdzelma.dlg)
  • Be'land's charmed dialogue says you can enjoy the museum for free, but was not setting the variable to stop him from soliciting the entrance fee once the charm expired (beland.dlg)
  • Multiple charmed dialogues could re-open journal entries for completed quests: Brandilar - Investigating the Merchants' League Estate (brandi.dlg), Flaming Fist Enforcer - Afoul of the Law (ffhunt.dlg), Harbor Master - Investigating the Iron Throne (harbor.dlg), two Beregost commoners - The Wizard's School (mtbe2.dlg, mtbe6.dlg)
  • Delainy/Durlyle have two dialogues, one for their appearance in the village and a second one if they help you escape. The first one had a charmed dialogue that would reveal the secret of the village too early and has been disabled. The same charmed dialogue is still available in their second appearance where it's appropriate. (delainy1.dlg, durlyle1.dlg)
  • The Flaming Fist Enforcer hassling the party south of Beregost has two flunkies. If he peacefully leaves, they should leave with him. (flam5.dlg)
  • One of the commoners in Beregost (ar3316) calls the guards, but no guards were actually appearing. (ftobe4.dlg)
  • Several charmed dialogues have the charmed NPC giving the party something. In most of them, they would check to make sure they had the item in question first, but two were missed. (ftobe5.dlg, nobl8.dlg)
  • A few dialogues would blindly hand off dialogue to another NPC nearby without bothering to check if that NPC was actually available for dialogue, e.g. Marl and Dunkin, Helshara and Ithmeera, and others. This would cause the dialogue to exit abruptly on a 'Continue' button. Appropriate checks have been added, and the dialogue now cleanly exits. (helsha.dlg, ithmee.dlg, housg1.dlg, marl.bcs, marl.dlg, mtown2.dlg, nobl4.dlg)
  • If Hentold gives the party his dagger while charmed, his normal dialogue would assume he still had it and he'd continue to try and give it to you. These dialogues now check if he has the dagger first. (hentol.dlg)
  • One of the shared dialogues for Nashkel commoners has 13 random replies. However, one of them is closed when the Brage quest ends, giving a 1/13 chance of 'X has nothing to say'. One of the other 12 lines will now appear under this circumstance. (mtowna.dlg)
  • The six diggers at the archaeological site all share one common dialogue, and have the 'X has nothing to say' bug. This couldn't be fixed the conventional way (grabbing common selection sounds) because they have different soundsets. In addition, they have five lines that play in sequence based off of NTTT triggers. This means that if you speak to each miner, you'll get the same line six times and will only see the other lines if you speak to one of them five times. To address both if these, these five lines are weighted randomly so that they'll always have something to say, and to make it substantially less obvious that they're using the same dialogue. (digger.dlg)
  • Several commoners in BG use a shared dialogue; prior to chapter seven there are nine possible lines. Once chapter seven hits, they change to three, but they all have the same trigger so only one could play. Based on other commoner dialogues and the lines themselves, it looks like these three lines should depend on the party reputation, and the appropriate triggers have been added. (ftowba.dlg)
  • The shared, generic Nashkel miner dialogues had two lines for the miners outside before you speak to Emerson, but they were weighted so low you could never see them (minern.dlg)

Other changes

  • Given that dialogues could now preserve NTTT values, a few scripts had to be adjusted to check if the creature was charmed before trying to initiate dialogue, otherwise script loops could occur. (alora.bcs, bandic.bcs, centeol.bcs, davaeorn.bcs, flam2.bcs, flam7.bcs, initdlg.bcs, marl.bcs, monken.bcs, prat.bcs, ramazith.bcs, rieltar.bcs, shoutdlg.bcs, sil.bcs, yago.bcs)
  • A few creatures needed script names assigned to facilitate other fixes. (farm4.cre, housg1.cre, housg2.cre)
  • A few creatures had unique dialogues available, but not assigned. (ftobe7.cre, mtob4.cre, mtob5.cre, read4.cre)

Unfinished business

Pinging @AstroBryGuy for this section. Outside of the creatures being assigned their dialogues (last bullet in previous section) none of the following are being included in EEFP. It's been a while since I delved into BG1UB so apologies if these are already known and/or implemented:

  • There's dialogue for an unused server, friwen.dlg, who should be at the FAI. The creature friwen.cre is assigned the BG-appropriate serwen.dlg and appears in the Elfsong and Blushing Mermaid, despite an unused serwen.cre being available. Suggest that friwen.cre and serwen.cre get assigned their namesake dialogues, swap the friwen.cre at the Blushing Mermaid and Elfsong for serwen.cre, and add friwen.cre to the FAI.
  • ssungu.dlg appears to be a dialogue for a guard outside the Seven Suns. You can ask for Jhasso and possibly get moved to a basement where the guard is commanded by Jhasso-doppleganger to kill the party. I think.
  • volose.cre is a serving wench who appears after Volo leaves, trying to get the party to pay Volo's tab since Volo skipped paying. She can potentially turn the bouncer hostile.
  • wilton.dlg appears to be someone who appears after you help Farmer Brun, and gives you a Cloak of Displacement as a reward.
  • banmer.dlg appears to be a merchant who gets attacked by the party. The party is posing as bandits (seems to be part of getting accepted into the bandit group to reach the bandit camp) and you can peacefully "rob" the merchants, or actually do it.
  • mtob6.dlg is a commoner who's gambling, who seems to trip a warning global to... do something.
  • Galteran (mtbe6,cre using mtbe6.dlg) seems to have an unassigned script (mtowbe6.bcs) where he will call the guards or attack after a brief interlude.
  • mtob4.cre and mtob5.cre had their unique dialogues assigned (last bullet point in previous section) but the creature files themselves are unused. From the dialogue, mtob4.cre should be placed alone in a room at the Splurging Sturgeon, and motb5.cre placed somewhere in the Elfsong.
Edited by CamDawg
added minern.dlg fix; added mtob4.cre and mtob5.cre UB stuff
Link to comment

Very cool stuff. I admit I noticed some of the charmed dialogues having no weight but didn't care enough about it.

6 hours ago, CamDawg said:
  • A few creatures needed script names assigned to facilitate other fixes. (farm4.cre, housg1.cre, housg2.cre)
  • A few creatures had unique dialogues available, but not assigned. (ftobe7.cre, mtob4.cre, mtob5.cre, read4.cre)

Humbly asking to report it to the list for Unified cre patching in mods if the changes aren't already included.

 

Link to comment
7 hours ago, CamDawg said:

Unfinished business

Pinging @AstroBryGuy for this section. Outside of the creatures being assigned their dialogues (last bullet in previous section) none of the following are being included in EEFP. It's been a while since I delved into BG1UB so apologies if these are already known and/or implemented:

  • There's dialogue for an unused server, friwen.dlg, who should be at the FAI. The creature friwen.cre is assigned the BG-appropriate serwen.dlg and appears in the Elfsong and Blushing Mermaid, despite an unused serwen.cre being available. Suggest that friwen.cre and serwen.cre get assigned their namesake dialogues, swap the friwen.cre at the Blushing Mermaid and Elfsong for serwen.cre, and add friwen.cre to the FAI.
  • ssungu.dlg appears to be a dialogue for a guard outside the Seven Suns. You can ask for Jhasso and possibly get moved to a basement where the guard is commanded by Jhasso-doppleganger to kill the party. I think.
  • volose.cre is a serving wench who appears after Volo leaves, trying to get the party to pay Volo's tab since Volo skipped paying. She can potentially turn the bouncer hostile.
  • wilton.dlg appears to be someone who appears after you help Farmer Brun, and gives you a Cloak of Displacement as a reward.
  • banmer.dlg appears to be a merchant who gets attacked by the party. The party is posing as bandits (seems to be part of getting accepted into the bandit group to reach the bandit camp) and you can peacefully "rob" the merchants, or actually do it.
  • mtob6.dlg is a commoner who's gambling, who seems to trip a warning global to... do something.
  • Galteran (mtbe6,cre using mtbe6.dlg) seems to have an unassigned script (mtowbe6.bcs) where he will call the guards or attack after a brief interlude.

First of all, respect for all this hard work!

I hope you don't mind me grabbing the unfinished business stuff for my own restorations mod as well. ^^

By the way, I know for a fact that BG1UB already restores wilton.dlg.

Link to comment
4 hours ago, jastey said:

Humbly asking to report it to the list for Unified cre patching in mods if the changes aren't already included.

Thanks, and done!

3 hours ago, Angel said:

I hope you don't mind me grabbing the unfinished business stuff for my own restorations mod as well. ^^

By all means. However I forgot to include the mtob4 and motb5 creatures, which I've added to the original post. EEFP assigns those dialogues to the creature files, but the creature files themselves are unused.

Link to comment

I don't know if the following is relevant, but mentioning something I've recently experienced, in case it is (and apologies for the noise if it isn't):

  1. Start SoD, and get across the chasm, to face the first battle.
  2. Find Porios, who gives his threatening speech. If Player1 doesn't have the right stats, he goes through state 11/response 40 in the dialog, which triggers Enemy(), so the next battle happens.
  3. Charm Porios during the battle (e.g. Safana's kiss), and attempt to find if he has some BG1-style charmed dialog by force-talking him.
  4. He doesn't, so the charmed state breaks because it triggers Enemy() again. :)

This is no biggie, but it's certainly not polished. And I have not seen a duplicated journal entry, but the same action that has the Enemy() it also has a AddJournalEntry(). I wonder if this is worth considering, given that I imagine is not easy to fix without going case by case?

Link to comment

Hello, Cam!

This fix:

// tbd, cam
// disable silke's chap-7-specific dialogue that implies she's at the coronation, when she's still in beregost
ADD_TRANS_TRIGGER silke 12 ~False()~ DO 0 // leads to silke dialogue about a 'wondrous party'
ADD_TRANS_TRIGGER silke 17 ~False()~ DO 2 // reply mentions you're there to save the dukes

is really necessary, considering State 12 and 17 have Global("Chapter","GLOBAL",7) as state trigger?

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