Dialog.tlk

From NWN1 Custom Content Guide

Jump to: navigation, search

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:

Bioware Talk Table Downloads

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:

  1. It is a huge file (7 MB+) which makes for a big download.
  2. 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.
  3. 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:

  1. Weapons - it is unnecessary to modify dialog.tlk. You can edit the item name and description and stats in the Aurora toolset and distribute custom .erf files.
  2. Portraits – not required.
  3. Voicesets – not required.
  4. Items without Models - it is unnecessary to modify dialog.tlk. You can edit the item name and description and stats in the Aurora toolset and distribute custom .erf files.
  5. Armor and Clothing – not required.
  6. Spells – required. Unless you want to use them only for NPCs. Again, if you are a module builder, ask yourself whether those custom spells are really critical to your game.
  7. Creatures – made unnecessary with patch v1.25 of the game.
  8. Custom Races – required. It is currently unavoidable for custom races. My only caution here if you are a module builder is that I would evaluate whether or not a custom race is really critical to the module before doing it. For the City of Doors Initiative (a Planescape mod) it is. For many other modules it is probably not and it will limit your target audience.
  9. Visual effects – not required.
  • Usually you can avoid editing the dialog.tlk file for your custom content. There are different techniques for doing this:
    1. For some .2da files you can put ‘****’ in the string reference column and it will use the adjacent text column instead (e.g., appearance.2da for creatures).
    2. For many objects, you can simply override the object name in the Aurora toolset. When you do this the person who uses your module will never notice (e.g., baseitems.2da).
  • Right now the only two sections of the Custom Content Guide that require dialog.tlk editing are custom spells (which can be avoided as long as they are NPC spells) and custom races (using CODI’s Character Creator).
  • This warning bears repeating. Do not edit dialog.tlk if you can avoid it.

[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

[edit] Links

[edit] End of Page


Main Page | What Links Here


Personal tools