Packager

From Heroes of Hammerwatch wiki
Jump to: navigation, search

The packager tool allows you to package a mod, but it also allows you to unpack or extract mods, as well as base the content from the res/assets.bin file. This is useful if you want to use any of our base resources such as units and scripts, in your mod, or use them as reference material.

Unpacking Resources

First, start the packager tool. You will see several icons at the top and groups of mods below To unpack the base resources, simply click the icon at the top of the window that looks like a packing box,

To Unpack a mod, locate the Mod you want to unpack from the selection in the main window, right click and "Unpack Mod"

  • Workshop: These mods have been installed from the Steam Workshop. (If you're using the GoG build, you won't see this.)
  • Packed: These are all mods packaged as .bin files in the "mods" folder. These can be downloaded and placed there manually.
  • Unpacked: These are unpackaged mods organized as directories.

Packager.png

Command line

The Packager can also be used from the commandline, this is generally not needed outside of linux use. Try the above method first.

First, navigate to your Heroes of Hammerwatch installation folder. In this folder, hold down Shift and F10 at the same time to open the advanced shortcut menu. From here, select "Open command prompt here." (On Windows 10 this is Powershell.) You should now see the Windows command prompt in front of you, in the current folder. Then, run the following command, which will extract all files from res/assets.bin into the assets folder.

PACKAGER.exe --unpack=res/assets.bin --destination=unpacked_assets

On Powershell, you need to call it like this:

.\PACKAGER.exe --unpack=res/assets.bin --destination=unpacked_assets

Nothing will appear to happen, but it's currently extracting the assets in the background.

Extracted.png

In Linux/Ubuntu:

./Packager --unpack=./res/assets.bin --destination=./unpacked_assets

For some errors in Linux/Ubuntu you may encounter, see Unpacking resources for Linux

Mods

The same process works for mods, except you pass the .bin file to the --unpack parameter. For example:

PACKAGER.exe --unpack=mods/trainer.bds --destination=mods/trainer

Packing Mods

Command line

Follow the same steps as above however change --unpack to --resources, eg

Windows Commandline :

Packager.exe --resources=assets --destination=new_assets.bin

Powershell:

./Packager.exe --resources=assets --destination=new_assets.bin

Linux

./Packager --resources=assets --destination=new_assets.bin

A full list of packager commandline help can be listed by using --help, the information is also listed below (note some information may be specific to SSBD rather than HOH) :

Usage PACKAGER [/h] [/r < str >] [/l <str>] [/u <str>] [/d <str>] [--sval]

/h, --help Show this help
/r, --resources= <str> Pack Resources
/l --level= <str> Pack Level
/u --unpack= <str> Unpack resources/level
/d --destination= <str> Unpack resources/level destination
--sval Extract (read-only) serialized scenario info as info.sval

Via GUI

First, start the packager tool. You will see several groups of mods:

  • Workshop: These mods have been installed from the Steam Workshop. (If you're using the GoG build, you won't see this.)
  • Packed: These are all mods packaged as .bin files in the "mods" folder. These can be downloaded and placed there manually.
  • Unpacked: These are unpackaged mods organized as directories.

You should see your mod in the Unpacked list. Right click it, and select "Make package". You will be prompted to save a .bin file. Pick any location and any name you want. You can either distribute this file manually, or distribute it via the Steam Workshop.

Sharing Mod Files to the Workshop

Once your mod is packaged, you can upload it to the Steam Workshop.