-
Notifications
You must be signed in to change notification settings - Fork 6
Home
Start here: New to modding? Installing Mods with HoloPatcher → Mod Creation Best Practices → File formats and specifications or TSLPatcher guides as needed. Core terms: Concepts; format index and type IDs: Resource formats and resolution. Binary and engine-level detail: Low-level structures and implementations. Community sources and archives. Contributing: Wiki Conventions.
Installation, tool use, and step-by-step guides:
- Mod Creation Best Practices
- HoloPatcher README for Mod Developers
- HoloPatcher Feature Coverage Overview
- TSLPatcher's Official Readme
- TSLPatcher Thread Complete Container
- TSLPatcher InstallList Syntax Guide -- File installation
- TSLPatcher TLKList Syntax Guide -- TLK (TalkTable) modifications
- TSLPatcher 2DAList Syntax Guide -- 2DA patches
- TSLPatcher GFFList Syntax Guide -- GFF modifications
- TSLPatcher SSFList Syntax Guide -- SSF (sound set files)
- TSLPatcher HACKList Syntax Guide -- Binary patches
- Blender Integration
- Indoor Map Builder User Guide -- Build indoor modules from kits
- Area Modding and Room Transitions -- Understanding why room crossing fails and what must agree: layout, walkmesh, roomlinks, LYT/VIS
- Indoor Area Room Layout and Walkmesh Guide -- Complete modder workflow for indoor rooms, walkmeshes, roomlinks, doors, LYT, and VIS
- KotorDiff Integration in PyKotorCLI
Holocron Toolset (in-app help):
- Holocron Toolset: Getting Started
- Holocron Toolset: New Features Quick Guide -- Favorites, batch ops, rename, Open With, etc.
- Holocron Toolset: Core resources -- Core tab (KEY/BIF)
- Holocron Toolset: Module resources
- Holocron Toolset: Override resources
- Holocron Toolset: Module Editor -- Module Designer controls
- Holocron Toolset: Map Builder -- Indoor Map Builder controls
Tutorials:
- Tutorial: Creating custom robes
- Tutorial: Creating a new store
- Tutorial: Area transitions
- Tutorial: Creating static cameras
Scripting (NWScript): Function and constant reference for writing scripts. Full index and all routine/constant pages: NSS File Format. Quick links to major categories:
- NSS Shared Functions: Actions · Combat · Dialog and conversation · Effects · Item management · Module and area · Party · Skills and feats
- NSS Shared Constants: Ability · Object type · Class type · Visual effects
- NSS K1-Only constants and functions (see NSS File Format for full K1 index)
- NSS TSL-Only constants and functions (see NSS File Format for full TSL index)
Reference for binary layout, field definitions, and format behaviour. For scripting usage see Scripting (NWScript) above; for implementation details see Low-level structures and implementations.
The following documents are official Bioware Aurora Engine file format specifications. These are authoritative references for the underlying file formats used by KotOR:
- 2DA File Format - Official 2DA (Two-Dimensional array) format specification
- GFF File Format - Official Generic file format specification
- Common GFF Structs - Common GFF structure definitions
- Area File Format - Official ARE (Area) file format
- Creature Format - Official UTC (Creature) format
- Item Format - Official UTI (Item) format
- Door/Placeable Format - Official UTD/UTP formats
- Encounter Format - Official UTE (Encounter) format
- Trigger Format - Official UTT (Trigger) format
- Waypoint Format - Official UTW (Waypoint) format
- Store Format - Official UTM (Store) format
- Sound Object Format - Official UTS (Sound) format
- Journal Format - Official JRL (Journal) format
- Conversation Format - Official DLG (Dialogue) format
- IFO Format - Official module info format
- ERF Format - Official Encapsulated Resource format
- Key/BIF Format - Official KEY and BIF file formats
- TalkTable Format - Official TLK (Talk Table) format
- SSF Format - Official sound set files format
- Localized Strings Format - Official localized strings format
- Faction Format - Official faction data format
- Palette/ITP Format - Official palette and ITP formats
The following information describes the resource system used by KotOR and TSL. While KotOR is derived from the Aurora engine (Neverwinter Nights) and shares the same resource system, this section focuses on KotOR-specific behavior and file locations. Some details (like nwn.ini) are NWN-specific and are noted as such.
Both games use the same high-level flow: the executable initializes an application manager, creates a server (game world) and client (rendering, input, UI), then runs a main loop that pumps window messages, updates the render window, and drives the Aurora/Odyssey subsystems. Resource loading follows the resource resolution order; the resource manager services requests from override, then module RIM/ERF capsules, then KEY/BIF. Reinitializing the Aurora engine (e.g. after resolution or display changes) reloads or refreshes core subsystems while preserving the same client/server split. Scripts (NCS) and dialogues (DLG) run in the server context; the client handles display, camera, and input and receives updates from the server.
Client and server: The Odyssey engine (like Aurora) separates a server (game world, rules, scripts, resources) from a client (rendering, input, UI). The server owns area state, creatures, items, and script execution; the client displays the world and sends input. This split is important for modding and for understanding NCS execution and resource resolution.
-
chitin.key: Master index file that maps resource names to BIF containers locations. Given a resource name, chitin.key can be used to locate the master data file (BIF) containing the resource. -
dialog.tlk: Text resource file containing localized strings referenced by StrRef IDs. This centralizes strings for easy localization and allows changing text without modifying or recompiling scripts. Different language versions of dialog.tlk can be installed for localization support. -
kotor.ini: Configuration file with[Alias]section mapping logical directory names to physical paths. This allows the game to locate data files regardless of installation directory structure.
Reference: xoreos-docs (Mirror: th3w1zard1/xoreos-docs): specs/torlack/basics.html - Tim Smith (Torlack)'s Aurora engine basics documentation (NWN-focused)
- Lookup order and how demands are satisfied: Concepts — Resource resolution order
- Hex resource type IDs: Resource formats and resolution — Resource Type Identifiers
-
Language IDs (
dialog.tlk, localization): Concepts — Language IDs - KEY file role and binary format: KEY-File-Format
- Format page index (all extensions, ResRef, resolution order): Resource formats and resolution
The linked table of contents for format pages (2DA anchors, GFF variants, archives, media) lives on Resource formats and resolution together with ResRef / resource type and the hex resource type ID table. Narrative resolution order: Concepts.
Binary layout, engine behaviour, and implementation details for developers and reverse engineering. These pages are conceptual summaries for the wiki (no raw tool dumps); see Wiki Conventions and AGENTS.md for project policy.
-
Reverse Engineering Findings (includes
CExoResMan/ resource manager notes and BWM / AABB / walkmesh engine analysis) - Qt ItemView selection and RobustTableView
- UTC Editor field types (AgentDecompile)
- Indoor Map Builder Implementation Guide -- Technical details (distinct from the user guide in Guides and tutorials)
- HoloPatcher internal logic
PyKotor is not the first of its kind, below you'll find other KotOR tools, resources, projects, and even full engine rewrites.
Complete game engine rewrites that can load and play KotOR:
- xoreos - C++ reimplementation of BioWare's Aurora/Odyssey/Eclipse engine, supports multiple BioWare games including KotOR. (Mirror: th3w1zard1/xoreos)
-
reone - Modern C++ KotOR engine with OpenGL rendering. Focus on performance and clean architecture. (Mirror: th3w1zard1/reone)
- NOTE: This project seems to be abandoned by seedhartha, but was picked up by the community here: https://github.com/modawan/reone though I can't speak to its authority)
- KotOR.js - TypeScript/JavaScript engine running in browsers via WebGL. Enables playing KotOR directly in web browsers. (Mirror: th3w1zard1/KotOR.js)
- NorthernLights - .NET/C# engine implementation with Unity integration capabilities (based on KotOR-Unity project with further improvements) (Mirror: th3w1zard1/NorthernLights)
- KotOR-Unity - Unity-based KotOR engine rewrite. Leverages Unity's rendering and physics. (Mirror: th3w1zard1/KotOR-Unity)
Libraries focused on reading/writing KotOR file formats:
- xoreos-tools - Command-line tools for extracting and converting Aurora file formats (Mirror: th3w1zard1/xoreos-tools)
- Kotor.NET - .NET library for KotOR file formats with builder APIs
- BioWare.NET - Another .NET library for KotOR file formats, intended to be a direct port of PyKotor
- Rakata - A rust-native codebase for working with the Odyssey engine.
Tools for working with KotOR 3D models and textures:
- kotorblender - Blender add-on for importing/exporting KotOR MDL files, LYT layouts, PTH paths, and walkmeshes with active Holocron Toolset bridge support (see Blender Integration)
- mdlops - Legacy Python MDL toolkit for model conversions (Mirror: th3w1zard1/mdlops)
- tga2tpc - Standalone TGA to TPC texture converter (Mirror: th3w1zard1/tga2tpc)
- DLZ-Tool - DLZ file decompression tool (Mirror: th3w1zard1/DLZ-Tool)
- WalkmeshVisualizer - walkmesh viewing and debugging tool (Mirror: th3w1zard1/WalkmeshVisualizer)
Tools and Resources for working with NWScript in KotOR:
-
HoloLSP - Language Server Protocol implementation for NWScript, complete with all kotor-specific constants and functions, as well as everything else from each game's (k1/tsl's)
nwscript.nss - nwscript-mode.el - Emacs major mode for NWScript editing (Mirror: th3w1zard1/nwscript-mode.el)
- Vanilla_KOTOR_Script_Source - Decompiled vanilla KotOR scripts for reference (Mirror: th3w1zard1/Vanilla_KOTOR_Script_Source)
Tools for creating and installing mods:
-
PyKotorCLI (PyKotor) - CLI-first toolset for packing, conversion, Holocron kit generation, and GUI layout scaling.
uvx --refresh pykotor kit-generate --installation <path> --module <module> --output <dir>runs headless; launching with no arguments opens the Tkinter kit generator GUI for interactive use.uvx --refresh pykotor gui-convert --input <gui_or_folder> --output <dir> --resolution ALLruns headless for GUI resizing; omitting args opens the converter GUI. Developers:uv run --directory Libraries/PyKotor/src --module pykotorfor local source. (Implementations:kit_generator.pywrapsLibraries/PyKotor/src/pykotor/tools/kit.py;Libraries/PyKotor/src/pykotor/cli/gui_converter.pydelegates topykotor.resource.formats.gff.) - HoloPatcher.NET - .NET reimplementation of TSLPatcher
- Kotor-Patch-Manager - Alternative mod manager (Mirror: th3w1zard1/Kotor-Patch-Manager)
- ModSync - Mod synchronization and installation
- StarForge - Module editor and modding toolkit
- KotorModTools - Collection of modding utilities (Mirror: th3w1zard1/KotorModTools)
Tools for editing KotOR save games:
- sotor - Terminal-based save editor (Mirror: th3w1zard1/sotor)
- KSELinux - KotOR Save Editor for Linux (Mirror: th3w1zard1/KSELinux)
- KotOR-Save-Editor - GUI save editor (Mirror: th3w1zard1/KotOR-Save-Editor)
- kotor-savegame-editor - Web-based save editor (Mirror: th3w1zard1/kotor-savegame-editor)
Tools for working with KotOR audio:
- SithCodec - KotOR audio codec implementation (Mirror: th3w1zard1/SithCodec)
- SWKotOR-Audio-Encoder - Audio encoding tool for KotOR (Mirror: th3w1zard1/SWKotOR-Audio-Encoder)
Guides, patches, and community-maintained resources:
- K1_Community_Patch - Community bug fix patch for KotOR 1 (Mirror: th3w1zard1/K1_Community_Patch)
- TSL_Community_Patch - Community bug fix patch for KotOR 2 (Mirror: th3w1zard1/TSL_Community_Patch)
- KOTOR-utils - JCarter426's utility scripts and tools (Mirror: th3w1zard1/KOTOR-utils)
- KotOR-Bioware-Libs - BioWare library references (Mirror: th3w1zard1/KotOR-Bioware-Libs)
- kotor_combat_faq - Combat mechanics documentation (Mirror: th3w1zard1/kotor_combat_faq)
- ds-kotor-modding-wiki - DeadlyStream modding wiki container (Mirror: th3w1zard1/ds-kotor-modding-wiki)
For complete, comprehensive, and accurate wiki coverage, the following community sites and archives hold historical and ongoing KotOR/TSL modding knowledge. Use them to cross-check format behavior, tool usage, and engine quirks.
| Source | Description | Use for |
|---|---|---|
| DeadlyStream | Primary KotOR modding hub: mod releases, tutorials, Script Shack, tool discussions. | File format questions, TSLPatcher/HoloPatcher usage, nwscript.nss and animation references, override practices. |
| LucasForums Container | Archive of original LucasForums (StarWarsKnights.com) threads, reconstructed from the Wayback Machine. | TSLPatcher history and changelogs, Stoffe’s posts, format and tool discussions (2004–2007). |
| LucasForums Archive | Alternative archive project (Editing/Modding, Holowan Laboratories, tutorials). | TSLPatcher thread, KotOR tool docs, mod-finding threads. |
| Holowan Laboratories / Mixmojo | Historical KotOR modding forums (MixNMojo/Mixmojo). | Early format and tool discussions; some content may be in archives or mirrors. |
| Reddit (e.g. r/kotor) | General KotOR community. | Mod installation, troubleshooting, links to DeadlyStream and wiki. |
Further reading (community):
- DeadlyStream: Help setting up TSLPatcher -- TSLPatcher setup
- DeadlyStream: TSL Patcher, TLKEd, and accessories -- Modding tools
- DeadlyStream: Modding tools category -- Tool releases
- LucasForums Archive: TSLPatcher v1.2.10b1 -- Original TSLPatcher thread (see also TSLPatcher Thread Complete in this wiki)
- LucasForums Archive: Editing / Modding -- Holowan Laboratories and tutorials
How to use these sources:
- DeadlyStream: Search the forums for specific topics (e.g. "override folder", "TSLPatcher 2DA merge", "GFF struct", "nwscript"). The Script Shack and modding tools sections contain tutorials and tool releases. When the wiki documents a format or tool, DeadlyStream threads often provide real-world modder reports (e.g. which 2DA columns are safe to add, TSLPatcher setup gotchas). Cite threads in "See also" or "Further reading" when they are the best source for a given detail.
- LucasForums Container / LucasForums Archive: Use for historical and authoritative context. The original TSLPatcher thread (Stoffe, etc.), KotOR Tool discussions, and early GFF/2DA explanations live in these archives. Search by keyword (e.g. "2da", "GFF", "TSLPatcher") in the Editing/Modding or Holowan Laboratories sections. Content may be fragmented across Wayback reconstructions; when a thread is cited, prefer stable archive URLs.
- Holowan / Mixmojo: Early KotOR modding community; some content is preserved in archives or linked from LucasForums. Use for very old format or tool history when other sources do not cover it.
- Reddit (r/kotor): Useful for installation help, troubleshooting, and links to DeadlyStream or this wiki. For format or engine-level accuracy, prefer this wiki and the format pages; for "how do I install X" or "why does my mod conflict with Y", community posts can complement the docs.
This wiki aims to consolidate and cite that knowledge where relevant. When adding or refining format or tool pages, prefer linking to authoritative specs (e.g. KEY-File-Format, GFF-File-Format, official BioWare Aurora docs) and to PyKotor/vendor implementation paths; for community consensus or historical context, link to DeadlyStream threads or LucasForums archive threads where appropriate.
Reference documentation from related projects (external sources):
-
xoreos-docs - Aurora engine format documentation repository containing file format specifications for reverse-engineering BioWare's Aurora engine games (Mirror: th3w1zard1/xoreos-docs). Part of the xoreos project. The repository includes:
-
Official BioWare specifications (
specs/bioware/): Official Aurora Engine file format PDFs from the now-defunct nwn.bioware.com developer site. These documents are authoritative references for formats used across Aurora engine games including KotOR. -
Torlack's reverse-engineered specs (
specs/torlack/): Tim Smith (Torlack)'s reverse-engineered format documentation from his now-defunct website (torlock.com). These include detailed field-by-field breakdowns for formats like BIF, KEY, ERF (MOD), GFF (ITP), NCS, and binary MDL files. -
KotOR-specific documentation (
specs/kotor_mdl.html): Partial KotOR model format specifications with detailed field descriptions. -
Binary templates (
templates/): 010 Editor binary template files for analyzing binary file structures
Note: Much of the KotOR-relevant content from xoreos-docs has been comprehensively integrated into this wiki. See individual format documentation pages for specific source references.
-
Official BioWare specifications (
-
nwn-docs - Neverwinter Nights documentation (shares Aurora formats)
-
bioware-kaitai-formats - Kaitai Struct format specifications for GFF, 2DA, BIF, ERF, TLK, and other BioWare/KotOR formats; useful for parser generation and cross-tool validation.
- KEY-File-Format -- Resource resolution; GFF-File-Format, 2DA-File-Format -- Core formats
- Installing Mods with HoloPatcher -- Mod installation; HoloPatcher README for Mod Developers -- Mod development
- Wiki-Conventions -- Wiki structure and style