Jump to content

Imoen's banter file


Recommended Posts

This isn't a bug report, it's just a question about using Imoen's BG2 banter file.

 

Now we all know that merely adding Imoen's banter file to interdia.2da isn't all that's needed to use Imoen's banter file in game. You've also got to BEGIN BIMOEN2 before you can call on it. But beginning it a second time wipes out changes from the first.

 

However, if I put a BEGIN BIMOEN2 at the top of Gavin's Imoen banter, and Jastey's done the same for BG2 Ajantis, installing Gavin would break Ajantis's Imoen banters, since Ajantis will be out long before Gavin.

 

How do we get around this?

 

I've checked the BG2 Fixpack for something that begins Imoen's banter file, and I haven't found it anywhere. Suggestions?

Link to comment

From BG1NPC:

 

	/* Imoen BIMOEN.DLG rebuild */
 ACTION_IF NOT (FILE_EXISTS_IN_GAME ~_bimoen.dlg~) AND (FILE_EXISTS_IN_GAME ~FW0100.are~) THEN BEGIN
COMPILE ~BG1NPC/Core/DLG/X#BIMOEN_TUTU.D~
 END ELSE BEGIN
ACTION_IF NOT (FILE_EXISTS_IN_GAME ~bimoen2.dlg~) AND (FILE_EXISTS_IN_GAME ~AR7200.are~) THEN BEGIN
  COMPILE ~BG1NPC/Core/DLG/X#BIMOEN_BGT.D~
END
 END

 

Dialogue files do not need a BEGIN if they already exist, then all they need is an APPEND or EXTERN via CHAIN. So the only time you need to include a separate file is when the pdialog.2da does not show her as having the file.

 

This one is for Tutu/BGT, but I'd just do the same without all the checks. I have seen this a few places - will be back later with references...

Link to comment

Ok, I can work with that. If you want to use BIMOEN2, do this, where pre_ is the modder prefix:

 

ACTION_IF NOT FILE_EXISTS_IN_GAME ~bimoen2.dlg~ THEN BEGIN
COMPILE ~mymod/dialogue/pre_bimoen2.d~
COMPILE ~mymod/dialogue/pre_banter.d~
 END ELSE BEGIN
COMPILE ~mymod/dialogue/pre_banter.d~
 END
END

And this in pre_bimoen2.d:

BEGIN BIMOEN2

Like we did with the initiation file for Gavin.

Link to comment

Yep; the part that got me for awhile when I started was that the compilation of a .d had nothing at all to do with the name of the .d. The use of BEGIN creates the dialog reference in-game.

 

And you then just confirm that the thing is in the interdia.2da

 

JCompton's/Kelsey's version, for ToB:

 

APPEND ~interdia.2da~
~IMOEN2		BIMOEN2	  BIMOEN25~
UNLESS ~Imoen2~
IF ~25POST~

 

 

or BG1NPCs for adapting:

 

  /* .2da patching */
 ACTION_IF FILE_EXISTS_IN_GAME ~FW0100.are~ THEN BEGIN
APPEND ~interdia.2da~ ~IMOEN					_BIMOEN~ UNLESS ~_\(BIMOEN\|bimoen\)~
 END ELSE BEGIN  /* BGT Versions */
COPY_EXISTING ~interdia.2da~ ~override~
  REPLACE_TEXTUALLY ~IMOEN2[ %tab%]+NONE[ %tab%]+BIMOEN25~
	~IMOEN2	  BIMOEN2	   BIMOEN25~
BUT_ONLY_IF_IT_CHANGES
 END

 

 

There is a more elegant approach, which I think is pretty cool. Imoen exists, but her banter file doesn't. [don't use this code without testing it on a throwaway - I may have gotten something wrong, but it is a pretty cool idea used in a couple of mods]

 

COPY_EXISTING ~interdia.2da~ ~override~

COUNT_2DA_ROWS 4 "cnt_row"

FOR ( cnt=0; cnt<"%cnt_row%"; cnt=cnt+1 ) BEGIN

READ_2DA_ENTRY "%cnt%" 0 4 "pd_name"

PATCH_IF (("%pd_name%" STRING_COMPARE_CASE "IMOEN2")=0) BEGIN

SET_2DA_ENTRY "%cnt%" 2 4 "BIMOEN2"

END

END

BUT_ONLY_IF_IT_CHANGES

 

If I converted this right, it opens up interdia.2da, looks for three columns of data, searches row 0 to find IMOEN2, and if it finds it sets the second column to read "BIMOEN2".

 

Worth a shot...

Link to comment

I can look back for the research, if you want, and find out why it started - [begin rampant and completely unsupported speculation] I am assuming that since Tutu (original) did not copy unused resources, this was one of the earliest Tutu original fixes to allow the banterfile to be created. It also could be that folks used outside tools to "clean" their installs back in the day.[end rampant and completely unsupported speculation] .

 

The good news is that the code does not do anything unless BIMOEN is not assigned. If it is assigned, then one need not worry - if it is unassigned, then a brand new banterfile is created over the empty one... a millisecond of time to make sure that everything works.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...