Page 1 of 2
Luamacros for FS2020
Posted: 06 Oct 2020, 10:55
by tomrach
Hello Peter. Will you be working on the luamacros version for FS2020? The SDK is already available so we could try assigning commands to a second keyboard. Greetings.
Re: Luamacros for FS2020
Posted: 07 Oct 2020, 08:34
by admin
Sure I expected this question...
I already had a look into SDK but seemed to be not completed yet - especially the SimConnect part. I may give it another try.
It would be little bit more complicated that FSX SimConnect connector in HidMacros but I'm not saying its impossible.
Anyway I'm focused to Zibo Mod in Xpl-11 these days so not sure when I start FS2020
Re: Luamacros for FS2020
Posted: 07 Oct 2020, 08:52
by tomrach
So we wait
Re: Luamacros for FS2020
Posted: 19 Oct 2020, 22:54
by admin
Starting slowly but seems that FS2020 could be supported.
Find experimental build here
https://github.com/me2d13/luamacros/rel ... poc-events, just download the zip file and run exe.
You should be able to send SimConnect events with code like
Code: Select all
lmc_fs_event('LANDING_LIGHTS_TOGGLE')
lmc_fs_event('NAV1_STBY_SET', 0x11480)
So even parameters are supported. Event list and their support in FS2020 can be found in FS SDK.
Some quickstart lua script is here:
https://github.com/me2d13/luamacros/blo ... s/fsxx.lua assigning landing lights to L key and tuning sample frequency at NAV1 to N key.
Some notes & limitations
- only events are supported, vars can come later
- I had to switch luamacros in this build to pure 64bit application but I have problems with DirectX and game devices. So you can't read & use joysticks in this release. I mean to interact with luamacros, joystick in game is working
- I haven't tested Xplane support in this 64bit build and even didn't include plugin into the zip file. This is fsxx test build only
Re: Luamacros for FS2020
Posted: 21 Oct 2020, 10:27
by tomrach
THANK YOU VERY MUCH!!! I will be testing. Keep developing it, Peter. Thanks.
Re: Luamacros for FS2020
Posted: 22 Oct 2020, 00:31
by BradyBrother100
D:\MSFS SDK\Documentation\03-Content_Configuration\Variable_Lists
There should be some PDFs that have all of the Events.
Hope this helps!
Brady
Re: Luamacros for FS2020
Posted: 10 Oct 2022, 05:50
by eliz
Hi,
Why the msfs lmc version, about game devices in Microsoft OS,
lmc_print_devices()
lmc_set_axis_handler()
are not the same as in x-plan version?
I think it is not related to msfs, it is related to Microsoft and DX.
In other words, can you compile a version with the ability to read axis? even if write to msfs axis will not be possible.
Thanks.
Eli
Re: Luamacros for FS2020
Posted: 10 Oct 2022, 07:55
by admin
As I wrote in the post:
admin wrote: ↑19 Oct 2020, 22:54
- I had to switch luamacros in this build to pure 64bit application but I have problems with DirectX and game devices. So you can't read & use joysticks in this release. I mean to interact with luamacros, joystick in game is working
Till now I didn't find a way make game controllers working in 64bit build
Re: Luamacros for FS2020
Posted: 16 Jan 2023, 08:01
by postavka
Hello, all I will use this post to ask. I used to use luamacros in x-plane with second keyboard. I created lua files for 6 of my planes. All works fine. Here in MSFS2020 I took the sample code from this post, added the ID of my keyboard like I do in the script used in xp11
Code: Select all
lmc_assign_keyboard('MACROS',"ID_2005");
it sends the "event" to MSFS when I press the button on second KB, but also triggers the shortcut for that key that is set in MSFS. For example if I set F3 button for
Code: Select all
lmc_fs_event('SPOILERS_ARM_TOGGLE')
the spolers are armed but also the throttles are increasing. In xp11 it somehow disabled all shortcuts on second keyboard. Is there a way to do that in MSFS? Thnaks and keep the good work!
Re: Luamacros for FS2020
Posted: 16 Jan 2023, 09:03
by admin