login

Author Topic: Common.bnk  (Read 245 times)

Newmodder

  • Member
  • **
  • Posts: 8
    • View Profile
    • Awards
Common.bnk
« on: August 07, 2017, 01:19:16 PM »
Hi forums!

How does one extract sounds from common.bnk?

Ok so before anybody shouts at me, yes i know there are links with extracted common.bnk file. But i want to learn to extract them myself. How would i do?

Thanks!

Gistech

  • Imperial Shock Trooper
  • Moderators
  • This Man Has No Life
  • ****
  • Posts: 1742
  • Awards Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
  • PSN: ggctuk
  • Steam ID:
Re: Common.bnk
« Reply #1 on: August 08, 2017, 05:03:51 AM »
The way SWBF2's common.bnk was extracted was that somebody loaded the raw data into Audacity. From there you'll have to pick apart the sounds manually.
Works in Progress:
--Star Wars: Battlefront Legacy (Phase 1 released - Phase 2 in development, base game due 2017)

RepComm

  • Internet Addict
  • *****
  • Posts: 2492
  • Yeah, I painted that!
  • Awards Award for extensive modding contributions and/or donations to TWD Battlefront ICW2 Participant
    • View Profile
    • Awards
Re: Common.bnk
« Reply #2 on: August 08, 2017, 06:31:07 AM »
I'd be willing to bet that the format would be simple enough to crack with a hex editor.. my guess is a series of sample lengths and then the full sound samples all crushed together with no spacing. I'll have a look later.

Newmodder

  • Member
  • **
  • Posts: 8
    • View Profile
    • Awards
Re: Common.bnk
« Reply #3 on: August 08, 2017, 12:19:47 PM »
Thanks guys!

The way SWBF2's common.bnk was extracted was that somebody loaded the raw data into Audacity. From there you'll have to pick apart the sounds manually.

So should i either:

A. import the .bnk directly into audacity?

or

B. extract the file then load it into audacity, if so is there a tool i can use?

RepComm

  • Internet Addict
  • *****
  • Posts: 2492
  • Yeah, I painted that!
  • Awards Award for extensive modding contributions and/or donations to TWD Battlefront ICW2 Participant
    • View Profile
    • Awards
Re: Common.bnk
« Reply #4 on: August 08, 2017, 02:08:14 PM »
There isn't a tool that I know of, but I was suggesting the creating of a tool. I'm going to be messing with it when I get to some other tools after work.

If you're itching to do it now, you'll have to use Audacy and choose RAW import. I've tried it a few times in the past with minimal success as I didn't know the encoding (endian-ness) or bit rate ( I think it's documented in some modding sound guide by psyc0fred)

SleepKiller

  • Co-Admin
  • Internet Addict
  • ****
  • Posts: 2072
  • Awards To recognize Modders that make a most excellent contribution within the Month Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
  • Steam ID:
Re: Common.bnk
« Reply #5 on: August 08, 2017, 08:10:38 PM »
Here's the basic structure of a sound bank chunk from what I observed the other day. I didn't go much deeper than this, but maybe this knowledge can help someone. (Or more specifically maybe it can help Newmodder and RC to some extent.)

-Parent Chunk
   -Data chunk holding the metadata for the sounds in the bank. Their hashed name, sampling rate, etc. Loading this into Audacity will probably make it yell at you.
   -Data chunk holding the sound data itself. This is what you can likely load up and read from Audacity.

If you want an easy way to get the contents of the second data chunk you can use this swbf-unmunge Explode mode.

Newmodder

  • Member
  • **
  • Posts: 8
    • View Profile
    • Awards
Re: Common.bnk
« Reply #6 on: August 11, 2017, 11:19:38 AM »
Ok sleepkiller,

If i dont care about the names of the audio, i just want to import it i assume i use explode and assemble like you said. if so how do i use it?

Also Will the sampling rate make a difference?

Gistech

  • Imperial Shock Trooper
  • Moderators
  • This Man Has No Life
  • ****
  • Posts: 1742
  • Awards Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
  • PSN: ggctuk
  • Steam ID:
Re: Common.bnk
« Reply #7 on: August 12, 2017, 06:58:11 AM »
Sounds in the original games are stored in a number of different sampling formats ranging from 11kHz to 44kHz.

When I needed to extract the SWBF common.bnk, I used a command-line tool that was released on this thread: http://zenhax.com/viewtopic.php?f=6&t=2268

I can't guarantee this will work with SWBF2's common.bnk, though. If it doesn't, your best bet is to make a thread on ZenHax and ask the creator of the tool to see if he would be willing to upgrade it to extract from SWBF2's common.bnk.
Works in Progress:
--Star Wars: Battlefront Legacy (Phase 1 released - Phase 2 in development, base game due 2017)

SleepKiller

  • Co-Admin
  • Internet Addict
  • ****
  • Posts: 2072
  • Awards To recognize Modders that make a most excellent contribution within the Month Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
  • Steam ID:
Re: Common.bnk
« Reply #8 on: August 12, 2017, 08:53:13 PM »
Ok sleepkiller,

If i dont care about the names of the audio, i just want to import it i assume i use explode and assemble like you said. if so how do i use it?
You follow the link and learn how to explode the ucfb files. Beyond that I've posted pretty much all I know about this. I can be of no further help I am afraid.

Newmodder

  • Member
  • **
  • Posts: 8
    • View Profile
    • Awards
Re: Common.bnk
« Reply #9 on: August 13, 2017, 10:39:13 AM »
so i type this:

swbf-unmunge -file common.bnk -mode "explode"  ;)

SleepKiller

  • Co-Admin
  • Internet Addict
  • ****
  • Posts: 2072
  • Awards To recognize Modders that make a most excellent contribution within the Month Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
  • Steam ID:
Re: Common.bnk
« Reply #10 on: August 13, 2017, 07:48:11 PM »
so i type this:

swbf-unmunge -file common.bnk -mode "explode"  ;)
Test it and find out! Your best bet for being able to do this is learning how to problem solve in relation to stuff like this.