Welcome to CFS2 Exploding objects using FS2004 Gamepack and Model Converter X! 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 ModelConverter X 1.30.
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
Model Converter X 1.30
http://www.fsdeveloper.com/forum/downloads.php?do=file&id=83
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 Scenery Object (*.MDL) with the name Myobj into the Explo_Objs_Using_FS2004&MCX folder.
One you have made your damaged object in gMax export as a Flightsim Scenery Object (*.MDL) with the name Myobj-d into the Explo_Objs_Using_FS2004&MCX folder.
Once you have exported your undamaged object as Myobj and the damaged object as name Myobj-d into the Explo_Objs_Using_FS2004&MCX folder you will now need to start Model Converter X.
With Model Converter X open click on Import and the Open window will pop up. Navigate to the place you have the Explo_Objs_Using_FS2004&MCX on your computer. Once you are at the Explo_Objs_Using_FS2004&MCX folder click on the Myobj.mdl than on Open.
When your object loads it will likely be covered with a checkerboard pattern and this is fine. The checkerboard pattern is used when Model Converter X can’t find the texture (.BMP File) for the object.
Click on Export. In the File name: box use Myobj At the Save as type: drop down chose FSX Object X file (*.X). Now make sure your saving the file into the Explo_Objs_Using_FS2004&MCX folder.
Now that the undamaged object has been saved in X file format (the Myobj.x) Time to do the same for the damaged object. Click on Import. You should be at Explo_Objs_Using_FS2004&MCX folder. If not re-navigate back to it. Click on the Myobj-d.mdl than on Open.
When your object loads click on Export. In the File name: box use Myobj-d At the Save as type: drop down chose FSX Object X file (*.X). Now make sure your saving the file into the Explo_Objs_Using_FS2004&MCX folder.
In the Explo_Objs_Using_FS2004&MCX 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 one you have done the required task.
Make my object.bat
instructions.
Welcome to CFS2 Exploding
objects using FS2004 Gamepack and Model Converter X 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 are made
with Model Converter X. 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.
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 Explo_Objs_Using_FS2004&MCX 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.