Skip to main content

Read/write GTA San Andreas & Vice City mobile texture databases (textdb)

Project description

mobile-textdb

Python-библиотека для GTA San Andreas / Vice City Mobile — чтение и запись textdb (.txt, .dat, .toc).

Полная документация: docs/DOCUMENTATION.ru.md

Установка

pip install -e .

Минимальный пример

from pathlib import Path
from PIL import Image
from mobile_textdb import TextureDatabase

db = TextureDatabase.open(Path("texdb/gta3"))
db.replace("radar00", Image.open("radar00.png").convert("RGBA"))
db.save()

TXD (через rwfury)

from mobile_textdb import TextureDatabase, load_txd

db = TextureDatabase.open("texdb/gta3")
for tex in load_txd("grenade.txd", max_size=512):
    (db.replace if db.get(tex.name) else db.add)(tex.name, tex.image)
db.save()

CLI

python example_import_examples.py
mobile-textdb --folder texdb/gta3 --png-dir examples/ --replace

Файлы

Пишем Не трогаем
.txt, .dat, .toc .tmb (не нужен игре)

Платформы

Windows, Linux (Ubuntu), macOS — только Python 3.10+ и pip.

Зависимости

Pillow, texfury, texture2ddecoder, rwfury (импорт TXD)

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

mobile_textdb-0.2.0.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

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

mobile_textdb-0.2.0-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file mobile_textdb-0.2.0.tar.gz.

File metadata

  • Download URL: mobile_textdb-0.2.0.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.8

File hashes

Hashes for mobile_textdb-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f864c6fcfece7c1001a634949d090a67c3be4a442751a8031dc0443bfcbec8ea
MD5 7116bdfb1edd292cf36170501be34c35
BLAKE2b-256 3f8854a8b5479b174ee4416ea4c539062dc0c6cac6d98e8f3e5bcb63dab65467

See more details on using hashes here.

File details

Details for the file mobile_textdb-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: mobile_textdb-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.8

File hashes

Hashes for mobile_textdb-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1c59bed76a5fbf27dba32494fc8ad66d1b97c7273b8e0617a8bf11cc4cbe817c
MD5 72e3832919e8e28c75059d6f359af25b
BLAKE2b-256 82c865e7505fbf47e6432565f099b23cd065a77299cf86f652c34550e0fb0946

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