-
-
Notifications
You must be signed in to change notification settings - Fork 109
MSFS2020 Developer Mode, Model Behavior dialog and Console window
This section is a very brief discussion of the Developer Mode of MSFS2020 and the parts of it that we use in searching and testing events. The simulator provides a special user interface for add-on content development called Developer Mode. It is activated from the Options menu of the simulator. Once activated, a new menu will appear at the top bar of the simulator window. Developer Mode gives you access to tools that allow you to see the inner workings of the simulator. The Model Behavior and the Console windows are two important components of Developer mode and are opened from the Windows menu of the Developer Mode menu.
First, the Console screen displays all the errors, warnings and messages generated internally by the simulator. This window allows you to monitor what is being executed by MSFS. The code sent by the Mobiflight wasm module to the simulator will appear as part of the error messages in the Console. This can be very helpful in confirming that the instructions are well received by MSFS. Also, the console will display any error messages related to problems encountered with the code received.
UPDATE. As of SU5 the console error messages do not show the mobiflight code to be executed, only actual errors encountered like invalid variables or events.
Behaviors Debug dialog tab The name was changed from Model Behaviors in SU5. This is probably the most used tool in our search for simulator events and their respective code. It is a window that allows the user to deconstruct the inner structure of all the models being run by the simulator. Once a particular component of an airplane is selected, this tool can display all the details and the code being executed for every component of the airplane simulation, allowing us to extract these instructions for use in our panels connected to Mobiflight.
The first level of the simulator structure deals with the various models used. This information is stored in several xml files. You need to search and select the appropriate xml file for your chosen airplane operation from the many options presented. The file name will usually contain the name of the airplane and the word "interior" or "cockpit". In the image below we show the xml selection for the Citation CJ4 Cockpit.
The Component Search feature is used to find any component that has the search keyword in its name. For example, entering the word “engine” will show as result all the components related to the airplane’s engines. Additionally, a Templates filter can also be used to narrow down the search for particular templates. For example, I like to enter the word “code” in the templates filter, so that all of the templates that contain this word will be highlighted in yellow, and all of the sections containing “code” in their name will show in red color, including the code.
The Mouserect section displays all the mouse interactions that the simulator does for a particular component selected. It is located at the very bottom of the Model Behaviors window and it can be essential in tracking what code is being executed by MSFS. In this example we have selected the Citation CJ4 cockpit XML to begin with, and have narrowed our selection to Autopilot panel and the Heading select button. Scrolling to the very bottom we can see the button emits a "H" event called WT_CJ4_AP_HDG_PRESSED.
Within the Mouserect section there is another subsection called Logger. The Logger can display the status of any variables and events involved in the component selected. It is very useful when tracking how variables behave in the simulator. One mouse click on the in-sim control will immediately show in the Logger, confirming that you have selected the desired configuration.
A great new feature introduced in SU6 allows us to display a control in the Behavior Debug window by hovering the mouse over the control in the virtual cockpit. When the control turns blue, press Ctrl-G in your keyboard. The selected control will be shown in the Behavior Debug window immediately.
B: Events With SU5, a new class of events was created, the B: type events. These new events are now used to simplify some of the RPN code previously used in MSFS2020. Unfortunately, we do not yet have access to them for use in Mobiflight, even though the SDK documentation appears to indicate that these B events should be available. Nonetheless, the underlying code used by these B: events can be seen in the "Input Events" tab.
New Input Events Tab Also with SU5, the Model Behaviors window was modified to include a new tab called "Input Events". This new section shows the code for the new B: events. To see the code, select an event from the menus on the left side of the window and press Open in Control Panel. This Control Panel within this page that allows the user to place an event here for monitoring its behavior and also trigger events. There are several tabs on the Control Panel, but you will most likely find the code you need in the "Set" tab. One of the nicer features of this control panel is that the code can now be selected and copy/pasted. This is something that is still missing in the main Behaviors Debug tab.
In many cases, the code presented in the Control Panel is intermixed with O: variables, to which we don't have access. You will need to analyze the code and pick and choose the relevant parts that send the instructions to the simulator.
Important: in order to see the code, you need to deselect the "Minimize data load" checkbox and press the "Reload User Container" button. This will cause MSFS to reload the airplane files. After this, the code will be visible in the control panel section by pressing the "Monitor in Control Panel" button. In most cases, the interesting code is contained in the Set tab.
Local Variables Tab All the local variables or Lvars currently used by MSFS2020 are listed in this tab. Airplane, airport, land equipment, as well as user defined local variables are shown along with their current value. It is a helpful tool to check what the simulator is doing with the Lvars, what their value ranges are, as well as checking if Mobiflight controls are changing the corresponding variables in the simulator as expected. The search field can be used to narrow down the list of variables. A nice new feature of the Local Variables windows is that you can now change the values of the variables directly by just clicking on the variable line and entering a new value. The sim will respond to this change. For example, the search feature is useful to monitor your own L-vars from the simulator side. You can also click on any variable value and change it. The sim will react according to the new value, just as if the control had been pressed in the virtual cockpit.
Certain types of Variables Remain Inaccessible As of SU9, users are able to access A:, E: and L: type variables; H: and K: type of events. All others, such as O:, I: variables, and most notably B: events remain inaccessible to the users.
- MobiFlight Connector Installation
- Mobiflight Connector BETA version installation
- Modules
- MobiFlight Connector Files Structure
- MobiFlight Connector Uninstall
- Modules Reset to factory default
- Verifying the WASM module installation and locating the MSFS2020 community folder
- Verifying the WASM module installation and locating the MSFS2024 community folder
- Using a Winwing FCU with MobiFlight
- Using VKB controllers with MobiFlight
- Providing logs from MobiFlight
- MobiFlight Connector How does it work
- Mobiflight Connector Main Window
- Flash module with MobiFlight firmware
- Input and Output devices
- Joysticks
- Midi Boards
- Sim Variables (for Output)
- Input Actions
- Merging configuration files
- Disabling specific COM ports
- Examples Output LEDs
- Examples Input Switch
- Example 7 segment display
- Example Servo motor
- Controlling LEDs with an output shift register
- Adding lots of buttons with an input shift register
- Beginner's guide to input multiplexers
- Key Matrix with standard MobiFlight and Multiplexers
- Tutorial Easy Driver and x.27 or x.40 Stepper Motor
- Tutorial for Airbus VS display via 7-Segment LED Module
- Example Analog Input Potentiometer
- Baron G58 Tutorial Gear, Flaps, Mags, ELT Input Output Programming
- Using Mobiflight to control arduino-based 3rd party panels (RealSimGear GNS530)
- How to use a VNH2SP30 DC motor shield with MobiFlight
- Using 3D printer mainboards
- Playing sounds by sending keystrokes to AutoHotKey
- Using the selector knob on a Honeycomb Bravo
- Using an adjustable 12 position switch as a GA starter
- Brightness of LCD displays with I2C
- Using three-position switches
- Transponder with one Rotary
- Workflow for Creating Flight Simulation Panels ‐ Part 1
- MSFS2020 RPN Tips and Tricks
- MSFS2020 Using the Custom Input Code Box
- MSFS2020 Install WASM module and Event List
- MSFS2020 How to Create and Use User Defined Lvars
- MSFS2020 How to Create a Blinking LED configuration
- MSFS2020 User Defined WASM Module Events Best Practices
- MSFS2020 Developer Mode, Model Behavior dialog and Console window
- MSFS2020 PMDG 737‐700 List of Events that require use of FSUIPC7
- MSFS2020 PMDG 737‐700 Calibrate throttle idle and reverse thrust using interpolation (Valkyrie)
- MSFS2020 PMDG 737-700 Chrono unit functions implemented in Mobiflight
- Configuring PMDG 737 Parking Brake Lever Auto-Release with a Servo in Mobiflight
- Using encoder to drive a value back and forth within a given range
- Adding a custom board to MobiFlight
- User guide - Community Board and Custom Devices
- Developing your own custom devices/boards