4
40 PC Pilot Issue 48 TUTORIAL – Mission Building in FSX N aturally, there has been a lot of interest in FSX since its release and one of the features that has attracted a large amount of positive attention is the Missions engine. Details of this facet of FSX have been covered in earlier issues of PC Pilot and commercial developers and freeware designers alike have also been quick to grasp the potential of Missions. It provides an opportunity to teach skills and explore the FSX features and effects in an entertaining, and often very challenging way. In this new series, we will examine just how you go about creating your very own Mission to share with others. In doing so, you will learn to appreciate the versatility of this feature and we will hopefully get you through some of the more demanding parts! Be warned, once you start on this path, it is a downward spiral to ‘Mission addiction’ and I must confess that I have descended to the point where I can wake at night calling out: “No, no - you must use a ‘Proximity Trigger’ you fool!” The tools Even paths to deepening your flightsim addiction require some basic tools! Fortunately, Microsoft released the Missions Software Development Kit (SDK) but it is only available with the Deluxe version of FSX. This kit not only includes the information required to be able to plan and execute your Mission, but the Object Placement Tool which is the primary interface we use to create our Missions. As with all tweaking and scenery or panel design and creation, you should know the importance of backing up any file with which you work as a precaution. It will also help if you are comfortable with editing basic configuration files. Basic file structure Firstly, however, we should examine the folder structure and primary configuration files that constitute the Missions engine. Without this knowledge, we will waste a lot of time and the inexperienced may also inadvertently remove or change critical files - requiring the dreaded phenomenon known as – ‘a full reinstall’! While this series was prepared using Windows Vista, the procedures in Windows XP will be the same, even if some of the diagrams in this series look a little different to what you are used to - it is purely cosmetic in this case! FSX Mission Building Tools of the Trade FIG. 1 Most of the user data is in the Missions Folder FIG. 2 There are an abundant number of categories to choose from and you can create your own

Mission Building in FSX - Part 1

Embed Size (px)

Citation preview

Page 1: Mission Building in FSX - Part 1

PC Pilot Issue 48 41

40 PC Pilot Issue 48

TUTORIAL – Mission Building in FSX

N aturally, there has been a lot of interest in FSX since its release and one of the features that has

attracted a large amount of positive attention is the Missions engine. Details of this facet of FSX have been covered in earlier issues of PC Pilot and commercial developers and freeware designers alike have also been quick to grasp the potential of Missions. It provides an opportunity to teach skills and explore the FSX features and effects in an entertaining, and often very challenging way.

In this new series, we will examine just how you go about creating your very own Mission to share with others. In doing so, you will learn to appreciate the versatility of this feature and we will hopefully get you through some of the more demanding parts! Be warned, once you start on this path, it is a downward spiral to ‘Mission addiction’ and I must confess that I have descended to the point where I can wake at night calling out: “No, no - you must use a ‘Proximity Trigger’ you fool!”

The toolsEven paths to deepening your flightsim addiction require some basic tools! Fortunately, Microsoft released the Missions Software Development Kit (SDK) but it is only available with the Deluxe version of FSX. This kit not only includes the information required to be able to plan and execute your Mission, but the Object Placement Tool which is the primary interface we use to create our Missions.

As with all tweaking and scenery or panel design and creation, you should know the importance of backing up any file with which you work as a precaution. It will also help if you are comfortable with editing basic configuration files.

Basic file structureFirstly, however, we should examine the folder structure and primary configuration files that constitute the Missions engine. Without this knowledge, we will waste a lot of time and the inexperienced may also inadvertently remove or change critical files - requiring the dreaded phenomenon known as – ‘a full reinstall’! While this series was prepared using Windows Vista, the procedures in Windows XP will be the same, even if some of the diagrams in this series look a little different to what you are used to - it is purely cosmetic in this case!

Using Windows Explorer, open your FSX main folder which is located under the Program Files/Microsoft Games folder just as it was in FS9. However, you will notice a few differences in the layout of the folders when comparing the two versions. The changes start to appear when you open your main Microsoft Flight Simulator X folder (Fig. 1). You will notice that some folders have disappeared, for example, ‘Aircraft’, and you will notice some new ones have appeared such as ‘Missions’ and ‘SimObjects’. Open the ‘Missions’ folder and you will see a list of folders with names such as ‘Airline Pilot’, ‘Backcountry’, ‘Pilot for Hire’ etc (Fig. 2). As you have probably guessed, these represent the main categories of Missions installed on your computer. If you have already installed some commercial Missions, you may also see them listed in the developer’s own folder.

As an example, open the ‘Airline Pilot’ folder and you will see a collection of new folders with each one representing a whole Mission as you would find it in the FSX Missions dialogue window (Fig. 3). Open the Amsterdam folder. If you haven’t yet flown this Mission, it requires you to fly a default Boeing 737-800 from Amsterdam’s Schiphol airport (EHAM) to London’s Heathrow (EGLL) via a flight planned route - although an emergency forces you to make a decision shortly after take-off.

Figure 4 displays the contents of this folder. If we are to create our own Missions, we must appreciate

the role each folder and file plays. The *.PLN and *.WX files may already be familiar to regular FS tweakers. They recreate the weather and flight plan details for the Mission. Each time you save a flight planned route, the details are kept in a PLN file which is saved in your ‘Flight Simulator X’ Files folder of ‘Your Documents’ (‘User’ in Vista). Not all Missions use a PLN file, for example, a short VFR flight to a nearby lake. The WX file contains details of the weather conditions at the time the flight was saved. The FLT file contains the details of the aircraft, its position, switch positions etc. These three files are common with many of your own saved flights and hold no surprises.

The ‘Charts.html’ document contains the navigation charts (if any), that you have scanned or made to supplement pilot navigation. The ‘Charts_Tab.html’ is just the same chart with tabs for the Mission overview and details. These pages, and the ‘Details’ and ‘Details_Tab.html’ files will be familiar to you as the pages that users read when preparing for a Mission, as are the ‘Overview’ and ‘Overview_Tab.html’ pages. You have already probably recognized the ‘imgM_i’ and ‘imgM_c.bmp’ images as the ones you see when you start, and hopefully, subsequently succeed in your Mission! If you have any trouble recognising these files, browse the ‘Missions’ section in FSX and you will see how they are used to provide you with information.

Now we get to the ‘amsterdam.spb’ file. Even regular FS tweakers

FSX Mission BuildingTools of the Trade

may not recognize this beast as an SPB, or ‘Sim-Prop Binary’ format. Missions will happily use either SPB or XML format files, but SPB will give you faster load times. FSX will also select the SPB file in preference to an XML file of the same name, which has implications in the next issue when we start creating and editing our Mission. We will also learn how to create SPB files from our working XML file later in the series.

There are also usually two folders within this particular Mission folder itself. The images folder contains our charts and images used by the html files (Fig. 5), while the sound folder contains all our recorded sound files if we decide to create and include them in our Mission package. Phew! Don’t worry if it sounds a bit bewildering. The structure of the Missions data will become easier to follow as we progress through creating our own Mission, so don’t get too caught up on the detail just yet.

There is one more folder that for

FIG. 1 Most of the user data is in the Missions Folder

FIG. 2 There are an abundant number of categories to choose from and you can create your own

Artificial gates can be used for a tutorial or adventure

FIG. 3 Individual Missions are in their own folders for simplicity

FIG. 4 Standard Mission folder contents

FIG. 5 You assemble all your charts and diagrams into a single folder

FIG. 6 Rewards are fun for the end-user and simple to create

Mission Building in FSX – TUTORIAL

40-43_jp.indd 40-41 3/8/07 15:23:26

Page 2: Mission Building in FSX - Part 1

PC Pilot Issue 48 41

40 PC Pilot Issue 48

TUTORIAL – Mission Building in FSX

N aturally, there has been a lot of interest in FSX since its release and one of the features that has

attracted a large amount of positive attention is the Missions engine. Details of this facet of FSX have been covered in earlier issues of PC Pilot and commercial developers and freeware designers alike have also been quick to grasp the potential of Missions. It provides an opportunity to teach skills and explore the FSX features and effects in an entertaining, and often very challenging way.

In this new series, we will examine just how you go about creating your very own Mission to share with others. In doing so, you will learn to appreciate the versatility of this feature and we will hopefully get you through some of the more demanding parts! Be warned, once you start on this path, it is a downward spiral to ‘Mission addiction’ and I must confess that I have descended to the point where I can wake at night calling out: “No, no - you must use a ‘Proximity Trigger’ you fool!”

The toolsEven paths to deepening your flightsim addiction require some basic tools! Fortunately, Microsoft released the Missions Software Development Kit (SDK) but it is only available with the Deluxe version of FSX. This kit not only includes the information required to be able to plan and execute your Mission, but the Object Placement Tool which is the primary interface we use to create our Missions.

As with all tweaking and scenery or panel design and creation, you should know the importance of backing up any file with which you work as a precaution. It will also help if you are comfortable with editing basic configuration files.

Basic file structureFirstly, however, we should examine the folder structure and primary configuration files that constitute the Missions engine. Without this knowledge, we will waste a lot of time and the inexperienced may also inadvertently remove or change critical files - requiring the dreaded phenomenon known as – ‘a full reinstall’! While this series was prepared using Windows Vista, the procedures in Windows XP will be the same, even if some of the diagrams in this series look a little different to what you are used to - it is purely cosmetic in this case!

Using Windows Explorer, open your FSX main folder which is located under the Program Files/Microsoft Games folder just as it was in FS9. However, you will notice a few differences in the layout of the folders when comparing the two versions. The changes start to appear when you open your main Microsoft Flight Simulator X folder (Fig. 1). You will notice that some folders have disappeared, for example, ‘Aircraft’, and you will notice some new ones have appeared such as ‘Missions’ and ‘SimObjects’. Open the ‘Missions’ folder and you will see a list of folders with names such as ‘Airline Pilot’, ‘Backcountry’, ‘Pilot for Hire’ etc (Fig. 2). As you have probably guessed, these represent the main categories of Missions installed on your computer. If you have already installed some commercial Missions, you may also see them listed in the developer’s own folder.

As an example, open the ‘Airline Pilot’ folder and you will see a collection of new folders with each one representing a whole Mission as you would find it in the FSX Missions dialogue window (Fig. 3). Open the Amsterdam folder. If you haven’t yet flown this Mission, it requires you to fly a default Boeing 737-800 from Amsterdam’s Schiphol airport (EHAM) to London’s Heathrow (EGLL) via a flight planned route - although an emergency forces you to make a decision shortly after take-off.

Figure 4 displays the contents of this folder. If we are to create our own Missions, we must appreciate

the role each folder and file plays. The *.PLN and *.WX files may already be familiar to regular FS tweakers. They recreate the weather and flight plan details for the Mission. Each time you save a flight planned route, the details are kept in a PLN file which is saved in your ‘Flight Simulator X’ Files folder of ‘Your Documents’ (‘User’ in Vista). Not all Missions use a PLN file, for example, a short VFR flight to a nearby lake. The WX file contains details of the weather conditions at the time the flight was saved. The FLT file contains the details of the aircraft, its position, switch positions etc. These three files are common with many of your own saved flights and hold no surprises.

The ‘Charts.html’ document contains the navigation charts (if any), that you have scanned or made to supplement pilot navigation. The ‘Charts_Tab.html’ is just the same chart with tabs for the Mission overview and details. These pages, and the ‘Details’ and ‘Details_Tab.html’ files will be familiar to you as the pages that users read when preparing for a Mission, as are the ‘Overview’ and ‘Overview_Tab.html’ pages. You have already probably recognized the ‘imgM_i’ and ‘imgM_c.bmp’ images as the ones you see when you start, and hopefully, subsequently succeed in your Mission! If you have any trouble recognising these files, browse the ‘Missions’ section in FSX and you will see how they are used to provide you with information.

Now we get to the ‘amsterdam.spb’ file. Even regular FS tweakers

FSX Mission BuildingTools of the Trade

may not recognize this beast as an SPB, or ‘Sim-Prop Binary’ format. Missions will happily use either SPB or XML format files, but SPB will give you faster load times. FSX will also select the SPB file in preference to an XML file of the same name, which has implications in the next issue when we start creating and editing our Mission. We will also learn how to create SPB files from our working XML file later in the series.

There are also usually two folders within this particular Mission folder itself. The images folder contains our charts and images used by the html files (Fig. 5), while the sound folder contains all our recorded sound files if we decide to create and include them in our Mission package. Phew! Don’t worry if it sounds a bit bewildering. The structure of the Missions data will become easier to follow as we progress through creating our own Mission, so don’t get too caught up on the detail just yet.

There is one more folder that for

FIG. 1 Most of the user data is in the Missions Folder

FIG. 2 There are an abundant number of categories to choose from and you can create your own

Artificial gates can be used for a tutorial or adventure

FIG. 3 Individual Missions are in their own folders for simplicity

FIG. 4 Standard Mission folder contents

FIG. 5 You assemble all your charts and diagrams into a single folder

FIG. 6 Rewards are fun for the end-user and simple to create

Mission Building in FSX – TUTORIAL

40-43_jp.indd 40-41 3/8/07 15:23:26

Page 3: Mission Building in FSX - Part 1

42 PC Pilot Issue 48

TUTORIAL – Mission Building in FSX

some reason is remote from the Missions. That is the ‘Rewards’ folder which you will find in the Main FSX folder itself. If you take a peek in there, you will find a number of RWD files (Fig. 6). These are created from JPG or BMP pictures of a specific size that we can convert to the correct format. While Figure 7 shows a sample of these, we will look at these in more detail later in the series.

From little things, big things grow...Well before we even start to open files and play with variables, we need to have a plan! This plan will start as a small seed and over a period of time will hopefully develop into a complex, absorbing and thoroughly entertaining scenario. I found the best way to start is with a large sheet of blank paper and some spare time. You need to consider the following factors:1. The general theme. Will it be a

rescue, a charter flight, an airline ‘milk-run’ etc?

2. What will the challenges be? Engine failures, instrument failures, weather, bears on the runway etc?

3. What is the location, season, weather, time of day?

4. What aircraft type is appropriate? Will you use a default one or include (with perMission) an add-on?

5. Do you have any special scenery that would enhance the scenario? You can always (and probably

will) modify these as we progress through this series, but you need to have a reasonably thorough plan to start with. The ‘Object Placement’ tool is far from a logical tool to use, and you will find that if you wish to make a major change to your Mission later, it may involve

a lot of work to rebuild your previous scenario.

After considering this for some time, I came up with a plan that should be reasonably simple to program, but also contains some occasional advanced features to highlight the flexibility that is incorporated into the Mission engine. You may of course choose your own scenario location and just be prepared to modify what we discuss to fit your plan.

We will divulge our entire plot next issue but, to give you a hint, it will involve flying tourists around one of the world’s most scenic harbours. Visit http://www.seaplanes.com.au to get the general idea! We will also receive input from the real-world company pilots to try to ensure it becomes not only as realistic as possible, but also highlights some of the challenges they may face! I also suggest you read http://www.fsinsider.com/developers/Documents/DesigningGreatMissionsforFSX1.pdf which highlights many salient points for Mission design which we can incorporate into our theme.

The basic toolsNow we need to make sure we have the relevant tools. When you installed FSX, you probably didn’t install the SDK, unless you are a ‘tweaker’ from way back and wanted to explore the inner workings from the outset. If you didn’t, put the FSX Disc 1 into your drive and using Windows Explorer, right click the drive and then click ‘Explore’. Open the SDK folder and double click the Microsoft Flight Simulator X SDK installer icon to start the installation.

Please be careful with these next steps as some recent updates have confused many and caused many lost hours trying to correct them! If you haven’t already done so, install the FSX Service Pack 1 supplied on

the cover disk of our previous issue of PC Pilot (issue 47); alternatively it is also available from www.FSInsider.com. Then, download and install the SDK’s Service Pack 1A from www.FSInsider.com. Note: SDK Service Pack 1A is a different update to the original SDK Service Pack 1! Please note that you must install SDK 1A AFTER the FSX SP1 update to get it working - don’t ask me why, I just know this!

To be sure you have installed everything correctly, start an FSX ‘Free Flight’ and in the task bar you should see a new option called ‘Tools’. Click on the Tools bar and you should see ‘Object Placement Tool’ displayed (Fig. 8). If this isn’t visible, something has gone amiss with your installation and you need to install it manually. The main reason this may occur is when you have a non-standard FSX installation or partitioned drives.

To install manually, open the c:\Program

FIG. 7 The FSX Pilot Records keep your rewards and milestones!

Files\Microsoft Games folder and you should now see a folder titled ‘Microsoft Flight Simulator X SDK’. Navigate your way through to the SDK\Mission Creation Kit folder. You should see a file called ‘dll.xml’ (Fig. 9). This file tells FSX where to find the ‘Object Placement Tool’ and turns on some parameters that allow it to become visible. Windows XP users should copy the ‘dll.xml’ file to their c:\Documents and Settings\<your user name>\Application Data\Microsoft\FSX folder.

Vista users please note that you must copy the dll.xml file to your c:\users\<your username>\Application Data\Microsoft\FSX folder. (In Vista, the name of the Documents and Settings folder has been changed to ‘Users’.) If you open the <your user name> folder and the Application Data folder doesn’t appear, simply type the folder destination into the task bar at the top left of the window and it will then appear (Fig. 10).

Special effects and sounds can also be incorporated

FIG. 8 The ‘Object Placement Tool’ will be our main interface to create the Mission

FIG. 9 If you need to do a manual install, you need to locate the dll xml file

The Mission engine flexibility allows you to create any genre

Even the animated animals in FSX can be part of the challenge!

If you still can’t get the ‘Object Placement Tool’ to appear, go back to your SDK/Mission creation folder and open the ‘MissionCreation.html’ file and go to ‘Setup’. It offers suggestions on how to check your ‘dll.xml’ file to make sure it is configured correctly. Alternatively, visit the FSX Mission forums at www.Avsim.com or http://fsxMission.com/live/ for advice.

Your homework!If it is any consolation, you have now completed one of the most complex parts of creating a mission! Until next time, I suggest you fly as many default and add-on missions as you can to help develop an idea of what works for you and what doesn’t. You may also like to read through the SDK document that you installed and become familiar with the general terms and layout.

Peter Stark

FIG. 10 Vista users may need to locate their Application Data file to correctly place the dll xml file

Mission Building in FSX – TUTORIAL

40-43_jp.indd 42-43 3/8/07 15:23:33

Page 4: Mission Building in FSX - Part 1

42 PC Pilot Issue 48

TUTORIAL – Mission Building in FSX

some reason is remote from the Missions. That is the ‘Rewards’ folder which you will find in the Main FSX folder itself. If you take a peek in there, you will find a number of RWD files (Fig. 6). These are created from JPG or BMP pictures of a specific size that we can convert to the correct format. While Figure 7 shows a sample of these, we will look at these in more detail later in the series.

From little things, big things grow...Well before we even start to open files and play with variables, we need to have a plan! This plan will start as a small seed and over a period of time will hopefully develop into a complex, absorbing and thoroughly entertaining scenario. I found the best way to start is with a large sheet of blank paper and some spare time. You need to consider the following factors:1. The general theme. Will it be a

rescue, a charter flight, an airline ‘milk-run’ etc?

2. What will the challenges be? Engine failures, instrument failures, weather, bears on the runway etc?

3. What is the location, season, weather, time of day?

4. What aircraft type is appropriate? Will you use a default one or include (with perMission) an add-on?

5. Do you have any special scenery that would enhance the scenario? You can always (and probably

will) modify these as we progress through this series, but you need to have a reasonably thorough plan to start with. The ‘Object Placement’ tool is far from a logical tool to use, and you will find that if you wish to make a major change to your Mission later, it may involve

a lot of work to rebuild your previous scenario.

After considering this for some time, I came up with a plan that should be reasonably simple to program, but also contains some occasional advanced features to highlight the flexibility that is incorporated into the Mission engine. You may of course choose your own scenario location and just be prepared to modify what we discuss to fit your plan.

We will divulge our entire plot next issue but, to give you a hint, it will involve flying tourists around one of the world’s most scenic harbours. Visit http://www.seaplanes.com.au to get the general idea! We will also receive input from the real-world company pilots to try to ensure it becomes not only as realistic as possible, but also highlights some of the challenges they may face! I also suggest you read http://www.fsinsider.com/developers/Documents/DesigningGreatMissionsforFSX1.pdf which highlights many salient points for Mission design which we can incorporate into our theme.

The basic toolsNow we need to make sure we have the relevant tools. When you installed FSX, you probably didn’t install the SDK, unless you are a ‘tweaker’ from way back and wanted to explore the inner workings from the outset. If you didn’t, put the FSX Disc 1 into your drive and using Windows Explorer, right click the drive and then click ‘Explore’. Open the SDK folder and double click the Microsoft Flight Simulator X SDK installer icon to start the installation.

Please be careful with these next steps as some recent updates have confused many and caused many lost hours trying to correct them! If you haven’t already done so, install the FSX Service Pack 1 supplied on

the cover disk of our previous issue of PC Pilot (issue 47); alternatively it is also available from www.FSInsider.com. Then, download and install the SDK’s Service Pack 1A from www.FSInsider.com. Note: SDK Service Pack 1A is a different update to the original SDK Service Pack 1! Please note that you must install SDK 1A AFTER the FSX SP1 update to get it working - don’t ask me why, I just know this!

To be sure you have installed everything correctly, start an FSX ‘Free Flight’ and in the task bar you should see a new option called ‘Tools’. Click on the Tools bar and you should see ‘Object Placement Tool’ displayed (Fig. 8). If this isn’t visible, something has gone amiss with your installation and you need to install it manually. The main reason this may occur is when you have a non-standard FSX installation or partitioned drives.

To install manually, open the c:\Program

FIG. 7 The FSX Pilot Records keep your rewards and milestones!

Files\Microsoft Games folder and you should now see a folder titled ‘Microsoft Flight Simulator X SDK’. Navigate your way through to the SDK\Mission Creation Kit folder. You should see a file called ‘dll.xml’ (Fig. 9). This file tells FSX where to find the ‘Object Placement Tool’ and turns on some parameters that allow it to become visible. Windows XP users should copy the ‘dll.xml’ file to their c:\Documents and Settings\<your user name>\Application Data\Microsoft\FSX folder.

Vista users please note that you must copy the dll.xml file to your c:\users\<your username>\Application Data\Microsoft\FSX folder. (In Vista, the name of the Documents and Settings folder has been changed to ‘Users’.) If you open the <your user name> folder and the Application Data folder doesn’t appear, simply type the folder destination into the task bar at the top left of the window and it will then appear (Fig. 10).

Special effects and sounds can also be incorporated

FIG. 8 The ‘Object Placement Tool’ will be our main interface to create the Mission

FIG. 9 If you need to do a manual install, you need to locate the dll xml file

The Mission engine flexibility allows you to create any genre

Even the animated animals in FSX can be part of the challenge!

If you still can’t get the ‘Object Placement Tool’ to appear, go back to your SDK/Mission creation folder and open the ‘MissionCreation.html’ file and go to ‘Setup’. It offers suggestions on how to check your ‘dll.xml’ file to make sure it is configured correctly. Alternatively, visit the FSX Mission forums at www.Avsim.com or http://fsxMission.com/live/ for advice.

Your homework!If it is any consolation, you have now completed one of the most complex parts of creating a mission! Until next time, I suggest you fly as many default and add-on missions as you can to help develop an idea of what works for you and what doesn’t. You may also like to read through the SDK document that you installed and become familiar with the general terms and layout.

Peter Stark

FIG. 10 Vista users may need to locate their Application Data file to correctly place the dll xml file

Mission Building in FSX – TUTORIAL

40-43_jp.indd 42-43 3/8/07 15:23:33