• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FS X BGL file structure

Messages
74
Country
germany
I tried to put together evrything I have learned about the bgl file structure in FS X in one document which I want to make available to all of you; you find it attached to this post. I would be grateful for any comments and corrections.
Winfried
 

Attachments

  • FSX File structure.pdf
    101.1 KB · Views: 3,103
Thanks Winfried,

I have been doing the same thing as I develop SDE. I will let you know if there is anything that I have found which you do not have in your document :)
 
This is pretty much the showcase of when to use a Wiki indstead of a document maintained by a single person. :)
 
Given that Wifried is pretty much the only person that I know of who has identified the bgl format for both FS9 and FSX and made the information available to the community it seems fair enough to me at the moment. There is a section in the Wiki where he has put some of the information and I am sure it will end up there in due course :)
 
I am sorry, but my experience with the WIKI format was rather negative: it is much too difficult to put the data into a tabular format.
 
Hi Winfried

I would not be concerned about that. I have the same problem :) For me, the most important thing is that the information is available and Thank you. :)
 
I fully agree with Winfried and Jon.
The most important fact is to produce the materials and not where.

a Happy Newyear and a Happy design one too...
Bert
 
Many thanks for providing that information and keep up the good work !
It will for sure help me getting started with parsing them bgl's for stuff that i need to know in my addon.

And a happy new year to all of you!
 
Hi Winfried

I am looking at the 0x003b record which, as you say, is present in each FSX airport. I am wondering if it is related to the airport 'polygon' in some way. I seem to recall in FS9 there was a separate set of bgl files containing airport backgrounds. Are these now in the cvx files? The backgrounds obviously can't be made using bglComp - although that would have been rather nice :)
 
Thanks a ton, been looking forward to that. :)

Page 3, second table:
Airport data should have ID 0x3c. Have not checked the other ones yet, but that one caught my eye immediately.

EDIT
Actually I might be wrong - the ID within the pointer seems to have remained 0x0003 while the actual record has 0x3c. Shame on me. ;)
 
Last edited:
I fully agree with Winfried and Jon.
The most important fact is to produce the materials and not where.

a Happy Newyear and a Happy design one too...
Bert

You use a Wiki because of how the material is created. Hence recommending the Wiki has abselutely nothing to do with where it is done.
 
Beacons

Winfried,

I can't find mention of Beacons in the document. They have an ID of 0x011 in FSX. I think you refer to them in attachedObject but they can also exist as a stand-alone object in FS9 and FSX. The Beacon code being nested in a SceneryObject. I have done a test with SDE and I can create a stand-alone beacon which compiles fine and decompiles also as a Scenery Object with type ID of 11.

EDIT
It is also interesting to note that the compiler throws out any MILITARY beacon which has a HELIPORT or SEA_BASE base type. The only acceptable option is AIRPORT. There is no mention of that in the SDK that I can find
 
Last edited:
Maybe I forgot those beacons being used as seperate objects. You are perfectly right, they can be used that way (although up to now I have not found an instance of that in the MS scenery files ...) The obvious use of them is the attachment on top of a tower or a special base, MS has some special base for that purpose in the objects library.
 
FS9 compatibility and Small fix

I tried to put together evrything I have learned about the bgl file structure in FS X in one document which I want to make available to all of you; you find it attached to this post. I would be grateful for any comments and corrections.
Winfried

Hello Winfried,
I am trying to use your document with FS9 BGL files and it almost works fine, except some little problems. Do you know the differences between FS9 and FSX formats?
Or do you have the same document available for FS9?

Anyway, I noticed a small problem in the longitude transformation formula. The one I use is the following:
(double) lon = lon * 360.0 / (3 * 0x10000000) - 180.0
Just moving a parenthesis changed the result...

Thanks,
Eric
 
Given that Wifried is pretty much the only person that I know of who has identified the bgl format for both FS9 and FSX and made the information available to the community it seems fair enough to me at the moment. There is a section in the Wiki where he has put some of the information and I am sure it will end up there in due course :)

Hi,
Can you please let me know where the FS9 document is available?

Thanks,
Eric

EDIT
Please forget my request, I found it ;-)
 
Last edited:
FSX BGL file structure

Some comments/additions to try and add to the FSX structure brilliantly outlined by Winfried Orthmann's PDF.

Analysing all the apx, brx, atx, nvx files in FSX...

Headers
The value 0x1992 does indeed appear in all files as the version number in the header.

Of the three unknowns in the header starting at offset 12, the DWORD at 16 always begins 0x01C?????, the DWORD at 20 is always the value 0x08051803 (a magic number for FSX perhaps?).

The other unknowns at the end of the header, if viewed as DWORD dwReserved[7] followed by a WORD could be perhaps positions as Winfried suggests. As a general rule the DWORDs tend to increase in steps as:
00081A70,00081A73,00081A75,00081A76,00081A79,00081A7A,00081A7B,069F
though there are a few exceptions to this:
00081AA0,00081AA2,00081AA3,000206A9,00081AA8,00081AA9,00081AAD,0000 :confused:
One thing common to all headers however is that when one of the earlier DWORDS is zero then so are all the values that follow it. Some headers just make use of one non-zero DWORD so that might tend to indicate that they are something other positions specifying an area. The first position is always non-zero anyway (required).

Section types
As well as the listed section types there are the types; 0x028, 0x029 and 0x02A. All three appear in apx files, while only 0x002A appears in atx files and only 0x0028 and 0x0029 in nvx files.

Subrecords
Of the 1525 apx bgl files searched I have only found \fsx\scenery\0001\scenery\apx03130.bgl that doesn't have a 0x003B subrecord. All the rest have.

Some apx files also have an unknown 0x003D subrecord of variable length and unknown meaning.

The unknown in TaxiwayPoint subrecords is indeed always 0x0000 (reserved).
 
0x028 and 0x029 are Vor2 and ndb2 records respectively. I have mentioned them in another post. Each record of these types are 12 bytes long. I have not had time to investigate whether there is anything useful in them or whether they are there to make the Scenery Engines' job easier. I've not encountered 0x02A but I will look out for it now :)
 
Back
Top