till213 / SkyDolly

Sky Dolly connects with Flight Simulator 2020 and records the flight path and basic instruments for replay.
MIT License
77 stars 9 forks source link

Allow Recording of External Variables with SkyDolly #130

Open Jasseji opened 3 months ago

Jasseji commented 3 months ago

Is your feature request related to a problem? Please describe. Not a Problem with the Software, but Animations which are normally triggered during flight are not saved on the Replay. (i.e. Light Switches controlled by LVARs, Carrier Catapult State, Carrier Elevators etc.)

Describe the solution you'd like Ability to record External LVARs with the flight so they will be triggered at the same moment as they were in the initial flight, maybe Ability to Edit those LVARs too or Tell Skydolly which ones to Record.

Describe alternatives you've considered Manually Triggering said LVARs via SPAD.next script but this is not always working as precise as it should.

Additional context Recording Videos on Carrier Mostly and switching on Plane Animations during formation flight.

Further Details, feel free to DM me here or on Discord Jacek#6800 (Jasseji)

till213 commented 2 months ago

Hello,

From all I know getting access via SimConnect from an external application (not in-process addon: I think in those you can simply prefix the desired variable name with "L:") is not possible "out of the box".

There has been an older discussion in the MSFS forum, suggesting to implement an in-process addon that would translate the local variables as custom SimConnect events. But yes, that requires the installation of such an addon in the Community folder, not to mention to actually implement such an addon in the first place (that would most likely be aircraft-specific, too - no?).

Has this changed? Are there other ways to access local variables via SimConnect? I have not heard yet from this "SPAD.next" script - will have to do some research. Or do you have any additional info?

till213 commented 2 months ago

Oh!

I just stumbled over the changelog of the SDK and noticed this here:

https://docs.flightsimulator.com/html/Programming_Tools/SimConnect/API_Reference/Events_And_Data/SimConnect_AddToDataDefinition.htm

"It is possible to get and/or set an RPN "L" variable through SimConnect using the SimConnect_AddToDataDefinition function, for example:"

SimConnect_AddToDataDefinition(hSimConnect, DataDefinitionID, "L:VARIABLE_NAME", "number", SIMCONNECT_DATATYPE_FLOAT64);

This has been mentioned in the changelog for the SDK Release 0.21.0.

So it seems that this new feature would indeed make it possible to have a user-defined set of "LVARS" recorded and replayed.

UPDATE: Before we get all too excited, the price-wining question is of course: does this also apply to SimConnect when used from an external process (such as Sky Dolly), or only for "in-process addons" (that can also use the SimConnect API)? To be tried and tested...