Format:BYML
| On this wiki | Facts · Code · Notes · Topics |
|---|
Nintendo's binary YAML-like data format (.byml, .byaml): a 16-byte header (BY big endian or YB little endian, version 1-4, offsets of a key table, a string table and the root node) and typed nodes (array 0xC0, hash 0xC1, string table 0xC2, scalars 0xD0-0xD6).
Overview
BYML is the binary form of YAML-like documents used for game parameters, maps and actor data on Wii U and Switch. The structure below is from zeldamods/oead (GPL-2.0-or-later) src/byml.cpp, which reads versions 1 to 4.
Header (0x10 bytes)
| Offset | Field |
|---|---|
| 0x00 | BY (big endian) or YB (little endian)
|
| 0x02 | u16 version, 1 to 4 |
| 0x04 | u32 offset of the hash key table (usually 0x10; 0 if no hash nodes), a string table node |
| 0x08 | u32 offset of the string table (0 if no strings) |
| 0x0C | u32 offset of the root node (0 for an empty document), an array or hash node |
Node types
0xA0 string (index into the string table), 0xA1 binary, 0xC0 array, 0xC1 hash (dictionary), 0xC2 string table, 0xC3 path table (oead does not support it), 0xD0 bool, 0xD1 int32, 0xD2 float, 0xD3 uint32, 0xD4 int64, 0xD5 uint64, 0xD6 double, 0xFF null.
Containers and tables
- Array: u8 type 0xC0, u24 count, then one type byte per element padded up to 4 bytes, then one u32 value per element.
- Hash: u8 type 0xC1, u24 count, then 8-byte entries: u24 index into the hash key table, u8 value type, u32 value.
- String table: u8 type 0xC2, u24 count, then count+1 u32 offsets relative to the table start (the extra one marks the end of the last string), then the NUL-terminated strings.
- Values: bool, int32, uint32, float and the string index are stored in the u32 slot itself; int64, uint64 and double slots hold an offset to the 8-byte value; a binary slot holds an offset to a u32 size followed by the bytes; array and hash children are stored as an offset to the child container.
Related
Format:SARC archive (BYML files are usually packed in SARC archives, often Yaz0-compressed), Format:Yaz0, Platform:Nintendo Switch.
Code & repositories
- https://github.com/zeldamods/oead @
5fb74e1128468380b47da23a5690891c8af4ab72· license: GPL-2.0-or-later (declared by the contributor for the files used; GitHub reports GPL-2.0 for the repository)
Library and Python module for Nintendo formats: SARC, BYML, AAMP, Yaz0 (zlib-based encoder), FSTM/FSTP/FWAV audio header readers; src/sarc.cpp and src/byml.cpp define the binary layouts
Tested on: source read, not run: source read, not run · checked 2026-10-18; last activity 2026-10-02