ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

MIX

From ModEnc
Revision as of 18:52, 2 October 2008 by DCoder (talk | contribs) (Oops)
Jump to navigation Jump to search

.mix is the extension for the files used by Westwood to store most game files up until Yuri's Revenge. For Generals and following, big-files took this part.

Editing Mix-files

Mix-files are read, edited and created using the XCC Mixer and the XCC Mix Editor, both created by Olaf van der Spek. They can be downloaded at http://xccu.sourceforge.net.

File Names and Loading Hierarchy

Naming your MIX correctly is important for the correct execution of your mod.
There are three names/naming systems

expandmd##.mix
Where ## is a number between 01 and 99, and md is added if the the file is for Yuri's Revenge.
ecache*.mix
Where * can be any string.
elocal*.mix
Where * can be any string.

Loading Hierarchy

The game searches the MIX files for contents in this order. Once a file is found in a mix, the next MIXes don't even get checked for its presence.

  • A higher-numbered expandmd##.mix has a higher level than a lower numbered one.
  • For ecache* and elocal* files, order is not guaranteed - standard WinAPI functionality is used to locate them, and no sorting is done.
Quoting MSDN - FindNextFile:
The order in which this function returns the file names is dependent on the file system type. With the NTFS file system and CDFS file systems, the names are usually returned in alphabetical order. With FAT file systems, the names are usually returned in the order the files were written to the disk, which may or may not be in alphabetical order. However, as stated previously, these behaviors are not guaranteed.
Additionally, files that have any of the "Hidden", "System" or "Temporary" attributes set are not loaded.
This list was generated for Yuri's Revenge 1.001 . Red Alert 2 ignores the md MIXes, and other games might use a different order, to be documented later.


  1. LANGMD.MIX
  2. LANGUAGE.MIX
  3. EXPANDMD##.MIX ;( 99, 98, ... 02, 01)
  4. RA2MD.MIX
  5. RA2.MIX
  6. CACHEMD.MIX
  7. CACHE.MIX
  8. LOCALMD.MIX
  9. LOCAL.MIX
  10. AUDIOMD.MIX
  11. ECACHE*.MIX
  12. ELOCAL*.MIX
  13. CONQMD.MIX
  14. GENERMD.MIX
  15. GENERIC.MIX
  16. ISOGENMD.MIX
  17. ISOGEN.MIX
  18. CONQUER.MIX
  19. CAMEOMD.MIX
  20. CAMEO.MIX
  21. MAPSMD03.MIX
  22. MULTIMD.MIX
  23. THEMEMD.MIX
  24. MOVMD03.MIX
  25. URBAN.MIX
  26. URB.MIX
  27. ISOURBMD.MIX
  28. ISOURB.MIX
  29. SIDEC##.MIX ;the ## stands for side you're playing as - 1 for Allied
  30. SIDENC##.MIX

As a result of this, it is common to distribute new and modified files as follows:

expandmd##.mix

This is a type of mix file designed to overide things already existing in the game files. (as can be seen by rulesmd.ini in expandmd01.mix for Yuri's Revenge v1.001)

ecache*.mix

As the name sugests, this is a cache file. The files in here are only read if they do not exist elsewhere, unlike other mix files where the last read file overides the previous versions files. the files inside these mix files are only indexed upon loading, and speculativly, the progressive number override doesn't apear to apply.

elocal*.mix

This file is practically not used in the community, but works for "unofficial SHP, VXL, HVA and MAP files" according to DeeZire's Red Alert 2 and Yuris Revenge INI Editing Guide. Since, in the original game, local.mix holds almost all object-related graphics, and elocal*.mix works for the same file types, it is likely it was originally conceived as an expansion file specifically for local.mix. It is unknown why the community started using ecache*.mix for unit graphics instead.

Loose

  • CSF
  • PKT, Only 1 can exist loose, otherwise you get maps listed multiple times.
  • BAG
  • IDX
  • WAV
  • BIK

Note that, despite this common distribution of files, many files (especially graphics) work in an expandmd##.mix as well.

How to make a new MIX file

Important: In order to be read by the game, your new mix has to reside in the game's folder, and has to be named correctly.

Using XCC Mix Editor

Click New and choose where to save it. To add files to a mix file you can go to import or you can use the faster method of "drag 'n drop" you can select files from explorer and drag them into the XCC Mix Editor window. Next press the "Compact" button, this saves and compresses the file.

Using XCC Mixer

Click File - New and select where to save it. Then, navigate there and open that file in the Mixer. Now you can actually drag and drop files to the Mixer as well to add them, there is an option to compact in the context menu that appears when you right click on a file in that mix.


Location of files in the game's mix files

RA2/YR

  • The INI files are in RA2.mixlocal.mix and RA2md.mixlocalmd.mix. rulesmd.ini and soundmd.ini for YR 1.001 are in expandmd01.mix.
  • Cameos (build icons), which are single frame SHPs, can found in language.mixcameo.mix and in langmd.mixcameomd.mix.
  • Infantry, which are multi frame SHPs, can be found in RA2.mixconquer.mix and ra2md.mixconqmd.mix.
  • The voxels (and their associated hva files), Tanks, naval vessels, and aircraft, can be found in ra2.mixlocal.mix and ra2md.mixlocalmd.mix.

See also