Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymsbt-1.0.2.tar.gz (19.3 kB view details)

Uploaded Source

Built Distribution

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

pymsbt-1.0.2-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

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

Hashes for pymsbt-1.0.2.tar.gz
Algorithm Hash digest
SHA256 6be33e65a8ddb54b011350a08ecc508f99a868d4b5fe22c0bf4c1110ce493898
MD5 1b55c77103dc4fcabec1c726dcf897b2
BLAKE2b-256 109fdd0fb739a7faf913170da3c8e4e429444cf5c30a5d87475e3ff47d6066a2

See more details on using hashes here.

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

Hashes for pymsbt-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e7c44ca0664d6e6ded6239e373676d5a4e2146ca4e6a3a1d951900dbd6cb784e
MD5 6843f63d16c11062a1a4173974289950
BLAKE2b-256 dfbb99004b0c9f3576b93fe0ddcc235d6f595da47ceb5a6bf7680cfc4dc9f087

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