Quick Reply
Search this Thread
Scholar
Original Poster
#1 Old 6th Mar 2015 at 8:53 PM
Default Header differences between DBPF versions
I'm trying to recover some lost TS4 packages using PhotoRec, which works by detecting the header of deleted files. I created a custom search pattern and set it to scan, and it gave me over 60 GB of files - that's more like my TS3 CC horde than my TS4 one, which just had a couple dozen choice bits of CC. While creating the search pattern, I noted that the only difference between DBPF packages in TS3 and TS4 is a lonely x01 in the first line, and now I'm thinking that there should be other differences in the headers that I could use to try and refine my search pattern - there's enough of a difference between TS2 and TS3 packages for this nifty little tool (http://modthesims.info/download.php?t=381097) to exist, which automatically distinguishes between the two based on (I assume) the header.

The header for a random TS4 package:

00000000 44 42 50 46 02 00 00 00 01 00 00 00 00 00 00 00 |DBPF............|
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| - everything beyond this line seems to be unique to the individual package file
00000020 00 00 00 00 03 00 00 00 00 00 00 00 5c 00 00 00 |............\...|
00000030 00 00 00 00 00 00 00 00 00 00 00 00 03 00 00 00 |................|
00000040 0f a0 04 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000060 78 9c ec bd 5f 6c 1b 5b 7e e7 59 94 44 ac a3 b8 |x..._l.[~.Y.D...|
00000070 57 32 60 be 73 8c 1d ec 5d 3d 79 61 cc 9b 01 d2 |W2`.s...]=ya....|
00000080 03 19 98 0e 36 d3 14 9a a5 59 6b 30 88 f3 60 63 |....6....Yk0..`c|
00000090 ad a7 0d 7a 27 c0 20 0e a2 f5 f5 0d 7c 8d 45 5e |...z'. .....|.E^|


Header for random TS3 package:

00000000 44 42 50 46 02 00 00 00 00 00 00 00 00 00 00 00 |DBPF............|
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| - ditto
00000020 00 00 00 00 09 00 00 00 00 00 00 00 24 01 00 00 |............$...|
00000030 00 00 00 00 00 00 00 00 00 00 00 00 03 00 00 00 |................|
00000040 72 d0 02 00 00 00 00 00 00 00 00 00 00 00 00 00 |r...............|
00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000060 10 fb 00 0d 83 e1 12 00 00 00 ba 0c 00 00 01 07 |................|
00000070 01 e2 26 06 00 00 3c 00 70 00 72 00 65 00 01 03 |..&...<.p.r.e...|
00000080 73 03 0f 74 00 3e e0 63 00 6f 00 01 15 6d 03 11 |s..t.>.c.o...m..|
00000090 6c 00 61 e0 65 00 20 00 01 09 6e 01 09 6d e0 3d |l.a.e. ...n..m.=|

If anyone could help clear up the difference between the two and maybe give me a gently push in the right direction as to how to narrow down the differences between the two, that'd be great, as it'd save me from searching through thousands upon thousands of package files to find the dozen or so that I need from TS4. Thanks!

Quote:
Originally Posted by jje1000
If this succeeds, then we will have driven a stake through the metaphorical heart of pudding.

♥ Receptacle Refugee ♥
Now also on Tumblr !
Lab Assistant
#2 Old 6th Mar 2015 at 9:11 PM
That one that you have recognised is the minor version number of package files, the 2 before is the major version number. For the sims 3 the version was 2.0 (major 2 and minor 0) and for the sims 4 the version is 2.1 (major 2 and minor 1). So your analysis is completely correct. So when searching you can use the 12 first bytes (44 42 50 46 02 00 00 00 01 00 00 00) from the the sims 4 package which should give you the files you are looking for.
Scholar
Original Poster
#3 Old 6th Mar 2015 at 9:22 PM
Quote: Originally posted by Fogity
That one that you have recognised is the minor version number of package files, the 2 before is the major version number. For the sims 3 the version was 2.0 (major 2 and minor 0) and for the sims 4 the version is 2.1 (major 2 and minor 1). So your analysis is completely correct. So when searching you can use the 12 first bytes (44 42 50 46 02 00 00 00 01 00 00 00) from the the sims 4 package which should give you the files you are looking for.


Yeah, that's exactly what I did do, but it's giving me far too many files, so there must be some sort of overlap going on there because TS3 packages are getting dragged along in the net as well, and I don't really get why that's happening.

Quote:
Originally Posted by jje1000
If this succeeds, then we will have driven a stake through the metaphorical heart of pudding.

♥ Receptacle Refugee ♥
Now also on Tumblr !
Lab Assistant
#4 Old 6th Mar 2015 at 9:46 PM
I don't know much about that tool, but maybe it simply limits the number of bytes you can specify. There aren't anything else in the files to identify it, so the first 12 bytes is the way to go. Remember that the game files are also in package files, so if it can find them expect at least 10 GB extra from those.
Scholar
Original Poster
#5 Old 7th Mar 2015 at 7:18 AM Last edited by Qahne : 12th Mar 2015 at 3:32 PM.
Quote: Originally posted by Fogity
I don't know much about that tool, but maybe it simply limits the number of bytes you can specify. There aren't anything else in the files to identify it, so the first 12 bytes is the way to go. Remember that the game files are also in package files, so if it can find them expect at least 10 GB extra from those.


Even accounting for game files in the program directory, it's too much, and although I have gotten s4pe on Linux, as soon as I click on one of the resources inside the package it crashes, so I can't analyse them to see what's going on - but what does seem clear is that I have a lot of very large packages (100+ MB) and I just figured out that save files have the same header as DBPF 2.1 packages do - it seems reasonable to presume that all the other files for TS4 - cache, tray, saved sims - are also under the same header. While this explains the oodles of smaller files I'm getting, the save files I downloaded from EA are in the single-digit megabyte range - how large do these things get? Bloating from 5 MB to 100 seems a bit extreme, even for a The Sims game.

Edit: Alright, so I got s4pe to cooperate, and the files seem to be intact - all the contents are there, but they're bloated to an enormous degree. One of the things I wanted to recover, a skin I didn't get around to uploading, was 1.4 GB in size. I extracted the three resources and they seem fine. I repackaged them and it came out as 175.7 KB on the other end - a huge difference. I wonder what it is that's bloating these files to such a massive degree if the contents are uncorrupted? I'm uploading the skin here, can anyone download it and see if it's working in their game for me please? It should be a blue-green shade, like the aliens in TS2, and it shouldn't replace any of your existing tones. Thanks!

Final addendum: After going through each individual package, extracting the contents and placing them in a new package, everything is working perfectly - save games load and play fine, custom content shows up and works as intended. I'm honestly quite surprised at how well everything managed to behave, considering the abuse they went through and the absurd amounts of file corruption that almost made me quit. Thanks for your help on this and the other thread, Fogity, you were very helpful! Removing the test skin as it's no longer needed, will upload final version soon.

Quote:
Originally Posted by jje1000
If this succeeds, then we will have driven a stake through the metaphorical heart of pudding.

♥ Receptacle Refugee ♥
Now also on Tumblr !
Back to top