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).

Режимы импорта (TXD Tool) + prompt для AI: docs/AI_TEXTURE_IMPORT_GUIDE.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.4.0.tar.gz (14.6 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.4.0-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mobile_textdb-0.4.0.tar.gz
  • Upload date:
  • Size: 14.6 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.4.0.tar.gz
Algorithm Hash digest
SHA256 7f29f18fdc2bcb86fc7619e197b5eb47cbb1e139c74bb98b4fc4ee493974e7b6
MD5 8c62823e9bf7b8fc6860415266793777
BLAKE2b-256 58c1711cb85d7a43831a16a077a4222702ce72d2b928344e8ac5f3dd33bc33d3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mobile_textdb-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 17.3 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.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b636ff8c107bf7eec5901ace377bb4f21e5025a2d7507e0fff54a81d213038d3
MD5 7688c6c4e90a56dca1b16b8a3d42a41f
BLAKE2b-256 ce8550eefbb70a88a16d907c21587037d546aec5a43b733493c78b0590a51d84

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