Page 13 of 15

XBcompress

Posted: Tue Sep 30, 2014 1:42 pm
by Paul44
After some more reading and experimenting: the tools xbcompress and xbdecompress allows you to (de)compress the files in the dat-files. As a sidenote: not all files within a dat-file seemed to be compressed.
(I'm using Swiss File Knife here)

If you run following on windy_city: > sfk172 hexfind windy_city.dat -bin "/0FF512EE010300000000000000000000/"
(1st 16 bytes of any compressed file)
you'll get a lot of hits (131.210 vs 162.504 Files unpacked). I assume that the remaining files are uncompressed?!

windy_city.dat : hit at offset 0x31040FE
>5B43415C 7CA877C2 9C838B9D 71E26F40< [CA\|.w.....q.o@ 031040DE
>3DBE24F9 43E5A249 10003400 00000000< =.$.C..I..4..... 031040EE
>0FF512EE 01030000 00000000 00000000< ................ 031040FE
>00008000 00008000 00000000 00002744< ..............'D 0310410E
>00000000 00000B5C 00008000 00000B5C< .......\.......\ 0310411E
>00000B5C FF27440B 52022049 74954D00< ...\.'D.R. It.M. 0310412E
windy_city.dat : hit at offset 0x3104C8E
>F37F3C87 E5F7ADFB AFFA3678 F0D36AE5< ..<.......6x..j. 03104C6E
>B5AAE9EA F6F8F276 F7D81700 00000000< .......v........ 03104C7E
>0FF512EE 01030000 00000000 00000000< ................ 03104C8E
>00008000 00008000 00000000 00000440< ...............@ 03104C9E
>00000000 0000029E 00008000 0000029E< ................ 03104CAE
>0000029E FF044002 9400200A 44950C00< ......@... .D... 03104CBE

If you then extract one of those hits (e.g. between: 0x31040FE - 0x3104C8E) using this command:
> sfk172 partcopy windy_city.dat 0x31040FE 0x3104C8E WD_WindyCity_Extr0x31040FE.compr -yes

and then run xbdecompress, this way:
> xbdecompress WD_WindyCity_Extr0x31040FE.compr WD_WindyCity_Extr0x31040FE.decompr

you'll get a decompressed (unpacked) file. Open this file in a hexeditor to find out what type it is...

My problem now: how to "xbcompress" it back to its original compressed size? Anyone knows the correct param_setting for this?

I already found out that one needs to use /N: to get the correct header sequence, but no luck from thereon sofar...
p

Import directly...

Posted: Thu Oct 02, 2014 10:18 am
by Paul44
I've found the way to recompress the files, using xbcompress. The difference between the original compressed file and recompressed file is 3 or 4 bytes. Have been testing this on 10 random files, and it always give me the exact same byte locations/differences. Which means that I probably need to use an additional parameter setting to get it 100% right.
The good news: the filesizes are exactly the same, and - once imported back - the game recognizes the file (does not crash). Even more, I changed the DDS (filetype I have been working with), recompressed it (giving me a smaller value), reimported it (using SFK) and it shows without any problems!
And of course: reimporting is instant, and [Windy_City.dat] does not change in size...

If have tested this on Windy_City.dat, and the adv shown on papabs_pawnshop (close to the Owl Motel).
[papabs_pawnshop_decal_01_d.xbt]
p

as stated earlier, some of the files in Windy_City.dat are not compressed at all (even some of the DDS files, like the adv at the Owl Motel). If one recompresses such an example, and reimport it, the game will not crash, but you will not see the advertisement either...!

Re: Watch_Dogs fat and dat archives

Posted: Thu Oct 02, 2014 10:24 am
by Oleg
does the game detect changes in .dat file (may be checksum)? I mean, when you close and restart UPlay, does it redownload the latest patch or it behaves correctly and ready-to-go?

Re: Watch_Dogs fat and dat archives

Posted: Fri Oct 03, 2014 10:03 am
by Paul44
Oleg wrote:does the game detect changes in .dat file (may be checksum)? I mean, when you close and restart UPlay, does it redownload the latest patch or it behaves correctly and ready-to-go?
I deduce from your question that you want to play with a modded version (which can only be merged within patch.dat). I guess that won't work since those mods probably (?) use their proper (non-basic) files. Iow you won't find them in any of the .dat files... Not to mention the fact that - if they do use existing files - they will surely be different/larger in size then the original files?!

If I assume wrong: I never play games online... not ever. But if you want to test it, then I'll upload the "Papa Bs" example for you to import into Windy_city.
p

ps1: if the mod does use original files, then probably the only way to get this working is, if the packed/uncompressed windy_city.dat vs would not crash... (assuming that this is not detected, as you suggested)

ps2: if your patch.dat gets overwritten during start up of the game, then try to a) start up while disconnected, and once in menu connect b) start connected with original patch.dat and once in menu, 'change' to modded version...

Re: Watch_Dogs fat and dat archives

Posted: Fri Oct 03, 2014 10:49 am
by Oleg
my inquiry is generally about offline mods. wish some user install several mods, how would he do this? Currently, he has to pack them all into a single patch .fat/.dat, backup this file, start UPlay, let the game download "correct" patch, replace it with modded patch and finally start the game. So, I'm wondering whether it would be possible to find a simple solution.

yet the GTA was modded that way, buy replacing files in original archives, but GTA uses 2 files per vehicle (model + textures pack). WD uses for one vehicle: model + high lod + reference skeleton + physics + dozen of materials + dozen of textures.

Re: Watch_Dogs fat and dat archives

Posted: Fri Oct 03, 2014 4:27 pm
by Paul44
Some more names found. Did test with the Rebuilder, but apparently only .fcb filenames are added?!
p

@Oleg: like I said, either option ps1 (like you do now apparently) or option ps2 (depends on Rick).
I've checked some files in the TheWorse mod: they use also game-existing filenames, but several of them are bigger in size. So, no go.

ps: if anyone is interested, I made an overview of all file_extensions found sofar in windy_city (either in the unpacked folders, or from the Unknown files)

Re: Watch_Dogs fat and dat archives

Posted: Fri Oct 03, 2014 7:25 pm
by OrangeC
How to get the rest of the filenames for sound.dat?

Re: Watch_Dogs fat and dat archives

Posted: Sun Oct 05, 2014 2:15 pm
by Paul44
OrangeC wrote:How to get the rest of the filenames for sound.dat?
are you saying now that you are happy with the current [sound.filelist]? In my filelist, those are just as meaningless then the Unknow ones... Anyway, you should ask Ekey about them; he's the one who provided the list, if I'm not mistaken.

I can provide a batchfile which extracts the compressed files from windy_city, based on the header "stamp" (see at beginning of this topic). You can decompress all those files (about 160.000 of them), and then run another batchfile which search for strings such as 'graphics', 'worlds', etc (ie the main folders). That's how I got those additional names. I did see more names appearing but I only concentrated on the "first_hit". And obviously, the batchfiles can easily be adapted for other dat/fat files.
But open some of the sbao-files, and you'll notice quickly that no path_info is found within them. So other files/programs must be refering to them, I guess...
p

Re: Watch_Dogs fat and dat archives

Posted: Wed Oct 22, 2014 9:59 pm
by lapius
Hi, I am new here and I came to ask your help. While I was playing, I saw Aiden answering the phone in one mission, but I couldnt take picture. I want to mane similar UI to my android phone, so if someone can help me find...

Ok, So I got some textures to look.
https://www.youtube.com/watch?v=fu51RBr ... e=youtu.be

Re: Watch_Dogs fat and dat archives

Posted: Sun Nov 16, 2014 7:43 am
by Bladers
Quick question. has anyone figured how to convert the yellow normal map into a blue regular normal map?

Re: Watch_Dogs fat and dat archives

Posted: Sun Nov 16, 2014 11:35 am
by Oleg
these are green-alpha normal displacement maps with green been displacement on X/U and alpha on Y/V. You can move alpha channel to red and save this normal map as GR16 (green 16 bit, red 16 bit). then load it in any directX-compatible editor as bump map and the "Z" (blue) will be automatically computed.

I don't know the whole chain on conversion, this is just the guideline. I mess directly with green-alpha textures as they are.

Re: Watch_Dogs fat and dat archives

Posted: Mon Nov 17, 2014 7:49 pm
by Wobble
[out]

Re: Watch_Dogs fat and dat archives

Posted: Sun Nov 23, 2014 8:29 am
by odrin
time to move on, guys. this is an unmoddable pile of shit 8D

Re: Watch_Dogs fat and dat archives

Posted: Sun Nov 23, 2014 1:56 pm
by Oleg
I would not agree, I think it's moddable, we just don't put much effort into it. :[

Re: Watch_Dogs fat and dat archives

Posted: Sat Dec 06, 2014 1:39 am
by mamekoski
hello everyone, can any of you help me how to re-compress the common & patch dat / fat for PS3 version??

basically, i just want to swap controls because aim & fire with L2 & R2 is a bit unsettling for me. so i want to change it into L1 & R1 (in-game option doesn't let us swap the button).

thanks!