Join also our Discord channel! Click here.

StarWars Battlefront unpacker / decoder

The Original Forum. Game archives, full of resources. How to open them? Get help here.
elementofprgress
n00b
Posts: 12
Joined: Wed Dec 09, 2015 7:48 pm
Has thanked: 1 time
Been thanked: 4 times

Re: StarWars Battlefront unpacker / audio decoder

Post by elementofprgress » Wed Dec 09, 2015 8:19 pm

I have a working dumper script that includes the new patched cas.cat format. I got something like 132k audio files with it. Can't remember if any chunks are cas dependent so if it makes a difference for not. For ebx and res files it certainly does.

I'll post it once I clean it up a little. Right now it is kinda messy and super...not optimized because I was trying to break it down to figure out why the data I get is different then what is experienced in the game/patch notes.


As for the changes with textures. I have only taken a quick peak but it looks like the chunk files need some xor love and then will be good to go.
https://gyazo.com/f24d71c98c46cf95e9ebca991b225030
Symthic.com - elementofprgress
Skype: elementofprgress

kkhaial
ultra-n00b
Posts: 2
Joined: Tue Jul 28, 2015 9:20 am
Has thanked: 4 times

Re: StarWars Battlefront unpacker / audio decoder

Post by kkhaial » Thu Dec 10, 2015 8:10 am

elementofprgress if you can get textures to work that would be awesome

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2274
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 54 times
Been thanked: 1901 times

Re: StarWars Battlefront unpacker / audio decoder

Post by daemon1 » Thu Dec 10, 2015 9:18 pm

I thought somebody already did the textures convertor. I'm not an expert, but nothing is xored here. Sample output:

Image

And here's the version of "dainazinas" tool I made that at least unpacks most of the diffuse textures. Just need some time to find codes for normal maps.

http://www60.zippyshare.com/v/90AbbsOu/file.html

JakeGreen
mega-veteran
mega-veteran
Posts: 163
Joined: Sun Aug 22, 2010 10:14 pm
Has thanked: 39 times
Been thanked: 11 times

Re: StarWars Battlefront unpacker / audio decoder

Post by JakeGreen » Fri Dec 11, 2015 6:31 am

daemon1 wrote:I thought somebody already did the textures convertor. I'm not an expert, but nothing is xored here. Sample output:

Image
Awesome worked perfectly, even some of the normal maps worked like the ones that are blue.

Next all we need is for someone to edit his 3ds max script and we got everything working.

EDIT: I found a lot of Diffuse Textures not working still so what you wanna do is this.

Open up the non-working C or CS texture into your hex editor of choice and highlight the first 9 rows of hex, the last line should have a "c" (no quotes) in it and you wanna make sure you get the very last dot in the 9th line and hold it there.

Once you do that open up a texture in your hex editor that has a G in place of the C and copy all 9 lines to the last dot and go back to your main texture that isn't working and make sure you still have it all selected and hit paste and save an it should be good to go.\

Also from what i'm looking at this is BC7 without SRGB so if you wanna add back the SRGB find a diffuse texture that works and do the same above and it wont make the texture so bright. I used a MSR texture to do this so that's why it's only BC7.

Also lastly if you want the textures to work i found loading them into VS 2013 and save it as PNG then load it into a program like Xnview and just save it as DDS and it should be great.

Or you can take and on the 9th line change the 63 to 48 and it will be good to go.

Not working.
Image

Working.
Image

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2274
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 54 times
Been thanked: 1901 times

Re: StarWars Battlefront unpacker / audio decoder

Post by daemon1 » Fri Dec 11, 2015 5:00 pm

JakeGreen wrote:EDIT: I found a lot of Diffuse Textures not working still
This is because I only had a little time to find 3 most used compression types: bc1, bc3 & bc7. Also I understand that 62 should be used, not 63?

Anyway, I only have a very few textures unpacked from the files you sent me, so if you know which codes I need to use for which texture types (byte 12 in "unknownres" file), let me know and I will correct the tool.

I'm currently setting it to
63 (bc7) for 42
47 (bc1) for 36
4D (bc3) for 3C
and 63 for all other types.

Also I can remove the picture from it, so it will be small to upload here on xentax directly.

JakeGreen
mega-veteran
mega-veteran
Posts: 163
Joined: Sun Aug 22, 2010 10:14 pm
Has thanked: 39 times
Been thanked: 11 times

Re: StarWars Battlefront unpacker / audio decoder

Post by JakeGreen » Fri Dec 11, 2015 8:35 pm

daemon1 wrote:
JakeGreen wrote:EDIT: I found a lot of Diffuse Textures not working still
This is because I only had a little time to find 3 most used compression types: bc1, bc3 & bc7. Also I understand that 62 should be used, not 63?

Anyway, I only have a very few textures unpacked from the files you sent me, so if you know which codes I need to use for which texture types (byte 12 in "unknownres" file), let me know and I will correct the tool.

I'm currently setting it to
63 (bc7) for 42
47 (bc1) for 36
4D (bc3) for 3C
and 63 for all other types.

Also I can remove the picture from it, so it will be small to upload here on xentax directly.
Yep those are all the ones i've found, kinda odd cause some of the textures that was BC7_SRGB in the alpha and beta are now BC1_SRGB.

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2274
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 54 times
Been thanked: 1901 times

Re: StarWars Battlefront unpacker / audio decoder

Post by daemon1 » Sat Dec 12, 2015 9:25 am

Proceeding with types. The skyes are in BC6, 8192x2048

Image

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2274
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 54 times
Been thanked: 1901 times

Re: StarWars Battlefront unpacker / audio decoder

Post by daemon1 » Sat Dec 12, 2015 4:43 pm

About the Frostbite restypes: they are just a hash of their real names, as expected, and

6bde20ba = "Texture",

5C4954A6 = "DxTexture",
2D47A5FF is not "gfx", but "SwfMovie",
49B156D4 is not "mesh", but "meshset", so on.

elementofprgress
n00b
Posts: 12
Joined: Wed Dec 09, 2015 7:48 pm
Has thanked: 1 time
Been thanked: 4 times

Re: StarWars Battlefront unpacker / audio decoder

Post by elementofprgress » Sat Dec 12, 2015 7:04 pm

daemon1 wrote:About the Frostbite restypes: they are just a hash of their real names, as expected, and

6bde20ba = "Texture",

5C4954A6 = "DxTexture",
2D47A5FF is not "gfx", but "SwfMovie",
49B156D4 is not "mesh", but "meshset", so on.
A few months ago I got a resTypes list for BF4 from Frankelstner, who got it from Kiwidog or NoFate...I forget. anyways, you probably already have it all figured out but figure I'd post it so it is out there for everyone.
http://pastebin.com/sQE1Rmh2

What I'm currently using for my SWBF
http://pastebin.com/hifAvG4f
If you have any updated resTypes or something is wrong, let me know. I've only barely looked into it.

daemon1 wrote:I thought somebody already did the textures converter. I'm not an expert, but nothing is xored here.
Awesome!, I remember when the beta came out things changed. I was never sure if it was some compression or xor or some sort or if they just jumped to dx10 textures....which I know absolutely zero about lol

I remember seeing dainazinas texture batch converter and it not working after the beta and failing miserably at tinkering with the source.
Symthic.com - elementofprgress
Skype: elementofprgress

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2274
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 54 times
Been thanked: 1901 times

Re: StarWars Battlefront unpacker / audio decoder

Post by daemon1 » Sat Dec 12, 2015 7:41 pm

elementofprgress wrote:If you have any updated resTypes or something is wrong, let me know.
Sure:

0xf04f0c81:".Dx11ShaderProgramDatabase",
    0x9C4FAA17:".HeightfieldDecal"
0x957C32B1:".AtlasTexture",
0xC6CD3286:".EnlightenStaticDatabase",
0xA23E75DB:".TerrainLayerCombinations",
0xE36F0D59:".HavokClothPhysicsData",
    0x6BDE20BA:".Texture",
0x9D00966A:".UITtfFontFile",
0xC611F34A:".MeshEmitterResource",

Here's all your unknown types, if you have something else unknown, let me know.

elementofprgress
n00b
Posts: 12
Joined: Wed Dec 09, 2015 7:48 pm
Has thanked: 1 time
Been thanked: 4 times

Re: StarWars Battlefront unpacker / audio decoder

Post by elementofprgress » Sat Dec 12, 2015 10:11 pm

daemon1 wrote:
elementofprgress wrote:If you have any updated resTypes or something is wrong, let me know.
Sure:

0xf04f0c81:".Dx11ShaderProgramDatabase",
    0x9C4FAA17:".HeightfieldDecal"
0x957C32B1:".AtlasTexture",
0xC6CD3286:".EnlightenStaticDatabase",
0xA23E75DB:".TerrainLayerCombinations",
0xE36F0D59:".HavokClothPhysicsData",
    0x6BDE20BA:".Texture",
0x9D00966A:".UITtfFontFile",
0xC611F34A:".MeshEmitterResource",

Here's all your unknown types, if you have something else unknown, let me know.
Thank you, I just wanted to make sure that the resType list I use for the extraction scripts I write for symthic match with the resTypes your tools use.

I'm hoping I'll be able to share the file extraction script I've been working on. I know I'm able to pull all the EBX files(as they were my main concern), but those are all cas entries. I'm putting it though its paces to see if there are any noncas res/chunks or if any changes are need to get at them. As well has scanning for any more unknown res types that exist.
Symthic.com - elementofprgress
Skype: elementofprgress

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2274
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 54 times
Been thanked: 1901 times

Re: StarWars Battlefront unpacker / audio decoder

Post by daemon1 » Sun Dec 13, 2015 11:06 am

elementofprgress wrote:I'm hoping I'll be able to share the file extraction script I've been working on.
What's the purpose of your script? How is it different from Frank's script that I posted here in this thread?

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2274
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 54 times
Been thanked: 1901 times

Re: StarWars Battlefront unpacker / audio decoder

Post by daemon1 » Sun Dec 13, 2015 1:04 pm

Texture conversion tool updated!

Included in the first post. Now it must convert all types including normals. It makes DDS in dx10 format, it can be viewed with PicoPixel viewer recommended by dainazinas. Even that tool is not working with height maps, and some other types, for those use something else. Only first side extracted for cubemaps, but I doubt anyone needs that.

Dumper script updated with res types. Textures will now have ".Texture" extension.

elementofprgress
n00b
Posts: 12
Joined: Wed Dec 09, 2015 7:48 pm
Has thanked: 1 time
Been thanked: 4 times

Re: StarWars Battlefront unpacker / audio decoder

Post by elementofprgress » Sun Dec 13, 2015 3:55 pm

daemon1 wrote:
elementofprgress wrote:I'm hoping I'll be able to share the file extraction script I've been working on.
What's the purpose of your script? How is it different from Frank's script that I posted here in this thread?
It is built off of Frankelstner's script. It is mostly small tweaks. Lots of cleaning. A lot of the main script isn't used/needed anymore. Though other areas are much messier to compensate. There are no flags labeling what is cas, noncas, a delta patch, etc anymore.

but the really big difference is that your script is only pulling files from the Data folder which is the patched folder(the base files). Which i'm sure you know from playing with the scripts and files but for the sake of anyone who doesn't the files in the Patch folder are the files the game mostly relies on. Though the patch folder is where things get tricky. A different format for the cat file. Yay delta patching and sha1 entries -.- The sb/tocs just throw everything at you with no way to identify whats a duplicate, what is gonna be patching something. You kinda just have to run it all though and see what sticks. Then the Update folder(which the patch folder used to be in) adds all the stuff from Jakku DLC but is also subject to patching from the patch files.


However, I haven't look into the chunks all that much(mainly because there are WAY to many) so I'm not sure how big of a difference getting patch files will make when it comes to audio and textures other then DLC stuff. How many audio files total have you been able to pull with just info from the data folder?
Symthic.com - elementofprgress
Skype: elementofprgress

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2274
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 54 times
Been thanked: 1901 times

Re: StarWars Battlefront unpacker / audio decoder

Post by daemon1 » Sun Dec 13, 2015 6:36 pm

elementofprgress wrote:There are no flags labeling what is cas, noncas, a delta patch, etc anymore.
As far as I can see, there's no noncas chunks or resources in this game. Everything is in CAS files.
elementofprgress wrote:How many audio files total have you been able to pull with just info from the data folder?
I don't have the game, so I don't know.

I have all small files (sb/toc, etc) and only the first cas_01.cas files from the whole set. But considering the size of chunks extracted from these, everything is extracted. The script goes through all sb/toc files, including the patch folder.

Also, by simple logic, since the whole patch folder is so small, it just can't hold any significant amount of chunk data (sounds or textures, or anything). The patch probably changes levels or some other game properties, but not the original audio/visual content.

At least thats how it was in other games that I had full size (Dragon age, Battlefield HL)

Post Reply