View Single Post
Old 07-30-2006, 06:10 AM   #178
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 Lit Ridl
I have to make installer for live planets (02,03,04) but I have problem with dialog.tlk.
I have to modify row in dialog.tlk with number 42502 (503, 504), they are clear now, I want to insert text in them, not to create new but how???
The TSLPatcher currently won't update existing lines in dialog.tlk in order to reduce chances of incompatibility (if several mods change the same entry) and make it easier to find and undo changes. It will just add new entries at the end of the file (unless an identical entry already exists in the file, in which case the existing one will be used instead of adding a new duplicate).

This usually isn't a problem though, you just add new entries with your text, store their resulting StrRef values in a StrRef# token and then insert that token into the 2DA file, GFF file or script that needs to reference those dialog.tlk entries.

For example, if you want to add a new planet to the Live_Planet_02, Live_Planet_03 and Live_Planet_04 rows in planetary.2da with a new name and description, you'd set things up like (irrelevant parts skipped):

Code:
[TLKList]
StrRef0=0
StrRef1=1
StrRef2=2
StrRef3=3
StrRef4=4
StrRef5=5


[2DAList]
Table0=planetary.2da


[planetary.2da]
ChangeRow0=2da_mod_PlanetOfTheMonkeys
ChangeRow1=2da_mod_AnimalPlanet
ChangeRow2=2da_mod_ForbiddenPlanet


[2da_mod_PlanetOfTheMonkeys]
LabelIndex=Live_Planet_02
name=StrRef0
description=StrRef1
model=planet_02


[2da_mod_AnimalPlanet]
LabelIndex=Live_Planet_03
name=StrRef2
description=StrRef3
model=planet_03


[2da_mod_ForbiddenPlanet]
LabelIndex=Live_Planet_04
name=StrRef4
description=StrRef5
model=planet_04
...in the changes.ini file, while the append.tlk file contains two entries for each planet, the name of the planet and the description. This would add the six new entries to the dialog.tlk file of the user if they don't already exist, and set the proper StrRef values referring to then in the name and description columns of the Live_Planet_02, Live_Planet_03 and Live_Planet_04 rows in planetary.2da. (I assume this is for KotOR1, since there is no liveplanet 2 in TSL)

stoffe is offline   you may: quote & reply,