Jump to content


Photo

How to best bulk-patch a large number of strings.


  • Please log in to reply
7 replies to this topic

#1 Ulb

Ulb
  • Modder
  • 373 posts

Posted 15 January 2018 - 12:09 PM

Hey, I'm looking for the best way to alter a large amount of strings directly in the dialogue.tlk file.

(The strings come from multiple .dlg files so I figure it is easier to simply patch the .tlk file. This way I also avoid patching any triggers by default.)

 

The strings that need to be altered are currently sitting in a master file and still need to be modified.

I know that there is probably a good way to have WeiDU loop through an extern file and patch the strings with modified versions from another file but being the WeiDU noob I am, I have really no clue how to get there.

 

The best way I could do it right now is to simply put each string in a "REPLACE_TEXTUALLY" line but that seems like a terrible way to do it..

 


ALTER_TLK BEGIN
REPLACE_TEXTUALLY CASE_SENSITIVE ~string1a~ ~string1b~
…
REPLACE_TEXTUALLY CASE_SENSITIVE ~stringXa~ ~stringXb~
END

 



#2 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Modder
  • 1505 posts

Posted 15 January 2018 - 12:21 PM

I guess I'm not clear on what exactly you're looking to do. What you're proposing would work if, say, you wanted to change every reference to a name to something else, e.g. from "Nizidramanii'yt" to "Bob". If it's just changing the contents of individual strings, then this:

STRING_SET 
1234 ~new #1234 string~
5678 ~new #5678 string~

is more what you want.


Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.
____
The Gibberlings Three - Home of IE Mods

The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.


#3 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5150 posts

Posted 15 January 2018 - 12:44 PM

And you can find the original string number(the "1234" in the above) with Near Infinity ...

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#4 Ulb

Ulb
  • Modder
  • 373 posts

Posted 15 January 2018 - 01:26 PM

Hey, thanks for the answers.

 

I was under the impression EET was now patching strings from BG1EE dynamically? So using STRING_SET would not work?

 

Besides, I already have all the strings in a file now and I didn't save the string numbers in that file. So, unless there is a major draw back to using REPLACE_TEXTUALLY I'd rather not go through all the files again to note down the string numbers. (I am aware that some generic phrases might be present in multiple strings. I have those phrases marked separately and plan to patch them in their corresponding .dlg files, so that should not be an issue.)

Oh yeah, and I also patch strings that are added by mods...

 

In any case, I'm more looking for a way to tell WeiDU to look for all strings in file A and then replace them with the corresponding string from file B instead of adding 100 odd lines of REPLACE_TEXTUALLY..



#5 Roxanne

Roxanne

    Modder

  • Member
  • 3564 posts

Posted 15 January 2018 - 01:49 PM

Hey, thanks for the answers.

 

I was under the impression EET was now patching strings from BG1EE dynamically? So using STRING_SET would not work?

EET just adds 200000 to the BG1 strings so e.g. 70019 in BG1/SoD becomes 270019 in EET. So you can patch strings with that.


The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*

 


#6 Ulb

Ulb
  • Modder
  • 373 posts

Posted 15 January 2018 - 02:07 PM

Ahh, okay..

Still, I see no need to go through the extra work of doing that.



#7 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Modder
  • 1505 posts

Posted 15 January 2018 - 02:13 PM

I had written a small macro that patched my stuff to use either the straight string numbers for IWD or add the +79000 for ones for IWD-in-BG2. I'll see if I can find it, as you could probably use it to the same effect here.


Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.
____
The Gibberlings Three - Home of IE Mods

The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.


#8 Ulb

Ulb
  • Modder
  • 373 posts

Posted 15 January 2018 - 02:57 PM

I am not sure I understand what your macro does, will it help me with patching the strings from a file or simply help me to move over to SET_STRING instead of REPLACE_TEXTUALLY (which I would rather not do)?

Thank you in any case.. :)