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
Release history Release notifications | RSS feed
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.5.2.tar.gz
(574.2 kB
view hashes)
Built Distribution
PyKotor-1.5.2-py3-none-any.whl
(648.7 kB
view hashes)