Back

Developer Network
  File Specs
  Source codes
  Tables
  Mailing lists
  Knowledge Base

Other Games

 

 

Descent Developer Network
Descent 1/2

*.HAM, *.HXM specs

Introduction

This document was written by Heiko Herrmann, with help and information from Bryan Aamot and Garry Knudson.

Definitions and declarations for HAM/HXM files
IDTA specs - Model data

*.POF specs - Descent 1 model data

Table of POLYGON_MODELS
Table of POWERUP_TYPES
Table of REACTORS
Table of ROBOT_TYPES
Table of SOUNDS
Table of VCLIPS
Table of WCLIPS
Table of WEAPON_TYPES

Get Descent Manager HAXMEDIT/DOS - Advanced HAM/HXM file editor
Get Descent Manager HAXMEDIT32 - Advanced HAM/HXM file editor
Get HXMEDIT, a HXM editor with rather limited functionality
HXMEDIT source code
HAMSPECS example source code

 

DESCENT2.HAM format

The DESCENT2.HAM file, stored in your main Descent 2 directory, contains nearly all property resource data, of how each single robot, weapon, powerup, ... looks like, behave, results,... You can make a completely new game changing these settings... However, you should do that only for test purposes, as a) DESCENT2.HAM has a copyright and so changing and distributing is illegal and b) in a multiplayer game each player can have a different DESCENT2.HAM, this isn't tested, so multiplayer cheating is on the way and c) the changes are always affect ALL levels not only your custom level! So there are two other ways of adding (using an add-on HAM file as Vertigo does) and replacing (HXM) data in the DESCENT2.HAM! Bad is, that both -add-on-HAM and HXM- are only subsets of the DESCENT2.HAM, so not all blocks can be replaced/added using these two possibilities...

UINT32 signature; //"HAM!"
UINT32 version; //Version 1

//Offset 0x000008 - 910 textures a 2+20 bytes
UINT32 n_textures;
BITMAP_INDEX bitmaps[n_textures];
TMAP_INFO tmap_info[n_textures];

//Offset 0x004e40 - 254 sounds a 1+1 bytes
UINT32 n_sounds;
UINT8 sounds[n_sounds];
UINT8 alt_sounds[n_sounds];

//Offset 0x005040 - 107 vclips a 82 bytes
UINT32 n_vclips;
VCLIP vclips[n_vclips];

//Offset 0x00728a - 105 eclips a 130 bytes
UINT32 n_eclips;
ECLIP eclips[n_eclips];

//Offset 0x00a7e0 - 51 wclips a 126 bytes
UINT32 n_wclips;
WCLIP wclips[n_wclips];

//Offset 0x00c0fe - 66 robots a 480 bytes
UINT32 n_robot_types;
ROBOT_INFO robot_info[n_robot_types];

//Offset 0x013cc2 - 1145 joints a 8 bytes
UINT32 n_robot_joints;
JOINTPOS robot_joints[n_robot_joints];

//Offset 0x01608e - 62 weapons a 125 bytes
UINT32 n_weapon_types;
WEAPON_INFO weapon_info[n_weapon_types];

//Offset 0x017ed8 - 48 powerups a 16 bytes
UINT32 n_powerup_types;
POWERUP_TYPE_INFO powerup_info[n_powerup_types];

//Offset 0x0181dc - 166 models a 734+<variable>+4+4 bytes
UINT32 n_polygon_models;
POLYGON_MODEL polygon_models[n_polygon_models];
for (i=0; i<<n_polygon_models; i++)
 char model_data[polygon_models[i].model_data_size][i];
UINT32 dying_modelnums;
UINT32 dead_modelnums;

//Offset 0x13ce6e - 100 gauges a 2+2 bytes
UINT32 n_gauges;
BITMAP_INDEX lores_gagues[n_gauges];
BITMAP_INDEX hires_gagues[n_gauges];

//Offset 0x13d002 - 600 objectbitmaps a 2+2 bytes
BITMAP_INDEX obj_bitmaps;
UINT16 obj_bitmap_ptrs;

//Offset 0x13d966 - 132 bytes
PLAYER_SHIP single_player_ship;

//Offset 0x13d9ea - 6 cockpits a 2 bytes
UINT32 n_cockpits;
UINT16 cockpits[n_cockpits];

//Offset 0x13d9fa - 4 bytes
UINT32 first_multi_bitmap;

//Offset 0x13d9fe - 7 reactors a 200 bytes
UINT32 n_reactors;
REACTORS reactors[n_reactors];

//Offset 0x13df7a - 4 bytes
UINT32 marker_model_number;

//Offset 0x13df7e - 2600 a 2 bytes
UINT16 game_bitmap_xlat[2600];

 

V-HAM format

Vertigo Series demonstrates the usage of an add-on HAM. The type of HAM used here is delivered with the HOG and only used in that mission. There are three major differences between a HXM and an add-on HAM:

  • The HXM replaces elements of the DESCENT2.HAM, the HAM adds elements to the DESCENT2.HAM! That's the most important difference!
  • The HAM is for the whole mission, not for a single level as the HXM is.
  • You can add new robot weapon types (no player weapon types though).

UINT32 signature; //MAHX
UINT32 version; //Version 1

//Offset 0x000008 - 3 weapons a 125 bytes
UINT32 n_weapon_types;
WEAPON_INFO weapon_info[n_weapon_types];

//Offset 0x000183 - 12 robots a 480 bytes
UINT32 n_robot_types;
ROBOT_INFO robot_info[n_robot_types];

//Offset 0x001807 - 140 joints a 8 bytes
UINT32 n_robot_joints;
JOINTPOS robot_joint[n_robot_joints];

//Offset 0x001c6b - 13 models a 734+<variable>+4+4 bytes
UINT32 n_polygon_models;
POLYGON_MODEL polygon_models[n_polygon_models];
for (i=0; i<<n_polygon_models; i++)
 char model_data[polygon_models[i].model_data_size][i];
UINT32 dying_modelnums;
UINT32 dead_modelnums;

//Offset 0x023e81 - 55 bitmaps a 2 bytes
UINT32 n_object_bitmaps;
BITMAP_INDEX obj_bitmaps[n_object_bitmaps];

//Offset 0x023ef3 - 70 pointers a 4 bytes
UINT32 n_bitmap_ptrs;
UINT16 obj_bitmaps_ptrs[n_bitmap_ptrs];
UINT16 unknown;

 

HXM format

HXM files are new to Descent 2 V1.2! They replace items of the standard DESCENT2.HAM! An often-used example are the changings in the robot characteristics (for example letting a Medium Hulk shooting Plasma), which can easily be made with Descent Mission Builder 2.

Each HXM file is used by a single level only and must have the same name as the RL2 file it belongs to. So the HXM file for the level MYLEVEL.RL2 is named MYLEVEL.HXM! Also both files must be saved in the same HOG of course.

UINT32 signature; //"HMX!" => not HXM like the file extension
UINT32 version; //Version 1

UINT32 n_robot_types_to_replace;
for (i=0; i<<n_robot_types_to_replace; i++)
{
 UINT32 replaced_robot;
 ROBOT_INFO robot_info[replaced_robot];
}

UINT32 n_robot_joints_to_replace;
for (i=0; i<<n_robot_joints_to_replace; i++)
{
 UINT32 replaced_joint;
 JOINTPOS robot_joints[replaced_joint];
}

UINT32 n_polygon_models_to_replace;
for (i=0; i<<n_polygon_models_to_replace; i++)
{
 UINT32 replaced_model;  POLYGON_MODEL polygon_models[replaced_model];
 char model_data[polygon_models[replaced_model].model_data_size][replaced_model];
 UINT32 dying_modelnums[replaced_model];
 UINT32 dead_modelnums[replaced_model];
}

UINT32 n_object_bitmaps_to_replace;
for (i=0; i<<n_object_bitmaps_to_replace; i++)
{
 UINT32 replaced_objbmp;
 BITMAP_INDEX obj_bitmap[replaced_objbmp];
 UINT16 obj_bitmap_ptrs[replaced_objbmp];
}

 

 

All pages (C) 1996-2000 Descent Network Team
Everything taken from the Descent, FreeSpace, Red Faction and Summoner series games are
Copyright Interplay Productions , THQ Inc. , Parallax Software , Volition Inc. and/or Outrage Entertainment