Skip to content

Index files

alice pellerin edited this page Feb 2, 2024 · 4 revisions

Index files are used to store files with identical data while minimizing redundancy.

Certain types of files are often very similar to each other. For example, the same 3D model may be used multiple times with different textures, animations, or other assets. Instead of storing each complete set of assets in its own file, an index file provides indexes into a separate lookup table. This allows multiple files to re-use the same assets.

In the Fossil Fighters ROM, index files have two parts per index: the index number, and the table file name. The table file name indicates a MAR archive (in the same directory) to be used as a table, and the index number indicates a specific child of that archive.

Specifically, each index contains an index number and an offset to a table file name, which is stored as a null-terminated UTF-8 string later in the file.

Aditional notes

Usually, each index file uses the same table file for all indexes.

An example of MM3 files reusing indexes is in the models for Hunter (model/fieldchar/cha01*). For instance, T-Rex and Maiasaura Hunter's idle animations share the same Index 1 and 2, but differ for Index 3.

Examples

Clone this wiki locally