Microsoft Flight Simulator X SDK

The Flight Simulator X SDK can be used to create add-on components for Flight Simulator X. These components can be new or replacement aircraft, instrumentation, missions, scenery, terrain, airport ground vehicles, airport runways and buildings, special effects, camera views, and many other elements in the simulated world. It must be pointed out, though, that some of these tasks, such as creating new aircraft, are very involved, demand a considerable amount of skill and knowledge, and are time consuming. Other tasks, though requiring patience and close attention to detail, can be completed in a few hours - such as designing and adding a simple gauge to an existing aircraft, configuring a new camera, creating a new graphical special effect, or completing a fairly simple new mission. (For more detail on creating missions, see Mission Creation SDK).
Unless the default installation directory is changed, the SDK installs to:
C:\Program Files\Microsoft Games\Microsoft Flight Simulator X SDK\
Details
The SDK is divided into four kits:
Core Utilities Kit
This kit covers the new SimConnect SDK - the programmers interface to Flight Simulator X, Camera Configuration, and also tables of variables that can be used by client applications written for SimConnect, and other components of the overall SDK.
Environment Kit
This kit covers terrain, scenery, modeling, aircraft and boat traffic, and special effects.
Mission Creation Kit
This kit covers the creation of missions (tutorials, directed challenges and adventures).
SimObject Creation Kit
This kit covers the creation of aircraft, panels and gauges, and also all the other simulation objects that can appear (ground vehicles, boats, animals, trains, and so on).
Installation (FSX Deluxe Edition)
The SDK is not installed by default, so it is necessary to manually install the package. To do this in Windows, follow these steps: (you must be logged into an Administrator account)
# Insert Microsoft Flight Simulator X disk.
# Open the E Drive(removable disk drive in File explorer.
# Open SDK sub-folder.
# Double click 'setup.exe'.
# Tell the program where to install and run the application. (Default locations is: C:\Program Files(x86)\Microsoft Games\Microsoft Flight Simulator X SDK)
# Browse to the Microsoft Flight Simulator X SDK folder: C:\<user name>\Application Data\Microsoft\FSX\
# Search for and open dll.xml
# Edit the file so that each <code><Launch.Addon></code> section reads as follows:
<Launch.Addon> <Name>Name Of Tool</Name> <Disabled>False</Disabled> <ManualLoad>False</ManualLoad> <Path>C:\\Microsoft Flight Simulator X SDK\SDK\Mission Creation Kit\Object_Placement.dll</Path> </Launch.Addon>
Opening in-flight SDK tools in FSX
Some of the tools that the SDK contains can be opened during flight to open these tools, follow these steps:
# Open FSX and start a flight.
# Select 'Tools' from the in-flight toolbar.
# Select the tool you want to use. (One of three: FX Tool, Object Placement Tool, and Traffic Toolbox)
Creating Missions Using the SDK
Missions are structured flights that have a setting, plot, and often special scenery and sound effects. There are lots of default missions that come with FSX, but it's possible to make your own using the Object Placement Tool. Although it might seem natural to open FSX, bring up the Object Placement Tool, and start work, there is quite a lot needed to create a mission before the actual programming starts.
In order to create your own missions, you will need to have some 'flying experience' in FSX as well as having completed some FSX default missions. You will need this experience, so that you can understand the concept of 'Missions' 'Flights', and the basic working of FSX. No programming knowledge is needed, but using the tool can be tricky, so don't be worried if your first efforts don't work out exactly how you imagined! The SDK does contain the default missions' .xml files, for examining by programmers.
<u>A further note:</u> In the FSX default full-screen mode, the Object Placement Tool cannot be moved. To switch to 'windowed view', press alt+enter.
Step 1: Create a Flight File
# Open FSX and go to 'Free Flight'.
# Select the location, time, date, and weather for your mission.
# Select 'Fly Now'.
# If you want the mission to start with the User aircraft in flight, then fly the aircraft to the position you want to start at.
# Press the semicolon key (;) and save the flight using the dialog that appears, entering the name of the mission, generally without spaces, of the mission you are creating.
Step 2: Create a Mission Folder
# Browse to FSX's installed location and open the subfolder 'Missions'.
# Create a subfolder entitled 'Missions in Progress', or similar.
# Create another subfolder within 'Missions in Progress' with the name of your mission, generally without spaces. This will be your Mission Folder.
Step 3: Move the Flight Files to Mission Folder
# Browse to the 'Flight Simulator X Files' folder in Documents.
# <u>Copy</u> '<nowiki/>name of your mission.FLT' and name of your mission.WX' to the mission folder created in Step 2. (Note: you will delete these from 'Flight Simulator X Files' later, but for now, keep a copy of them in that location)
Step 4: Create Mission Art
# Create two 380px by 232px 256 colour or 5-6-5 format images. (these will be displayed when your mission is selected in the FSX 'Missions' menu)
# One of the images is displayed when the mission has not been completed, and the other will be shown when the mission has been successfully completed.
# Move or copy the images to the mission subfolder created in Step 2.
Step 5: Create Mission Briefing
# Create an HTML briefing file with the name of your mission. (This briefing will appear when the User selects your mission in the FSX 'Missions' menu. It should include an introduction, details, instructions, maps, or anything else you want the User to know before they start the mission.)
# Move or Copy this to the mission subfolder created in Step 2.
Step 6: Create Mission Sound Subfolder
# Create a subfolder named 'sound' in the mission folder created in Step 2. (Note: lowercase title)
Step 7: Create Mission Sound
# Record .wav sound files for speech audio, music tracks, or sound effects for your mission.
# Move these to the subfolder created in Step 6.
Step 8: Create a Mission XML File
# Open FSX and load the flight that you created in Step 1.
# Open Object Placement Tool.
# Type the name of your mission, generally without spaces, in the 'Mission Title' field
# If you want to, you can add a 'Mission Description', too.
# Select 'Save Mission' to create a mission file, save the generated .xml in the Mission Folder created in Step 2. (You may find that the tool is denied access to this location. If it is, save in Documents/Flight Simulator X Files instead, and then <u>move</u> the .xml to your Mission Folder. This error will not occur again, so long as a copy of the .xml is not left in 'Flight Simulator X Files', so make sure that you cut and paste.
Step 9: Create Scenario Metadata
First, some explanation. Scenario Metadata is a program object that sets up a mission. It is this that places the mission in the FSX 'Missions' list, and sets the briefing, incomplete, and complete images. It also contains some fields that simply help the programmer identify the mission.
#Select the 'Objects' page on the bar at the top of the Object Placement Tool.
#Select 'Add', then in the 'Type' drop-down, select 'Mission Object'.
#In the 'Name' drop-down, select 'Scenario Metadata'.
#Double-click 'ScenarioType' and type, 'Mission'
#Double-click 'SkillLevel' and select the mission's skill level from the drop-down menu that appears above the 'Value' box.
#Double-click 'LocationDescription' and type a suitable text string to describe the mission's location. (Programmer's reference only)
#Double-click 'DifficultyLevel' and type a number. This will set the mission's position among the list of missions having the same skill level. The higher the number, the further down it appears in the FSX 'Missions' menu.
#Enter a text string to the 'EstimatedTime' property, giving the length of time that the mission takes to complete. (Programmer's reference only)
#Enter the name of the mission's uncompleted image in the 'UncompletedImage' property. (Example: UncompletedImage=m_i.bmp)
#Enter the name of the mission's completed image in the 'CompletedImage' property.
#The name of the mission briefing goes in the 'MissionBrief' field. (Example: MissionBrief=name_of_mission.html)
#Enter mission category GUID in the 'CategoryRef' property. (These GUIDs are found in the 'Categories' subfolder of FSX, in FSCategories.xml. Copy and paste mission GUIDs from this file)
There are other fields in the Scenario Metadata, but these are all the ones that are required to set up a basic mission.
Step 10: Link Mission XML to Flight File
This step will link the Mission Flight File, created in Step 1, to the Mission XML file created inStep 8. This will set up the 'skeleton' of your mission.
# Open the NameofYourMission.FLT' file in your mission's Mission Folder.
# At the top of the .FLT file, you will see the following lines of code:
<Title=TitleofMission>
<Description="">
<AppVersion=10.0.61637>
<FlightVersion=1/>
# Fill in the mission's name, with spaces, in the <Title=> field, adding spaces, if necessary.
# Provide a description of your mission in the <Description=" "> field. This will appear in the FSX 'Missions' menu description of your mission.
Step 11: Test Mission Setup
In Steps 1-10, the foundations of a FSX mission were created. Now, it is necessary to test for successful creation of a mission.
# Go to the 'Missions' menu in FSX, and select your mission. Notice that when the new mission is selected, the 'mission incomplete' image (entered in the mission's ScenarioMetadata as m_i.bmp) appears above the mission's description (entered in the mission's .FLT file), on the right hand side of the menu.
# Select 'Go To Briefing', and the HTML file entered in the mission's ScenarioMetadata should come up. If there is no mission brief, the 'Fly' button will replace 'Go To Briefing' in the 'Missions' menu.
# If everything is in order, select 'Fly'.
# When the mission has loaded, you should find that the aircraft is at the mission's starting location.
# Press 'esc' to end the mission. If there are no errors in the mission's ScenarioMetadata or FLT file, the 'End Mission' dialog should come up. If the 'End Flight' dialog comes up, something is wrong, but this is highly unlikely to happen at such early stage.
This concludes the first section of this tutorial. The mission is now ready for programming.
Mission Programming Using the FSX Object Placement Tool
The Object Placement Tool works on a system of 'Objects' accessed by the Object Placement Tool 'Objects' page. There are two main types, Scenery Objects, which appear as scenery in a mission, and Program Objects, which perform actions, play sound files, trigger points of interest, or even affect the handling of the User's aircraft. The ScenarioMetadata object that creates missions is a program object.
Scenery Objects
There are two types of scenery: plain, normal, scenery, such as buildings, trees, pylons, etc. (Scenery Objects), and the more advanced, moving scenery (Mobile Scenery Objects).
Scenery objects
Scenery Objects are objects such as people, buildings, bridges, or vehicles that appear in a Mission's scenery. Scenery objects created using the Object Placement Tool only appear in Missions, so they won't change the appearance of a location in 'Free Flight'. There is an enormous library of scenery objects that come with FSX, and any of these objects, as well as objects created by the programmer, can be added to the Mission. When using scenery objects, it is helpful to use the Online Reference Library, which shows images, and gives the GUID, for each object.
Mobile scenery objects
Mobile Scenery Objects are essentially scenery objects that have a series of programmed waypoints that allow them to move around. <u>Note: For moving vehicles, ships, and aircraft, it is more appropriate to create AI program objects with waypoint lists.</u>
Program Objects
There are many different types of program objects. They are arranged in groups:
* Actions
* AI Objects
* Area Definition Objects
* Group Objects
* Mission Objects
* Spawn Lists
* Triggers
* Goal Object
* Disabled Traffic Airport Object
 
< Prev   Next >