1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

FSX GUID Not Reading and ?Not changeable if Friendlynames identical

Discussion in 'ModelConverterX' started by hcornea, 1/2/10.

  1. hcornea

    hcornea Resource contributor

    Joined:
    20/4/07
    Messages:
    2,388
    Country:
    australia
    GUID Not Reading (and ?Not changeable) on one particular library bgl

    I am reading in an FSX object library made of similar objects.

    Unfortunately, when they were compiled, it seems that duplicate friendly names have been used. This doesn;t seem to present a problem to FSX ... as the GUIDs are unique.

    Modelconverter does not seem to be able to read the GUID from each object in this case.

    I checked the original library with SDE to see what the GUIDs are, and they are all unique.

    Strangely, Modelconverter lists a GUID that is not present in the entire library for each type of object.

    The only unusual thing I can see about this library is the duplicate friendly names.

    Also: When I change the GUID and Friendly names in MCX, it doesn't seem to change within the exported MDL file.
    Last edited: 1/2/10
  2. hcornea

    hcornea Resource contributor

    Joined:
    20/4/07
    Messages:
    2,388
    Country:
    australia
    Some further information:

    I Hexedited the bgl to make each Friendly name unique (crass, I know) ... but has been a useful way of correcting things in the past!

    Despite this, the library bgl won;t compile.

    Would it matter if it was FS9 compiled? I am not sure if this is the case.
  3. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,300
    Country:
    netherlands
    Hi,

    From the test object you send me it seems they are FSX MDL files. But when I look at the file I do see the same GUID for the objects with the same name. So it seems not like a bug to me.
  4. hcornea

    hcornea Resource contributor

    Joined:
    20/4/07
    Messages:
    2,388
    Country:
    australia
    Thankyou for your work on this Arno.

    A further observation and some test files ..

    I have done the unthinkable ... and made three different objects (all of which have the same GUID and friendlyname)

    They have been compiled with LibraryMaker.

    What is apparent is that FSX does not use the GUID in the MDL data for these objects, it uses the new GUID placed in the library file. Otherwise you would not be able to place the three objects.

    [​IMG]

    It would be nice to have the option of referencing (and preserving) the GUID that FSX is using for such objects if the two GUID entries differ.

    Attached is a set of MDL files (all with the same GUID). These were compiled into the attached library, and you can see that the XML which places them references the GUID from the header.
    Last edited: 4/2/11
  5. rhumbaflappy

    rhumbaflappy Moderator Staff Member Resource contributor

    Joined:
    2/6/04
    Messages:
    2,499
    Country:
    us-wisconsin
    Does the new GUID "stick" if you export to a different folder than the original?

    Dick
  6. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,300
    Country:
    netherlands
    Hi,

    This is interesting. I took a look at the BGL file and it seems there is indeed a different GUID defined in the library part than in the MDL file. FS uses the one defined in the library.

    I will take a look at the ModelConverterX code later tonight and fix it so that the GUID in the library gets preference above the MDL.

    But I must say I find it a little worrying that a tool ignores the GUID in the MDL. That is very confusing for a designer who thinks he had set the GUID while exporting. I am not sure if BGLComp even allows this (I think not), so this effect can only be achieved when writing the BGL directly.

    As Dick mentioned, it would be interesting to know how the tool ensures that the GUID stays the same if you later update your MDL file and recompile the library.
  7. rhumbaflappy

    rhumbaflappy Moderator Staff Member Resource contributor

    Joined:
    2/6/04
    Messages:
    2,499
    Country:
    us-wisconsin
    If you change the GUID, but not the MDL name, and export as that same name, no GUID change.

    If you change the GUID, but not the MDL name, and export as a different name, the GUID will change, but the filename and internal MDL name will be different.

    If you change the GUID, and the MDL name, and export as the original filename, the the GUID will remain the same, and the filename and internal MDL name will be different.

    So... any FSX MDL export will retain the original imported GUID if the exported MDL filename is the same... in the same folder. ( new folder means new GUID )

    I don't know if this was Arno's intention, but it does serve as a protection against overwriting the original GUID accidentallty. I gues the 'rule of thumb' would be to export to a different folder..thereby protecting the original.

    Dick
    Last edited: 3/2/10
  8. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,300
    Country:
    netherlands
    Hi Dick,

    For ModelConverterX it indeed works that if you try to overwrite a MDL it will take the GUID from that file. Else it takes the one defined.

    But for the topic of this discussion, it is the Library Maker tool, which seems to ignore the GUID in the MDL when making the library and assigns a different GUID to the object.
  9. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,300
    Country:
    netherlands
    Hi,

    I have changed the library BGL reader code, it will now take the GUID from the library if it is different from the MDL file. I agree that that would be the best behaviour. Will be available in the next development release.
  10. hcornea

    hcornea Resource contributor

    Joined:
    20/4/07
    Messages:
    2,388
    Country:
    australia
    In answer to the question about Library Maker and "updating" a MDL.

    The answer is that it doesn;t update it ... it assigns a completely new random GUID.

    Very annoying ... and I'd highly recommend people don't use it.

Share This Page