Page 1 of 6

StarWars Battlefront unpacker / decoder

Posted: Fri Nov 27, 2015 5:39 pm
by daemon1
Modified "FrankElstner's" scripts to unpack StarWars Battlefront:

swbf_dump contains dumper script sw_dumper.py

fb3decoder contains audio conversion script fb3decoder.py

NOTE Don't forget to modify folder names in both scripts!

swbf_cas folder - the old simple extractor, just in case

p.s. old mesh tool is working, audio is extracted properly, updated texture tool included.

Re: StarWars Battlefront .cas unpacker / audio decoder

Posted: Fri Nov 27, 2015 11:15 pm
by JakeGreen
Will you be updating your chunk and mesh tool,itexture tool and 3ds max script once you get the file names complete?

Re: StarWars Battlefront .cas unpacker / audio decoder

Posted: Sat Nov 28, 2015 8:04 am
by daemon1
JakeGreen wrote:your chunk and mesh tool,itexture tool and 3ds max script
These were done by somebody else. Ask them. I just see that nobody still made an extractor and did this quick solution. I can look into that though, if you explain what are you talking about.

Re: StarWars Battlefront .cas unpacker / audio decoder

Posted: Sat Nov 28, 2015 8:59 am
by JakeGreen
daemon1 wrote:
JakeGreen wrote:your chunk and mesh tool,itexture tool and 3ds max script
These were done by somebody else. Ask them. I just see that nobody still made an extractor and did this quick solution. I can look into that though, if you explain what are you talking about.
Ah i got your name and his mixed up oops lol anyways here is what i'm talking about

viewtopic.php?f=33&t=13145

and here is a mesh and chunk tool that worked with the beta and most likely would with the main game if not i can edit it to possible work with it.

https://dl.dropboxusercontent.com/u/881 ... 20tool.rar

Re: StarWars Battlefront .cas unpacker / audio decoder

Posted: Sat Nov 28, 2015 9:47 am
by daemon1
All these tools may be working already. At least nothing was changed in sound format, only .CAS structure itself.

Re: StarWars Battlefront .cas unpacker / audio decoder

Posted: Sat Nov 28, 2015 7:58 pm
by JakeGreen
daemon1 wrote:All these tools may be working already. At least nothing was changed in sound format, only .CAS structure itself.
Um a few people tried the itexture and 3ds max script and they both either don't work or give errors when you try to use them with the beta stuff.

Re: StarWars Battlefront .cas unpacker / audio decoder

Posted: Sat Nov 28, 2015 8:02 pm
by michalss
daemon1 wrote:Here's the very first and quick solution.

Just use swbf_cas.exe on any .cas file and it will unpack it to 1000's of chunks without names. If some of them will be audio chunks, they'll have .EXA extension.

Then you can decode them with my decoder (latest version included).

Later I plan to check the new sb/toc format to have proper filenames.

Can you please share structure of cas files ? Im highly interested about this... Thx

Re: StarWars Battlefront .cas unpacker / audio decoder

Posted: Sat Nov 28, 2015 9:02 pm
by daemon1
michalss wrote:Can you please share structure of cas files ? Im highly interested about this... Thx
Sure. The structure is relatively simple. The trick with frostbyte engine is in sb/toc files that are much more complex. But CAS files are basically all unnamed chunks packed together, and its structure is changing a bit from game to game. What exactly would you like to know?

Re: StarWars Battlefront .cas unpacker / audio decoder

Posted: Sun Nov 29, 2015 9:29 pm
by daemon1
Good news. The modified Frank's python script is working, and it unpacks all the sounds with proper names. I only need to check it a little more. I think tomorrow it will be ready.

Re: StarWars Battlefront .cas unpacker / audio decoder

Posted: Sun Nov 29, 2015 9:33 pm
by JakeGreen
daemon1 wrote:Good news. The modified Frank's python script is working, and it unpacks all the sounds with proper names. I only need to check it a little more. I think tomorrow it will be ready.
Will it extract .mesh files with proper names and textures like this t_hero_jedi_darthvader_body_c e6fbd4c48ccd094f 0b000000010000000000000000000000.unknownres 6bde20ba ?

Re: StarWars Battlefront .cas unpacker / audio decoder

Posted: Sun Nov 29, 2015 9:38 pm
by daemon1
It extracts files like

meshp_chunk_generic_01_mesh d37b9d34210486c3 5003000000000000380000009000c000.mesh

t_metalchunk_01_s 7c6f454767c46a27 0b000000010000000000000000000000.unknownres 6bde20ba

Re: StarWars Battlefront .cas unpacker / audio decoder

Posted: Sun Nov 29, 2015 9:53 pm
by michalss
daemon1 wrote:
michalss wrote:Can you please share structure of cas files ? Im highly interested about this... Thx
Sure. The structure is relatively simple. The trick with frostbyte engine is in sb/toc files that are much more complex. But CAS files are basically all unnamed chunks packed together, and its structure is changing a bit from game to game. What exactly would you like to know?
I would like to understad the format and make repacker for F3 games... Im kind of person who makeing repacker for complicated games/engines :) F3 is one of them...

Re: StarWars Battlefront .cas unpacker / audio decoder

Posted: Mon Nov 30, 2015 4:10 pm
by daemon1
michalss wrote:I would like to understad the format and make repacker for F3 games... Im kind of person who makeing repacker for complicated games/engines :) F3 is one of them...
Ok, but as I said, format changes from game to game, and you need to start from something. In addition to Frank's scripts there's DAI tools opensource project, so if you know Python or C#, it will be easier for you to start with these. Yet, DAI tools developers are still unable to unpack CAS chunks properly, although I told them how to do that.

Re: StarWars Battlefront unpacker / audio decoder

Posted: Mon Nov 30, 2015 5:51 pm
by daemon1
The first version of python scripts are here in the title post.

Re: StarWars Battlefront unpacker / audio decoder

Posted: Mon Nov 30, 2015 8:50 pm
by nilentry
I've followed the instructions and changed the file paths accordingly for the swbf_dump script, yet all I'm getting are empty folders in the dump directory. The console is simply spewing "chunk not found ...", and I've let it run for about thirty minutes now to see if maybe it was just missing some files.

It also prints the correct path to the file it would have created, such "C:\BattlefrontDump/bundles/ebx/characters/imperial/hero_jedi_darthvader/texture/t_hero_jedi_darthvader_glove_n.ebx", yet upon inspection, the file does not exist.