TankArchive

From XentaxWiki
Revision as of 20:36, 15 September 2006 by 217.156.89.254 (talk)

Jump to: navigation, search

DS2MAP, DS2RES


Format Specifications

=== BASE ===
char {4}     - ProductId (DSg2)//ID of product (human readable) - always PRODUCT_ID
char {4}     - TankId (Tank)//ID of tank (human readable) - always TANK_ID
DWORD {4}    - HeaderVersion //version of this particular header
DWORD {4}    - DirSetOffset //(Offset to the start of Index 1)
DWORD {4}    - FileSetOffset // (Offset to the start of Index 3)
DWORD {4}    - IndexSize //total size of index (header plus all dir data - used for RAW format)
DWORD {4}    - DataOffset //offset to start of data (used for RAW format)
=== Extra - Basic ===
BYTE {12}    - ProductVersion //product version this tank was built with
BYTE {12}    - MinimumVersion //minimum product version required to use this tank
DWORD {4}    - Priority //priority that this tank is entered into the master index
DWORD {4}    - Flags //flags regarding this tank (eTankFlags)
char {4}     - CreatorId //"!GPG" who created this tank (creation tool will choose, not user)
GUID {36}    - //true GUID assigned at creation time
DWORD {4}    - IndexCRC32 //CRC-32 of just the index (not including the header)
DWORD {4}    - DataCRC32 //CRC-32 of just the data
SYSTEMTIME {16}   - UtcBuildTime //when this tank was constructed (stored in UTC)
WCHAR {200}  - Copyright Information ("Copyright (C) 1998-2004 Gas Powered Games. All rights reserved") (unicode text) (null terminated)
WCHAR {200}  - BuildText //text about how this was built
=== Extra - User Info ===
WCHAR {200}  - TitleText //title of this tank
WCHAR {100}  - AuthorText //who made this tank
//for GPG package, there're 24BYTE padding at here. But for user created package, there're nothing. byte {X}     - File Data


// INDEX 1 (Directories)

uint32 {4}   - Number Of Directories  in Total
// for each directory
uint32 {4}   - Offset to directory details (pointer into Index 2)


// INDEX 2 (Directories and Files)

// for each file or sub-directory
uint32 {4}    - Number Of Sub-Directories or Files
uint32 {4}    - Offset To Sub-Directory or File (relative to the Index 1, points to Index 2 or 4
uint32 {4}    - Offset To Parent Directory (relative to the Index 1)
uint32 {4}    - Number Of Files or Directory
FILETIME {8}  - Time Stamp
uint16 {2}    - Name Length
char {X}      - Name
byte {1-4}    - null Padding to a multiple of 4 bytes

byte {16}    - null Padding

// INDEX 3 (Files)
uint32 {4}   - Number Of Files  in Total
// for each directory
uint32 {4}   - Offset to file details (relative to Index 3, points to Index 4)

// INDEX 4 (Files)
// for each file
uint32 {4}   - Offset To Parent Directory (relative to Index 1 Offset)
uint32 {4}   - Decompressed Length
uint32 {4}   - File Offset (points to datarelative to dataOffset)
uint32 {4}   - CRC32
FILETIME {8} - Time Stamp 
uint32 {4}   - Compression Format (0 -> Not compressed, 1 -> Compressed ZLIB)
uint16 {2}   - Filename Length
char {X}     - Filename
byte {1-4}   - null Padding so each File Index is a multiple of 4 bytes

if (compressionTag == 1){
uint32 {4}   - Compressed Length
uint32 {4}   - Maximum Chunk Size (16384)

while (MoreDetailsMarker != 0){
uint32 {4}   - Decompressed Size Of Chunk
uint32 {4}   - Compressed Size Of Chunk [each chunk has a non-compressed 16 bytes added at the end]
uint32 {4}   - More Details Marker (0=no more comp data, 16=another comp data follows)
uint32 {4}   - Chunk Offset (points to datarelative to dataOffset)
}

}

MultiEx BMS

Not written yet

Notes and Comments

  • Compressed files use ZLib compression, broken up into separate ZLib chunks of size 16384 rather than compressing the whole file as a single chunk.

Supported Programs



















index index1015 index1035 index1085 index1199 index1209 index1220 index1279 index1293 index1299 index1349 index1364 index1374 index1656 index171 index1720 index1746 index1748 index1753 index1866 index1967 index1982 index203 index2166 index2321 index2410 index2458 index2543 index2597 index2681 index27 index2901 index2948 index3062 index309 index3108 index3117 index3405 index341 index3515 index3572 index3753 index3763 index3789 index41 index4154 index4247 index4371 index4398 index4402 index4455 index4475 index4494 index4544 index4553 index4762 index4765 index4769 index478 index4793 index4810 index4816 index4930 index50 index501 index586 index591 index593 index604 index699 index729 index776 index857 index88 map.a map.b map.c map.d map.e map.f map.g map.h map.i map.j map.k map.l map.m map.n map.o map.p map.q map.r map.s map.t map.u map.v map.w map.x map.y map.z