2015-07-09 08:08:49 +00:00
|
|
|
# HLM2-Wad-Extract #
|
2015-03-13 10:34:30 +00:00
|
|
|
|
|
|
|
This application is a tool to extract the asset data used in the newly released [Hotline Miami 2: Wrong
|
2015-03-13 10:38:18 +00:00
|
|
|
Humber](https://en.wikipedia.org/wiki/Hotline_Miami_2:_Wrong_Number) game. You can download or clone the latest version
|
2015-03-13 10:46:52 +00:00
|
|
|
from the [GitHub project page](https://github.com/FooSoft/hlm2-wad-extract). Although it was developed on Linux, it
|
|
|
|
should work fine on other platforms.
|
2015-03-13 10:38:18 +00:00
|
|
|
|
|
|
|
After purchasing and thoroughly enjoying this title, I thought that I would like to listen to the excellent soundtrack
|
|
|
|
while coding. I was slightly disappointed when I discovered that the music data was not simply included in the install
|
|
|
|
directory as it was in the preceding game. Seeing as I had some free time, I decided to try to fish out the music OGG
|
|
|
|
files myself out of the accompanying game WAD pack files. The file format turned out to be really simple and easy to
|
|
|
|
understand, so I wrote a small Python utility to extract some or all of the game data.
|
2015-03-13 10:34:30 +00:00
|
|
|
|
2015-07-09 08:08:49 +00:00
|
|
|
## Usage Instructions ##
|
2015-03-13 10:34:30 +00:00
|
|
|
|
|
|
|
This script makes it trivial to extract game data from the WAD files shipped with the game (currently
|
|
|
|
`hlm2_data_desktop.wad` and `hlm2_patch_desktop.wad`). These files can be found in the game install directory; on Linux
|
|
|
|
this is under `~/.steam/steam/steamapps/common/Hotline Miami 2` (probably in a similar location on other platforms).
|
2015-07-09 08:08:49 +00:00
|
|
|
|
2015-03-13 10:34:30 +00:00
|
|
|
Assuming that you have [Python 2.7](https://www.python.org/download/releases/2.7/) installed, you can execute the
|
|
|
|
`extract.py` script with the `-h` option for a description of available options:
|
|
|
|
|
|
|
|
```
|
|
|
|
usage: parse.py [-h] [--pattern PATTERN] [--output DIRECTORY]
|
|
|
|
filename [filename ...]
|
|
|
|
|
|
|
|
Extract assets from Hotline Miami 2 WAD files
|
|
|
|
|
|
|
|
positional arguments:
|
|
|
|
filename WAD files to extract
|
|
|
|
|
|
|
|
optional arguments:
|
|
|
|
-h, --help show this help message and exit
|
|
|
|
--pattern PATTERN asset file filter pattern (ex: *.ogg)
|
|
|
|
--output DIRECTORY output directory for asset files
|
|
|
|
```
|
|
|
|
|
|
|
|
For example, in order to extract the game's music files only, you could execute the following command:
|
|
|
|
|
2015-07-09 08:08:49 +00:00
|
|
|
```
|
|
|
|
$ ./parse.py --pattern "*.ogg" hlm2_data_desktop.wad
|
|
|
|
```
|
2015-03-13 10:34:30 +00:00
|
|
|
|
|
|
|
While I expect this utility to be trivial for all to use, let me know if you encounter any difficulties or unexpected
|
|
|
|
behavior.
|