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.6.2.tar.gz (2.5 MB view hashes)

Uploaded Source

Built Distributions

PyKotor-1.6.2-py3-none-any.whl (2.9 MB view hashes)

Uploaded Python 3

PyKotor-1.6.2-1-py3-none-any.whl (2.9 MB view hashes)

Uploaded Python 3

Supported by

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