A python library for parsing and editing .msbt binary files
Project description
pymsbt
A simple python library for reading and editing .msbt (Message Studio Binary Text) files, which is a file format created by Nintendo for use in their games. These files are used for localization and displaying text to the player. This library was created for batch-editing or reading msbt files to mod Nintendo games, such as with a translator api or regex expression. This could be used to create language translations that aren't officialy supported by the base game.
Installation
pip install pymsbt
Example usage
( Make sure to read the wiki for more information )
Reading a msbt file
from pymsbt.msbt import MSBTFile
msbt = MSBTFile("./msbt/ActorMsg/Attachment.msbt")
print(msbt.text_labels['Item_Enemy_223_Adjective'])
Editing a msbt file
from pymsbt.msbt import MSBTFile
from pymsbt.msbt_write import MSBTWriter
from pymsbt.classes import TextComponent
msbt = MSBTFile("./msbt/ActorMsg/Attachment.msbt")
msbt.set_text('Item_Enemy_223_Adjective', [TextComponent('test')]) # see the wiki for more information about the structure of text data
write = MSBTWriter(msbt, "output.msbt")
print("Wrote msbt file to", write.filepath)
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pymsbt-1.0.2.tar.gz.
File metadata
- Download URL: pymsbt-1.0.2.tar.gz
- Upload date:
- Size: 19.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6be33e65a8ddb54b011350a08ecc508f99a868d4b5fe22c0bf4c1110ce493898
|
|
| MD5 |
1b55c77103dc4fcabec1c726dcf897b2
|
|
| BLAKE2b-256 |
109fdd0fb739a7faf913170da3c8e4e429444cf5c30a5d87475e3ff47d6066a2
|
File details
Details for the file pymsbt-1.0.2-py3-none-any.whl.
File metadata
- Download URL: pymsbt-1.0.2-py3-none-any.whl
- Upload date:
- Size: 20.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7c44ca0664d6e6ded6239e373676d5a4e2146ca4e6a3a1d951900dbd6cb784e
|
|
| MD5 |
6843f63d16c11062a1a4173974289950
|
|
| BLAKE2b-256 |
dfbb99004b0c9f3576b93fe0ddcc235d6f595da47ceb5a6bf7680cfc4dc9f087
|