Filesystem Structure

Last modified: February 24 2014 12:52:44.        
For infos or suggestions, see the credits page        
  File System structure Editing Basics Hex/DC examples RevEngEd 2

Support Wikipedia

We'll refer to the path containing "HED2_SabreSquadron.exe" as"H&D2 main directory" or "main dir".
Usually, the main dir is "C:\Software\Illusion Softworks\Hidden & Dangerous 2\".

This is the main directory structure:

[brakets indicate directories, not files]
italic indicates example names
red indicates directories that original installation (aka "vanilla") won't create

- [Main dir]
   ° [Maps]
      * mapa_B1_2.bmp
      * b_lond149.bmp
      * ...other new textures
   ° [Mission]
      * [NEW_NORMANDY2]
         - actors.bin
         - loader.4ds
         - map.4ds
         - scene2.bin
         - scene.4ds
         - sounds.bin
         - tree.klz
         - ...other minor files
      * [NEW_AFRICA3]
         - actors.bin
         - loader.4ds
         - map.4ds
         - scene2.bin
         - scene.4ds
         - sounds.bin
         - tree.klz
         - ...other minor files
      * [...other Mission folders]
   ° [Models]
      * new_crate.4ds
      * ...other new models
   ° [...other directories]
   ° HED2_SabreSquadron.exe
   ° mpmaplist.txt
   ° ...other files

Maps contains textures. Textures are the images "sticked" on every object, like bricks on walls, tissues and skin on soldiers, background map when you hold "M", an so on. Normally, all textures are stored inside a .DTA file and regular maps load them from it. A newly created map could need new textures (usually .BMP files) and those texture will be placed inside [Maps] directory.

Mission contains several directories. Every directory is a new map, and the name of the directory is referenced by the mpmaplist.txt file.
Every directory contains these files:

  • actors.bin: commonly, interagible objects (MG, vehicles, ladders, crates) along with "game zones".
  • loader.4ds: this file is responsible for what you see when a mission is being loaded.
  • map.4ds: this file is responsible for what you see when you hold "M" button (game map).
  • scene2.bin: contains scene details (pots, barbed wire, trees) along with flags, respawns, lights.
  • scene.4ds: contains the main 3D scene, like walls, cliffs, terrain, buildings, etc.
  • sounds.bin contains sounds you can hear in background, like distant explosions.
  • tree.klz it's still uncertain how this file works, but is somehow involved in collisions (i.e. which objects are solid).

Models contains new meshes (objects) like a crate with new textures. Like Maps, normally, all models are stored inside a .DTA file and regular maps load them from it. A newly created map could need new models (usually .4DS files) and those models will be placed inside [Models] directory.

mpmaplist.txt is a plain text file, containing the list of maps you can see creating a new server (TODO image).
You can open it with notepad and notice a tag structure, like html or xml files (image). There are four main areas, corresponding to "deathmatch", "occupation" (teamplay), objective "mission" (hd2multiplayer) and "cooperative". In each, there are several blocks, stating with a <MAP> tag and pointing to a directory, for example dir="Normandy_mp". Newly created maps will have that folder inside the [Mission] folder.