Category:MSFS Mission Script

From FSDeveloper Wiki
Revision as of 09:30, 13 October 2021 by Mr LiamT (talk | contribs) (Added area element category)
Jump to navigationJump to search


The mission script defines everything that happens in your mission after spawn. The mission script uses .xml files and can be opened with the MSFS Script Editor. The SDK documentation here is still lacking currently.

Building blocks

The mission script is made up of different elements shown as nodes in the MSFS Script Editor.

Alternative names for the building blocks: Elements, Nodes, Objects.

Triggers & Actions

The basic parts of a mission script are triggers and actions. When a trigger ‘fires’, it can start different actions and activate other triggers. A bunch of these together makes up a basic mission.

Mission objects

Mission elements define a range of things like mission type, goals, world traffic, camera, and thermals.

Calculators

You can use calculators for more advanced logic in your mission. It can take in multiple variables and trigger different actions based on a logic. You can also use this to calculate a mission score and probably many more applications which you can explore.

Flowstates

Flowstates are the different parts of a mission or freeflight such as intro, approach, and parking. FlowstateEvents are special actions which control ‘meta’ or ‘sim-level’ actions such as enabling the VFR map, pausing the simulation, and changing the camera.

Events

Events are used to notify the user with popups such as flying tips. The event only has to be defined once, and then it can be triggered by the mission script.

Areas

Area elements are actually volumes that are placed in the world, except for InGameMarkers, which are POI markers you can easily place in the world.

LibraryObjects

RTC

FlightPlan

Others

General Element Attributes

Some general attributes of mission elements:

Name Required Description
GUID Yes All elements of the mission script need to have a unique GUID.
Id No Give every element an short, unique id that tells you what it is and does.
Description No A short description of what the element does.
Activated No Some elements can be active or inactive. If they are marked as 'activated' it means they are active from spawn. Elements can be activated and deactivated throughout the mission with an Object Activation Action. This can be used for instance to limit a trigger to only be 'hot' after it has been activated by something else in the mission.
Platform No Used for platform dependency (PC/Xbox).

Localisation

User-facing strings can be localized. This means they can easily be changed and translated without changing the mission script.

Other parts of a mission

Tools

The mission script can be viewed and edited through the Script Editor or by manually editing the .xml file.