View Full Version : [FSX] GUID Not Reading and ?Not changeable if Friendlynames identical
01 Feb 2010, 02:32
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.
01 Feb 2010, 03:45
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.
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.
03 Feb 2010, 07:57
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.
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.
03 Feb 2010, 09:43
Does the new GUID "stick" if you export to a different folder than the original?
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.
03 Feb 2010, 12:39
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.
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.
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.
03 Feb 2010, 15:48
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.
vBulletin® v3.8.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.