-
Hi, Is there a way to fashion a button on Touch portal for missing MSFS items please? The first one I would need is FLIGHT_LEVEL_CHANGE which I believe is missing from the autopilot assist section. |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
Hi Trevor, I'm not sure if that means the event or simulator variable. The former can be activated via either of 2 actions in MSFS - Plugin category: Activate a Selected Simulator Event or Activate a Named Simulator Event. Either of those will allow triggering any sim event known to mortal kind. For adding simulator variables, please see the wiki: Best, |
Beta Was this translation helpful? Give feedback.
-
Thank you Max, and also for this great plugin. I'm away from my PC for a few days so I'll try this when I get back. I got the FLIGHT_LEVEL_CHANGE from the MSFS SDK and I think it is meant to emulate the G1000 nxi FLC button press and is a toggle. |
Beta Was this translation helpful? Give feedback.
-
Ha, actually turns out there's already an action for that, though kinda buried and I forgot about it! MSFS - AutoPilot -> AP Switches -> Flight Level Change In any case, if you want to show the current FLC mode on a TP button (presumably the same one that toggles it, but it doesn't matter which), you will need to request that status from the simulator, which is a Simulator Variable (AUTOPILOT FLIGHT LEVEL CHANGE). You can then use the value of that variable to set the button visuals, like other examples (eg. the AP buttons on the "starter page" in the wiki here). I've linked the main wiki article about how to do that in general, and I still recommend reading it to get an understanding. But the short version is this:
Full example button after adding the custom variable/State: Example button is also attached -- remove the .zip extension (so it ends with Major caveat: It is up to the airplane model whether it actually reacts properly to the FLC event or sends the FLC status variable correctly. It's a bit of a Wild West out there in some cases these days, including Asobo's own models. YMMV! HTH, |
Beta Was this translation helpful? Give feedback.
-
Thank you again, Max,
I think I understand that resumé. I already printed the Github page and have read most of it, but I'll have to go through it whist using TP to 'grasp' it properly. So thanks for taking the extra time to let me know.
Regards,
Trevor.
On 19/05/2023 1:04:09 pm, Max Paperno ***@***.***> wrote:
Ha, actually turns out there's already an action for that, though kinda buried and I forgot about it!
MSFS - AutoPilot -> AP Switches -> Flight Level Change
[action-FLC-toggle] [https://user-images.githubusercontent.com/1366615/239526020-488dfa1b-6c2a-4890-8172-1025fdabff98.png]
In any case, if you want to show the current FLC mode on a TP button (presumably the same one that toggles it, but it doesn't matter which), you will need to request that status from the simulator, which is a Simulator Variable (AUTOPILOT FLIGHT LEVEL CHANGE [https://docs.flightsimulator.com/html/Programming_Tools/SimVars/Aircraft_SimVars/Aircraft_AutopilotAssistant_Variables.htm#AUTOPILOT%20FLIGHT%20LEVEL%20CHANGE]). You can then use the value of that variable to set the button visuals, like other examples (eg. the AP buttons on the "starter page" in the wiki here).
I've linked the main wiki article about how to do that in general, and I still recommend reading it to get an understanding. But the short version is this:
* Download the attached CustomStates.txt file (at bottom) and change the extension to .ini (GitHub won't allow uploading .ini files... d'oh!). It's just plain text, and has the correct variable definition in it.
* Place this file in the plugin's configuration directory, which is going to depend on your Windows user name:
C:\Users\<user_name>\AppData\Roaming\MSFSTouchPortalPlugin
* In Touch Portal, open the Settings -> Plugins window and select this plugin. Then add "CustomStates" to the list of "Sim Variable State Config Files", as shown here [https://github.com/mpaperno/MSFSTouchPortalPlugin/wiki/Using-Custom-States-and-Simulator-Variables#loading-custom-definitions-at-startup].
* Save the settings, and that's it. A new Plugin State should be available in the list of this plugin's states lists named "AutoPilot FLC Mode Active (0/1)".
Full example button after adding the custom variable/State:
[image] [https://user-images.githubusercontent.com/1366615/239525449-45a8c345-011c-4c59-93d5-24928cb8014b.png]
Example button is also attached -- remove the .zip extension (so it ends with .tpb) then import into TP.
Major caveat: It is up to the airplane model whether it actually reacts properly to the FLC event or sends the FLC status variable correctly. It's a bit of a Wild West out there in some cases these days, including Asobo's own models. YMMV!
HTH,
-Max
CustomStates.txt [https://github.com/mpaperno/MSFSTouchPortalPlugin/files/11516480/CustomStates.txt]
MSFS_FLC_Toggle.tpb.zip [https://github.com/mpaperno/MSFSTouchPortalPlugin/files/11516609/MSFS_FLC_Toggle.tpb.zip]
—
Reply to this email directly, view it on GitHub [#53 (comment)], or unsubscribe [https://github.com/notifications/unsubscribe-auth/A2KLYI6HATQJ5MLLC2D33OLXG5OTTANCNFSM6AAAAAAYFQKDC4].
You are receiving this because you authored the thread.Message ID: ***@***.***>
[6f178a36-1b85-45b1-ac66-72c2f86083c5]
|
Beta Was this translation helpful? Give feedback.
-
Hi again,Max,
I've completed your short suggestion and it looks like the samples do! I can't test it until I get back to my machine in mid-June. So I'm now reading the 'long' version which I have plenty of time to do several times so I should get the hang of it.
I couldn't find a way to extract anything from the button file, or unzip it, or rename it without it clinging to the fact that is was a zip file. This isn't a problem for me (now at least).
Regards,
Trevor.
On 19/05/2023 3:43:14 pm, Trevor ***@***.***> wrote:
Thank you again, Max,
I think I understand that resumé. I already printed the Github page and have read most of it, but I'll have to go through it whist using TP to 'grasp' it properly. So thanks for taking the extra time to let me know.
Regards,
Trevor.
On 19/05/2023 1:04:09 pm, Max Paperno ***@***.***> wrote:
Ha, actually turns out there's already an action for that, though kinda buried and I forgot about it!
MSFS - AutoPilot -> AP Switches -> Flight Level Change
[action-FLC-toggle] [https://user-images.githubusercontent.com/1366615/239526020-488dfa1b-6c2a-4890-8172-1025fdabff98.png]
In any case, if you want to show the current FLC mode on a TP button (presumably the same one that toggles it, but it doesn't matter which), you will need to request that status from the simulator, which is a Simulator Variable (AUTOPILOT FLIGHT LEVEL CHANGE [https://docs.flightsimulator.com/html/Programming_Tools/SimVars/Aircraft_SimVars/Aircraft_AutopilotAssistant_Variables.htm#AUTOPILOT%20FLIGHT%20LEVEL%20CHANGE]). You can then use the value of that variable to set the button visuals, like other examples (eg. the AP buttons on the "starter page" in the wiki here).
I've linked the main wiki article about how to do that in general, and I still recommend reading it to get an understanding. But the short version is this:
* Download the attached CustomStates.txt file (at bottom) and change the extension to .ini (GitHub won't allow uploading .ini files... d'oh!). It's just plain text, and has the correct variable definition in it.
* Place this file in the plugin's configuration directory, which is going to depend on your Windows user name:
C:\Users\<user_name>\AppData\Roaming\MSFSTouchPortalPlugin
* In Touch Portal, open the Settings -> Plugins window and select this plugin. Then add "CustomStates" to the list of "Sim Variable State Config Files", as shown here [https://github.com/mpaperno/MSFSTouchPortalPlugin/wiki/Using-Custom-States-and-Simulator-Variables#loading-custom-definitions-at-startup].
* Save the settings, and that's it. A new Plugin State should be available in the list of this plugin's states lists named "AutoPilot FLC Mode Active (0/1)".
Full example button after adding the custom variable/State:
[image] [https://user-images.githubusercontent.com/1366615/239525449-45a8c345-011c-4c59-93d5-24928cb8014b.png]
Example button is also attached -- remove the .zip extension (so it ends with .tpb) then import into TP.
Major caveat: It is up to the airplane model whether it actually reacts properly to the FLC event or sends the FLC status variable correctly. It's a bit of a Wild West out there in some cases these days, including Asobo's own models. YMMV!
HTH,
-Max
CustomStates.txt [https://github.com/mpaperno/MSFSTouchPortalPlugin/files/11516480/CustomStates.txt]
MSFS_FLC_Toggle.tpb.zip [https://github.com/mpaperno/MSFSTouchPortalPlugin/files/11516609/MSFS_FLC_Toggle.tpb.zip]
—
Reply to this email directly, view it on GitHub [#53 (comment)], or unsubscribe [https://github.com/notifications/unsubscribe-auth/A2KLYI6HATQJ5MLLC2D33OLXG5OTTANCNFSM6AAAAAAYFQKDC4].
You are receiving this because you authored the thread.Message ID: ***@***.***>
[5cf86c0a-6e48-4fa7-b811-d460b6444ac2]
|
Beta Was this translation helpful? Give feedback.
-
Hi Max, I'm back from my travels, I read the article you linked on custom states several times so I'm ready to try but I can't find the request form on the assets page that you refer to. Can you give me a clue please?
Regards,
Trevor.
Get BlueMail <https://bluemail.me> for Desktop
Trevor wrote:
Thank you again, Max,
I think I understand that resumé. I already printed the Github page and have read most of it, but I'll have to go through it whist using TP to 'grasp' it properly. So thanks for taking the extra time to let me know.
Regards,
Trevor.
On 19/05/2023 1:04:09 pm, Max Paperno ***@***.***> wrote:
Ha, actually turns out there's already an action for that, though kinda buried and I forgot about it!
MSFS - AutoPilot -> AP Switches -> Flight Level Change
In any case, if you want to show the current FLC mode on a TP button (presumably the same one that toggles it, but it doesn't matter which), you will need to request that status from the simulator, which is a Simulator Variable (AUTOPILOT FLIGHT LEVEL CHANGE <https://docs.flightsimulator.com/html/Programming_Tools/SimVars/Aircraft_SimVars/Aircraft_AutopilotAssistant_Variables.htm#AUTOPILOT%20FLIGHT%20LEVEL%20CHANGE> ). You can then use the value of that variable to set the button visuals, like other examples (eg. the AP buttons on the "starter page" in the wiki here).
I've linked the main wiki article about how to do that in general, and I still recommend reading it to get an understanding. But the short version is this:
Download the attached CustomStates.txt file (at bottom) and change the extension to .ini (GitHub won't allow uploading .ini files... d'oh!). It's just plain text, and has the correct variable definition in it.
Place this file in the plugin's configuration directory, which is going to depend on your Windows user name:
C:\Users\<user_name>\AppData\Roaming\MSFSTouchPortalPlugin
In Touch Portal, open the Settings -> Plugins window and select this plugin. Then add "CustomStates" to the list of "Sim Variable State Config Files", as shown here <https://github.com/mpaperno/MSFSTouchPortalPlugin/wiki/Using-Custom-States-and-Simulator-Variables#loading-custom-definitions-at-startup> .
Save the settings, and that's it. A new Plugin State should be available in the list of this plugin's states lists named "AutoPilot FLC Mode Active (0/1)".
Full example button after adding the custom variable/State:
Example button is also attached -- remove the .zip extension (so it ends with .tpb) then import into TP.
Major caveat: It is up to the airplane model whether it actually reacts properly to the FLC event or sends the FLC status variable correctly. It's a bit of a Wild West out there in some cases these days, including Asobo's own models. YMMV!
HTH,
-Max
CustomStates.txt <https://github.com/mpaperno/MSFSTouchPortalPlugin/files/11516480/CustomStates.txt>
MSFS_FLC_Toggle.tpb.zip <https://github.com/mpaperno/MSFSTouchPortalPlugin/files/11516609/MSFS_FLC_Toggle.tpb.zip>
—
Reply to this email directly, view it on GitHub <#53 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/A2KLYI6HATQJ5MLLC2D33OLXG5OTTANCNFSM6AAAAAAYFQKDC4> .
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
Hi Trevor,
I'm not sure if that means the event or simulator variable. The former can be activated via either of 2 actions in MSFS - Plugin category: Activate a Selected Simulator Event or Activate a Named Simulator Event. Either of those will allow triggering any sim event known to mortal kind.
For adding simulator variables, please see the wiki:
https://github.com/mpaperno/MSFSTouchPortalPlugin/wiki/Using-Custom-States-and-Simulator-Variables
Best,
-Max