Jump to content


- - - - -

BGL to XML converter


  • Please log in to reply
11 replies to this topic

#1 Fsimfan

Fsimfan

    Download Manager\Contributor\Moderator

  • Download Manager
  • PipPipPipPipPipPipPipPip
  • 11,357 posts

Posted 19 February 2006 - 07:32 AM

Does anyone know of a program that converts bgl files to xml (or text) ?

I have a freeware scenery that is placing objects (trees and cars) in a weird position, and I would like to move those objects around for better placement.  I know which BGL file it is and I would like to open it and edit it.  Now I just need a program that allows me convert the bgl file to xml so I can tinker with it.

Any such programs?

Edited by Fsimfan, 19 February 2006 - 08:32 PM.


#2 TechnicolorYawn

TechnicolorYawn

    Orville Reincarnate

  • Members
  • PipPipPipPipPipPipPip
  • 8,581 posts
  • Location:Manchester, UK(EGCC)

Posted 19 February 2006 - 07:34 AM

I have a feeling there is. I've not used it myself, and I don't know what its called (sorry :D ), but I've heard about it on scenerydesign.org

#3 PiP

PiP

    Cruising at FL140

  • Members
  • PipPipPipPipPipPipPipPip
  • 14,896 posts
  • Location:Windermere, GB. EGNL

Posted 19 February 2006 - 07:39 AM

It would take an "un-bglcomp".

I'd duspect that bgl file used to be several xml files thet were ped into bglcomp. So in theory the reverse is posible.

#4 Fsimfan

Fsimfan

    Download Manager\Contributor\Moderator

  • Download Manager
  • PipPipPipPipPipPipPipPip
  • 11,357 posts

Posted 19 February 2006 - 11:08 AM

PiP, on Feb 19 2006, 07:39 AM, said:

So in theory the reverse is posible.
Yes, I'm hoping it can be done.  :D

#5 TechnicolorYawn

TechnicolorYawn

    Orville Reincarnate

  • Members
  • PipPipPipPipPipPipPip
  • 8,581 posts
  • Location:Manchester, UK(EGCC)

Posted 19 February 2006 - 11:49 AM

How about this:

http://fskb.xineo.ne...e=NewBGLAnalyze

#6 IBtheSarge

IBtheSarge

    First Class Member

  • Moderator
  • PipPipPipPipPipPipPipPip
  • 10,717 posts
  • Location:Central Florida

Posted 19 February 2006 - 12:45 PM

It does a pretty good job; disassembles the scenery BGL file to a TXT file.  However, unless you know which GUID is for which object, it isn't going to do you much good.  Lat, Lon, Heading, and GUID is all the useful info you're going to get.  You would need the designer's list of object name + associated GUID to know which object your removing or repositioning.

If the designer used API/SCA object files to make the scenery BGL, you might get a bit more data IF the designer included ";" comments for each object.  But anything using MDL objects isn't going to do you much good without the references for the GUIDs.

(Edit) Disregard comment about BGL's created from API/SCA objects; those would have been compiled using SCASM.  After further testing, it only works with scenery BGL files that were compiled using the bglcomp_SDK.  Attempts to decompile SCASM-generated BGL's get the error message that it can't open old-style files.

Edited by sarge, 19 February 2006 - 12:55 PM.


#7 TechnicolorYawn

TechnicolorYawn

    Orville Reincarnate

  • Members
  • PipPipPipPipPipPipPip
  • 8,581 posts
  • Location:Manchester, UK(EGCC)

Posted 19 February 2006 - 01:41 PM

There is a version of that app that will open old style SCASM generated files. That one I mentioned is for new-version ones.

#8 Fsimfan

Fsimfan

    Download Manager\Contributor\Moderator

  • Download Manager
  • PipPipPipPipPipPipPipPip
  • 11,357 posts

Posted 19 February 2006 - 02:18 PM

TechnicolorYawn, on Feb 19 2006, 11:49 AM, said:

Thanks Chris!  :D  This seems to be just what I'm looking for.  :)

@Sarge: Yes, it looks like I probably will have to rely on the Latitude, Longitude info to identify the objects in question.  I'm fairly new to the scenery development aspect of FS, and have recently started to put runways and a few objects in some favorite areas of mine. After testing a few default objects from Microsoft's list of Library Objects with their accompanying GUIDs, I was encouraged that I could possibly do this, even though I'm just starting to discover this new side to FS.

And your article helped tremendously Sarge! Thanks!   :D

#9 IBtheSarge

IBtheSarge

    First Class Member

  • Moderator
  • PipPipPipPipPipPipPipPip
  • 10,717 posts
  • Location:Central Florida

Posted 20 February 2006 - 08:18 AM

Fsimfan, on Feb 19 2006, 03:18 PM, said:

And your article helped tremendously Sarge! Thanks!   :D
Glad it helped .... I'm putting the finishing touches on a comprehensive "how to" on placement of ANY .mdl object from ANY library object file (be it Rwy 12, EZ-Scenery, or other) as long as you have the list of GUIDs for the objects.  It will include the tools and steps for making your own library object file from .mdl objects you create in GMAX or FSDS3.  Creating flatten and exclude zones via XML and compiling with bglcomp.exe will also be attached to the "how to" file.

Nothing like one-stop shopping, eh?   :D

@TCY -- you don't happen to have a link to the version that decompiles the SCASM based BGL's, do you?  It probably won't work for scenery designed for FS X since it appears SCASM support is going to fade away in favor of bglcomp_SDK processes.  But so long as FS2004 is around, it would sure help ......

#10 Fsimfan

Fsimfan

    Download Manager\Contributor\Moderator

  • Download Manager
  • PipPipPipPipPipPipPipPip
  • 11,357 posts

Posted 20 February 2006 - 08:39 AM

sarge, on Feb 19 2006, 12:45 PM, said:

Attempts to decompile SCASM-generated BGL's get the error message that it can't open old-style files.
Oh no, that's what I just got! :D

I downloaded the NewBglAnalyze program and tried to disassemble that BGL file, and this is what it says:

Posted Image

Apparently this seems to be a SCASM based BGL. I'm going to join Sarge in asking TCY if he has the link to the version that handles SCASM based BGLs, it would sure help. :)

Sarge, I'm really looking forward to your comprehensive "how to" guide.  I enjoyed your earlier tutorial, it was clear, logical, well organized, and easy to understand.   I have no doubt that this one will be of the same caliber.    :D

#11 TechnicolorYawn

TechnicolorYawn

    Orville Reincarnate

  • Members
  • PipPipPipPipPipPipPip
  • 8,581 posts
  • Location:Manchester, UK(EGCC)

Posted 20 February 2006 - 08:48 AM

http://www.scenery.o...utilities_a.htm

Its called 'BGLAnalyze' :D

#12 Fsimfan

Fsimfan

    Download Manager\Contributor\Moderator

  • Download Manager
  • PipPipPipPipPipPipPipPip
  • 11,357 posts

Posted 20 February 2006 - 09:21 AM

TechnicolorYawn, on Feb 20 2006, 08:48 AM, said:

Woohoo! That worked!  You're the man, Chris!  :D

It disassembled the BGL file and saved it  with a .sca extension which I was able to open in notepad.  It may take some time to understand most of what's in there, but at least now I can see what was inside that pesky BGL!  It's a start!

Time for me to roll up my sleeves and look under the hood, and learn.  :D

Edited by Fsimfan, 20 February 2006 - 09:24 AM.