Lets say you are playing Starcraft 2 melee map. The game loads the map. Melee maps have the following dependencies:

• Liberty (Mod)
• Liberty Multi (Mod)

I think the game engine will load the data from Liberty (Mod) first, then from Liberty Multi (Mod). For data that exists in both dependencies, the engine will use the one from Liberty Multi (Mod). Is this correct?

Liberty Multi (Mod) is updated with each patch of Starcraft 2.
or

• Close to a "How Was Game X Made"-question, which are generally off-topic ( meta.gamedev.stackexchange.com/questions/626/… ). Questions no-one can answer are not useful. – Anko Mar 19 '12 at 8:44
• @Aku disagreed. This isn't asking how the whole game is created - just a portion of it. – Jonathan Dickinson Mar 19 '12 at 9:06
• @Jonathan Hence "close to". I don't mean to close-vote; just to note that great answers may not come up. – Anko Mar 19 '12 at 10:02
• @Aku you should state that - someone did vote to close it and likely because of that comment :). – Jonathan Dickinson Mar 19 '12 at 10:42
• @Jonathan Oh dear, words are powerful indeed! :D I'll be more careful in the future. – Anko Mar 19 '12 at 13:51

You are very close to understanding how the system works. My answer won't necessarily be how Starcraft works - but most moddable games work like this; and Starcraft is either very similar or the same.

Firstly the mod system would have some form of a header file for each mod. This would list any 'base' dependencies: in the instance of "Liberty Multi" it would list "Liberty" as the only base mod. This is basically used to build a chain of names and nothing more, so what you are looking for at the end of the day is:

• My Cool Map (more on this later)
• Liberty Multi
• Liberty

When you need to load an asset you would search the mods top-down. Starcraft would therefore look in Liberty Multi for assets and then Liberty. MPQ (Blizzard's zip-like files) are actually quite good at this as you can very quickly determine if a file is not present. If the file is not present look through any additional base mods. Something like the following pseudo-code:

routine findAsset(string assetName):
let mods = "Joes Mod", "Liberty Multi", "Liberty"
each mod in mods
if modFileExists(mod, assetName):