Knights of the Old Republic

File information

Last updated

Original upload

Created by


Uploaded by


Virus scan

Safe to use

About this mod

This is a neat little utility made by stoffe over on lucasforums. It helps make modding much easier by installing files for you and allows modders to make installers for their mods. This works for both KotOR and KotOR2.

Permissions and credits

I am not the original creator of TSLPatcher. I am merely hosting the file and mirror here. The original creator is Stoffe on Lucas Forums

Forum Thread
(download link in the thread may be broken)

The TSLPatcher is a small application intended to be used as a mod installer for KotOR and K2:TSL. Despite the name it works with both games in the series. Its purpose is to move some of the burden of making different mods compatible from the end mod user to the mod developer.

ChangeEdit is a support utility, used to create TSLPatcher configuration files with a somewhat user-friendly graphical user interface. (Well, more user-friendly than creating the config files by hand in notepad, anyway.)

It can, in general terms:

  • Add new entries to the dialog.tlk file, so you won't have to distribute the whole 10 MB file with a mod, and make it compatible with
  • Modify and add new lines and columns to 2DA files that might already exist in the user's override folder, allowing different mods to modify
  • Modify values in fields and add new fields to GFF format files (UT*, DLG, JRL, GIT, ARE, IFO etc...) that might already exist in the user's
  • Dynamically assign StrRefs from your new dialog.tlk entries to 2DA, GFF, NSS and SSF format files, allowing you to use your new TLK entries
  • Dynamically assign values from 2DA and GFF files to cells and fields in other 2DA, GFF and NSS files, such as the line numbers from newly
  • Insert StrRef or 2DA/GFF token values into scripts and recompile those scripts automatically with the correct values. (E.g. adding new
  • Dynamically modify SSF (Soundset) files to point to new entries you have added to dialog.tlk.
  • Automatically put other files that does not need to be modified into the correct folder within your game folder (e.g. "Override", "Modules",
  • Insert modified GFF files into a RIM or ERF format file (ERF, MOD, SAV etc), found in the game folder or any of its sub-folders, or modify
  • Make unaltered backup copies of any files it modifies or overwrites, making it a little easier to uninstall a mod again.
  • Provide the user with different installation alternatives which may be chosen at installation time.
  • Display a ReadMe, instruction text or agreement with basic font and text formatting support (using the Rich Text Format) to the user prior.

It cannot, in no uncertain terms:
  • Make standard game scripts that are modified by serveral mods compatible. The structure of a script file is too dynamic to lend itself well to automatic merging (at least for someone of my skill level in programming).
  • Resolve naming/priority conflicts resulting from placing several variants of files with the same name in different sub-folders inside the override folder. It will always assume that all files it is supposed to modify are located directly in the override folder and not in any subfolders to avoid ambiguous situations.
  • Modify files held inside BIF files in the game, since KEY/BIF files work pretty much the same as the override folder in most cases, and editing the KEY/BIF data can lead to problems. This does of course not prevent you from extracting whatever files you need from the BIF data in advance and put them in the TSLPatcher's data folder.
A few quick "how to" examples:
Insert new branches into DLG files.
Install a New Player Appearance mod.

Q: I get a RichEdit line insertion error when trying to install mods. What's wrong?

A: It seems a few people have odd versions of the RichEdit DLL files installed in their system that doesn't play nice with the colored text box component TSLPatcher uses. To work around this you could try to replace the RichEd DLL files with versions that should work. Extract the two DLL files from this archive and put them in your Windows\Windows32 folder. Move existing files with those names to a safe location first so you can restore them if this causes other problems! Do not overwrite them!

Alternatively, if you don't want to mess with your DLL files, you could force TSLPatcher to use a plain text box for status messages rather than the colored/formatted one. To do this, use Notepad to open the changes.ini file found inside the tslpatchdata folder that came with the mod you wish to install. Under the [Settings] section, change the value of the key PlaintextLog from 0 to 1.

Q: I'm not seeing any Install Mod button, and the text field in the TSLPatcher window seems to extend behind the window boundraries.

A: This odd problem some people experience seems to be tied to what screen resolution and pixel density is being used in your monitor settings, but I have been unable to replicate it or figure out exactly what's going on. As a workaround you can "click" on the Install button by using it's quick keyboard command. Pressing the [ALT] [S] keys on your keyboard should start the installation process.

Q: When trying to install a mod it complains that it's not a valid installation location. What's wrong?

A: Make sure you are selecting the folder the game is installed in, not the override folder, when the TSLPatcher asks you where to install the mod.

Q: When trying to install a mod it complains that access was denied to the dialog.tlk file.

A: Make sure that your dialog.tlk file is not write protected. This file is found in the same folder as the swkotor.exe binary. To check if it's write protected and undo it, right-click on the file, pick Properties in the context menu and uncheck the write protected checkbox.

If you are a modder and wish to make your work compatible with TSLPatcher/make an installer (verbatim from the readme):

  1. Create a new folder for your mod, name it whatever you like.
  2. Copy the TSLPatcher.exe into the new folder.
  3. Create another folder inside your mod folder named tslpatchdata
  4. Copy ALL of the files that belong to your mod in the tslpatchdata folder.
  5. Extract UNALTERED copies of any .2da or GFF files you want the patcher to work with into the tslpatchdata folder. These files are altered then copied into the users override folder if they do not have them already.
  6. If your mod needs to use custom dialog.tlk entries, use TalkEd.exe to create a new .tlk file. Add your new entries to this file and name it append.tlk.
  7. Create a .rtf called info.rtf. whatever you type here will show up in the main dialogue box that is present when TSLPatcher is opened. (installation instructions/mod description usually, images will not work)
  8. If yout mod needs to use the script compile functionality, copy nwnnsscomp.exe and nwscript.nss files into the tslpatchdata folder along with the .nss script files you intend to use, and all files those scripts use.
  9. Start ChangeEdit.exe to configure what TSLPatcher should do with your files (more info in section 3 of the readme). Create a new configuration file in ChangeEdit and name it changes.ini, put it in your tslpatchdata folder. (this basically tells TSLPatcher what to do to install your files correctly
  10. TEST, TEST, and TEST AGAIN! Make sure your installer works BEFORE you release your mod! Double click the TSLPatcher.exe you first copied to begin installation. It is best if you create a fake install location to do this so you do not mess up any of your existing installations, or use a clean install location with no mods. You can make a fake one making a new folder and copying the dialog.tlk file into this along with a new override folder. copy any modified files you want to use for testing into this fake folder.
  11. TSLPatcher checks for a valid dialog.tlk file to verify that it is a "valid" install location. Examine everything in this folder with a fine-tooth comb to make sure that everything is right. Mistakes happen often and this step can (and will) save you time and a headache.