TFC File Decompression

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Daredust
Posts: 5
Joined: Fri Mar 06, 2020 5:41 pm

TFC File Decompression

Post by Daredust »

Hello everyone

I'm a bit lost and am hoping to find someone who can help me out with this.
The developers for the game SMITE recently made changes to the way the game is structured and compressed. (They switched to oodle compression)
With the help of gildor it is possible again to extract models and such with umodel, but all textures are stored externally in TFC files. Now, the extraction of those TFC files didn't work with umodel before the update either, meaning it needed to be done manually with the TFC extractor tool by daemon1: https://forum.xentax.com/viewtopic.php?f=18&t=16033
Unfortunately the tool doesn't work anymore and I'm not sure why (most likely because they are compressed differently).
I attached a TFC file from before the update which can be extracted with that tool and one from the current version with the new compression that doesn't work anymore. I also attached the oo2core_7_win64.dll from the SMITE game files, hoping that it might help.

Are the TFC files compressed with oodle as well? If so, how would I go about decompressing them?

Thank you very much in advance for the help <3
Cheers
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: TFC File Decompression

Post by aluigi »

The data from offset 0x30 is definitely oodle and decompression works.
You can even use quickbms for the job if you prefer. I'm not perfectly familiar with the format but I made a raw decompressor for your tests:
http://aluigi.org/bms/ue_tfc_oodle.bms
Daredust
Posts: 5
Joined: Fri Mar 06, 2020 5:41 pm

Re: TFC File Decompression

Post by Daredust »

aluigi wrote:The data from offset 0x30 is definitely oodle and decompression works.
You can even use quickbms for the job if you prefer. I'm not perfectly familiar with the format but I made a raw decompressor for your tests:
http://aluigi.org/bms/ue_tfc_oodle.bms


Thank you very much. Sorry for not seeing this sooner, but I didn't receive a notification that there was a reply to my post.
I don't quite understand what the output of your bms script is. I get multiple files with different sizes. Is that just raw texture data I have to figure out the corresponding format?
I would appreciate if you could help me with that, in case you know about texture data formats. I assume they're DDS textures, and appending .dds to the output files obviously doesn't work ;)
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: TFC File Decompression

Post by aluigi »

Honestly I don't know. I simply dumped the content referenced in the file.
Maybe take a look at the other topics related to uasset, uexp, umodel and similar keywords
Daredust
Posts: 5
Joined: Fri Mar 06, 2020 5:41 pm

Re: TFC File Decompression

Post by Daredust »

aluigi wrote:Honestly I don't know. I simply dumped the content referenced in the file.
Maybe take a look at the other topics related to uasset, uexp, umodel and similar keywords


Alright, no problem. Being able to decompress the files is already a huge step forward for me, so I thank you a lot for that :)
Daredust
Posts: 5
Joined: Fri Mar 06, 2020 5:41 pm

Re: TFC File Decompression

Post by Daredust »

Daredust wrote:
aluigi wrote:Honestly I don't know. I simply dumped the content referenced in the file.
Maybe take a look at the other topics related to uasset, uexp, umodel and similar keywords


Alright, no problem. Being able to decompress the files is already a huge step forward for me, so I thank you a lot for that :)

Turns out they were indeed raw DDS texture data and only needed an appropriate header. Your bms script works like a charm! :D
ERenfro
Posts: 1
Joined: Thu Apr 23, 2020 2:50 am

Re: TFC File Decompression

Post by ERenfro »

Hey, you can't leave without sharing the solution with everyone! We're dieing for it!

How do you add the DDS header to these raw files?
MrBalrog
Posts: 1
Joined: Thu Apr 30, 2020 12:15 am

Re: TFC File Decompression

Post by MrBalrog »

I would like to know this aswell :|

Been looking for a way to rip the new textures since .tfc updated and being only one step away yet not knowing how to finish it is a bit frustrating.
Daredust
Posts: 5
Joined: Fri Mar 06, 2020 5:41 pm

Re: TFC File Decompression

Post by Daredust »

Sorry everyone I forgot about this thread. I used the raw texture converter by daemon: viewtopic.php?f=7&t=7099
Should be self-explanatory from there :D
GoblinKing
Posts: 1
Joined: Mon May 04, 2020 8:24 pm

Re: TFC File Decompression

Post by GoblinKing »

Daredust wrote:Sorry everyone I forgot about this thread. I used the raw texture converter by daemon: viewtopic.php?f=7&t=7099
Should be self-explanatory from there :D


Sup, i've been looking for the last 2 hours how to extract smite models, it was very easy to do it before the "file system" change 2-3 months ago (it was just about telling Umodel to get the upk and decompress to psk and psa, plus all textures in TGA) but now im having a headache with the texture files stored inside those massive .TFC files.

I did exactly everything you guys said in this topic:

1- Get your smite .TFC file, place everything inside one folder, use Quickbms then the script made by aluigi.
2- You get tons of raw files like:
ChartexturesHighRes0_01
ChartexturesHighRes0_02
ChartexturesHighRes0_03
ChartexturesHighRes0_04 and so on... HUNDREDS if not thousands.

3- Drag and drop each file to the "raw texture cooker" made by id-deamon then it automatically converts the raw file to .DDS format, problem solved.

But... this is extremly time consuming, i mean i have to drag and drop hundreds of files one at a time, is there any way to do the same process with all the files at once? i've already tried selecting like 50 files and drop them to the raw texture cooker but it doesn't work like that, anyway Thx for sharing this info, at least we can still rip smite files eventho it takes much more time.
herossin
Posts: 1
Joined: Mon Dec 07, 2020 6:42 pm

Re: TFC File Decompression

Post by herossin »

GoblinKing wrote:is there any way to do the same process with all the files at once?

As a matter of fact, you can. I did it with some simple PowerShell. I'm sure you can do this in other languages, but I thought of PS first.

I ran this on the folder where I extracted all the Smite textures using Quickbms

Code: Select all

Get-ChildItem -File E:\SMITE_textures\ | ForEach {E:\RawTex\RawtexCmd.exe $_.fullname BC1}

I can't say it worked for 100% of the textures, but from what I can tell all the character textures are fine at the very least.

Edit:
It's worth noting that this took about 2-3 hours to get through all 90k or so files, but that's if you extracted all textures from every TFC file