Jump to content

Strings not getting removed with uninstallation


temnix

Recommended Posts

My mod-created strings aren't getting erased together with the mod. What's more, there are so many duplicates and different versions that it seems that Weidu keeps adding to the dialogue file instead of updating text. I could blame some of this on aborted installations, but not the latest strings written just for the last version of the mod. The mod I removed to make a clean installation later, but the strings are still here. Why? This is throwing off descriptions, by the way. I keep seeing text which should not be there anymore, even though the TRA file is correct now. A, say, @1 reference in the tp2 points to updated text, but in the game I keep seeing old stuff or even irrelevant lines. I'm now going through the TLK and pulling out strings by hand, but I would like to know what the problem is.

Link to comment

That's just how WEIDU works. If you add a string to dialog.tlk it stays there permanently, even if you uninstall the mod. If you install a new "Swrod of Awesomeenss" and set the name string using SAY, and the first unused string in dialog.tlk is 104,011, WEIDU sets string 104,011 to "Swrod of Awesomeenss" and then sets the name field to 104,011. If you uninstall the mod, the new item file disappears but string 104,011 is still there. If you then correct your spelling and reinstall the 'Sword of Awesomeness', WEIDU will set string 104,012 to "Sword of Awesomeness" and then set the name field to 104,012. String 104,011 is still there, but since no item's name field is set to 104,011, you won't see it in-game.

(As for why it works that way, I think it made WEIDU's backup system easier back in the early days of WEIDU modding, because it meant it didn't need to back up dialog.tlk, and unused strings in dialog.tlk are harmless. )

Link to comment
8 minutes ago, Bartimaeus said:

Additionally, creating a backup of dialog.tlk for every component that adds or modifies a string would probably add somewhere between 5 and 10 GB for most non-minimalistic mod installs. That would be a bit annoying for harmless strings.

It's not quite that bad - the uninstaller doesn't just back up the whole of dialog.tlk. It's about 900kB for a SET_STRING component, I think. But agreed, there's no point doing that unless you actually are modifying an in-game string. (I do this on occasion - it's a convenient way to change a string that's multiply referenced, like a spell or class description.)

Link to comment
21 minutes ago, DavidW said:

(As for why it works that way, I think it made WEIDU's backup system easier back in the early days of WEIDU modding, because it meant it didn't need to back up dialog.tlk, and unused strings in dialog.tlk are harmless. )

It's not so much the problem of backing up the tlk (or changes to it), it was more that removing strings on installation would cause the mods being reinstalled to end up as different string refs. Doing it that way would break any references that end up in save games--e.g. pretty much anything from a mod NPC's name and sound set--if you started reinstalling or re-ordering components. (Granted, players shouldn't be doing that anyway.)

Link to comment
2 hours ago, temnix said:

What's more, there are so many duplicates and different versions that it seems that Weidu keeps adding to the dialogue file instead of updating text

Worth also mentioning, in general Weidu doesn’t add duplicate strings. If you add an item and SAY NAME1 ~Sword of Awesomeness~, and the next available string is 104,012 but that string already exists at 85,323, then Weidu will set your item’s name to 85,323 and it won’t bother adding a new string. 

(Generally. I think.)

Link to comment
On 8/14/2020 at 2:15 PM, subtledoctor said:

Worth also mentioning, in general Weidu doesn’t add duplicate strings. If you add an item and SAY NAME1 ~Sword of Awesomeness~, and the next available string is 104,012 but that string already exists at 85,323, then Weidu will set your item’s name to 85,323 and it won’t bother adding a new string. 

(Generally. I think.)

Yes. Further, it'll use the highest reference of the string, e.g. if your string already exists at 1234 and 5678, WeiDU will assign 5678.

Link to comment
On 8/14/2020 at 11:15 PM, subtledoctor said:

Worth also mentioning, in general Weidu doesn’t add duplicate strings. If you add an item and SAY NAME1 ~Sword of Awesomeness~, and the next available string is 104,012 but that string already exists at 85,323, then Weidu will set your item’s name to 85,323 and it won’t bother adding a new string. 

What's the reasoning for this? Helping the translators?

From the world where I come from (GUI development using a framework called Qt), this is solved by the translation tool, which will hint the translator with an already translated string coming from the same text, but will still allow for changing. Quoting from the manual:

Quote

For example, open in English might become öffnen, "open file", or aufbauen, "open internet connection", in German

Link to comment
52 minutes ago, suy said:

What's the reasoning for this? Helping the translators?

It was a feature within the tool from somewhere around 2000 and 2003. By the original maker, all hail Westley Weimer. So no, it was not to help translators, as the game was a single language only, but was able to help in translation from one language to another by then, as you could replace the original dialog.tlk with a different original one if you had a clean install and that would potentially keep your game in the same patch without complicated online differential calculations, that can be made today, but not so much in the past.

Edited by Jarno Mikkola
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...