Starting the Editor In the "Tools" folder, there is a batch file called "editor.bat". Starting this file will by default start up the editor with the supplied demonstration map called "demo". Each map has it's own numeric ID and the ID of the demo map is 100. Starting the editor from the command line, you must supply the mission ID as a parameter for the program, e.g: [c:\IGI2\pc]tools\igi2ed.exe level100 You can edit the "editor.bat" file to start whichever map you like. It is not possible to change map without quitting the editor. Editor Basic Usage By holding the ALT key and moving the mouse you can alter your viewing angle in the editor. To move around in the 'world', hold ALT and SHIFT or CTRL. Normally, the cursor is moved around by moving the mouse. When holding ALT, the cursor is centered on screen. If you click on an object when in this state, you can rotate the camera around this object. Objects can be dragged around by clicking on them whilst holding either SHIFT or CTRL. This will move the object in one of two planes relative to your viewing direction. Map Organisation A map, (level) is organised in i hierarchy of objects (tasks) which is represented as a tree structure in the editor. This tree can be modified in several ways. Tasks can be moved, created and deleted in the treeview of the editor and a textual representation of the object hierarchy is saved on disk in the file 'objects.qsc'. The root of a level is the 'level' task, and all objects in a level must lie below this in the tree. Directly below the level task lies the 'static' and 'dynamic' tasks. These are called children of the 'level' task. The 'level' task is thus the parent of the 'static' and 'dynamic' tasks. You can navigate through the task tree by using the arrow keys left, right, up and down. The 'static' and 'dynamic' tasks are basically containers for other types of objects. In short, the 'dynamic' task contains all objects that move around or for some other reason needs run-time updating. The 'static' task contains all the objects that need not be updated at run-time. Each task has a type. 'level', 'static', are 'dynamic' all task-types. In the tree-view of the editor, the task-type of each task is displayed together with a numeric ID (if exists) and a comment (if exists). The task ID is used for communication between tasks through scripting. This will be dealt with later. Each task type has a set of named parameters which controls the behaviour of each instance of a task. These parameters are modified on the parameters screen through the entering of values by keyboard or the clicking and dragging of sliders with the mouse. The best way of getting a feel for the various aspects of building a map, from task organisation to parameter values is probably to try and play with the demo map. Editing a map A complete list of the commands available in the editor is shown later in this document. We will now go over the basics of creating, modifying and deleting tasks in the task tree. Creating a new task When moving around in the task tree, a new task can be created by pressing insert. The new task will be created as a child of the task the tree-view cursor is currently on. After pressing insert, you will be taken to a list-view of all available task-types. Select the type you want and press enter, cancel by pressing escape. The new task is now highlighted in the task tree-view and you can modify it's parameters by pressing enter. If the task is a world object (it has a position within the game world), it can be created at the camera position by holding shift and pressing insert. Modifying a task A task is created with a default set of values. The tasks can be modified/inspected by selecting them in the task tree-view and pressing enter. A list of parameters will be shown and you can move from one parameter to the next by pressing up/down or tab/shift-tab. Each parameter has a name (which should go some way toward explaining its function) and a type. There are string types, numeric types and component types. Some of the parameters are limited within certain ranges while others are not. Deleting a task A task is deleted by pressing Delete. Be careful when doing this, because it cannot be undone in any other way than restarting the editor. Copying a task to the clipboard Pressing Ctrl+C in the task tree-view will copy the current task to the clipboard. Ctrl+Shift+C will copy the current task + all its children, its children's children and so on (task sub-tree). Pasting a task or task subtree By pressing Ctrl+V in the task tree-view, any task or tasks on the clipboard will be copied and created as children of the current task. In this way, task sub-trees can be duplicated, which is often useful. The significance of task sub-trees In the task hierarchy, it is the parent task that decides what should happen to its children. This fact is exploited among others through scripting (explained later). In the editor when moving an object in the world, all of its children will follow. For instance, if you have a 'building' task which is furnished by one or more children of the type 'editrigidobj' (a rigid object which displays a 3d model, for instance a chair), the furniture will follow the parent building around if you decide to move it. Assigning a Task ID In the task tree-view, press Ctrl+I. You can either assign your own ID by entering a number (one that hasn't already been used), or clearing the dialog box and let the editor find a free ID for you. If you want to remove the task's ID, enter -1. Some IDs are reserved by the game and cannot be selected. The significance of the Task ID and Script Expressions Certain tasks can be scripted to do different things on the basis of the state of other tasks. The Task ID is there to uniquely identify each task. For scripts to be able to examine their state, many objects have properties with names associated with them. To examine the state of the door with Task ID 32, you could for example write a expression like "Door_32.isOpen". Here the door is uniquely identified by the name "Door_32" and the property you are examining is "isOpen". Expressions have a numeric value, and for expressions that are either true or false (as per the example with the door) the symbols TRUE (1) and FALSE (0) are defined. If the door is open, the expression evaluates to 1 (TRUE) and if it is closed, it evaluates to 0 (FALSE). The script expression syntax is similar to that of the C programming language, so if you are unfamiliar with that, the book "The C Programming Language" by Kernighan and Ritchie is highly recommended. A good way to see how the scripting works, is to examine the demo map. Task Type Descriptions Some task types are derived from other task types and thus share a subset of its parameters with the task type it is derived from. Look in the Tasktypes subdirectory for descriptions of the most commonly used tasktypes. As already mentioned, some of the task types have properties associated with them. These properties are described for each task type and are used in scripting. Some of the property names contain the word 'tick', which is the period from one world update to the next in the game engine. A tick equals 1/30th of a second. Creating a Multiplayer Map To create your own multiplayer map, follow these steps: 1. Create a new folder under missions/multiplayer, e.g "MyMission". (For the following steps, replace "MyMission" with the name of your mission). 2. Copy all the files and subfolders from the missions/multiplayer/demo folder to the "MyMission" folder. 3. Go to the "MyMission" folder and open the file "mission.qsc" with a text editor. 4. In the text editor you will see a line of that says "// Mission ID (must be unique between missions)", and below that, a number. This number can be any 32-bit positive integer above 100. No maps can have the same Mission ID, so use a number that hasn't been used before. Replace the number 100 with your new mission ID, e.g. 101. 5. Next, create a name for your mission on the line that says "Demo (Redstone)", e.g "MyMission". 6. Create a description of your mission. 7. For "Mission directory" and "Mission models directory", enter "missions/multiplayer/MyMission" 8. For "Mission models resource name", enter "MyMission" 9. If you have a loading screen picture (jpeg), enter the filename for "Mission Screenshot resource name". 10. Save the file. 11. Start the editor as described above. Readying a map for the game executable The game executable does not understand the plain-text files used by the editor, so they must be compiled. This is done by starting the "compilescripts.bat" file in the tools folder. Editor Keyboard mappings The table below lists all editor commands. Not all commands are available globally. Command Name Key combination CameraEnable CameraMoveForward CameraMoveBackward CameraAdjustRadius CameraResetRadius CameraLookDown CameraCopyPosition

CameraCopyPosition

CameraCopyOrientation CameraSnapToObject CameraSnapToObjectWithRadius CameraSnapToGround CameraStrafe CameraStrafeFree CameraStrafeLeft CameraStrafeRight TaskMoveUp TaskMoveDown TaskMoveHigher TaskMoveLower TaskNew TaskNewFirstChild TaskNewCameraRelative TaskCopy TaskCopyRecursive TaskPaste TaskSendEvent TaskSendEventRecursive TaskFind TaskFindTextInTask TaskFindByTaskID TaskFindByTaskNote TaskFindAgain TaskSetID TaskRebuildTree TaskMakeTemplate TaskSortChildren AnimTaskIncreaseKeyframeInterpolation AnimTaskDecreaseKeyframeInterpolation AnimTaskToggleCameraRelative AnimTaskGoToCursor AnimTaskToggleWindowHidden AnimTaskStartRecording AnimTaskGoToTop AnimTaskToggleSyncPlayback TimerIncreaseSpeed TimerDecreaseSpeed TimerReset TimerStartStop Manipulate ManipulatePositionXY ManipulatePositionXZ ManipulatePositionXZ ManipulatePositionSnapToGround ManipulatePositionSnapToObject ManipulateOrientationAlpha ManipulateOrientationBeta ManipulateOrientationGamma ManipulateOrientationReset ScaleGraphNode ScaleGraphNodeHalfe ScaleGraphNodeDouble CreateGraphNode DeleteGraphNode ToggleDisplay ToggleMouseInverted ToggleDebugText ToggleTaskTypeView ToggleGame ToggleTaskNoteDisplay ToggleQEDRunEvent ToggleSaveStateOnExit SaveState SaveObjectFile SaveSubTaskObjectFile SaveSubTaskObjectFileParent LoadSubTaskObjectFile SnapToGroundRecursive ToggleConsole ConsoleIncreaseAutoActivateLevel ConsoleDecreaseAutoActivateLevel AutoComplete AutoCompleteTaskName AutoCompleteModelName Undo Redo ReloadSettings