Page 10 of 14

Re: [REQ][PC]Sleeping Dogs .big files

Posted: Wed Jul 02, 2014 10:24 am
by SergeantJoe
Ekey wrote:For find new names you need dump some memory regions not exe :)
Well that would've been nice to know.

Snarkiness aside, I genuinely appreciate the tip. I need every scrap of info I can get my hands on.

Although it seems we're getting into the heavy technical stuff here, all of which I have absolutely no clue on how any of it works. I'll not press you since you've most likely already said everything you wanted to.
Cra0 comes back in a few days, I can ask him for specifics on the memory thing.

Re: [REQ][PC]Sleeping Dogs .big files

Posted: Wed Jul 02, 2014 11:00 am
by Ekey
It's not to be hard. Use WinHex for example. While playing open WinHex > Tools > Open RAM. Search HKShip.exe and you can see named regions like > Primary and Entrie memory. Open them and save on disk. After use any Hex Editor and search filenames which begin > Data\ . Usually for that writting simple logger but game have anti-debugging system :)

Re: [REQ][PC]Sleeping Dogs .big files

Posted: Wed Jul 02, 2014 11:15 am
by SergeantJoe
Oh yeah, I heard about that. Is it really that bad?

Anyway, thanks man. Even if I have to do everything manually it still helps a lot.

Re: [REQ][PC]Sleeping Dogs .big files

Posted: Wed Jul 02, 2014 3:20 pm
by Chipicao
In an attempt to figure out what's going on when the game reads these unpacked files, I decided to log disk activity with Process Monitor.
First of all I fired up the game packed, to get a baseline of some sort.
It was very interesting to see that even when packed, the game tried to read files from \SleepingDogs\Data\Animation and AnimationNIS, which didn't exist. Even more strange is that the folders and files it was trying to read were "switched".
For example, \Data\AnimationNIS\Zodiac_Into.bin is not in AnimationNIS.big but in Animation.big.
And \Data\Animation\NIS_GAME_INTRO_OPENING.bin is actually in AnimationNIS.big. Maybe this is due to broken code that got left in the game.

Other than this it keeps to bix and big files as expected.
Image

Then I unpacked vehicles and started the game. It crashed immediately because my save is currently in a crowded area. The best place to test this is in that home with a driveway.
According to the log, it only tried to read Vehicles.bix once, failed, and then started reading unpacked files. Coincidence or not, it only reads files from Vehicles_New.
The strange part is that there are no failed read attempts logged for vehicle files. It simply crashes and begins to write a memory dump. No read failures prior to the crash either.
Image

@Ekey If you don't mind me asking, what's with those 0byte vehicle files? Are you sure there aren't any problems with the extractor?

Another interesting thing is that the game tries to read a bunch of hashed .bix files that don't exist. Could we create these files and use them as patches for mods? :D
Image

Re: [REQ][PC]Sleeping Dogs .big files

Posted: Wed Jul 02, 2014 4:48 pm
by Chipicao
I did a second test, this time at the house I was talking about.

First I loaded a car I knew would work, the 600 Coupe S. In the attached log you can see the game reading 600CoupeS04_ts001 files @18:13:35. I drove a bit in the garage without any issues.

Then I tried loading the Terre GT and it crashed immediately after I pressed the drive button. @18:16:10 you'll see the game read some Guide01 files, which I believe are for the car selection menu. But after that there is no attempt to read any Terre01 files. It simply crashes and starts writing the dump file.

Re: [REQ][PC]Sleeping Dogs .big files

Posted: Wed Jul 02, 2014 6:28 pm
by Ekey
Chipicao wrote:@Ekey If you don't mind me asking, what's with those 0byte vehicle files? Are you sure there aren't any problems with the extractor?
It's normal because SIZE and ZSIZE just equal 0 in entry table.
Chipicao wrote:Another interesting thing is that the game tries to read a bunch of hashed .bix files that don't exist. Could we create these files and use them as patches for mods? :D
Image
Game try search DLCxxxx.bix packages where xxxx ID of DLC. How it works:

1) Searching - printf("DLC%d.xml", i);
2) Name is - DLC1.xml
3) Get hash from this file - BCF931BB
4) Add extension - dat
5) Name is - BCF931BB.dat
6) Try to read this file
7) If found game try search BIG package of this DLC adding other extension - BIX -> BCF931BB.bix

This repeated 1 to 100 :)

Re: [REQ][PC]Sleeping Dogs .big files

Posted: Wed Jul 02, 2014 9:59 pm
by SergeantJoe
Chipicao wrote:@18:16:10 you'll see the game read some Guide01 files, which I believe are for the car selection menu. But after that there is no attempt to read any Terre01 files. It simply crashes and starts writing the dump file.
Guide01 is actually just another normal vehicle.
Chipicao wrote:even when packed, the game tried to read files from \SleepingDogs\Data\Animation and AnimationNIS, which didn't exist.
Wait, hold on. Is this only for the two animation folders, or for all of them? Which does it try to load first, the folders or the big files?

If it loads the folders first, couldn't you theoretically place files in the folders, have them load, then any missing files are loaded from the big? Or do the packed files override the loose ones? I recall trying something like this earlier.
Chipicao wrote:Another interesting thing is that the game tries to read a bunch of hashed .bix files that don't exist. Could we create these files and use them as patches for mods? :D
Also, in regards to this. I noticed in 600CoupeS_TerreGT.csv at 10:59.0 there is a call to a nonexistent file "SleepingDogs\EF1246F9.pck". There is F3ABACA0.pck in that folder however. Is it the same system Ekey said?

Re: [REQ][PC]Sleeping Dogs .big files

Posted: Wed Jul 02, 2014 10:55 pm
by Chipicao
@Ekey Thanks for clarifying
SergeantJoe wrote:Guide01 is actually just another normal vehicle.
Any idea which one it is?
SergeantJoe wrote:Wait, hold on. Is this only for the two animation folders, or for all of them? Which does it try to load first, the folders or the big files?
Only for animation; big files are read first. I think the game only looks for extracted files when it can't find them in archives.
Actually, here's what's probably happening:
- there's a piece of broken code in the game that has the animation files mixed up;
- so it tries to read AnimationNIS files inside Animation.big and vice verse, but obviously it can't because it has the wrong archive names;
- when it fails it tries to read them unpacked as you would expect, again with the switched path error;
- in the end the error is most likely ignored and it doesn't affect the game.
SergeantJoe wrote:Also, in regards to this. I noticed in 600CoupeS_TerreGT.csv at 10:59.0 there is a call to a nonexistent file "SleepingDogs\EF1246F9.pck". There is F3ABACA0.pck in that folder however. Is it the same system Ekey said?
No idea. I have all DLCs but I don't see any F3ABACA0 files

Re: [REQ][PC]Sleeping Dogs .big files

Posted: Wed Jul 02, 2014 11:15 pm
by SergeantJoe
Chipicao wrote:Any idea which one it is?
Pretty sure it's this one.
Chipicao wrote:No idea. I have all DLCs but I don't see any F3ABACA0 files
Well that's weird. Must've been included with something I downloaded. The thing is, that file contains sounds from Year of the Snake and Zodiac Tournament, yet so does the main one.

Re: [REQ][PC]Sleeping Dogs .big files

Posted: Wed Jul 02, 2014 11:26 pm
by Chipicao
Sorry, I misread. I have F3ABACA0.pck, but no EF1246F9.

Re: [REQ][PC]Sleeping Dogs .big files

Posted: Thu Jul 03, 2014 12:08 am
by SergeantJoe
That's what I was saying, maybe you were onto something there. Or it could be just a DLC loading method like Ekey explained, only for sounds instead of models.

Re: [REQ][PC]Sleeping Dogs .big files

Posted: Tue Jul 29, 2014 4:22 am
by SergeantJoe
Image

1 down, 73 to go!

Big thanks to Ekey for pointing me in the right direction and cra0 for more detailed info.


EDIT: Although I can't help but think there's got to be an easier way to do this. Right now I'm finding the file in-game, making a memory dump, then manually matching the name to the file contents.
It works, but it'll take a while.

Re: [REQ][PC]Sleeping Dogs .big files

Posted: Sun Aug 24, 2014 3:10 pm
by desperado
Anyone know where is fonts ?

Re: [REQ][PC]Sleeping Dogs .big files

Posted: Mon Aug 25, 2014 7:04 pm
by SergeantJoe
Font files are located in UI.BIG/Data/UI/Fonts.perm.bin

Although you can't really do anything with them, since there are no tools for .bin files and nobody cares enough to make some. Hopefully that will change in October when Definitive Edition is released.

Re: [REQ][PC]Sleeping Dogs .big files

Posted: Mon Sep 15, 2014 12:19 am
by GhostSpy
how to repack
bin files to big, bix

Please help