Porting FSX Missions to MSFS

From FSDeveloper Wiki
Jump to navigationJump to search


You can open FSX mission scripts in MSFS. You can find the .xml files in Mission Samples in the FSX SDK. Or you can use the fsx spb2xml tool to convert the .spb in the mission folder.

Steps

Just make a mission project in msfs like normal. Copy the sounds folder if you want. Open the script editor. File>Open, open the fsx .xml. If it doesn't load, look in the console for a xml error.


This will point to a specific part that isn't recognized. This means that part is not supported, so you have to delete it manually from the .xml . Keep in mind that you may have to replace this with a modern alternative later. When the script loads without error, you will see that all nodes are centered (because FSX had a different script editor):

You will have to move the nodes to create a clear structure for yourself. I prefer to first seperate all unconnected parts:

Remember to save frequently and make regular backups.

And then I sort them in roughly chronological order (you can use the numbers of the dialog and a video or your memory of the mission):

Then I add comments to make the mission easier to understand:

Now that we have a better idea of the mission, we can change some of the things that don't port over accurately.

Updating Area rotation

In FSX, the rotation of areas was defined in the Area node itself, but now it has moved to the AttachedWorldPosition. So we need to move the rotation data. For every area and axis: - Copy the rotation for the axis (e.g. Head). - Change it to 0 in the Area node. - Go to AttachedWorldPosition and paste the rotation.

You may also have to change the position of areas at the airport, because the data may have changed.


Updating Property Triggers

PropertyTriggers used to have a child with the condition of the trigger. This has changed to a ReversePolishCondition in MSFS. Just click on the child condition. You will see the type like LessThan or Equal. If you click on it you will see LHS (left hand side) and RHS (right hand side). Remember the values. In the ReversePolishCondition, first fill in the LHS, then the RHS, and then the type.

You have to use C# operators like > and !=. Instead of, for example Simvar.AltitudeAGL you will have to use the new notation: (A:PLANE ALT ABOVE GROUND, feet).

Then remember remove the old child condition. Overall it will look like this:

LibraryObject

The old references to FSX LibraryObjects won't work, because the objects are not included in msfs. You can add a modellib to your mission package, that contains the models you need. Then you can reference them with the GUID.

SimObjects

AI planes will need to be updated with an MSFS airplane in the script (.xml) and flight file (.FLT). The AI may also need to be remade.

Flight file (.FLT):

FSX → MSFS

Script file (.xml):

FSX → MSFS


Example

You can see an example by downloading the project files of my Caribbean landing port.


Pages relevant to mission creation for MSFS.

Mission structure

Flightplan
Weather definitions
Flight file
Mission script
Triggers
AirportLandingTrigger & AreaLandingTrigger · CounterTrigger · PropertyTrigger · ProximityTrigger · TimerTrigger
Actions
ObjectActivationAction · DialogAction · AdjustPayloadAction · ChangeAssistanceItemAction · FadeToColorAction · RandomAction · RequestTeleportAction · CountAction · ResetTimerAction · TimerAdjustAction · GoalResolutionAction & SubGoalResolutionAction · GrantRewardAction · PointOfInterestActivationAction · ActivateWaypointsAction · AITakeControlsAction · SendMessageToAIAction
Mission objects
Mission definition · Goal · LivingWorldExclusion · Camera
Calculator
Flow states
Events
Areas
Rectangle Area · Cylinder Area · Polygon Area · Corridor Area · InGameMarker
Library objects
Sim objects
RTC

Mission tools

MSFS Script Editor · BushTripInjector · BushMissionGen · MSFSLocalizer · SPB2XML · Little Navmap

Other

Example mission files
Porting FSX Missions to MSFS
Localisation
Click the links to access the topic pages (Default - Opens in same window).