Category:MSFS Mission Script: Difference between revisions
m (→Areas: Removed unnecessary link) |
(Added mission navbox) |
||
| Line 101: | Line 101: | ||
== Tools == | == Tools == | ||
The mission script can be viewed and edited through the Script Editor or by manually editing the .xml file. | The mission script can be viewed and edited through the Script Editor or by manually editing the .xml file. | ||
{{Template:Navbox-Mission-Creation-MSFS}} | |||
Revision as of 09:53, 17 October 2021
| This page is a work-in-progress. Generic message - Please note some detail may possibly be missing or incorrect. |
| Applicable |
|---|
| MSFS |
| MS Flight |
| LM P3D5 |
| LM P3D4 |
| LM P3D3 |
| LM P3D2 |
| LM P3D |
| FS World |
| FSXSE |
| FSXA |
| FSX |
| FS2004 |
| FS2002 |
| XP11 |
| XP10 |
| XP9 |
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.
There are a few alternative names for the building blocks. They can be called elements, nodes, or objects. These names can be used pretty much interchangeably.
General Element Attributes
There are some general attributes of mission elements:
| Name | Required | Description |
|---|---|---|
| InstanceId / 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). |
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
SimObjects
Simobjects are objects that react to the world, usually with an AI (e.g. animals, fuel trucks, wind sockets, airplanes). They can be added in the mission with Containers and Flocks.
RTC
RTC's (Real Time Cinematics) take animation information from a glTF file and convert it into a cinematic camera event based on triggers.
FlightPlan
Others
Edition
'Edition' are the extra features of the MSFS script editor that don't impact the mission, like comment nodes and the positioning of nodes in the visual script editor. The script editor creates a seperate .xml file next to you mission script, with _edition appended to the file name. This file determines the location and size of all the nodes in the visual script editor.
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.
- Flightplan
- Weather definitions
- Flight file
- Mission script
- Triggers
- Actions
- ObjectActivationAction · DialogAction · AdjustPayloadAction · ChangeAssistanceItemAction · FadeToColorAction · RandomAction · RequestTeleportAction · CountAction · ResetTimerAction · TimerAdjustAction · GoalResolutionAction & SubGoalResolutionAction · GrantRewardAction · PointOfInterestActivationAction · ActivateWaypointsAction · AITakeControlsAction · SendMessageToAIAction
- Mission objects
- Calculator
- Flow states
- Events
- Areas
- Library objects
- Sim objects
- RTC
Pages in category "MSFS Mission Script"
The following 24 pages are in this category, out of 24 total.