ASB: Difference between revisions
m Correct exb pointer field type in header |
m specified that Elements / Nodes only have tags in version 0x417 |
||
| (2 intermediate revisions by one other user not shown) | |||
| Line 1: | Line 1: | ||
'''ASB''' ('''A'''nimation '''S'''equence '''B'''inary) is a file format used to store animation sequences for | '''ASB''' ('''A'''nimation '''S'''equence '''B'''inary) is a file format used to store "animation sequences" for populating "animation slots" of a model. This article is primarily aimed at version 0x41b. In ModuleSystem titles ASB files are typically found in under the "AS" folder, which can appear in the root of a title's romfs or the root of an archive file. | ||
=== Version Table === | |||
{| class="wikitable" | |||
|+ | |||
!Version | |||
!Applications | |||
!Differences From Previous | |||
|- | |||
|0x304 | |||
|''Ring Fit Adventure'' | |||
| | |||
|- | |||
|0x3fb | |||
|''Labo Toy-Con 04, Game Builder Garage'' | |||
| | |||
|- | |||
|0x407 | |||
|''Animal Crossing: New Horizons'' | |||
| | |||
|- | |||
|0x40f | |||
|''Nintendo Switch Sports'' | |||
| | |||
|- | |||
|0x410 | |||
|''Splatoon 3'' | |||
| | |||
|- | |||
|0x417 | |||
|''The Legend of Zelda: Tears of the Kingdom, Mario Vs Donkey Kong'' | |||
| | |||
|- | |||
|0x418 | |||
|''Super Mario Bros. Wonder'' | |||
| | |||
|- | |||
|0x41A | |||
|''Nintendo Switch Online: Playtest Program'' | |||
| | |||
|- | |||
|0x41B | |||
|''Nintendo Switch Online: Playtest Program'' | |||
|>Now uses exb version 3 (u32 support) | |||
>Added u32 type to blackboard | |||
|} | |||
== File Structure == | == File Structure == | ||
ASB | ASB assumes little endian. Hashes can be assumed to be 32-bit Murmur3 unless otherwise specified. | ||
Documentation is still sparse, refer to [https://github.com/dt-12345/asb this repository] for more details (names may not match exactly). | Documentation is still sparse, refer to [https://github.com/dt-12345/asb this repository] for more details (names may not match exactly). | ||
| Line 32: | Line 76: | ||
# Material Blend Settings | # Material Blend Settings | ||
# Enum Resolve Table | # Enum Resolve Table | ||
# String Pool | |||
==== Version 0x41b ==== | |||
# File Header (0x80) | |||
# Command Array | |||
# Element Array | |||
# Element Param Region | |||
# Attachment Index Array | |||
# Attachment Array | |||
# State Array | |||
# Transition Array | |||
# Transition Data Region | |||
# Blackboard | |||
# Partial Skeleton Array | |||
# Partial | |||
# Bone Blend Array | |||
# Transition Partial Skeleton Id Array | |||
# Float Property Ex Array | |||
# Tag Array | |||
# Exb | |||
# External Action Array | |||
# Material Blend Array | |||
# Enum Relocation Array | |||
# String Pool | # String Pool | ||
| Line 227: | Line 295: | ||
|0x4 | |0x4 | ||
|AsbString | |AsbString | ||
|Name | |Name | ||
|- | |- | ||
|0xc | |0xc | ||
| Line 262: | Line 330: | ||
|0x4 | |0x4 | ||
|u32 | |u32 | ||
| | |Partial Count | ||
|- | |- | ||
|0x28 | |0x28 | ||
|0x4 | |0x4 | ||
|AsbPtr< | |AsbPtr<Partial[ParitalCount]> | ||
| | |Partial Array | ||
|- | |- | ||
|0x2c | |0x2c | ||
|0x4 | |0x4 | ||
| | |u32 | ||
| | |Attachment Count | ||
|- | |- | ||
|0x30 | |0x30 | ||
|0x4 | |||
|AsbPtr<Attachment> | |||
|Attachment Array | |||
|- | |||
|0x34 | |||
|0x4 | |||
|AsbPtr<u32[Attachment Count]> | |||
|Attachment Index Array - Array of indices to parts | |||
|- | |||
|0x38 | |||
|0x4 | |0x4 | ||
|AsbPtr<Blackboard> | |AsbPtr<Blackboard> | ||
|Blackboard | |Blackboard | ||
|- | |- | ||
| | |0x3c | ||
|0x4 | |0x4 | ||
|AsbPtr<char> | |AsbPtr<char> | ||
|String Pool | |String Pool | ||
|- | |- | ||
| | |0x40 | ||
|0x4 | |||
|AsbPtr<AsbArray<Enum Relocation>> | |||
|Enum Relocation Array | |||
|- | |||
|0x44 | |||
|0x4 | |||
|AsbPtr<AsbArray<State>> | |||
|State Array | |||
|- | |||
|0x48 | |||
|0x4 | |0x4 | ||
|u32 | |u32 | ||
|Float Property Ex Count | |Float Property Ex Count | ||
|- | |- | ||
| | |0x4c | ||
|0x4 | |0x4 | ||
|AsbPtr<Float Property Ex[Float Property Ex Count]> | |AsbPtr<Float Property Ex[Float Property Ex Count]> | ||
|Float Property Ex Array | |Float Property Ex Array | ||
|- | |- | ||
| | |0x50 | ||
|0x4 | |0x4 | ||
|u32 | |u32 | ||
|Bone Blend Count | |Bone Blend Count | ||
|- | |- | ||
| | |0x54 | ||
|0x4 | |0x4 | ||
|AsbPtr<Bone Blend[Bone Blend Count]> | |AsbPtr<Bone Blend[Bone Blend Count]> | ||
|Bone Blend Array | |Bone Blend Array | ||
|- | |- | ||
| | |0x58 | ||
|0x4 | |0x4 | ||
|u32 | |u32 | ||
|Partial Skeleton Count | |Partial Skeleton Count | ||
|- | |- | ||
| | |0x5c | ||
|0x4 | |0x4 | ||
|AsbPtr<Partial Skeleton[Partial Skeleton Count]> | |AsbPtr<Partial Skeleton[Partial Skeleton Count]> | ||
|Partial Skeleton Array | |Partial Skeleton Array | ||
|- | |- | ||
| | |0x60 | ||
|0x4 | |0x4 | ||
|u32 | |u32 | ||
|String Pool Size | |String Pool Size | ||
|- | |- | ||
| | |0x64 | ||
|0x4 | |0x4 | ||
|AsbPtr<Transition Array> | |AsbPtr<Transition Array> | ||
|Transition Array | |Transition Array | ||
|- | |- | ||
| | |0x68 | ||
|0x4 | |0x4 | ||
|AsbPtr<AsbArray<u32>> | |AsbPtr<AsbArray<u32>> | ||
|Transition Partial Skeleton Array | |Transition Partial Skeleton Array | ||
|- | |- | ||
| | |0x6c | ||
|0x4 | |0x4 | ||
|AsbPtr<AsbArray<AsbString>> | |AsbPtr<AsbArray<AsbString>> | ||
|Tag Array | |Tag Array | ||
|- | |- | ||
| | |0x70 | ||
|0x4 | |0x4 | ||
|AsbPtr<AsbArray<External Action>> | |AsbPtr<AsbArray<External Action>> | ||
|External Action Array | |External Action Array | ||
|- | |- | ||
| | |0x74 | ||
|0x4 | |0x4 | ||
|AsbPtr<Exb> | |AsbPtr<Exb> | ||
|Exb | |Exb | ||
|- | |- | ||
| | |0x78 | ||
|0x4 | |0x4 | ||
|u32 | |u32 | ||
|Transition Group Array | |Transition Group Array | ||
|- | |- | ||
| | |0x7c | ||
|0x4 | |0x4 | ||
|AsbPtr<AsbArray<Material Blend>> | |AsbPtr<AsbArray<Material Blend>> | ||
| Line 378: | Line 466: | ||
=== Command === | === Command === | ||
Defines a command that can be | Defines a command that can be evaluated by an as::Controller to set and play model animations. A command references the start of a behavior tree of elements to be evaluated at runtime. A simple update mode exists to continue playback of animation without always evaluating the command. A bypass mode also exists to play model animations directly from an as::Controller without a defined command. | ||
{| class="wikitable" | {| class="wikitable" | ||
|+Command (0x417) | |+Command (0x417) | ||
| Line 541: | Line 629: | ||
|0x04 | |0x04 | ||
|u32 | |u32 | ||
|Tag Entry Offset | |Tag Entry Offset (version 0x417+) | ||
|- | |- | ||
|0x08 | |0x08 | ||
| Line 596: | Line 684: | ||
|0x1 | |0x1 | ||
|u8 | |u8 | ||
| | |Attachment Count | ||
|- | |- | ||
|0x3 | |0x3 | ||
| Line 626: | Line 714: | ||
|0x2 | |0x2 | ||
|u16 | |u16 | ||
|Base | |Base Attachment Index Id | ||
|- | |- | ||
|0x12 | |0x12 | ||
| Line 1,695: | Line 1,783: | ||
|0x8 | |0x8 | ||
|Property<float> | |Property<float> | ||
| | |Selector Weight 0 | ||
|- | |- | ||
|0x8 | |0x8 | ||
|0x8 | |0x8 | ||
|Property<float> | |Property<float> | ||
| | |Selector Weight 1 | ||
|- | |- | ||
|0x10 | |0x10 | ||
| Line 1,716: | Line 1,804: | ||
|ElementPlugs | |ElementPlugs | ||
|Plugs | |Plugs | ||
|} | |||
=== Partial === | |||
{| class="wikitable" | |||
|+ | |||
!Offset | |||
!Size | |||
!Type | |||
!Description | |||
|- | |||
|0x0 | |||
|0x4 | |||
|AsbString | |||
|Name | |||
|- | |||
|0x4 | |||
|0x4 | |||
|u32 | |||
|Partial Skeleton Id | |||
|- | |||
|0x8 | |||
|0x4 | |||
|AsbString | |||
| | |||
|- | |||
|0xc | |||
|0x4 | |||
|u32 | |||
| | |||
|} | |||
=== Attachment === | |||
{| class="wikitable" | |||
|+ | |||
!Offset | |||
!Size | |||
!Type | |||
!Description | |||
|- | |||
|0x0 | |||
|0x2 | |||
|u16 | |||
|Attachment Type | |||
|- | |||
|0x2 | |||
|0x2 | |||
|u16 | |||
| | |||
|- | |||
|0x4 | |||
|0x4 | |||
|AsbPtr<> | |||
|Type specific data | |||
|- | |||
|0x8 | |||
|0x10 | |||
|Guid | |||
|Guid | |||
|} | |||
=== Blackboard === | |||
{| class="wikitable" | |||
|+ | |||
!Offset | |||
!Size | |||
!Type | |||
!Description | |||
|- | |||
|0x0 | |||
|0x8 | |||
|Blackboard Type Offset | |||
|String | |||
|- | |||
|0x8 | |||
|0x8 | |||
|Blackboard Type Offset | |||
|Int | |||
|- | |||
|0x10 | |||
|0x8 | |||
|Blackboard Type Offset | |||
|UInt | |||
|- | |||
|0x18 | |||
|0x8 | |||
|Blackboard Type Offset | |||
|Float | |||
|- | |||
|0x20 | |||
|0x8 | |||
|Blackboard Type Offset | |||
|Bool | |||
|- | |||
|0x28 | |||
|0x8 | |||
|Blackboard Type Offset | |||
|Vector3f | |||
|- | |||
|0x30 | |||
|0x8 | |||
|Blackboard Type Offset | |||
|Pointer | |||
|- | |||
|0x38 | |||
|0x4 * N | |||
|Blackboard Entry | |||
|Entry Array | |||
|- | |||
| | |||
| | |||
| | |||
|Default Value Region | |||
|} | |||
==== Blackboard Type Offset ==== | |||
{| class="wikitable" | |||
|+ | |||
!Offset | |||
!Size | |||
!Type | |||
!Description | |||
|- | |||
|0x0 | |||
|0x2 | |||
|u16 | |||
|Count | |||
|- | |||
|0x2 | |||
|0x2 | |||
|u16 | |||
|Entry Base Index | |||
|- | |||
|0x4 | |||
|0x2 | |||
|u16 | |||
|Default Value Base Offset | |||
|- | |||
|0x6 | |||
|0x2 | |||
|u16 | |||
| | |||
|} | |||
==== Blackboard Entry ==== | |||
{| class="wikitable" | |||
|+ | |||
!Offset | |||
!Size | |||
!Type | |||
!Description | |||
|- | |||
|0x0 | |||
|0x4 | |||
|AsbString : 24 | |||
|Name | |||
|- | |||
| | |||
| | |||
|u32 : 7 | |||
|Extra Info Index | |||
|- | |||
| | |||
| | |||
|u32 : 1 | |||
|Is Extra Info | |||
|} | |||
=== Enum Relocation === | |||
This feature appears to be for applications that want to be able to change enum class definitions without updating all the relevant asb files. Applications can choose to bake the enum values, in which this section is omitted, but the class name and enum value name will still be emitted to the string pool, unreferenced. | |||
{| class="wikitable" | |||
|+ | |||
!Offset | |||
!Size | |||
!Type | |||
!Description | |||
|- | |||
|0x0 | |||
|0x4 | |||
|AsbPtr<s32> | |||
|Value to replace | |||
|- | |||
|0x4 | |||
|0x4 | |||
|AsbString | |||
|Enum Class Name | |||
|- | |||
|0x8 | |||
|0x4 | |||
|AsbString | |||
|Enum Value Name | |||
|} | |||
=== State === | |||
=== Float Property Ex === | |||
{| class="wikitable" | |||
|+ | |||
!Offset | |||
!Size | |||
!Type | |||
!Description | |||
|- | |||
|0x0 | |||
|0x8 | |||
|Property<float> | |||
|Value | |||
|- | |||
|0x8 | |||
|0x4 | |||
|u32 | |||
|Curve Type | |||
|- | |||
|0xc | |||
|0xc | |||
|float[3] | |||
|Curve Data | |||
|- | |||
|0x18 | |||
|0x4 | |||
|float | |||
|Min | |||
|- | |||
|0x1c | |||
|0x4 | |||
|float | |||
|Max | |||
|} | |||
=== Bone Blend === | |||
=== Partial Skeleton === | |||
{| class="wikitable" | |||
|+ | |||
!Offset | |||
!Size | |||
!Type | |||
!Description | |||
|- | |||
|0x0 | |||
|0x4 | |||
|AsbPtr<Partial Bone[Partial Bone Count]> | |||
|Partial Bone Array | |||
|- | |||
|0x4 | |||
|0x4 | |||
|AsbString | |||
|Partial Skeleton Name | |||
|- | |||
|0x8 | |||
|0x4 | |||
|u32 | |||
|Partial Bone Count | |||
|} | |||
==== Partial Bone ==== | |||
{| class="wikitable" | |||
|+ | |||
!Offset | |||
!Size | |||
!Type | |||
!Description | |||
|- | |||
|0x0 | |||
|0x4 | |||
|AsbString | |||
|Bone Name | |||
|- | |||
|0x4 | |||
|0x2 | |||
|s16 | |||
|Bind Flags | |||
|- | |||
|0x6 | |||
|0x1 | |||
|u8 | |||
|Is Recursive (recursively adds all child bones) | |||
|- | |||
|0x7 | |||
|0x1 | |||
|u8 | |||
| | |||
|} | |||
=== Transition === | |||
=== External Action === | |||
Used to call "external actions". In ModuleSystem titles this appears to typically correspond to an xlink command. | |||
{| class="wikitable" | |||
|+ | |||
!Offset | |||
!Size | |||
!Type | |||
!Description | |||
|- | |||
|0x0 | |||
|0x4 | |||
|AsbString | |||
|Type? | |||
|- | |||
|0x4 | |||
|0x4 | |||
|AsbString | |||
|Slot? | |||
|- | |||
|0x8 | |||
|0x4 | |||
|AsbString | |||
|Action | |||
|} | |||
=== Material Blend === | |||
Blend weight for material animations. | |||
{| class="wikitable" | |||
|+ | |||
!Offset | |||
!Size | |||
!Type | |||
!Description | |||
|- | |||
|0x0 | |||
|0x4 | |||
|AsbString | |||
|Name | |||
|- | |||
|0x4 | |||
|0x4 | |||
|float | |||
|Weight | |||
|} | |} | ||
[[Category:File formats]] | [[Category:File formats]] | ||