ASB
ASB (Animation Sequence Binary) is a file format used to store animation sequences for actors in recent Nintendo EPD games such as The Legend of Zelda: Tears of the Kingdom and Nintendo Switch Sports. This article is primarily aimed at the version that appears in Tears of the Kingdom (v0x0417). Other ASB versions include 0x304 (Ring Fit Adventure), 0x3FB (Labo Toy-Con 04 and Game Builder Garage), 0x407 (Animal Crossing: New Horizons), 0x40F (Nintendo Switch Sports), 0x410 (Splatoon 3), and 0x418 (Super Mario Bros. Wonder). ASB files can be found in the AS folder of the romfs as well as the AS folder of certain pack files.
File Structure
ASB is a little endian format which consists of node pathways triggered by AS commands. When an AS command is called, it runs the sequence of nodes connected to it which trigger and control animations and animation logic. Nodes are arranged in an array and referenced and accessed by their array index. Despite the presence of animation events in ASB files, these events do not appear to be used by the game.
All string offsets in the file are relative to the start of the string pool and name hashes are 32-bit murmur3 hashes. There are six possible parameter types: string, int (32-bit signed integer), float (32-bit floating point number), bool, vector3f, and pointer (object pointer).
Section Order
- File Header (0x6C bytes in version 0x417, 0x68 bytes in version 0x40F)
- AS Commands
- Nodes
- Event Entry Offsets
- Node Bodies
- 0x38 Section Indices
- 0x38 Section
- 0x2C Section
- Events
- Transitions
- Command Groups
- Local Blackboard Parameters
- Partial Slots
- Bone Groups
- Calculation Presets
- Valid Tag List
- Tag Groups
- Expression Binary
- AS Markings
- 0x68 Section (version 0x417 only)
- Enum Resolve Table
- String Pool
Sections
File Header
Offset | Size | Type | Description |
---|---|---|---|
0x00 | 0x04 | char[4] | Magic - "ASB " |
0x04 | 0x04 | u32 | Version (0x0417 in Tears of the Kingdom, 0x040F in Nintendo Switch Sports and Splatoon 3) |
0x08 | 0x04 | u32 | Filename Offset |
0x0C | 0x04 | u32 | AS Command Count |
0x10 | 0x04 | u32 | Node Count |
0x14 | 0x04 | u32 | Event Count |
0x18 | 0x04 | u32 | Partial Slot Count |
0x1C | 0x04 | u32 | 0x38 Section Entry Count |
0x20 | 0x04 | u32 | Local Blackboard Parameters Offset |
0x24 | 0x04 | u32 | String Pool Offset |
0x28 | 0x04 | u32 | Enum Resolve Table Offset |
0x2C | 0x04 | u32 | 0x2C Section Offset |
0x30 | 0x04 | u32 | Event Entries Offset Array Offset |
0x34 | 0x04 | u32 | Partial Slots Offset |
0x38 | 0x04 | u32 | 0x38 Section Offset |
0x3C | 0x04 | u32 | 0x38 Section Indices Array Offset |
0x40 | 0x04 | u32 | Calculation Presets Offset |
0x44 | 0x04 | u32 | Calculation Preset Count |
0x48 | 0x04 | u32 | Bone Groups Offset |
0x4C | 0x04 | u32 | Bone Group Count |
0x50 | 0x04 | u32 | String Pool Size |
0x54 | 0x04 | u32 | Transitions Offset |
0x58 | 0x04 | u32 | Tag List Offset |
0x5C | 0x04 | u32 | String Triplets Offset |
0x60 | 0x04 | u32 | EXB Offset (empty if section does not exist) |
0x64 | 0x04 | u32 | Command Groups Offset (empty if section does not exist) |
0x68 | 0x04 | u32 | 0x68 Section Offset (version 0x417 only) |
ASB Parameter
Offset | Size | Type | Description |
---|---|---|---|
0x00 | 0x04 | s32 | Flags and Index |
0x04 | 0x04 or 0x0C | T | Value |
If the parameter flags are negative, then the bottom two bytes of flag are an index value.
AS Commands
Offset | Size | Type | Description |
---|---|---|---|
0x00 | 0x04 | u32 | Name Offset |
0x04 | 0x04 | u32 | Tag Entry Offset (version 0x417+) |
0x08 | 0x04 | u32 | Filename Offset |
0x0C | 0x08 | Parameter<float> | |
0x14 | 0x08 | Parameter<s32> | |
0x1C | 0x04 | u32 | |
0x20 | 0x02 | u16 | Child Node Index |
0x22 | 0x04 | u16 |
Nodes
Offset | Size | Type | Description |
---|---|---|---|
0x00 | 0x02 | AsbNodeType | Node Type |
0x02 | 0x01 | u8 | 0x3C Entry Count |
0x03 | 0x01 | u8 | |
0x04 | 0x04 | u32 | Tag Entry Offset |
0x08 | 0x04 | u32 | Node Body Offset |
0x0C | 0x02 | u16 | Calculation Preset Index |
0x0E | 0x02 | u16 | Calculation Preset Count |
0x10 | 0x02 | u16 | 0x3C Entry Index |
0x12 | 0x02 | u16 | AS Markings Index (-1 for index) |
0x04 | 0x10 | u32 | GUID |
u16 | |||
u16 | |||
u16 | |||
u8[6] |