A question about scenery BGL's

AndyG43

SOH-CM-2023
Trying to get my head round a few things. Looking at (for example) the Alphasim Enterprise, there are several different folders to put the Enterprise in different locations - would these locations be coded into the relevant Enterprise scenery .bgl?

btw, in case anybody gets the wrong idea, I'm not thinking of doing anything with the Enterprise or any existing Carrier; but I have something else I am working on, and I need to get an understanding of this issue.

Thanks
 
Unless I'm sadly mistaken, latitude and longitude are included in the source code for the compiled bgl, along with either the altitude or a yes/no switch for "at ground level."
 
You can decompile bgl files with a freeware program called Bglxml, which converts the bgl into a file that opens in Wordpad, Notepad or any text editor. You can find the location specs and make the changes there (in three different places, so don't miss any of them) then recompile into bgl format with Bglcomp, which comes in one of the FS SDKs.

I no longer recall where or how to get either of these programs, but I know that someone has saved all the SDKs in case they're no longer available from Microsoft. Bglxml should be available at any of the big download sites. I believe I recall both programs being included with one or more of Paul Clawson's carriers or battleships, but I don't remember which one(s).
 
I'm not really looking to decompile any bgls Mick, but I am trying to work on something (and I'm not telling what .... yet) and wondered the best way to get it ingame in the most usable way - looks like setting it up as a Rwy12-type library object might be the way for me to go.

OK, a related question for you gurus; is there any way to use, or set up, CFS2 ships as scenery/library objects in FS9?

Work with me gents, this could produce something quite interesting! ;-)
 
Andy

I don't know what information you are looking for so I will supply you with TMI. Take what you need leave behind what you don't.

There are two ways to place objects in the simulator. One is by making the object part of a library .bgl and then placing the library object with another .bgl file. The other is to place the object as one .bgl file that contains all the relative information.

Both methods could use multiple folders to place the object in different places although neither really need be in multiple folders. Confusing yes it is.

Library Object method

The primary .bgl file contains the .mdl file in the scenery .bgl file. It does not place the object anywhere so it will never show up in the simulation.

The secondary .bgl file contains all of the location data and calls for the GUID number of the library object. It alone will also display absolutely nothing in the simulation.

Both of these files can be place in the same folder although they do not need to be. Myself I would place them in the same folder for simplicity. When both of the bgl files are activated the object shows up.

In order to create a library object you must have the original .mdl file.

You can use Library Creator XML 2.0 by Arno to create a library object .bgl file.

http://www.fsdeveloper.com/forum/downloads.php?do=file&id=93

You also need BGL Compiler SDK for FS2004

http://www.fsdeveloper.com/forum/downloads.php?do=file&id=29

Example of the code to place the library object. You would compile this code with bglcomp.exe

Code:
<FSData version="9.0" xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
 xsi:noNamespaceSchemaLocation="bglcomp.xsd" >

<!--A comment about the file -->

	<SceneryObject 
		lat="47.271332" 
		lon="-125.200996" 
		alt="0.00" 
		pitch="0" 
		bank="0" 
		heading="082" 
		altitudeIsAgl="TRUE" 
		imageComplexity="NORMAL">

		<LibraryObject 
				name="{some GUID number}" 
				scale="1.0"/>

		</SceneryObject>
</FSData>

The benefit of the library object method is you only need one instance of the .mdl file for the object to show up. The draw back is if you install multiple instances of the same library object the textures will not show up on any instances of that object. Essentially FS becomes confused when this happens and it happens all too often because some developers don't fully understand how library objects should be used.

Scenery object method

The scenery object method uses bglComp to create a .bgl file that has all of the relevant data for the object and its placement. The downside to this method is when you do it this way each .bgl file has the .mdl file in it. Placing an object in the simulation this way just takes up more hard drive space.

You must have the .mdl file to compile the bgl file.

This method does not require you to use multiple folders to place the object but the designer could have used multiple folders.

Example of the xml code used to create the scenery object bgl. It also would be compiled by bglcomp.exe

Code:
<FSData version="9.0" xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
 xsi:noNamespaceSchemaLocation="bglcomp.xsd" >

	<ModelData
		name="GUID_number"
		sourceFile="GUID_number.mdl"
		fileOffset="0" />
		
	<SceneryObject 
			lat="21.283333" 
			lon="-157.937667" 
			alt="0.00"
			altitudeIsAgl="FALSE" 
			pitch="0.00" 
			bank="0.00" 
			heading="270.00"
			imageComplexity="NORMAL">

		<LibraryObject 
				name="GUID_number" 
				scale="1.00" />
			</SceneryObject>

</FSData>

Lets confuse the details even more.

since we are talking about FS9 carriers it is important to note that most FS9 carriers used an AFCAD for the hardened deck on the carrier. When you use an AFCAD you must also have a flatten placed under the AFCAD to prevent the water from running right up to the edge of the runway covering up the ship itself.

These flattens are typically placed in their own folder. I think and I am foggy on this they are placed below the object folder.

So what you may be seeing is multiple folders one may contain the object and the others may contain the flattens.

Now for the CFS2 objects. It can be done but please do not attempt it with out first getting permission from the original CFS2 developer.

How it can be done I do not know as I do not own CFS2.
 
Back
Top