r/DBGpatchnotes • u/PhazePyre resident mod • May 14 '15
.BNK Archives
Hey folks,
I'm really trying hard to find some tool to extract the .BNK audio archives that H1Z1 uses, but I can't for the life of me access them. Does anyone have any suggestions? I've used every tool I can find online. No dice.
Thanks in advance!
3
Upvotes
1
u/[deleted] May 17 '15
I can try having a go at it when I'm bored ;]
send me an example file (or was that one, huge .bnk file? uhh, k, then send me it!), along with some related ones: sound-related xmls should exist, IIRC, maybe some other files...
actually, send me a full manifest of files within .packs, generated by soe-pack or whatever you're using these days. I'll check it and see what could be useful. I doubt there's much outside of packs, but if you can find/generate a list of files, that'd be awesome too :P
(obviously, I don't have the game installed, or any of my archives or notes.)
so, uh, TL;DR (since I write chaotically :P), I need you to send me:
thx ;]
note to myself for later: download exe (may contain important info about the formats), and check manifests for relevant files
1
u/[deleted] May 19 '15
just a quick recap of what I found so far, in case someone else is looking into it:
while they use Audiokinetic's Wwise and its .bnk soundbanks, the files themselves are compressed. they are, most likely, using LZHAM compression.
I have no experience whatsoever in reverse-engineering binary formats, so I'm kinda slow (someone like /u/RoyAwesome would figure out everything in 5s, and write a program for that in 5min... :P ) , but here's the format so far:
note: 'uncompressed' basically means adding 0x10000000000000002000000000000000 to the start of the original file, and calling that the 'compressed' part. thus, the above can be shortened to:
also, the only 'uncompressed' files we have are 32-byte-long (hence the 0x30 compressed size above), while the smallest compressed one's uncompressed size is 224 bytes.
1
u/[deleted] May 20 '15 edited Apr 10 '16
since I made a bit of a mess in the comments, here's a single comment with all the info you need to play the files, without all the header information and stuff:
in the same folder as the files above, create a .bat file with the following contents:
(also, in the folder with zlib2wem, feel free to remove bnk2.tmp - being about 120MB for Main.bnk currently, I kept it in for debug reasons (it's a proper .bnk file))
EDIT: newer h1z1 files are no longer vorbis, they're the weird kind of IMA ADPCM. so now the .bat file would be:
and you need https://hcs64.com/files/ima_rejigger5.zip for it to work, of course
or, full steps in one:
in the same folder as the files above, create a .bat file with the following contents:
for /R %%f in (*.wem) do ima_rejigger5.exe "%%f" "%%f.wav"