View Full Version : DBPF Index Table version 7.2?
GeneralOperationsDirector
23rd Aug 2008, 3:59 AM
Hi, all! I`m a programmer at heart, so one of the first things I tried after finding this site was a *.package file reader.
The header reads and decodes fine, but my version of Sims 2 uses Index Table version seven-point-TWO, and the file format page only lists v7.0 & 7.1. :blink:
Does anyone know where I can find DBPF Index Table version 7.2 format information? :help:
By the way, I`m using The Sims 2 Double Deluxe, which is supposed to be equivalent to the original plus Night Life plus Celebration Stuff.
Delphy
23rd Aug 2008, 10:21 AM
Whats the Major Version of the package file you are opening? It'll be one of 1.0, 1.1 or 2.0. I've never seen 7.2 in the wild - sure you aren't confusing values? What does my DBPFInfo program say the version is?
(Ps the wiki info on DBPF files up to Spore is here: http://www.sims2wiki.info/DBPF )
GeneralOperationsDirector
23rd Aug 2008, 6:32 PM
I`m writing my *.package reader in Python. Here`s the output:
>>> reload(Sims2Mod)
C:\Documents and Settings\<<username>>\Documents\EA Games\The Sims 2\Downloads\Hacks\marhis-marriage-lastnamedialog.package
DBPFHeader:
{'DateCreated': 2751481,
'DateModified': 0,
'HoleEntryCount': 0,
'HoleOffset': 0,
'HoleSize': 0,
'IndexEntryCount': 2,
'IndexMajorVersion': 7,
'IndexMinorVersion': 2,
'IndexOffset': 0,
'IndexSize': 48,
'Magic': 'DBPF',
'MajorVersion': 1,
'MinorVersion': 1,
'OffsetOfFirstIndexEntry': 320331,
'Reserved': '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00',
'Unknown1': 0,
'Unknown2': 0,
'Unknown3': 0,
'Unknown4': 0}
DBPFIndex:
{'GroupID': 2144627920, 'TypeID': 1112031574}
<module 'Sims2Mod' from 'C:\Program Files\Languages\Python\2.5.2\Lib\site-packages\Sims2Mod.py'>
<module 'Sims2Mod' from 'C:\Program Files\Languages\Python\2.5.2\Lib\site-packages\Sims2Mod.py'>
>>>
I`ve gotten 7.2 on **every** header I`ve tried to read so far, though that`s not many. Could someone please verify the numbers on this file? I downloaded it from here. :)
I don`t have DBPInfo. If I can get my code working, I shouldn`t *need* it. :D
I`ve been getting my information from http://www.modthesims2.com/wiki.php?title=Category:InternalFormats --which seems to be verbatum identical to the site you linked to.
Delphy
23rd Aug 2008, 9:46 PM
Ahhh I see. MinorVersion is stored in the file with +1. So a value of 2 would actually be a 1.
Hence your indexes are actually 7.1.
(For more source code see http://www.sims2wiki.info/wiki.php?title=DBPF/Source_Code and you'll notice the IndexMinor is -1)
GeneralOperationsDirector
25th Aug 2008, 5:37 AM
:blink: Weird. :blink: Thanks. Now I can work on the next step. :) Are any of the other values here a "gotcha" that I need to look out for?
Oh, and my output now looks like this:
[..same as before..]
DBPFIndex:
{'GroupID': 4294967295L,
'InstanceID1': 1,
'InstanceID2': 0,
'Offset': 96,
'Size': 24561,
'TypeID': 1414807923}
>>>
Am I correct in assuming that this particular package has fifty "files" in it, and that the first one starts at byte position 96, the first byte in package being at position zero?
GeneralOperationsDirector
2nd Dec 2009, 9:18 PM
During yesterday`s emergency downtime, I was playing with my tool [which grew out of this .package reader] and discovered something strange. The raw data for the Index Table Version turned up files with (7,2), (7,1), AND (7,0)!
In other words, the "MinorVersion" is NOT stored in the file with a +1, but rather we`ve been calling the versions by the wrong numbers.
Sims 2 makes heavy use of v7.2, occasional use of v7.1, and I found a v7.0!
This file was located in the Lot Bin, by the way. Does anyone have any information about this apparently-unknown index version?
vBulletin v3.0.14, Copyright ©2000-2013, Jelsoft Enterprises Ltd.