USE ANY DEFAULT OBJECT
10-30-2004, 19:38 PM
Re: USE ANY DEFAULT OBJECT
--------------------------------------------------------------------------------
So you want to use any FS2004 default library objects in your scenery?
You know that most default library objects are region-coded to the specific place that they appear in FS world. Therefore you just cannot use them in other locations, they won't appear.
But there is a simple technique to overcome that limitation. Let's have an example, say you would like to place the Empire State building in the middle of Madrid Airport, Spain.
Do as follows:
1) First identify the object you're interested in, by opening the file libraryobjects.xls included in the MS Bglcomp SDK. It is an Excel spreadsheet. There do a search and you will find the Empire State as "LDM_ny_empirestate", with GUI=3ebedf0d11d2f0721000849c2ae60c5a, in row 241 of the sheet. Now we have to find the mdl for that GUI.
2) Disassemble the file Newyork.bgl (included in FS9\scenery\name\scenery) with NewBGLAnalyze. You will see that the file is in fact a library object file. By disassembling you obtain the file Newyork.xml and a lot of mdl files (all the objects contained in that file). You have to find out which mdl file is for the Empire State building, ok? Simple, open Newyork.xml and search for the GUI, and you will see it is in the file NewYork_04.mdl.
3) Write following code in xml
**********************************
<FSData version="9.0" xmlns:xsi='
http://www.w3.org/2001/XMLSchema-instance'
xsi:noNamespaceSchemaLocation="bglcomp.xsd" >
<ModelData
name="3ebedf0d11d2f0721000849c2ae60c5a"
sourceFile="newyork_04.mdl"
fileOffset="0"/>
<SceneryObject lat="N40.472231" lon="W3.560944" alt="0.00"
altitudeIsAgl="TRUE" pitch="0.00" bank="0.00" heading="270"
imageComplexity="NORMAL">
<LibraryObject name="3ebedf0d11d2f0721000849c2ae60c5a" scale="1.00" />
</SceneryObject>
</FSData>
***********************************
Use the corect GUI for the Empire State, and adjust the lat/lon values to where you want it, in this example I placed it in LEMD, Spain.
You can write it with Notepad and save it as empire.xml for example
4) Now take the file you just created and place it in the folder where you have bglcomp, TOGETHER with the Newyork_04.bgl file.
5) Compile empire.xml. Drag it into bglcomp icon, and if no errors, a new file called empire.bgl will be created.
6) Take the just created file and place it in FS9\addon scenery\scenery. It is not over yet, you have to look for the textures. Go into FS9\scenery\name\texture and easily you will find that the Empire State building uses textures LDM_ny_empirestate.bmp and LDM_ny_empirestate_lm.bmp. Copy those two textures to FS9\addon scenery\texture folder.
7) See the result. Open FS9, go to airport LEMD, look around, you will find the Empire State building right by the BRA VOR!! (in fact, in the reference point of the airport).