ANCS (File Format): Difference between revisions
Jump to navigation
Jump to search
no edit summary
imported>Antidote No edit summary |
imported>Antidote No edit summary |
||
Line 1: | Line 1: | ||
The '''ANCS format''' defines characters for animation in Metroid Prime 1 and 2. Starting in Metroid Prime 3, it was replaced by the [[CHAR (Metroid Prime 3)|CHAR]] format. The extension stands for '''AN'''imation '''C'''haracter '''S'''et. | The '''ANCS format''' defines characters for animation in Metroid Prime 1 and 2. Starting in Metroid Prime 3, it was replaced by the [[CHAR (Metroid Prime 3)|CHAR]] format. The extension stands for '''AN'''imation '''C'''haracter '''S'''et. | ||
{{research|3|Most of the file structure is known, but we still don't know what any of it actually is! Also, the table at the end of the file is unknown.}} | {{research|3|Most of the file structure is known, but we still don't know what any of it actually is! Also, the table at the end of the file is unknown.}} | ||
__TOC__ | __TOC__ | ||
== | == Root Structure == | ||
{| class="wikitable" | |||
! Data Type | |||
! Description | |||
! Notes | |||
|- | |||
| u16 | |||
| Version | |||
| Always 1 | |||
|- | |||
| [[#CharacterSet|CharacterSet]] | |||
| Character Set | |||
| Contains multiple [[#CharacterInfo|CharacterInfo]] Entries | |||
|- | |||
| [[#AnimationSet|AnimationSet]] | |||
| Animation Set | |||
| Describes Meta Animations, Meta Transitions, Half Transitions, and Resource association | |||
|- | |||
|} | |||
== CharacterSet == | |||
{| class="wikitable" | {| class="wikitable" | ||
! | ! Data Type | ||
! | ! Element Count | ||
! Description | ! Description | ||
! Notes | |||
|- | |- | ||
| | | u16 | ||
| | | 1 | ||
| | | Version | ||
| Always 1 | |||
|- | |- | ||
| | | u32 | ||
| | | 1 | ||
| | | [[#CharacterInfo|CharacterInfo]] count | ||
| Number of characters in this set. | |||
|- | |- | ||
| | | [[#CharacterInfo|CharacterInfo]] | ||
| character_info_count | |||
| | | Characters | ||
| | | | ||
| | |||
| | |||
|} | |} | ||
== | === CharacterInfo === | ||
{| class="wikitable" | {| class="wikitable" | ||
! Type | ! Data Type | ||
! Count | ! Element Count | ||
! Description | ! Description | ||
! Notes | |||
|- | |- | ||
| u32 | | u32 | ||
| 1 | | 1 | ||
| | | id | ||
| Used by the engine to as a unique identifier within the Character Set. | |||
|- | |- | ||
| u16 | | u16 | ||
| 1 | | 1 | ||
| | | Info Type Count | ||
| Informs the engine which info types are present within the CharacterSet | |||
|- | |- | ||
| string | | string | ||
| 1 | | 1 | ||
| | | Character Name | ||
| Human readable name, useful for editors, the engine does not use this internally. | |||
|- | |||
| [[CMDL_(Metroid_Prime)|CMDL]] | |||
| 1 | |||
| Character Model | |||
| | |||
|- | |||
| [[CSKR_(File_Format)|CSKR]] | |||
| 1 | |||
| Character Skin | |||
| | |||
|- | |||
| [[CINF_(File_Format)|CINF]] | |||
| 1 | |||
| Character Rig | |||
| | |||
|- | |||
| u32 | |||
| 1 | |||
| Animation Count | |||
| Animations in AnimationSet that specifically relate to this character, some characters make heavy use of this abstraction, Space Pirates being the biggest culprit. | |||
|- | |||
| [[#AnimationName|AnimationName]] | |||
| animation_count | |||
| Animation Names | |||
| Animations linked to this character by name and index. | |||
|- | |||
| [[PASDatabase|PASDatabase]] | |||
| 1 | |||
| Parameterized Animation State Data | |||
| Not much is known about how this data is used. | |||
|- | |- | ||
| [[ | | [[#ParticleResData|ParticleResData]] | ||
| 1 | | 1 | ||
| | | Particle systems used by this character | ||
| | |||
|- | |- | ||
| | | u32 | ||
| 1 | |||
| colspan=2 {{unknown|'''Unknown'''}} | |||
|- | |||
| u32 | |||
| 1 | | 1 | ||
| ''' | | {{unknown|'''Unknown'''}} | ||
| Not present when info_type_count <= 9 | |||
|- | |- | ||
| | | u32 | ||
| 1 | | 1 | ||
| ''' | | {{unknown|'''Unknown'''}} | ||
| Not present when info_type_count <= 9 | |||
|- | |- | ||
| u32 | | u32 | ||
| 1 | | 1 | ||
| | | Animation AABB count | ||
| | | Only present when info_type_count > 1 | ||
|- | |||
| [[#AnimationAABB|AnimationAABB]] | |||
| animation_aabb_count | |||
| Animation bounds | |||
| Only present when info_type_count > 1 | |||
|- | |||
| u32 | |||
| 1 | |||
| Effect Count | |||
| Only present when info_type_count > 1 | |||
|- | |||
| [[#Effect|Effect]] | |||
| effect_count | |||
| Effects used by this character, including which bones they're attached to | |||
| Only present when info_type_count > 1 | |||
|- | |||
| [[CMDL_(Metroid_Prime)|CMDL]] | |||
| 1 | |||
| Overlay Model for status effects, such as ice when frozen | |||
| Only present when info_type_count > 3 | |||
|- | |||
| [[CSKR_(File_Format)|CSKR]] | |||
| 1 | |||
| Overlay Skin for status effects, such as ice when frozen | |||
| Only present when info_type_count > 3 | |||
|- | |||
| u32 | |||
| 1 | |||
| Animation Index Count | |||
| The total number of animations used by this, only present when info_type_count > 4 | |||
|- | |||
| u32 | |||
| animation_index_count | |||
| Indices of each animation used by this character | |||
| Only present when info_type_count > 4 | |||
|- | |- | ||
| u32 | | u32 | ||
| 1 | | 1 | ||
| ''' | | {{unknown|'''Unknown'''}} | ||
| Only present when info_type_count > 9 | |||
|- | |- | ||
| u8 | | u8 | ||
| 1 | | 1 | ||
| {{unknown|'''Unknown''' | | {{unknown|'''Unknown'''}} | ||
| Only present when info_type_count > 9 | |||
|- | |- | ||
| | | u32 | ||
| 1 | | 1 | ||
| | | Animation AABB Indexed Count | ||
| Only present when info_type_count > 9 | |||
|- | |||
| [[#AnimationAABB_Indexed|AnimationAABB]] | |||
| animation_aabb_indexed_count | |||
| Animation bounds, referenced by index | |||
| Only present when info_type_count > 9 | |||
|} | |} | ||
=== | ====AnimationName==== | ||
{| class="wikitable" | {| class="wikitable" | ||
! | ! Data Type | ||
! | ! Element Count | ||
! Description | ! Description | ||
! Notes | |||
|- | |- | ||
| | | u32 | ||
| | | 1 | ||
| ' | | Index | ||
| The index into AnimationSet's MetaAnimation table. | |||
|- | |- | ||
| | | string | ||
| | | 1 | ||
| ''' | | {{unknown|'''Unknown'''}} | ||
| Not present when info_type_count >= 10 | |||
|- | |- | ||
| | | string | ||
| | | 1 | ||
| ' | | Animation Name | ||
| The name of the index ref'd Animation | |||
|} | |} | ||
==== | ===ParticleResData=== | ||
{| class="wikitable" | {| class="wikitable" | ||
! Type | ! Data Type | ||
! Count | ! Element Count | ||
! Description | ! Description | ||
! Notes | |||
|- | |- | ||
| u32 | | u32 | ||
| 1 | | 1 | ||
| | | [[PART_(File_Format)|PART]] count | ||
| How many particle systems are used by this character | |||
|- | |||
| [[PART_(File_Format)|PART]] | |||
| part_count | |||
| The particle systems used by this character | |||
|- | |- | ||
| u32 | | u32 | ||
| 1 | | 1 | ||
| | | [[SWHC_(File_Format)|SWHC]] count | ||
| How many swooshes are used by this character | |||
|- | |- | ||
| u32 | | [[SWHC_(File_Format)|SWHC]] | ||
| swhc_count | |||
| The swooshes used by this character | |||
|- | |||
| u32 | |||
| 1 | | 1 | ||
| ''' | | {{unknown|'''Unknown Count'''}} | ||
| How many unknown systems are used by this character | |||
|- | |||
| UniqueID32 | |||
| unknown_count | |||
| The unknown systems used by this character | |||
|- | |- | ||
| [[ | | u32 | ||
| | | 1 | ||
| [[ELSC_(File_Format)|ELSC]] count | |||
| How many electric systems are used by this character | |||
|- | |- | ||
| [[ | | [[ELSC_(File_Format)|ELSC]] | ||
| | | else_count | ||
| | | The electric systems used by this character | ||
|} | |} | ||
=== | ===AnimationAABB=== | ||
{| class="wikitable" | |||
! Data Type | |||
! Description | |||
|- | |||
| string | |||
| Name | |||
|- | |||
| CAABox | |||
| Animation bounds | |||
|} | |||
===Effect=== | |||
{| class="wikitable" | {| class="wikitable" | ||
! Type | ! Data Type | ||
! Count | ! Element Count | ||
! Description | ! Description | ||
|- | |- | ||
| | | string | ||
| 1 | | 1 | ||
| | | Name | ||
|- | |- | ||
| u32 | | u32 | ||
| 1 | | 1 | ||
| | | Component Count | ||
|- | |- | ||
| | | [[#EffectComponent|EffectComponent]] | ||
| | | component_count | ||
| | | Effect Components | ||
|} | |} | ||
====EffectComponent==== | |||
{| class="wikitable" | {| class="wikitable" | ||
! | ! Data Type | ||
! | ! Description | ||
|- | |||
| string | |||
| Name | |||
|- | |||
| FourCC | |||
| Type | |||
|- | |- | ||
| | | UniqueID32 | ||
| | | Resource as defined by Type | ||
|- | |- | ||
| | | string | ||
| | | Bone to attach the effect to | ||
|- | |- | ||
| float | | float | ||
| {{unknown|'''Unknown'''}} | |||
|- | |- | ||
| | | u32 | ||
| | | {{unknown|'''Unknown'''}} | ||
| | |||
|- | |- | ||
| | | u32 | ||
| | | {{unknown|'''Unknown'''}} | ||
| | |||
|} | |} | ||
=== | ===AnimationAABB Indexed=== | ||
The only difference between this and the previous [[#AnimationAABB|AnimationAABB]] is the fact that animations are referenced by index, rather than by name. | |||
The | |||
==AnimationSet== | |||
{| class="wikitable" | {| class="wikitable" | ||
! Type | ! Data Type | ||
! Count | ! Element Count | ||
! Description | ! Description | ||
! Notes | ! Notes | ||
|- | |||
| u16 | |||
| 1 | |||
| Info Count | |||
| Enumeration of the presence of certain sections | |||
|- | |- | ||
| u32 | | u32 | ||
| 1 | | 1 | ||
| | | Animation Count | ||
| | | How many animations there are in the set | ||
|- | |- | ||
| [[ | | [[#Animation|Animation]] | ||
| | | animation_count | ||
| | | Animations that can be referenced by characters | ||
| | | | ||
|- | |- | ||
| u32 | | u32 | ||
| 1 | | 1 | ||
| | | Transition Count | ||
| How many transitions there are in the set | |||
|- | |||
| [[#Transition|Transition]] | |||
| transition_count | |||
| Transitions that can be referenced by characters | |||
| | | | ||
|- | |- | ||
| [[ | | [[#MetaTransition|MetaTransition]] | ||
| | | 1 | ||
| | | Default Transition | ||
| | | | ||
|- | |- | ||
| u32 | | u32 | ||
| 1 | | 1 | ||
| Additive Animation Count | |||
| How many additive animations there are | |||
|- | |||
| [[#AdditiveAnimation|AdditiveAnimation]] | |||
| additive_animation_count | |||
| Additive animations that can be referenced in some fashion | |||
| Reference method is currently unknown, presumably PASDatabase. | |||
|- | |||
| float | |||
| 1 | |||
| Time A | |||
| {{unknown|'''Unknown'''}} | |||
|- | |||
| float | |||
| 1 | |||
| Time B | |||
| {{unknown|'''Unknown'''}} | | {{unknown|'''Unknown'''}} | ||
|- | |- | ||
| u32 | | u32 | ||
| 1 | | 1 | ||
| | | Half Transition Count | ||
| | | How many half transitions there in the set, Only present if info_count > 2 | ||
|- | |- | ||
| [[ | | [[#HalfTransition|HalfTransition]] | ||
| | | half_transition_Count | ||
| | | Half Transitions | ||
| | | Only present if info_count > 2 | ||
|- | |- | ||
| u32 | | u32 | ||
| 1 | | 1 | ||
| | | Animation Resource Count | ||
| | | Only present if info_count > 3, and not present at all in MP2 | ||
|- | |||
| [[#AnimationResource|AnimationResource]] | |||
| animation_resource_count | |||
| Animation Resources | |||
| Only present if info_count > 3, and not present at all in MP2 | |||
|- | |- | ||
| u32 | | u32 | ||
| 1 | | 1 | ||
| | | Event Count | ||
| Only in | | Only present in MP2 | ||
|- | |- | ||
| | | [[EVNT_(File_Format)|EVNT]] | ||
| | | event_count | ||
| | | Animation Events | ||
| Only in | | Only present in MP2 | ||
|} | |} | ||
=== | ===Animation=== | ||
{| class="wikitable" | {| class="wikitable" | ||
! Type | ! Data Type | ||
! Description | ! Description | ||
|- | |- | ||
| string | | string | ||
| | | Name | ||
|- | |- | ||
| | | [[#MetaAnimation|MetaAnimation]] | ||
| | | Animation configuration | ||
| | |||
|} | |} | ||
=== | ===MetaAnimation=== | ||
MetaAnimations can be one of five types, and may contain children. | |||
{| class="wikitable" | |||
! Data Type | |||
! Description | |||
|- | |||
| [[#EMetaAnimationType|EMetaAnimationType]] | |||
| The Animation type | |||
|- | |||
| [[#Primitive|Primitive]], [[#Blend|Blend]], [[#Blend|PhaseBlend]], [[#Random|Random]] or [[#Sequence|Sequence]] | |||
| The animation description, including name, animation ID, and index used to connect character animations references to actual animations. | |||
|} | |||
====EMetaAnimationType==== | |||
{| class="wikitable" | |||
! Name | |||
! Value | |||
|- | |||
| Primitive | |||
| 0 | |||
|- | |||
| Blend | |||
| 1 | |||
|- | |||
| PhaseBlend | |||
| 2 | |||
|- | |||
| Random | |||
| 3 | |||
|- | |||
| Sequence | |||
| 4 | |||
|} | |||
====Primitive==== | |||
{| class="wikitable" | {| class="wikitable" | ||
! Type | ! Data Type | ||
! Description | ! Description | ||
! Notes | ! Notes | ||
|- | |||
| [[ANIM_(File_Format)|ANIM]] | |||
| Animation ID | |||
| The asset ID for this particular animation | |||
|- | |||
| u32 | |||
| Index | |||
| The ID used by characters to reference this animation | |||
|- | |- | ||
| string | | string | ||
| | | Name | ||
| ''' | | The animations name | ||
|- | |||
| float | |||
| colspan=2 {{unknown|'''Unknown'''}} | |||
|- | |- | ||
| u32 | | u32 | ||
| | | colspan=2 {{unknown|'''Unknown'''}} | ||
|} | |||
| | |||
====Blend==== | |||
Blend's structure is shared between Blend and PhaseBlend, with the only currently known difference being the animation type value. | |||
{| class="wikitable" | |||
! Data Type | |||
! Description | |||
! Notes | |||
|- | |- | ||
| | | [[#MetaAnimation|MetaAnimation]] | ||
| | | Animation A | ||
| | | The animation to, presumably, blend from | ||
| | |||
|- | |- | ||
| | | [[#MetaAnimation|MetaAnimation]] | ||
| | | Animation B | ||
| | | The animation to, presumably, blend to | ||
| | |||
|- | |- | ||
| | | float | ||
| | | colspan=2 {{unknown|'''Unknown'''}} | ||
| ''' | |||
|- | |- | ||
| | | bool | ||
| | | colspan=2 {{unknown|'''Unknown'''}} | ||
| ''' | |} | ||
| | |||
====Random==== | |||
Random may contain one or more children in an Animation -> Probability pair following this structure: | |||
{| class="wikitable" | |||
! Data Type | |||
! Element Count | |||
! Description | |||
! Notes | |||
|- | |- | ||
| u32 | | u32 | ||
| 1 | | 1 | ||
| | | Animation Count | ||
| | | The number of child animations | ||
|- | |||
| [[#AnimProbabilityPair|AnimProbabilityPair]] | |||
| animation_count | |||
| The animations to select from | |||
| The exact manner these are used is currently unknown | |||
|} | |||
=====AnimProbabilityPair===== | |||
{| class="wikitable" | |||
! Data Type | |||
! Description | |||
! Notes | |||
|- | |- | ||
| | | [[#MetaAnimation|MetaAnimation]] | ||
| | | The animation use if the probability factor is met | ||
| | |||
| | | | ||
|- | |- | ||
| u32 | | u32 | ||
| | | Probability | ||
| | | How probability is used is not currently known | ||
| | |} | ||
====Sequence==== | |||
Sequence is a fairly easy to understand type, it simply plays a list of animations in succession as each animation finishes | |||
{| class="wikitable" | |||
! Data Type | |||
! Element Count | |||
! Description | |||
|- | |- | ||
| u32 | | u32 | ||
| 1 | | 1 | ||
| | | Animation Count | ||
| | |- | ||
| [[#MetaAnimation|MetaAnimation]] | |||
| animation_count | |||
| The animations to play in a sequence | |||
|} | |} | ||
=== | ===Transition=== | ||
{| class="wikitable" | |||
! Data Type | |||
! Description | |||
! Notes | |||
|- | |||
| u32 | |||
| Animation Index A | |||
| The animation to transition from | |||
|- | |||
| u32 | |||
| Animation Index B | |||
| The animation to transition to | |||
|- | |||
| [[#MetaTransition|MetaTransition]] | |||
| Transition configuration | |||
| Describes how the transition is performed | |||
|} | |||
The | ===MetaTransition=== | ||
Meta Transitions can be one of four types, and may contain animations. | |||
{| class="wikitable" | |||
! Data Type | |||
! Description | |||
|- | |||
| [[#ETransitionType|EMetaTransitionType]] | |||
| The type of transition | |||
|- | |||
| [[#TransAnimation|TransAnimation]], [[#TransTransition|TransTransition]], [[#TransTransition|TransPhaseTransition]], TransNoTransition | |||
| The transition configuration | |||
|} | |||
====EMetaTransitionType==== | |||
{| class="wikitable" | |||
! Name | |||
! Value | |||
|- | |||
| TransAnimation | |||
| 0 | |||
|- | |||
| TransTransition | |||
| 1 | |||
|- | |||
| TransPhaseTransition | |||
| 2 | |||
|- | |||
| TransNoTransition | |||
| 3 | |||
|} | |||
====TransAnimation==== | |||
{| class="wikitable" | {| class="wikitable" | ||
! Type | ! Data Type | ||
! Description | ! Description | ||
|- | |- | ||
| [[ | | [[#MetaAnimation|MetaAnimation]] | ||
| | | The animation to use while transitioning | ||
| { | |} | ||
====TransTransition==== | |||
{| class="wikitable" | |||
! Data Type | |||
! Description | |||
|- | |- | ||
| | | float | ||
| Time | |||
| | |||
|- | |- | ||
| u32 | | u32 | ||
| | | {{unknown|'''Unknown'''}} | ||
| | |- | ||
| | | bool | ||
| {{unknown|'''Unknown'''}} | |||
|- | |||
| bool | |||
| {{unknown|'''Unknown'''}} | |||
|- | |- | ||
| u32 | | u32 | ||
| | | {{unknown|'''Unknown'''}} | ||
| | |} | ||
===AdditiveAnimation=== | |||
Additive animations simply reference an existing animation within the above animation table, and has two unknown floats. | |||
{| class="wikitable" | |||
! Data Type | |||
! Description | |||
|- | |- | ||
| u32 | | u32 | ||
| | | Animation Index | ||
|- | |||
| float | |||
| {{unknown|'''Unknown'''}} | | {{unknown|'''Unknown'''}} | ||
|- | |- | ||
| | | float | ||
| {{unknown|'''Unknown'''}} | |||
| {{unknown|'''Unknown | |||
|} | |} | ||
=== | ===Half Transition=== | ||
A half transition is very similar to a regular transition, but has less configuration information, any other differences are currently unknown | |||
{| class="wikitable" | |||
! Data Type | |||
! Description | |||
|- | |||
| u32 | |||
| Animation Index | |||
|- | |||
| [[#MetaTransition|MetaTransition]] | |||
| Transition configuration. | |||
|} | |||
===AnimationResource=== | |||
{| class="wikitable" | {| class="wikitable" | ||
! Type | ! Data Type | ||
! Description | ! Description | ||
|- | |- | ||
| | | UniqueID32 | ||
| | | Animation Asset ID | ||
|- | |- | ||
| | | UniqueID32 | ||
| | | Event Asset ID | ||
|} | |} | ||