Skip to main content

KOTOR Configuration Generator for HoloPatcher - GUI and CLI tool

Project description

HoloGenerator - KOTOR Configuration Generator for HoloPatcher

HoloGenerator is a GUI-only tool for automatically generating changes.ini files compatible with HoloPatcher by comparing two KOTOR installations or individual files.

๐ŸŒŸ Features

Multiple Interfaces

  • Desktop GUI: User-friendly tkinter-based interface
  • Web Application: Modern React-based web interface with real-time diffing

Note: HoloGenerator is designed exclusively for GUI usage. If you need command-line functionality, please use KotorDiff instead.

Advanced Diffing

  • Real-time comparison: Fast, visual side-by-side file comparison
  • Multi-format Support: GFF, 2DA, TLK, SSF, LIP, and other KOTOR file formats
  • Word-level diffing: Granular change detection and highlighting
  • Intelligent caching: Optimized performance for large files

Workflow Features

  • Undo/Redo: Full history tracking with keyboard shortcuts (Ctrl+Z, Ctrl+Y)
  • Sequential file addition: Build complex configurations by adding multiple file diffs
  • Import/Export: Support for importing existing changes.ini files
  • Copy/Download: Easy sharing and distribution of generated configurations

Web Interface

  • Intuitive UI: Clean, modern interface inspired by GitHub's diff viewer
  • Drag & Drop: Easy file uploads with format auto-detection
  • Live Preview: Real-time configuration generation and preview
  • Mobile Friendly: Responsive design that works on all devices

๐Ÿš€ Quick Start

Web Interface

Visit: https://th3w1zard1.github.io/hologenerator

Desktop GUI

python -m hologenerator

๐Ÿ“ฆ Installation

From Source

cd Tools/HoloGenerator
pip install -e .

Development Setup

cd Tools/HoloGenerator
python setup_dev.py

๐Ÿ”ง Usage Examples

Desktop GUI

Launch the application:

python -m hologenerator

Using the GUI:

  1. Select your original and modified KOTOR installations or files
  2. View real-time differences in the diff viewer
  3. Generate a complete changes.ini configuration file
  4. Save or copy the generated configuration

Web Interface Workflow

  1. Upload/Paste Files: Add your original and modified file content
  2. Real-time Diff: See changes highlighted instantly
  3. Build Configuration: Add multiple file diffs sequentially
  4. Generate Config: Create a complete changes.ini file
  5. Download/Copy: Get your configuration for distribution

๐Ÿ—‚๏ธ File Format Support

Format Description Support Level Example Files
GFF Game resource files โœ… Full .utc, .uti, .dlg, .are, .git, .ifo, .jrl
2DA Table files โœ… Full appearance.2da, classes.2da, spells.2da
TLK Dialog/string files โœ… Full dialog.tlk, dialogf.tlk
SSF Sound set files โœ… Full .ssf files
LIP Lip-sync files โœ… Full .lip files
Others Binary files โšก Hash comparison Any other format

๐Ÿ—๏ธ Architecture

Core Components

hologenerator/
โ”œโ”€โ”€ core/
โ”‚   โ”œโ”€โ”€ differ.py          # File comparison engine
โ”‚   โ”œโ”€โ”€ changes_ini.py     # HoloPatcher config generation  
โ”‚   โ””โ”€โ”€ generator.py       # Main configuration generator
โ”œโ”€โ”€ gui/
โ”‚   โ””โ”€โ”€ main.py           # Tkinter-based desktop interface
โ””โ”€โ”€ web/                  # React web application
    โ”œโ”€โ”€ src/components/   # React components
    โ”œโ”€โ”€ src/hooks/        # Custom React hooks
    โ””โ”€โ”€ src/utils/        # Utility functions

Generated Configuration Structure

The tool generates standard HoloPatcher sections:

[Settings]
WindowCaption=Generated Mod Configuration
ConfirmMessage=This mod was generated from file differences.

[InstallList]
File1=Override

[Override]
File1=modified_file.txt

[GFFList]
File1=character.utc

[character.utc]
ModifyField1=FieldModification1

[2DAList]
File1=appearance.2da

[appearance.2da]
ChangeRow1=RowModification1

[TLKList]
StrRef42=Modified

๐Ÿงช Testing

Run All Tests

./run_tests.sh

Individual Test Suites

# Python tests
python -m pytest src/hologenerator/tests/ -v

# React tests
cd web && npm test

# GUI tests (if tkinter available)
python -m unittest src/hologenerator/tests/test_gui.py

Test Coverage

  • Core functionality: 100% coverage of critical paths
  • Error handling: Comprehensive error scenario testing
  • Integration tests: End-to-end workflow validation
  • Cross-platform: Windows, Linux, and macOS compatibility

๐ŸŒ Web Deployment

The React web application is automatically deployed to GitHub Pages via GitHub Actions:

Automatic Deployment

  • Trigger: Push to main branch with changes in Tools/HoloGenerator/web/
  • Build: React production build with optimizations
  • Deploy: GitHub Pages deployment to https://th3w1zard1.github.io/hologenerator

Manual Deployment

cd web
npm run build
npm run deploy

๐Ÿ› ๏ธ Development

Prerequisites

  • Python 3.8+ (required)
  • Node.js 16+ (for web interface)
  • tkinter (required, for GUI)

Development Setup

# Setup development environment
python setup_dev.py

# Start React development server
cd web && npm start

# Run in development mode
python -m hologenerator

Code Quality

  • Linting: flake8, ESLint
  • Formatting: black, Prettier
  • Type Checking: mypy, TypeScript
  • Testing: pytest, Jest
  • Pre-commit Hooks: Automatic testing before commits

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Setup development environment (python setup_dev.py)
  4. Make your changes with tests
  5. Test your changes (./run_tests.sh)
  6. Commit your changes (git commit -m 'Add amazing feature')
  7. Push to the branch (git push origin feature/amazing-feature)
  8. Open a Pull Request

๐Ÿ“ License

This project is part of the PyKotor toolkit and follows the same licensing terms.

๐Ÿ™ Acknowledgments

  • PyKotor Team: For the core KOTOR file format libraries
  • HoloPatcher: For the configuration format specification
  • KOTOR Community: For feedback and testing

๐Ÿ”— Links

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

hologenerator-1.0.1.tar.gz (26.4 kB view details)

Uploaded Source

Built Distribution

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

hologenerator-1.0.1-py3-none-any.whl (27.8 kB view details)

Uploaded Python 3

File details

Details for the file hologenerator-1.0.1.tar.gz.

File metadata

  • Download URL: hologenerator-1.0.1.tar.gz
  • Upload date:
  • Size: 26.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hologenerator-1.0.1.tar.gz
Algorithm Hash digest
SHA256 4503581d03f89fc87448453d9684a360d9fb377dced572c01d7fa5bfefab7837
MD5 cdc018feef39bf681c99383c2890ab9c
BLAKE2b-256 429c8ad1feb79cb5c0aa17c20fcd48748666f2af7f5ccadef7ade09b121b323b

See more details on using hashes here.

File details

Details for the file hologenerator-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: hologenerator-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 27.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hologenerator-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d922e8c5fbd1f0105dc04c7e6debaf8b524a30206a43413d8964a9b5b09d0595
MD5 073d7f5a6d6f582596dc69bae1def132
BLAKE2b-256 a1f54db5aa9a22b717e55806b973a7513acf4c83dd8720028a19f1c469051205

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