Milkshape3D CMP Exporter v0.1
-----------------------------

  What this plugin can do:
 --------------------------

 - It can export a model with multiple meshes and using multiple materials to CMP format.
 - It can place hardpoints on a ship, using especially made textures.

  What this plugin can't do (but is planned for future versions):
 -----------------------------------------------------------------
 - Properly do wireframe (as soon as VMeshWire is documented)
 - Animated ships.
 - Destroyable ship components.
 - Eventually cover objects other than ships


Plugin instructions:

- Don't forget to name the first mesh! This name must be unique (there can't be another mesh
  with the same name), as the game will create an ID partly based on it.
- The first mesh must be a model mesh. After that, there can be other model meshes or 
  Hardpoint meshes, in no particular order. See below regarding hardpoint meshes.
- Name carefully the materials you're using, as the plugin will need this information. Also,
  keep these names in mind, as the names will need to be the same on the ship MAT. Material
  names must also be unique.
- Hardpoints can be defined by using meshes with a single triangle. These meshes must be 
  named: Hp|Type|Hardpoint_name (for example: Hp|Fixed|HpEngine01). The position of the
  hardpoint will be the average of the 3 triangle vertices, while the orientation will be
  based on the normal of the closest triangle center on the model.
- After you're done, export the CMP file.
- VERY IMPORTANT: If you change a material name or the main mesh name, you must export the
  CMP again.


MAT instructions:

  Although the plugin only takes care of CMP files, here are some instructions for creating
  MAT files. For now MAT files must be created manually with the UTF editor (until a 
  dedicated MAT builder is made)

- The names of the entries under "matrial library" must be the same as the ones used on the
  exported CMP file. Remember these names must be unique (there can't be a material with the
  same name).
- Name "texture library" entries as with the same name as "material library" entries, with
  ".TGA" afterwards (for example, if the entry on "material library" is named "dralthi", name
  the "texture library" entry as "dralthi.TGA")

  To add a texture, begin by adding an entry under "material library". This entry must have
  2 fields, "Dt_name" (with the name of the respective "texture library" entry) and "Type"
  (always "DcDt"). Then add a new "texture library" entry with a field named either "MIPS" or
  "MIP0" (respectively, import the DDS or TGA file there)


An example of a Dralthi model, from Wing Commander Prophecy, is included, so you can start 
immediately playing around with the plugin and have some base for comparison in case things
aren't going well on your conversion. Most common mistakes are naming materials differently
in Milkshape and in the MAT, and importing a TGA texture as a compressed TGA (it must be
an uncompressed one). Again, remember mesh and material names must be unique!

Regarding scale and orientation of the model, the plugin rotates and scales the meshes quite
a bit, in order to make it easier to port StarLancer ships into FreeLancer. Refer to the
included Dralthi example for more information.

To use the created MAT and CMP, you need to edit the INI files. INI editing is beyond the
scope of this document, so please check the Lancer's Reactor forums for more information.


--
Mario Brito
(HCl at the Lancer's Reactor)
mbrito@student.dei.uc.pt