Author Topic: Duke Eltan doesn't appear if brough to the Harbor Master  (Read 4543 times)

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Duke Eltan doesn't appear if brough to the Harbor Master
« on: April 05, 2014, 04:20:46 AM »
I wrote a whole encounter for Duke Eltan after he is in the Harbor Master's building - only to notice that in the original game, he doesn't appear? Since he has dialogue for this, this seems like UB to me! (And I got so accustomed to seeing his dialogue in the dlg that I imagined him appearing there.)

So, I am offereing to include the following into UB (this will be compatible with BG1RE). It's nothing grande, just two lines of text, but it's there and not used, appearently.

Duke Eltan in the Harbor Master's Building

/* Put Duke Eltan into the Harbor Master's Building */
ACTION_IF GAME_IS ~bgt~ THEN BEGIN
EXTEND_BOTTOM ~%BaldursGateDocks_Harbormaster%.bcs~ ~bg1ub/eltan/eltan_AR0702.baf~
      EVALUATE_BUFFER

END ELSE BEGIN //Tutu, BG:EE and BG
EXTEND_BOTTOM ~%tutu_var%AR0702.bcs~ ~bg1ub/eltan/eltan_AR0702.baf~
      EVALUATE_BUFFER
END

eltan_AR0702.baf:
Quote
IF %BGT_VAR%
   Global("EltanMove","GLOBAL",1)
   !Exists("Eltan")
   !Dead("Eltan")
   !Dead("Eltan2")
   
THEN
   RESPONSE #100 
        CreateCreature("%tutu_var%DELTAN",[325.290]%FACE_14%)
   Continue()
END
« Last Edit: April 07, 2014, 09:25:23 AM by jastey »

Offline Balquo

  • Planewalker
  • *****
  • Posts: 30
Re: Duke Eltan doesn't appear if brough to the Harbor Master
« Reply #1 on: April 07, 2014, 07:53:55 AM »
Nice find. So what actually is the dialogue he uses?

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Re: Duke Eltan doesn't appear if brough to the Harbor Master
« Reply #2 on: April 07, 2014, 08:05:12 AM »
As I said, it's not much.

DELTAN.dlg
BG1:
Quote
IF WEIGHT #3 ~Global("EltanMove","GLOBAL",1)
~ THEN BEGIN 13 // from:
  SAY #2162 /* ~I should be safe here; in the mean time,  you have quite the task ahead of you.  If I'm right, the Iron Throne is going to stage a coup.  You're the only ones who'll be able to stop them.  ~ */
  IF ~~ THEN DO ~SetGlobal("EltanMove","GLOBAL",2)
~ JOURNAL #6593 /* ~We killed Rashad, who turned out to be a doppleganger.  He had been poisoning Grand Duke Eltan for days.~ */ EXIT
END

IF WEIGHT #5 /* Triggers after states #: 15 even though they appear after this state */
~True()
~ THEN BEGIN 14 // from:
  SAY #6127 /* ~What are you still doing here?  You have much to do, hurry!~ */
  IF ~~ THEN EXIT
END

But the condition is already set (Global("EltanMove","GLOBAL",1) is set in the Harbor Master's dialogue), and the actions and journal entries are a mirroring of what is done in DELTAN state 12 (this is also valid for BG:EE that added some EraseJournalEntrys etc.), so nothing has to be changed to make this work, other than to let him spawn in the Harbor Master's Building. We use the code in bg1re (in additon with added reply option to the DELTAN state14) as well, and it works flawlessly.

Offline Balquo

  • Planewalker
  • *****
  • Posts: 30
Re: Duke Eltan doesn't appear if brough to the Harbor Master
« Reply #3 on: April 07, 2014, 08:45:03 AM »
Might need to remove EscapeArea() from the harbor master when you hand over the duke's body. She also has dialogue if talked to again.
Quote
You guys shouldn't be hanging 'round here. Ya might bring attention to Duke Eltan.
« Last Edit: April 07, 2014, 08:45:39 AM by Balquo »

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Re: Duke Eltan doesn't appear if brough to the Harbor Master
« Reply #4 on: April 07, 2014, 08:54:42 AM »
True! I didn't notice she does EscapeArea(). (I didn't notice it's a she, either. Ahem...) I'll have a look at it. I'm not sure I know how to remove one action out of many. Is it possible without replacing the whole transaction list?
« Last Edit: April 07, 2014, 08:56:20 AM by jastey »

Offline Balquo

  • Planewalker
  • *****
  • Posts: 30
Re: Duke Eltan doesn't appear if brough to the Harbor Master
« Reply #5 on: April 07, 2014, 03:05:11 PM »
replace textually?

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Re: Duke Eltan doesn't appear if brough to the Harbor Master
« Reply #6 on: April 07, 2014, 03:13:43 PM »
That would be for the whole file? Well, it would work here as it's only EscapeArea() for the one dialogue state inside the harbor.dlg.

Offline Balquo

  • Planewalker
  • *****
  • Posts: 30
Re: Duke Eltan doesn't appear if brough to the Harbor Master
« Reply #7 on: April 07, 2014, 03:46:03 PM »
Not really sure if you can pinpoint to a state action other than using alter trans. weidu request? heh.  But replace textually should be fine as as you say, the only escape areas there are the ones we need to remove.
« Last Edit: April 08, 2014, 12:43:53 PM by Balquo »

Offline Balquo

  • Planewalker
  • *****
  • Posts: 30
Re: Duke Eltan doesn't appear if brough to the Harbor Master
« Reply #8 on: April 09, 2014, 01:13:17 PM »
Harbor Master's final words when leaving off Eltan:

Quote
Don't worry about Eltan, I'll keep good care of him. I've got to get him to a safe place, so good luck.
Could explain the EscapeArea()?

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Re: Duke Eltan doesn't appear if brough to the Harbor Master
« Reply #9 on: April 10, 2014, 03:13:15 AM »
Yes, that's probably also the reason why he isn't there. Hm.

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Re: Duke Eltan doesn't appear if brough to the Harbor Master
« Reply #10 on: April 11, 2014, 03:47:26 PM »
The component doesn't work for Tutu: The trigger of Lord Eltan's first line has to be changed from false to the trigger variable.

I am thinking about takijng the component down - the Harbor Master states she will bring Lord Eltan to a safe place, it makes little sense for her to remain there, then, and even less for Eltan to be in the Harbor Master's Building.

Hmpf. :)

Offline Balquo

  • Planewalker
  • *****
  • Posts: 30
Re: Duke Eltan doesn't appear if brough to the Harbor Master
« Reply #11 on: April 12, 2014, 01:15:39 AM »
I suppose it makes more sense her leaving with the Duke, as anyone could have followed you there and killed them once you left.

I was playing around with this: check in bgee
Quote
<<<<<<<< ...inlined/harbor.d
REPLACE_ACTION_TEXT harbor ~EscapeArea()~ ~MoveToPoint([431.171])
CreateCreatureImpassable("DELTAN2",[449.121],14)
Wait(1)
MoveToPoint([461.197])
Face(0)
DialogInterrupt(TRUE)~
REPLACE_ACTION_TEXT harbor ~ActionOverride("Eltan2",SetNumTimesTalkedTo(100))~ ~DestroyItem("MISC55")~
REPLACE_ACTION_TEXT harbor ~EraseJournalEntry(27137)~ ~DialogInterrupt(FALSE)~
REPLACE_TRIGGER_TEXT deltan2 ~True()~ ~Dead("Rashad") Global("EltanMove","GLOBAL",0)~
ADD_STATE_TRIGGER deltan2 1 ~Global("EltanMove","GLOBAL",1)~
ADD_TRANS_ACTION deltan2 BEGIN 1 END BEGIN END ~SetGlobal("EltanMove","GLOBAL",2)~
ADD_STATE_TRIGGER deltan2 2 ~Global("EltanMove","GLOBAL",2)~
>>>>>>>>
COMPILE ~...inlined/harbor.d~

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Re: Duke Eltan doesn't appear if brough to the Harbor Master
« Reply #12 on: April 12, 2014, 02:01:32 AM »
Oh, that is beautiful! (It won't work in BG1, though.)

Only question: Why do you replace the "EraseJournalEntry(27137)"? I'd prefer keeping it in, and changing the one line to

REPLACE_ACTION_TEXT harbor ~EraseJournalEntry(27137)~ ~DialogInterrupt(FALSE) EraseJournalEntry(27137)~

Offline Balquo

  • Planewalker
  • *****
  • Posts: 30
Re: Duke Eltan doesn't appear if brough to the Harbor Master
« Reply #13 on: April 12, 2014, 11:12:28 AM »
Ah, good catch.

Replace:
Quote
REPLACE_ACTION_TEXT harbor ~EraseJournalEntry(27137)~ ~DialogInterrupt(FALSE)~
with
Quote
ADD_TRANS_ACTION harbor BEGIN 9 END BEGIN END ~DialogInterrupt(FALSE)~

and that will fix the "bug" and make it work in BG1... assuming that was the problem?
« Last Edit: April 12, 2014, 11:35:25 AM by Balquo »

Offline Balquo

  • Planewalker
  • *****
  • Posts: 30
Re: Duke Eltan doesn't appear if brough to the Harbor Master
« Reply #14 on: April 12, 2014, 11:41:39 AM »
Oh, CreateCreatureImpassable doesn't exist. I assume that is the problem then?
« Last Edit: April 12, 2014, 11:42:19 AM by Balquo »

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Re: Duke Eltan doesn't appear if brough to the Harbor Master
« Reply #15 on: April 12, 2014, 01:10:38 PM »
Without having checked, but yes, the CreateCreatureImpassable will be the problem for BG1.

I could still fiddle something for classic BG1 and use your solution for all the other games. I really like it!

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Re: Duke Eltan doesn't appear if brough to the Harbor Master
« Reply #16 on: April 12, 2014, 03:24:41 PM »
I would like to use your code for the BG1RE component, too. How would I make this code compatible? Do I have to work with a marker file in the override? Or would the doubled ADD_ patches work if doubled, too?

Offline Balquo

  • Planewalker
  • *****
  • Posts: 30
Re: Duke Eltan doesn't appear if brough to the Harbor Master
« Reply #17 on: April 13, 2014, 12:18:05 AM »
I actually have no idea on getting things working for other version. That is something I would need to look into. What is BG1RE?

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Re: Duke Eltan doesn't appear if brough to the Harbor Master
« Reply #18 on: April 13, 2014, 02:48:17 AM »
This is the code that works on BG:EE, Tutu, and BGT:

Quote
ACTION_IF GAME_IS ~tutu tutu_totsc bgt bgee~ THEN BEGIN

<<<<<<<< ...inlined/harbor.d
REPLACE_ACTION_TEXT %tutu_var%harbor ~EscapeArea()~ ~MoveToPoint([431.171])
CreateCreatureImpassable("%tutu_var%DELTAN2",[449.121],14)
Wait(1)
MoveToPoint([461.197])
Face(0)
DialogInterrupt(TRUE)~
REPLACE_ACTION_TEXT %tutu_var%harbor ~ActionOverride("Eltan2",SetNumTimesTalkedTo(100))~ ~DestroyItem("%tutu_var%MISC55")~
ADD_TRANS_ACTION %tutu_var%harbor BEGIN 9 END BEGIN END ~DialogInterrupt(FALSE)~
REPLACE_TRIGGER_TEXT %tutu_var%deltan2 ~True()~ ~Dead("Rashad") Global("EltanMove","GLOBAL",0)~
ADD_STATE_TRIGGER %tutu_var%deltan2 1 ~Global("EltanMove","GLOBAL",1)~
ADD_TRANS_ACTION %tutu_var%deltan2 BEGIN 1 END BEGIN END ~SetGlobal("EltanMove","GLOBAL",2)~
ADD_STATE_TRIGGER %tutu_var%deltan2 2 ~Global("EltanMove","GLOBAL",2)~
>>>>>>>>
COMPILE EVALUATE_BUFFER ~...inlined/harbor.d~

END

Since the cre cannot be created on the bench for vanilla BG1, I would go with something along the lines of your version for it, but let "DELTAN.cre" be spawned, so he doesn't lie on the floor... This works:
Quote
ACTION_IF GAME_IS ~bg1 totsc~ THEN BEGIN

<<<<<<<< ...inlined/harbor.d
REPLACE_ACTION_TEXT harbor ~EscapeArea()~ ~MoveToPoint([406.206])
CreateCreature("DELTAN",[426.160]%FACE_0%)
ActionOverride("Eltan",DestroyItem("PLAT04"))
ActionOverride("Eltan",DestroyItem("SHLD03"))
ActionOverride("Eltan",DestroyItem("SW1H05"))
ActionOverride("Eltan",DestroyItem("BOOK68"))
Wait(1)
MoveToPoint([465.193])
Face(2)
DialogInterrupt(TRUE)~
REPLACE_ACTION_TEXT harbor ~ActionOverride("Eltan2",SetNumTimesTalkedTo(100))~ ~DestroyItem("%tutu_var%MISC55")~
ADD_TRANS_ACTION harbor BEGIN 9 END BEGIN END ~DialogInterrupt(FALSE)~
>>>>>>>>
COMPILE EVALUATE_BUFFER ~...inlined/harbor.d~
END

BG1RE is my current mod project in testing "Romantic Encounters for BG1" which has a component "Duke Eltan's Spare Minute" and introduces Duke Eltan into the Harbor Master's Building with additional dialogue (patched on to the original one). I am using your code there, too, so I was worried about compatibility. Currently, if the above code is applied by two mods, the patching is only done once, but the "DialogInterrupt(FALSE)" is then present two times in a row. This doesn't have any influence in the game, though, so I guess I'll declare the two mods compatible.

Offline Cybersquirt

  • Socialist Evil-Doer
  • Planewalker
  • *****
  • Posts: 816
  • Gender: Female
Re: Duke Eltan doesn't appear if brough to the Harbor Master
« Reply #19 on: April 13, 2014, 04:45:26 AM »
Thank you for keeping Tutu in mind. :kiss:
Stupid is as stupid does.

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Re: Duke Eltan doesn't appear if brough to the Harbor Master
« Reply #20 on: April 13, 2014, 05:20:28 AM »
I know Tutu is still being played, but it's good to get feedback once in a while! :)

I am about to silently stop support for vanilla BG1, though. Not for BG1UB, and probably not for my own BG1 mods that are already available (including BG1RE), but for any new mod I'll write. The engine restrictions are vexing, and there I think assuming players don't play it any more is a valid assumption.

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Re: Duke Eltan doesn't appear if brough to the Harbor Master
« Reply #21 on: April 13, 2014, 05:26:42 AM »
The new version (14-04-13) will have the above code implemented.

It introduces a slight inconsistency, as the Harbor Master and the journal entry state that she will bring Duke Eltan to a safe place. Do not install the component, if this disturbs you.

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Re: Duke Eltan doesn't appear if brough to the Harbor Master
« Reply #22 on: April 23, 2014, 10:07:02 AM »
The trigger ~Dead("Rashad") Global("EltanMove","GLOBAL",0)~ doesn't seem to work for BGT. I am waiting for a test result, but I'll probably change it to only ~Global("EltanMove","GLOBAL",0)~.

EDIT: OK, test result positive. The next version will have the corrected trigger.
« Last Edit: April 23, 2014, 10:10:55 AM by jastey »

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Re: Duke Eltan doesn't appear if brough to the Harbor Master
« Reply #23 on: April 23, 2014, 10:44:09 AM »
Next problem: In BGT, the patching doesn't work
Quote
REPLACE_ACTION_TEXT %tutu_var%harbor ~EscapeArea()~ ~MoveToPoint([431.171])

because it is "EscapeAreaDestroy(90)"

How would I write the code so it patches both (all) instances? EDIT: Problem solved, I have the general code. Thank you, Ardanis! The next version will also install on BGT.
« Last Edit: April 23, 2014, 02:51:00 PM 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)?: