HOG files are essentially file archives like *.ZIP or *.RAR files. However HOG files are not compressed. They serve to "package" all the files needed by a single mission (levels, briefings, etc.).
- In Descent 1 you can either post the MSN and the RDL(s) or the MSN and a HOG containing all the RDL(s) into the D1 directory. The second way is however recommended.
- In Descent 2 you can either post the MN2 to \MISSIONS and the RL2(s) into D2 directory or the MN2 and a HOG containing all the RL2(s) into \MISSIONS. The second way became somewhat a standard; the first is quite unusual and so not very known (since the RL2 file then have to be in D2 dir and not in \MISSIONS).
- In Descent 3 you have a different HOG file format called HOG2 (see below).
Yahoma - An editor for *.HOG files
HOG2 specs - Descent 3 *.HOG/MN3 files
The file format is *VERY* easy as it is not packed, encoded or something like that! Normally you should begin Descent developing with a simple HOG file extractor to get in touch of the Descent file formats.
The file always starts with the 3-byte signature "DHF" (Descent HOG file). After that the files of a HOG are just attached after another, divided by a 17 bytes header, which specifies the name and length (in bytes) of the forthcoming file! So you just read the header with its information of how big the following file is, and then skip exact that number of bytes to get to the next file in that HOG.
char sig[3] = {'D', 'H', 'F'}; // "DHF"=Descent HOG File
struct {
char file_name[13]; // Filename, padded to 13 bytes with 0s
int file_size; // filesize in bytes
char data[file_size]; // The file data
} FILE_STRUCT; // Repeated until the end of the file.
|