nguyenquyhy / Flight-Tracker-StreamDeck

A Stream Deck plugin to interact with Microsoft Flight Simulation
https://flightsim.to/file/3178/flight-tracker-streamdeck-plugin
GNU General Public License v3.0
373 stars 68 forks source link

Lvar support (for third-party aircraft). #218

Closed linmar22 closed 1 year ago

linmar22 commented 3 years ago

Is your feature request related to a problem? Please describe. With new aircraft coming out, some developers are refusing to use SimConnect (looking at you Aerosoft) for a lot of their functionality when they implement custom actions in the aircraft. The aircraft can still be controlled via Lvars, which are aircraft-specific. Adding Lvar functionality would expand the streamdeck's usefulness tenfold.

Describe the solution you'd like As a user, id like the ability to send parameterized Lvar messages to the sim via the same generic buttons in Flight-Tracker or maybe some new Lvar specific controls. The whole "every sim variable is an enum" approach might not work here, unless you want to add every Lvar for every aircraft. It might make sense to just let the user enter his own Lvars.

Describe alternatives you've considered Using more software alongside Flight-Tracker, like SPAD.neXt might be a possible solution, but adds another level of f***ery to an already painful process.

Additional context

nguyenquyhy commented 3 years ago

It's the whole P3D and FSX mess all over again 🙃. Dev abandons interoperability left and right and go for whatever they want 🎉. I don't even know how Asobo is gonna implement replay feature with this kind of randomness.

Anyway, ranting asides, yeah I think it will come to adding LVars support with a WASM module one day. I'm just waiting for the LVars thread in forum to chill down to start evaluate if I should use one of the modules introduce there, or if I should just roll my own.

linmar22 commented 3 years ago

Just out of curiosity (I'm a C# dev by profession myself), how does interop via lvars differ from standard simconnect? Maybe I could help out somehow.

nguyenquyhy commented 3 years ago

LVars can't be access via external SimConnect but can be accessed via internal modules. So basically you have to write a WASM module (C++) to query those data and interface those out somehow. There are several different ideas on that in the forums.

Personally I think it is basically replicating SimConnection function, so I would hope Asobo would do that instead to give some predictability to the platform. Or now that Working Title joined the team, I would really hope they would do something about that.

Imo, the best way would be to do something to remove the whole LVar distinction and allow everything to go through external SimConnect as current simvar. But there is no roadmap on SimConnect so I guess we'll never know.

ChrisPUA320 commented 1 year ago

Is your feature request related to a problem? Please describe. With new aircraft coming out, some developers are refusing to use SimConnect (looking at you Aerosoft) for a lot of their functionality when they implement custom actions in the aircraft. The aircraft can still be controlled via Lvars, which are aircraft-specific. Adding Lvar functionality would expand the streamdeck's usefulness tenfold.

Describe the solution you'd like As a user, id like the ability to send parameterized Lvar messages to the sim via the same generic buttons in Flight-Tracker or maybe some new Lvar specific controls. The whole "every sim variable is an enum" approach might not work here, unless you want to add every Lvar for every aircraft. It might make sense to just let the user enter his own Lvars.

Describe alternatives you've considered Using more software alongside Flight-Tracker, like SPAD.neXt might be a possible solution, but adds another level of f***ery to an already painful process.

Additional context

* Mathijs Kok of Aerosoft says [he can provide a list of Lvars for the CRJ](https://forum.aerosoft.com/index.php?/topic/160861-bindable-buttons-inop/&tab=comments#comment-1025824) if you drop him a mail.

* People are [reporting success](https://forum.aerosoft.com/index.php?/topic/160705-simconnect-interfacing/&tab=comments#comment-1026380) when using lvars to control Aerosoft's CRJ.

You can use AAO for this. There you have all LVAR, HVAR, BVAR support and more...

noblackthunder commented 1 year ago

I am using the Mobiflight WASDM Module with this. Seems to work fine for sending events but reading states is something i have not figured out yet (might not be possible yet). But if this would get native support or would better work with mobiflights module this would be a solution.

One of the issues with just triggering Lvars it seems is that it might need to trigger several events at once / have some logic behind it? I see at least mobiflight uses some extra logic when to turn someting on or off in its scripting

nguyenquyhy commented 1 year ago

Thanks to L-Var support via SimConnect in SimUpdate 12, this is now possible without Mobiflight.

nguyenquyhy commented 1 year ago

This is now added in v0.49.