Skip to content

([BG1] Bugs) Varci/Lothander/Marek/Tenya/Jalantha

BalquoBalquo Member, Developer Posts: 2,746
edited November 2012 in Fixed
So I’ve been working on three issues which are all interconnected quest wise. These issues are:

• Varci’s quest.
• Lothander/Marek’s quest
• Tenya/Jalantha issues

The code is fairly huge but I’ve commented each section to explain what it is doing. I was going to put this as an A bug but I’ll leave it in B for now. I’ll explain why later. I’ll give a run through on each problem for those who don’t want to read the code. Actually the code isn’t very clear anyway so I’ll start here.

Varci gives you a quest to speak with his guardian who will then ask you to retrieve his son who was killed in the temple of Umberlee.

• The first problem was in his dialogue: He mentioned that his guardian was in the Lady’s Hall but this is clearly wrong as he is in his own house just north of the Lady’s Hall. I removed this from the dialogue.
• He would not open the door despite his dialogue telling him too. (This is still bugged. I can’t figure it out. @Cuv What the hell is wrong with these doors! Haha – the trick with the Flaming First door is not working here.
• Once inside and after speaking with the guardian, if you accepted the quest and spoke to Varci again, he would loop his initial dialogue and potentially leave the building making it impossible to complete the quest.
• The 10 Days to retrieve the boy was not working and you potentially had infinity time to complete the quest. You now only have 10 days.
• When you first meet Varci the 10 day timer starts. If you refuse the quest from Varci then he will stand around forever, even after the timer ends. I added that he will leave after 10 days.
• The dialogue between Varci and his guardian (Tremain) is now correctly linked. For example, if you declined the quest from Tremain he would ask Varci to escort you out. Which he did not. Varci will now initiate dialogue with the player and give the appropriate dialogue.

Varci’s quest will lead you to the temple of Umberlee to retrieve the boy’s body.

• I could pickpocket it from Jalantha, then buy it from her for 2,000 gold then get it for free from Tenya and have a total of 3 bodies in my bag. You now can only get one. Checks are made to ensure it.
• If you retrieve the body from Jalantha then summon Tenya, she gives appropriate dialogue that is not in related to the boy.
• If you retrieve the boy from Tenya then depending on your reputation, depending if you helped her or not previously, will affect the outcome. Her dialogue and script was supposed to turn the other priestesses hostile but it could not be heard. This has now been corrected.
• Changed Tenya’s race to human.
• The initial priestess who initiates dialogue with you would require a fee to speak to Jalantha. She did not have checks to see how much money you had. She does now.

Then we have the Lothander/Marek quest. This is the “A” potential bug. But again I’ll get to that later. So the story is that Lothander will tell you that you are poisoned and he knows the whereabouts of the cure but wants you to help him first.

• Lothander will tell you talk to the Divine – The Divine requests a fee did not check the amount of gold the player had. He does now.
• Once you exit the Divine tent, Lothander will initiate dialogue so you don’t forgot to talk to him.
• You go to the temple of Umberlee to talk to Jalantha about removing his geas. She asks for a book from Chanthalas. Chanthalas would sell it to you for 500 gold but did not actually take the gold. He does now.
• Once you return to Lothander he would give you his half of the antidote and leave. He gave you a normal “potn20” antidote potion. This makes little sense. I made it unique and called it “Lothander's potion of antidote”, similar to Mareks. I also give it a new description, removed its price, removed its item ability, changed it stack mount to 1 and changed it to misc from potion. It will disappear once you received Marek’s potion. This makes more sense as if you are mixing it with the other half.
• I have given the option to complete the quest by pickpocking Marek of his potion.
• I have given the option to complete the quest by charming Marek and he gives you the potion as per the dialogue. (This will not work until charm has been fixed)
• Once you kill Marek you will need to pick up the potion to be cured.

Ok, so for the A bug I mentioned earlier. If you follow the same route I have by first talking to Varci, then went to retrieve the body in the temple of Umberlee but turn them all hostile via a dialogue option (this can be done already in vBG1) then you have broken the game. As the only way to complete Lothander’s quest is to get an item from Jalantha. So if you have killed the priestesses first then the only way to save yourself from dying from Merek’s posion is to cheat and create the item Lothander requires. I made a work around for this. It required new dialogue.

When you talk to Lothander after he give you the quest to retrieve the item from Jalantha he asks:
“So, how did you fare? Do you have the cure to my geas?”
Which you can respond:
“No, we don't.”

“We have your cure, now where is the antidote to the poison?”
I added the following, this assums you do not have the required item and either one of the major priestesses are dead:
“We had an earlier... encounter... in the temple of Umberlee. It may prove impossible to reverse the geas.”
Which Lothander follows up with:
“What! How could you! But... maybe... I am dead...”
And again:
“...and so fate catches up. Here, take my half of the antidote. Marak has the other. You'll find him at the Blushing Mermaid Inn. I must go... I need to see her... need to say good bye...”
This will trigger Marek to spawn and all the usual stuff.

I also added a journal entry for this:
Marek and Lothander
We were unable to help Lothander but despite this he gave me half the antidote and sent me to the Blushing Mermaid Inn to collect the other half from Marek.
This solves the problem as you can complete the quest as normal. Simple as that. If you decide to use these fixes then @Dave please come and write your own stuff or fix it up however you please. I just added simple quick dialogue as an example. I wrote it so you the player may feel some guilt... some mystery as to what happens to Lothander… I don’t know... silliness.

Speaking of changing dialogue, I also created a description for Lothandar’s half of the antidote:
Lothander's potion of antidote
Lothander's potion appears to have no normal use but we will hopefully learn its true effect once combined with Marek's half of the antidote.

It is very possible that this is just discolored water.
Anyway, here is the code:
//Jalantha Mistmyr Pickpocket Exploit Fix
<<<<<<<< jalantboybodycheck.baf
IF
!Global("BOYBODY","GLOBAL",1)
Dead("Jalantha")
PartyHasItem("misc54")
THEN
RESPONSE #100
SetGlobal("BOYBODY","GLOBAL",1)
END
>>>>>>>>
COPY_EXISTING ~ar0609.are~ ~override~
WRITE_ASCII 0x94 ~ar0609~
EXTEND_BOTTOM ~ar0609.bcs~ ~jalantboybodycheck.baf~

// flag the body as unstealable in the cre file so that it can't be taken
COPY_EXISTING ~jalant.cre~ ~override~
READ_LONG 700 ~itm_loc~
READ_LONG 704 ~itm_num~
FOR (y = 0; y < %itm_num%; y = y + 1) BEGIN
READ_ASCII %itm_loc% ~itm_name~
PATCH_IF (~MISC54~ STRING_EQUAL_CASE ~%itm_name%~) BEGIN
READ_LONG (%itm_loc% + 16) ~flag~
PATCH_IF !(%flag% = 2) BEGIN
WRITE_LONG (%itm_loc% + 16) 2
END
END
SET itm_loc = (%itm_loc% + 20)
END
BUT_ONLY_IF_IT_CHANGES

//block dialog states depending on status of body
<<<<<<<< tenya2.d
ADD_STATE_TRIGGER tenya2 0 ~GlobalLT("BOYBODY","GLOBAL",1)~
ADD_STATE_TRIGGER tenya2 6 ~GlobalLT("BOYBODY","GLOBAL",1)~
REPLACE_STATE_TRIGGER tenya2 11 ~Global("BOYBODY","GLOBAL",1)~
>>>>>>>>
COMPILE ~tenya2.d~
COPY_EXISTING ~tenya2.cre~ ~override~
WRITE_ASCII 0x248 ~shout~ //override
WRITE_ASCII 0x250 ~initdlg~ // Remove Priest3.bSC - This is only used for Tenya in AR0900.
WRITE_ASCII 0x268 ~wdasight~
BUT_ONLY_IF_IT_CHANGES
// So she turns hostile if Tenya shouts.
COPY_EXISTING ~pumberl.cre~ ~override~
WRITE_ASCII 0x248 ~shout~ //override
WRITE_ASCII 0x258 ~None~
BUT_ONLY_IF_IT_CHANGES
// So she turns hostile if Tenya shouts.
COPY_EXISTING ~pumber2.cre~ ~override~
WRITE_ASCII 0x248 ~shout~ //override
WRITE_ASCII 0x250 ~None~
WRITE_ASCII 0x258 ~None~
WRITE_ASCII 0x260 ~None~
WRITE_ASCII 0x268 ~wdasight~
BUT_ONLY_IF_IT_CHANGES

//She wasn't checking the amount of money the party had.
<<<<<<<< pumberl.d
REPLACE_ACTION_TEXT pumberl ~ActionOverride("Tenya2",SetNumTimesTalkedTo(1))~ ~~
ADD_TRANS_TRIGGER pumberl 1 ~PartyGoldGT(49)~ DO 1
ADD_TRANS_TRIGGER pumberl 5 ~PartyGoldGT(99)~ DO 1
>>>>>>>>
COMPILE ~pumberl.d~

//Changed Tenya to human race.
COPY_EXISTING ~tenya2.cre~ ~override~
~tenya.cre~ ~override~
PATCH_IF SOURCE_SIZE > 0x71 BEGIN
WRITE_BYTE 0x272 1 //Race (human)
END
BUT_ONLY

//Many of tenya's dialogue ended with her telling the other priestesses to attack. They did not as they could not hear her.
<<<<<<<< tenya2.d
ADD_TRANS_ACTION tenya2 BEGIN 3 5 7 END BEGIN END ~Shout(99)~
>>>>>>>>
COMPILE ~tenya2.d~


// Varci will leave after 10 days if you do not want to do his quest.
<<<<<<<< varcileave.baf
IF
GlobalTimerExpired("Varci","GLOBAL")
THEN
RESPONSE #100
ActionOverride("Varci",EscapeArea())
END
>>>>>>>>
EXTEND_BOTTOM ~ar0600.bcs~ ~varcileave.baf~

<<<<<<<< tremai.d
ADD_TRANS_ACTION tremai BEGIN 6 END BEGIN END ~SetGlobal("HelpTremain","GLOBAL",2) ActionOverride("Varci",Dialogue([PC]))~
ADD_TRANS_ACTION tremai BEGIN 7 END BEGIN END ~SetGlobal("HelpTremain","GLOBAL",2) ActionOverride("Varci",Dialogue([PC]))~
ADD_STATE_TRIGGER tremai 9 ~!GlobalTimerExpired("Varci","GLOBAL")~
ADD_STATE_TRIGGER tremai 10 ~GlobalTimerExpired("Varci","GLOBAL") Global("TremainMove","GLOBAL",0)~
ADD_TRANS_ACTION tremai BEGIN 10 END BEGIN END ~SetGlobal("TremainMove","GLOBAL",5) ActionOverride("Varci",Dialogue([PC])) SetGlobal("TremainMove","GLOBAL",6) SetGlobal("HelpTremain","GLOBAL",3)~
ADD_STATE_TRIGGER tremai 11 ~!GlobalTimerExpired("Varci","GLOBAL")~
>>>>>>>>
COMPILE ~tremai.d~

<<<<<<<< varci.d
ADD_STATE_TRIGGER varci 6 ~Global("HelpVarci","GLOBAL",0)~
ADD_STATE_TRIGGER varci 9 ~Global("HelpTremain","GLOBAL",2)~
REPLACE_ACTION_TEXT varci ~EscapeArea()~ ~~
ADD_STATE_TRIGGER varci 10 ~Global("TremainMove","GLOBAL",5)~
REPLACE_ACTION_TEXT varci ~AddexperienceParty(5000)~ ~AddexperienceParty(5000) EscapeArea()~
>>>>>>>>
COMPILE ~varci.d~


// Changes the way the quest works. You now have to pick up the antidote to be cured. Before you jsut had to initiate dialogue with Merak which makes no sence.
// This also gives the option to pickpocket the anitiote from Marek.
<<<<<<<< pickpocket.baf
IF
Global("PartyCured","GLOBAL",0)
Exists("Marek")
!Dead("Marek")
PartyHasItem("POTN47") // Marek's potion of antidote
THEN
RESPONSE #100
TakePartyItem("LOPOTN20") // Antidote
SetGlobal("PartyCured","GLOBAL",1)
ActionOverride(Player1,UseItem("POTN47",Player1))
ActionOverride(Player2,UseItem("POTN47",Player2))
ActionOverride(Player3,UseItem("POTN47",Player3))
ActionOverride(Player4,UseItem("POTN47",Player4))
ActionOverride(Player5,UseItem("POTN47",Player5))
ActionOverride(Player6,UseItem("POTN47",Player6))
Wait(3)
DisplayString(Player1,20675) // You are cured of Marek's poison.
AddexperienceParty(10000)
END

IF
Global("PartyCured","GLOBAL",0)
Dead("Marek")
PartyHasItem("POTN47") // Marek's potion of antidote
THEN
RESPONSE #100
TakePartyItem("LOPOTN20") // Antidote
SetGlobal("PartyCured","GLOBAL",1)
ActionOverride(Player1,UseItem("POTN47",Player1))
ActionOverride(Player2,UseItem("POTN47",Player2))
ActionOverride(Player3,UseItem("POTN47",Player3))
ActionOverride(Player4,UseItem("POTN47",Player4))
ActionOverride(Player5,UseItem("POTN47",Player5))
ActionOverride(Player6,UseItem("POTN47",Player6))
Wait(3)
DisplayString(Player1,20675) // You are cured of Marek's poison.
AddexperienceParty(10000)
END
>>>>>>>>
EXTEND_BOTTOM ~ar0115.bcs~ ~pickpocket.baf~

// Added Lothander to initiate dialogue once the player left the divine tent.
<<<<<<<< initiatedivine.baf
IF
Global("LothanderMove","GLOBAL",4)
THEN
RESPONSE #100
ActionOverride("Lothander",Dialogue([PC]))
END
>>>>>>>>
EXTEND_BOTTOM ~ar0700.bcs~ ~initiatedivine.baf~

// Fixed a problem with the Devine not checking the amount of gold the player had.
<<<<<<<< divine.d
ADD_TRANS_TRIGGER divine 0 ~PartyGoldGT(49)~ DO 1
>>>>>>>>
COMPILE ~divine.d~

//Creates a new unique potion for Lothander as he just gave the player a normal anditote which made no sence.
COPY_EXISTING ~POTN20.itm~ ~override/LOPOTN20.itm~
SAY 0x0c ~Lothander's potion of antidote~
SAY 0x54 ~Lothander's potion appears to have no normal use but we will hopefully learn its true effect once combined with Marek's half of the antidote.

It is very possible that this is just discolored water.~
PATCH_IF (%SOURCE_SIZE% > 0x70) BEGIN
WRITE_SHORT 0x1c 0 // Item Type
WRITE_SHORT 0x34 0 // Price
WRITE_SHORT 0x38 1 // Stack Amount
END
BUT_ONLY_IF_IT_CHANGES

// Removes "Item Abiltiy" from the new unique antidote.
DEFINE_PATCH_FUNCTION delete_ability BEGIN
PATCH_IF BUFFER_LENGTH > 0x71 BEGIN
READ_ASCII 0x0 sig (3)
PATCH_IF "%sig%" STRING_MATCHES_REGEXP "SPL\|ITM" = 0 BEGIN
al = "%sig%" STRING_EQUAL_CASE spl ? 0x28 : 0x38
READ_LONG 0x64 ao
READ_SHORT 0x68 na
READ_LONG 0x6a eo
FOR (i = na - 1; i >= 0; --i) BEGIN
READ_SHORT ao + al*i + 0x1e ne
READ_SHORT ao + al*i + 0x20 ei
FOR (j = ne - 1; j >= 0; --j) BEGIN
DELETE_BYTES eo + 0x30*(ei + j) 0x30
END
DELETE_BYTES ao + al*i al
--na
eo -= al
END
WRITE_SHORT 0x68 na
WRITE_LONG 0x6a eo
END ELSE PATCH_PRINT "Unsupporetd file type"
END ELSE PATCH_PRINT "File below minimum size"
END
COPY_EXISTING LOPOTN20.itm override
LPF delete_ability END

// Fixes a few mistakes and adds a few tweaks.
<<<<<<<< lothan.d
REPLACE_TRIGGER_TEXT lothan ~SetGlobal(~ ~Global(~
REPLACE_ACTION_TEXT lothan ~GiveItem("POTN20",LastTalkedToBy)~ ~GiveItemCreate("LOPOTN20",LastTalkedToBy(Myself),0,0,0)~
REPLACE_ACTION_TEXT lothan ~SetGlobal("LothanderMove","GLOBAL",5)~ ~SetGlobal("LothanderMove","GLOBAL",5) MoveToPoint([435.149])~
REPLACE_ACTION_TEXT lothan ~SetGlobal("LothanderMove","GLOBAL",2)~ ~SetGlobal("LothanderMove","GLOBAL",2) MoveToPoint([1187.2187])~
REPLACE_ACTION_TEXT lothan ~MoveToPoint(\[2571.876\])~ ~MoveToPoint([2571.876]) Face(1)~
>>>>>>>>
COMPILE ~lothan.d~

//Removes the regular anitote potion.
COPY_EXISTING ~lothan.cre~ ~override~
REMOVE_CRE_ITEM ~POTN20~
BUT_ONLY_IF_IT_CHANGES


// Fixes a few mistakes with Marek's dialogue plus enables another way to complete the quest - by charming him - his dialogue states he is giving you the antidote but didn't.
<<<<<<<< marek.d
REPLACE_ACTION_TEXT marek ~DisplayString("Marek",20675)~ ~~
REPLACE_ACTION_TEXT marek ~SetGlobal("PartyCured","GLOBAL",1)~ ~~
REPLACE_ACTION_TEXT marek ~AddexperienceParty(10000)~ ~~
ADD_STATE_TRIGGER ~marek~ 5 ~Global("PartyCured","GLOBAL",0)~
ADD_TRANS_ACTION ~marek~ BEGIN 5 END BEGIN END ~TakePartyItem("LOPOTN20") // Antidote
SetGlobal("PartyCured","GLOBAL",1)
ActionOverride(Player1,UseItem("POTN47",Player1))
ActionOverride(Player2,UseItem("POTN47",Player2))
ActionOverride(Player3,UseItem("POTN47",Player3))
ActionOverride(Player4,UseItem("POTN47",Player4))
ActionOverride(Player5,UseItem("POTN47",Player5))
ActionOverride(Player6,UseItem("POTN47",Player6))
Wait(3)
DisplayString(Player1,20675) // You are cured of Marek's poison.
AddexperienceParty(10000)~
>>>>>>>>
COMPILE ~marek.d~

// Prevent Marek from leaving this area -- If he can leave then the quest will fail.
COPY_EXISTING ~ar0115.are~ ~override~
READ_SHORT 0x005a ~regionnum~
READ_LONG 0x005c ~regionoff~
FOR(x1=0;x1<%regionnum%;x1+=1)BEGIN
READ_ASCII (%regionoff% + (0xc4*%x1%)) ~regionname~
PATCH_IF (~Door0114~ STRING_EQUAL_CASE ~%regionname%~) BEGIN
READ_LONG (%regionoff% + (0xc4*%x1%)+0x0060) ~flags~
WRITE_LONG (%regionoff% + (0xc4*%x1%)+0x0060) (%flags% BOR 0b1000000000)
END
END

// Marek's antidote potion was weightless.
COPY_EXISTING ~POTN20.itm~ ~override.itm~
PATCH_IF (%SOURCE_SIZE% > 0x70) BEGIN
WRITE_SHORT 0x4c 1 // Weight
END
BUT_ONLY_IF_IT_CHANGES


// Gives Pumberl and "Script Name" -- required for Lothan's new dialogue.
COPY_EXISTING ~pumberl.cre~ ~override~
WRITE_EVALUATED_ASCII 0x280 ~pumberl~
BUT_ONLY_IF_IT_CHANGES

// Ensures Chanthalas actually takes 500 gold.
<<<<<<<< chanth.d
ADD_TRANS_ACTION ~chanth~ BEGIN 5 END BEGIN END ~TakePartyGold(500)~
>>>>>>>>
COMPILE ~chanth.d~


////////
//DIALOGUE Changes
////////

// If you told Varci that you did not want to help him but then later spoke to him he dialogue was as follows:
// "There is yet time to help me, if you so choose. Please, come to The Lady's Hall with me. My guardian waits there."
// This is not true. His guardian is in the home north of the Lady's Hall. I just removed this from the string.
STRING_SET 12627 ~There is yet time to help me, if you so choose.~

And the .d code. Install this after the above code:
EXTEND_TOP lothan 12
IF ~!PartyHasItem("SCRLJALA")
OR(3)
Dead("pumberl")
Dead("Jalantha")
Dead("Tenya2")~ THEN REPLY ~We had an earlier... encounter... in the temple of Umberlee. It may prove impossible to reverse the geas.~ EXTERN lothan reply1
END

APPEND lothan
IF ~~ THEN BEGIN reply1
SAY ~What! How could you! But... maybe... I am dead...~
IF ~~ THEN GOTO reply2
END
END

APPEND lothan
IF ~~ THEN BEGIN reply2
SAY ~...and so fate catches up. Here, take my half of the antidote. Marak has the other. You'll find him at the Blushing Mermaid Inn. I must go... I need to see her... need to say good bye...~
IF ~~ THEN DO ~GiveItemCreate("LOPOTN20",LastTalkedToBy(Myself),0,0,0) // Lothander's potion of antidote
SetGlobal("MarekMove","GLOBAL",1)
SetGlobal("LothanderMove","GLOBAL",5)
MoveToPoint([435.149])
EscapeArea()~
JOURNAL ~Marek and Lothander
We were unable to help Lothander but despite this he gave me half the antidote and sent me to the Blushing Mermaid Inn to collect the other half from Marek.~
EXIT
END
END
EDIT: The new journal section adds it under journal and not quest. I couldn't figure out how to change this.
Post edited by Tanthalas on
«1

Comments

  • CuvCuv Member, Developer Posts: 2,535
    Balquo said:


    • He would not open the door despite his dialogue telling him too. (This is still bugged. I can’t figure it out. @Cuv What the hell is wrong with these doors! Haha – the trick with the Flaming First door is not working here.

    @Balquo I really don't know... this is the second case now that the ToB engine is not controlling BG1 area doors. I thought maybe the first was an anomaly... but now two! Might be something in the .ARE that the ToB engine just cant process.

    What is the area and what is the ID and string name of that door?

  • TanthalasTanthalas Member Posts: 6,738
    @Balquo

    Wow, that was a lot of fixing that you had to do.
  • BalquoBalquo Member, Developer Posts: 2,746
    @Cuv
    Area - AR0600
    String - Door0617
    ID - DOOR0617

    varci.dlg - state5 - action: OpenDoor("DOOR0617")
  • CuvCuv Member, Developer Posts: 2,535
    Where is/are these quests? Hehe.. I dont seem to remember them at all.
  • BalquoBalquo Member, Developer Posts: 2,746
    @Cuv
    AR0600 will start Varci.
    AR0300 will start the Marek quest which which continues in AR0700.
    Both quests will lead you to AR0609 (temple of Umberlee)

    All quest creatures will initiate dialogue with you.
  • TanthalasTanthalas Member Posts: 6,738
    I remember them, I just don't recall where in Baldur's Gate they actually start.
  • CuvCuv Member, Developer Posts: 2,535
    @Balquo Thanks, wonder how I missed these... maybe they didnt work right in BG1 and I just ignored them

    So this is the SAME area as the flaming fist door problem? Door0607? Door617? Coincidence or something more. Hehe... conspiracy!
  • BalquoBalquo Member, Developer Posts: 2,746
    @Cuv They are littered with bugs, obviously. But can be completed if you go through the working procedure.

    Btw, the doors are bugged in vBG1 too. This isn't new to the ToB engine.
  • SethDavisSethDavis Member Posts: 1,812
    edited August 2012
    checking this one now

    Potentially fixed - @Balquo's fix has been applied.

    The door has also been fixed. The problem was that there was a Point of Interest with the same name as the door (which happens pretty regularly), which meant that when the door was opened a trigger was found instead of a door and the function failed. I checked to see how Aldeth's door worked and saw that the Point of Interest corresponding to that door was minus an o in door. Changing the trigger for Varci in the same fashion fixes his Casper-esque door opening technique.
    Post edited by SethDavis on
  • BalquoBalquo Member, Developer Posts: 2,746
    @SethDavis Excellent! If you haven't already, get @Dave to check the dialogue as I don't want to be responsible for whatever damage it may cause him in future endeavours :P
  • DaveDave Member Posts: 200
    @Balquo Done. Thanks for flagging me.
  • BhryaenBhryaen Member Posts: 2,874
    @Balquo
    Excellent work... And this is quite the nice touch if only the devs would recognize it:
    • I have given the option to complete the quest by charming Marek and he gives you the potion as per the dialogue. (This will not work until charm has been fixed)
  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    The script was definitely run, but this is quite complex.
    I checked only some parts.
  • BalquoBalquo Member, Developer Posts: 2,746
    edited August 2012
    There are a few bugs with this. This is just some notes to self and I'll get them up asap.

    1) The new journal entry needs to be removed once you kill Marek.
    2) If various conditions are not met when you summon Tenya she will intiate dialogue forever
    3) Under certain conditions you can receive the body from Tenya even if you have not accepted the quest from Tremain. - Ascension64 reported this in another thread
    4) When Bioware made this they split the Tenya dialogue and copied all the dead body related dialogue into Tenya2. They did not copy all the journal entries. I'll probably add these back.
    5) Tenya2 - state10. Add Shout(99).
  • TanthalasTanthalas Member Posts: 6,738
    @Balquo

    Probably better to move this to "Being worked on" then?
  • BalquoBalquo Member, Developer Posts: 2,746
    edited September 2012
    @SethDavis
    Here is the fixes for this now. Lots n' lots...

    First thing first. It appears the new dialogue for Lothan has been duplicated. I suggest you manually remove them. These are the dups: Response 20, Response 27, Response Trigger 1, Action 5, State 16 and State 17. I tried to do this in NI and it was a mess. But you probably have a better method.

    If you are lazy then you could apply this fix which simply adds false() to the duplicated response: If you can manually remove then do that instead.
    <<<<<<<< lothan.d
    REPLACE_TRANS_TRIGGER lothan BEGIN 12 END BEGIN 1 END ~!PartyHasItem("SCRLJALA")~ ~False()~
    REPLACE_TRANS_TRIGGER lothan BEGIN 12 END BEGIN 1 END ~OR(3)~ ~~
    REPLACE_TRANS_TRIGGER lothan BEGIN 12 END BEGIN 1 END ~Dead("pumberl")~ ~~
    REPLACE_TRANS_TRIGGER lothan BEGIN 12 END BEGIN 1 END ~Dead("Jalantha")~ ~~
    REPLACE_TRANS_TRIGGER lothan BEGIN 12 END BEGIN 1 END ~Dead("Tenya2")~ ~~
    >>>>>>>>
    COMPILE ~lothan.d~
    Moving on to Tenya. You can only summon her if you have accept Tremain's quest. This works as her dialogue is 100% related to the dead body. No there no other reason to summon her. This also fixes the intiate dialogue forever bug.

    I added back all the Journal entries to Tenya2.dlg that where in Tenya.dlg. I editing them a little to show "Tremain's son" at the subject and tweaked a few other bits. Dave can check it all but it essentially is the same as the original.

    All these new journal entries will be erased once you complete (or don't complete) Tremain's quest.

    Under state 10 she will now shout so all priestesses will turn hostile and will create the dead body so you can loot it from her corpse.


    Now Marek. Some of the code I gave you originally did not get applied. Hopefully it works this time.
    Now that you can complete the quest by charming or pickpocketing the antidote from Marek this leaves the journal entries uncompleted and there is no appropriate journal entry if you do complete the quest this way. Now when you do so the journal entries will be erased and you will receive a new journal entry which I've written in a way that will apply to both charm and pickpocketing.
    Marek and Lothander 
    I managed with the use of trickery, to obtain the antidote from Marek. I believe it best to avoid him in case he realizes what happened.
    If you talk to him again, he will attack you like normal.


    Last but not least - Lothan. I changed the journal entry I wrote for him to "UNSOLVED_JOURNAL" from "JOURNAL"
    I also added back a journal entry that got removed somehow. It was present in vBG1.

    Here is the code:
    <<<<<<<< tenya2.d
    REPLACE_ACTION_TEXT tenya2 ~Enemy()~ ~Shout(99) SetGlobal("BOYBODY","GLOBAL",1) CreateItem("MISC54",0,0,0) Enemy()~
    ALTER_TRANS tenya2 BEGIN 3 END BEGIN 0 END BEGIN "UNSOLVED_JOURNAL" ~#6332~ END
    ALTER_TRANS tenya2 BEGIN 4 END BEGIN 0 END BEGIN "UNSOLVED_JOURNAL" ~#1827~ END
    ALTER_TRANS tenya2 BEGIN 5 END BEGIN 0 END BEGIN "UNSOLVED_JOURNAL" ~#6332~ END
    ALTER_TRANS tenya2 BEGIN 7 END BEGIN 0 END BEGIN "UNSOLVED_JOURNAL" ~#6354~ END
    ALTER_TRANS tenya2 BEGIN 8 END BEGIN 0 END BEGIN "UNSOLVED_JOURNAL" ~#6354~ END
    ALTER_TRANS tenya2 BEGIN 9 END BEGIN 0 END BEGIN "UNSOLVED_JOURNAL" ~#6354~ END
    ALTER_TRANS tenya2 BEGIN 10 END BEGIN 0 END BEGIN "UNSOLVED_JOURNAL" ~#6355~ END
    ALTER_TRANS tenya2 BEGIN 11 END BEGIN 0 END BEGIN "JOURNAL" ~#6356~ END
    >>>>>>>>
    COMPILE ~tenya2.d~


    // Erase the Tenya journal entries.
    <<<<<<<< varci.d
    ADD_TRANS_ACTION varci BEGIN 10 END BEGIN END ~EraseJournalEntry(1827) EraseJournalEntry(6332) EraseJournalEntry(6354) EraseJournalEntry(6355)~
    ADD_TRANS_ACTION varci BEGIN 11 END BEGIN END ~EraseJournalEntry(1827) EraseJournalEntry(6332) EraseJournalEntry(6354) EraseJournalEntry(6355)~
    >>>>>>>>
    COMPILE ~varci.d~

    // originally in TENYA.DLG this state had her EscapeArea() which makes sence when reading her dialogue. In TENYA2.DLG it was changed to Enemy(). I added "let us" to the dialogue to make "Waveservants, let us dispose of this flotsam!" so it makes more sence.
    STRING_SET 9944 ~Do you not realize where you are? This is my very lair! This is the seat of Umberlee! You do not make demands here! Waveservants, let us dispose of this flotsam! I cannot stand the sight of them!~
    //Add back all the journal entries.
    STRING_SET 1827 ~Tremain's son
    I have retrieved the child's body from the Umberlee Temple. It was a stroke of luck that Tenya was there, though I feel no better about being used before.~
    STRING_SET 6332 ~Tremain's son
    It is Tenya who rules at the Temple of Umberlee! Our past association has not softened her demeanor, and it does make me wonder how they would treat a stranger! At least I recieved the child's body.~
    STRING_SET 6354 ~Tremain's son
    It is the child priestess Tenya who appears to reign in the Temple of Umberlee. While I received the child's body, our fleeting acquaintance did not benefit me however, and I do not think I should return.~
    STRING_SET 6355 ~Tremain's son
    It is the child priestess Tenya who appears to reign in the Temple of Umberlee. While I received the child's body, it was not without bloodshed. She turned on me and I was forced to kill her.~
    STRING_SET 6356 ~The Temple of Umberlee has extended me sanctuary if required. I do not know which is more unnerving; that they have offered, or that I might need it.~
    // Added "Here is the body you came for. If you can get to the front gate, you may leave." instead of "you can pick up the body at the front gate" You can't pick up the body - she has to give it to you.
    STRING_SET 9941 ~Cease your blubbering. It is an insult to show such pathos in the sight of Umberlee! Perhaps we should make ye prove your mettle, that we might forget this sickening display? Here is the body you came for. If you can get to the front gate, you may leave. Of course my fellow waveservants will do their utmost to hinder your progress. It is sure to be an amusing diversion for the Sea Queen.~

    // Prevent the priesteses from following. Tenya states in some of the dialogue that if you get to the front gate you may leave.
    // Plus the pickpocket exploit fix will not work if they can leave the building.
    COPY_EXISTING ~ar0609.are~ ~override~
    READ_SHORT 0x005a ~regionnum~
    READ_LONG 0x005c ~regionoff~
    FOR(x1=0;x1<%regionnum%;x1+=1)BEGIN
    READ_ASCII (%regionoff% + (0xc4*%x1%)) ~regionname~
    PATCH_IF (~Door1200~ STRING_EQUAL_CASE ~%regionname%~) BEGIN
    READ_LONG (%regionoff% + (0xc4*%x1%)+0x0060) ~flags~
    WRITE_LONG (%regionoff% + (0xc4*%x1%)+0x0060) (%flags% BOR 0b1000000000)
    END
    END

    // Tenya's dialogue only shows if you have spoken to Tremain.
    <<<<<<<< pumberl.d
    REPLACE_TRIGGER_TEXT pumberl ~Global("TENAPPEAR","GLOBAL",0)~ ~Global("TENAPPEAR","GLOBAL",0) Global("TremainQuest","GLOBAL",1)~
    >>>>>>>>
    COMPILE ~pumberl.d~
    <<<<<<<< tremai.d
    ADD_TRANS_ACTION tremai BEGIN 0 END BEGIN END ~SetGlobal("TremainQuest","GLOBAL",1)~
    ADD_TRANS_ACTION tremai BEGIN 10 END BEGIN END ~TakePartyItem("MISC54") DestroyItem("MISC54")~
    >>>>>>>>
    COMPILE ~tremai.d~

    // Removes pickpocket when you first encounter Marek - this can cause the quest to break if you obtain it early. It will be added back when you meet the second time.
    COPY_EXISTING ~marek.cre~ ~override~
    REMOVE_CRE_ITEM ~POTN47~
    BUT_ONLY_IF_IT_CHANGES

    <<<<<<<< marek.d
    REPLACE_ACTION_TEXT marek ~DisplayString("Marek",20675)~ ~~
    REPLACE_ACTION_TEXT marek ~SetGlobal("PartyCured","GLOBAL",1)~ ~~
    REPLACE_ACTION_TEXT marek ~AddexperienceParty(10000)~ ~AddexperienceParty(10000) EraseJournalEntry(26793)~
    REPLACE_ACTION_TEXT marek ~TakePartyItem("LOPOTN20")~ ~SetGlobal("StopCharmExploit","GLOBAL",1) SetGlobal("PartyCured","GLOBAL",1) GiveItem("POTN47",LastTalkedToBy) ActionOverride(Player1,DestroyItem("LOPOTN20"))
    ActionOverride(Player2,DestroyItem("LOPOTN20")) ActionOverride(Player3,DestroyItem("LOPOTN20")) ActionOverride(Player4,DestroyItem("LOPOTN20")) ActionOverride(Player5,DestroyItem("LOPOTN20")) ActionOverride(Player6,DestroyItem("LOPOTN20"))~
    REPLACE_ACTION_TEXT marek ~Wait(3)~ ~Wait(5) EraseJournalEntry(26982) EraseJournalEntry(27240) EraseJournalEntry(27241) EraseJournalEntry(27242) EraseJournalEntry(27243)
    EraseJournalEntry(27183) SetGlobal("PickPocketCharm","GLOBAL",1) SetGlobal("MarekMove","GLOBAL",2)~
    ADD_STATE_TRIGGER ~marek~ 6 ~Global("PickPocketCharm","GLOBAL",1)~
    ADD_TRANS_ACTION ~marek~ BEGIN 6 END BEGIN END ~SetGlobal("PickPocketCharm","GLOBAL",2) Enemy()~
    ALTER_TRANS marek BEGIN 5 END BEGIN 0 END BEGIN "SOLVED_JOURNAL" ~Marek and Lothander
    I managed with the use of trickery, to obtain the antidote from Marek. I believe it best to avoid him in case he realizes what happened.~ END // If you charm the player then the quest will end but no journal entry
    >>>>>>>>
    COMPILE ~marek.d~

    COPY_EXISTING ~POTN46.itm~ ~override~
    ~POTN47.itm~ ~override~
    ~POTN48.itm~ ~override~
    WRITE_SHORT 0x4c 1
    BUT_ONLY_IF_IT_CHANGES

    COPY_EXISTING ~ar0115.bcs~ ~override~
    DECOMPILE_BCS_TO_BAF
    REPLACE_TEXTUALLY ~CreateCreature("MAREK",\[406.344\],0)~ ~CreateCreature("MAREK",[406.344],0) ActionOverride("Marek",CreateItem("POTN47",10,0,0))~
    REPLACE_TEXTUALLY ~!Dead("Marek")
    PartyHasItem("POTN47")
    THEN
    RESPONSE #100
    TakePartyItem("LOPOTN20")
    SetGlobal("PartyCured","GLOBAL",1)~ ~!Dead("Marek")
    !Global("StopCharmExploit","GLOBAL",1)
    PartyHasItem("POTN47")
    THEN
    RESPONSE #100
    TakePartyItem("LOPOTN20")
    SetGlobal("PartyCured","GLOBAL",1)
    SetGlobal("PickPocketCharm","GLOBAL",1)
    SetGlobal("MarekMove","GLOBAL",2)
    EraseJournalEntry(26793)
    EraseJournalEntry(26982)
    EraseJournalEntry(27240)
    EraseJournalEntry(27241)
    EraseJournalEntry(27242)
    EraseJournalEntry(27243)
    EraseJournalEntry(27183)~
    COMPILE_BAF_TO_BCS
    BUT_ONLY_IF_IT_CHANGES

    <<<<<<<< lothan.d
    ALTER_TRANS lothan BEGIN 19 END BEGIN 0 END BEGIN "UNSOLVED_JOURNAL" ~#26793~ END // Changes journal from "JOURNAL" to "UNSOLVED_JOURNAL".
    ALTER_TRANS lothan BEGIN 1 END BEGIN 0 END BEGIN "UNSOLVED_JOURNAL" ~#27240~ END // Adds back this journal entry similar to vBG1. Not sure why this was removed.
    >>>>>>>>
    COMPILE ~lothan.d~
    And watch out for the usual "br /" additions in the code.
    Post edited by Balquo on
  • cmorgancmorgan Member Posts: 707
    @Balquo - check COMPILE ~tenya2.d~ Tremain's son
  • BalquoBalquo Member, Developer Posts: 2,746
    cmorgan said:

    @Balquo - check COMPILE ~tenya2.d~ Tremain's son

    Good catch, thanks! Yet it wasn't causing any errors when installed. Strange.

  • BalquoBalquo Member, Developer Posts: 2,746
    edited August 2012
    Now that charm works I gave this a test and updated the code above with the appropriate fixes.
  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    @Balquo change Marak to Marek :)
  • BalquoBalquo Member, Developer Posts: 2,746
    And of course it's in the dialogue. This has already been implemented and is now @AndreaColombo 's job :D

    Sting 26792 - Should be Marek
  • Ascension64Ascension64 Member Posts: 560
    I haven't applied the fix, but I cannot see where you prevent Tenya2.dlg state 0 from triggering or prevent it transitioning to a state that mentions a child's body.
    Also, I do not agree with Shout(99) as that will prevent you from speaking to Jalantha Mistmyr about the cure for poison correctly.
  • BalquoBalquo Member, Developer Posts: 2,746
    edited August 2012
    @Ascension64
    That has also been corrected. Lothan has a new dialogue entry that will show if you did kill the priestesses. So if you are the evil kind or just happen to pick the wrong option with Tenya then you can still complete the poison quest. In vBG1 one of the dialogue responses in pumberl.dlg (the girl who summons both Tenya and Jalantha) will turn her hostile and therefore impossible to complete the poison quest, if you hadn't already summoned them that is.

    The original fix is already in the game - as is the new Lothan dialogue. The trigger to prevent Tenya from showing isn't on Tenya but on pumberl.dlg as she is the one who summons her. It also isn't in game yet.
  • AndreaColomboAndreaColombo Member Posts: 5,533
    Balquo said:

    Sting 26792 - Should be Marek

    Fixed.
  • Ascension64Ascension64 Member Posts: 560
    @Balquo.
    "The original fix is already in the game" - do you mean in build 0824?
  • BalquoBalquo Member, Developer Posts: 2,746
    @Ascension64
    Yes, everything in the OP has already been implemented. It either came with build 0824 or the one before - can't remember now.

    The code just a few posts up has not been implemented yet.
  • KeithSKeithS Member Posts: 623
    @Balquo Integrated
  • BalquoBalquo Member, Developer Posts: 2,746
    @KeithS
    @SethDavis

    I haven't fully checked this but if I find any bugs I'll post them later. I am going to post some dialogue stuff as I heard today is the last day for that to be included before release.

    Some of the dialogue was included but the following has been missed.

    * The Tenya journal entries have been included but are still using the original ones. I tweaked them to give a title "Tremain's son" and also editing the text a little to match what was going on - otherwise some don't make much sense. You can compare them with the originals to see what has changed.

    * The Marek has been given a brand new journal entry so if you complete the quest by pickpocketing or charming him you are given an appropriate journal entry. Otherwise the only journal entry is that you killed him...

    @Dave You can check that if this gets the go ahead.

    STRING_SET 1827 ~Tremain's son I have retrieved the child's body from the Umberlee Temple. It was a stroke of luck that Tenya was there, though I feel no better about being used before.~ STRING_SET 6332 ~Tremain's son It is Tenya who rules at the Temple of Umberlee! Our past association has not softened her demeanor, and it does make me wonder how they would treat a stranger! At least I recieved the child's body.~ STRING_SET 6354 ~Tremain's son It is the child priestess Tenya who appears to reign in the Temple of Umberlee. While I received the child's body, our fleeting acquaintance did not benefit me however, and I do not think I should return.~ STRING_SET 6355 ~Tremain's son It is the child priestess Tenya who appears to reign in the Temple of Umberlee. While I received the child's body, it was not without bloodshed. She turned on me and I was forced to kill her.~ STRING_SET 6356 ~The Temple of Umberlee has extended me sanctuary if required. I do not know which is more unnerving; that they have offered, or that I might need it.~ <<<<<<<< marek.d ALTER_TRANS marek BEGIN 5 END BEGIN 0 END BEGIN "SOLVED_JOURNAL" ~Marek and Lothander I managed with the use of trickery to obtain the antidote from Marek. I believe it best to avoid him in case he realizes what happened.~ END >>>>>>>> COMPILE ~marek.d~
  • DaveDave Member Posts: 200
    I'd make only a few small changes to the text, here:

    STRING_SET 1827 ~Tremain's son
    I have retrieved the child's body from the Umberlee Temple. It was a stroke of luck that Tenya was there, though I feel no better about being used before.~

    STRING_SET 6332 ~Tremain's son
    It is Tenya who rules at the Temple of Umberlee! Our past association has not softened her demeanor, and it does make me wonder how they would treat a stranger! At least I recieved the child's body.~

    STRING_SET 6354 ~Tremain's son
    It is the child priestess Tenya who appears to reign in the Temple of Umberlee. While I received the child's body, our fleeting acquaintance did not benefit me, and I do not think I should return.~

    STRING_SET 6355 ~Tremain's son
    It is the child priestess Tenya who appears to reign in the Temple of Umberlee. While I received the child's body, it was not without bloodshed. She turned on me, and I was forced to kill her.~

    STRING_SET 6356 ~The Temple of Umberlee has offered me sanctuary if required. I do not know which is more unnerving, that they have made the offer or that I might need to accept it.~

    <<<<<<<< marek.d
    ALTER_TRANS marek BEGIN 5 END BEGIN 0 END BEGIN "SOLVED_JOURNAL" ~Marek and Lothander
    Through the use of trickery I managed to obtain the antidote from Marek. I believe it best to avoid him in case he realizes what happened.~ END
    >>>>>>>>
    COMPILE ~marek.d~
  • BalquoBalquo Member, Developer Posts: 2,746
    edited September 2012
    @KeithS
    Here's the fixes.

    * You received 10000xp twice when completing Marek's quest. You should now only receive it once.
    * All the journal entries that Dave edited are ready to go, if they haven't been implemented already.
    * You need to remove the duplicate text from Lothan.dlg. I included a lazy fix. You should remove them manually if you can. These are the dups: Response 20, Response 27, Response Trigger 1, Action 5, State 16 and State 17. I tried to do this in NI and it was a mess. But you probably have a better method.

    // Removes duplicate dialogue response option by adding False(). // DO NOT USE THIS IF YOU REMOVE THE DUPLICATED ENTRIES MANUALLY <<<<<<<< lothan.d REPLACE_TRANS_TRIGGER lothan BEGIN 12 END BEGIN 1 END ~!PartyHasItem("SCRLJALA")~ ~False()~ REPLACE_TRANS_TRIGGER lothan BEGIN 12 END BEGIN 1 END ~OR(3)~ ~~ REPLACE_TRANS_TRIGGER lothan BEGIN 12 END BEGIN 1 END ~Dead("pumberl")~ ~~ REPLACE_TRANS_TRIGGER lothan BEGIN 12 END BEGIN 1 END ~Dead("Jalantha")~ ~~ REPLACE_TRANS_TRIGGER lothan BEGIN 12 END BEGIN 1 END ~Dead("Tenya2")~ ~~ >>>>>>>> COMPILE ~lothan.d~ // You recieve 10000xp twice. You should only recieve it once. COPY_EXISTING ~marek.dlg~ ~override~ DECOMPILE_AND_PATCH BEGIN REPLACE_TEXTUALLY ~AddexperienceParty(10000) EraseJournalEntry(26793) EraseJournalEntry(26982)~ ~EraseJournalEntry(26793) EraseJournalEntry(26982)~ END // Tenya journal corrections. STRING_SET 1827 ~Tremain's son I have retrieved the child's body from the Umberlee Temple. It was a stroke of luck that Tenya was there, though I feel no better about being used before.~ STRING_SET 6332 ~Tremain's son It is Tenya who rules at the Temple of Umberlee! Our past association has not softened her demeanor, and it does make me wonder how they would treat a stranger! At least I recieved the child's body.~ STRING_SET 6354 ~Tremain's son It is the child priestess Tenya who appears to reign in the Temple of Umberlee. While I received the child's body, our fleeting acquaintance did not benefit me however, and I do not think I should return.~ STRING_SET 6355 ~Tremain's son It is the child priestess Tenya who appears to reign in the Temple of Umberlee. While I received the child's body, it was not without bloodshed. She turned on me and I was forced to kill her.~ STRING_SET 6356 ~The Temple of Umberlee has extended me sanctuary if required. I do not know which is more unnerving; that they have offered, or that I might need it.~ // Add new journal entry if you solve the quest via pickpocketing or charming. <<<<<<<< marek.d ALTER_TRANS marek BEGIN 5 END BEGIN 0 END BEGIN "SOLVED_JOURNAL" ~Marek and Lothander I managed with the use of trickery to obtain the antidote from Marek. I believe it best to avoid him in case he realizes what happened.~ END >>>>>>>> COMPILE ~marek.d~
Sign In or Register to comment.