Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Editing BGL files

Featured Replies

I am I suppose a relative beginner here, so maybe I am making some stupid errors. I'd really appreciate some advice.Basic editing of bgls is OK I think - I use BglAnalyze or NewBglAnalyze to decompile the bgl files and SCASM to recompile. I also use an XML editor to edit XML files directly and BGLComp_SDK to remake the bgl. No problems there - usually.But I am lost when I decompile a scenery bgl file to an XML and find I get a tiny XML file as a result plus dozens of small (or one large) .mdl file(s). What do I do then? I am trying to remove some static ships from some scenery, but am now up against a brick wall as I can't, clearly, get into the mdl files. The XML file produced has just one line of data.Any help gladly received.Thanks,Martin

Martin Stebbing, EGLF (UK)

Jon "scruffyduck" Masterson has a spiffy little FS9 tool called Object Viewer (or maybe Library Object Viewer) which can draw those mdls. The model is actually placed, though, by a sceneryObject element, which might be in a different file than the mdl library.Go here and click on utilities to get:http://www.scruffyduckscenery.co.uk/scott s..

  • Author

Got it. Haven't tried it out yet, but many thanks for the lead. Will post back if I have problems!!Martin

Martin Stebbing, EGLF (UK)

  • Commercial Member

The MDL object "only" contains the actual object, so if you want to remove some statics you will not have to do anything to these files.You'll see that in the XML code the MDL object is assigned to a GUID with the ModelData command. This GUID is then used in the SceneryObject/LibraryObject command. So once you know the GUID of the object you want to have gone, you can just remove these placement lines from the XML.

Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

  • Author

I'm at a bit of a loss here Arno! You mean that I should find out which mdl file contains what I want to get rid of, delete it, and recompile the remainder? Not sure I know how to recompile once I've got an xml file and several mdl files? Or do I? Maybe I do - I am getting a bit 'swimmy' now with all the possibilities!!The last bgl I decompiled ended up with a 1kb xml file and one large mdl file. I gave up at that point ...M.

Martin Stebbing, EGLF (UK)

  • Commercial Member

Hi,You can recompile the XML with BGLComp, which is part of the SDK. You will indeed have to figure out which MDL contains the objects you want to remove and than you need to remove the lines calling that object (not the MDL itself).

Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

  • Author

Thanks, that is excatly what I would have done. The problem with the file I wanted to edit though is that when I decompile it I get one large mdl file (550kb as far as I recall) only and there is just one line in the xml file. There's nothing to edit as far as I can see.If this is odd I can copy what appears there and post it here?Martin

Martin Stebbing, EGLF (UK)

Hello Martin,There are different types of scenery files: - a bgl containing the object models and placement information; - a bgl only containing the object models, also known as an object library; - a bgl that only contains placement information of objects that are contained in another bgl.It seems that you have decompiled an object library. It only has the models inside, and does not show where they are placed.You can do one of two things: - delete the model from the collection, recompile the object library, and since the unwanted model is no longer present in the library, it will no longer display in game; - or, find the placement bgl, decompile it, remove the placement information for that model, recompile it.Probably the second option is the best.Best regards.Luis

do.png Hot, humid Caribbean paradise!
  • Author

Thanks both for your replies. I do already have lwmviewer installed, though I haven't used it for a while. I'll have a look and see how I get on.In the end, it's an awful lot of work (=learning!), just to remove one or two static aircraft, but the real point, of course, IS the learning: the removal of the static aircraft is a sort of reward at the end for having learned how to do it (if I ever get that far)!Thanks again,Martin

Martin Stebbing, EGLF (UK)

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.