Help required writing XML code please
Results 1 to 6 of 6

Thread: Help required writing XML code please

  1. #1

    Help required writing XML code please

    I mostly fly low level between 2 and 5 thousand and would like to add my home,a local landmark and my nearest waypoint
    into Fs2004.

    I have the lat. and long.(from Google Maps) of the points I'd like to add,but haven't a clue about XML code that I believe
    I need so I can add then in.

    I have the Microsoft SDK and roughly understand how to use it to make a BGL file to add into World scenery and activate
    the VRP/waypoint.

    If someone could create the XML file for me to use I'd be most grateful.

  2. #2
    Quote Originally Posted by Miggers View Post
    I mostly fly low level between 2 and 5 thousand and would like to add my home,a local landmark and my nearest waypoint
    into Fs2004.

    I have the lat. and long.(from Google Maps) of the points I'd like to add,but haven't a clue about XML code that I believe
    I need so I can add then in.

    I have the Microsoft SDK and roughly understand how to use it to make a BGL file to add into World scenery and activate
    the VRP/waypoint.

    If someone could create the XML file for me to use I'd be most grateful.
    Don't know much about that either, but there is this little file at Avsim which puts little beacons at vfr waypoints if that helps

    Attachment 84472

    ttfn

    Pete

  3. #3
    SOH-CM-2024 Mick's Avatar
    Join Date
    Jun 2005
    Location
    Easthampton, Mass., U.S.A.
    Age
    76
    Posts
    3,413
    I take it that you already have your digital home in the form of a BGL file, and I take it that the SDK you refer to is BGLcomp. That's the one you need.

    BGLcomp will to half of the job for you - the second half. The first half is to open the BGL file and put in your coordinates.

    You need another program to do that, and it's: "BGLXML by Alessandro G. Antonini ... a utility which disassembles BGL files into ... FS2004 format and produces an XML file to be compiled with Microsoft BGLCOMP..."

    You can get it at AvSim:

    https://library.avsim.net/download.php?DLID=75329&Cookie=1

    Open the BLG with BGLxml. The XML file will prefer to open in Wordpad, but many years ago the late, great Paul Clawson warned me that Wordpad can scramble a BGL file and to always open them in Notepad. I've always followed that advice, so I don't know if Wordpad will really scramble an XML file. Maybe not, but to play it safe, use Notepad.

    Anyway, once you open the XML file, just substitute the desired latitude and longitude for whatever is in there
    . Be sure the altitude is set to zero AGL. Then compile the XML file into a BGL with BGLcomp. Then just drop the bgl into any active scenery folder in Scenery or AddOn Scenery.

    If you haven't already got your home into a BGL file, I can't help with that part. I don't know how to make a BGL, only how to move them around.

  4. #4
    Quote Originally Posted by Motormouse View Post
    Don't know much about that either, but there is this little file at Avsim which puts little beacons at vfr waypoints if that helps

    Attachment 84472

    ttfn

    Pete
    Cheers Pete,I'll nab that.

    Quote Originally Posted by Mick View Post
    I take it that you already have your digital home in the form of a BGL file, and I take it that the SDK you refer to is BGLcomp. That's the one you need.

    BGLcomp will to half of the job for you - the second half. The first half is to open the BGL file and put in your coordinates.

    You need another program to do that, and it's: "BGLXML by Alessandro G. Antonini ... a utility which disassembles BGL files into ... FS2004 format and produces an XML file to be compiled with Microsoft BGLCOMP..."

    You can get it at AvSim:

    https://library.avsim.net/download.php?DLID=75329&Cookie=1

    Open the BLG with BGLxml. The XML file will prefer to open in Wordpad, but many years ago the late, great Paul Clawson warned me that Wordpad can scramble a BGL file and to always open them in Notepad. I've always followed that advice, so I don't know if Wordpad will really scramble an XML file. Maybe not, but to play it safe, use Notepad.

    Anyway, once you open the XML file, just substitute the desired latitude and longitude for whatever is in there
    . Be sure the altitude is set to zero AGL. Then compile the XML file into a BGL with BGLcomp. Then just drop the bgl into any active scenery folder in Scenery or AddOn Scenery.

    If you haven't already got your home into a BGL file, I can't help with that part. I don't know how to make a BGL, only how to move them around.
    Hiya Mick,
    I don't have it in any form except Notepad,like this:

    HOMES


    Lat. 53.09124071648439


    Long.-2.2258526086831636


    MOWCO


    Lat.53.114790322568304


    Long -2.2129726409299004


    LISTO


    Lat.53.14333


    Long.-2.19917

    HOMES is my house,MOWCO a local landmark and LISTO my nearest VRP(for real) hence my request for the above to
    be re-written in XML so that I can convert it to a BGL.

    Where inside Fs9 would I find a BGL that I can open and re-write?

  5. #5
    SOH-CM-2024 Mick's Avatar
    Join Date
    Jun 2005
    Location
    Easthampton, Mass., U.S.A.
    Age
    76
    Posts
    3,413
    Quote Originally Posted by Miggers View Post
    Cheers Pete,I'll nab that.



    Hiya Mick,
    I don't have it in any form except Notepad,like this:
    HOMES
    Lat. 53.09124071648439
    Long.-2.2258526086831636
    MOWCO
    Lat.53.114790322568304
    Long -2.2129726409299004
    LISTO
    Lat.53.14333
    Long.-2.19917
    HOMES is my house,MOWCO a local landmark and LISTO my nearest VRP(for real) hence my request for the above to
    be re-written in XML so that I can convert it to a BGL.
    Where inside Fs9 would I find a BGL that I can open and re-write?
    There are BGL files all over FS9, in any scenery folder.

    I see coordinates in your information but no indication of what model is supposed to go there. The coordinates place a scenery object (model) and you don't have any indication of any scenery objects to be placed at your coordinates. I see names but nothing like the long unique identifiers that are used to identify models.

    Open any scenery object BGL and you'll see how the information is listed. There are many things that are contained in BGL files and not all of them have anything to do with scenery objects. There are AFCAD files, effect placements (ship wakes, lights, smoke, etc.), object libraries and whatnot
    , so find one that is just a singe object like a ship, ship wake, smoke or light effect, that is displayed in a sim as a part of some scenery, a building or other structure like a windsock. Once you understand how they are set up you can get fancy and put all three of your objects into one BGL file.

    I suggest that you get familiar with BGLcomp and BGLxml, and with a scenery object placement program like ADE9X or Static Aircraft Model Maker. Fiddling with those will let you see how the information fits into the XML file. If you don't already have models of your home and the other items, you can either build them with a model-building program like Gmax or FSDS, or find a static object library that has items similar to what you need, and use those.

    Learning how to place static objects (models) is pretty easy, but before you can place them you have to have objects to place. That means either getting them from a static object library or making them yourself. You can use objects that exist in FS - there are static object libraries compiled of them that you can find on line - but the odds of finding a stock object that looks just like you house are probably about zero. Add-on libraries might have something you can use. If you use an object placement program you won't have to write the XML file yourself from scratch with maximum probability of error and minimal probability of success. This is why scenery developers use object placement programs.

    You might also get some tips from one of the late, great David "Opa" Marshall's tutorials or the kits he made for placing things like windsocks. Those could show you how it's done, or at least show you what the finished product should look like.

    Good luck!

  6. #6
    You can use RWY12 object placer program to add a scenery object to where your house is, it creates an xml which is then processed by the xmlbgl utility

    Ttfn

    Pete

Members who have read this thread: 0

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •