Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 18 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ A command line tool to create, add, remove, list, extract, read, and verify MPQ
- Pipe the output to `grep` or other tools to search, filter, or process files
- Redirect output to files or other commands for further automation

**This project is primarily for older World of Warcraft MPQ archives**. This means it has been authored for MPQ archives versions 1 and 2, which include the following World of Warcraft (WoW) versions: Vanilla (1.12.1), TBC (2.4.3), and WoTLK (3.3.5). It has only been tested on WoW MPQ archives/patches that use MPQ versions 1 or 2. No testing has been performed on other MPQ versions or archives from other games. However, the tool will most likely work on other MPQ archive versions, as the underlying Stormlib library supports all MPQ archive versions.

If you require an MPQ tool with a graphical interface (GUI) and explicit support for more MPQ archive versions - I would recommend using [Ladik's MPQ Editor](http://www.zezula.net/en/mpq/download.html).

## Download
Expand Down Expand Up @@ -127,13 +125,13 @@ mpqcli create <target_directory>

The default mode of operation for the `create` subcommand is to take everything from the "target" directory (and below) and recursively add it to the archive. The directory structure is retained. Windows-style backslash path separators are used (`\`), as per the observed behavior in most MPQ archives.

### Create an MPQ archive using a specific version
### Create an MPQ archive for a specific game

Support for creating an MPQ archive version 1 or version 2 by using the `-v` or `--version` argument.
Target a specific game version by using the `-g` or `--game` argument. This will automatically set the correct archive format version and settings, although they can be overridden.

```
mpqcli create -v 1 <target_directory>
mpqcli create --version 2 <target_directory>
mpqcli create -g starcraft <target_directory>
mpqcli create --game wow-wotlk --sector-size 16384 --version 3 <target_directory> # World of WarCraft - Wrath of the Lich King, but with non-standard sector size and MPQ version
```

### Create and sign an MPQ archive
Expand All @@ -159,15 +157,15 @@ Add a local file to an already existing MPQ archive.
```
$ echo "For The Horde" > fth.txt
$ mpqcli add fth.txt wow-patch.mpq
[+] Adding file for locale 0: fth.txt
[+] Adding file: fth.txt
```

Alternatively, you can add a file to a specific subdirectory using the `-p` or `--path` argument.

```
$ echo "For The Alliance" > fta.txt
$ mpqcli add fta.txt wow-patch.mpq --path texts
[+] Adding file for locale 0: texts\fta.txt
[+] Adding file: texts\fta.txt
```

### Add files to an MPQ archive with a given locale
Expand All @@ -176,7 +174,16 @@ Use the `--locale` argument to specify the locale that the added file will have

```
$ mpqcli add allianz.txt --locale deDE
[+] Adding file for locale 1031: allianz.txt
[+] Adding file for locale deDE: allianz.txt
```

### Add a file with game-specific properties

Target a specific game version by using the `-g` or `--game` argument. This will automatically set the correct encryption rules and MPQ flags, although they can be overridden.

```
$ mpqcli add khwhat1.wav archive.mpq --game wc2 # In StarCraft and WarCraft II MPQs, wav files are compressed in ADPCM form
[+] Adding file: khwhat1.wav
```


Expand All @@ -186,7 +193,7 @@ Remove a file from an existing MPQ archive.

```
$ mpqcli remove fth.txt wow-patch.mpq
[-] Removing file for locale 0: fth.txt
[-] Removing file: fth.txt
```

### Remove a file from an MPQ archive with a given locale
Expand All @@ -195,7 +202,7 @@ Use the `--locale` argument to specify the locale of the file to be removed.

```
$ mpqcli remove alianza.txt wow-patch.mpq --locale esES
[-] Removing file for locale 1034: alianza.txt
[-] Removing file for locale esES: alianza.txt
```


Expand Down
7 changes: 4 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ if (MSVC)
endif()

# Create the main executable
add_executable(mpqcli
main.cpp
mpq.cpp
add_executable(mpqcli
main.cpp
mpq.cpp
helpers.cpp
locales.cpp
gamerules.cpp
)

# Add dependencies
Expand Down
Loading