EvilEngine/HIP (File Format): Difference between revisions
Battlepedia>Igorseabra4 (Created page with "==Introduction== HIP archives are container formats used by Heavy Iron Studios in some of their games, including Spongebob Squarepants: Battle For Bikini Bottom. They are used...") |
Battlepedia>Igorseabra4 No edit summary |
||
Line 5: | Line 5: | ||
==General Info== |
==General Info== |
||
HIP archives are big endian in all versions of each game. |
HIP archives are big endian in all versions of each game. It's made up of 4 main sections: |
||
* '''HIPA''': this section is empty. It's used to mark the start of the file. |
|||
* '''PACK''': this section contains general data about the archive, such as game name, creation date and number of assets. |
|||
* '''DICT''': this section contains asset headers and layers. Each layer has a type and is composed of certain types of assets. |
|||
* '''STRM''': this section contains the raw data for the assets. Each asset header references the STRM by an absolute offset. |
|||
===Header Format=== |
===Header Format=== |
||
⚫ | |||
<pre> |
<pre> |
||
⚫ | |||
char[4] sectionName |
char[4] sectionName |
||
int sectionSize |
int sectionSize |
||
Line 23: | Line 27: | ||
===HIPA=== |
===HIPA=== |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
===PACK=== |
===PACK=== |
||
⚫ | |||
<pre> |
<pre> |
||
⚫ | |||
section PVER |
section PVER |
||
section PFLG |
section PFLG |
||
Line 36: | Line 38: | ||
section PMOD |
section PMOD |
||
section PLAT |
section PLAT |
||
<pre> |
</pre> |
||
===PVER=== |
===PVER=== |
||
⚫ | |||
<pre> |
<pre> |
||
⚫ | |||
int subVersion |
int subVersion |
||
int clientVersion |
int clientVersion |
||
Line 47: | Line 49: | ||
===PFLG=== |
===PFLG=== |
||
⚫ | |||
<pre> |
<pre> |
||
⚫ | |||
int flags |
int flags |
||
</pre> |
</pre> |
||
===PCNT=== |
===PCNT=== |
||
⚫ | |||
<pre> |
<pre> |
||
⚫ | |||
⚫ | |||
int |
int LHDRCount \\ Amount of LHDR sections |
||
⚫ | |||
int sizeOfLargestSourceFileAsset |
int sizeOfLargestSourceFileAsset |
||
int sizeOfLargestLayer |
int sizeOfLargestLayer |
||
Line 63: | Line 65: | ||
===PCRT=== |
===PCRT=== |
||
This section contains a date. |
|||
⚫ | |||
int fileDate // Date file was compiled |
|||
int fileDate \\ Date file was compiled |
|||
string dateString \\ Date as string |
|||
</pre> |
</pre> |
||
===PMOD=== |
===PMOD=== |
||
<pre> |
<pre> |
||
This section contains a date |
|||
int modDate |
int modDate \\ Date file was last changed |
||
</pre> |
</pre> |
||
===PLAT=== |
===PLAT=== |
||
⚫ | |||
⚫ | |||
⚫ | |||
* Format for Battle for Bikini Bottom |
|||
⚫ | |||
string targetPlatform |
string targetPlatform |
||
string targetPlatformName |
string targetPlatformName |
||
Line 84: | Line 87: | ||
string language |
string language |
||
string targetGame |
string targetGame |
||
⚫ | |||
* Format for The Incredibles, Spongebob Movie and Rise of the Underminer |
|||
<pre> |
|||
string targetPlatform |
string targetPlatform |
||
string language |
string language |
||
Line 93: | Line 98: | ||
===DICT=== |
===DICT=== |
||
⚫ | |||
<pre> |
<pre> |
||
⚫ | |||
section ATOC |
section ATOC |
||
section LTOC |
section LTOC |
||
Line 100: | Line 105: | ||
===ATOC=== |
===ATOC=== |
||
⚫ | |||
<pre> |
<pre> |
||
⚫ | |||
section AINF |
section AINF |
||
section[AHDRCount] AHDR |
section[AHDRCount] AHDR |
||
Line 112: | Line 117: | ||
===AHDR=== |
===AHDR=== |
||
⚫ | |||
<pre> |
<pre> |
||
⚫ | |||
⚫ | |||
⚫ | |||
// AHDR is used to define an asset entry |
|||
int fileOffset \\ absolute |
|||
⚫ | |||
⚫ | |||
int fileOffset // relative to entire archive |
|||
int fileSize |
int fileSize |
||
int plusValue |
int plusValue \\ amount of padding after file data |
||
int flags |
int flags |
||
section ADBG |
section ADBG |
||
Line 126: | Line 130: | ||
===ADBG=== |
===ADBG=== |
||
<pre> |
<pre> |
||
⚫ | |||
// This section contains more asset data |
|||
⚫ | |||
string assetName |
string assetName |
||
string assetFileName |
string assetFileName |
||
uint checksum \\ ignored |
|||
</pre> |
</pre> |
||
===LTOC=== |
===LTOC=== |
||
⚫ | |||
<pre> |
<pre> |
||
⚫ | |||
section LINF |
section LINF |
||
section[LHDRCount] LHDR |
section[LHDRCount] LHDR |
||
Line 146: | Line 149: | ||
===LHDR=== |
===LHDR=== |
||
⚫ | |||
<pre> |
<pre> |
||
⚫ | |||
// LHDR is used to define a layer entry |
|||
int layerType |
int layerType |
||
int assetAmount |
int assetAmount |
||
Line 161: | Line 163: | ||
===STRM=== |
===STRM=== |
||
⚫ | |||
<pre> |
<pre> |
||
⚫ | |||
section DHDR |
section DHDR |
||
section DPAK |
section DPAK |
||
Line 173: | Line 175: | ||
===DPAK=== |
===DPAK=== |
||
⚫ | |||
⚫ | |||
<pre> |
<pre> |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
byte[] data |
byte[] data |
||
</pre> |
</pre> |
Revision as of 06:47, 1 September 2018
Introduction
HIP archives are container formats used by Heavy Iron Studios in some of their games, including Spongebob Squarepants: Battle For Bikini Bottom. They are used mainly to contain assets, which are the resources used to create levels, characters and menus for the games. The files usually have the extension .HIP, but some have the .HOP extension; although the types of assets kept in both are usually different, HIP and HOP do not differ by internal structure. The archives are divided into multiple sections, each of which starts with an 8 byte header containing the section name in ASCII and the total size of the section, all of which are listed below.
There are at least three different revisions of the format: the first one used in Scooby Doo: Night of 100 Frights, a second one used in Spongebob Squarepants: Battle For Bikini Bottom and a third one which is used in The Incredibles Game, The Spongebob Squarepants Movie and The Incredibles: Rise of the Underminer.
General Info
HIP archives are big endian in all versions of each game. It's made up of 4 main sections:
- HIPA: this section is empty. It's used to mark the start of the file.
- PACK: this section contains general data about the archive, such as game name, creation date and number of assets.
- DICT: this section contains asset headers and layers. Each layer has a type and is composed of certain types of assets.
- STRM: this section contains the raw data for the assets. Each asset header references the STRM by an absolute offset.
Header Format
This header is present at the start of all sections.
char[4] sectionName int sectionSize
String Format
Strings do not contain a character count, are zero-terminated and aligned by two bytes (all strings will have either one or two zeroes after them). This also applies to empty strings (in this case, there will be two zeroes).
Padding
The data array of the DPAK section contains a lot of padding in order to align the file data. All padding is done by bytes which are equal to 0x33.
Structure
HIPA
This section is empty.
PACK
This section contains no data and 6 sub sections: PVER, PFLG, PCNT, PCRT, PMOD and PLAT (although PLAT is not present in Scooby Doo: Night of 100 Frights).
section PVER section PFLG section PCNT section PCRT section PMOD section PLAT
PVER
This section contains information about the archive version.
int subVersion int clientVersion int compatible
PFLG
This section contains archive flags.
int flags
PCNT
This section contains counters.
int AHDRCount \\ Amount of AHDR sections int LHDRCount \\ Amount of LHDR sections int sizeOfLargestSourceFileAsset int sizeOfLargestLayer int sizeOfLargestSourceVirtualAsset
PCRT
This section contains a date.
int fileDate \\ Date file was compiled string dateString \\ Date as string
PMOD
This section contains a date int modDate \\ Date file was last changed
PLAT
This section contains platform data. It's not present in Scooby Doo.
- Format for Battle for Bikini Bottom
string targetPlatform string targetPlatformName string regionFormat string language string targetGame
- Format for The Incredibles, Spongebob Movie and Rise of the Underminer
string targetPlatform string language string regionFormat string targetGame
DICT
This section contains no data and 2 sub sections: ATOC and LTOC.
section ATOC section LTOC
ATOC
This section contains one AINF sub section and an array of AHDR sub sections as specified in PCNT.
section AINF section[AHDRCount] AHDR
AINF
int unknown
AHDR
This section contains data and one ADBG sub section. AHDR is used to define an asset entry.
uint assetID \\ identifier ID for this asset, must be unique for each asset char[4] [[Asset|assetType]] \\ asset type int fileOffset \\ absolute int fileSize int plusValue \\ amount of padding after file data int flags section ADBG
ADBG
int alignment \\ file must be aligned to this amount of bytes in the stream, this will define the plusValue in the AHDR string assetName string assetFileName uint checksum \\ ignored
LTOC
This section contains one LINF sub section and an array of LHDR sub sections as specified in PCNT.
section LINF section[LHDRCount] LHDR
LINF
int unknown
LHDR
This section contains data and one LDBG sub section. LHDR is used to define a layer entry.
int layerType int assetAmount int[assetAmount] assetIDlist section LDBG
LDBG
int unknown
STRM
This section contains no data and 2 sub sections: DHDR and DPAK.
section DHDR section DPAK
DHDR
int unknown
DPAK
This section contains a byte array which contains all asset data. AHDR references this section by fileOffset. If AHDRCount is 0, this section is empty (no firstPadding or data).
int firstPadding \\ Initital padding at start of data byte[] data
Tools
HipHopTool and Industrial Park are tools capable of handling HIP files.