All Projects → inwc3 → JMPQ3

inwc3 / JMPQ3

Licence: Apache-2.0 license
Native Java mpq archive library

Programming Languages

java
68154 projects - #9 most used programming language
Objective-J
44 projects

Projects that are alternatives of or similar to JMPQ3

War3Net
A .NET implementation of Warcraft III related libraries.
Stars: ✭ 76 (+123.53%)
Mutual labels:  warcraft3, mpq
mpyq
Python library for reading MPQ archives.
Stars: ✭ 86 (+152.94%)
Mutual labels:  mpq, mpq-archives
casc
CASC extractor for World of Warcraft data
Stars: ✭ 15 (-55.88%)
Mutual labels:  mpq
gowarcraft3
GoWarcraft3 provides a set of go packages and utilities that ease working with Warcraft III protocols and file formats.
Stars: ✭ 42 (+23.53%)
Mutual labels:  warcraft3
wc3libs
Java library for reading and modifying Warcraft III maps and game files
Stars: ✭ 21 (-38.24%)
Mutual labels:  warcraft3
mpq
Decoder/parser of Blizzard's MPQ archive file format
Stars: ✭ 28 (-17.65%)
Mutual labels:  mpq-archives
h-lua
h-lua.hunzsig.org
Stars: ✭ 27 (-20.59%)
Mutual labels:  warcraft3
h-war3
已迁移到 https://github.com/hunzsig-warcraft3
Stars: ✭ 16 (-52.94%)
Mutual labels:  warcraft3
war3-model
TypeScript-based mdl/mdx (Warcraft 3 model formats) converter/renderer
Stars: ✭ 56 (+64.71%)
Mutual labels:  warcraft3
Ice-Sickle
ARCHIVED: This project is archived because updates are now being made to the original World Editor (reforged), and because HiveWE is making amazing progress.
Stars: ✭ 13 (-61.76%)
Mutual labels:  warcraft3
embedded-japi-plugin
魔兽地图 内置japi插件文档
Stars: ✭ 29 (-14.71%)
Mutual labels:  warcraft3
h-vjass
h-vjass.hunzsig.org
Stars: ✭ 23 (-32.35%)
Mutual labels:  warcraft3
diablo2
Utilities to work with diablo2, Clientless map rendering & packet sniffing
Stars: ✭ 126 (+270.59%)
Mutual labels:  mpq

CircleCI Jit Coverage Status codebeat badge

JMPQ3

Note: Since Version 1.9.0 jmpq3 requires Java 11 or higher

What?

JMPQ3 is a small java library for accessing and modifying mpq (MoPaQ) archives. Common file endings are .mpq, .w3m, .w3x.

MoPaQ is Blizzard's old, proprietary archive format for storing gamedata (replaced with CASC).

You can find more info and an excellent graphical editor here http://www.zezula.net/en/mpq/main.html

Get it

currently only warcraft 3 maps and mpqs are confirmed supported. Mpqs from other games (WoW, starcraft) might cause problems.

It is recommended to use jitpack with a dependency manager like gradle.

See https://jitpack.io/#inwc3/JMPQ3/

Gradle Example:

dependencies {
    compile 'com.github.inwc3:JMPQ3:1.7.14'
}
allprojects {
    repositories {
	maven { url 'https://jitpack.io' }
    }
}

You can still download the jar directly if you prefer https://github.com/inwc3/JMPQ3/releases

How to use

Quick API Overview:

Jmpq provides the OpenOptions READ_ONLY which should be selfexplanatory and FORCE_V0 which forces the mpq to be opened like warcraft3 would open it, ignoring optional data from later specifications for compatability.

// Automatically rebuilds mpq after use if not in readonly mode
try (JMpqEditor e = new JMpqEditor(new File("my.mpq"), MPQOpenOption.FORCE_V0)){
        e.hasFile("filename"); //Checks if the file exists
        e.extractFile("filename", new File("target location")); //Extracts a specific file out of the mpq to the target location
        if (e.isCanWrite()) {
            e.deleteFile("filename"); //Deletes a specific file out of the mpq
            e.insertFile("filename", new File("file to add"), true); //Inserts a specific into the mpq from the target location
            e.extractAllFiles(new File("target folder")); //Extracts all files inside the mpq to the target folder. If a proper listfile exists,
            e.getFileNames(); //Get the listfile as java HashSet<String>
        }
    }

}

Known issues:

  • Unsupported decompression algorithms: sparse and bzip2
  • Only supported compression is zlib/zopfli
  • JMPQ doesn't build a valid (attributes) file for now. (which seems to be fine for warcraft3)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].