To make our scenery, we need to create an XML file.
Click Start | Programs |Accessories | Notepad.
Once Open, we’ll save this file into the BGLComp folder to make it easier for us. Click File | Save As.
Use the Drop down menu to select the C: drive. Next double-click the Program Files folder followed by the FS2004SDK folder and finally the BGLCOMP_SDK folder.
Once set, change the file name to TestProject.XML. Be SURE you remove the .txt from the default file name and add .XML to the end of your new file name.
With the TestProject.XML open in Notepad, we can start entering our code.
XML-ing
Now that we are finally at the point where we can enter the code, you need to understand that the code in this case is VERY PICKY.
In most cases, the difference between upper case and lowercase letters is not that big of a deal for e-mail addresses and websites, for example.
In code, it can be the difference between successful compiling and a complete failure.
Believe me – when writing this, I had an uppercase letter in the code and the scenery WOULD NOT compile until I changed it to lower case… It took 15-20 minutes to find out what the problem was! When entering the code below be SURE to enter it exactly as shown.
Failure to do so will cause it to fail! The start of the XML file has to contain a header that defines the basics of the file. In XML, like HTML, commands are started by a definition of the command. A definition is started by a less-then sign (<), then the command, then a greater-than sign (>).
This followed by information that is to adhere to the command. When a command is to end, you add another less-than sign, the command again as before but with a forward slash in front of it and finally a closing greater-than sign.
As an example, to make something bold in HTML, you would write:
This file lists all the object names and their corresponding ID. The names used are very generic and not very descriptive. For this example, we used line 1830: “large_tower3 4a841b6d412c4e5648aa708b212cc767”. All you have to do is replace the 32-digit ID above with a 32-digit ID from the spreadsheet file to place your custom object. Of course you will want to set new coordinates for it. Also note that this list includes all FS2004 objects as well as older Combat Flight Simulator 2 objects.
These objects are NOT actually available to the Flight Simulator 2004! Back to the new code… Notice the scale is also part of this section. A scale of 1.0 means the object is drawn at normal size. If you wanted it to be drawn smaller, you can enter a number smaller than between 0.1 and 1.0. To make it larger, enter a number larger than 1.0. Ending this section is a closing statement “/>” Be sure you have this in your file as well or again, it won’t compile.
The last parts of the code are the closing commands. Add this to the bottom of your project file: Since we started a ‘SceneryObject’ in the second part of the file, we need to close it. Notice the forward slash in the file. This denotes a close to the command. After that, we are closing the FSData which was opened in the first line in the same way. Now that the code is all entered, it should look like this:
alt=”0″ altitudeIsAgl=”TRUE” pitch=”0″ bank=”0″ heading=”0″ imageComplexity=”NORMAL”> The next step is to save so click File | Save in Notepad. Now we can close Notepad. Now, you should still have the BGLCOMP_SDK folder open. If not, see the “BGLComping” section above to see how to browse into the BGLCOMPSDK folder. In this folder you should have the following files: bglcomp.exe bglcomp.xsd Chelan.xml EULA.rtf FS2004BGLCompSDK.doc Generic Building Textures.xls LibraryObjects.xls MortonWa.xml readme.txt TestProject.XML The last file, TestProject.XML is our file with the object code. Note that in here is the LibraryObjects.XLS file. This is the Excel Spreadsheet with the library object names and their corresponding 32-digit ID. To compile, all you have to do is click and drag the TestProject.XML ONTO the BGLCOMP.EXE file as shown below.