State more details about supported mpq
Please state more clearly on the website/readme which MPQ’s are supported. Especially for people not that familiar with Warcraft3 or blizzard games.
smpq (uses C++ StormLib library; there are also a Java wrapper available for this) can create archives with these formats:
-C, --compression <method> Compression method: (default: ZLIB)
none None compression
IMPLODE Pkware Data Compression IMPLODE method - OBSOLETE (It was used only in Diablo I)
PKWARE Pkware Data compression
HUFFMANN Huffmann compression (Introduced in Starcraft I)
ADPCM_MONO IMA ADPCM compression for 1-channel (mono) WAVE files - Lossy compression, only for WAVE files (Now it is not used)
ADPCM_STEREO IMA ADPCM compression for 2-channel (stereo) WAVE files - Lossy compression, only for WAVE files (Now it is not used)
ZLIB ZLIB compression (Introduced in Warcraft III)
BZIP2 BZIP2 compression (Introduced in World of Warcraft: The Burning Crusade)
SPARSE SPARSE compression (Introduced in Starcraft II)
LZMA LZMA compression (Introduced in Starcraft II)
HUFFMANN+ADPCM_MONO Together Huffmann and IMA ADPCM compression for 1-channel (mono) WAVE files
HUFFMANN+ADPCM_STEREO Together Huffmann and IMA ADPCM compression for 2-channel (stereo) WAVE files
ZLIB+PKWARE Together ZLIB and Pkware Data compression
BZIP2+PKWARE Together BZIP2 and Pkware Data compression
SPARSE+ZLIB Together SPARSE and ZLIB compression
SPARSE+PKWARE Together SPARSE and Pkware Data compression
SPARSE+BZIP2 Together SPARSE and BZIP2 compression
SPARSE+ZLIB+PKWARE Together SPARSE, ZLIB and Pkware Data compression
SPARSE+BZIP2+PKWARE Together SPARSE, BZIP2 and Pkware Data compression
From core/src/mpq/compression/ it seems to support:
- IMPLODE
- PKWARE
- HUFFMANN
- ADPCM_MONO
- ADPCM_STEREO
- ZLIB
Would it support?:
- HUFFMANN+ADPCM_MONO
- HUFFMANN+ADPCM_STEREO
- ZLIB+PKWARE
It does mention INFLATE, which is not menitoned by smpq.
I suppose there is no support for version 4?
-M, --mpq-version <version> Specify MPQ archive version: (default: use new version 4)
1 support up to 4GB size of archive
2 support greater then 4GB size of archive (Introduced in World of Warcraft: The Burning Crusade)
3 (Introduced in World of Warcraft: Cataclysm Beta)
4 (Introduced in World of Warcraft: Cataclysm)
I think it is reasonable to put in a README somewhere that we will most likely not ever support mpq version 4, instead of trying to build out support for it, because it is unnecessary. The formats of the files inside the archive would be sufficiently incompatible that unless someone wrote M2 and BLP2 bindings for Warsmash, it would probably not work to do that.
That being said, the third-person branch has bindings for MDX1300, which was a primordial format halfway between MDX and M2, so the general idea of different file loaders is certainly possible. (This being how there are videos of Warsmash running a WoW hero and UI around in the WC3 environment, with the WoW hero performing jumps and walking backwards and doing other animations that aren't native to Warcraft 3 or Warcraft 3 emulation.)
But is emulating WoW on top of Warsmash a sufficiently alien game experience that it points out WoW emulation, and mpq v4 support, and other such things should possibly be an entirely separate plugin to a more modular system? For example, the WoW UI emulation requires jlua, whereas the Warcraft 3 emulator is using a homebrew Jass script interpreter made with flex/jflex and bison/byacc (or on older versions, ANTLR).
The formats of the files inside the archive would be sufficiently incompatible that unless someone wrote M2 and BLP2 bindings for Warsmash, it would probably not work to do that.
I mostly had the compression of user-made MPQs in mind like April fuels. Though you probably can also recompress official MPQs 🤔.
(or on older versions, ANTLR).
wait … build.gradle still lists ANTLR as a dependency?