lfnetwork.com mark read register faq members calendar

Thread: TalkEd v1.0.4b (TLK editor)
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 09-15-2005, 08:22 PM   #1
stoffe
Network Caretaker
 
stoffe's Avatar
 
Status: Administrator
Join Date: Apr 2002
Posts: 5,833
Helpful! 10 year veteran! Notable contributor 
Arrow TalkEd v1.0.4b (TLK editor)

(There is a separate version of this utility adapted to work with Jade Empire as well. See this thread to find it.)

EDIT: While TalkEd was made as a helper application for the TSLPatcher I figured it might be worthy of its own thread since it can be used as a stand-alone TLK file editor as well.

TalkEd is a dialog.tlk (or any TLK v3.0 file for that matter) editor that works with both KotOR1 and TSL. It can add new entries to a TLK file and edit or delete existing ones. It can create new TLK files from scratch or edit existing ones, and is capable of merging two TLK files together.

In addition it can be used to search among the entries in a TLK file for matches to a number of criteria.

(Dialog.tlk is the file that contains all the standard text strings in the game. It also links sound files to certain text strings.)

* * *

In a sudden burst of inspiration I finished a whole bunch of things I had planned for TalkEd but never gotten around to. I have uploaded the resulting TalkEd v1.0.4b version here.

What has changed in this version? Some things off the top of my head:
  • It now keeps track of the file it has loaded and can save it without every time popping up a Save dialog asking you to name the file.
  • You can doubleclick an entry in the grid to edit it without having to use the Menu or keyboard shortcut.
  • It will only warn about closing a file or the application if you've actually made changes to that file.
  • Added a "drag thing" (what are they called?) between the grid and the text display box, making them independently resizable.
  • Added displaying sound Resrefs for an entry in a separate column in the main listing.
  • Added new search filter to only list entries which has a sound file referenced.
  • Added new command in the Tools menu to delete TLK entries.
  • Added new command in the Tools menu to mass-add blank padding entries.
  • Fixed some minor bugs I discovered.
  • Lots of minor interface annoyances making it a little easier to work with.

Since my programming skills leaves a lot to be desired I'm sure there are still a bug or two which I haven't spotted during my testing. As such this is still considered a beta version. If anyone uses this and spots any problems, please let me know.


Last edited by stoffe; 04-19-2007 at 04:08 PM. Reason: Updated URI to new bug fix version.
stoffe is offline   you may: quote & reply,
Old 09-16-2005, 05:09 AM   #2
TheOssusKeeper
Forumite
 
TheOssusKeeper's Avatar
 
Join Date: Jul 2005
Location: Missouri, USA
Posts: 534
Awesome, just downloaded it


TheOssusKeeper is offline   you may: quote & reply,
Old 11-16-2005, 01:56 PM   #3
Bunk
Rookie
 
Bunk's Avatar
 
Join Date: Mar 2004
Posts: 54
Hi Stoffe,

I was looking for something in particular regarding tlk files, and I'm wondering if this tool might help me.

I need a way to compile a list (hopefully in excel) of every character's lines in the game, and the name of the sound file associated with it.

Essentially, I'd like to reuse the existing dialog tracks in the game in new ways, but trying to figure out what lines are available and which sound file goes with which line of dialogue would be a huge task. Do you think there is any way I could generate a list?
Bunk is offline   you may: quote & reply,
Old 11-16-2005, 04:00 PM   #4
stoffe
Network Caretaker
 
stoffe's Avatar
 
Status: Administrator
Join Date: Apr 2002
Posts: 5,833
Helpful! 10 year veteran! Notable contributor 
Quote:
Originally Posted by Bunk
I was looking for something in particular regarding tlk files, and I'm wondering if this tool might help me.

I need a way to compile a list (hopefully in excel) of every character's lines in the game, and the name of the sound file associated with it.

Essentially, I'd like to reuse the existing dialog tracks in the game in new ways, but trying to figure out what lines are available and which sound file goes with which line of dialogue would be a huge task. Do you think there is any way I could generate a list?
You can use TalkEd to search for all entries which has a sound associated with it by doing a search where you only check the "Match entries with any sound" checkbox. There is currently no way of exporting the listed entries though, but if there is interest I could add a command to save the listed entries to a text file.

However, there's no way of knowing from dialog.tlk alone where the entries are used (dialogs, soundsets, interface etc).

Further, most spoken lines in DLG files have their voiceover files set in the DLG file for each node, and have no sound associated with the text in dialog.tlk. Thus if you are only interested in which VO sound files are used in conversations in the game you'd have to go through all DLG files in the game, rather than the dialog.tlk file, and check the values of the VOresref(sp?) fields.

If this is what you want, and there is no easier way of doing it, I could make a quick tool which opens a DLG file and dumps all the values in the Conversation text and VO-resref fields to a text file. You'd need to open each file manually though since I've been too busy recently to find the time to finish my RIM and BIF reading classes (which would be needed to automatically check all DLG files in the game), so it would still be loads of work involved.

stoffe is offline   you may: quote & reply,
Old 11-16-2005, 04:30 PM   #5
Bunk
Rookie
 
Bunk's Avatar
 
Join Date: Mar 2004
Posts: 54
Quote:
Originally Posted by stoffe -mkb-
If this is what you want, and there is no easier way of doing it, I could make a quick tool which opens a DLG file and dumps all the values in the Conversation text and VO-resref fields to a text file. You'd need to open each file manually though since I've been too busy recently to find the time to finish my RIM and BIF reading classes (which would be needed to automatically check all DLG files in the game), so it would still be loads of work involved.
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.
Bunk is offline   you may: quote & reply,
Old 11-16-2005, 06:27 PM   #6
stoffe
Network Caretaker
 
stoffe's Avatar
 
Status: Administrator
Join Date: Apr 2002
Posts: 5,833
Helpful! 10 year veteran! Notable contributor 
Quote:
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,
Old 11-16-2005, 06:30 PM   #7
Bunk
Rookie
 
Bunk's Avatar
 
Join Date: Mar 2004
Posts: 54
Amazing stuff, thank you very much. I'll test it out tonight.
Bunk is offline   you may: quote & reply,
Old 07-08-2006, 01:07 PM   #8
Pavlos
Scruffy Englishman
 
Pavlos's Avatar
 
Join Date: Sep 2005
Location: The real world/ivory towers
Posts: 1,974
Current Game: Viking Warrior Poets
Nice tool, stoffe (Pretty much, as always).

Is there any chance that rather than having to double click on a StrRef to bring up the editing form, we can just edit it in the text box space beneath it? You could also place the options for sounds et cetera along side this box. This just makes committing things to the .TLK that much easier.

Another little request is: Can you cause the "Text present" option to be automatically selected. Sometimes it gets a little annoying when you forget to check that box .

Thank you for your time.
Pavlos is offline   you may: quote & reply,
Old 07-09-2006, 07:12 AM   #9
stoffe
Network Caretaker
 
stoffe's Avatar
 
Status: Administrator
Join Date: Apr 2002
Posts: 5,833
Helpful! 10 year veteran! Notable contributor 
Quote:
Originally Posted by Pavlos
Is there any chance that rather than having to double click on a StrRef to bring up the editing form, we can just edit it in the text box space beneath it? You could also place the options for sounds et cetera along side this box. This just makes committing things to the .TLK that much easier.
I'm not sure I agree it would be "much easier" to only have to singleclick rather than doubleclick, which would be the only difference. I prefer trying to avoid the "web page" syndrome for user interface design where everything is crammed into the same window. Still, I suppose I could make the preview text box editable if others prefer it that way instead. I'll add it to the ToDo list to have a look at when I'm in the mood for some Delphi programming.

Quote:
Originally Posted by Pavlos
Another little request is: Can you cause the "Text present" option to be automatically selected. Sometimes it gets a little annoying when you forget to check that box .
Hmm, when does this happen? If I pick "New entry" in the Tools menu all three "flags" checkboxes start out being already checked. Which version are you using?

stoffe is offline   you may: quote & reply,
Old 10-03-2006, 09:25 AM   #10
stoffe
Network Caretaker
 
stoffe's Avatar
 
Status: Administrator
Join Date: Apr 2002
Posts: 5,833
Helpful! 10 year veteran! Notable contributor 
TalkEd v1.0.4b

I have uploaded an updated version of TalkEd, v1.0.4b, which fixes a couple of problems related to loading and saving TLK files containing very long (4000+ character) text entries, where they would get truncated instead of read and saved properly. (Big thanks to tk102 for pointing out this error.)

There were no such long strings in dialog.tlk for TSL so it would only affect long entries added by mods for that game. The dialog.tlk file for KotOR1 however did contain a few very long string entries, so if you plan on using TalkEd with that game you should get this version to avoid messing up those entries in the TLK file.

Aside from that I've fixed a few minor interface annoyances as well. The download link is in the first post in this thread if you want it.

stoffe is offline   you may: quote & reply,
Old 12-19-2006, 10:59 PM   #11
Eldir
Lurker
 
Join Date: Dec 2006
Posts: 2
Re Encoding

Hi, I'm trying to translate some parts of the dialogue into Korean for personal use. I've tried inserting a few Korean words into a line to see how it worked. The changes were indeed reflected into the game, but the problem is, the characters were not encoded properly and were incomprehensible. (They show up fine in the editor, though.) Is there some way I could add Korean support to the program, or maybe to the game itself?
Eldir is offline   you may: quote & reply,
Old 12-20-2006, 07:23 AM   #12
stoffe
Network Caretaker
 
stoffe's Avatar
 
Status: Administrator
Join Date: Apr 2002
Posts: 5,833
Helpful! 10 year veteran! Notable contributor 
Quote:
Originally Posted by Eldir
Hi, I'm trying to translate some parts of the dialogue into Korean for personal use. I've tried inserting a few Korean words into a line to see how it worked. The changes were indeed reflected into the game, but the problem is, the characters were not encoded properly and were incomprehensible. (They show up fine in the editor, though.) Is there some way I could add Korean support to the program, or maybe to the game itself?
I am unfamiliar with how written Korean language works so I am not sure if it is possible.

However, the game does not use regular fonts for the text shown in-game, but rather a set of images that contains the letters it displays. Look in swpc_tex_gui.erf with KotorTool for the images whose names start with fnt_ (for example fnt_d16x16.tpc). You'd probably need to replace the roman letters with korean ones at the very least. Don't know if that is enough though.
stoffe is offline   you may: quote & reply,
Old 12-20-2006, 11:41 AM   #13
tk102
Well past expiration date
 
tk102's Avatar
 
Join Date: Jan 2004
Posts: 5,766
Current Game: Dragon Age: Origins
Forum Veteran Helpful! Notable contributor 
I believe you're correct on this point stoffe -mkb- in the fact that the strings returned from the TLK file for display are interpreted byte-to-character ratio of 1:1. That is to say, although the TLK file appears that it could support Unicode, the rendering of the characters by the game engine does not.
tk102 is offline   you may: quote & reply,
Old 12-28-2006, 09:48 PM   #14
Eldir
Lurker
 
Join Date: Dec 2006
Posts: 2
Quote:
Originally Posted by tk102
I believe you're correct on this point stoffe -mkb- in the fact that the strings returned from the TLK file for display are interpreted byte-to-character ratio of 1:1. That is to say, although the TLK file appears that it could support Unicode, the rendering of the characters by the game engine does not.
Oh, I see. I guess that explains why no one's done a Korean-language patch. Thank you kindly for your answers.
Eldir is offline   you may: quote & reply,
Old 09-01-2009, 01:07 PM   #15
renanbianchi
Lurker
 
Join Date: Sep 2009
Posts: 1
stoffe, is there a way to separate the Xbox version text strings from the PC version text strings?

I noticed that they use different strings for each version when i ported the Brazillian portuguese pc translated file to the Xbox.
renanbianchi is offline   you may: quote & reply,
Old 09-07-2009, 06:12 AM   #16
stoffe
Network Caretaker
 
stoffe's Avatar
 
Status: Administrator
Join Date: Apr 2002
Posts: 5,833
Helpful! 10 year veteran! Notable contributor 
Quote:
Originally Posted by renanbianchi View Post
stoffe, is there a way to separate the Xbox version text strings from the PC version text strings?

I noticed that they use different strings for each version when i ported the Brazillian portuguese pc translated file to the Xbox.
I'm afraid I have no idea, I don't have the X-box versions of the games so I have no idea how they store the data or how you can mod it. The standard TLK files used by the PC versions can only contain a single string for each entry in the TLK file, and it uses different TLK files for different language versions of the game.

stoffe is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > Knights of the Old Republic > Editing / Modding > T3-M4's Astromech Droid Center > TalkEd v1.0.4b (TLK editor)

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:18 PM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.