X file saving with MDLCommander

From FSDeveloper Wiki
Jump to: navigation, search

Sometimes having access to the X files created by GMax can help you in the design process. A common example of this is when you want to compile ground polygons using the Fs2002 gamepack, but you don't own Fs2002 Pro. In that case you don't have all files needed for the gamepack, but saving a X file from the Fs2004 gamepack can help you out. So how do you save that X file?

You will need to use a tool called MDLCommander for that. The tool gives you a lot more options, but most of them are not really useful to scenery designers. If you want to know more about them, read the documentation of MDLCommander. In the remainder of this article we will focus on saving the X files only.

Installing MDLCommander

Before you can use MDLCommander, it needs to be installed of course. This is explained nicely in the documentation, but as it often seems to give problems, we will describe the process here as well. To install MDLCommander you need to take the following steps:

  1. Go the plugins subfolder of the Fs2004 gamepack folder
  2. Rename the existing makemdl.exe to mkmdl.exe
  3. Rename the existing makemdl.parts.xml to mkmdl.parts.xml
  4. Copy the file mdlcommander.exe from the MDLCommader package you downloaded to the plugins folder
  5. Rename mdlcommander.exe to makemdl.exe

This will ensure that GMax now calls MDLCommander instead of MAkeMDL directly when you export your object. Which gives you the option to do some special tricks. You will also notice that you do now get a GUI again during the export (just like the Fs2002 gamepack always did), where you can select the MakeMDL settings.

Configuring MDLCommander

We first need to tell MDLCommander what we want it to do, so therefore you need to make a little configuration file. Unfortunately this configuration has to be set for each object you are going to export, as the file should have the same name as the MDL file you are saving. So assume that you are export a MDL object called myhouse.mdl, in that case you need to create a MDLCommander configuration file called myhouse.par in the folder you are exporting to.

This PAR file is just a plain ASCII text file, so you can easily create it with notepad. When you save the file, be sure that Windows does not give it the extension .par.txt, which can happen if you have hidden file extensions in Windows. To save the X file during the export, you need to put the following text in the PAR file:


After you exported your object, you should now see that the X file that MakeMDL used has been saved in the folder you exported to. So you are now ready to use it in whatever way you want, how to do that is outside the scope of this article.

Final remark

Just a final remark this article describes how to use MDLCommander with the Fs2004 GMax gamepack. You can also use it with the Fs2002 gamepack, in that case you don't have to rename the file makemdl.parts.xml, as it does not exist in the Fs2002 gamepack. For the FsX gamepack MDLCommander does not work.