Skip to content

MSFS2020 Developer Mode, Model Behavior dialog and Console window

JaimeLeon2 edited this page Jul 12, 2021 · 20 revisions

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.

image

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.

image

Model Behavior dialog 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.

image

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.

image

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.

The Model Behavior dialog has another tab called “Local Variables”. There you can find a long list of all the local variables (L-vars) currently being used by MSFS with their respective value. This can be also useful in tracking how a certain L-var changes in value when doing a particular action in the simulator. It has a filter that allows us to search for variables containing certain text in their name. For example, this feature is useful to monitor your own L-vars from the simulator side.

Installation

User Interface

Examples and tutorials

MSFS2020

X-Plane

Workshops

Community Boards & Devices

Additional Information

Firmware

Clone this wiki locally