namreeb / namigator

An intelligent navigation API for World of Warcraft Alpha, Vanilla, TBC and WotLK
MIT License
49 stars 32 forks source link

Correct MPQ load order #22

Closed namreeb closed 3 years ago

namreeb commented 3 years ago

Some files exist in multiple MPQs. To get the right data, we have to get the load order correct. This issue will serve as a placeholder for all specific issues that getting this wrong can cause.

Examples:

namreeb commented 3 years ago

TBC load order:

MPQ: "Data\\base.MPQ" Priority: 0x64, called by ClientServices::LoadCDKey()
MPQ: "Data\\patch.MPQ" Priority: 0x40
MPQ: "Data\\enUS\\patch-enUS.MPQ" Priority: 0x41
MPQ: "Data\\enUS\\patch-enUS-2.MPQ" Priority: 0x42
MPQ: "Data\\patch-2.MPQ" Priority: 0x43
MPQ: "Data\\alternate.MPQ" Priority: 0x44
MPQ: "..\\Data\\alternate.MPQ" Priority: 0x44
MPQ: "Data\\expansion.MPQ" Priority: 0x33
MPQ: "Data\\common.MPQ" Priority: 0x32
MPQ: "Data\\enUS\\locale-enUS.MPQ" Priority: 0x31
MPQ: "Data\\enUS\\speech-enUS.MPQ" Priority: 0x30
MPQ: "Data\\enUS\\expansion-locale-enUS.MPQ" Priority: 0x2F
MPQ: "Data\\enUS\\expansion-speech-enUS.MPQ" Priority: 0x2E
namreeb commented 3 years ago

WotLK load order:

MPQ: "Data\\base.MPQ" Priority: 0x64, called by ClientServices::LoadCDKey()
MPQ: "Data\\enUS\\patch-enUS.MPQ" Priority: 0x40
MPQ: "Data\\patch.MPQ" Priority: 0x41
MPQ: "Data\\enUS\\patch-enUS-2.MPQ" Priority: 0x42
MPQ: "Data\\enUS\\patch-enUS-3.MPQ" Priority: 0x43
MPQ: "Data\\patch-2.MPQ" Priority: 0x44
MPQ: "Data\\patch-3.MPQ" Priority: 0x45
MPQ: "Data\\alternate.MPQ" Priority: 0x46
MPQ: "..\\Data\\alternate.MPQ" Priority: 0x46
MPQ: "Data\\expansion.MPQ" Priority: 0x31
MPQ: "Data\\lichking.MPQ" Priority: 0x30
MPQ: "Data\\common.MPQ" Priority: 0x2F
MPQ: "Data\\common-2.MPQ" Priority: 0x2E
MPQ: "Data\\enUS\\locale-enUS.MPQ" Priority: 0x2D
MPQ: "Data\\enUS\\speech-enUS.MPQ" Priority: 0x2C
MPQ: "Data\\enUS\\expansion-locale-enUS.MPQ" Priority: 0x2B
MPQ: "Data\\enUS\\lichking-locale-enUS.MPQ" Priority: 0x2A
MPQ: "Data\\enUS\\expansion-speech-enUS.MPQ" Priority: 0x29
MPQ: "Data\\enUS\\lichking-speech-enUS.MPQ" Priority: 0x28
namreeb commented 3 years ago

Vanilla load order:

MPQ: "Data\\base.MPQ" Priority: 0x64
MPQ: "Data\\patch.MPQ" Priority: 0x40
MPQ: "Data\\patch-2.MPQ" Priority: 0x41
MPQ: "Data\\speech2.MPQ" Priority: 0x42
MPQ: "..\\Data\\speech2.MPQ" Priority: 0x42
MPQ: "Data\\model.MPQ" Priority: 0x3F
MPQ: "Data\\texture.MPQ" Priority: 0x3E
MPQ: "Data\\terrain.MPQ" Priority: 0x3D
MPQ: "Data\\wmo.MPQ" Priority: 0x3C
MPQ: "Data\\sound.MPQ" Priority: 0x3B
MPQ: "Data\\misc.MPQ" Priority: 0x3A
MPQ: "Data\\interface.MPQ" Priority: 0x39
MPQ: "Data\\fonts.MPQ" Priority: 0x38
MPQ: "Data\\speech.MPQ" Priority: 0x37
MPQ: "Data\\dbc.MPQ" Priority: 0x36
namreeb commented 3 years ago

In order of priority (greater number means greater priority, use first):

Vanilla:

MPQ: "Data\\base.MPQ" Priority: 0x64
MPQ: "Data\\speech2.MPQ" Priority: 0x42
MPQ: "..\\Data\\speech2.MPQ" Priority: 0x42
MPQ: "Data\\patch-2.MPQ" Priority: 0x41
MPQ: "Data\\patch.MPQ" Priority: 0x40
MPQ: "Data\\model.MPQ" Priority: 0x3F
MPQ: "Data\\texture.MPQ" Priority: 0x3E
MPQ: "Data\\terrain.MPQ" Priority: 0x3D
MPQ: "Data\\wmo.MPQ" Priority: 0x3C
MPQ: "Data\\sound.MPQ" Priority: 0x3B
MPQ: "Data\\misc.MPQ" Priority: 0x3A
MPQ: "Data\\interface.MPQ" Priority: 0x39
MPQ: "Data\\fonts.MPQ" Priority: 0x38
MPQ: "Data\\speech.MPQ" Priority: 0x37
MPQ: "Data\\dbc.MPQ" Priority: 0x36

TBC:

MPQ: "Data\\base.MPQ" Priority: 0x64, called by ClientServices::LoadCDKey()
MPQ: "Data\\alternate.MPQ" Priority: 0x44
MPQ: "..\\Data\\alternate.MPQ" Priority: 0x44
MPQ: "Data\\patch-2.MPQ" Priority: 0x43
MPQ: "Data\\enUS\\patch-enUS-2.MPQ" Priority: 0x42
MPQ: "Data\\enUS\\patch-enUS.MPQ" Priority: 0x41
MPQ: "Data\\patch.MPQ" Priority: 0x40
MPQ: "Data\\expansion.MPQ" Priority: 0x33
MPQ: "Data\\common.MPQ" Priority: 0x32
MPQ: "Data\\enUS\\locale-enUS.MPQ" Priority: 0x31
MPQ: "Data\\enUS\\speech-enUS.MPQ" Priority: 0x30
MPQ: "Data\\enUS\\expansion-locale-enUS.MPQ" Priority: 0x2F
MPQ: "Data\\enUS\\expansion-speech-enUS.MPQ" Priority: 0x2E

WotLK:

MPQ: "Data\\base.MPQ" Priority: 0x64, called by ClientServices::LoadCDKey()
MPQ: "Data\\alternate.MPQ" Priority: 0x46
MPQ: "..\\Data\\alternate.MPQ" Priority: 0x46
MPQ: "Data\\patch-3.MPQ" Priority: 0x45
MPQ: "Data\\patch-2.MPQ" Priority: 0x44
MPQ: "Data\\enUS\\patch-enUS-3.MPQ" Priority: 0x43
MPQ: "Data\\enUS\\patch-enUS-2.MPQ" Priority: 0x42
MPQ: "Data\\patch.MPQ" Priority: 0x41
MPQ: "Data\\enUS\\patch-enUS.MPQ" Priority: 0x40
MPQ: "Data\\expansion.MPQ" Priority: 0x31
MPQ: "Data\\lichking.MPQ" Priority: 0x30
MPQ: "Data\\common.MPQ" Priority: 0x2F
MPQ: "Data\\common-2.MPQ" Priority: 0x2E
MPQ: "Data\\enUS\\locale-enUS.MPQ" Priority: 0x2D
MPQ: "Data\\enUS\\speech-enUS.MPQ" Priority: 0x2C
MPQ: "Data\\enUS\\expansion-locale-enUS.MPQ" Priority: 0x2B
MPQ: "Data\\enUS\\lichking-locale-enUS.MPQ" Priority: 0x2A
MPQ: "Data\\enUS\\expansion-speech-enUS.MPQ" Priority: 0x29
MPQ: "Data\\enUS\\lichking-speech-enUS.MPQ" Priority: 0x28
namreeb commented 3 years ago

Combined order by priority:

Data\base.MPQ
Data\alternate.MPQ
..\Data\alternate.MPQ
Data\speech2.MPQ
..\Data\speech2.MPQ
Data\patch-3.MPQ
Data\patch-2.MPQ
Data\enUS\patch-enUS-3.MPQ
Data\enUS\patch-enUS-2.MPQ
Data\patch.MPQ
Data\enUS\patch-enUS.MPQ
Data\expansion.MPQ
Data\lichking.MPQ
Data\common.MPQ
Data\common-2.MPQ
Data\enUS\locale-enUS.MPQ
Data\enUS\speech-enUS.MPQ
Data\enUS\expansion-locale-enUS.MPQ
Data\enUS\lichking-locale-enUS.MPQ
Data\enUS\expansion-speech-enUS.MPQ
Data\enUS\lichking-speech-enUS.MPQ

In TBC there are a couple of reversals of the locale-files. Hopefully this doesn't cause any problems!

namreeb commented 3 years ago

Fixed with https://github.com/namreeb/namigator/commit/868564259274c17bbb1db8fae461ccabd12882a6