My point is, why make an add-on creator have to deal with the GUIDs at all?
While it is all very well to say that you should make sure you generate GUIDs in the proper way, consider it from the perspective of someone who doesn't really know much programming but wants to create an add-on. Bear in mind that such users exist and we shouldn't exclude them from being able to create add-ons.
Personally I think the current system of pathnames works quite well for the most part, and typing out "Sol/Saturn/Mimas" is a lot less verbose than, say,
Code: Select all
GUID=[392A FCE0 0348 2477]
ParentGUID=[0184 37FC 371A 9CCB]
Name="Mimas"
which hides the relationship away in a meaningless (to humans) string of digits. I can see this trend reaching the point where we need to make custom editors to handle all this coder stuff.
Basically, the object catalogues should be human-readable and human-writeable. As they stand, it is fairly easy to take a look at a .ssc and see what body the object is orbiting and what it is called, without having to cross-reference arbitrary hex strings!
In addition, if, say, during development of the add-on, the author decides to move an object from being a planet to being a satellite (say), in the current system this requires just changing the pathname in an obvious and intuitive manner. Under the explicit-GUID system this will probably require scrolling through the code to find the unmemorable GUID to copy and paste into position.
I agree that there are some limitations of the current system (e.g. objects which have a / in their names), but putting GUIDs in the data files is, in my opinion, the wrong way to go.
Paolo wrote:I would like to find a compromise. Instead than generate the GUIDs with an algorithm I would like that these GUIDs will be provided by some sort of Web repository. So an Add-On creator shoud ask for instance for 10 Thousands of GUIDs that will be reserved for him. So he will know (and every one else) that the GUIDs form 25629000000 to 25629100000 are already in use.
This makes the add-on creation process rather intimidating don't you think? I personally have started developing several add-ons and later abandoned them - since I know that I rarely get to the completion stage I would have less incentive to register for GUIDs.
And who would run this web repository? From my experience with the Motherlode, updates can take several weeks. If a new add-on author who isn't entirely sure if they'll get their project to completion (bear in mind that with explicit GUIDs in the data-files, there would be no way of starting to create the system without using some numbers for the GUIDs) emails the GUID repository for GUIDs and doesn't get a response back for weeks, what will happen? I think I know the answer - they would get put off creating an add-on.
What happens when someone doesn't know about this GUID repository (I suspect quite a few people learn .ssc mainly by looking through the example files) and posts an add-on on these forums? Since they haven't used the repository, they may be accidentally infringing on some author's GUID range. Then they have all this confusing and intimidating material posted at them through the forums (I'm hesitant to use the word "flaming" here), and they get put off.
Do we really want to head in this direction?
Just my two pennies.