Hammerwatch

Hammerwatch

Not enough ratings
Unpacking .hwm Files
By Resi ♥
Found a cool level that really interests you? Want to take it apart and see how everything works (perhaps gaining some inspiration and learning some tricks along the way?) Then you should read this short and simple guide!
   
Award
Favorite
Favorited
Unfavorite
Introduction
Let's say you've downloaded a couple of custom campaigns from the workshop and want to see how the map creator made the campaign that you enjoyed playing. You could ask the creator if they are willing to share their source files, which would altogether bypass this guide. If the creator doesn't wish to share their resources, you can unpack their files yourself, but I would recommend against doing this for malicious purposes.

You can learn a lot by looking at other peoples' work and understand how certain things were done or why. It can also help you with learning better map design. You should only use this guide to help you further understanding what makes a Hammerwatch Campaign good and not to brazenly take resources from the creators who worked hard to give other people enjoyment.
Unpacking
You do not need to download any outside resources created by other members of the community. The ResourceExtractor also extracts .hwm files. This can serve you well if you manage to lose your source files and have a compiled copy of your work.

Step 1
To begin, you should go to the Hammerwatch\editor folder, which is stored at:
Steam\steamapps\common\Hammerwatch\editor

Step 2
From there, you should scroll down until you find ResourceExtractor.exe. Right click it and create a shortcut.



Step 3
Once you have completed this, right click on the shortcut you just created and select Properties.
Inside of the Target: text box, you want to add the text - map to the end, after the quotes.


Now it is time to unpack a level. I was interested in understanding how tilemaps worked and I couldn't quite wrap my head around the examples provided by the developer in the default campaign resources. It was mainly due to how he designed the graphics and utilized .xml files. I had an inkling of what I was supposed to do, but since I couldn't understand it, I decided to unpack the .hwm of a campaign I had recently played - Hexen: Beyond Hammerwatch and take a look at how they did tilemaps.

Step 4
Open another folder where the custom campaign is saved. This should be:
Steam\steamapps\common\Hammerwatch\levels\workshop

Now simply drag and drop the campain_name.hwm onto the ResourceExtractor.exe - Shortcut and files should be unpacked and placed into a folder with the same name as the campaign.



Conclusion
And there you have it. A quick and simple guide on how to extract .hwm files. I hope you enjoyed. Thank you for reading.
4 Comments
💖 Officer Hotpants 💖 Aug 29, 2017 @ 5:31pm 
Figured it out. I was doing the right thing but missing a file. You drag the mod folder onto the packer program. You need to make sure that the mod contains the file "info.xml", which gives it its name, description and life count. It seems that didn't unpack in my case and so had to be created from scratch. Fortuantely you can just repurpose the one from the example mod.

It seems that mods fall apart when you mess with them, though. Or at least mine did. Like you, I was messing with the Hexen mod and it seems that a lot of tiles just disappear when you mess with a level in the editor. A lot the walls and such. Not sure why that happens.
💖 Officer Hotpants 💖 Aug 28, 2017 @ 8:38pm 
Alright. Thanks for responding (and damn quick, at that). If I figure it out, I'll let you know.
Resi ♥  [author] Aug 28, 2017 @ 8:31pm 
I have to be honest, I wouldn't have a clue. Just follow any guides that teach you how to prepare a level for upload.
💖 Officer Hotpants 💖 Aug 28, 2017 @ 8:26pm 
How would I go about repacking the assets? I've been tweaking a level but I'm not sure how to repack it so that I can actually try the changes.