Difference between revisions of "Spore:DBPF"

From SimsWiki
Jump to: navigation, search
 
m (Dbpf V2 moved to Spore:DBPF)

Revision as of 22:38, 17 January 2009

Copied from CustomSims3 http://www.customsims3.com/forum1/YaBB.pl?num=1214408105

// File Format Specs
// Header:
//    DWord type_name [0x46504244 "DBPF"]
//    DWord version_maj [2]
//    DWord version_min [0]
//    DWord ???
//    DWord ???
//    DWord ???
//    DWord ??? [created?]
//    DWord ??? [modified?]
//    DWord ??? [index_maj?]
//    DWord entry_count
//    Dword old_version_field [formerly the entry point]
//    DWord index_size  [index size]
//    Dword ??? [num_holes?]
//    Dword ??? [hole_loc?]
//    Dword ??? [hole_size?]
//    Dword ??? [index_min?] [3]
//    DWord index_start_V2 [file offset to seek to for index start]
//    DWord padding[7]
//
// Index:
// In general, a single linear read of this file type is impossible.
// You have to read the index, often (but not necessarily) located at the end of the file.
// So, you can read the header, skip to the index, sort the entries, rewind and skip to
// each chunk, or you can seek from each index entry to the chunk, then return to the index.
//
//    DWord index_type [known values 4, 5, 6 and 7]
//
//    case 4:  [8+(entry_count*28) must equal index_size]
//	  DWord index_null [zero]
//	  repeated once per entry_count:
//		DWord type
//		DWord group?
//		DWord instance?
//		DWord Chunk_offset
//		DWord Disk_Size [or'd with 0x80000000]
//		DWord Mem_size [decompressed size]
//		Word Compressed [0=no, 0xFFFF=yes]
//		Word unknown [1]
//    case 5:    [12+(entry_count*24) must equal index_size]
//	  DWord type
//	  DWord index_null [zero]
//	  repeated once per entry_count:
//		DWord group?
//		DWord instance?
//		DWord Chunk_offset
//		DWord Disk_Size [or'd with 0x80000000]
//		DWord Mem_size [decompressed size]
//		Word Compressed [0=no, 0xFFFF=yes]
//		Word unknown [1]
//    case 6:    [12+(entry_count*24) must equal index_size]
//	  DWord type
//	  DWord index_null [zero]
//	  repeated once per entry_count:
//		DWord group?
//		DWord instance?
//		DWord Chunk_offset
//		DWord Disk_Size [or'd with 0x80000000]
//		DWord Mem_size [decompressed size]
//		Word Compressed [0=no, 0xFFFF=yes]
//		Word unknown [1]
//    case 7:    [16+(entry_count*20) must equal index_size]
//	  DWord type
//	  DWord group?
//	  DWord index_null [zero]
//	  repeated once per entry_count:
//		DWord instance?
//		DWord Chunk_offset
//		DWord Disk_Size [or'd with 0x80000000]
//		DWord Mem_size [decompressed size]
//		Word Compressed [0=no, 0xFFFF=yes]
//		Word unknown [1]
//
// The overall structure appears that index type 4 has a unique type, group and instance
// for each entry, index types 5 and 6 all share the same type, and index type 7 all
// share the same type and group values. So 5, 6 and 7 are shorter per entry to save space
//
// Chunks:
//    Every chunk type is different. The index entry tells you where in the file the
//    chunk starts at, and how large it is. If it is compressed, the index gives the
//    uncompressed size. The compression is compatible with that used for DBPF V1, but
//    the compressed file header has changed from 9 bytes to 5. These 5 bytes are
//    counted as a part of the compressed size indicated in the index. The first two bytes
//    are the compression type 0x10, 0xFB or 0x50, 0xFB [0xFB10 or 0xFB50]. These appear
//    to decompress the same way. The next three bytes are the decompressed size, in
//    Big-Endian format (hi-byte to lo-byte). This should match the value found in the
//    index. Examples of decompression code are documented on the Sims2Wiki and at
//    moreawesomethanyou.com.
//
// known types are:
// 0x00B1B104 PROP
// 0x00E6BCE5 GMDL
// 0x011989B7 PLT
// 0x01AD2616 creature_traits
// 0x01AD2617 building_traits
// 0x01AD2618 vehicle_traits
// 0x01C135DA gmsh
// 0x01C3C4B3 trait_pill
// 0x022D2C83 EAPD  (add 07/27/08)
// 0x02393756 Cursor (add on 7/31/08)
// 0x0248F226 CSS
// 0x024A0E52 Cheat
// 0x027C5CEF TrueType font  (add 07/27/08)
// 0x029E333B textual  (add 07/27/08)
// 0x02D5C9AF SUMMARY
// 0x02D5C9B0 SUMMARY PILL
// 0x02FAC0B6 textual
// 0x03055F61 textual  (add 07/27/08)
// 0x030BDEE3 pollen_metadata
// 0x0376C3DA HM
// 0x0472329B HTRA
// 0x12952634 textual  (add 07/27/08)
// 0x1A99B06B BEM
// 0x1E99B626 BATCH  (add 07/27/08)
// 0x2399BE55 BLD
// 0x24682294 VCL
// 0x25DF0112 Script
// 0x2B6CAB5F NOTE
// 0x2B978C46 CRT
// 0x2F4E681C RASTER
// 0x2F4E681B RW4
// 0x2F7D0002 JPEG
// 0x2F7D0004 PNG
// 0x2F7D0005 BMP  (add 07/27/08)
// 0x2F7D0006 TGA  (add 07/27/08)
// 0x2F7D0007 GIF  (add 07/27/08)
// 0x37979F71 textual  (add 07/27/08)
// 0x3C77532E PSD  (add 07/27/08)
// 0x3C7E0F63 MUSCLE
// 0x3F9C28B5 CURSOR (add on 7/31/08)
// 0x438F6347 FLR
// 0x476A98C7 UFO
// 0x497767B9 textual  (add 07/27/08)
// 0x4AEB6BC6 ANIM LIST
// 0x617715C4 PYTHON  (add 07/27/08)
// 0x617715D9 textual  (add 07/27/08)
// 0x7C19AA7A PART CAPABILITIES
// 0xCF6C21B8 XML  (add 07/27/08)
// 0xEE17C6AD ANIM
// 0xEFBDA3FF LAYOUT  (add 07/27/08)
Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox