• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

GUID Format

Messages
1,057
Country
ca-ontario
Would someone kindly point me in the direction of how to create a GUID in the following format:

guid="0xB331C7EF,0xE2BA4276,0x84C433B2,0xBA9781B2"

Thanks,
Misho
 
Hi Misho,

Do you mean how to convert a FSX style GUID to this one? Or just how to create a random new one?
 
Would someone kindly point me in the direction of how to create a GUID in the following format:

guid="0xB331C7EF,0xE2BA4276,0x84C433B2,0xBA9781B2"

Thanks,
Misho

I assume you are wanting that form of guid for use in the modeldef.xml file as the guid for an <AnimationGroup> declaration?


Code:
<AnimationGroup name="GroupTests" guid="0xB331C7EF,0xE2BA4276,0x84C433B2,0xBA9781B2">
     <AnimationRef guid="40A98760-2FCB-4422-A469-7001DBAAB766"/>
     <AnimationRef guid="23FBBCC2-C861-41b4-90D2-051AC1BCA338"/>
</AnimationGroup>
As you can see, the GUID's format is different between the Animation Group format and the AnimationRef format.

But since GUID's system itself is same , it's just a matter of how you write it.

As an example, consider the following GUID:
Code:
6EDE437E-ADD3-4bfe-AB44-E73AB6BCB013

Animation Group's GUID is seperated at each 64bit(8Characters) and connected by a comma.

So First seperate at 8 characters (Delete the - )
6EDE437E
ADD34bfe
AB44E73A
B6BCB013

Next , add 0x on the front which means written in Hex
0x6EDE437E
0xADD34bfe
0xAB44E73A
0xB6BCB013

And connect by comma
Code:
0x6EDE437E,0xADD34bfe,0xAB44E73A,0xB6BCB013

What is truly puzzling however, is just why ACES chose to use the hex-format for the AnimationGroup guid, as my testing has proven that using the "regular guid format" works also! :rolleyes:
 
Hi Bill,

Please be aware that

Code:
{6EDE437E-ADD3-4bfe-AB44-E73AB6BCB013}

and

Code:
0x6EDE437E,0xADD34bfe,0xAB44E73A,0xB6BCB013

are not exactly the same GUID. If you create a new GUID this does not matter that much, but when you try to translate between the formats it goes wrong. The correct conversion of the above FSX style GUID is:

Code:
0x6EDE437E,0x4bfeADD3,0x3AE744AB,0x13B0BCB6

Why the different notations are used I also don't know, it makes things quite confusing. You also see it in the OPT tool for example, which lists the FS2004 style GUID, while you define them in the object in the FSX style.
 
True enough, Arno. But, does it really matter? After all, the odds of this "not quite the same" guid being unique doesn't change!

The odds still remain a "beyond astronomical number"...

While each generated GUID is not guaranteed to be unique, the total number of unique keys (2^128 or 3.4×10^38) is so large that the probability of the same number being generated twice is very small. For example, consider the observable universe, which contains about 5×10^22 stars; every star could then have 6.8×10^15 universally unique GUIDs. :eek:

The chances are so low that one really should stress about something else--like your server spontaneously combusting or other bugs in your code. That is, assume it's unique and don't build in any code to "catch" duplicates--spend your time on something more likely to happen (i.e. anything else)!
 
Last edited:
Hi Bill,

I agree, as I said it does not matter if you try to create a new GUID.

But I wanted to prevent confusion for people who think they can use the same approach to actually convert their FS2004 GUIDs to FSX format (or the other way around).
 
Thanks guys!!

I created 4 new GUIDS and took the first parts off it, but this makes more sense!

Yes Bill, you are correct, I am creating a new Animation Group. I was wondering the same thing - why did they change the GUID format for this specific section??

On an unrelated topic, I am trying to get the Custom EventID functionality going. I have read in one of your posts that the way ACES did it was "convoluted and unneccessarily complicated" - yet there seems to be almost no info on how to go about this. What I want to be able to acomplish is to embed a custom EventID into MDL through modeldef.xml, and then control it through SimConnect (and eventually through panel and VC gauges). The SDK SP1 notes state that they added that functionality:

"The ability to export custom event IDs in a model, so that the IDs can be referenced in the panel system or in a SimConnect client, has been added. "

Yet there are no examples of this at all... At least not for SimConnect.

It is my understanding that this custom EventID could be defined in MouseRect section of PartInfo, and then triggered inside SimConnect to activate whatever code is within Animation section, just as if it was activated via mouse click - correct? Would you be able to shed more light onto this?

Arno - as I understand it, this would be a pretty neat solution to your Conditional Animation Tool for FSX - who says that the scenery objects need to be designed as BGL files? You could just as easily design a hangar (for example) as a MDL SimObject with animated doors, and have a small SimConnect app read user-defined placement file and allow user to activate animations through whatever condition they want to set up - even perhaps a small menu that can pop up when they enter a certain radius.

Misho
 
Arno - as I understand it, this would be a pretty neat solution to your Conditional Animation Tool for FSX - who says that the scenery objects need to be designed as BGL files? You could just as easily design a hangar (for example) as a MDL SimObject with animated doors, and have a small SimConnect app read user-defined placement file and allow user to activate animations through whatever condition they want to set up - even perhaps a small menu that can pop up when they enter a certain radius

I have thought about this before, but until now my conclusion is that it is still a bit too complex to be useable for developers. Especially the need to have a SimConnect application running to see the objects is something I am not sure about. But I am always interested to see what you can come up with and I might reconsider :).
 
I have thought about this before, but until now my conclusion is that it is still a bit too complex to be useable for developers. Especially the need to have a SimConnect application running to see the objects is something I am not sure about. But I am always interested to see what you can come up with and I might reconsider :).

Well - technically, SimConnect is running all the time, even if there are no apps to hook into. The dll's and exe's are completely transparent to users - the only thing you need is the entry in dll.xml or exe.xml that starts it up. Other than that, SimConnect can be completely invisible, right? You could "expand" sim.cfg with some entries specific to position and control which would be ignored by FSX but read by your dll, to avoid introducing yet another config file. You could have a "do it all" sim connect DLL that could be configurable by reading parameters from the sim.cfg and setting up all the animation controls.

Expanding further, you could create a new SimObject category (much like the "ControlTower" category) and have your DLL read in and process only the objects in that category. Developers wouldn't need to do anything except design their MDLs with animations, properly tag the animations, and specify the parameters in sim.cfg. They could then simply use your dll, activate it, and place their creations into the SimObject folder.

I'll see how the Custom EventID thing pans out (hopefully Bill can shed some insight) and report my findings!

Misho
 
Last edited:
Honestly, I've not used them myself, but it's easy enough to see how they are defined in the modeldef.xml file as a mouse trigger:

Code:
  <PartInfo>
    <Name>ddi_l_btn_00</Name>
    <AnimLength>50</AnimLength>
    <Animation>
      <Parameter>
        <Code>
          (L:ddi_l_btn_00,number) 50 *
        </Code>
        <Lag>250</Lag>
      </Parameter>
    </Animation>
    <MouseRect>
      <Cursor>Hand</Cursor>
      <MouseFlags>LeftSingle</MouseFlags>
      <EventID>0x00011100</EventID>
    </MouseRect>
  </PartInfo>

Presumably the C++ gauge (or SimConnect Client) would read this Custom EventID and then know that the user had "clicked" on this 3d button...

Honestly, the person to ask would be "Virtuali" since he coded the F18 for FSX...
 
Honestly, I've not used them myself, but it's easy enough to see how they are defined in the modeldef.xml file as a mouse trigger:

Code:
  <PartInfo>
    <Name>ddi_l_btn_00</Name>
    <AnimLength>50</AnimLength>
    <Animation>
      <Parameter>
        <Code>
          (L:ddi_l_btn_00,number) 50 *
        </Code>
        <Lag>250</Lag>
      </Parameter>
    </Animation>
    <MouseRect>
      <Cursor>Hand</Cursor>
      <MouseFlags>LeftSingle</MouseFlags>
      <EventID>0x00011100</EventID>
    </MouseRect>
  </PartInfo>

Presumably the C++ gauge (or SimConnect Client) would read this Custom EventID and then know that the user had "clicked" on this 3d button...

Honestly, the person to ask would be "Virtuali" since he coded the F18 for FSX...

Excellent, thanks Bill - that does look simple. But nothing is moving (yet - I'm investigating ;) ) This raises two additional questions:

While this would notify SimConnect that it was clicked on, would it work in reverse? Could I transmit a client event (0x00011100) and have this animation triggered without clicking on it?

And if that IS the case - is it possible to trigger animations in this way if they don't have interior models? Attaching MouseRect to exterior part removes the part, however, assigning animation that contains MouseRect to an exterior part still works - just wondering if the EventID tag is visible on the exterior part.

You can probably see where I'm heading with this - I'm hoping to use SimConnect to control animations of generic SimObjects (non-user objects, such as cargo pod, food pallet, etc.)

Misho
 
Okay, I have the code in place and anims working... but no custom event notification :confused: I will start up another thread on this in SimConnect forum. Thanks again, Bill!

Misho
 
Back
Top