ANCS (File Format): Difference between revisions

From Retro Modding Wiki
Jump to navigation Jump to search
imported>Antidote
>Aruki
 
(7 intermediate revisions by 2 users not shown)
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 character sets and animation sets in Metroid Prime 1 and 2. Starting in Metroid Prime 3, it was replaced by the [[CHAR (File Format)|CHAR]] and [[SAND (File Format)|SAND]] formats. 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.}}
__TOC__


__TOC__
== Format ==


== Root Structure ==
{| class="wikitable"
{| class="wikitable"
! Data Type
! Type
! Description
! Name
! Notes
! Notes
|-
|-
| u16
| u16
| Version
| '''Version'''
| Always 1
| Always 1.
|-
| [[#CharacterSet|CharacterSet]]
| Character Set
| Contains multiple [[#CharacterInfo|CharacterInfo]] Entries
|-
|-
| [[#AnimationSet|AnimationSet]]
| [[#Character Set|Character Set]]
| Animation Set
| '''Character Set'''
| Describes Meta Animations, Meta Transitions, Half Transitions, and Resource association
| Set of characters that share animation data.
|-
|-
| [[#Animation Set|Animation Set]]
| '''Animation Set'''
| Set of animations used by the characters in the character set.
|}
|}


== CharacterSet ==
=== Character Set ===


{| class="wikitable"
{| class="wikitable"
! Data Type
! Type
! Element Count
! Count
! Description
! Name
! Notes
! Notes
|-
|-
| u16
| u16
| 1
| 1
| Version
| '''Version'''
| Always 1
| Always 1.
|-
|-
| u32
| u32
| 1
| 1
| [[#CharacterInfoPair|CharacterInfoPair]] count
| '''Character Count'''
| Number of characters in this set.
| Count of characters in this set.
|-
|-
| [[#CharacterInfoPair|CharacterInfoPair]]
| [[#Character|Character]]
| character_info_count
| ''Character Count''
| Character Info Pairs
| '''Characters Array'''
|
| Array of characters.
|}
|}


=== CharacterInfoPair ===
==== Character ====
 
{| class="wikitable"
{| class="wikitable"
! Data Type
! Type
! Description
! Count
! Name
! Notes
! V1
! V2
! V4
! V5
! V10
|-
|-
| u32
| u32
| Id
| 1
|-
| '''Character ID'''
| [[#CharacterInfo|CharacterInfo]]
| Typically begins at 0 and increments by 1 on each successive character in the set.
| Character Info
| {{check}}
|}
| {{check}}
 
| {{check}}
=== CharacterInfo ===
| {{check}}
{| class="wikitable"
| {{check}}
! Data Type
! Element Count
! Description
! Notes
|-
|-
| u16
| u16
| 1
| 1
| Info Type Count
| '''Version'''
| Informs the engine which info types are present within the CharacterSet
| This can vary between different files/characters. Usually 5 or 6 in MP1 and 10 in MP2.
| {{check}}
| {{check}}
| {{check}}
| {{check}}
| {{check}}
|-
|-
| string
| string
| 1
| 1
| Character Name
| '''Name'''
| Human readable name, useful for editors, the engine does not use this internally.
| Name of the character. Not used by the game; was likely included for debugging purposes.
| {{check}}
| {{check}}
| {{check}}
| {{check}}
| {{check}}
|-
|-
| [[CMDL_(Metroid_Prime)|CMDL]]
| Asset ID ([[CMDL (Metroid Prime)|CMDL]])
| 1
| 1
| Character Model
| '''Model ID'''
|
| ID of the model used by this character.
| {{check}}
| {{check}}
| {{check}}
| {{check}}
| {{check}}
|-
|-
| [[CSKR_(File_Format)|CSKR]]
| Asset ID ([[CSKR_(File_Format)|CSKR]])
| 1
| 1
| Character Skin
| '''Skin ID'''
|
| ID of the skin used by this character.
| {{check}}
| {{check}}
| {{check}}
| {{check}}
| {{check}}
|-
|-
| [[CINF_(File_Format)|CINF]]
| Asset ID ([[CINF_(File_Format)|CINF]])
| 1
| 1
| Character Rig
| '''Skeleton ID'''
|  
| ID of the skeleton used by this character.
| {{check}}
| {{check}}
| {{check}}
| {{check}}
| {{check}}
|-
|-
| u32
| u32
| 1
| 1
| Animation Count
| '''Animation Name Count'''
| Animations in AnimationSet that specifically relate to this character, some characters make heavy use of this abstraction, Space Pirates being the biggest culprit.
| Count of animation names in the next array.
| {{check}}
| {{check}}
| {{check}}
| {{check}}
| {{check}}
|-
|-
| [[#AnimationName|AnimationName]]
| [[#Animation Name|Animation Name]]
| animation_count
| ''Animation Name Count''
| Animation Names
| '''Animation Name Array'''
| Animations linked to this character by name and index.
| Array of names of animations used by this character.
| {{check}}
| {{check}}
| {{check}}
| {{check}}
| {{check}}
|-
|-
| [[PASDatabase|PASDatabase]]
| [[PAS Database]]
| 1
| 1
| Parameterized Animation State Data
| '''PAS Database'''
| Not much is known about how this data is used.
| Not much is known about how this data is used.
| {{check}}
| {{check}}
| {{check}}
| {{check}}
| {{check}}
|-
|-
| [[#ParticleResData|ParticleResData]]
| [[#Particle Resource Data|Particle Resource Data]]
| 1
| 1
| Particle systems used by this character
| '''Particle Resource Data'''
|
| List of particle assets being used by this character. This includes particles being used by attached effects as well as by [[EVNT (File Format)|animation events]].
| {{check}}
| {{check}}
| {{check}}
| {{check}}
| {{check}}
|-
|-
| u32
| u32
| 1
| 1
| colspan=2 {{unknown|'''Unknown'''}}
| {{unknown}}
|  
| {{check}}
| {{check}}
| {{check}}
| {{check}}
| {{check}}
|-
|-
| u32
| u32
| 1
| 1
| {{unknown|'''Unknown'''}}
| {{unknown}}
| Not present when info_type_count <= 9
|
| {{nocheck}}
| {{nocheck}}
| {{nocheck}}
| {{nocheck}}
| {{check}}
|-
|-
| u32
| u32
| 1
| 1
| {{unknown|'''Unknown'''}}
| '''Animation AABB Count'''
| Not present when info_type_count <= 9
| Count of animation bounding boxes.
| {{nocheck}}
| {{check}}
| {{check}}
| {{check}}
| {{check}}
|-
|-
| u32
| [[#Animation AABB|Animation AABB]]
| 1
| ''Animation AABB Count''
| Animation AABB count
| '''Animation AABB Array'''
| Only present when info_type_count > 1
| Array of animation bounding boxes for this character.
|-
| {{nocheck}}
| [[#AnimationAABB|AnimationAABB]]
| {{check}}
| animation_aabb_count
| {{check}}
| Animation bounds
| {{check}}
| Only present when info_type_count > 1
| {{check}}
|-
|-
| u32
| u32
| 1
| 1
| Effect Count
| '''Effect Count'''
| Only present when info_type_count > 1
| Count of attached effects.
| {{nocheck}}
| {{check}}
| {{check}}
| {{check}}
| {{check}}
|-
|-
| [[#Effect|Effect]]
| [[#Effect|Effect]]
| effect_count
| ''Effect Count''
| Effects used by this character, including which bones they're attached to
| '''Effect Array'''
| Only present when info_type_count > 1
| Effects attached to this character.
| {{nocheck}}
| {{check}}
| {{check}}
| {{check}}
| {{check}}
|-
|-
| [[CMDL_(Metroid_Prime)|CMDL]]
| Asset ID ([[CMDL_(Metroid_Prime)|CMDL]])
| 1
| 1
| Overlay Model for status effects, such as ice when frozen
| '''Frozen Model'''
| Only present when info_type_count > 3
| Overlay model that appears when the character is frozen with the Ice/Dark Beam.
| {{nocheck}}
| {{nocheck}}
| {{check}}
| {{check}}
| {{check}}
|-
|-
| [[CSKR_(File_Format)|CSKR]]
| Asset ID ([[CSKR_(File_Format)|CSKR]])
| 1
| 1
| Overlay Skin for status effects, such as ice when frozen
| '''Frozen Skin'''
| Only present when info_type_count > 3
| Skin for rigging the ''Frozen Model'' to the character's skeleton.
| {{nocheck}}
| {{nocheck}}
| {{check}}
| {{check}}
| {{check}}
|-
|-
| u32
| u32
| 1
| 1
| Animation Index Count
| '''Animation Count'''
| The total number of animations used by this, only present when info_type_count > 4
| Count of animations used by this character.
| {{nocheck}}
| {{nocheck}}
| {{nocheck}}
| {{check}}
| {{check}}
|-
|-
| u32
| u32
| animation_index_count
| ''Animation Count''
| Indices of each animation used by this character
| '''Animation ID Map'''
| Only present when info_type_count > 4
| Array of animation IDs. Indexing this array with the character-relative animation ID returns the animset-relative animation ID.
| {{nocheck}}
| {{nocheck}}
| {{nocheck}}
| {{check}}
| {{check}}
|-
|-
| u32
| Asset ID ([[CSPP (File Format)|CSPP]])
| 1
| 1
| {{unknown|'''Unknown'''}}
| '''Spatial Primitives ID'''
| Only present when info_type_count > 9
| ID of the spatial primitives used by this character.
| {{nocheck}}
| {{nocheck}}
| {{nocheck}}
| {{nocheck}}
| {{check}}
|-
|-
| u8
| u8
| 1
| 1
| {{unknown|'''Unknown'''}}
| {{unknown}}
| Only present when info_type_count > 9
|
| {{nocheck}}
| {{nocheck}}
| {{nocheck}}
| {{nocheck}}
| {{check}}
|-
|-
| u32
| u32
| 1
| 1
| Animation AABB Indexed Count
| '''Indexed Animation AABB Count'''
| Only present when info_type_count > 9
| Count of indexed animation bounding boxes.
| {{nocheck}}
| {{nocheck}}
| {{nocheck}}
| {{nocheck}}
| {{check}}
|-
|-
| [[#AnimationAABB_Indexed|AnimationAABB]]
| [[#Indexed Animation AABB|Indexed Animation AABB]]
| animation_aabb_indexed_count
| ''Indexed Animation AABB Count''
| Animation bounds, referenced by index
| '''Indexed Animation AABB Array'''
| Only present when info_type_count > 9
| Unknown purpose.
| {{nocheck}}
| {{nocheck}}
| {{nocheck}}
| {{nocheck}}
| {{check}}
|}
|}


====AnimationName====
===== Animation Name =====
 
{| class="wikitable"
{| class="wikitable"
! Data Type
! Type
! Element Count
! Name
! Description
! Notes
! Notes
! V1
! V10
|-
|-
| u32
| u32
| 1
| '''Animation ID'''
| Index
| Character-relative animation ID. Must be remapped via the ''Animation ID Map'' to access the corresponding animation in the animset.
| The index into AnimationSet's MetaAnimation table.
| {{check}}
| {{check}}
|-
|-
| string
| string
| 1
| {{unknown|'''Unknown'''}}
| {{unknown|'''Unknown'''}}
| Not present when info_type_count >= 10
| Always empty.
| {{check}}
| {{nocheck}}
|-
|-
| string
| string
| 1
| '''Animation Name'''
| Animation Name
| The name of the animation.
| The name of the index ref'd Animation
| {{check}}
| {{check}}
|}
|}


===ParticleResData===
===== Particle Resource Data =====
 
{| class="wikitable"
{| class="wikitable"
! Data Type
! Type
! Element Count
! Count
! Description
! Name
! Notes
! Notes
! V5
! V6
! V10
|-
|-
| u32  
| u32  
| 1
| 1
| [[PART_(File_Format)|PART]] count
| '''Generic Particle Count'''
| How many particle systems are used by this character
| Count of generic particle systems.
| {{check}}
| {{check}}
| {{check}}
|-
|-
| [[PART_(File_Format)|PART]]
| Asset ID ([[PART (File Format)|PART]])
| part_count
| ''Generic Particle Count''
| The particle systems used by this character
| '''Generic Particle List'''
| List of generic particle systems used by this character.
| {{check}}
| {{check}}
| {{check}}
|-
| u32
| 1
| '''Swoosh Particle Count'''
| Count of swoosh particle systems.
| {{check}}
| {{check}}
| {{check}}
|-
| Asset ID ([[SWHC (File Format)|SWHC]])
| ''Swoosh Particle Count''
| '''Swoosh Particle List'''
| List of swoosh particle systems used by this character.
| {{check}}
| {{check}}
| {{check}}
|-
|-
| u32  
| u32  
| 1
| 1
| [[SWHC_(File_Format)|SWHC]] count
| {{unknown}}
| How many swooshes are used by this character
| Always 0.
|-
| {{nocheck}}
| [[SWHC_(File_Format)|SWHC]]
| {{check}}
| swhc_count
| {{check}}
| The swooshes used by this character
|-
|-
| u32  
| u32  
| 1
| 1
| {{unknown|'''Unknown Count'''}}
| '''Electric Particle Count'''
| How many unknown systems are used by this character
| Count of electric particle systems.
| {{check}}
| {{check}}
| {{check}}
|-
|-
| UniqueID32
| Asset ID ([[ELSC_(File_Format)|ELSC]])
| unknown_count
| ''Electric Particle Count''
| The unknown systems used by this character
| '''Electric Particle List'''
| List of electric particle systems used by this character.
| {{check}}
| {{check}}
| {{check}}
|-
|-
| u32  
| u32
| 1
| 1
| [[ELSC_(File_Format)|ELSC]] count
| '''Spawn Particle Count'''
| How many electric systems are used by this character, only present if info_type_count > 5
| Count of spawn particle systems.
| {{nocheck}}
| {{nocheck}}
| {{check}}
|-
|-
| [[ELSC_(File_Format)|ELSC]]
| Asset ID ([[SPSC (File Format)|SPSC]])
| else_count
| ''Spawn Particle Count''
| The electric systems used by this character
| '''Spawn Particle List'''
| Only present if info_type_count > 5
| List of spawn particle systems used by this character.
| {{nocheck}}
| {{nocheck}}
| {{check}}
|}
|}


===AnimationAABB===
===== Animation AABB =====
 
{| class="wikitable"
{| class="wikitable"
! Data Type
! Type
! Description
! Name
! Notes
|-
|-
| string
| string
| Name
| '''Animation Name'''
|
|-
| {{AABox}}
| '''Animation Bounding Box'''
|
|}
 
===== Indexed Animation AABB =====
 
Similar to [[#Animation AABB|Animation AABB]], but with animations referenced via ID instead of name.
 
{| class="wikitable"
! Type
! Name
! Notes
|-
| u32
| '''Animation ID'''
| Confirm this is character-relative?
|-
|-
| CAABox
| {{AABox}}
| Animation bounds
| '''Animation Bounding Box'''
|
|}
|}


===Effect===
===== Effect =====
 
{| class="wikitable"
{| class="wikitable"
! Data Type
! Type
! Element Count
! Count
! Description
! Name
! Notes
|-
|-
| string
| string
| 1
| 1
| Name
| '''Effect Name'''
| Name of the effect.
|-
|-
| u32
| u32
| 1
| 1
| Component Count
| '''Effect Component Count'''
| Count of effect components
|-
|-
| [[#EffectComponent|EffectComponent]]
| [[#Effect Component|Effect Component]]
| component_count
| ''Effect Component Count''
| Effect Components
| '''Effect Components'''
| Array of effect components used by this effect.
|}
|}


====EffectComponent====
====== Effect Component ======
 
{| class="wikitable"
{| class="wikitable"
! Data Type
! Type
! Description
! Name
! Notes
|-
|-
| string
| string
| Name
| '''Component Name'''
| Name of this effect component.
|-
|-
| FourCC
| {{FourCC}}
| Type
| '''Particle Asset Type'''
| Type of the particle used by this effect.
|-
|-
| UniqueID32
| Asset ID
| Resource as defined by Type
| '''Particle Asset ID'''
| Particle resource used by this effect.
|-
|-
| string
| string
| Bone to attach the effect to
| '''Bone Name'''
| Bone that the component is attached to.
|-
|-
| float
| float
| Scale
| '''Scale'''
| Scale of the component.
|-
|-
| u32
| u32
| {{unknown|'''Unknown'''}}
| '''Parented Mode'''
| Needs documentation
|-
|-
| u32
| u32
| {{unknown|'''Unknown'''}}
| '''Flags'''
| Needs documentation
|}
|}


===AnimationAABB Indexed===
=== Animation Set ===
The only difference between this and the previous [[#AnimationAABB|AnimationAABB]] is the fact that animations are referenced by index, rather than by name.


==AnimationSet==
{| class="wikitable"
{| class="wikitable"
! Data Type
! Type
! Element Count
! Count
! Description
! Name
! Notes
! Notes
! MP1
! MP2
|-
|-
| u16
| u16
| 1
| 1
| Info Count
| '''Version'''
| Enumeration of the presence of certain sections
| Always 4. Note there are format differences between MP1 and MP2 despite them both being version 4.
| {{check}}
| {{check}}
|-
|-
| u32
| u32
| 1
| 1
| Animation Count
| '''Animation Count'''
| How many animations there are in the set
| Count of animations contained by the set.
| {{check}}
| {{check}}
|-
|-
| [[#Animation|Animation]]
| [[#Animation|Animation]]
| animation_count
| ''Animation Count''
| Animations that can be referenced by characters
| '''Animation Array'''
|
| Array of animations.
| {{check}}
| {{check}}
|-
|-
| u32
| u32
| 1
| 1
| Transition Count
| '''Transition Count'''
| How many transitions there are in the set
| Count of transitions contained by the set.
| {{check}}
| {{check}}
|-
|-
| [[#Transition|Transition]]
| [[#Transition|Transition]]
| transition_count
| ''Transition Count''
| Transitions that can be referenced by characters
| '''Transition Array'''
|
| Array of transitions.
| {{check}}
| {{check}}
|-
|-
| [[#MetaTransition|MetaTransition]]
| [[Meta-Transition]]
| 1
| 1
| Default Transition
| '''Default Transition'''
|
|  
| {{check}}
| {{check}}
|-
|-
| u32
| u32
| 1
| 1
| Additive Animation Count
| '''Additive Animation Count'''
| How many additive animations there are
| Count of additive animations contained by the set.
| {{check}}
| {{check}}
|-
|-
| [[#AdditiveAnimationPair|AdditiveAnimationPair]]
| [[#Additive Animation|Additive Animation]]
| additive_animation_count
| ''Additive Animation Count''
| Additive animations that can be referenced in some fashion
| '''Additive Animation Array'''
| Reference method is currently unknown, presumably PASDatabase.
| Array of additive animations. Although any animation can be used as additive, this array allows for customizing the fade in/out time for each animation.
| {{check}}
| {{check}}
|-
| float
| 1
| '''Default Additive Fade-In Time'''
| Fade-in time used for additive animations not listed in the above array.
| {{check}}
| {{check}}
|-
|-
| [[#AdditiveAnimation|AdditiveAnimation]]
| float
| 1
| 1
| Default additive
| '''Default Additive Fade-Out Time'''
|  
| Fade-out time used for additive animations not listed in the above array.
| {{check}}
| {{check}}
|-
|-
| u32
| u32
| 1
| 1
| Half Transition Count
| '''Half Transition Count'''
| How many half transitions there in the set, Only present if info_count > 2
| Count of half transitions contained by the set.
| {{check}}
| {{check}}
|-
|-
| [[#HalfTransition|HalfTransition]]
| [[#Half Transition|Half Transition]]
| half_transition_Count
| ''Half Transition Count''
| Half Transitions
| '''Half Transition Array'''
| Only present if info_count > 2
| Array of half transitions.
| {{check}}
| {{check}}
|-
|-
| u32
| u32
| 1
| 1
| Animation Resource Count
| '''Animation Resource Count'''
| Only present if info_count > 3, and not present at all in MP2
| Count of animation assets used by this set.
| {{check}}
| {{nocheck}}
|-
|-
| [[#AnimationResource|AnimationResource]]
| [[#Animation Resource Pair|Animation Resource Pair]]
| animation_resource_count
| ''Animation Resource Count''
| Animation Resources
| '''Animation Resource List'''
| Only present if info_count > 3, and not present at all in MP2
| List of animation assets used by this set.
| {{check}}
| {{nocheck}}
|-
|-
| u32
| u32
| 1
| 1
| Event Count
| '''Event Set Count'''
| Only present in MP2
| Count of event sets. Matches the animation count.
| {{nocheck}}
| {{check}}
|-
|-
| [[EVNT_(File_Format)|EVNT]]
| [[EVNT_(File_Format)|Event Set]]
| event_count
| ''Event Set Count''
| Animation Events
| '''Event Set Array'''
| Only present in MP2
| Array of animation events. Each event set maps to the animation at the same index. Note this is basically MP1's [[EVNT (File Format)|EVNT]] file format, but embedded in ANCS.
| {{nocheck}}
| {{check}}
|}
|}


===Animation===
==== Animation ====
{| class="wikitable"
! Data Type
! Description
|-
| 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"
{| class="wikitable"
! Type
! Name
! Name
! Value
|-
| Primitive
| 0
|-
| Blend
| 1
|-
| PhaseBlend
| 2
|-
| Random
| 3
|-
| Sequence
| 4
|}
====Primitive====
{| class="wikitable"
! Data Type
! 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
| '''Name'''
| The animations name
| Animation name.
|-
|-
| float
| [[Meta-Animation]]
| colspan=2 {{unknown|'''Unknown'''}}
| '''Animation'''
|-
| Meta-animation data.
| u32
| colspan=2 {{unknown|'''Unknown'''}}
|}
|}


====Blend====
==== Transition ====
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"
{| class="wikitable"
! Data Type
! Type
! Element Count
! Name
! Description
! Notes
! Notes
|-
|-
| u32
| u32
| 1
| {{unknown}}
| 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
| '''Animation ID A'''
| How probability is used is not currently known
| The animation being transitioned from.
|}
 
====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
| '''Animation ID B'''
| Animation Count
| The animation being transitioned to.
|-
|-
| [[#MetaAnimation|MetaAnimation]]
| [[Meta-Transition]]
| animation_count
| '''Transition'''
| The animations to play in a sequence
| Meta-transition data.
|}
|}


===Transition===
==== Additive Animation ====
{| class="wikitable"
! Data Type
! Description
! Notes
|-
| u32
| colspan=2 {{unknown|'''Unknown'''}}
|-
| 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
|}


===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"
{| class="wikitable"
! Type
! Name
! Name
! Value
! Notes
|-
| TransAnimation
| 0
|-
| TransTransition
| 1
|-
| TransPhaseTransition
| 2
|-
| TransNoTransition
| 3
|}
 
====TransAnimation====
{| class="wikitable"
! Data Type
! Description
|-
| [[#MetaAnimation|MetaAnimation]]
| The animation to use while transitioning
|}
 
====TransTransition====
{| class="wikitable"
! Data Type
! Description
|-
| float
| Time
|-
|-
| u32
| u32
| {{unknown|'''Unknown'''}}
| '''Animation ID'''
|-
|  
| bool
| {{unknown|'''Unknown'''}}
|-
| bool
| {{unknown|'''Unknown'''}}
|-
| u32
| {{unknown|'''Unknown'''}}
|}
 
===AdditiveAnimationPair===
{| class="wikitable"
! Data Type
! Description
|-
| u32
| Animation Index
|-
| [[#AdditiveAnimaton|AdditiveAnimation]]
| Additive Animation fade-in, fade-out values
|}
 
===AdditiveAnimation===
Describes how animations are additively blended together.
 
{| class="wikitable"
! Data Type
! Description
|-
|-
| float
| float
| Fade In Duration
| '''Fade-In Time'''
| Fade-in duration.
|-
|-
| float
| float
| Fade Out Duration
| '''Fade-Out Time'''
| Fade-out duration.
|}
|}


===Half Transition===
==== 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"
{| class="wikitable"
! Data Type
! Type
! Description
! Name
! Notes
|-
|-
| u32
| u32
| Animation Index
| '''Animation ID'''
| The animation being transitioned from.
|-
|-
| [[#MetaTransition|MetaTransition]]
| [[Meta-Transition]]
| Transition configuration.
| '''Transition'''
| Meta-transition data.
|}
|}


===AnimationResource===
==== Animation Resource Pair ====
 
{| class="wikitable"
{| class="wikitable"
! Data Type
! Type
! Description
! Name
|-
|-
| [[ANIM_(File_Format)|ANIM]]
| Asset ID ([[ANIM_(File_Format)|ANIM]])
| Animation Asset ID
| '''ANIM ID'''
|-
|-
| [[EVNT_(File_Format)|EVNT]]
| Asset ID ([[EVNT_(File_Format)|EVNT]])
| Event Asset ID
| '''EVNT ID'''
|}
|}


[[Category:File Formats]]
[[Category:File Formats]]
[[Category:Metroid Prime]]
[[Category:Metroid Prime]]
[[Category:Metroid Prime 2: Echoes]]
[[Category:Metroid Prime 2: Echoes]]

Latest revision as of 08:04, 3 March 2017

The ANCS format defines character sets and animation sets in Metroid Prime 1 and 2. Starting in Metroid Prime 3, it was replaced by the CHAR and SAND formats. The extension stands for ANimation Character Set.

Format

Type Name Notes
u16 Version Always 1.
Character Set Character Set Set of characters that share animation data.
Animation Set Animation Set Set of animations used by the characters in the character set.

Character Set

Type Count Name Notes
u16 1 Version Always 1.
u32 1 Character Count Count of characters in this set.
Character Character Count Characters Array Array of characters.

Character

Type Count Name Notes V1 V2 V4 V5 V10
u32 1 Character ID Typically begins at 0 and increments by 1 on each successive character in the set.
u16 1 Version This can vary between different files/characters. Usually 5 or 6 in MP1 and 10 in MP2.
string 1 Name Name of the character. Not used by the game; was likely included for debugging purposes.
Asset ID (CMDL) 1 Model ID ID of the model used by this character.
Asset ID (CSKR) 1 Skin ID ID of the skin used by this character.
Asset ID (CINF) 1 Skeleton ID ID of the skeleton used by this character.
u32 1 Animation Name Count Count of animation names in the next array.
Animation Name Animation Name Count Animation Name Array Array of names of animations used by this character.
PAS Database 1 PAS Database Not much is known about how this data is used.
Particle Resource Data 1 Particle Resource Data List of particle assets being used by this character. This includes particles being used by attached effects as well as by animation events.
u32 1 Unknown
u32 1 Unknown
u32 1 Animation AABB Count Count of animation bounding boxes.
Animation AABB Animation AABB Count Animation AABB Array Array of animation bounding boxes for this character.
u32 1 Effect Count Count of attached effects.
Effect Effect Count Effect Array Effects attached to this character.
Asset ID (CMDL) 1 Frozen Model Overlay model that appears when the character is frozen with the Ice/Dark Beam.
Asset ID (CSKR) 1 Frozen Skin Skin for rigging the Frozen Model to the character's skeleton.
u32 1 Animation Count Count of animations used by this character.
u32 Animation Count Animation ID Map Array of animation IDs. Indexing this array with the character-relative animation ID returns the animset-relative animation ID.
Asset ID (CSPP) 1 Spatial Primitives ID ID of the spatial primitives used by this character.
u8 1 Unknown
u32 1 Indexed Animation AABB Count Count of indexed animation bounding boxes.
Indexed Animation AABB Indexed Animation AABB Count Indexed Animation AABB Array Unknown purpose.
Animation Name
Type Name Notes V1 V10
u32 Animation ID Character-relative animation ID. Must be remapped via the Animation ID Map to access the corresponding animation in the animset.
string Unknown Always empty.
string Animation Name The name of the animation.
Particle Resource Data
Type Count Name Notes V5 V6 V10
u32 1 Generic Particle Count Count of generic particle systems.
Asset ID (PART) Generic Particle Count Generic Particle List List of generic particle systems used by this character.
u32 1 Swoosh Particle Count Count of swoosh particle systems.
Asset ID (SWHC) Swoosh Particle Count Swoosh Particle List List of swoosh particle systems used by this character.
u32 1 Unknown Always 0.
u32 1 Electric Particle Count Count of electric particle systems.
Asset ID (ELSC) Electric Particle Count Electric Particle List List of electric particle systems used by this character.
u32 1 Spawn Particle Count Count of spawn particle systems.
Asset ID (SPSC) Spawn Particle Count Spawn Particle List List of spawn particle systems used by this character.
Animation AABB
Type Name Notes
string Animation Name
AABox Animation Bounding Box
Indexed Animation AABB

Similar to Animation AABB, but with animations referenced via ID instead of name.

Type Name Notes
u32 Animation ID Confirm this is character-relative?
AABox Animation Bounding Box
Effect
Type Count Name Notes
string 1 Effect Name Name of the effect.
u32 1 Effect Component Count Count of effect components
Effect Component Effect Component Count Effect Components Array of effect components used by this effect.
Effect Component
Type Name Notes
string Component Name Name of this effect component.
FourCC Particle Asset Type Type of the particle used by this effect.
Asset ID Particle Asset ID Particle resource used by this effect.
string Bone Name Bone that the component is attached to.
float Scale Scale of the component.
u32 Parented Mode Needs documentation
u32 Flags Needs documentation

Animation Set

Type Count Name Notes MP1 MP2
u16 1 Version Always 4. Note there are format differences between MP1 and MP2 despite them both being version 4.
u32 1 Animation Count Count of animations contained by the set.
Animation Animation Count Animation Array Array of animations.
u32 1 Transition Count Count of transitions contained by the set.
Transition Transition Count Transition Array Array of transitions.
Meta-Transition 1 Default Transition
u32 1 Additive Animation Count Count of additive animations contained by the set.
Additive Animation Additive Animation Count Additive Animation Array Array of additive animations. Although any animation can be used as additive, this array allows for customizing the fade in/out time for each animation.
float 1 Default Additive Fade-In Time Fade-in time used for additive animations not listed in the above array.
float 1 Default Additive Fade-Out Time Fade-out time used for additive animations not listed in the above array.
u32 1 Half Transition Count Count of half transitions contained by the set.
Half Transition Half Transition Count Half Transition Array Array of half transitions.
u32 1 Animation Resource Count Count of animation assets used by this set.
Animation Resource Pair Animation Resource Count Animation Resource List List of animation assets used by this set.
u32 1 Event Set Count Count of event sets. Matches the animation count.
Event Set Event Set Count Event Set Array Array of animation events. Each event set maps to the animation at the same index. Note this is basically MP1's EVNT file format, but embedded in ANCS.

Animation

Type Name Notes
string Name Animation name.
Meta-Animation Animation Meta-animation data.

Transition

Type Name Notes
u32 Unknown
u32 Animation ID A The animation being transitioned from.
u32 Animation ID B The animation being transitioned to.
Meta-Transition Transition Meta-transition data.

Additive Animation

Type Name Notes
u32 Animation ID
float Fade-In Time Fade-in duration.
float Fade-Out Time Fade-out duration.

Half Transition

Type Name Notes
u32 Animation ID The animation being transitioned from.
Meta-Transition Transition Meta-transition data.

Animation Resource Pair

Type Name
Asset ID (ANIM) ANIM ID
Asset ID (EVNT) EVNT ID