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 (≥ 11.2.1), texfury (только Windows), 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.3.0.tar.gz (11.5 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.3.0-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mobile_textdb-0.3.0.tar.gz
  • Upload date:
  • Size: 11.5 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.3.0.tar.gz
Algorithm Hash digest
SHA256 9f98c9217be479ddd509bcf04ab2771d681af81b4f81f4e6d0b564ce777e7577
MD5 fb97d11aa5b1a50f5d262d14aa6286f1
BLAKE2b-256 b0c7acc85478762d8f9100cdb990986206a619a2ea212a8b79eb45208fc62535

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mobile_textdb-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 13.8 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 242f6c3d7bce80fae3aedd4effd2699841170d9d8ce586497c062e8e4ecc45e7
MD5 8a6819096a567701b8a5bf916d03913b
BLAKE2b-256 9f2e643084c3462b223aeb2bdb7480d33784b7cc3a761621b404390cfcecfa26

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