Jump to content


Photo

Bug in Ribald's Talk


  • Please log in to reply
6 replies to this topic

#1 Ail

Ail
  • Member
  • 104 posts

Posted 11 December 2007 - 07:26 AM

Hi, yesterday I found a bug in Ribald's Dialog, at the adventurer Mart. The first time I talked with him I agreed to look for Coran in the Tethyr Forest. Meanwhile, I did several other quests, including the Planar sphere, and agreed to take the Solamnic Knights to their world. So I returned to Ribald, without ever having gone to Tethyr, and the immediately asked me about it. I said no, I haven't found him, but he proceed with his questions as if I had.

I did find the culprit in the aRibald.d in directory C:\Program Files\Black Isle\BGII - SoA\TS\Compat\SoS\DLG.
More precisely, here

IF ~NumTimesTalkedToGT(0)
Global("RibaldBreak","GLOBAL",0)
!InParty("Coran")
!See("Coran")
OR(2)
GlobalGT("CoranRibaldConflict","GLOBAL",0)
GlobalLT("CoranRibaldConflict","GLOBAL",4)~ THEN BEGIN TS72
  SAY @27
  IF ~~ THEN REPLY @28 GOTO TS73
  IF ~~ THEN REPLY @29 GOTO TS73
END

So the correction would be easily to put Exit instead of the first GOTO TS73. There are two problems though. I never seem to be able to enter the normal conversation, where I should get a chance of asking him about the Knights. I tried to cheat the variables via CLUA so that dialog would be chosen, namely these

~Global("RibaldBreak","GLOBAL",0)
!Global("VP_RibaldMeetsMazzy","LOCALS",1)
!Global("VP_RibaldMeetsJaheira","LOCALS",1)
!Global("VP_RibaldMeetsCoran","LOCALS",1)
OR(2)
GlobalLT("CoranRibaldConflict","GLOBAL",1)
GlobalGT("CoranRibaldConflict","GLOBAL",3)~

but I don't know how to affect the "LOCALS" variables via console and this dialog was never chosen. So I think I should replace the first GOTO TS73 by something that sent the dialog to the standard conversation, but I don't know the number for this line either, and I haven't been able to find the file with those dialogs.

Now I come to my second problem. This is all in theory, but I never did a mod of any kind, and I don't know what is the procedure to compile and actually update the game. And if I did, would I break anything in what I already have? I mean, is it ok to do changes to the dialog files, could I continue my current game with reinstalling or restarting ?

Thanks.

Alex

#2 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 11 December 2007 - 07:54 AM

I don't know how to affect the "LOCALS" variables via console

You should be able to set locals as well as globals, via

CLUAConsole:SetGlobal("VP_RibaldMeetsMazzy","LOCALS",0)

But the variable you want to mess with seems to be the CoranRibaldConflict GLOBAL anyway.

Now I come to my second problem. This is all in theory, but I never did a mod of any kind, and I don't know what is the procedure to compile and actually update the game. And if I did, would I break anything in what I already have? I mean, is it ok to do changes to the dialog files, could I continue my current game with reinstalling or restarting ?

Well, the glory of WeiDU is you can uninstall something pretty cleanly if it doesn't work. So you could try writing a micro-patch for this, something like:
BACKUP ~minipatch/backup~
AUTHOR ~whatever~
COPY_EXISTING ~ribald.dlg~ ~override~
  DECOMPILE_DLG_TO_D
	REPLACE_TEXTUALLY EXACT_MATCH ~REPLY @28 GOTO TS73~ ~REPLY @28 EXIT~
  COMPILE_D_TO_DLG
BUT_ONLY_IF_IT_CHANGES
I have no idea if this would work, but as I said, no real harm done if it doesn't, and you can always experiment (with caution of course). And if you do and it works, congrats and welcome to the world of modding :D.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#3 Ail

Ail
  • Member
  • 104 posts

Posted 11 December 2007 - 08:01 AM

I don't know how to affect the "LOCALS" variables via console

You should be able to set locals as well as globals, via

CLUAConsole:SetGlobal("VP_RibaldMeetsMazzy","LOCALS",0)

But the variable you want to mess with seems to be the CoranRibaldConflict GLOBAL anyway.


My question here is that "LOCALS" pertain to some NPC. I've read in the cheats pages that when you want to change, for isntance, the lovetalk of a certain NPC member, you have to hover with the mouse over their portrait, so as to identify which NPC the variable belongs to. But since Ribald is not in the party, I don't have a portrait to hover over, so that's why I'm at a loss here. I may have my facts wrong, though.

Now I come to my second problem. This is all in theory, but I never did a mod of any kind, and I don't know what is the procedure to compile and actually update the game. And if I did, would I break anything in what I already have? I mean, is it ok to do changes to the dialog files, could I continue my current game with reinstalling or restarting ?

Well, the glory of WeiDU is you can uninstall something pretty cleanly if it doesn't work.


Do you mean even anything that was installed in the middle of many mods? Don't I have to make a stack-like de-installation, kind LAST-IN FIRST-OUT?
Thanks.

Alex

#4 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 11 December 2007 - 08:16 AM

My question here is that "LOCALS" pertain to some NPC. I've read in the cheats pages that when you want to change, for isntance, the lovetalk of a certain NPC member, you have to hover with the mouse over their portrait, so as to identify which NPC the variable belongs to. But since Ribald is not in the party, I don't have a portrait to hover over, so that's why I'm at a loss here. I may have my facts wrong, though.

I usually don't mess with too much variable setting via the console, but you could try just clicking him or hovering your cursor over the CRE, not the portrait. You might also want to make sure those variables aren't already zero, by doing a CLUAConsole:GetGlobal("Variable","LOCALS") in the console.

Do you mean even anything that was installed in the middle of many mods? Don't I have to make a stack-like de-installation, kind LAST-IN FIRST-OUT?

WeiDU handles this automatically, so if you uninstall TS, make a change to it and reinstall it, it'll uninstall and reinstall all mods listed after it in your WeiDU.log. That can get kind of nasty though if there's a bunch of them, which is why the patch example I gave is the safest option.

Note that your saved game will still store variables and other data, regardless of which option you go with. But if you change the dialogue code, that isn't stored in the saved game, so you should notice the differences assuming the variables are set properly.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#5 Ail

Ail
  • Member
  • 104 posts

Posted 13 December 2007 - 02:32 AM

My question here is that "LOCALS" pertain to some NPC. I've read in the cheats pages that when you want to change, for isntance, the lovetalk of a certain NPC member, you have to hover with the mouse over their portrait, so as to identify which NPC the variable belongs to. But since Ribald is not in the party, I don't have a portrait to hover over, so that's why I'm at a loss here. I may have my facts wrong, though.

I usually don't mess with too much variable setting via the console, but you could try just clicking him or hovering your cursor over the CRE, not the portrait. You might also want to make sure those variables aren't already zero, by doing a CLUAConsole:GetGlobal("Variable","LOCALS") in the console.

Do you mean even anything that was installed in the middle of many mods? Don't I have to make a stack-like de-installation, kind LAST-IN FIRST-OUT?

WeiDU handles this automatically, so if you uninstall TS, make a change to it and reinstall it, it'll uninstall and reinstall all mods listed after it in your WeiDU.log. That can get kind of nasty though if there's a bunch of them, which is why the patch example I gave is the safest option.

Note that your saved game will still store variables and other data, regardless of which option you go with. But if you change the dialogue code, that isn't stored in the saved game, so you should notice the differences assuming the variables are set properly.


Well, it kind of worked through the Console. Hovering over the creature, as you said, worked and somehow I changed a variable that made Ribald talk to Jaheira again, as if it were the first time I entered the shop. From there I had access to the normal dialog.

As far as your code goes, it makes all sense, except the last line, BUT_ONLY_IF_IT_CHANGES. What is this?

Thanks.

Alex

#6 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 13 December 2007 - 04:21 AM

BUT_ONLY_IF_IT_CHANGES. What is this?

It just means the file will only be modified if the patch actually changes it. If someone's already gone through and changed "REPLY @28 GOTO TS73" manually, it won't do anything.

If you want to bore yourself senseless sometime, have a look at the WeiDU doc. Probably not the best place to start if you want to learn more about modding, but it's a decent reference.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#7 Ail

Ail
  • Member
  • 104 posts

Posted 13 December 2007 - 06:37 AM

BUT_ONLY_IF_IT_CHANGES. What is this?

It just means the file will only be modified if the patch actually changes it.  If someone's already gone through and changed "REPLY @28 GOTO TS73" manually, it won't do anything.

If you want to bore yourself senseless sometime, have a look at the WeiDU doc.  Probably not the best place to start if you want to learn more about modding, but it's a decent reference.



Thanks. It seems nevertheless a good place to start :-) I'll take a look at it.

Alex