XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Mon Mar 27, 2017 9:20 pm

All times are UTC + 1 hour


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 83 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next
Author Message
 Post subject: Re: StarWars Battlefront unpacker / decoder
PostPosted: Sat Apr 16, 2016 12:37 pm 
Offline
double-veteran
double-veteran

Joined: Tue Mar 24, 2015 8:12 pm
Posts: 1062
Has thanked: 14 times
Have thanks: 426 times
johnathon wrote:
Presumably by commenting out the other cat path definitions?


Yes, and the same answer is for "XP" packs, the script only takes CAT files its told to. So by replacing the paths to those of expansion packs, you should be able to dump it too, though I'm not sure.

There's also a project by elementofprgress user here viewtopic.php?f=10&t=13702 who tried to dump all data, including patches, you can check it too, while it had some problems with texture mips overwtiting main textures, it may be better in something.


Top
 Profile  
 
 Post subject: Re: StarWars Battlefront unpacker / decoder
PostPosted: Sun Apr 17, 2016 2:42 pm 
Offline
ultra-n00b

Joined: Wed Apr 06, 2016 5:20 pm
Posts: 3
Has thanked: 0 time
Have thanks: 0 time
daemon1 wrote:
johnathon wrote:
Presumably by commenting out the other cat path definitions?


Yes, and the same answer is for "XP" packs, the script only takes CAT files its told to. So by replacing the paths to those of expansion packs, you should be able to dump it too, though I'm not sure.


Ah, of course. I didn't notice that the xp cats weren't included in the script.

So I ran the script again and kept an eye on the memory usage as it went. It worked as you'd expect for quite a while. Usage would go up by around 20MB while processing a chunk, and then decrease before moving onto the next chunk. However when it gets to a specific chunk (2550ad6e0c4d281384a6bf767bb7a959.chunk in Patches/chunk0.toc), it gets stuck and the memory usage keeps on growing until the process runs out of memory. So it looks like it isn't a memory leak, but instead a specific chunk is throwing it off. Surely the chunk can't be that big?

Update: I checked the chunk size in the cat and it says it's only 11132419 bytes...


Top
 Profile  
 
 Post subject: Re: StarWars Battlefront unpacker / decoder
PostPosted: Sun Apr 17, 2016 3:05 pm 
Offline
double-veteran
double-veteran

Joined: Tue Mar 24, 2015 8:12 pm
Posts: 1062
Has thanked: 14 times
Have thanks: 426 times
Yes, must be something wrong with this chunk, but I can't check it, because I don't have this CAS file. So I can only suggest you skipping it for now. With a code like this maybe:

Code:
    for entry in toc.chunks:
        if hexlify(entry.id)=="2550ad6e0c4d281384a6bf767bb7a959" : continue


p.s. maybe its some problem in decompression routine...


Top
 Profile  
 
 Post subject: Re: StarWars Battlefront unpacker / decoder
PostPosted: Sun May 22, 2016 1:46 am 
Offline
veteran

Joined: Sun Aug 22, 2010 10:14 pm
Posts: 145
Has thanked: 33 times
Have thanks: 8 times
So i've been holding onto this for awhile and since the original devs have from what i can tell no use to ever finish it here you guys go.

This tool only works with the Alpha build of the game so remember that.

The tool was edited from the Dragon Age inquisition mod tool or DAI_Tool by danielmm8888,PistonMiner and me Corra_Ashu/JakeGreen edited a couple small things after they gave it to me, the tool can easily be decompiled as that is how they originally was able to edit this tool and get it working with SWBF.

The reason for the release of this now is cause SWBF is getting harder and harder to extract stuff from and for some reason the scripts posted here aren't getting out everything from the latest updates cause it errors very close to the end of finishing and this tool here if someone was to decompile it and edit it to work with the main game then we wouldn't have to extract 30 plus gigs or more to our hard drives when we want say a new hero,villain or weapon released to this game.

This tool also can support sound extraction but atm it's not working properly in the tool and i think it's an easy fix i just don't know enough on that end to fully fix it.

There are 2 versions of the the tool one that is called SRGB which is the textures as DICE made them pre-shaders and then No SRGB which is basically DICE's PBR baked into the texture to make it brighter, i suggest using the SRGB one as it's the original textures that DICE used pre-shaders and much nicer.

You are also going to need 2 tools which i find very useful, First tool would be Visual Studio 2013 to open the dds files extracted from the tool to convert them to PNG and then Xnview to convert them back to dds otherwise without xnview opening the png in photoshop merges the alpha layer in all the RGB channels.

You can find it here https://www.visualstudio.com/en-us/d...studio-vs.aspx

an Xnview here http://www.xnview.com/en/

Finally here is the tool.
http://www.mediafire.com/download/ri5ui ... F_Tool.rar

Here is also a video on how the tool works

https://www.youtube.com/watch?v=MA_O7lw ... e=youtu.be

I really hope someone can edit this tool to work with the main game as it would be a huge help for everyone. Also something cool to note this tool works with Battlefield Hardline well last i check back in August it worked with it, the program errors close to the end of reading all the files but it still shows most of the base models from the game allowing for easy extraction.

Lastly this tool also can support the extraction of bones on the models but since the tool was never finished it doesn't work properly, maybe someone can fix that and make it so you can extract in FBX with bones.


Top
 Profile  
 
 Post subject: Re: StarWars Battlefront unpacker / decoder
PostPosted: Wed Jun 08, 2016 2:48 pm 
Offline
ultra-n00b

Joined: Wed Jun 08, 2016 10:38 am
Posts: 1
Has thanked: 0 time
Have thanks: 0 time
Well, textures from Batch_Itexture are broken
Image


Top
 Profile  
 
 Post subject: Re: StarWars Battlefront unpacker / decoder
PostPosted: Fri Jun 10, 2016 6:04 pm 
Offline
double-veteran
double-veteran

Joined: Tue Mar 24, 2015 8:12 pm
Posts: 1062
Has thanked: 14 times
Have thanks: 426 times
stkopp wrote:
Well, textures from Batch_Itexture are broken


I don't have the game, so if you want me to fix this, provide EBX & chunk files that don't work


Top
 Profile  
 
 Post subject: Re: StarWars Battlefront unpacker / decoder
PostPosted: Mon Jul 25, 2016 1:28 am 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Wed Jul 06, 2011 8:47 am
Posts: 346
Location: Russia
Has thanked: 516 times
Have thanks: 159 times
Your Batch_Itexture_Converter is only working tool I found so far, which can convert textures from NFS Rivals .itexture files.
Especially normal maps.
But it's not fully compatible, it makes wrong (but fixable) headers and requires renaming .itexture to .texture for converting.

So, can I ask you for quick-fix version for NFS Rivals?

Only 2 changes is needed - read .itexture (again) and put correct dimensions to headers:

I already fixed values on this pic, tool output is:
Code:
GUID = 7FB8A1945D4161DAD6A231C7C5C975C5    car_astonmartin_vanquish_2013_internal_d c5518d29ddf4d5af.Texture  1 x 2048
GUID = 8A1A0B99BDF3C8D8F177FA062BF01739    car_astonmartin_vanquish_2013_internal_e 7afe918e22c21d1b.Texture  1 x 256
GUID = BB3F8422F82B91F933DE6DEEB087A1F3    car_astonmartin_vanquish_2013_internal_material da9a0d3980b89b39.Texture  1 x 256
GUID = F4BC0488B115F95CC6341EF68D8764E1    car_astonmartin_vanquish_2013_internal_n 842d55a70b9698d3.Texture  1 x 2048


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.



Top
 Profile  
 
 Post subject: Re: StarWars Battlefront unpacker / decoder
PostPosted: Mon Jul 25, 2016 1:29 am 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Wed Jul 06, 2011 8:47 am
Posts: 346
Location: Russia
Has thanked: 516 times
Have thanks: 159 times
Sample .itexture files attached.


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.



Top
 Profile  
 
 Post subject: Re: StarWars Battlefront unpacker / decoder
PostPosted: Mon Jul 25, 2016 1:47 am 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Wed Jul 06, 2011 8:47 am
Posts: 346
Location: Russia
Has thanked: 516 times
Have thanks: 159 times
Another little bug with "car_astonmartin_vanquish_2013_light_e 062006af8be60dfb.itexture" - compression type detected as 47, but correct is 4D.
Attached .chunk, just in case.

PS: Same thing with "car_astonmartin_vanquish_2013_light_material b1bac978a310c44d.itexture".


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.



Top
 Profile  
 
 Post subject: Re: StarWars Battlefront unpacker / decoder
PostPosted: Mon Jul 25, 2016 7:19 am 
Offline
double-veteran
double-veteran

Joined: Tue Mar 24, 2015 8:12 pm
Posts: 1062
Has thanked: 14 times
Have thanks: 426 times
Ok its not originally my tool, but I can make a version for NFS. They changed layout and compression codes. If one code changed, others may be different too.


Top
 Profile  
 
 Post subject: Re: StarWars Battlefront unpacker / decoder
PostPosted: Mon Jul 25, 2016 11:49 am 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Wed Jul 06, 2011 8:47 am
Posts: 346
Location: Russia
Has thanked: 516 times
Have thanks: 159 times
daemon1 wrote:
Ok its not originally my tool, but I can make a version for NFS. They changed layout and compression codes. If one code changed, others may be different too.

Would be really helpful, thanks!
Original author refuses to help in comments for his tuto on youtube, and his latest version of tool (for SWBF 2015), doesn't detect .itextures or .textures in NFS Rivals dump.


Top
 Profile  
 
 Post subject: Re: StarWars Battlefront unpacker / decoder
PostPosted: Tue Jul 26, 2016 8:13 pm 
Offline
veteran

Joined: Sun Aug 22, 2010 10:14 pm
Posts: 145
Has thanked: 33 times
Have thanks: 8 times
Can someone look at the Dumper script and see if they can edit it cause whenever i start python and start the script with what i have selected it always tells me Patched cat not found and here is what i have.

Code:
#Adjust paths here.
bf4Directory=r"D:\Program Files (x86)\Origin Games\STAR WARS Battlefront"
targetDirectory = r"D:\Mod Files\SWBF\SWBF_Models"


###The following paths do not require adjustments (unless the devs decided to rename their folders). Note that they are relative to bf4Directory.

#As files are not overwritten, the patched files need to be extracted first.
#The script will dump all tocs it can find in these two folders+subfolders:
tocRoot  = r"Patch\win32" #patched and xpack files FIRST
tocRoot2 = r"Data\win32"   #unpatched vanilla files SECOND

#Note: The "Update" tocRoot contains both patch (for vanilla AND xpack) and unpatched xpack files. The reason it still
#      works correctly is because it goes through the folders alphabetically, so the patch comes first.


#Feel free to comment out one or both cats if they don't exist (some Frostbite 2 games shipped without cats).
#Although in that case you could just as well use an invalid path, i.e. not change anything.
cat1Path       = r"Data\Win32\installation\SP\cas.cat"
cat2Path       = r"Data\Win32\installation\MP\cas.cat"
cat3Path       = r"Data\Win32\installation\initialexperience\cas.cat"
cat4Path       = r"Data\Win32\installation\extracontent_01\cas.cat"
cat5Path       = r"Patch\Win32\installation\SP\cas.cat"
cat6Path       = r"Patch\Win32\installation\MP\cas.cat"     
cat7Path       = r"Patch\Win32\installation\extracontent_01\cas.cat"
cat8Path       = r"Patch\Win32\xp0\xp0\cas.cat"
cat9Path       = r"Patch\Win32\xp1\xp1\cas.cat"
cat10Path       = r"Patch\Win32\xp2\xp2\cas.cat"
#cat8Path       = r"Update\Xpack0\Data\Win32\xp0\xp0"
#cat9Path       = r"Patch\Win32\installation\sp\cas.cat"
updateCatPath = r"Update"


Top
 Profile  
 
 Post subject: Re: StarWars Battlefront unpacker / decoder
PostPosted: Tue Aug 16, 2016 3:57 pm 
Offline
ultra-n00b

Joined: Tue Aug 16, 2016 7:17 am
Posts: 1
Has thanked: 2 times
Have thanks: 0 time
Hi!

First: I'm new to most of this, so apologies if I ask anything ignorant (and please direct me to places to learn for myself, if it's easier).

Second: I want to get the head & body mesh etc for the characters in this game. I've run the first python script and gotten my dump folders ("Bundles, Chunks, EDX"), but am stuck after that. Any help would be much appreciated


Top
 Profile  
 
 Post subject: Re: StarWars Battlefront unpacker / decoder
PostPosted: Fri Aug 26, 2016 1:44 am 
Offline
veteran

Joined: Sun Aug 22, 2010 10:14 pm
Posts: 145
Has thanked: 33 times
Have thanks: 8 times
Okay so the script on this page is messing up a lot now it's not finding the proper chunk files for basic textures that were once working like helmets for the stormtroopers and a lot of character msr and normal maps and making them really small file size (under 100kb) when they should be in the range of 2mb to 5mb.

Dice must of changed something in the files for the textures, is there anyway someone can take a look at the script and possible fix it,cause i did and i've tried to fix it and nothing i've done has worked.


Top
 Profile  
 
 Post subject: Re: StarWars Battlefront unpacker / decoder
PostPosted: Sat Aug 27, 2016 3:59 pm 
Offline
ultra-n00b

Joined: Sun Aug 14, 2016 4:00 am
Posts: 5
Has thanked: 0 time
Have thanks: 0 time
JakeGreen wrote:
Okay so the script on this page is messing up a lot now it's not finding the proper chunk files for basic textures that were once working like helmets for the stormtroopers and a lot of character msr and normal maps and making them really small file size (under 100kb) when they should be in the range of 2mb to 5mb.

Dice must of changed something in the files for the textures, is there anyway someone can take a look at the script and possible fix it,cause i did and i've tried to fix it and nothing i've done has worked.


I'm having the same problem. I'm not sure if it's putting the wrong mip data in the chunk file, or if the correct data is getting pulled, but the hex identity in the texture file is wrong and pointing to the wrong chunk file. I guess it's possible that the correct image data is in a different chunk, but I'm not sure how to figure out which one it might be. As it is now, the DDS header end up with the wrong image size data, and had to be hex edited manually to even open up the incorrect smaller mip.

Unfortunately I can't see the pattern as far as which images get pulled correctly, and which ones are undersized, with incorrect erroneous header data.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 83 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: Yahoo [Bot] and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group