Data types
Every entry in a save file is associated with a DataType that determines how its payload is laid out and interpreted. There are 33 types in total, numbered 0 through 32.
The entry table is a flat sequence of 8-byte (hash, slot) pairs. The hash field doubles as a discriminator:
hash != 0- a data entry.slotis either the inline value (for inline scalars) or a byte offset into the heap region (for everything else), interpreted under the currentDataType.hash == 0- a type sentinel.slotis itself aDataTypevalue, and it sets the current type for every data entry that follows, until the next sentinel.
Inline scalars
Section titled “Inline scalars”These types fit in the 4-byte inline slot of an entry. No separate payload is allocated.
tag = 0 - single byte interpreted as false when zero and true otherwise. Stored in the low byte of the inline slot.
tag = 2 - signed 32-bit integer, little-endian.
tag = 20 - unsigned 32-bit integer, little-endian.
tag = 4 - IEEE-754 binary32, little-endian. The inline slot holds the raw bits.
tag = 6 - unsigned 32-bit murmur3 hash of an enum value name. The set of accepted hashes for each field is listed on the Enums pages.
64-bit scalars
Section titled “64-bit scalars”These types are too large for the inline slot and live in the payload region.
tag = 22 - signed 64-bit integer, little-endian, 8-byte payload.
UInt64
Section titled “UInt64”tag = 24 - unsigned 64-bit integer, little-endian, 8-byte payload.
Vectors
Section titled “Vectors”Packed sequences of 32-bit floats, little-endian, in payload.
Vector2
Section titled “Vector2”tag = 8 - (x, y) as two float32 values. 8-byte payload.
Vector3
Section titled “Vector3”tag = 10 - (x, y, z) as three float32 values. 12-byte payload.
Narrow strings
Section titled “Narrow strings”Fixed-capacity UTF-8 byte buffers, NUL-terminated when shorter than the capacity. The number suffix is the buffer length in bytes.
String16
Section titled “String16”tag = 12 - up to 16 bytes of UTF-8.
String32
Section titled “String32”tag = 14 - up to 32 bytes of UTF-8.
String64
Section titled “String64”tag = 16 - up to 64 bytes of UTF-8.
Wide strings
Section titled “Wide strings”Fixed-capacity UTF-16LE buffers, NUL-terminated when shorter than the capacity. The number suffix is the buffer length in UTF-16 code units, so each holds twice as many bytes as the suffix suggests.
WString16
Section titled “WString16”tag = 26 - up to 16 UTF-16 code units (32 bytes).
WString32
Section titled “WString32”tag = 28 - up to 32 UTF-16 code units (64 bytes).
WString64
Section titled “WString64”tag = 30 - up to 64 UTF-16 code units (128 bytes).
Binary
Section titled “Binary”Binary
Section titled “Binary”tag = 18 - arbitrary byte buffer of variable length. The container records the byte count; the interpretation is per-field.
Arrays
Section titled “Arrays”Array types share tag = scalar_tag + 1. Each is encoded as a 4-byte little-endian count followed by tightly-packed elements in the same layout as the scalar form, with the exception of BoolArray (see below). Strings inside an array still use their full fixed capacity.
BoolArray
Section titled “BoolArray”tag = 1 - bit-packed array of Bool. Stored as ⌈count / 8⌉ bytes (minimum 4) after the count, rounded up to a multiple of 4.
IntArray
Section titled “IntArray”tag = 3 - array of Int.
UIntArray
Section titled “UIntArray”tag = 21 - array of UInt.
FloatArray
Section titled “FloatArray”tag = 5 - array of Float.
EnumArray
Section titled “EnumArray”tag = 7 - array of Enum hashes.
Int64Array
Section titled “Int64Array”tag = 23 - array of Int64.
UInt64Array
Section titled “UInt64Array”tag = 25 - array of UInt64.
Vector2Array
Section titled “Vector2Array”tag = 9 - array of Vector2.
Vector3Array
Section titled “Vector3Array”tag = 11 - array of Vector3.
String16Array
Section titled “String16Array”tag = 13 - array of String16. Each element occupies 16 bytes.
String32Array
Section titled “String32Array”tag = 15 - array of String32. Each element occupies 32 bytes.
String64Array
Section titled “String64Array”tag = 17 - array of String64. Each element occupies 64 bytes.
WString16Array
Section titled “WString16Array”tag = 27 - array of WString16. Each element occupies 32 bytes.
WString32Array
Section titled “WString32Array”tag = 29 - array of WString32. Each element occupies 64 bytes.
WString64Array
Section titled “WString64Array”tag = 31 - array of WString64. Each element occupies 128 bytes.
BinaryArray
Section titled “BinaryArray”tag = 19 - array of Binary buffers. Each element is preceded by its own 4-byte length.
Special
Section titled “Special”Bool64bitKey
Section titled “Bool64bitKey”tag = 32 - a type carried over from the underlying save framework, not used as a schema field type by Tomodachi Life. GameDataList.Product.100.byml declares zero Bool64bitKey fields. The only entries the game writes in this section are one per save file, whose hash is murmur3(file_name) (Player -> 0x08b37691, Mii -> 0x5917a80c, Map -> 0x441c30df), with slot = 0 and no heap payload.