CHAR (Metroid Prime 3)

Revision as of 18:02, 3 March 2017 by >Aruki (Aruki moved page CHAR (File Format) to CHAR (Metroid Prime 3))

The CHAR format defines animated characters; it's the successor to the ANCS format from Prime 1 and 2, and the format is extremely similar.


This file format needs a lot of research
This format hasn't been researched/documented very well yet, but it appears to be extremely similar to ANCS.


Format

Header

Type Description
char Unknown
char Unknown
Character Info Specific settings and resources used by this character
Animation Set Events, Animations, and Hitbox related settings

CharacterInfo

Type Count Description
string 1 Character name
CMDL 1 Character model
CSKR 1 Character skin
u64 1 Overlay count
Overlays overlay_count Overlays used for various status effects, such as Frozen, Hazard, or Hyper
CINF 1 Character skeleton
SAND 1 Character sand
PASDatabase 1 Parameterized Animation Set Database
Particle Resource Data 1 Various Particle Systems used by this character.

Overlay

Overlays are external models that are skinned and attached to the rig for certain status effects, the layout simply consists of a FourCC value, a CMDL reference, and a CSKR reference.

Type Description
FourCC The type of status effect this overlay is for, FRZN, HYPR, or HZRD are known values, there may be more
u64 CMDL id
u64 CSKR id

ParticleResData

Particle Resource data is simply a list of particle systems that can be used with this character.

Type Count Description
u32 1 PART count
u64 part_count PART ids
u32 1 SWHC count
u64 swhc_count SWHC ids
u32 1 UNKNOWN count
u64 unk_count UNKNOWN ids
u32 1 ELSC count
u64 elsc_count ELSC ids
u32 1 SPSC count
u64 spsc_count SPSC ids
u32 1 UNKNOWN count
u64 unk_count UNKNOWN ids

AnimationSet

The Animation Set saw the largest change from Metroid Prime 1/2, gone are Transitions, Half Transitions and AdditiveInfo, EVNT was overhauled, AABBs were moved from CharacterInfo, and Hitboxes were added.

Type Count Description
u32 1 EVNT count
EVNT evnt_count Events available for use by various animations, how events are linked to animations is currently unknown
u32 1 Animation count
Animation animation_count Animations used by this character
u32 1 Animation AABB count
AnimationAABB animation_aabb_count Animation bounds
u8 1 UNKNOWN
u32 1 Additive Animation count
bool additive_animation_count A true/false value map for additive animations, true if an animation is additive, false otherwise.
u32 1 HitboxSet count
HitboxSet hitbox_set_count Hitbox Sets for animations
u32 1 ANIM count
u64 anim_count ANIM ids

EVNT

Not much is currently known about the actual structure of the new EVNT format, so much of the structure is a complete guess.

Type Count Description
u32 1 Index of this particular event, how it's currently used is unknown
u32 1 ParticlePOINode count
ParticlePOINode particle_poi_node_count Particle effects events that can be triggered during the course of the animation
u32 1 SoundPOINode count
SoundPOINode sound_poi_node_count Sound effect events that can be triggered during the course of the animation
ParticlePOINode
Type Description
POI Header Basic information about this particular event
FourCC Type, PART is the most common, not aware of any others being used
u64 Particle ID, file type corresponds to the previous value.
float Scale of the particle system.
u32 Parent Mode
SoundPOINode
Type Count Description Notes
POI Header 1 Basic information about this particular event
u64 1 CAUD id
u32 1 UNKNOWN
u32 1 UNKNOWN
u32 1 UNKNOWN Dictates the presence of the following values, if 1, the following float exists, otherwise 35 unknown bytes.
float 1 UNKNOWN Only present if the previous value is 1
u8 35 UNKNOWN Only present if the value above does not exist
POI Header
Type Description
string UNKNOWN
u16 UNKNOWN
string UNKNOWN
u16 UNKNOWN
u32 UNKNOWN
u32 UNKNOWN
u32 UNKNOWN
u32 UNKNOWN
u8 UNKNOWN
float UNKNOWN
u32 UNKNOWN
u32 UNKNOWN
u32 UNKNOWN
u32 UNKNOWN
u32 UNKNOWN
u32 UNKNOWN
u32 UNKNOWN

AnimationAABB

Type Description
u64 ANIM
float2x3 Axis Aligned Bounding Box

HitboxSet

Type Count Description
string 1 Name
u32 1 Hitbox count
Hitbox hitbox_count Hitboxes for bones used in an animation
Hitbox
Type Description
u32 UNKNOWN
u32 UNKNOWN
u32 UNKNOWN
u32 UNKNOWN
u32 UNKNOWN
float UNKNOWN
float UNKNOWN
float UNKNOWN
float UNKNOWN
float UNKNOWN
float UNKNOWN
float UNKNOWN
float UNKNOWN
string Bone name
float UNKNOWN