Welcome to CFS2 Exploding objects using FS2004 Gamepack and MDLCommander! This is designed for
objects made in gMax at real world scale. All objects
in CFS2 are at world scale although it may not look like it from the cockpit of
your plane sometimes.
Required things
For this Tutorial you will need gMax
1.2, the FS2004 gMax Gamepack
and MDLCommander. The links below are from are current as of this tutorial.
gMax
1.2
http://www.turbosquid.com/gmax
FS2004 gMax
SDK/FS2004 Gamepack
http://www.fsdeveloper.com/forum/downloads.php?do=file&id=32
MDLCommander
http://www.docmoriarty.com/msfs/en/index.html
The install instructions for MDLC Commander seem to have left a few things out so I will give some basic instructions on the install of MDLC Commander
The first thing you will need to do is navigate to the
FS2004 gmapack folder (normally
C:\gmax\gamepacks\fs2004\plugins) Once at the FS2004 gmapack
folder you will need to rename the makemdl.exe
to mkmdl.exe, rename makemdl.parts.xml to mkmdl.parts.xml and rename makemdl.cfg to mkmdl.cfg
Copy or move the MDLCommander.exe to the FS2004 gmapack plugins folder. Rename MDLCommander.exe to makemdl.exe. Now MDL Commander has been installed.
Tutorial
You will be working with up to two batch file (.bat). If you do things right you will only need to use one. The 3rd is optional.
Make my object.bat: This is the main file you will be using. It will do a number of things you don’t see and give instructions along the way. Press any key on the keyboard to have the Make my object.bat move onto the next step.
Scasm Myobj Edit.bat: You will need to use this if you make an error in the Scasm_Myobj.sca. It will reopen the Scasm_Myobj.sca so the error or errors can be fixed and will make you’re Complete_My_Object.bgl like the Make my object.bat would have.
Folder Clean.bat: To make the one Complete_My_Object.bgl
up to 14 files may be made by you and the various programs that the Make
my object.bat will run. This will delete those file cleaning the folder up. It is optional
to use this.
For this Tutorial.doc I made a Green Tube and a Red Tube. The Green Tube is used for the undamaged object and Red Tube is for the destroyed/damaged object.
One you have made your undamaged object in gMax export as a Flightsim Aircraft Object (*.MDL) or as a Flightsim Scenery Object (*.MDL) with the name Myobj into the CFS2_Explo_Objs_Using_FS2004&MDL_Com folder.
MakeMDL will open and all you need to do is click start. When MakeMDL is done you may close it and load the damaged object.
One you have made your damaged object in gMax export as a Flightsim Aircraft Object (*.MDL) or as a Flightsim Scenery Object (*.MDL) with the name Myobj-d into the CFS2_Explo_Objs_Using_FS2004&MDL_Com folder.
MakeMDL will open and all you need to do is click start. When MakeMDL is done you may close it.
In the CFS2_Explo_Objs_Using_FS2004&MDL_Com folder you should have Myobj.x and Myobj-d.x. If you have both start the Make my object.bat!
The Make my object.bat will do most of the grunt/annoying work. Make my object.bat will open a small window and it will have instructions. Press any key on the keyboard to have the Make my object.bat move onto the next step.
Make my object.bat
instructions.
Welcome to CFS2 Exploding objects using FS2004 Gamepack and MDLC Commander Make my object.bat!
You should have Myobj.x and Myobj-d.x in the same folder as this Make my object.bat. The Myobj.x and Myobj-d.x were made when you saved Myobj.mdl
and Myobj-d.mdl in this folder.
This is detailed in the Tutorial as well is the rest of
the process to follow. If Myobj.x and Myobj-d.x are in the folder press any key on your keyboard
to start!
Press any key on the keyboard to have the Make my object.bat move onto the next step one you have done the required task.
If the MakeBGL window stays open like shown. Myobj.x or Myobj-d.x was not found by MakeBGL. If the MakeBGL window did not stays open you can skip Trouble shooting: text below.
Trouble shooting:
The Input File: will tell you what MakeBGL
was trying to load. (Myobj.x or Myobj-d.x) Close MakeBGL
and the Make my object.bat. Again check the
CFS2_Explo_Objs_Using_FS2004&MDL_Com folder and make sure the Myobj.x and Myobj-d.x
there and named right! One you have done so Re-run the Make my object.bat.
Make my object.bat
instructions.
You will need to copy the number listed at the end of Radius
in modeling units = of the Myobj_0.asm that will open next. Once you have this
number you can close the Myobj_0.asm.
Press any key to open the Myobj_0.asm.
You will need to copy or write the number listed at the end of Radius in modeling units = of the Myobj_0.asm For my tube the number is 120 and is highlighted. Once you have the number close the Myobj_0.asm and return to the Make my object.bat.
Make my object.bat
instructions.
Once you have the number from the end of Radius in
modeling units = press any key to open the Scasm_Myobj.sca
and follow the instructions it has!
Press any key to move to the next step!
Two things will open. GUID Maker by Richard Ludowise, aka rhumbaflappy
and Scasm_Myobj.sca The Scasm_Myobj.sca instructions are detailed so I won’t do
more than copy and paste them here.
Scasm_Myobj.sca instructions.
Delete the xx at the end of SIZE and paste the number
that was at the end of Radius in modelling units = in
place of the xx
At the ObjID line you will
see ( 4D9EF5D2 1ACE4BBE A6E5C777 D9B9858FE ) Delete
the numbers and letters that are in side of the ( ) and use GUID Maker by
Richard Ludowise. aka rhumbaflappy to make a
random ID. GUID Maker will make an ID that looks like this
C7EC08117E6D40D38F73E1C16D7A372A you will need to split them apart into groups
of 8 Ex: C7EC0811 7E6D40D3 8F73E1C1 6D7A372A.
Once you have split them apart into groups of 8 copy
and paste these numbers inside of the ( ). Once done the ObjID
line should look like this with out the ; at the
start.
ObjID( C7EC0811 7E6D40D3 8F73E1C1 6D7A372A )
No two objects can use the same ObjID
or it will cause issues like the two objects that are using the same ObjID will not work right and you may experience game
crashes!
Delete the My_object that is
in side of the " " and put the name of your object inside of the
" ". Use an _ for any space in the name. The
DP for your object will also use this name and this DP is placed into the
OBJECTS_DP folder.
Once you have done all of the needed editing you need
to go to File than Save or click on the X and click Yes
to save your changes. Also close GUID Maker as it will not be needed for any
of the following steps.
If you are using the included Green and Red tubes, use the name Tube_Demo. The needed Tube_Demo.dp is included and is found in the Tutorial_Files folder. With the changes done to the Scasm_Myobj.sca save and go back to the Make my object.bat and press any key to move to the next step.
Make my object.bat
instructions.
Check the Scasm compilation
status: line! It should say "Scasm compilation
status: ok". If it dose press any key to make your Complete_My_Object.bgl!
If not "ok" an error(s) has been made in the Scasm_Myobj.sca. Use the above info to find where you made
the error(s) and use the Scasm Myobj
Edit.bat to fix the error you error(s) in the Scasm_Myobj.sca.
You will need to close this window and run the Scasm Myobj Edit.bat
or close this window and re-run the Make my object.bat
to start over.
If the Scasm compilation status says ok. Press any key to move to the next step and you can skip Trouble shooting: text below.
Trouble shooting:
The two common errors you could see are "Error in line 35" and "Error in line 38". "Error in line 35" means you did something wrong with the ObjID and "Error in line 38" means an error with the SIZE or NAME line. The common "Error in line 38" is forgetting to replace the xx with the number take from the Radius in modeling units =
To edit the Scasm_Myobj.sca close the Make my object.bat window and run the Scasm Myobj Edit.bat to fix the error(s) in the Scasm_Myobj.sca. If you are unable to find the error(s) re-run the Make my object.bat to start over.
"Error in line 54" means that the Myobj-d_0.sca was not found and “Error in line 57" means Myobj_0.sca was not found. If you get “Error in line 54" or "Error in line 57" you must close the Make my object.bat window and re-run the Make my object.bat.
Make my object.bat
instructions.
Complete_My_Object.bgl
has been made!! The Complete_My_Object.bgl will need
to be place into one of the SCENEDB sub folders. Now all you have to do now is
make the dp file for your
object and you now have a destroyable object that you can use in mission
builder!
It is a good idea to change the name of Complete_My_Object.bgl to the name of your object. Do NOT
delete the .bgl at the end of the file name!
Move the Complete_My_Object.bgl to appropriate SCENEDB sub folder. (If your object is a vehicle place the Complete_My_Object.bgl in the veh folder and if your object is a building place the Complete_My_Object.bgl into the inf folder.
It is a good idea to rename Complete_My_Object.bgl to the name of your object. Do NOT delete the .bgl at the end of the file name or the object will not work!
As for the needed .DP file. You will need to make one or you may be able to use one of the stock CFS2 .DP files in the OBJECTS_DP folder. The name you used in the Scasm_Myobj.sca is the name that you DP file will be named and this DP is placed into the OBJECTS_DP folder.