This loads all maps and mods in your ~\Documents\My Games\... folder, followed by the core game files that are located in compressed .scd files.

What's important to note about the load order is that if two directories contain the same file, the first one loaded takes precedence. There are ways to get around this using hooks, that I'll explain in the end.

FAF Init

FAF extends the loading mechanism of FA, by using different init-files: one for each featured mod. I'll simply explain the init_faf.lua file, and leave the rest of them to the reader.

init_faf.lua contains a whitelist of files that it allows to be loaded, this whitelist is implemented using the function "mount_dir_with_whitelist", which is just like the helper function from the normal FA init file, except for the whitelist, only allowing the named files to be loaded.

-- these are the local FAF directories. The My Games ones are only there for people with usernames that don't work in the uppder ones.mount_contents(InitFileDir .. '\\..\\user\\My Games\\Gas Powered Games\\Supreme Commander Forged Alliance\\mods', '/mods')mount_contents(InitFileDir .. '\\..\\user\\My Games\\Gas Powered Games\\Supreme Commander Forged Alliance\\maps', '/maps')

-- these are using the newly generated path from the dofile() statement at the beginning of this scriptmount_dir_with_whitelist(fa_path .. '\\gamedata\\', '*.scd', '/')mount_dir(fa_path, '/')

This also loads mods and maps, but then comes the change.

First, all .nxt compressed directories are loaded -- but only those in the whitelist. This currently includes: murderparty, labwars, avanced strategic icons and texturepack. They are loaded in alphabetical order.

After all FAF-files have been loaded, the init file loads the base-game .scd files. Since these are loaded last, files that are in the FAF-directories take precedence and overshadow the base game files.

-- these are the local FAF directories. The My Games ones are only there for people with usernames that don't work in the uppder ones.mount_contents(InitFileDir .. '\\..\\user\\My Games\\Gas Powered Games\\Supreme Commander Forged Alliance\\mods', '/mods')mount_contents(InitFileDir .. '\\..\\user\\My Games\\Gas Powered Games\\Supreme Commander Forged Alliance\\maps', '/maps')

mount_dir(dev_path, '/')

-- these are using the newly generated path from the dofile() statement at the beginning of this scriptmount_dir(fa_path .. '\\gamedata\\*.scd', '/')mount_dir(fa_path, '/')