Skip to main content

Read, modify and write files used by KotOR's game engine.

Project description

PyKotor

A Python library that can read and modify most file formats used by the game Knights of the Old Republic and its sequel.

Installation

Install from PyPI.

pip install pykotor

Example Usage

Simple example of loading data from a game directory, searching for a specific texture and exporting it to the TGA format.

import os
from pykotor.resource.type import ResourceType
from pykotor.extract.installation import Installation
from pykotor.resource.formats.tpc import write_tpc

inst = Installation("C:/Program Files (x86)/Steam/steamapps/common/swkotor")
tex = inst.texture("C_Gammorean01")
write_tpc(tex, os.getcwd() + "/C_Gammorean01.tga", ResourceType.TGA)

License

This repository falls under the MIT 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

PyKotor-1.2.0.tar.gz (276.3 kB view details)

Uploaded Source

Built Distribution

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

PyKotor-1.2.0-py3-none-any.whl (333.6 kB view details)

Uploaded Python 3

File details

Details for the file PyKotor-1.2.0.tar.gz.

File metadata

  • Download URL: PyKotor-1.2.0.tar.gz
  • Upload date:
  • Size: 276.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7

File hashes

Hashes for PyKotor-1.2.0.tar.gz
Algorithm Hash digest
SHA256 5f9eeca6f1aa594a74448d4dc7403ccc23a7f9f46330eb54ff3c2b5d68f4ba1a
MD5 11f9767e8e95686fe4fbf160a49067af
BLAKE2b-256 d350f17c43664cb598de0512a7c7dcb35c4237bcf8b392dd8f75a21d1dc022b2

See more details on using hashes here.

File details

Details for the file PyKotor-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: PyKotor-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 333.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7

File hashes

Hashes for PyKotor-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5d7919326088371197a713b09ca13737cb39ed0925d0069be7d1c2b48080be51
MD5 d42310c7317cbe3c960ca9b4bdb5e4f4
BLAKE2b-256 c03c611afed88b80a008ab90b9331c55f33e75753d8c396ef13fe1a6a3c0ab28

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