ANCS (File Format): Difference between revisions

woooooooah we're halfway theeeere
>Aruki
No edit summary
>Aruki
(woooooooah we're halfway theeeere)
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.


__TOC__
__TOC__


== Root Structure ==
== Format ==
 
{| 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}}
| u32
| {{check}}
| 1
| {{check}}
| Animation AABB count
| {{check}}
| Only present when info_type_count > 1
| {{check}}
|-
|-
| [[#AnimationAABB|AnimationAABB]]
| [[#Animation AABB|Animation AABB]]
| animation_aabb_count
| ''Animation AABB Count''
| Animation bounds
| '''Animation AABB Array'''
| Only present when info_type_count > 1
| Array of animation bounding boxes for this character.
| {{nocheck}}
| {{check}}
| {{check}}
| {{check}}
| {{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
|-
|-
| CAABox
| u32
| Animation bounds
| '''Animation ID'''
| Confirm this is character-relative?
|-
| {{AABox}}
| '''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
| Parented Mode
| '''Parented Mode'''
| Needs documentation
|-
|-
| u32
| u32
| Flags
| '''Flags'''
| Needs documentation
|}
|}
===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.


==AnimationSet==
==AnimationSet==
Anonymous user