Big.idx

From FIFA Manager Modding Wiki

big.idx is a file in FIFA Manager which is used to link files with .big archives. In terminology of BrightFuture, this file acts as an index table for files inside .big archives. The file was introduced in TCM 2004.

Structure[edit | edit source]

The file starts with a 32-byte header:

CHAR[4] Signature ("FDIX" (or 'XIDF' as low-endian 32-bit integer))
UINT32  Total file size
UINT32  Version (always 1)
UINT32  Archives count
UINT32  Files count
UINT32  Unknown, increases with each game version (2572896 in FIFA Manager 14, 2529719 in FIFA Manager 13, 2292434 in FIFA Manager 12)
UINT32  Offset to file descriptors
UINT32  Offset to names table

The header is followed with an array of local offsets to archive names.

#FOR Archives count
 UINT32 Local offset to archive name in the file names array (first name in array has offset 0)

Then an array of files descriptors follows.

#FOR Files count
 UINT8  Archive index (previous table)
 UINT24 Local offset to file name in the file names array (used for files with same hash values, -1 for other files; first name in array has offset 0)
 UINT32 File name hash

These file descriptor entries are sorted by file names hashes in ascending order. There can be a situation when few file names have same hash values. For such cases, names of these files are stored in file names array, and offset to the name is stored in file descriptor.

File descriptors array is followed by an array of file names (names of archives and files with same hash values are listed here):

#FOR Number of file names (not defined anywhere)
 ZSTRING Name of file

Default archives list[edit | edit source]

Here's a default archives list from FIFA Manager 14:

art_01.big
art_02.big
art_03.big
art_04.big
art_05.big
data\zdata_00.big
data\zdata_01.big
data\zdata_02.big
data\zdata_03.big
data\zdata_04.big
data\zdata_05.big
data\zdata_06.big
data\zdata_07.big
data\zdata_08.big
data\zdata_09.big
data\zdata_10.big
data\zdata_11.big
data\zdata_12.big
data\zdata_13.big
data\zdata_14.big
data\zdata_15.big
data\zdata_16.big
data\zdata_17.big
data\zdata_18.big
data\zdata_19.big
data\zdata_20.big
data\zdata_21.big
data\zdata_22.big
data\zdata_23.big
data\zdata_24.big
data\zdata_25.big
data\zdata_26.big
data\zdata_27.big
data\zdata_28.big
data\zdata_29.big
data\zdata_30.big
data\zdata_31.big
data\zdata_32.big
data\zdata_33.big
data\zdata_34.big
data\zdata_35.big
data\zdata_36.big
data\zdata_37.big
data\zdata_38.big
data\zdata_39.big
data\zdata_40.big
data\zdata_41.big
data\zdata_42.big
data\zdata_43.big
data\zdata_44.big
data\zdata_45.big
data\zdata_46.big
data\zdata_47.big
data\zdata_48.big
badges.big
data\GenKits.big
data\badgeart.big
data\screens.big
data\Fifa2k4Dat.big
data\stadium\generator\Crowd.big
data\stadium\generator\Stadelems.big
data\stadium\generator\StadMain.big

File name hashes[edit | edit source]

The hashing function for file name hashes is following:

unsigned int BigIdxHash(std::string const &fileName) {
    unsigned int hash = 0;
    for (auto c : fileName) {
        unsigned char t = static_cast<unsigned char>(c);
        if (c >= 'A' && c <= 'Z')
            t += 32;
        else if (c == '\\')
            t = static_cast<unsigned char>('/');
        hash = t + 33 * hash;
    }
    return hash;
}