Skip to main content

A simple Nintendo BYML or BYAML v2/v3 parser and writer

Project description

Simple bymlv2 parser + writer + converters

Features:

  • Supports v2 and v3 files. These versions are respectively used by The Legend of Zelda: Breath of the Wild and Super Mario Odyssey.
  • Supports 64-bit node types which are used in Super Mario Odyssey.
  • Supports both endianness. The little-endian format is used on the Switch.
  • Cross platform.
  • Easy to edit and readable output. No ugly XML. Unobtrusive type information.

Quick usage

Install Python 3.6+, then run pip install byml.

BYML to YAML

byml_to_yml  PATH_TO_BYML    PATH_TO_YAML

If the byml is compressed, this tool will automatically decompress them.

To reuse the input file name and only change the extension, use !!.NEW_EXTENSION as the second argument.

Example: to convert to YAML in the same directory as the BYML, use byml_to_yml path_to_botw/Actor/ActorInfo.product.sbyml !!.yml

YAML to BYML

yml_to_byml  PATH_TO_YAML    PATH_TO_BYML

Add -b at the end if big endian should be used. For the Wii U version of Breath of the Wild, you must pass that flag.

To reuse the input file name and only change the extension, use !!.NEW_EXTENSION as the second argument.

If the target file extension starts with .s, the tool will automatically compress the BYML using yaz0.

Note about YAML integers/floats

  • !u before an integer indicates that the value is unsigned. In general, you should keep the signedness unchanged.

  • !l is for signed 64 bit values. (Not used in BotW.)

  • !ul is for unsigned 64 bit values. (Not used in BotW.)

  • !f64 is for binary64 floating point values. (Not used in BotW.)

Advanced usage

By default, if the destination argument is not specified, output will be sent to stdout, which is handy for looking at bymls without creating temporary files.

Library usage

import byml

parser = byml.Byml(raw_bytes)
document = parser.parse()

writer = byml.Writer(document, be=big_endian_mode, version=byml_version)
writer.write(writable_seekable_stream)

License

This software is licensed under the terms of the GNU General Public License, version 2 or later.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

byml-2.0.3-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file byml-2.0.3-py3-none-any.whl.

File metadata

  • Download URL: byml-2.0.3-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.7rc1

File hashes

Hashes for byml-2.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3c0de8f5bc09525d8d8df362e39a49ba60b6ca3c32ba2d49eb33a8b18e41bc42
MD5 b961b0280975721bb9c977c09e0de336
BLAKE2b-256 d7f14d95b23b9c478e820259b6e3f3c5a7eeb8579dae470ab67f4d7443bee435

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page