Skip to main content

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)

Metadata

Release files for mobile-textdb 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mobile-textdb 0.4.0
File Size Uploaded
mobile_textdb-0.4.0.tar.gz 14.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mobile-textdb 0.4.0
File Interpreter ABI Platform
mobile_textdb-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 31.9 kB

Release files / mobile_textdb-0.4.0.tar.gz

Download URL mobile_textdb-0.4.0.tar.gz
Size 14.6 kB
Tags Source
SHA-256 checksum
How to use checksums
7f29f18fdc2bcb86fc7619e197b5eb47cbb1e139c74bb98b4fc4ee493974e7b6
BLAKE2b-256 checksum
How to use checksums
58c1711cb85d7a43831a16a077a4222702ce72d2b928344e8ac5f3dd33bc33d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.8

Release files / mobile_textdb-0.4.0-py3-none-any.whl

Download URL mobile_textdb-0.4.0-py3-none-any.whl
Size 17.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b636ff8c107bf7eec5901ace377bb4f21e5025a2d7507e0fff54a81d213038d3
BLAKE2b-256 checksum
How to use checksums
ce8550eefbb70a88a16d907c21587037d546aec5a43b733493c78b0590a51d84
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.8

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page