In each case there is a recursive seach for files, then a recursive search for VPs (so I'm not listing each one even though it applies to all).
1) PRI-A (files then VPs)
2) PRI-B (files then VPs)
3) PRI-C (files then VPs)
4) SEC-A (files then VPs)
5) SEC-B (files then VPs)
6) SEC-C (files then VPs)
7) Freespace2 (files then VPs)
VPs are found in alphabetical, then directory/alphabetical order, so:
aaa.vp
bbb.vp
data/aaa.vp
data/bbb.vp
Files are found in the following order and file type/extension filter per root (same basic rule applies to directories and files inside of VPs):
/ (mve, avi, mpg)
/data (cfg, log, txt)
/data/maps (pcx, ani, eff, tga, jpg, dds)
/data/text (txt, net)
/data/missions (fs2, fc2, ntl, ssv)
/data/models (pof)
/data/tables (tbl, tbm)
/data/sounds (wav, ogg)
/data/sounds/8b22k (wav, ogg)
/data/sounds/16b11k (wav, ogg)
/data/voice ()
/data/voice/briefing (wav, ogg)
/data/voice/command_briefings (wav, ogg)
/data/voice/debriefing (wav, ogg)
/data/voice/personas (wav, ogg)
/data/voice/special (wav, ogg)
/data/voice/training (wav, ogg)
/data/music (wav, ogg)
/data/movies (mve, msb, avi, mpg)
/data/interface (pcx, ani, tga)
/data/fonts (vf)
/data/effects (ani, eff, pcx, neb, tga, jpg, dds)
/data/hud (ani, pcx, tga)
/data/players ()
/data/players/images (pcx)
/data/cache (clr, tmp, ibx)
/data/players (hcf)
/data/players/single (pl2, cs2, plr, csg, css)
/data/players/multi (plr)
/data/multidata (pcx, fs2)
/data/config (cfg)
/data/players/squads (pcx)
/data/demos (fsd)
/data/cbanims (ani)
/data/intelanims (ani)
/data/scripts (lua, lc)
If a file exists in one of those directories and doesn't end in an entension listed in the filter list for the directory then the file will just be ignored, even if that file would otherwise be supported.
Builds running on Linux and OS X will also search a special $(HOME) directory for all files and VPs first. On Linux this directory is
$(HOME)/.fs2_open and on OS X it's
$(HOME)/Library/FS2_Open.