All simulation events considered legacy?

Dear all,

On the one hand we have an overview of the working “simulation events”:

https://docs.flightsimulator.com/html/Programming_Tools/SimConnect/Status/Status_Of_SimEvents.htm

On the other hand I just noticed the following page:

https://docs.flightsimulator.com/html/Programming_Tools/SimVars/Legacy_Event_IDs.htm

that seems to indicate that all events are basically considered “legacy” and should hence not be used anymore for new add-on tools going forward, quote:

“The EventIds listed here are purely for reference and legacy support.”

That list seems to be quite exhaustive, and while I did not go through all those events in detail it seems that pretty much every event is considered legacy. Particularly those related to aircraft lights, such as KEY_TOGGLE_TAXI_LIGHTS etc.

Now heading over to the simulation variables, specifically those related to Aircraft Lights Data:

https://docs.flightsimulator.com/html/Programming_Tools/SimVars/Aircraft_Simulation_Variables.htm

one can see that most of those variables are read-only (e.g. " LIGHT TAXI").

Does anyone (already) have some insights what is going on here respectively whether there is an intend for FS 2020 to make those variables writeable (as simulation variables), and hence the deprecation of all the corresponding events?

I do realise that some tools are (still) using the events to the the aircraft lighs, so I strongly assume that those event based setters still work. But I am very hesitant now to go down that implementation route as well.

Any thoughts?

well thats what i would associate with “deprecated” … but im not a native speaker though

Yes, “considered legacy” and “deprecated” means, for all practical matters, the same: “Do not use going forward”.

But my question is: does anyone have already some insight what we are supposed to use in the future? I assume the corresponding simulation variables become writeable? Or will there be a completely new event system, with new event IDs etc?

And when - if - that is going to take place approximately? Or in other words: do we still have to use those “legacy events” for, say, this year?

I’d be interested to hear about some thoughts here :slight_smile:

The term we used to used for code that is expected to retire soon is “obsolescent”.

This basically meant we expect to remove this code/feature in the future so it should no longer be used for new developments.

When that code reached its end of life and was no longer being developed, it would be re-labeled as “obsolete”, making it clear the code was no longer supported.

However, the general rule was, it could not be removed until at least the next major point release (which would typically indicate breaking code changes).

This was a common practice for most Microsoft development in the past, therefore I would not expect these events to be removed until at least the next major point release of SimConnect.

Since we’ve not even had the first major point release of the SDK yet, I suspect they will remain for a while, even if they’re no longer supported.

Hello @Dragonlaird,

I hope I did not pull to much focus on the terms “legacy”, “obsolete”, “deprecated”, “dereleased” and what not :wink:

My question was really more out of curiosity if anyone - possibly with a proper “3rd party developer agreement” - has already some news about the timeline when the new replacement functionality might come (this year still? next year perhaps? Or merely an item deep down in the backlog?) and what the new functionality might look like?

My bet would be that the corresponding simulation variables simply become writeable as well. But of course it is also possible that an entire new “event system” (API) will be introduced.

I understand that as a “contractual third party developer” one might have an NDA. But maybe a statement from someone like “Yes, there is something coming, and it might be coming this year - or so a friend of a friend told me” would be possible? :wink:

The basic question of course for me right now is: should I still implement the “external light enable/disable” functionality (as my concrete use case) with the “legacy events”?

Which, btw, are also a bit clumsy, as some events only seem to be able to “toggle” a state, but not to set it explicitly to “true” or “false” (on/off) - so I’d have to query the current state each time before “toggling” the state of some light switch.

So while there is a KEY_LANDING_LIGHTS_OFF and KEY_LANDING_LIGHTS_ON event, there does not seem to be such equivalent events for the “taxi lights”: only KEY_TOGGLE_TAXI_LIGHTS seems to exist.

In other words: if I knew that in, say, three months from now on a new system would arrive, or the corresponding simulation variables (e.g. LIGHT TAXI) would become writeable, then I would refrain from using the legacy events and wait until then - even if the legacy events would keep working for the next three years or whatever.

On the other hand no replacement was in sight then I would still go with the legacy events for now.

So if anyone has any insights to share - I am all ears :slight_smile:

For the record: it actually (luckily!) seems that the documentation about simulation variables is (partly) outdated, as far as “write access” to simulation variables is concerned:

https://docs.flightsimulator.com/html/Programming_Tools/SimVars/Aircraft_Simulation_Variables.htm

For instance the variable ‘LIGHT NAV’ (“navigation light on/off state”) is marked as “read-only”, however I was just able to successfully set it with the provided (in the FS2020 SDK) SimWatcher example, at least with the “Extra 330 Asobo” aircraft (I did not yet do extensive tests with other variables or aircrafts).

“Succesful” in the (expected) sense that the corresponding light switch in the cockpit got set (“on” or “off”) and the light was enabled/disabled accordingly.

This is with the current Flight Simulator 1.14.5.0 release.

Doh! I take it back: just after reloading SimWatcher and only loading (and trying to set) the LIGHT NAV value it did not work anymore.

After fiddling around with other “LIGHT” related variables (and also loading e.g. the SimVarTokens.simvars set) all of a sudden I was “able” to toggle the “Strobe Light” switch (in the “Extra” aircraft). However I was in fact trying to set other light variables (e.g. LIGHT PANEL ON).

And I tried with both LIGHT NAV and LIGHT NAV ON variables.

So there seems to be something “messed up” in FS 2020 with regards to light simulation variables still, and hence the “read-only” state in the documentation.

I will do further experiments (possibly the example SimvarWatcher application does something weird here), but it seems we are still out of luck (to set light related variables via “setters”).

UPDATE: In fact it seems that setting a “LIGHT *” related variable simply controls the “last succesfully set variable”: for instance I had once case where the LIGHT NAV variable (setting it to either 0 or 1) actually set the engine throttle lever position (to 0 and 100% respectively): and I had set GENERAL ENG THROTTLE LEVER POSITION:1 just before (with SimvarWatcher).

Sometimes setting a LIGHT variable also influences the last "manually toggled light switch (with the mouse, in the cockpit), but not always (hence my initial belief above that LIGHT NAV would work, as I had toggled this myself manually in the cockpit).

In short: “does not work yet”

Oh dear! You may call me stupid, but I didn’t quite get how the SimvarWatcher UI was actually supposed to work:

Trying to “set a value” actually affects the currently selected row in the right-hand table - not what is seemingly selected in the “Simvar Name” combobox!

And that is good news! Because once I figured this out (also see my other question about CANOPY OPEN and TAILHOOK POSITION) I am now able to successfully turn off and on various lights: I just tried it with the Extra (aircraft) and I am able - via SimvarWatcher - to enable/disable the following lights:

  • LIGHT LANDING
  • LIGHT STROBE
  • LIGHT NAV
  • LIGHT BEACON (although I do not see such a light on the aircraft visually)

(The Extra does not have more lights)

That is great news, because it seems we can now use the simulation variables instead of the (now legacy) events to control aircraft lights - or so it seems…

Just for the record (and I think it is worth mentioning): it seems that events are not considered “legacy” anymore.

In fact, the above URL now points to a 404 page.

The events are now documented here:

https://docs.flightsimulator.com/html/index.htm#t=Programming_Tools%2FSimVars%2FEvent_IDs.htm

And no word about “legacy” anymore.

2 Likes

I didn’t know this SimVarWatcher tool existed. I have the latest SDK installed, but never say this. This will be a great help to me program my Air Manager panels.

It is an invaluable tool indeed. When in doubt simply try to “set” a simulation variable. You might be lucky and the variable might be actually “writeable”, while the documentation claims it is not. As it so happened with the light variables mentioned above :wink:

Is there a way to read what variables are being used in the sim as in when I trigger something in the virtual cockpit?

I tried firing up the FSUIPC (free version) console, and the events fly by so fast it’s just useless. A tool that could show me what’s being fired when I activate something in the cockpit would be invaluable as it would tell me exactly what events are being fired and what vars are being changed in response to said events.

No, it doesn’t do that: the “Simvar Watcher” simply allows you to define a set of simulation variables (don’t forget to choose a meaningful “unit” - in my experience choosing “number” always works, if you just want to see whether a value is “anyhting but 0.0”), and watch the values as they change.

Some variables have an index :1, :2, :3, :4, so don’t forget to set this index as appropriate (otherwise set it to :0).

You can also (try to) set the variables, as described above. But that’s about it.

Oh, and the URL link still points to some outdated SDK documentation (dating from FSX, I assume ;)).

1 Like

Thanks. This will still be an invaluable tool that takes a bunch of guesswork out of my process and saves me time digging through the SDK documentation for the vars and events.

Now I need to find a tool that does what I mentioned - shows me what events are being fired and what vars are changing based on interactions I have with the cockpit. If one even exists…

I don’t think the tool supports events at all, only simulation variables - as its name implies :wink: - Unfortunately.

That’s still helpful for me debugging my code. Typically, the vars are what are giving me issues. I’m able to fire events, but it’s finding out what vars are being affected and their new values that are of interest to me for the logic in my Air Manager panels. Mostly to display annunciators, indicator lights, to act on another control, etc…

For finding events, that’s why I’m looking for a tool that can do what I described in my earlier posts.