Important information: this site is currently scheduled to go offline indefinitely by end of the year.

Far Cry 5 .Fat and .Dat Files

The Original Forum. Game archives, full of resources. How to open them? Get help here.
Alexxxxxxx
ultra-n00b
Posts: 5
Joined: Wed Feb 01, 2017 11:44 pm

Re: Far Cry 5 .Fat and .Dat Files

Post by Alexxxxxxx »

volfin wrote: I literally just used the same version on 1.07 yesterday, worked 100% fine.
Sorry. I already figured out what was the problem
I now have another problem. I unpacked the files (patch.dat/fat), made changes for the editor and packed. And in the end, it is launched once, and the second is no longer. Although on the old version these changes worked
Tell me please what kind of packaging program do you use?
volfin
ultra-veteran
ultra-veteran
Posts: 452
Joined: Sun Jul 06, 2014 6:30 am
Has thanked: 110 times
Been thanked: 326 times

Re: Far Cry 5 .Fat and .Dat Files

Post by volfin »

Alexxxxxxx wrote:
volfin wrote: I literally just used the same version on 1.07 yesterday, worked 100% fine.
Sorry. I already figured out what was the problem
I now have another problem. I unpacked the files (patch.dat/fat), made changes for the editor and packed. And in the end, it is launched once, and the second is no longer. Although on the old version these changes worked
Tell me please what kind of packaging program do you use?
I haven't tried repacking anything. I just unpacked it to work on a model importer. when I was catching up on the thread (yes all 12 pages) I was pretty sure the consensus was repacking wasn't possible.
volfin
ultra-veteran
ultra-veteran
Posts: 452
Joined: Sun Jul 06, 2014 6:30 am
Has thanked: 110 times
Been thanked: 326 times

Re: Far Cry 5 .Fat and .Dat Files

Post by volfin »

Image

Small update, it does look like the skeleton portion didn't change at all, which I figured since some in the thread mentioned they got the skeleton with the primal importer. This makes me more hopeful that full rigging will be possible, I just need to figure out how weights are stored, hopefully that didn't change much either. :wink:

I am seeing something odd I don't quite understand yet:

Image

I may have to recheck my code, it only seems to happen for the first triangle on a new run.
volfin
ultra-veteran
ultra-veteran
Posts: 452
Joined: Sun Jul 06, 2014 6:30 am
Has thanked: 110 times
Been thanked: 326 times

Re: Far Cry 5 .Fat and .Dat Files

Post by volfin »

Image

Another update. I think I have multiple materials sorted out and applying correctly, as well as multi-mesh import. I have also found the weights and indices for rigged meshes, the only thing I have left is to get those plugged into the right meshes in the right order (this new mess they made is making all of this rather difficult). But overall things are proceeding well. I can also parse the materials files and auto-convert the textures associated with each mesh.

However, Unlike Primal, I can't have blender load them, because they are DX10 format DDS files, which Blender does not support. So likely I'll write the converted textures to the same folder as the model, so you can find them easily and do your own manipulation/conversion on them.

You probably won't see me post again until it's actually done.

P.S. I also sorted out that stray triangle issue.
volfin
ultra-veteran
ultra-veteran
Posts: 452
Joined: Sun Jul 06, 2014 6:30 am
Has thanked: 110 times
Been thanked: 326 times

Re: Far Cry 5 .Fat and .Dat Files

Post by volfin »

Ok, so V1.0 of the importer is released. But there's a lot of issues still, which I will go over. However, it will import about 80% of things, and I've hit a wall so I figure I will release it at this stage.

The importer is for Blender 2.70 and above, and if you need to know how to install, see my previous tutorial here:
viewtopic.php?p=103131#p103131

What the importer can do:
- Import all static meshes.
- Import all rigged meshes.
- Import Weapons.
- Import some car accessories.

What the importer can't do:
- Import base vehicles (explained below)
- Import full characters (explained below)
- Import full maps (don't even ask about this)


First Off: you need to unpack all the data, it's scattered around. So this means unpacking the following FAT/DAT files into the *same* directory:
common.fat
worlds/installpkg.fat
worlds/farcry5.fat
patch.fat

You need to do it in this order so the patch overwrites the base data. I can't tell you what you'll get if you do it in some other order, probably old/out ofdate files.

Then it's simply a matter of loading an XBG and profit.

I know most want the characters, so I'll show you a little about that:

Far Cry 5 uses a 'parts' based system, so there's no real characters, everything is made up of a collection of generic reusable parts, and unique characters just have their own set of unique parts called a 'suit'. which is applied to a generic body.

So for "Faith" for instance, her 'suit' is here: "\graphics\_common\characters\fc5\wardrobe\suit\suit_avatar_faith_aver_f.xbg"

It looks like this:

Image

As you see the body and head are missing, and this is why I say "can't import full characters." because those are one of the generic parts, with a body/face morph applied (Body: graphics\_common\characters\fc5\wardrobe\body\_items\lieu\body_lieu003_faith_5f4_aver_f.item.bwsk") (Face: graphics\_common\characters\fc5\wardrobe\head\_facebuilder\head_lieu003_faith_aver_f.dpdx")

I have no way of doing this, writing a whole mesh morph system is way outside the realm of an importer. Maybe someone else can do this.

You can import the generic bodies/ Heads but they will not fit the clothes correctly because of the lack of morphing.


Now, about vehicles. Why can't they be imported? Well they probably can, EXCEPT for the fact their vertex storage format is a mystery. There is a Two Byte flag that determines the format of the Vertex Block bit 2 set = normal vertex storage for nearly 80% of everything. This is what everything uses. but bit 2 is NOT set for vehicles, instead bit 32768 is set. And that told me something changed. And sure enough, the data won't decode in any way I tried, Not floats, not half floats, not integers divided by a factor. Not even UVs will decode. You can try importing a vehicle, and it will complete successfully, but this is what you'll see:

Image

So I know i have the vertex block right, and the stride right, and I know the vertex data is still X,Y,Z,W and each is 2 bytes like the normal data, but it's not decodable by any method *I* know. So if anyone can figure out how it's stored, I can add support. But I've hit the wall on figuring it out.

An example file is graphics\vehicles\land\heavy\veh_heavy_truck\veh_heavy_truck.xbg
I can tell you the simplest block of vertex data in that file starts at 0x13BB0, is 0x146 blocks long, and each block is 16 bytes long.

Each block is:
short x;
short y;
short z;
short w;
short uv1-u;
short uv1-v;
byte color-r;
byte color-g;
byte color-b;
byte color-a;

However, i just can't decode it.

Vehicle accessories, such as truck beds and tanks (like \graphics\vehicles\land\heavy\veh_heavy_truck\att_heavy_truck_tanker_fuel_tank.xbg ) are stored normally and decode fine:

Image

(while on this subject, they often combine repaired and damaged parts as one mesh, you just select by material to separate, like the last two materials here.

Oh and finally about textures. The importer will try to find the Xbt files and convert them to DDS asd save them in the same directory as the original XBG. but it's imperfect, and Like Primal/4 these XBT files are not the top MIP, they are small (usually 256 x 256). So you'll need to find the large MIP by using a dedicated texture converter, nothing new about that. But just a reminder.

Also the Normal maps are saved in a funky channel order:

Image

You should paste the red channel into a file and use it as specular/AO (I'm not positive but I think it's specular/metallic), and move the Alpha channel to the red channel to make it a 'regular' normal map. (and as mentioned before they are using DX10 format for the DDS files, so use an appropriate converter.

So without further ado, here you go. As always if you find problems (outside the limitations mentioned here), let me know and preferably with the name of a file as an example of the problem.

Enjoy.

Edit: latest here: viewtopic.php?p=141959#p141959
Last edited by volfin on Sun Jul 08, 2018 2:54 am, edited 3 times in total.
Knmpm111
ultra-n00b
Posts: 3
Joined: Tue Jun 26, 2018 6:21 pm
Has thanked: 1 time
Been thanked: 1 time

Re: Far Cry 5 .Fat and .Dat Files

Post by Knmpm111 »

volfin wrote: Far Cry 5 uses a 'parts' based system, so there's no real characters, everything is made up of a collection of generic reusable parts, and unique characters just have their own set of unique parts called a 'suit'. which is applied to a generic body.

So for "Faith" for instance, her 'suit' is here: "\graphics\_common\characters\fc5\wardrobe\suit\suit_avatar_faith_aver_f.xbg"

As you see the body and head are missing, and this is why I say "can't import full characters." because those are one of the generic parts, with a body/face morph applied (Body: graphics\_common\characters\fc5\wardrobe\body\_items\lieu\body_lieu003_faith_5f4_aver_f.item.bwsk") (Face: graphics\_common\characters\fc5\wardrobe\head\_facebuilder\head_lieu003_faith_aver_f.dpdx")

You can import the generic bodies/ Heads but they will not fit the clothes correctly because of the lack of morphing.
So it's not that big deal - just need to fit generic parts (suit and head) to generic body of the character and then join selected meshes. Am I right? :)
volfin
ultra-veteran
ultra-veteran
Posts: 452
Joined: Sun Jul 06, 2014 6:30 am
Has thanked: 110 times
Been thanked: 326 times

Re: Far Cry 5 .Fat and .Dat Files

Post by volfin »

Knmpm111 wrote:
volfin wrote: Far Cry 5 uses a 'parts' based system, so there's no real characters, everything is made up of a collection of generic reusable parts, and unique characters just have their own set of unique parts called a 'suit'. which is applied to a generic body.

So for "Faith" for instance, her 'suit' is here: "\graphics\_common\characters\fc5\wardrobe\suit\suit_avatar_faith_aver_f.xbg"

As you see the body and head are missing, and this is why I say "can't import full characters." because those are one of the generic parts, with a body/face morph applied (Body: graphics\_common\characters\fc5\wardrobe\body\_items\lieu\body_lieu003_faith_5f4_aver_f.item.bwsk") (Face: graphics\_common\characters\fc5\wardrobe\head\_facebuilder\head_lieu003_faith_aver_f.dpdx")

You can import the generic bodies/ Heads but they will not fit the clothes correctly because of the lack of morphing.
So it's not that big deal - just need to fit generic parts (suit and head) to generic body of the character and then join selected meshes. Am I right? :)
as far as I can tell. :)
Eda61
n00b
Posts: 11
Joined: Wed Nov 08, 2017 9:05 am
Has thanked: 2 times
Been thanked: 2 times

Re: Far Cry 5 .Fat and .Dat Files

Post by Eda61 »

I could not import any models using "io_scene_FarCry5."

I tried to do what you showed us. I imported this file. ( "Faith" for instance, her 'suit' is here: "\graphics\_common\characters\fc5\wardrobe\suit\suit_avatar_faith_aver_f.xbg") but it does not look like what you show (I use Blender 2.79 and tried it in version 2.66)

volfin wrote:So for "Faith" for instance, her 'suit' is here: "\graphics\_common\characters\fc5\wardrobe\suit\suit_avatar_faith_aver_f.xbg"

It looks like this:

Image
did not import the other models you showed. I always face an error. What is the problem?
You do not have the required permissions to view the files attached to this post.
Last edited by Eda61 on Tue Jul 03, 2018 2:17 am, edited 1 time in total.
volfin
ultra-veteran
ultra-veteran
Posts: 452
Joined: Sun Jul 06, 2014 6:30 am
Has thanked: 110 times
Been thanked: 326 times

Re: Far Cry 5 .Fat and .Dat Files

Post by volfin »

oops, my fault, I left in some debug stuff that only works on my PC. (: Here's a fixed version.

Edit: latest here: viewtopic.php?p=141959#p141959
Last edited by volfin on Sun Jul 08, 2018 2:54 am, edited 2 times in total.
daemon1
MEGAVETERAN
MEGAVETERAN
Posts: 2647
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 65 times
Been thanked: 2870 times

Re: Far Cry 5 .Fat and .Dat Files

Post by daemon1 »

volfin wrote: - Import full maps (don't even ask about this)
I did test exports of "the crew" maps, and i think far cry must be very close, if not identical to it, so its very possible. However I dont see why anybody may need maps for such game.
volfin
ultra-veteran
ultra-veteran
Posts: 452
Joined: Sun Jul 06, 2014 6:30 am
Has thanked: 110 times
Been thanked: 326 times

Re: Far Cry 5 .Fat and .Dat Files

Post by volfin »

daemon1 wrote:
volfin wrote: - Import full maps (don't even ask about this)
I did test exports of "the crew" maps, and i think far cry must be very close, if not identical to it, so its very possible. However I dont see why anybody may need maps for such game.
yes I just put that as a half joke, because someone always asks for this and I always tell them I'm not going to do it because it's too much work. So figured i'd try to head them off before they asked. Anyone else is more than welcome to go for it. :D
User avatar
Crazy31139
veteran
Posts: 121
Joined: Fri Dec 02, 2016 5:53 pm
Has thanked: 324 times
Been thanked: 63 times
Contact:

Re: Far Cry 5 .Fat and .Dat Files

Post by Crazy31139 »

I tried different versions of the unpacker, different FileNames.list.
i use FC5.Unpacker v0.0.4.35444, FileNames.list - 77mb (contains the names SUITS)
but when unpacking complite "graphics\_common\characters\fc5\wardrobe\suit\" is empty, not one file .xbg
volfin
ultra-veteran
ultra-veteran
Posts: 452
Joined: Sun Jul 06, 2014 6:30 am
Has thanked: 110 times
Been thanked: 326 times

Re: Far Cry 5 .Fat and .Dat Files

Post by volfin »

Crazy31139 wrote:I tried different versions of the unpacker, different FileNames.list.
i use FC5.Unpacker v0.0.4.35444, FileNames.list - 77mb (contains the names SUITS)
but when unpacking complite "graphics\_common\characters\fc5\wardrobe\suit\" is empty, not one file .xbg
That's the unpacker i used, actually. read the original post i made when i released the importer. It explains how you have to combine *all 4* unpacks. because certain files are only in certain Fat/Dat.
daemon1
MEGAVETERAN
MEGAVETERAN
Posts: 2647
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 65 times
Been thanked: 2870 times

Re: Far Cry 5 .Fat and .Dat Files

Post by daemon1 »

You probably just have some mistake in your code. All vehicle geometry i checked are fully correct shorts. I even specifically checked this one:
volfin wrote:graphics\vehicles\land\heavy\veh_heavy_truck\veh_heavy_truck.xbg
.... starts at 0x13BB0, is 0x146 blocks long, and each block is 16 bytes long.
Here it is:

Image
aaaabccccsdcsd
ultra-n00b
Posts: 2
Joined: Thu Jul 05, 2018 12:36 pm

Re: Far Cry 5 .Fat and .Dat Files

Post by aaaabccccsdcsd »

Hi guys. I read all topic and in last posts you mention FC5 Unpacker version 0.0.4.35444, but I saw for download only 0.0.3.3658 version, so where to get the newer one? Thanks.
Post Reply