How to know which event or simvars are related with a specific indicator lamp

Hi~ good day~

I am making little utility which is working via simconnect.

as you know, I needed to work with many events, simvars.

And now, I found that I need to know about wasm and LVars and create a bridge module between wasm and simconnect If I want to interact with aircrafts fully.

then, while I struggled with wasm bridge module, I am stucked with a problem.

the problem is ‘how do I know which variable is related with this lamp?’ (see the attached picture)

in the above picture, there is a lamp on CWS button. It is indicating whether CWS mode is on or off.

so now, I would like to know which variable or what wasm function should I use to read the state of the lamp.

I tried with capturing ‘fsuipc’ logs and looking up ‘behaviors’ in developer mode, but failed to find out.

in the case of input events, It was catched by looking at a ‘behaviors’ in developer mode.

but the lamp was another story.

is there a way to find out what it is? (the aircraft is default asobo 737 max)

thank you in advance.

here you’re pointing to something on the 3D model (i.e. as literally in your screenshot) so your starting point would have to be to look at the 3D model source files and behaviour XML for that aircraft to try and work out what element has been placed there so you can unpick the thread of what code where could cause that surface to change from gray to green.

This is very hard to do even when you have a lot of experience building and programming MSFS planes, effectively you’re ‘decrypting’ the model because you don’t have the information the developers exchanged when some programmer added code to manipulate some element of the model. Without experience building MSFS models it’s even harder reverse-engineer one - the sim isn’t designed for you to be able to do that.

It sounds like you have great tech skills, I don’t mean to denigrate those, the clues for what’s manipulated in the model start in the model/gltf files. But recognize you’re trying to ‘reverse’ the normal package build process, similar to a program compilation.

1 Like

Hello @younghoonee71

The Behaviors tool can help in that regard.

  • Open it and go to the Inspector tab, you will see a message saying hovering above a component and pressing Ctrl+G will show information about it
  • Hover above the CWS button and press Ctrl+G, this will show information about the GLSHD_MCP_PUSH_CWS_1 component, its children, animations, mouserect, and input events.
  • Notice it has a CLSHD_MCP_INDICATOR_CWS_1_SEQ_1 child, click it
  • It will now show the indicator information and its emissive material properties in particular, showing the code that drives the emissive:

I hope this helps.
Regards,
Sylvain

2 Likes

thankyou for your kind guidance. I will try to do something with those variables and will post if suceed.

edit: looks like It is what I was looking for. It’s lengthy and takes sometimes to implement but I feel I am on the right path!
much thankyou Sylvain!

Best Regards,

younghoon

1 Like

As I did quite a number (~20 aircrafts or so) of such capturings - it is a lot of trial and error..

As mentioned above the Behavior may get you hints where to look for.
May be first try https://hubhop.mobiflight.com/ and see if it’s already there..

For an outside App using SimConnect - such indicators are usually available via:

  • LVAR - but via SimConnect you can only read L:NAME but not L:1:NAME (see SDK doc about the difference)
  • InputEvent - Those can (but not always) have a status when changes are monitored and made persistent in your app
  • SimVar - via SimConnect: Read as usual (unfortunately not that common)

The example is using an L:1:XMLVAR… i.e. cannot be read via SimConnect
There is however an InputEvent: “FCC_CWS_1” which is likely the one to capture and monitor
(The B737max has a number of those..)

And then it is “monitor the guessed one and see if it behaves like expected”

My general workflow is:
start the Sim with that aircraft previously selected and then shutdown the Sim
reason is to not get remanents from another aircraft

Then I call for the current set of LVARS using a WASM module.
this is usually a long list and FS24 mixes in many which are not used by the selected aircraft - don’t know why..

Then I capture all InputEvents that are registered by this aircraft using the SimConnect calls

Then using a tool that shows changed LVARS and InputEvents is very helpful
then you can just click and see directly if there is an LVar/InputEvent changing
else you may dig into the Behavior and find the one triggered (see above)

If anyone knows how to do this better - I’d appreciate :slight_smile:

2 Likes

I tested with those variables and script.

those script looks like doing much more things than what I need.
(It is checking aircraft status, and light brightness and so on. currently, I am not familiar with RPN Expression. so maybe I am wrong.)

and I found “(L:1:XMLVAR_FCC_CWS_1_Value)” states whether cws is on or off and It is enough for my purpose.

It is a little bit tricky but now I know where to lookup. and It’s even easier than I expect and powerful!
edit: I don’t expect this method covers all the possibilities but It would cover most of them.

thank you very much you guys and have a good day!

Best Regards,
younghoon

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.