This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [SOLVED] [QUESTION] MPQ Chain order  (Read 4660 times)

babboide

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 7
    • View Profile
[SOLVED] [QUESTION] MPQ Chain order
« on: July 25, 2013, 01:11:42 am »
How WoW determines the priority for each MPQ archive in the chain? Why Data/patch-x.MPQ has higher precedence than Data/enGB/patch-enGB-x.MPQ? Is there an algorithm or it is hardcoded?

Thanks
fbbdev
« Last Edit: July 26, 2013, 02:44:41 am by Admin »

Steff

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 4551
    • View Profile
Re: [QUESTION] MPQ Chain order
« Reply #1 on: July 25, 2013, 09:52:42 am »
The statement is simple wrong. Data patches get loaded before locals. So the locals ahve heigher prio.
Read the Tutorial part 2. In the File extraction part i have a list how wow load the MPQs.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
Please mark as solved if solved.
Don't ask if you could ask a question... JUST ask the Question.
You can send me also offline messages. I will answer if I get online.
Skype: project.modcraft
Discord: steff#6954

babboide

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 7
    • View Profile
Re: [QUESTION] MPQ Chain order
« Reply #2 on: July 25, 2013, 10:46:28 am »
I used to think so, but I observed a different behavior. I'm using WoW 3.3.5a. I created a patch with modified textures from Data/[locale]/patch-[locale]-3.MPQ and saved it as Data/patch-4.MPQ. WoW loads textures from my patch, and standard output from the client shows that my patch is loaded after locale archives.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: [QUESTION] MPQ Chain order
« Reply #3 on: July 25, 2013, 11:01:17 am »
Standard output is the correct way to check for it. Do not believe anything else but that.

The actual order is defined by a hardcoded array consisting of filename, priority, build/locale dependencies.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

babboide

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 7
    • View Profile
Re: [QUESTION] MPQ Chain order
« Reply #4 on: July 25, 2013, 01:21:10 pm »
Thank you schlumpf. After some digging in client code I think the priority order (highest priority to lowest piority) should be:

patch-[locale]-3.MPQ
patch-[locale]-2.MPQ
patch-3.MPQ
patch-2.MPQ
patch-[locale].MPQ
patch.MPQ

lichking.MPQ
expansion.MPQ
common-2.MPQ
common.MPQ

lichking-locale-[locale].MPQ ........... lichking-speech-[locale].MPQ
expansion-locale-[locale].MPQ ...... expansion-speech-[locale].MPQ
locale-[locale].MPQ ........................ speech-[locale].MPQ

After these files the client loads additional files called
patch-[number >= 4].MPQ and patch-[locale]-[number >= 4].MPQ and gives them higher priority than any other archive, so patch-4.MPQ overrides ANYTHING and patch-[locale]-4.MPQ overrides patch-4.MPQ.

Please correct me if I'm wrong.

Thanks in advance
fbbdev
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: [QUESTION] MPQ Chain order
« Reply #5 on: July 25, 2013, 01:49:05 pm »
The last part seems really odd.

Have you tried creating dummy files for
Code: [Select]
[locale]/expansion-locale-[locale].MPQ
[locale]/expansion-speech-[locale].MPQ
[locale]/lichking-locale-[locale].MPQ
[locale]/lichking-speech-[locale].MPQ
[locale]/locale-[locale].MPQ
[locale]/patch-[locale].MPQ
[locale]/patch-[locale]-2.MPQ
[locale]/patch-[locale]-3.MPQ
[locale]/patch-[locale]-4.MPQ
[locale]/patch-[locale]-5.MPQ
[locale]/patch-[locale]-a.MPQ
[locale]/patch-[locale]-z.MPQ
[locale]/speech-[locale].MPQ
common.MPQ
common-2.MPQ
expansion.MPQ
lichking.MPQ
patch.MPQ
patch-2.MPQ
patch-3.MPQ
patch-4.MPQ
patch-5.MPQ
patch-a.MPQ
patch-z.MPQ
and then just watching what is printed on standard output?

That would be the easiest way to verify.

Also, to my belief, order has been
Code: [Select]
common.MPQ
common-2.MPQ
expansion.MPQ
lichking.MPQ
patch.MPQ
patch-2.MPQ
patch-3.MPQ
patch-4.MPQ
patch-5.MPQ
patch-a.MPQ
patch-z.MPQ
[locale]/locale-[locale].MPQ
[locale]/speech-[locale].MPQ
[locale]/expansion-locale-[locale].MPQ
[locale]/expansion-speech-[locale].MPQ
[locale]/lichking-locale-[locale].MPQ
[locale]/lichking-speech-[locale].MPQ
[locale]/patch-[locale].MPQ
[locale]/patch-[locale]-2.MPQ
[locale]/patch-[locale]-3.MPQ
[locale]/patch-[locale]-4.MPQ
[locale]/patch-[locale]-5.MPQ
[locale]/patch-[locale]-a.MPQ
[locale]/patch-[locale]-z.MPQ
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

babboide

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 7
    • View Profile
Re: [QUESTION] MPQ Chain order
« Reply #6 on: July 26, 2013, 02:23:18 am »
Ok, I've done a lot of testing and here's the result:
Code: [Select]
---- HIGHEST PRIORITY
Datapatch-z.MPQ
           .
           .
           .
Datapatch-a.MPQ

Datapatch-9.MPQ
           .
           .
           .
Datapatch-2.MPQ

Data[locale]patch-[locale]-z.MPQ
                             .
                             .
                             .
Data[locale]patch-[locale]-a.MPQ

Data[locale]patch-[locale]-9.MPQ
                             .
                             .
                             .
Data[locale]patch-[locale]-2.MPQ

Datapatch.MPQ
Data[locale]patch-[locale].MPQ

Data[locale]lichking-speech-[locale].MPQ
Data[locale]expansion-speech-[locale].MPQ
Data[locale]lichking-locale-[locale].MPQ
Data[locale]expansion-locale-[locale].MPQ
Data[locale]speech-[locale].MPQ
Data[locale]locale-[locale].MPQ

Datalichking.MPQ
Dataexpansion.MPQ
Datacommon-2.MPQ
Datacommon.MPQ
---- LOWEST PRIORITY

The order printed in client's output is different from the priority order, however you can subdivide the list in smaller groups, and files in those groups are printed in ascending priority order. Non-locale files whose name starts with "patch" (except patch.MPQ) are given the highest priority.

To find this I created two MPQs, one with modified GlueXML files and one with original versions of the same files; then I moved them around and swapped them with other archives to determine priority: WoW complains about corrupted interface files when the archive with modified GlueXML receives higher priority.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Steff

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 4551
    • View Profile
Re: [SOLVED] [QUESTION] MPQ Chain order
« Reply #7 on: July 26, 2013, 10:29:27 pm »
That cannot be. Why?
because if i place some dbcs in data/patch files and thy exist in local patch files, client dont load them.
Learnd this hard during worldmap creation.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
Please mark as solved if solved.
Don't ask if you could ask a question... JUST ask the Question.
You can send me also offline messages. I will answer if I get online.
Skype: project.modcraft
Discord: steff#6954

mystical

  • Registred Member
  • GM Isle Explorer
  • *****
  • Posts: 17
    • View Profile
    • https://www.facebook.com/michael.melzer2
Re: [SOLVED] [QUESTION] MPQ Chain order
« Reply #8 on: July 27, 2013, 06:50:28 am »
:lol:  Easiest Way without much work is to take a look at the logfile from Modelviewer.......

If you start the WoW Modelviewer without any Path Settings, it will scan the WoW Directory
and add all MPQ´s automatically to the loadup list.

Here s the Result:


06:05:28: Starting:
World of Warcraft Model Viewer v0.7.0.4 (Bouncing Baracuda) Windows 32-bit

06:05:28: Initializing Objects...
06:05:28: Creating Anim Control...
06:05:28: Creating Char Control...
.
.
.
06:05:35: Opening patch-5.mpq . . . . . . . . .  . . . . . . . . . . . . . . . . . . . . . . . . <<<<<------  Highest Priority
06:05:35: Opening Patch-4.mpq
06:05:37: Opening patch-3.MPQ
06:05:37: Opening patch-2.mpq
06:05:38: Opening patch.MPQ
06:05:39: Opening lichking.MPQ
06:05:39: Opening expansion.MPQ
06:05:39: Opening common-2.MPQ
06:05:40: Opening common.MPQ
06:05:41: Opening deDEpatch-deDE-5.mpq
06:05:41: Opening deDEpatch-deDE-4.mpq
06:05:41: Opening deDEpatch-deDE-3.mpq
06:05:41: Opening deDEpatch-deDE-2.MPQ
06:05:41: Opening deDEpatch-deDE.MPQ
06:05:41: Opening deDElichking-locale-deDE.MPQ
06:05:41: Opening deDEexpansion-locale-deDE.MPQ
06:05:41: Opening deDElocale-deDE.MPQ
06:05:42: Opening deDEbase-deDE.MPQ . . . . . . . . . . . . . . . . . . . . . . . . . . <<<<<------  Lowest Priority


 :D  :D  :D  :D  :D

So new Stuff  has to be in  patch-5.mpq in my case :D :D
    « Last Edit: January 01, 1970, 01:00:00 am by Admin »

    schlumpf

    • Administrator
    • Creator of Worlds
    • *****
    • Posts: 2967
      • View Profile
    Re: [SOLVED] [QUESTION] MPQ Chain order
    « Reply #9 on: July 27, 2013, 01:17:44 pm »
    Quote from: "mystical"
    :lol:  Easiest Way without much work is to take a look at the logfile from Modelviewer.......
    [...]
    So new Stuff  has to be in  patch-5.mpq in my case :D :D

      This is just plain wrong: The model viewer is a custom application, thus does not even have to be remotely close to what WoW does. You may as well refer to noggit, then.
      Also, new stuff does not have to be in patch-5.mpq in your case.
      « Last Edit: January 01, 1970, 01:00:00 am by Admin »

      babboide

      • Registred Member
      • BLP Convertor
      • *****
      • Posts: 7
        • View Profile
      Re: [SOLVED] [QUESTION] MPQ Chain order
      « Reply #10 on: August 01, 2013, 04:19:39 pm »
      Quote from: "Steff"
      That cannot be. Why?
      because if i place some dbcs in data/patch files and thy exist in local patch files, client dont load them.
      Learnd this hard during worldmap creation.

      I understand your point, but I'm saying that after trying and my experience is different from yours. Do you have a different locale than mine? I've got enGB/enUS; maybe Wow gives higher priority to non-English locales, this would explain the difference between our results.
      « Last Edit: January 01, 1970, 01:00:00 am by Admin »

      schlumpf

      • Administrator
      • Creator of Worlds
      • *****
      • Posts: 2967
        • View Profile
      Re: [SOLVED] [QUESTION] MPQ Chain order
      « Reply #11 on: August 01, 2013, 05:06:59 pm »
      There is no difference depending on the locale.
      « Last Edit: January 01, 1970, 01:00:00 am by Admin »

      Steff

      • Administrator
      • Creator of Worlds
      • *****
      • Posts: 4551
        • View Profile
      Re: [SOLVED] [QUESTION] MPQ Chain order
      « Reply #12 on: August 02, 2013, 06:08:36 am »
      QUick test could be.
      Add 2 BLP replace for some tileset WITH DIFFERENT IAMGES
      One in patch second in patch local.
      Then once you see get loaded last.
      « Last Edit: January 01, 1970, 01:00:00 am by Admin »
      Please mark as solved if solved.
      Don't ask if you could ask a question... JUST ask the Question.
      You can send me also offline messages. I will answer if I get online.
      Skype: project.modcraft
      Discord: steff#6954

      Dracbane

      • Registred Member
      • Loreweaver
      • *****
      • Posts: 105
        • View Profile
      Re: [QUESTION] MPQ Chain order
      « Reply #13 on: August 02, 2013, 07:43:27 pm »
      Quote from: "babboide"
      Thank you schlumpf. After some digging in client code I think the priority order (highest priority to lowest piority) should be:

      patch-[locale]-3.MPQ
      patch-[locale]-2.MPQ
      patch-3.MPQ
      patch-2.MPQ
      patch-[locale].MPQ
      patch.MPQ

      lichking.MPQ
      expansion.MPQ
      common-2.MPQ
      common.MPQ

      lichking-locale-[locale].MPQ ........... lichking-speech-[locale].MPQ
      expansion-locale-[locale].MPQ ...... expansion-speech-[locale].MPQ
      locale-[locale].MPQ ........................ speech-[locale].MPQ

      After these files the client loads additional files called
      patch-[number >= 4].MPQ and patch-[locale]-[number >= 4].MPQ and gives them higher priority than any other archive, so patch-4.MPQ overrides ANYTHING and patch-[locale]-4.MPQ overrides patch-4.MPQ.

      Please correct me if I'm wrong.

      Thanks in advance
      fbbdev


      This has always been my experience when working with patches.  I often have patches from 4-9 and a-z because of working on different content for different things. Patch-4.MPQ overrides all the data patches and Patch-4-enUS.MPQ overrides everything.
      « Last Edit: January 01, 1970, 01:00:00 am by Admin »