Jump to content

[b7] Cleric quests broken, other minor bug


Recommended Posts

So, this is a pretty hefty issue caused by amalgamate_class_checks.tpa I believe (I was looking at it to see what I would have to change to let the player go around as Druid/Mage on BG2:ToB, and it made me realise that it was the culprit for these issues), but since I also have Multiple Strongholds (but class specific, and I am playing a Paladin, however I still got the reward from the Sir Sarles quest as if I was a Cleric) from Tweaks Anthology installed, so there might be compatibility issues. So far, the actual issues are:

  • Oisig does not teleport back to the Temple of Helm after he talks to you about the Unseeing Eye. This breaks the Sir Sarles quest completion. Console hotfix below.
  • The other high-priests do not show up inside their own temples either, possibly breaking the turn in for that same quest as well.

These two bugs are caused by the patches to their specific area scripts.

  • The player class checks for accepting the Ring of Lathander quest on two dialogue options that are supposed to be the fallback ones, they currently check if the player is a Druid via spell states. I don't think amalgamate_class_checks.tpa causes this one, nor I know what causes it at all. Can be hotfixed by removing the Druid check from responses triggers 13 and 14 (those should not be there at all).

This bug is caused by the multi-class Druids component, those checks should not be getting modified at all since they're fallback choices.

  • Non-Cleric classes receive rewards and follow-up quests as if they were Clerics, even if not elegible for the Stronghold (might be intended).

This is again, caused by amalgamate_class_checks.tpa, which seems to be run under the "Revised specialty priests" (40650) component, going off weidu --change-log on the area scripts and affected dialogue files.

If you want to take a look at them I can upload any amount of the relevant dialogue files, however, these bugs can easily be fully reproduced by just installing the above mentioned component.

Mods affecting SCSAIN.DLG:
00000: /* created or unbiffed */ ~DW_TALENTS/DW_TALENTS.TP2~ 0 40650 // Revised speciality priests of Lathander/Helm/Talos/Tempus/TyrBeta 7
00001:  ~DW_TALENTS/DW_TALENTS.TP2~ 0 50400 // New choices of god / goddess for speciality priestsBeta 7
00002:  ~DW_TALENTS/DW_TALENTS.TP2~ 0 55000 // Allow druids to multiclass as mages, rangers, and thievesBeta 7



Mods affecting AR0901.BCS:
00000: /* created or unbiffed */ ~DW_TALENTS/DW_TALENTS.TP2~ 0 40650 // Revised speciality priests of Lathander/Helm/Talos/Tempus/TyrBeta 7
00001:  ~DW_TALENTS/DW_TALENTS.TP2~ 0 50500 // New class: Favored SoulBeta 7
00002:  ~STRATAGEMS/SETUP-STRATAGEMS.TP2~ 0 4150 // Allow the Cowled Wizards to detect spellcasting in most indoor, above-ground areas in Athkatla35.10

As for the Sir Sarles quest turn in, the following console command can be used, from AR0900 (Temple District):

C:Eval("ActionOverride(\"Oisig\",MoveBetweenAreas(\"AR0901\",[700.560],2))")

And for Alvanna (places her in some basically random location, I don't know well where she's actually suppossed to be in, also needs to be used in AR0900):

C:Eval("ActionOverride(\"acolyte2\",MoveBetweenAreas(\"AR0902\",[964.620],2))")

Should be similar for the Talassan priest but I've not delved into that so I don't know his creature filename nor where they should stand.

WeiDU.log

Link to comment

As for the other minor bug, I don't know what causes it, but it is pretty simple: when kicked out of the party and recruited again, Aerie gets the MAGE_UNUSABLE specific assigned to her. Sadly Aerie knows way too many spells for Ctrl+M to reveal her SPECIFIC field in-game, but a quick look to my save on NI reveals that she gets it changed every time I kick her and make her rejoin. This is very easily hotfixed by setting back her Specific field to 0 on NI.

Oddly enough, it only seems to block her from using Shields, she can still user her helmet just fine.

Link to comment

I'll take a look when I have a chance. (amalgamate_class_checks is there to make sure the game treats druid multiclasses as druids rather than clerics, but the code is complicated and I could well believe it's glitching.

Link to comment

I can figure it out if you want, I need to implement this on my ToB mod either way and I'm going to be working on it as it's one of the few things I have left to do. Though those two response states from scsain.dlg currently only check if the player is a Druid (via the spell state), on the unmodded script they just perform a !Class(Player1,CLERIC_ALL) check which needs to be placed along a CheckSpellState(Player1,DW_DRUID) inside an OR(), since otherwise *only* Druids can use those options to accept the quest, when it actually has to be offered to all classes.

This is actually a very impressive bug, because it's caused by Class(Player1,CLERIC_ALL) being replaced by !CheckSpellState(\1,DW_DRUID) on a check patched in by druid_multiclass.tpa, which means WeiDU evaluates !! as self-negating when compiling dialogue.

Link to comment

In general amalgamate_class_checks is doing some fairly sophisticated substitution, not just a regexp replace - it has to substitute into OR() and ! contexts and preserve logical structure. Looks like it's not doing so perfectly.

Link to comment

Right, amalgamate_class_checks is what's causing the area script bugs, but the Druid issue is solely contained on dialogue, and only occurs in dialogue files because only those are being patched this way. Even if druid_multiclass.tpa calls amalgamate_class_checks again right before it rolls its own patches, an install mark for amalgamate_class_checks.tpa is set and checked, so the issue lies in the disjunctive_substitution call on dialogue files in druid_multiclass.tpa.

Now, there's might be a bug somewhere in disjunctive_substitution, since the final scsain.00003.d (druids_multiclass.tpa acts upon scsain.00002.d, and then scsain.00000.d is the vanilla BG2EE file. scsain.00001.d isn't relevant for this issue, I've only included it for the sake of completeness) doesn't have the !Class(Player1,CLERIC_ALL) check, only the CheckSpellState(Player1,DW_DRUID) check. Meanwhile a toy version of version of it does not have this issue and both triggers are correctly present.

I'll try fully reimplementing the disjunctive_substitution functionality tomorrow, since the code I selectively copy-pasted doesn't handle OR() yet, which leads us to the next issue which is that: If this was working correctly, it would present a logical error: we want either all non-clerics, or any fake Druids. Both at the same time present an impossible requirement. So it's necessary to put these triggers inside an OR() block. I'm going to test if that fixes it tomorrow, I don't want to mess with a new install right now (it's rather far past midnight which does not sit well for modding things this complex).

Seems like my guess of !! evaluating to self-negating was correct, though rather than WeiDU doing so it is instead properly addressed in your code, both technically and in regards to its philosophical implications.

Will look into the issue of the area scripts once this is solved, since that one looks to be considerably easier.

SCSAIN.00000.d SCSAIN.00001.d SCSAIN.00002.d SCSAIN.00003.d

Link to comment

OK, I think this is fixed now - a bug that crept into disjunctive_substitution, and also an error in its application. Putting the attached versions of disjunctive_substitution.tph and druid_multiclass.tpa into dw_talents/sfo/lua and dw_talents/kit respectively should hotfix it. Thanks for spotting the problem.

On 3/10/2024 at 1:41 AM, CrevsDaak said:

Seems like my guess of !! evaluating to self-negating was correct, though rather than WeiDU doing so it is instead properly addressed in your code, both technically and in regards to its philosophical implications.

I'm pleased someone spotted that!

druid_multiclass.tpa disjunctive_substitution.tph

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