Dialog.tlk
From NWN1 Custom Content Guide
Contents |
[edit] Overview
The dialog.tlk file is the place where all those sets of words and phrases, from names of races ("Elf", "Dwarves"...etc) to Spell Names and Descriptions ("Acid Arrow", "Magic Missile"), names of feats and descriptions ("Alertness") to the in-game look such as the strings like "Log" and "Main Menu".
Basically, this is Bioware's own set of strings. The file should NEVER be directly edited, only looked at using Bioware's talk table viewer - called "TalkTableViewer.exe". You can get that at Bioware's Misc Downloads Page .
The dialog.tlk file is in the root NwN folder for the game - and without it the game will not work correctly!
Download the newest talk table file at the Bioware site:
Note that Custom talk table files should be used for new content. If you want, however, there are uses for the Bioware talk table file. Many scripting functions can directly get values from the talk table, which is faster for clients in multiplayer and so on.
[edit] dialog.tlk
Neverwinter Nights includes a data file called dialog.tlk. This file contains a huge list of thousands of text resources: all of the names of all of the objects in the dialog from the game. This is a common technique used to make it easier to internationalize a game – with all of the text strings in one place, translation to multiple languages is much easier.
Each resource in dialog.tlk has a number assigned to it called the String Reference. Unfortunately, editing dialog.tlk is fraught with issues:
- It is a huge file (7 MB+) which makes for a big download.
- It is not something you can override through a hakpak. So for each module that you play with a new dialog.tlk file, you have to manually swap in the new dialog.tlk before loading the game.
- If you update NWN through the automatic updater, it will not work if you have changed dialog.tlk. You will have to restore the old version first, then update the game. Of course, any changes that Bioware makes to dialog.tlk for an update will break your version.
These examples make changes to dialog.tlk very difficult. Most users do not like messing around with their game installation to run a module and will refuse to download modules with modified dialog.tlk files. Many users have only a basic understanding of computers and find issues like manually swapping dialog.tlk files back and forth to be challenging.
Bioware is aware of this issue. Patch v1.25 of the game removed the need to modify dialog.tlk for some objects. For example, in appearance.2da if you now leave the String Reference field blank the toolset will use your label as the title for the object. This is a huge improvement and we continue to lobby the Live Team to make more patches like this.
| Eligio's View on dialog.tlk
The summary message of this section is this: Modify dialog.tlk at your own risk. It will certainly turn many people off from using your custom content. It is only necessary in a few circumstances so ask yourself if it is worth it before producing custom content that requires these changes. Here is my opinion on the subject, by section:
|
[edit] Using the values
Once you open it via. the TalkTableViewer.exe, you can look through values - for example, value 8 is 'Fighter'. For this to be used, for example, you could change a spells name to Fighter, which while odd is acceptable :-)
If you do, just look up the spell you want to change, under column name in the Spells.2da. Once done, you just save it and add it to a hakpak. As long as the module runs the hakpak, the spell now says "Fighter" as the name - whenever it is cast, in the spellbook or anywhere else!
Another way is using the values in scripting - use such commands as found in the Lexicon, such as GetStringByStrRef.
So, for the fighter value, using the line string sFighter = GetStringByStrRef(8);, and it can be used anywhere and just is another way of putting string sFighter = "Fighter";.
The advantages of talk table usage is evident as you only need to edit the talk table to change all the values which look there for information. Spelling mistakes are easier to find, and so on. Of course, this is more related to TalkTables in general.
[edit] Downloading a replacement
As notified before, you can download a replacement for your version of NwN at the Bioware site: Bioware Talk Table Downloads
