greetings,
has anyone run across a tool that i could use to extract items from a hak file via cmd line or in a batch file ?
thanks
greetings,
has anyone run across a tool that i could use to extract items from a hak file via cmd line or in a batch file ?
thanks
Well there is nwhak.exe under the UTILS folder of NWN, but doing so using CMD… Not that I can think of…
nwhak lets you extract all, or a range of resources, into a folder, which you can then batch process if necessary.
There’s a simple tool called erf that I think will compile for windows. It’ll unpack/pack any archive in erf format, including modules and haks. You get the whole contents, but then you can copy out what you want.
thanks all. erf -x
works perfectly for what i need. didn’t know erf could handle hak files as well !
cheers
I think there’s no difference between hak and erf (and perhaps modules too) other than the extension.
Yes, modules too. erf is just an archive format, like tar on unix/linux. The game expects different files within based on what type it thinks it is, but that’s independent of the archiving format itself. I thought there might be a windows binary around and that someone would have a link
The game writes them using different magic numbers. But that’s it.
One can change file’s .erf
and .mod
extension to .hak
and it will open them. It will also save erfs back as erfs, but will refuse to save mods.
Nwhak also has a basic CLI, but only for building the package:
nwhak.exe myfile.hak folder_with_files_to_add
Note: hak is overwritten and there’s no way to customize the localized strings (description, url).
there’s a cool utility [er… collection of utilities, i guess] called ‘auroraext’ that i’ve found useful for this, since it’s pretty configurable. the specific tool for building haks is a java program called ‘HakAssembler’.
I haven’t used it, but I like the ideas of hak merger and dialog compiler in that pack. It only misses minimap image exporter (there was such utility in the Vault, no?)
BTW, program linked here by @Kamiryn also has the ability to hash ERF contents (erf -k
) which could be used to aid in hak conflict resolution. While ERFs do not store timestamps, one could improve this process by (ab)using the localized strings table (or simply including a txt file).
I actually thought of writing a similar ERF manipulator program with above functionality, but I guess there’s already too much software doing that.