<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.wexosmk.xyz/index.php?action=history&amp;feed=atom&amp;title=BYAML_%28File_Format%29</id>
	<title>BYAML (File Format) - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.wexosmk.xyz/index.php?action=history&amp;feed=atom&amp;title=BYAML_%28File_Format%29"/>
	<link rel="alternate" type="text/html" href="https://wiki.wexosmk.xyz/index.php?title=BYAML_(File_Format)&amp;action=history"/>
	<updated>2026-05-06T17:00:41Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://wiki.wexosmk.xyz/index.php?title=BYAML_(File_Format)&amp;diff=159&amp;oldid=prev</id>
		<title>Wexos: Imported from avsys wiki</title>
		<link rel="alternate" type="text/html" href="https://wiki.wexosmk.xyz/index.php?title=BYAML_(File_Format)&amp;diff=159&amp;oldid=prev"/>
		<updated>2024-05-01T17:21:27Z</updated>

		<summary type="html">&lt;p&gt;Imported from avsys wiki&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{about|For the [[Mario Kart 8]] and [[Mario Kart 8 Deluxe]]-specific course BYAML, see [[course_muunt.byaml (File Format)]].}}&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;BYAML&amp;#039;&amp;#039;&amp;#039; is a generic file format used on [[Wii U]] and the [[Nintendo Switch]] in games like [[Mario Kart 8]] and [[Mario Kart 8 Deluxe]]. &amp;#039;&amp;#039;&amp;#039;BYML&amp;#039;&amp;#039;&amp;#039; is basically the same, and is used in games like [[Super Mario 3D World]] and [[Super Mario Odyssey]].&lt;br /&gt;
&lt;br /&gt;
= File Format =&lt;br /&gt;
== Header ==&lt;br /&gt;
The file starts with a 0x10 or 0x14 bytes long header. An offset can be 0 meaning it points to nothing.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Char[2] || &amp;#039;&amp;#039;&amp;#039;File magic&amp;#039;&amp;#039;&amp;#039;. &amp;#039;&amp;#039;BY&amp;#039;&amp;#039; for big endian files, and &amp;#039;&amp;#039;YB&amp;#039;&amp;#039; for little endian files.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt16 || File format &amp;#039;&amp;#039;&amp;#039;version&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Node name [[#String Table Node|string table node]] offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt32 || &amp;#039;&amp;#039;&amp;#039;String value [[#String Table Node|string table node]] offset.&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || UInt32 || &amp;#039;&amp;#039;&amp;#039;[[#Serialized Data Table Node|Serialized data table node]] offset&amp;#039;&amp;#039;&amp;#039;. Usually doesn&amp;#039;t exist for BYML files.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Root node&amp;#039;&amp;#039;&amp;#039;. Must be an [[#Array Node|array node]] or [[#Dictionary Node|dictionary node]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Nodes ==&lt;br /&gt;
The file consists of multiple nodes, stored in a hierarchy. There are two special-purpose nodes, [[#String Table Node|string table node]] and [[#Serialized Data Table Node|serialized data table node]], which can only be linked by the [[#Header|header]] and cannot be stored in the hierarchy of nodes. Only two nodes allow storing children, [[#Dictionary Node|dictionary node]] and [[#Array Node|array node]]. Each child element consists of a 32-bit integer. If the child node is four bytes long, then the 32-bit integer represents the value of the child node. If the child node is larger than four bytes, then the 32-bit integer represents an absolute offset to the data of the node. For Int32 and Float, the data is stored directly since those are exactly four bytes long, but [[#Array Node|array node]] and Int64 are examples where an offset is stored.&lt;br /&gt;
&lt;br /&gt;
The following table shows all available node types:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ID !! Name !! Available since version&lt;br /&gt;
|-&lt;br /&gt;
| 0xA0 || String reference || 1&lt;br /&gt;
|-&lt;br /&gt;
| 0xA1 || Serialized data reference || 1&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0 || [[#Array Node|Array]] || 1&lt;br /&gt;
|-&lt;br /&gt;
| 0xC1 || [[#Dictionary Node|Dictionary]] || 1&lt;br /&gt;
|-&lt;br /&gt;
| 0xC2 || [[#String Table Node|String table]] || 1&lt;br /&gt;
|-&lt;br /&gt;
| 0xC3 || [[#Serialized Data Table Node|Serialized data table]] || 1&lt;br /&gt;
|-&lt;br /&gt;
| 0xD0 || Boolean || 1&lt;br /&gt;
|-&lt;br /&gt;
| 0xD1 || Int32 || 1&lt;br /&gt;
|-&lt;br /&gt;
| 0xD2 || Float || 1&lt;br /&gt;
|-&lt;br /&gt;
| 0xD3 || UInt32 || 2&lt;br /&gt;
|-&lt;br /&gt;
| 0xD4 || Int64 || 2 or 3&lt;br /&gt;
|-&lt;br /&gt;
| 0xD5 || UInt64 || 2 or 3&lt;br /&gt;
|-&lt;br /&gt;
| 0xD6 || Double || 2&lt;br /&gt;
|-&lt;br /&gt;
| 0xFF || Null || 2 or 3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Array Node ==&lt;br /&gt;
An &amp;#039;&amp;#039;&amp;#039;array node&amp;#039;&amp;#039;&amp;#039; consists a collection of child nodes, all of arbitrary types. An array node has the following structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Byte || &amp;#039;&amp;#039;&amp;#039;Node type&amp;#039;&amp;#039;&amp;#039;. Must be 0xC0.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt24 || &amp;#039;&amp;#039;&amp;#039;Number of child elements&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Byte[&amp;#039;&amp;#039;&amp;#039;N&amp;#039;&amp;#039;&amp;#039;] || &amp;#039;&amp;#039;&amp;#039;Child node types&amp;#039;&amp;#039;&amp;#039;. Each byte represents a [[#Nodes|node type]].&lt;br /&gt;
|- bgcolor=&amp;quot;AAAAAA&amp;quot;&lt;br /&gt;
| colspan=3 {{Unknown|Align by 4.}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The child elements comes after the structure, altough at an offset aligned by four. If the size of the child node is four bytes, then the direct value is stored. Otherwise a 32-bit offset is stored, which points to the child data. See [[#Nodes|nodes]].&lt;br /&gt;
&lt;br /&gt;
== Dictionary Node ==&lt;br /&gt;
A &amp;#039;&amp;#039;&amp;#039;dictionary node&amp;#039;&amp;#039;&amp;#039; consists of a named child nodes. Like an [[#Array Node|array node]], it stores a collection of child nodes, although in a dictionary node all child nodes are named. A dictionary node has the following structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Byte || &amp;#039;&amp;#039;&amp;#039;Node type&amp;#039;&amp;#039;&amp;#039;. Must be 0xC1.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt24 || &amp;#039;&amp;#039;&amp;#039;Number of child elements&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
After that, each dictionary entry is stored, each of which describes a child node. It has the following structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt24 || &amp;#039;&amp;#039;&amp;#039;Name index&amp;#039;&amp;#039;&amp;#039;. Index of string into the [[#Header|node name]] [[#String Table Node|string table node]] linked in the [[#Header|header]] which represents the name of this node.&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Byte || &amp;#039;&amp;#039;&amp;#039;Child node type&amp;#039;&amp;#039;&amp;#039;. See [[#Nodes|nodes]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Child element&amp;#039;&amp;#039;&amp;#039;. If the size of the child node is four bytes, then the direct value is stored. Otherwise a 32-bit offset is stored, which points to the child data. See [[#Nodes|nodes]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
; Dictionary look-up&lt;br /&gt;
When looking up a string in a dictionary node, binary search is done twice. First, binary search is used to find the index of the name into the [[#Header|node name]] [[#String Table Node|string table node]]. If the name doesn&amp;#039;t exist, then there is no node in the dictionary with that name. However, if it does exist, binary search is used again to find if there is a node with a name index matching the index which was looked up earlier. In order for this to work, the dictionary entries must be sorted on name index.&lt;br /&gt;
&lt;br /&gt;
== String Table Node ==&lt;br /&gt;
A &amp;#039;&amp;#039;&amp;#039;string table node&amp;#039;&amp;#039;&amp;#039; stores strings and is accessed by an index in a [[#Dictionary Node|dictionary node]] or [[#Value Nodes|string node]]. The node can only be linked in the header. All strings are null-terminated, and must be sorted on true UTF-8 order in order to allow binary search. The node starts with the following structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Byte || &amp;#039;&amp;#039;&amp;#039;Node type&amp;#039;&amp;#039;&amp;#039;. Must be 0xC2.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt24 || &amp;#039;&amp;#039;&amp;#039;Number of strings&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt32[&amp;#039;&amp;#039;&amp;#039;N&amp;#039;&amp;#039;&amp;#039; + 1] || &amp;#039;&amp;#039;&amp;#039;String offsets&amp;#039;&amp;#039;&amp;#039;. The last offset points to the end of the last string. The offsets are relative to the start of this node structure.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Serialized Data Table Node ==&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;serialized data table node&amp;#039;&amp;#039;&amp;#039; stores a collection of generic data. What the data contains is game-specific. Serialized data is accessed by a [[#Value Nodes|serialized data node]]. The node starts with the following structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Byte || &amp;#039;&amp;#039;&amp;#039;Node type&amp;#039;&amp;#039;&amp;#039;. Must be 0xC3.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt24 || &amp;#039;&amp;#039;&amp;#039;Number of serialized data elements&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt32[&amp;#039;&amp;#039;&amp;#039;N&amp;#039;&amp;#039;&amp;#039; + 1] || &amp;#039;&amp;#039;&amp;#039;Serialized data offsets&amp;#039;&amp;#039;&amp;#039;. The last offset points to the end of the last entry. The offsets are relative to the start of this node structure. The size of each entry is known by looking at the next data offset.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Value Nodes ==&lt;br /&gt;
The following table shows all nodes which cannot contain children and are not special-purpose.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ID !! Name !! Size !! Descrption&lt;br /&gt;
|-&lt;br /&gt;
| 0xA0 || String reference || 4 || 32-bit integer which represents an index into the [[#Header|string value]] [[#String Table Node|string table]] linked in the [[#Header|header]].&lt;br /&gt;
|-&lt;br /&gt;
| 0xA1 || Serialized data reference || 4 || 32-bit integer which represents an index into the [[#Header|serialized data]] [[#Serialized Data Table Node|table node]] linked in the [[#Header|header]].&lt;br /&gt;
|-&lt;br /&gt;
| 0xD0 || Boolean || 4 || 32-bit integer boolean, where 1 represents true and 0 represents false.&lt;br /&gt;
|-&lt;br /&gt;
| 0xD1 || Int32 || 4 || 32-bit signed integer.&lt;br /&gt;
|-&lt;br /&gt;
| 0xD2 || Float || 4 || 32-bit floating-point.&lt;br /&gt;
|-&lt;br /&gt;
| 0xD3 || UInt32 || 4 || 32-bit unsigned integer.&lt;br /&gt;
|-&lt;br /&gt;
| 0xD4 || Int64 || 8 || 64-bit signed integer.&lt;br /&gt;
|-&lt;br /&gt;
| 0xD5 || UInt64 || 8 || 64-bit unsigned integer.&lt;br /&gt;
|-&lt;br /&gt;
| 0xD6 || Double || 8 || 64-bit floating-point.&lt;br /&gt;
|-&lt;br /&gt;
| 0xFF || Null || 4 || Null. Generally this is used to specify a null value for a string. A 32-bit zero value is stored as a dummy value.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Tools =&lt;br /&gt;
The following tools can handle BYAML/BYML files:&lt;br /&gt;
* (none)&lt;br /&gt;
&lt;br /&gt;
[[Category:Switch File Formats]]&lt;br /&gt;
[[Category:Wii U File Formats]]&lt;/div&gt;</summary>
		<author><name>Wexos</name></author>
	</entry>
</feed>