Jump to content
Sign in to follow this  
Guest flightplan

XML files - Hexadecimal format

Recommended Posts

Guest flightplan

HI,I am not a scenery programmer so some of my language used may not be accurate but please bear with me - I'm trying to learn about some of the programs used to create the scenery in FS2004. I've been opening some scenery object XML files and notice that there seems to be a "long form" and a "short form" XML file. In the"short form", the object is described in hexadecimal format. I've got some questions::-hmmm - 1. What is the difference between the "long form" and "short form" XML? - 2. Why the Hexadecimal format? - 3. Does the hexadecimal entry describe the object and it's parameters or does it link to some other file that describes the object? - 4. Is there a way to "translate" the hexadecimal code so it can be read, edited, then converted back into hexadecimal?Thanks for taking the time to read my post. I would appreciate any help, answers, or suggestions. Thank you.:-zhelp Tom:-)

Share this post


Link to post
Share on other sites

Hi Tom,Not sure what you mean with the long and the short form, maybe you can show some example code?But I think you are seeing that the ModelData command links a MDL file scenery object to a GUID. This is a hex number used to identify your object. Each object has an unique number.When you later place the object, you only call this GUID.


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

Share this post


Link to post
Share on other sites
Guest flightplan

>Hi Tom,>>Not sure what you mean with the long and the short form, maybe>you can show some example code?>>But I think you are seeing that the ModelData command links a>MDL file scenery object to a GUID. This is a hex number used>to identify your object. Each object has an unique number.>>When you later place the object, you only call this GUID.Hi,Thanks, Arno, for your reply. I'm not sure how a MDL file, GUID, and the Hexadecimal code all relate to each other. I thought a scenery file was a BGL file that could be converted to a XML file for editing then converted back to a BGL file. Is the GUID the hexadecimal code? How do you produce the hex number used to identify an object?:-hmmm I have attached a text file (I hope it got attached) that I got from the AVSIM forum-not sure who posted it-but the "long form" is first and the "short form" follows.I really appreciate your help with this. Thanks for your patience with a non-programmer:-newbie . I've got a headache from peering at the monitor most of the day trying to figure this stuff out. Time for a break.:-beerchug Tom (oops! Maybe too much of a break :+)PS: I just checked the attached file and it came through as gibberish - so I deleted it. Guess I don't know how to make attachments either. Man - I'm a mess!:-(

Share this post


Link to post
Share on other sites

Hi Tom,Scenery is quite complex, there are different types of BGL files. The ones that can be decompiled to a XML file in general only contain the placement of objects, runways, etc. With the XML code it is for example not possible to define shape and textures used on an object.So the GUID (32 character hexadecimal number) is "just" an unique random number that is assigned to an object, so that it can be placed with the XML code. It's just a way to ask the scenery engine which object you want.With a command in the XML code you can give such a GUID to a MDL scenery object. This MDL file then contains the actual code that defines the object.I hope this makes it a bit more clear :).


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

Share this post


Link to post
Share on other sites
Guest flightplan

>Hi Tom,>>Scenery is quite complex, there are different types of BGL>files. The ones that can be decompiled to a XML file in>general only contain the placement of objects, runways, etc.>With the XML code it is for example not possible to define>shape and textures used on an object.>>So the GUID (32 character hexadecimal number) is "just" an>unique random number that is assigned to an object, so that it>can be placed with the XML code. It's just a way to ask the>scenery engine which object you want.>>With a command in the XML code you can give such a GUID to a>MDL scenery object. This MDL file then contains the actual>code that defines the object.>>I hope this makes it a bit more clear :).Hi,Yes, thanks, Arno, your post has made things more clear. The pieces of the scenery design puzzle are beginning to fit together. Just two more question and then I won't bug you - for awhile.Is the MDL file you refer to here the same MDL file that define the aircraft in FS9? Is there a way to edit the MDL file?Thanks again for your help and patience. I get so caught up in the "Why" of things that I forget that the flight simulator is for flying. It's been awhile since I've flown so I'm going to crank up the planes and have some fun.:-rotor Tom:-sun1

Share this post


Link to post
Share on other sites

Hi Tom,>Is the MDL file you refer to here the same MDL file that>define the aircraft in FS9?No, the code is similar but not the same. It is for example not possible to place an aircraft MDL file into the scenery.>Is there a way to edit the MDL file?Edit not, but you can make new ones with the Fs2004 gamepack of GMax. This comes with the MS GMax SDK.>Thanks again for your help and patience. I get so caught up in>the "Why" of things that I forget that the flight simulator is>for flying. It's been awhile since I've flown so I'm going to>crank up the planes and have some fun.Oh, is Flight Simulator for flying :D. I tend to spend that much time on scenery design challenges that my flying skills are not what they were :).


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

Share this post


Link to post
Share on other sites
Guest flightplan

>Hi Tom,>>>Is the MDL file you refer to here the same MDL file that>>define the aircraft in FS9?>>No, the code is similar but not the same. It is for example>not possible to place an aircraft MDL file into the scenery.>>>Is there a way to edit the MDL file?>>Edit not, but you can make new ones with the Fs2004 gamepack>of GMax. This comes with the MS GMax SDK.>>>Thanks again for your help and patience. I get so caught up>in>>the "Why" of things that I forget that the flight simulator>is>>for flying. It's been awhile since I've flown so I'm going>to>>crank up the planes and have some fun.>>Oh, is Flight Simulator for flying :D. I tend to spend that>much time on scenery design challenges that my flying skills>are not what they were :).>Hi,Thanks, Arno for your timely reply. Guess GMAX will be my next challenge. I've been avoiding it because of it's complexity and steep learning curve(what I've heard from others).But, for now, we both should put on our parachutes, leather helmets, and sunglasses and take to the skies! With an instructor pilot aboard, of course. Remember, land with the shiny side up.:-kewl Take care, Tom:-)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...