[TOOL] .hwl unpack utility

The role-playing games (I-X) that started it all and the various spin-offs (including Dark Messiah).

Moderator: Moderators

Emjayen
Leprechaun
Leprechaun
Posts: 47
Joined: 01 Aug 2013
Location: Sydney, Australia
Contact:

[TOOL] .hwl unpack utility

Postby Emjayen » Sep 17 2018, 12:43

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
Last edited by Emjayen on Mar 22 2019, 10:41, edited 1 time in total.

User avatar
GrayFace
Titan
Titan
Posts: 1385
Joined: 29 Nov 2005

Re: [TOOL] .hwl unpack utility

Postby GrayFace » Sep 17 2018, 14:46

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 Sep 17 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.

User avatar
GrayFace
Titan
Titan
Posts: 1385
Joined: 29 Nov 2005

Re: [TOOL] .hwl unpack utility

Postby GrayFace » Mar 21 2019, 6: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.
My patches: MM6 MM7 MM8. MMExtension. Tools. Also, I love Knytt Stories and Knytt Underground. I'm also known as sergroj.

Emjayen
Leprechaun
Leprechaun
Posts: 47
Joined: 01 Aug 2013
Location: Sydney, Australia
Contact:

Re: [TOOL] .hwl unpack utility

Postby Emjayen » Mar 21 2019, 22:30

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 Mar 21 2019, 22:58, edited 3 times in total.

User avatar
Erisian
Leprechaun
Leprechaun
Posts: 21
Joined: 15 Mar 2019
Location: Gothenburg Sweden

Re: [TOOL] .hwl unpack utility

Postby Erisian » Mar 22 2019, 9:56

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)

Emjayen
Leprechaun
Leprechaun
Posts: 47
Joined: 01 Aug 2013
Location: Sydney, Australia
Contact:

Re: [TOOL] .hwl unpack utility

Postby Emjayen » Mar 22 2019, 10:29

They're located in your game installation's "DATA" directory, e.g: d3dsprite.hwl
Last edited by Emjayen on Mar 22 2019, 10:30, edited 1 time in total.

User avatar
Erisian
Leprechaun
Leprechaun
Posts: 21
Joined: 15 Mar 2019
Location: Gothenburg Sweden

Re: [TOOL] .hwl unpack utility

Postby Erisian » Mar 23 2019, 11:18

Emjayen wrote:They're located in your game installation's "DATA" directory, e.g: d3dsprite.hwl

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?
"It is good to have an end to journey towards, but it is the journey that matters in the end"
(Ursula K Le Guin)

Emjayen
Leprechaun
Leprechaun
Posts: 47
Joined: 01 Aug 2013
Location: Sydney, Australia
Contact:

Re: [TOOL] .hwl unpack utility

Postby Emjayen » Mar 23 2019, 20:26

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
Last edited by Emjayen on Mar 23 2019, 23:33, edited 1 time in total.

User avatar
Erisian
Leprechaun
Leprechaun
Posts: 21
Joined: 15 Mar 2019
Location: Gothenburg Sweden

Re: [TOOL] .hwl unpack utility

Postby Erisian » Mar 25 2019, 10:46

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

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.
"It is good to have an end to journey towards, but it is the journey that matters in the end"
(Ursula K Le Guin)

User avatar
Dragonfly
Leprechaun
Leprechaun
Posts: 21
Joined: 27 Sep 2017

Re: [TOOL] .hwl unpack utility

Postby Dragonfly » May 12 2019, 5:47

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

Emjayen
Leprechaun
Leprechaun
Posts: 47
Joined: 01 Aug 2013
Location: Sydney, Australia
Contact:

Re: [TOOL] .hwl unpack utility

Postby Emjayen » Jun 18 2019, 5:46

If you're still in need of such functionality (writing HWL) let me know.

User avatar
GrayFace
Titan
Titan
Posts: 1385
Joined: 29 Nov 2005

Re: [TOOL] .hwl unpack utility

Postby GrayFace » Jun 23 2019, 21:10

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 Jun 26 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.

User avatar
Dragonfly
Leprechaun
Leprechaun
Posts: 21
Joined: 27 Sep 2017

Re: [TOOL] .hwl unpack utility

Postby Dragonfly » Jun 25 2019, 3:52

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)


superb!!!


Return to “Might and Magic”

Who is online

Users browsing this forum: No registered users and 22 guests