| Creating Cinematic Sequences in WWII Fighters
Version 1.0 December, 1999
This document assumes that you are familiar with the layout of a mission file, the basic syntax for triggers and that you have access to a simple text editor. If you are not already familiar with mission files and triggers, here are the suggested steps for learning what you need to know before you begin creating cinemas: First, read the manual for WWII Fighters to familiarize yourself with mission design and creation. Practice using the mission builder to create simple missions, and examine the saved mission file using a text editor. Next, read the trigger_readme HTML file included with the full version of the game. This document will help you understand the cinema engine, which is a subset of the WWII Fighters trigger system.
What is a WWII Fighters Cinema? These camera commands exist as part of a normal mission file and are controlled through the trigger system. Specifically, the camera commands are Trigger Actions, and they can be invoked by any Trigger Check. The most common Trigger Check used to control the camera is TIME. You can use time to ensure that the camera movement is repeatable through multiple viewings of the cinema. A Cinema Tutorial
Launch WWII Fighters and enter the Mission Builder. Create the mission file TESTSAVE.MIS by following these steps: Go to Create/Flight/Allied and create a flight of P-51s. Under the Trigger menu, select Create. In the Notepad: select TIME in the Check 1 tab, then go to the Action 1 tab, select DISPLAYTEXT and type "My cinema" in the text field. Save the mission as testsave.mis. TIP: The easiest way to create large cinemas is to: first, use the Mission Builder to add planes and then use Dynamic Mission Editor to add ground objects and fine tune the planes' positions. Ground objects are easily placed in the Dynamic Mission Editor you can see exactly where they are in relation to the terrain. See the accompanying document, dynamic.htm, for an explanation of the Dynamic Mission Editor. II. HOW MISSION FILES ARE ORGANIZED Before you can edit .mis files, you need to familiarize yourself with how they are organized. The first section includes the time, number of reviews and other general information about the mission. Aggregate information starts around the 13th line. The first aggregates listed in this section are the flights of planes. Notice that under the ".Aggregate" declaration, there is a line with a Tag Identifier. Each flight, plane, division and vehicle has a unique Tag Identifier number. You will use this ID to refer to the entity when you are building the cinema. TIP: You can manually change an entity�s Tag Identifier, but you must be sure that it remains unique. If you let the game generate a Tag Identifier, you will be guaranteed that they are all unique. Keep in mind that even though a Tag Identifier might change when you save a mission, it will be properly updated in all instances. At the bottom of the file, you will find the dummy trigger that you created. You will edit this trigger to start the cinema. III. BEGIN WITH A SIMPLE EDIT OF TESTSAVE.MIS In this section, you will learn how to manually edit triggers. Couple of notes about triggers before you begin: triggers should be kept in the same section of the .mis file, (TIP: you may want to keep them in sequential order, according to the TIME); and triggers cannot be nested. First, find this trigger at the end of the file: .Trigger .Name Trigger 1 .EndString .Check .TIME 30.0 .EndCheck .Action .DISPLAYTEXT .StartString My Cinema .EndString .EndAction .EndTrigger Next, replace the entire trigger with the following trigger: .Trigger .Name Trigger 1 .EndString .Check .TIME 0.0 .EndCheck .Action .STARTCINEMA .CamType TRACKVIEW .TagIdentifier XXX EXIT .Yaw 5.98 .Pitch 6.09 .Dist 135.6 .EndAction .EndTrigger
Third, replace the XXX with the Tag Identifier of a P-51 plane. Be sure that you find the Tag Identifier of an individual plane, and not the entire flight. You will see Entity nested in the Aggregate section of the file. A couple of lines below Entity, you will find the correct Tag Identifier for the P-51 (which is designated by .TypeName). This trigger causes the game to go into cinema mode at the beginning of the mission (because the time check will trigger at 0 seconds). The .STARTCINEMA action has six parameters: The CamType field sets the type of camera. There are four possibilities: TRACKVIEW(the F10 view); CHASEVIEW(the F5 view); DROPVIEWPERM(the F9 view); and DROPVIEWREP(the Alt+F9 view). The TagIdentifier field indicates the object of the camera's focus. Any entity in the mission file with a TagIdentifier is a valid target for the camera. The third field can be set to either "EXIT" or "NOEXIT". This field determines whether or not the user can cancel the cinema. The last three fields set the yaw, pitch and distance of the camera in relation to the focused object. The yaw and pitch are measured in radians and the distance is measured in meters. Although it might seem difficult to derive these numbers visually, you will find the Dynamic Mission Editor will provide you with all of these numbers. Notice that the trigger to start the cinema is set to go off at the beginning of the mission. While it is possible to have a cinema begin at any time during the mission, it is not recommended. The cinema system is designed and tested to handle a cinema as an individual mission file. Beginning and ending a cinema within a mission may lead to unpredictable results during the mission. Before you load this mission, you will also need to add one more trigger: .Trigger .Name Trigger 2 .EndString .Check .TIME 30.0 .EndCheck .Action .ENDCINEMA .EndAction .EndTrigger This trigger will cause the cinema to end after thirty seconds. If you choose to use the NOEXIT parameter when you begin a trigger, be sure to provide an ENDCINEMA action. Otherwise there will be no way to end the game. When you run this mission, you will see the game go into cinema mode for thirty seconds. The camera should focus on the P-51 in track view. Notice that while you are in cinema mode, none of the keys work (except for the keys to end the cinema). TIP: As you become more experienced at making cinemas, you will want to make small changes to the scene and then immediately view the cinema. Since you cannot make changes while in cinema mode, you will want to temporarily disable it. The easiest way to disable a cinema is to go into the mission and change the start time of the cinema to a really larger number. If the start cinema trigger action is not set, none of the other cinema-related triggers will work. IV. ADDING SOME MORE CAMERA WORK We will now take the thirty-second cinema and add some movement to the camera. Insert the following trigger at the bottom of the mission: .Trigger .Name Camera 1 .EndString .Check .TIME 0.0 .EndCheck .Action .ROTATECAMYAW .StartYaw 5.98 .EndYaw 4.5 .Time 10.0 .EndAction .EndTrigger This trigger will rotate the camera from a yaw of 5.98 to 4.5 radians over a period of ten seconds. Notice that the starting yaw is the same as in the Start Cinema trigger. Although it is not necessary to choose the same angle, it will prevent any dramatic camera jumps. There are two other camera movement trigger actions that are very similar to ROTATECAMYAW. Do not add these to the TESTSAVE.MIS cinema we are working on. The syntax for ROTATECAMPITCH is as follows: .Trigger .Check .TIME X.X .EndCheck .Action .ROTATECAMPITCH .StartPitch x.x .EndPitch x.x .Time x.x .EndAction .EndTrigger The syntax for adjusting the camera�s distance is as follows: .Trigger .Check .TIME x.x .EndCheck .Action .MOVECAMDIST .StartDist x.x .EndDist x.x .Time x.x .EndAction .EndTrigger
V. ADDING MORE ENTITIES TO THE CINEMA Now that you have a simple cinema with one object and a rotating camera, you can add complexity to the scene. Because the triggers you added to handle the camera movement are not part of the Mission Builder, you should not try to edit them there. However, you may edit other aspects of the cinema mission file without any problem. Open the TESTSAVE.MIS in the Mission Builder. Add a flight of Axis planes near the original flight of P-51s. Save the mission and exit the game. You will now add a trigger to change the focus of the camera to one of the newly added Axis planes. Enter the following trigger in your cinema: .Trigger .Name Camera 2 .EndString .Check .TIME 10.0 .EndCheck .Action .CHANGECAM .CamType DROPVIEWPERM .TagIdentifier xxx .EndAction .EndTrigger Replace the xxx with a .TagIdentifier from one of the newly added Axis planes. Adding this trigger will focus the camera on the Axis plane in fly-by view. Click here for camera details.VI. EMBELLISHING THE CINEMA WITH TEXT There are two ways of displaying text during a cinema: The first method will scroll the mission summary from the bottom to the top of the screen. You can enter a mission summary using the mission builder. The following trigger will start the scrolling of the mission summary one-second into the cinema. The .TimeDuration field indicates how long it will take one line of text to reach the top of the screen, and the .RightCorner field determines what side of the screen the text is on (.RightCorner = 0 is the left side, .RightCorner = 1 is the right side). .Trigger .Name Scrolling text .EndString .Check .TIME 15.0 .EndCheck .Action .DISPLAYSCROLLINGTEXT .TimeDuration10.0 .RightCorner 0 .EndAction .EndTrigger The second method is to enter a one-line message that will fade in and fade out at a specific portion of the screen. The follow trigger will display "Jane�s Combat Simulations Presents" five seconds into the cinema at a screen position of 10% from the left and 90% down. An .XPos and .YPos of 0% is the upper left-hand corner of the screen. The message will appear on the screen for a total of six seconds. You can not display more than one fading text on the screen simultaneously. .Trigger .Name Opening credit .EndString .Check .TIME 5.0 .EndCheck .Action .DISPLAYFADINGTEXT .StartString Jane�s Combat Simulations Presents .EndString .XPos 0.10 .YPos 0.80 .EndAction .EndTrigger
VII. BEGINNING AND ENDING CINEMAS This sample cinema that we have built during this tutorial is a stand-alone mission. When the cinema ends, the game will continue to run and will return control to the user, but it will still be running the same mission used to create the cinema. Most of the time, you want your cinema to be attached to a completely different mission, because you will not want the actual flyable mission to depend upon the results of the cinema. If you wish to attach your cinema to the beginning of a mission, open the mission file in a text editor, and add the following line below .Mission (at the beginning of the file): .CinemaIntro cinema_name.mis .Endstring The cinema_name.mis file can be any standard cinema (such as testsave.mis, which we have built during this tutorial). When the cinema ends (or when the user cancels the cinema), the original mission will be loaded. In the tutorial cinema, .ENDCINEMA was included in one of the sample triggers. Be sure to always include the .ENDCINEMA trigger in the cinema file, or the actual mission will never begin. Another way to load a cinema is to use a trigger called LOADNEXTMISSION. This trigger can be used in any mission file to load another mission file. When the new mission is loaded, the results of the previous mission are completely thrown away. If you wish to have an ending cinema that depends upon the result of the mission, you can use the trigger system to decide which cinema to play. Here is the syntax for the LOADNEXTMISSION trigger: .Trigger .Name Loading another mission .EndString .Check .TIME 60.0 .EndCheck .Action .LOADNEXTMISSION .MissionName sa01.mis .EndString .EndAction .EndTrigger To end a cinema, you can use the trigger presented in the beginning of this tutorial: .Trigger .Name Ending Cinema .EndString .Check .TIME 120.0 .EndCheck .Action .ENDCINEMA .EndAction .EndTrigger If the cinema was launched using the .CinemaIntro tag in another mission, this mission will now be loaded. Otherwise, the game will return to normal mode, the letterbox effect will be turned off and control will be returned to the player, but the same cinema mission will still be playing. Another way to end a cinema is to use the LOADNEXTMISSION trigger presented earlier. You can end the cinema by either by loading a mission or by launching a different cinema. The LOADNEXTMISSION trigger can handle either case. Advanced Applications The cinematic system is simply an extension of the trigger system. Although using the system involves manipulating text files and understanding the timing of the trigger system, you gain a lot of flexibility. All of the examples presented in the tutorial involve changing the camera at a specific time during the cinema. Since the camera scripting commands are simple Trigger Actions, you can trigger them off of any Trigger Check in the game. Also, since the logic for loading different missions is embedded into the trigger system, you can cause the game to branch and load different cinemas and different missions according to specific conditions within the mission. A clever mission designer or cinematic director can create a dynamic environment using these triggers. One important aspect of the camera system in WWII Fighters is the modeling of visible range. While you are flying a mission, the game will not allow you to directly view an object that is outside the reasonable visible range of the player plane. If you wish to view an area of the world outside of the visible range of the pilot, go into the Dynamic Mission Editor. The visible range restriction is removed while you are in the Dynamic Mission Editor, and you will be able to view any object at any position in the world. This distribution includes three other important files:
Please note that the SampleCinema.mis does not have an associated mission and is designed to end at the end of the cinema.
All contents © 1999 Electronic Arts, Inc.
|