• 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.

FA/18 Variables

Messages
39
Country
us-newhampshire
Hi,
Does anyone know the token variables for the FA/18 display buttons..? I want to use the MFDs in a custom aircraft and the variables list from the SDK is not helpful. It appears the code for the bottons on the bezel is coded into the interior vc mdl, did I miss something with the DSK or is there a way to capture those button calls..?

Thanks,
tc
 
Open the FA-18_interior.mdl file with Notepad.exe and scroll down to the bottom of the file...

...work your way back up to the top to see all the custom variables, such as this one:

(L:knob_ddi_center_brt,number)
 
Hi Bill,
I can see some of the mouse button information but not as much as I was hoping for. I believe I need to see either an event ID which I have not found in the SDK for the FA/18 digital displays. (Interesting that the G1000 is there).
As well I would need an image ID to call to the different bmps.
Or some way to call the different mfd functions.

I'm new at this so if I'm off base please feel free to let me know.

Thanks,

tc
 
I believe I need to see either an event ID which I have not found in the SDK for the FA/18 digital displays.

Hello, I'm the programmer for the MS F/A-18 gauges, so I might be able to help you :)

Event ID's are very easy to find: inside the modeldef.xml, the only "unusual" thing is that, instead of having a token name, they are called directly by number, which the XtoMDL compiler accepts anyway.

Standard key events have numbers ranging from 0x10000 onward, but Microsoft provided a range from 0x11000 onward to be used by 3rd party developers to create their own "custom" event. Unfortunately, I don't know if anyone ever used that feature...

The advantadge of using custom events, is that you can "trap" them in your code, instead of relying of horrible polling methods.

What will happen is that, instead of you having to constantly poll a variable to have a certain value (to fake Callbacks and custom events) your code will be called only if an event has been triggered, and then you can test its value to see if the event is what you were waiting for.

To do this, you need to define a keyboard handler, using the appropriate SDK call.

Of course, this is C/C++ only...


As well I would need an image ID to call to the different bmps.

There aren't much bitmaps in the F/A-18, I think the only ones are the static backgrounds of the radio panels but, other than that, analog instruments are fully 3d with the backgound in the VC texture itself and the needles made as 3d objects. All the glass instrumentation has just a black background, and everything is drawn with GDI+. There are no icons, no sprites, no strings at all in the whole code...


Or some way to call the different mfd functions

You can trigger the different mfd screens, but "firing" a custom event, by passing to the send_key_event() function the direct hexadecimal value. For example, calling it with 0x00011101, would fire up the left DDI button 1.

If you want to create your own aircraft VC, using the F/A-18 MFDs, it should be quite easy: you just need to create each button in Gmax/Max and tag it using all the correct button definitions, which are found in the modeldef.xml file


regards,
Umberto Colapicchioni - VIRTUALI s.a.s.
 
Last edited:
Hello, I'm the programmer for the MS F/A-18 gauges, so I might be able to help you :)

Event ID's are very easy to find: inside the modeldef.xml, the only "unusual" thing is that, instead of having a token name, they are called directly by number, which the XtoMDL compiler accepts anyway.

Standard key events have numbers ranging from 0x10000 onward, but Microsoft provided a range from 0x11000 onward to be used by 3rd party developers to create their own "custom" event. Unfortunately, I don't know if anyone ever used that feature...

The advantadge of using custom events, is that you can "trap" them in your code, instead of relying of horrible polling methods.

What will happen is that, instead of you having to constantly poll a variable to have a certain value (to fake Callbacks and custom events) your code will be called only if an event has been triggered, and then you can test its value to see if the event is what you were waiting for.

To do this, you need to define a keyboard handler, using the appropriate SDK call.

Of course, this is C/C++ only...




There aren't much bitmaps in the F/A-18, I think the only ones are the static backgrounds of the radio panels but, other than that, analog instruments are fully 3d with the backgound in the VC texture itself and the needles made as 3d objects. All the glass instrumentation has just a black background, and everything is drawn with GDI+. There are no icons, no sprites, no strings at all in the whole code...




You can trigger the different mfd screens, but "firing" a custom event, by passing to the send_key_event() function the direct hexadecimal value. For example, calling it with 0x00011101, would fire up the left DDI button 1.

If you want to create your own aircraft VC, using the F/A-18 MFDs, it should be quite easy: you just need to create each button in Gmax/Max and tag it using all the correct button definitions, which are found in the modeldef.xml file


regards,
Umberto Colapicchioni - VIRTUALI s.a.s.

Thank you..!!
I appreciate the time spent and the detail of your information. This is excellent, now I can move ahead.

Thanks,

Tony
 
How will the code be different for XML..?
I think it best to put it togeather in a 2D panel & XML to test with before doing the vc.

Thanks,

tc
 
Last edited:
It should be possible to use XML, because you'll need to define and react to mouse events with the numerical code and, it should be possible to trigger the events with K: commands with that code as well.

But, I really can't help you much here: the XML syntax is so unneccesarily verbose and convoluted (even to do things that would have been trivial in C/C++), that I'd rather not use it...

Just use the modeldef.xml from the Acceleration SDK, as a reference to what hex code corrensponds to which features. I think there are also a couple of comments left there, that mark the start and the end of the sections I've added (look for "VIRTUALI" in the modeldef.xml file )
 
Back
Top