Skip to main content

A faster, cross-platform alternative to TSLPatcher written in Python.

Project description

PyKotor TSLPatcher

Overview

HoloPatcher is a rewrite of TSLPatcher written in Python, utilizing the PyKotor library.

TSLPatcher is a Delphi utility designed for modifying game files for "Star Wars: Knights of the Old Republic" and its sequel. It allows for the seamless integration of mods, ensuring compatibility and minimizing conflicts between different mods.

You can find the TSLPatcher official readme here.

However, TSLPatcher is over 20 years old now and many qol features, bugs, and highly popular features were never added over the years. TSLPatcher, additionally, is closed source, making it difficult to determine its logic or why it may be failing to install a specific mod.

Goals

  • Backwards Compatibility: Match TSLPatcher's output and behavior as closely as possible.
  • Cross-platform compatible: Windows/Mac/Linux will all produce the same patch results. HoloPatcher provides case-insensitive pathing support for all operating systems.
  • Support the non-PC versions of the game: Support and provide tools for kotor ports such as iOS, android, steamdeck, etc. This goal is largely still in progress.
  • Add new features: Add highly-requested features while still ensuring backwards compatibility with TSLPatcher.

Features

  • Configurable Patching: Offers a flexible system for defining modifications through INI files, allowing for detailed control over file modifications, additions, and compilations.
  • Game File Support: Supports a wide range of game file types, including GFF, 2DA, TLK, SSF, and NCS/NSS scripts, enabling comprehensive modding capabilities.
  • Memory Management: Implements a memory system for tracking and reusing modifications across different files, optimizing patching processes and ensuring consistency.
  • Error Handling and Logging: Provides robust error handling and detailed logging functionality, aiding in debugging and ensuring smooth patching operations.
  • User Interface: Features a graphical user interface for easy mod installation and management.
  • Command-line support: Offer a command line for tools such as KOTORModSync
  • Compiling NSS scripts into NCS bytecode without reliance on nwnnsscomp.

Usage

End users should download the latest release here

HoloPatcher can be used both as a command-line tool and through its graphical user interface.

Requirements

First, see the main readme.md for instructions on how to setup the python venv. You will need to first install PyKotor's requirements. The easiest way to do this is running the install_python_venv.ps1 script at the top level of this repo.

Once your venv is setup for pykotor, install requirements.txt

pip install -r requirements.txt --prefer-binary

Optionally (but recommended), install recommended.txt

pip install -r recommended.txt

Command-Line Interface

python src/__main__.py <path to game> <path to tslpatchdata> [options]

required arguments:

  • --game-dir: Path to the KOTOR install folder. This will be mtslrcm folder or the unpackaged ipa if using one of the mobile games. This is implicit as first argument.
  • --tslpatchdata: Path to the tslpatchdata folder of the TSLPatcher mod. Can be the parent of tslpatchdata optionally. This is implicit as the second argument.

Options:

  • --install: Start an immediate install, and do not show a ui window.
  • --console: Show a console window for extra debug output of HoloPatcher. Using this flag will run HoloPatcher in the current terminal.
  • --uninstall: Start an uninstall using the most recent backup folder provided in the tslpatchdata argument.
  • --validate: Validates the specified tslpatchdata mod. More specifically, this runs reader.py to determine if there's any errors in your ini files.

Graphical User Interface

Simply run the src/__main__.py file without any arguments to launch the GUI.

Configuration

Modifications are defined in INI files, which specify the files to be patched, the changes to be made, and any additional instructions required for the patching process. The system supports a variety of operations, including:

  • Adding or modifying fields in GFF files.
  • Inserting or modifying rows in 2DA files.
  • Adding or modifying entries in TLK files.
  • Compiling NSS scripts into NCS bytecode without reliance on nwnnsscomp.
  • Modifying SSF sound files.

See the TSLPatcher readme for more information.

Extending

HoloPatcher is designed with extensibility in mind. Developers can extend its functionality by adding new types of modifications or integrating additional game file formats.

Contributing

Contributions to the PyKotor's HoloPatcher are welcome. Whether it's adding new features, improving existing functionality, or fixing bugs, your contributions are appreciated.

Further Documentation

For more detailed guides and tutorials on using HoloPatcher, refer to the following resources:

License

HoloPatcher is released under the LGPL-3.0-or-later License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

holopatcher-2.0.0a1.tar.gz (34.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

holopatcher-2.0.0a1-py3-none-any.whl (33.3 kB view details)

Uploaded Python 3

File details

Details for the file holopatcher-2.0.0a1.tar.gz.

File metadata

  • Download URL: holopatcher-2.0.0a1.tar.gz
  • Upload date:
  • Size: 34.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for holopatcher-2.0.0a1.tar.gz
Algorithm Hash digest
SHA256 a11ef4de03b5a600e8ee068402387f07ed2a97a81ebe9c4a6fa0bdc19002a9f0
MD5 5935f470fed97d917a1fdafaedb195ff
BLAKE2b-256 ad42f9c9cb225b5060d9f002cf93cac9f30544b03127fa9872257120aaef7b7f

See more details on using hashes here.

File details

Details for the file holopatcher-2.0.0a1-py3-none-any.whl.

File metadata

  • Download URL: holopatcher-2.0.0a1-py3-none-any.whl
  • Upload date:
  • Size: 33.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for holopatcher-2.0.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 dbed31d2a5ec61082ff12a169099449b4512e7b191e9ffbe9010ebe0d5804114
MD5 43d6ae549948c19273831ed3347c75e9
BLAKE2b-256 27be839c135d095814960f82a959a9b59d33eea8936248bdc33ee8eb4720761e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page