[TOOL] .hwl unpack utility
[TOOL] .hwl unpack utility
I noticed there doesn't appear to be anything around for unpacking these archives and so I've made one of my internal tools friendlier for public use. You can download it here
Example usage: hwl /f:bmp /s:somearchive.hwl
Above will unpack the textures contained in the HWL archive file somearchive.hwl to the current directory in bitmap format (A1R5G5B5)
EDIT: Source is available here
Example usage: hwl /f:bmp /s:somearchive.hwl
Above will unpack the textures contained in the HWL archive file somearchive.hwl to the current directory in bitmap format (A1R5G5B5)
EDIT: Source is available here
Last edited by Emjayen on 22 Mar 2019, 10:41, edited 1 time in total.
Re: [TOOL] .hwl unpack utility
There was a tool for it somewhere, but just a few days ago I tried to find it and couldn't. I'm wondering though what use there is for it now. I recalled it because I was thinking of making HD textures in mods only in D3D and doing it via HWL, but decided that having them in a "magic" LOD might be better, because PaletteSMul and PaletteVMul options would be respected. For HWL the textures have to be pre-filtered.
Last edited by GrayFace on 17 Sep 2018, 14:48, edited 2 times in total.
My patches: MM6 MM7 MM8. MMExtension. Tools. Also, I love Knytt Stories and Knytt Underground. I'm also known as sergroj.
Re: [TOOL] .hwl unpack utility
I found the tool I had used in the past: http://mm6789.narod.ru/files/might_and_ ... wl2bmp.rar
Maybe I'll use HWL format after all. Though, I'll probably make a new LOD-based format instead (with HWL structures for individual files, but not for archive structure). Thinking about ways to support HD 16-bit textures in D3D mode.
Maybe I'll use HWL format after all. Though, I'll probably make a new LOD-based format instead (with HWL structures for individual files, but not for archive structure). Thinking about ways to support HD 16-bit textures in D3D mode.
My patches: MM6 MM7 MM8. MMExtension. Tools. Also, I love Knytt Stories and Knytt Underground. I'm also known as sergroj.
Re: [TOOL] .hwl unpack utility
There's a mechanism of my next MMCL revision that could be leveraged. At present it provides an optional, run-time filtering layer for textures; generating a scaled up mipchain version in technically any native hardware format, for now just the usual 32-bit R8G8B8A8 due to ubiquitous support.
Last edited by Emjayen on 21 Mar 2019, 22:58, edited 3 times in total.
Re: [TOOL] .hwl unpack utility
How do you open a texture file using these tools?
"It is good to have an end to journey towards, but it is the journey that matters in the end"
(Ursula K Le Guin)
(Ursula K Le Guin)
Re: [TOOL] .hwl unpack utility
They're located in your game installation's "DATA" directory, e.g: d3dsprite.hwl
Last edited by Emjayen on 22 Mar 2019, 10:30, edited 1 time in total.
Re: [TOOL] .hwl unpack utility
When I try to run the software nothing happens. I also tried highlighting the .hwl file then choosing "open with hwl" but again nothing happens. What do I do with the exe to make it work?Emjayen wrote:They're located in your game installation's "DATA" directory, e.g: d3dsprite.hwl
"It is good to have an end to journey towards, but it is the journey that matters in the end"
(Ursula K Le Guin)
(Ursula K Le Guin)
Re: [TOOL] .hwl unpack utility
It's a command-line tool.
Easiest thing to do would be:
- Copy hwl.exe to your DATA directory
- In the explorer address bar, type cmd
- Use the syntax described in the OP, so e.g hwl /o:sprites /f:bmp /s:d3dsprite.hwl
EDIT: I've updated it to support how you're trying to invoke it (e.g, you can use explorer's "Open With" and it'll work with some sane defaults) -- download link is the same
Easiest thing to do would be:
- Copy hwl.exe to your DATA directory
- In the explorer address bar, type cmd
- Use the syntax described in the OP, so e.g hwl /o:sprites /f:bmp /s:d3dsprite.hwl
EDIT: I've updated it to support how you're trying to invoke it (e.g, you can use explorer's "Open With" and it'll work with some sane defaults) -- download link is the same
Last edited by Emjayen on 23 Mar 2019, 23:33, edited 1 time in total.
Re: [TOOL] .hwl unpack utility
Wow, thank you. I wasn't expecting you to change anything but I'm glad you did. I suppose I should stop being lazy and learn to use command line really. It might open doors for me but thank you for this.Emjayen wrote:EDIT: I've updated it to support how you're trying to invoke it (e.g, you can use explorer's "Open With" and it'll work with some sane defaults) -- download link is the same
"It is good to have an end to journey towards, but it is the journey that matters in the end"
(Ursula K Le Guin)
(Ursula K Le Guin)
Re: [TOOL] .hwl unpack utility
Hey! Great tool!
Can we make the oppositte? Add/replace a texture from an HWL file?
Was trying to compile the code but I can't resolve
#include <pce\pce.h>
#include <pce\pce_crt.h>
I'm using VS2017
Am I missing an external reference?
Thanks
Can we make the oppositte? Add/replace a texture from an HWL file?
Was trying to compile the code but I can't resolve
#include <pce\pce.h>
#include <pce\pce_crt.h>
I'm using VS2017
Am I missing an external reference?
Thanks
Re: [TOOL] .hwl unpack utility
If you're still in need of such functionality (writing HWL) let me know.
Re: [TOOL] .hwl unpack utility
The patch will support new LOD-based LWD format with 24-bit textures. (also gotta ditch 16-bit textures internally, but not in the coming patch version)
Last edited by GrayFace on 26 Jun 2019, 23:52, edited 3 times in total.
My patches: MM6 MM7 MM8. MMExtension. Tools. Also, I love Knytt Stories and Knytt Underground. I'm also known as sergroj.
Re: [TOOL] .hwl unpack utility
superb!!!GrayFace wrote:The patch will support new LOD-based LWD format with 24-bit textures. (also gotta ditch 16-bit textures internally, but not in the coming patch version)
- tomchen1989
- Pixie
- Posts: 140
- Joined: 21 Jun 2008
- Location: Europe / China
Re: [TOOL] .hwl unpack utility
http://mm6789.narod.ru/files/might_and_ ... wl2bmp.rar may be blocked by some browser or ads blocker I don't know. If anyone wants to download it but cannot do it, copy the link and paste it in the address bar and enter.GrayFace wrote: ↑21 Mar 2019, 06:54 I found the tool I had used in the past: http://mm6789.narod.ru/files/might_and_ ... wl2bmp.rar
Maybe I'll use HWL format after all. Though, I'll probably make a new LOD-based format instead (with HWL structures for individual files, but not for archive structure). Thinking about ways to support HD 16-bit textures in D3D mode.
---------
Simple usage:
Put hwl2bmp.exe directly in C:\, then search cmd and open Command Prompt, then enter something like:
Code: Select all
C:\>hwl2bmp "C:\game\mm7en\DATA\d3dsprite.hwl" C:\game\output\
---------
There's a description file in Russian and encoded with Russian encoding (cp1251) in hwl2bmp.rar, here's a rough English translation in case anyone needs it:
The HWL file format of Might & Magic VIII
These files contain the graphics used by the 3D gas pedal.
The file format is:
0 signature (DWORD) "D3DT"
4 offset to the beginning of the FAT
8..n data
FAT format:
Pretty convoluted
0 number of entries in FAT (DWORD)
4 FAT
FAT consists of 2 parts placed one after another
First part is file names - each record is 14h bytes long
file name starts at position 0 and reads to the first 0 (ASCIIZ).
The rest of the record is garbage.
The second part is just after the first one. It's just an array of offsets
from the beginning of the HWL to the files stored in it. (DWORD)
The files format:
The files themselves are 15-bit graphics (5:5:5), header
and packed with ZLib. The length of the header is 24h. The following fields are of interest:
0 packed data size (DWORD)
14h sprite width (DWORD)
18h sprite height (DWORD)
the rest is junk.
A command line program to unpack ALL of the HWL into a designated directory and simultaneously
to BMP at the same time.
Success in unpacking toys.
Andrey Ermakov aka Jel.
Who is online
Users browsing this forum: No registered users and 5 guests