ANCS (File Format)

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

Header
The ANCS format is split up into multiple nodes. Each node defines a character - a model, a skeleton, and a skin - and then sets a number of animation-related parameters on each one. At the end of the file, after every node, is a listing of ANIM and EVNT files.

There's a very short 8-byte header before the nodes begin.

Nodes
This struct then repeats animation count times:

PAS Database
The next part of the file is the PAS Database, which creates animation states and sets parameters on them. The PAS Database header is structured:

Parm Info
These are the possible types that can be specified by Parm Type:

Anim Info
The Anim Info structure is a little unorthodox. It starts with an unknown 32-bit value, and then is followed by a set of values. There's one value present per Parm Info instance, and the type of each value corresponds to that Parm Info's Parm Type setting.

Particles
Note: if the flag value at the start of the node is 5 instead of 6, one of these values is missing. It's currently not known specifically which one it toggles, so be careful. However if the value is 10 the data is from Metroid Prime 2 and special attention must be paid in order to properly read the information.

Animations
This section begins with a 32-bit count value, then this struct repeats:

Effects
This section is used for effect placement - binding particles to bones, which is used for things like Space Pirate eye fire. It starts with a 32-bit count value, then this struct repeats:

Footer
The end of the node structure contains this data:

Metroid Prime 2 Unknown Struct
Immediately following the the footer is a second count/struct pair that only appears in Metroid Prime 2, it is currently unknown what purpose this serves. The count is a 32bit integer and is directly followed by an array of the following struct: