Difference between pages "Spore DBPF" and "People:APTX"

From SC4D Encyclopaedia
(Difference between pages)
Jump to navigation Jump to search
m (1 revision imported)
 
sc4e>Nex
(add link)
 
Line 1: Line 1:
{{MTS2}}
+
[[Image:Witburg-Oct. 27, 711221949892.png|thumb|right|250px|The [[Bullet Train Mod]] and Tokyo Station.]]
 +
APTX is a Japanese member who is most famous for creating the [[Bullet Train Mod]], its custom [[Slope Mod|slope mod]] and Tokyo Station.  He also has his own website. [http://yaplog.jp/waldorf/ here]
  
The following contains information about the [[DBPF]] file type used for the Maxis game '''Spore'''.  It was copied from [http://www.customsims3.com/forum1/YaBB.pl?num=1214408105 CustomSims3] ''(Editor's note: as of Sept. 8, 2012, that page was 404 error)''.
+
His showcase on SC4D is [http://sc4devotion.com/forums/index.php?topic=6088.0 here]
  
<pre>
+
{{navbox/WORLD}}
// File Format Specs
+
[[Category:Japan|APTX]]
// 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.
 
//
 
</pre>
 
 
 
See also [http://simswiki.info/wiki.php?title=Spore:Chunk_Types Spore:Chunk Types].
 
 
 
==Visual Guide to DBPF v2.0==
 
These below visual guides to the DBPF file format v2 was created by [[People:DarkMatter|DarkMatter]]:
 
 
 
{|
 
| [[Image:DBPF_File_Format_v2.0.png|thumb|left|200x152px|alt=DBPF v2.0 Visual Guide|DBPF v2.0]]
 
|}
 
 
 
Some information was taken from old DatGen source code, such as the Created/Modified timestamps and possible Flags DWORD. That information may not be accurate, per DarkMatter's own description. Reason given is that it was some time ago that he "last chatted with Maxoids about the DBPF format."
 
 
 
 
 
[[Category:Modding]]
 
[[Category:MTS2]]
 

Revision as of 11:37, 2 December 2008