Anda di halaman 1dari 5

FSX Mission Building

Effects and Rewards


Adding custom effects can bring spectacular results

elcome to the last tutorial in this FSX mission creation series. By now you will have a functioning mission with triggers and audio files that work perfectly. Remember, you can download my work-in-progress version from http://peter.r.stark.googlepages. com - follow the PC Pilot Tutorial links. To finish off the mission we will link some custom effects, create our Reward and package it all up for testing and release. etc in addition to the default ones packaged with FSX. These effects files are written in XML, the same format in which the gauges and missions are created. While creating effects is beyond the scope of this series, if you open one of the effect files with Notepad or similar program you will see that it is simply a set of instructions (Figure 1) to determine which particular texture to use (Figure 2) at any given time, and which are found in the Effect/Texture folder. Even though there are a number of effects in the default FSX installation, more are available from the major file libraries distributed as either individual effects or packaged as themes. If you have a burning desire to create your own effects, you will find a suite of Special Effects files in the FSX SDK>Environment Kit folder. The documentation will guide you through the steps required to modify existing effects or to create your own from scratch. You can also add these effects to your mission. Just as we can trigger an audio file or a weather event, we can also trigger any effect in the same way. For example, you can

Custom effects
Many users are familiar with the flashing red aircraft beacons or perhaps smoke emitting from the engine cowling on an aerobatic aircraft. These seemingly animated objects are called effects and are all the required instructions and textures contained in the FSX Effects folder. If you open up this folder you will probably find a surprisingly large number of effects files (with the .fx extension) as many of your existing add-ons may have already installed them to create fireworks, explosions, custom strobe effects

50

PC Pilot Issue 53

Mission Building in FSX TUTORIAL

use the ubiquitous RectangleArea to trigger fireworks when you land and taxi towards the wharf to celebrate your success. As an example, lets add a large yacht to Rose Bay and cause it, sadly, to explode into flames as we approach. Firstly, use the OPT to create the yacht in the bay. In this case, I slewed to the position I wanted the yacht, added the yacht by pressing Add > Scenery and selected VEH_water_yacht_280ft from the drop down list (Figure 3). While in the same position, select Add > Scenery again and find the object called GEN_SceneryEffect and select it (Figure 4). This step is new to us and critical for any effect to work in a mission. In practical terms, the effect will be attached to this GEN_SceneryEffect box rather than to the yacht or other object. Next, we select Add > Action > AttachEffectAction from the OPT. This will allow us to link the effect to the object above. We need to manually enter two fields in the Property/Value sections. Firstly, double-click EffectName and type in the name of the effect we want to occur. This must be the full name of the effect found in the FSX Effects folder including the .fx extension, for example, fx_huge_explosion.fx. Next, click on the ObjectReference Property field and the available options will appear in the Elements box just to the right. Double click the GEN_SceneryEffect (scroll down if necessary). Figure 5 shows the completed OPT screen. Now we have linked the explosion effect to the GEN_SceneryEffect box, which you will recall is already right over the yacht. All that remains is to add the trigger. In this example, I want the yacht to explode as we approach, so

FIG: 1

FIG: 2

An example of an Effect file a proximity trigger is used. We can now create a defined area which we will subsequently link the trigger to. Slew to the position where you want the trigger to fire and select Add > AreaDefinition > AreaRectangle > Add. Change the size and orientation of the rectangle if desired. We can now start the final step by selecting Add > Trigger > Proximity Trigger in the OPT. We will need to add two instructions here. Firstly, select Areas in the Property/Value box and double click on the RectangleArea we just created which should appear in the Elements box on the right (Figure 6). Finally, double-click on the OnEnterActions box in the Property/Value box and double-click on the AttachEffectAction we created earlier (Figure 7). Phew!! We can now save the mission file, exit FSX and restart the mission.

The corresponding effect textures As we taxi through the Area Rectangle, the Proximity Trigger is activated, which in turn activates the Effect in the Scenery Effect box over the yacht - Figure 8 shows we are successful. A final word of warning here! If you use anyone elses effects, you must ask them for permission before including them in your package and be sure to acknowledge them. It isnt good enough to simply thank them!

When the aircraft climbs, even when holding a specific indicated airspeed on the gauge, it is actually accelerating

Getting your just reward


If you frequently trawl the flight simrelated library websites you will notice new missions are posted regularly. Many are complete missions in the true sense (rather than just flight plans and instructions) and are compiled using the OPT and usually contain rewards. Creating your own reward is reasonably straightforward. If you have flown lots of missions successfully, browse through the Pilots Records section of FSX (Figure 9) and you will find a large range of

FIG: 3 FIG: 4

Adding the yacht to demonstrate an explosive effect

Add the GEN Scenery Effect to exactly the same location as the yacht

PC Pilot Issue 53

51

TUTORIAL Mission Building in FSX


I never tire of this view!

medals, certificates and trophies that you have been awarded. You will see that they dont need to be works of art and you can use a screen shot and some default Windows software to create them. For this mission reward I selected a screen shot taken during the initial trial flights around Sydney Harbour (Figure 10). I then opened that jpeg image in Microsoft Paint (look in Start > All Programs > Accessories) and added the text. You can of course use your own more sophisticated editing software to create more artistic pieces! Whatever your design, you must then save this image in two sizes in either jpeg or bitmap format it doesnt matter which. One image should be 300 pixels wide x 370 pixels high and the smaller thumbnail version should be 100 pixels wide x 80 pixels high. For now, place both of them into a new folder on your desktop. Next we need to create a reward file by first adding the data to a reward xml file and then converting it. Use Notepad or similar to create your own from scratch, or copy the data from the SDK or another source and change the relevant fields to reflect your own mission name etc. Note that the syntax of the example in the SDK is incorrect and will not work! You need to remove the hyphens at the beginning of lines two and three. If you cast your memory back to Issue 49 (or read it again), you will remember the GUID number which is a unique computergenerated code that allows the software to address or point to a very specific piece of information. You will need to create another GUID number now to enter into the Reward rewardId section of the file. Be sure to save it as an .xml file, not a .txt file. Figure 11 is the contents of my reward xml file, which is also available from the PC Pilot tutorial link above.

Creating your own reward is reasonably straightforward

Place the finished xml file into the same folder as the reward artwork we completed earlier. In a new window, open the SDK > Environment Kit > BGL Compiler SDK folder and you will see a file called BGLComp. Open your Rewards folder and drag the xml file on to the BGLComp icon (Figure 12). This will cause the BGL Comp to write a new file with a .rwd extension, eg Sydney Seaplanes.rwd. Copy this file into your main FSX Rewards folder and youre done. You may be interested to learn that a freeware utility recently became available that makes reward creation a breeze - its called Cirrus Reward Creator (cirrusrc.zip) and is created by Daniel Metien. Available from some major file libraries, it will create your reward xml file and generate the GUID in one step.

Completing the mission


To finish off the mission, we now want to provide our prospective

users with their reward if they are successful in completing the assigned goals. In this tutorial mission, simply landing back at Rose Bay and taxiing up to the wharf is enough to succeed. First we create a Goal by selecting Add > Goal > Add in the OPT. Make sure the GoalState is Pending and type in the text for the message you would like to appear when the user succeeds (Figure 13). You may use more than one goal. The SDK uses the example of landing on the runway number as one and landing correctly as the second, ie simply bouncing on the runway numbers and going back into the air again wont work. Next, create a GoalResolutionAction linking it to the Goal we just created (Figure 14). Move on to creating a GrantRewardAction and carefully type in the GUID of the reward created above into the RewardRef field (Figure 15). This links the

FIG: 6

FIG: 5

Now the Effect Action has been directly linked to the Scenery Effect box right over the yacht

Link the Proximity Trigger to the new Area Rectangle

52

PC Pilot Issue 53

Mission Building in FSX TUTORIAL

FIG: 7

FIG: 8

The yacht appears to burst into flames as we taxi through the Trigger! Now the Proximity Trigger is linked to the Effect Action completion of this goal to the specific reward file for this mission. So at this stage we have now linked the Goal (landing near wharf), to the action of displaying the congratulatory text and act of giving you the reward, to the actual reward (.RWD) file. So we now need to tell the mission precisely when to trigger the Success message and allow you access to the reward. A simple way to do this is to again create a RectangleArea that we pass through as we taxi up to the wharf. Then, add a Proximity Trigger like before. Click the Areas field and then double-click the relevant RectangleArea near the wharf. Then click the OnEnterActions field and doubleclick both the GrantRewardAction and the GoalResolutionAction (Figure 16). You have now linked the final trigger with the relevant area, goal and reward. Fly the mission again or simply taxi around and into the RectangleArea near the wharf, and you should get your Success message and your reward when you exit. If not, double-check that all the goals, rewards, areas and triggers are correctly linked as in the diagrams.

FIG: 9

Testing 1, 2, 3...
One problem you may encounter is that because the mission is a product of your own imagination and patience, you may overlook errors. Naturally, because you have flown the route so many times, even after editing, you often become so familiar with your briefing and audio files that you dont listen to or read the instructions properly you fly. A simple solution is to send it to a flight sim friend to test from scratch. Bundle up all the relevant files with a compression utility such as Winzip. Fortunately, the folder/file structure for missions is very simple in this case, just zip up the Sydney Seaplanes folder (including sub folders) as well

Rewards add a sense of achievement to your missions

FIG: 11

FIG: 10

The Reward xml file is a simple affair

FIG: 12

Creating your reward image from your stock of mission screenshots makes it easy

Drag the reward xml file on to the BGLComp and your reward RWD file is generated

PC Pilot Issue 53

53

TUTORIAL Mission Building in FSX


Success after a lot of hard work

FIG: 13

First create the Goal making sure it is in a Pending state

FIG: 14

as the Sydney Seaplanes.RWD file from the Reward folder. Dont guide your beta testers at all. Ask them to provide concise feedback on any errors or areas of confusion, and to offer constructive comments about any further scenery additions or removal. If you can manage to send this to several beta testers, your final mission is far more likely to be fun and depending on the difficulty level, challenging for end-users.

Signing off
Once you are satisfied it is complete, bundle up the most recent versions of the files, along with a simple readme.txt file where you can explain the installation, thank your beta testers and any simmers who provided support or files, zip it all up and send to your friends. If you feel confident, read the upload instructions at popular libraries and place your mission on the web for all to enjoy.

Acceleration/SP2 users
The Acceleration expansion pack or SP2 includes many software updates which may cause you to experience problems with some textures on your older installed aircraft. I have noticed that among the addons with problems is the Sydney Seaplanes Beaver even though it is just a texture

STOP PRESS
I have just received word of a new utility which will put a smile on the face on any mission creator. Jim Keir has just released an FSX Mission Editor which it seems will make mission creation a much simpler exercise using a custom User Interface. This greatly simplifies the process of creating the correct links between triggers and defined areas and actions. The Editor will be available in two versions a freeware base model and a payware extended version. Visit www.fsaddon.com or www. simmarket.com for details.

update of the default FSX Beaver. Typically, some textures will not load. For example, propellers in motion, some virtual cockpit panels and colours are replaced by solid black. Some add-on developers are updating their files to be Acceleration/SP2-compliant, but many that were developed for FS2004 and converted to FSX probably will not be. If you wish to use Acceleration/SP2, you have two options. You can change the aircraft to an SP2-compliant model by recreating the FLT and WX files using the new aircraft. Alternatively, you may wish to modify the offending textures by following the instructions at http://blogs.msdn.com/ ptaylor/default.aspx and scrolling down to the article entitled How to upgrade propellers in FS9 Aircraft for FSX-SP2. However, be aware that if you choose to uninstall Acceleration/SP2, as I initially did, you are opening a Pandoras Box. You may find you have to reinstall all the SDK software and updates to retrieve your Object Placement Tool. Another consideration with the release of Acceleration/SP2 is that if you create a mission in Acceleration or with SP2, only users with those particular add-ons installed will be able to fly the mission. This tutorial was created in FSX SP1 and so should work for all users. As a final reminder, creating missions is a challenge for the creator as well as the enduser. Refer to the SDK as required, visit mission creation forums or dissect work done by others to see how to get your desired result. The final version of this tutorial mission is available at http:// peter.r.stark.googlepages.com or on the PC Pilot cover CD for Issue 53. I look forward to flying your missions soon!

We can now link the Goal to the Goal Resolution Action

FIG: 15

You must make sure your Reward Ref is identical to the GUID created in your reward file

FIG: 16

The Property Set confirms we have linked the Goal, Reward and Area to this Trigger mission: You learn a little about everything when you write a mission. Also, special thanks to Mike Hill for allowing the use of his Sydney Seaplanes DHC2 livery (vhaamrep. zip)to be bundled with this mission. Peter Stark

Thanks
Special thanks to the members of FSXmission.com and especially Dave Gunner Gundlach and Kevin MacLeod for their assistance with this series. Gunners words will forever echo in my mind when I fly a

54

PC Pilot Issue 53

Anda mungkin juga menyukai