View Single Post
Old 11-16-2005, 06:27 PM   #6
Network Caretaker
stoffe's Avatar
Status: Administrator
Join Date: Apr 2002
Posts: 5,833
Helpful! 10 year veteran! Notable contributor 
Originally Posted by Bunk
This sounds like about the only option I would have. Essentially what I want to do is compile a big list of:

"Speaker","Text String of what is said","File Name of the VO-resref that goes with it"

If you could write something that would just let me open the file, and display the relevent info (or even better, copy it to the clipboard) - that would be amazing. I'll do the work of opening all the dialogues and combining all of it in to one list.

If you do feel like writing it, I'll certainly share the end results here. A list like this will make things so much easier for reusing existing dialogue within the game, whether it be for new dialogues for existing characters, or creating simple dialogues for new NPCs.
I've now thrown together a quick tool that (hopefully) will do what is described above. You can get it here.

Be warned however that it is very minimally tested so it's possible there are bugs around which I haven't spotted yet. It also has essentially no error handling at all, so if it for some reason can't read a DLG file you have opened the whole operation will likely stop. If you spot anything that's obviously broken let me know and I'll have a look at it.

That said, start the EXE and click the Open DLG files button. You will first be asked to open your dialog.tlk file, which it'll need to fetch the conversation text. Then you will be asked to select the DLG files to read. You can use the standard techniques of holding down SHIFT and/or CTRL to select multiple DLG files in the open box.

When the files have been selected the application will go through them and list all dialog entries which has a value (ie sound file) set in the VO_ResRef field. The results will be listed in the box below the buttons in the format:

"filename","speaker","dialog text","VO resref"

Speaker will be displayed as OBJECT_SELF if the field is empty in the DLG file. Filename is the name of the DLG file the entry was found in. You can either select the text in the box and copy/paste it, or click the button above the box to save its content to a text file. It will be saved as results.txt in the same folder as the EXE.

Since this tool is only an hour old its very rough around the edges, but hopefully it will be of some help at least.

Finally, be warned that this thing is not optimized at all, so if you select many or large files at a time it may take quite some time to finish working. It will pop up a message box when it's done to inform you of the fact.

stoffe is offline   you may: quote & reply,