Rebuild and Rebirth of the KoTOR Tool originally developed by Fred Tetra back 2005.
Version: v1.0.23
Patch Date: 27.04.26
Project Status: Restored source build confirmed
Target IDE: Visual Studio 2010
Target Framework: .NET Framework 2.0
Platform: x86
Language: VB.NET
This repository contains a restored and repaired source-code build of Fred Tetra’s Kotor Tool, rebuilt from a damaged/decompiled VB.NET codebase and repaired for modern development use.
The purpose of this project is to preserve, restore, and modernise the original Kotor Tool so that it can continue serving the Knights of the Old Republic modding community on newer Windows systems.
This is not a rewrite from scratch. It is a restoration project focused on preserving the original tool’s behaviour while repairing broken decompiler output, restoring missing resources, improving portability, and preparing the codebase for future maintenance.
This patch represents the first successful source-restored build of Kotor Tool.
The application now:
- Builds successfully in Visual Studio 2010.
- Launches from the restored VB.NET source.
- Loads embedded WinForms resources.
- Uses a portable
settings.xmllocation beside the executable. - Avoids dead legacy auto-update calls during startup.
- Supports improved KotOR I / KotOR II path detection.
- Handles both old-style registry installs and Steam installs.
- Preserves original legacy behaviour where practical.
The decompiled source contained invalid VB.NET output that required manual repair.
Fixed issues include:
- Invalid module declaration in
KT_Launch.vb. - Broken startup entry point.
- Invalid object initializer syntax.
- Invalid
GoTojumps intoTry/Catchblocks. - Variable shadowing errors.
- Broken property accessor calls.
- Missing or incorrectly decompiled indexed property usage.
- Incorrect
Process.StartInfoinitialisation. - Broken form editor construction syntax.
- Broken
Withinitialisers that did not survive decompilation cleanly. - Incorrect SSF indexed accessor calls.
- Invalid
set_Bearing/get_Bearingcalls replaced with proper indexed property syntax. - Invalid
NotInheritable Moduledeclaration corrected. - Broken
Explorer.exeprocess launch blocks repaired.
The original decompiled project had .resources files sitting beside form source files but not properly embedded into the project file.
The .vbproj has now been updated to embed the restored form resources, including major forms such as:
frmMainfrmModule_EditorfrmModuleItem_Base_EditorfrmSSFEditorfrmUTC_EditorfrmUTD_EditorfrmUTI_EditorfrmUTM_EditorfrmUTP_EditorfrmUTS_EditorfrmUTT_EditorfrmUTW_Editor
This allows the application interface and editor forms to load correctly at runtime.
The original Kotor Tool expected its configuration to be located through the registry path:
HKLM\software\SCM\Kotor Tool
For restored and portable builds, this is fragile.
The UserSettings.vb logic has been updated so that the application can use:
settings.xml
from the executable directory.
The original registry-based behaviour has been preserved as a fallback where needed.
This improves portability and allows the restored build to run more cleanly from its own application folder.
The original Kotor Tool attempted to contact an old Comcast-hosted update endpoint:
http://kotortool.home.comcast.net/
This endpoint is no longer reliable and can cause failed startup behaviour.
For v1.0.23:
- Automatic startup update checks have been disabled.
- Manual update-check logic is preserved for future restoration.
- The updater can later be repointed to a modern endpoint if desired.
- No legacy update call should block startup.
- The XML setting can still preserve update configuration for future use.
The original auto-detect system primarily relied on legacy registry entries.
v1.0.23 improves detection support for:
- Original retail-style installs.
- Registry-detected installs.
- Steam installs.
- Steam libraries on non-default drives.
- Steam libraries moved to custom folders.
The Path Manager auto-detect system has been prepared to better locate:
Knights of the Old RepublicKnights of the Old Republic II: The Sith Lords
This is important because Steam can be installed on any drive, and Steam libraries can be moved to custom locations. The detection patch therefore avoids relying only on C:\Program Files (x86)\Steam.
Recommended environment:
Visual Studio 2010
.NET Framework 2.0 Targeting Pack
Windows x86 build target
Required references are expected under the local Lib folder:
Lib\FMODCL.dll
Lib\ImageTools.dll
Lib\RTFLinenumberTextBox.dll
The project is configured as:
OutputType: WinExe
TargetFrameworkVersion: v2.0
PlatformTarget: x86
StartupObject: kotor_tool.KT_Launch
Open the project file:
kotor_tool.vbproj
Then build using:
Debug | x86
or:
Release | x86
Successful output should generate:
bin\x86\Debug\kotor_tool.exe
or:
bin\x86\Release\kotor_tool.exe
The application may expect several helper files or folders beside the executable, depending on which feature is used.
Examples include:
settings.xml
maps\
working\
gffeditor.exe
mdlops.exe
nwnnsscomp.exe
KT_Help.chm
Some helper tools are legacy dependencies and may require future cleanup or replacement.
The project currently builds, but the restored decompiled source still produces many warnings.
Common warning types include:
- Variables used before assignment.
- CLS-compliance warnings.
- Shared member access through an instance.
- Legacy Visual Basic compatibility warnings.
These warnings do not currently prevent the application from compiling, but some may represent real runtime edge cases.
Future patches should prioritise the highest-risk warnings in:
frmMain.vbfrmModule_Editor.vbfrmSSFEditor.vbclsGFF.vbclsDLG.vbcls2DA.vb
Date: 27.04.26
- Portable
settings.xmlsupport beside the application executable. - Improved auto-detection for Steam-based KotOR installations.
- More robust support for Steam libraries on custom drives or folders.
- Embedded
.resourcesentries restored in the Visual Studio project file.
- Startup settings now favour the application directory instead of requiring the original registry path.
- Auto-update behaviour is disabled at startup while preserving the old update code for later reactivation.
- Path Manager detection logic now supports both old-style installs and Steam installs.
- Decompiled VB.NET syntax has been normalised into buildable Visual Studio 2010-compatible code.
- Broken VB.NET module declaration in
KT_Launch.vb. - Broken startup object configuration.
- Broken form/resource loading caused by missing embedded resource declarations.
- Invalid decompiler-generated object initialisers.
- Invalid
GoTolabels insideTry/Catchblocks. - Shadowed local variables that prevented compilation.
- Broken indexed property accessors such as SSF reference arrays.
- Broken Bearing property calls in module item editor logic.
- Broken process launch syntax for opening folders and scripts.
- Missing or invalid form editor construction in several restored sections.
This project exists for preservation, compatibility, education, and modding support.
The goal is to keep an important Knights of the Old Republic modding utility alive for modern systems while respecting the original tool’s structure and purpose.
Original Kotor Tool created by:
Fred Tetra
Restoration, source repair, project rebuild, and modern compatibility patching:
LordVaderCW
This is an unofficial restoration project.
It is not affiliated with BioWare, Obsidian Entertainment, LucasArts, Disney, Aspyr, Steam, or any other rights holder.
All Star Wars and Knights of the Old Republic names, assets, and trademarks remain the property of their respective owners.
This repository is intended only for lawful modding, archival, educational, and preservation purposes.
A formal license should be added before public distribution.
Until then, treat this repository as a restoration and preservation work-in-progress.
HKLM\software\SCM\Kotor Tool