Jump to content

Replace multiple dialog/text using WeiDU


Roberciiik

Recommended Posts

Hi,

I need to replace some dialogs from few characters in BGEE. As an example, let's consider Phlydia's initial dialog (which is #15993), I want to replace it with my @1 in phlydi.tra file.

I've tried this one: 

STRING_SET 15993 @1 USING "mymod/phlydi.tra"

But nothing happened. I opened NI and the game, and Phlydia still answers with #15993. Do I need something more to apply this replacement? I think this way would be the easiest way to replace a pack of dialogs.

Moreover, as per my understanding, it will not work with EET, because strref will be different, right?

 

I've also tested altering tlk, but I did something wrong so it's also not working.

ALTER_TLK_LIST BEGIN 15993 END BEGIN
        PATCH_WITH_TRA ~mymod/phlydi.tra~ BEGIN
            Phy1 = RESOLVE_STR_REF( @1 )
            GET_STRREF %Phy1% phyStr
            GET_STRREF 15993 myStr1
                           
            REPLACE_TEXTUALLY ~%myStr1%~ ~%phyStr%~
        END
    END

"REPLACE ~%myStr1%~ @1" also did not work.

 

I've found also this idea: http://www.shsforums.net/topic/27196-bgt-string-references/?p=312437 but it looks like overhead to my simple replacement. Maybe it will be required to apply replacement to EET.

 

Finnaly, I'm considering decompile all .dlg files and store them in temp folder, then replace strref, and then recompile them to override folder. But still it is more complicated way. 

 

Thanks,

Roberciiik

Link to comment

If you know the stringref number, STRING_SET should be what you need. Have a look at my Imoen4Ever mod, e.g. imoen4ever/tpa/string_set.tpa. I use STRING_SET to change references of Imoen into references about Irenicus. My first guess would be that you got the syntax wrong somehow / put it into the wrong file type maybe. If you used it in your tp2 and it didn't work, please post your code here.

3 hours ago, Roberciiik said:

Moreover, as per my understanding, it will not work with EET, because strref will be different, right?

Differences between BG:EE(SoD) and EET is easy: the stringref number of EET is 200,000 + the number of BG:EE(SoD). For BGII(:EE), stringrefs between BGII:EE and EET are the same.

Thus, if your BG:EE stringref is #15993, for EET it is #215993. I am dealing with this in Imoen4Ever, too, and do it via OUTER_SET variables.

If you want to cover the same (BG1-) stringref for BGT, too - then it gets complicated and I can't help you with how to find the right stringrefs of the BG1 part.

 

Link to comment

Thank you jastey!

I found out why my replacement had not worked... I installed my mod over BGEE without modmerge. I thought that installation would fail if I try to install mods when SoD is active. Anyway thank you for your good examples in imoen4ever, I will check correctness of my mod with your examples.

 

36 minutes ago, jastey said:

Differences between BG:EE(SoD) and EET is easy: the stringref number of EET is 200,000 + the number of BG:EE(SoD). For BGII(:EE), stringrefs between BGII:EE and EET are the same.

About EET: it is great to know! It will really help me to align my mod to EET as well.

For BGT I probably would need to use Miloch and Ascension64 method provided in the link. But base games are more important to me right now. 

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