Jump to content

Those #31231 things in decompiled DLG files


temnix

Recommended Posts

If you decompile a DLG as a D file and open it, existing lines from DIALOG.TLK are shown as line numbers after a hash sign, like this: SAY #13213 /* After the asterisk the editor shows the content of the string, which is what matters, but this is probably only a convenience feature. For compiling this again it's the number that is going to be taken into account. I really wish the decompiler would not put these hashes and numbers but instead put the string directly there. Weidu supposedly doesn't create duplicate strings anyway, so unchanged content would stay. But here is my practical question: do I have to eliminate the hashes for installing my mod on an Enhanced Edition Trilogy system? Because the references are going to be wrong, if I keep them as numbers. Out of this concern I routinely, and I mean very routinely, go even through strings I don't intend to change, remove the hash and number and keep only the actual string so that on compilation Weidu will make or find the string with the same content. That's very thoughtful of me,  but do I have to do this?

Link to comment

Strrefs are more than just the strings. They also include associated sounds and flags that describe how these strings are displayed. Moreover, some languages contain separate female strings. Using string references is the most accurate way to reproduce the content of a dialog structure.

To adjust BG1 dialogs for EET you simply have to add 200000 to their strref values (provided all string references are available in vanilla BG1 or SoD).

Link to comment

By flags you mean that they contain tokens? That doesn't need to be added on purpose, neither does "Has text." As for associated sounds, the sound files in brackets are also exported, along with string content. There is no reason whatever not to just show the strings. On the other hand, if I wanted to add 200000 to string numbers in my mod compatible with both SoA or standalone BGEE and EET, I would need a duplicate for every state or a duplicate for every file, kept in separate folders and compiled after GAME_IS checks. And that's a serious pain in the arse. I had to rewrite a long dialogue for a demon in the second game, and it was not fun to go through all of the string numbers in the exported file and put 2 before them, or sometimes 20 (can't be automated either) in a copy of that conversation. If I had thought about it before, I would simply have deleted the strrefs and written out the words, only that's nearly as time-consuming. Why did the EET people increase the number range anyway? Why didn't they just go with string content?

Edited by temnix
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...