<takes a breather...>
Don't know if this helps, but it was something that took *me* a while to get (from the
wayback machine - which I got from some kind post here a while back, but can't remember who to credit :-/ ):
Custom TLKsThe custom talktable feature was added because it was one of the last things blocking the community from adding new feats, spells, races, etc into NWN using hakpaks.If you add a new spell to the game, you need to modify spells.2da to add it - and inside spells.2da you need to define StrRefs (string reference) that point to strings in dialog.tlk for "name", "description", etc. These strings are displayed on the players GUI and are directly fetched from dialog.tlk. Basically if I enter StrRef 333, it will fetch string number 333 from dialog.tlk.
However, dialog.tlk can not be put into hakpaks and it is a global resource, meaning you can't just add strings to it and distribute it to your players, as your changes will affect all games that are played and will break compatibility with the auto updater.
To allow the community to define their own strings, Bioware came up with a scheme that allows module builders to add their own, custom talktable to a module. This talktable can NOT redefine existing strings, it can only add new strings to the game. Thus, you can't simply takedialog.tlk and copy it, you need to create a new, empty talktable and add the strings you want to add to the game there. There is NO way of overwriting existing strings - If you want to change the name of a spell, you would instead change the StrRef in the Name column in spells.2da to point to your new string in your own talktable.
So, for an example of the Champion of Torm:You create an empty talktable (plenty of tools for that on the Vault) and add three new strings
0 "Bad StrRef"
1 "Divine Champion"
2 "Description for Divine Champion"
You need to modify the name and probably description column in classes.2da to point to your new, custom strref. In order to address entries in the custom talktable, you need to add 16777216 to the index number the string has in your custom talktable.The classes.2da entry would look like this:
... name description ...
...
... 16777217 16777218 ...
Then in the toolset, under the Module Properties in the Custom Content page, you associate your custom .TLK with the mod. Unlike HakPaksyou can only have one custom .TLK per module (which makes sense as the info is appended in order). In order for it to be associated with a module, the custom .TLK must be in the subdirectory \\tlk of your Neverwinter Nights directory. If this subdirectory doesn't exist, you can create it.So to summarize, think of the TLK files and ranges like this:
In file Starts from to You use to
dialog.tlk 0 16777215 0 16777215
custom.tlk 0 ? 16777216 16777216+?
The game reads the .TLK in this matter.
If the index is below 0x1000000 dialogue.tlk
If the index is above 0x1000000 mask off the "1" and read the custom.tlk
if entry doesn't exist read dialog.tlk. (still with "1" masked of)
so you can get odd strings if you have wrong references too a custom.tlk somewhere.If you want to change hardcoded "strings" and add them in your hakpak, don't use dialog.tlk. Instead copy and change the hardcoded GUI files string reference and add it too the hakpak (this is mostly used for changes of the character creator).
i.e. The item referencing the appearance and properties would need to start at (16777216+line number in custom tlk).
Even knowing that, I can't get the portraits for Amethyst Dragon's Topiary Guardians to show up :-(
I'm still groping in shadows...
<...from tlk-ing too much>
Edit:Stoopid formatting :-(
Modifié par Rolo Kipp, 19 août 2011 - 03:44 .