CHAR (Metroid Prime 3): Difference between revisions
→Format
imported>Antidote |
>Aruki (→Format) |
||
(10 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
''This article is for the CHAR format from Metroid Prime 3: Corruption. See [[CHAR (File Format)]] for the other revisions of this format.'' | |||
The '''CHAR format''' defines an animation character; together with [[SAND (File Format)|SAND]], it serves as the successor to the [[ANCS (File Format)|ANCS format]] from Prime 1 and 2, and contains much of the same data. The main difference from ANCS is that the file no longer contains multiple characters; instead, every character gets its own CHAR file, and any animation data shared with other characters is stored in SAND. | |||
__TOC__ | __TOC__ | ||
== Format == | == Format == | ||
{| class="wikitable" | {| class="wikitable" | ||
! Type | ! Type | ||
! | ! Count | ||
! Name | |||
! Notes | |||
|- | |- | ||
| | | u8 | ||
| | | 1 | ||
| '''Version''' | |||
| Always 0x5. | |||
|- | |- | ||
| | | u8 | ||
| | | 1 | ||
| '''Character ID''' | |||
| | | This is an ID unique to each character sharing the same [[SAND (File Format)|SAND file]]. | ||
| | |||
|- | |- | ||
| string | | string | ||
| 1 | | 1 | ||
| '''Character | | '''Character Name''' | ||
| Name of the character. Likely included for debugging purposes. | |||
|- | |- | ||
| [[CMDL ( | | Asset ID ([[CMDL (Metroid Prime)|CMDL]]) | ||
| 1 | | 1 | ||
| '''Character | | '''Character Model''' | ||
| ID of the model used by this character. | |||
|- | |- | ||
| [[CSKR (File Format)|CSKR]] | | Asset ID ([[CSKR (File Format)|CSKR]]) | ||
| 1 | | 1 | ||
| '''Character | | '''Character Skin''' | ||
| ID of the skin used by this character. | |||
|- | |- | ||
| | | u32 | ||
| 1 | | 1 | ||
| Overlay | | '''Overlay Count''' | ||
| Number of overlay models. | |||
|- | |- | ||
| [[#Overlay| | | [[#Overlay Model|Overlay Model]] | ||
| | | ''Overlay Count'' | ||
| | | '''Overlay Array''' | ||
| Array defining overlay models that this character can use. | |||
|- | |- | ||
| [[CINF (File Format)|CINF]] | | Asset ID ([[CINF (File Format)|CINF]]) | ||
| 1 | | 1 | ||
| '''Character | | '''Character Skeleton''' | ||
| ID of the skeleton used by this character. | |||
|- | |- | ||
| [[SAND (File Format)|SAND]] | | Asset ID ([[SAND (File Format)|SAND]]) | ||
| 1 | | 1 | ||
| '''Character | | '''Character Animation Data''' | ||
| ID of the animation data used by this character. | |||
|- | |- | ||
| [[ | | [[PAS Database]] | ||
| 1 | | 1 | ||
| | | '''PAS Database''' | ||
| Not much known about how this data is used. | |||
|- | |- | ||
| [[# | | [[#Particle Resource Data|Particle Resource Data]] | ||
| 1 | | 1 | ||
| | | '''Particle Resource Data''' | ||
| List of particle assets being used by this character. This primarily contains particles used by animation events. | |||
|- | |- | ||
| | | u32 | ||
| | | 1 | ||
| '''Anim Event Set Count''' | |||
| Count of anim event sets used by this character. There'll be one set per animation that uses events (unless the animation has its events in the [[SAND (File Format)|SAND file]]). | |||
|- | |- | ||
| [[#Anim Event Set|Anim Event Set]] | |||
| [[ | | ''Anim Event Set Count'' | ||
| | | '''Anim Event Set Array''' | ||
| Array of animation event sets. | |||
| | |||
| | |||
|- | |- | ||
| u32 | | u32 | ||
| 1 | | 1 | ||
| | | '''Animation Count''' | ||
| Count of animations used by this character. | |||
|- | |- | ||
| | | [[#Animation|Animation]] | ||
| | | ''Animation Count'' | ||
| | | '''Animations Array''' | ||
| Array of animations used by this character. | |||
|- | |- | ||
| u32 | | u32 | ||
| 1 | | 1 | ||
| [[ | | '''Animation Bounds Count''' | ||
| Count of animation bounding boxes in the next array. | |||
|- | |||
| [[#Animation Bounding Box|Animation Bounding Box]] | |||
| ''Animation Bounds Count'' | |||
| '''Animation Bounding Box Array''' | |||
| Array of bounding boxes for animations used by this character. | |||
|- | |- | ||
| | | bool | ||
| | | 1 | ||
| | | {{unknown}} | ||
| | |||
|- | |- | ||
| u32 | | u32 | ||
| 1 | | 1 | ||
| {{unknown| | | {{unknown|Unknown Array Count}} | ||
| Size of the following array. | |||
|- | |- | ||
| | | bool | ||
| | | ''Unknown Array Count'' | ||
| {{unknown| | | {{unknown|Unknown Bool Array}} | ||
| Unknown array of bools. | |||
|- | |- | ||
| u32 | | u32 | ||
| 1 | | 1 | ||
| | | '''Collision Primitive Set Count''' | ||
| Number of animation collision primitive sets. | |||
|- | |- | ||
| | | [[#Collision Primitive Set|Collision Primitive Set]] | ||
| | | ''Collision Primitive Set Count'' | ||
| | | '''Collision Primitive Sets''' | ||
| Array of collision primitives used by this character. | |||
|- | |- | ||
| u32 | | u32 | ||
| 1 | | 1 | ||
| [[ | | '''Sound Resource Count''' | ||
| Number of sound resources used by this character. | |||
|- | |||
| Asset ID ([[CAUD (File Format)|CAUD]]) | |||
| ''Sound Resource Count'' | |||
| '''Sound Resource List''' | |||
| List of sound resources used by this character. | |||
|} | |||
=== Overlay Model === | |||
{| class="wikitable" | |||
! Type | |||
! Name | |||
! Notes | |||
|- | |- | ||
| | | {{FourCC}} | ||
| | | '''Overlay Type''' | ||
| | | Possible values: | ||
* <code>FRZN</code>: Overlay used when the character is frozen (eg. by Ice Missiles) | |||
* <code>HYPR</code>: Overlay used when the character is in hypermode | |||
* <code>ACID</code>: Overlay used when the character is in acid rain | |||
* <code>XRAY</code>: Overlay used something related to the X-Ray Visor | |||
|- | |- | ||
| | | Asset ID ([[CMDL (Metroid Prime)|CMDL]]) | ||
| | | '''Overlay Model''' | ||
| Model used by the overlay. | |||
|- | |- | ||
| | | Asset ID ([[CSKR (File Format)|CSKR]]) | ||
| | | '''Overlay Skin''' | ||
| | | Skin that rigs the ''Overlay Model'' to the character's skeleton. | ||
|} | |} | ||
=== | === Particle Resource Data === | ||
{|class="wikitable" | {| class="wikitable" | ||
! Type | ! Type | ||
! Count | ! Count | ||
! | ! Name | ||
! Notes | |||
|- | |||
| u32 | |||
| 1 | |||
| '''Generic Particle Count''' | |||
| Count of generic particle systems. | |||
|- | |||
| Asset ID ([[PART (File Format)|PART]]) | |||
| ''Generic Particle Count'' | |||
| '''Generic Particle List''' | |||
| List of generic particle systems used by this character. | |||
|- | |- | ||
| u32 | | u32 | ||
| 1 | | 1 | ||
| [[ | | '''Swoosh Particle Count''' | ||
| Count of swoosh particle systems. | |||
|- | |||
| Asset ID ([[SWHC (File Format)|SWHC]]) | |||
| ''Swoosh Particle Count'' | |||
| '''Swoosh Particle List''' | |||
| List of swoosh particle systems used by this character. | |||
|- | |||
| u32 | |||
| 1 | |||
| '''Electric Particle Count''' | |||
| Count of electric particle systems. | |||
|- | |- | ||
| [[ | | Asset ID ([[ELSC_(File_Format)|ELSC]]) | ||
| | | ''Electric Particle Count'' | ||
| | | '''Electric Particle List''' | ||
| List of electric particle systems used by this character. | |||
|- | |- | ||
| u32 | | u32 | ||
| 1 | | 1 | ||
| | | '''Spawn Particle Count''' | ||
| Count of spawn particle systems. | |||
|- | |- | ||
| [[ | | Asset ID ([[SPSC (File Format)|SPSC]]) | ||
| | | ''Spawn Particle Count'' | ||
| | | '''Spawn Particle List''' | ||
| List of spawn particle systems used by this character. | |||
|- | |||
| u32 | |||
| 1 | |||
| {{unknown}} | |||
| Always 0. | |||
|- | |||
| u32 | |||
| 1 | |||
| {{unknown}} | |||
| Always 0. | |||
|} | |} | ||
=== | === Anim Event Set === | ||
{|class="wikitable" | {| class="wikitable" | ||
! Type | ! Type | ||
! Count | ! Count | ||
! | ! Name | ||
! Notes | |||
|- | |- | ||
| u32 | | u32 | ||
| 1 | | 1 | ||
| | | {{unknown}} | ||
| Likely animation ID that this set corresponds to | |||
|- | |||
| string | |||
| 1 | |||
| '''Set Name''' | |||
| Name of this event set. | |||
|- | |- | ||
| u32 | | u32 | ||
| 1 | | 1 | ||
| | | '''Effect Event Count''' | ||
| Number of effect events in this set. | |||
|- | |- | ||
| [[# | | [[#Effect Event|Effect Event]] | ||
| | | ''Effect Event Count'' | ||
| | | '''Effect Events''' | ||
| Effect events contained in this set. | |||
|- | |- | ||
| u32 | | u32 | ||
| 1 | | 1 | ||
| | | '''Sound Event Count''' | ||
| Number of sound events in this set. | |||
|- | |- | ||
| [[# | | [[#Sound Event|Sound Event]] | ||
| | | ''Sound Event Count'' | ||
| Sound | | '''Sound Events''' | ||
| Sound events contained in this set. | |||
|} | |} | ||
==== | ==== Effect Event ==== | ||
{| class="wikitable" | {| class="wikitable" | ||
! Type | ! Type | ||
! | ! Name | ||
! Notes | |||
|- | |- | ||
| | | string | ||
| | | '''Event Name''' | ||
| Same as the event name in the event data. | |||
|- | |- | ||
| | | [[Animation Events (File Format)#Effect Event|Effect Event]] | ||
| Type | | '''Effect Event Data''' | ||
| Actual event data. | |||
|} | |||
==== Sound Event ==== | |||
{| class="wikitable" | |||
! Type | |||
! Name | |||
! Notes | |||
|- | |- | ||
| | | string | ||
| | | '''Event Name''' | ||
| Same as the event name in the event data. | |||
|- | |- | ||
| | | [[Animation Events (File Format)#Sound Event|Sound Event]] | ||
| | | '''Sound Event Data''' | ||
| | | Actual event data. | ||
| | |||
|} | |} | ||
=== | |||
=== Animation === | |||
{| class="wikitable" | {| class="wikitable" | ||
! Type | ! Type | ||
! | ! Name | ||
! Notes | ! Notes | ||
|- | |- | ||
| [[ | | string | ||
| | | '''Name''' | ||
| | | Animation name. | ||
| | |- | ||
| [[Meta-Animation]] | |||
| '''Animation''' | |||
| Meta-animation data. | |||
|} | |||
=== Animation Bounding Box === | |||
{| class="wikitable" | |||
! Type | |||
! Name | |||
! Notes | |||
|- | |- | ||
| | | Asset ID ([[ANIM (File Format)|ANIM]]) | ||
| '''Animation Asset ID''' | |||
| Asset ID of the animation that this bounding box corresponds to. | |||
| | |||
|- | |- | ||
| {{AABox}} | |||
| '''Animation Bounding Box''' | |||
| {{ | | Bounding box of the animation when applied to this character. | ||
| | |} | ||
=== Collision Primitive Set === | |||
{| class="wikitable" | |||
! Type | |||
! Count | |||
! Name | |||
! Notes | |||
|- | |- | ||
| | | string | ||
| 1 | | 1 | ||
| '''Set Name''' | |||
| | | Name of this primitive set. | ||
|- | |- | ||
| u32 | | u32 | ||
| 1 | | 1 | ||
| '''Primitive Count''' | |||
| | | Number of primitives contained in this set. | ||
|- | |- | ||
| | | [[#Collision Primitive|Collision Primitive]] | ||
| | | ''Primitive Count'' | ||
| '''Primitive Array''' | |||
| | | Array of collision primitives contained in this set. | ||
|} | |} | ||
==== | ==== Collision Primitive ==== | ||
{| class="wikitable" | {| class="wikitable" | ||
! Offset | |||
! Type | ! Type | ||
! | ! Name | ||
! Notes | |||
|- | |- | ||
| | | 0x0 | ||
| {{unknown | | u32 | ||
| {{unknown}} | |||
| | |||
|- | |- | ||
| | | 0x4 | ||
| | | u32 | ||
| {{unknown}} | |||
| | |||
| {{unknown | |||
| | |||
|- | |- | ||
| 0x8 | |||
| u32 | | u32 | ||
| {{unknown | | {{unknown}} | ||
| | |||
|- | |- | ||
| 0xC | |||
| u32 | | u32 | ||
| {{unknown | | {{unknown}} | ||
| | |||
|- | |- | ||
| 0x10 | |||
| u32 | | u32 | ||
| {{unknown | | {{unknown}} | ||
| | |||
|- | |- | ||
| | | 0x14 | ||
| {{unknown | | float | ||
| {{unknown}} | |||
| | |||
|- | |- | ||
| | | 0x18 | ||
| {{unknown | | float | ||
| {{unknown}} | |||
| | |||
|- | |- | ||
| 0x1C | |||
| float | | float | ||
| {{unknown | | {{unknown}} | ||
| | |||
|- | |- | ||
| | | 0x20 | ||
| {{unknown | | float | ||
| {{unknown}} | |||
| | |||
|- | |- | ||
| | | 0x24 | ||
| {{unknown | | float | ||
| {{unknown}} | |||
| | |||
|- | |- | ||
| | | 0x28 | ||
| {{unknown | | float | ||
| {{unknown}} | |||
| | |||
|- | |- | ||
| | | 0x2C | ||
| {{unknown | | float | ||
| {{unknown}} | |||
| | |||
|- | |- | ||
| | | 0x30 | ||
| {{unknown | | float | ||
| {{unknown}} | |||
| | |||
|- | |- | ||
| | | 0x34 | ||
| | | string | ||
| '''Primitive Name''' | |||
| Name of the collision primitive. | |||
|- | |- | ||
| | | {{none}} | ||
| {{unknown | | float | ||
| {{unknown}} | |||
| | |||
|} | |} | ||
[[Category:Metroid Prime 3 Prototype]] | |||
[[Category:Metroid Prime 3: Corruption]] | [[Category:Metroid Prime 3: Corruption]] | ||
[[Category:File Formats]] | [[Category:File Formats]] |