BF2Editor User Guide
The goal with the BF2Editor tool is that it should handle all content for Battlefield 2, including the pipeline from Maya into the game through Perforce. It is build around a plug-in system where different types of content are handled by different add-ins. Most commands are console commands that can be mapped as shortcuts, giving the user ability to customize his/her work environment.
[TODO: Add Index]
This chapter will cover the basics of the editor, the windows, working with the graphical user interface, menus, shortcuts, add-ins, control mapping, options and status bar info. When the editor is started the user ends up in an environment similar to the one below.
In the top left corner there is a dropdown-list with all the plug-ins that the user can activate. These are the different editors and usually by default the TerrainEditor is active. When selecting a different editor the appearance of the tool can be slightly altered, however the basics are the same. Next to the editor selection dropdown-list, the basic new, load and save can be found. These only apply to the active editor. There is however a SaveAll function (in the File-menu and as a button next to Save) that performs a save in all editors. When activating a plug-in a menu with the same name as the plug-in appears. This menu holds all mappable commands that editor supports.
Next to the main toolbar the plug-in specific toolbar can be found. This one is unique for every editor and will be described in detail under the section for the corresponding editor.
Underneath the Resource window the Tweaker is located. This will be covered late in this document. [TODO: Add link]
At the bottom the output window is located. Information both from the editor and the game will appear here. To clear the output window, simply right click in it and select “Clear All”.
The rightmost window is an editor specific one. The editor themselves determine the content of this window and is described under each specific editor later in the document.
Besides the above described windows there are a number of plug-in toolbars. These are plug-ins that cannot be activated and only add functionality through there toolbar. Their functionality will be described later.
Graphical User Interface
The graphical user interface environment is fully customizable. The main windows and toolbar can be moved, docked in different fashions and hidden. The environment is saved when the editor is closed, and restored the next time it is loaded. Simply drag and drop the bars and toolbars to alter the appearance. Hiding bars is done by either closing them (using the button on the title bar) or in the View menu. The main toolbar can be hidden in the View menu. Plug-in specific toolbars can be hidden in a different fashion, see Add-in [TOOD: Add Link], unless it is a toolbar for an editor, these cannot be hidden (unless the entire editor is hidden. See [TODO: Add Link]).
The File menu has the normal new, load and save functions. There is also a resave function which forces a save. Normally the plug-ins only save changed items, but sometimes the user may want to force a resave. Finally there is an import function. This only works for the currently active plug-in and performs an import from Maya to the game, using MParser. When activating a plug-in only the supported functions are enabled. Import, for instance, is not supported by the TerrainEditor.
The add-in manager shows all available plug-ins. They are shown with a short description and a version number. The choice the user can make is to show or hide specific plug-ins. If you hide a plug-in that cannot be activated, their toolbar is hidden. Hide on an editor plug-in not only hides the toolbar, but removes the editor from the dropdown-list so that it cannot be activated. Plug-ins are read from the directory bin/BF2Editor/Plugin.
In the shortcut manager the user can customize keyboard shortcuts for different commands. The list contains all commands that currently can be mapped. The dropdown helps the user to sort the commands in different categories. Next to each (or most) commands is a short description. To map a new shortcut simply select the command, click in the edit box “Press shortcut key(s):” and perform the new shortcut. The shortcut must consist of at least one of the buttons Alt or Ctrl. To save this command, click assign. If the new shortcut you entered is currently occupied, the occupying command will be shown. To overwrite, click assign and answer yes to the warning prompt. To remove a command, select it and click remove. The shortcuts are saved upon clicking ok. By selecting default the shortcuts are restored to the default setup. All the shortcuts can be listed in the output window through Tools.ListAllShortcuts.
The control map manager lets the user set up the controls used when controlling the camera or soldier. These are mapped into BF2 and have to be a numerical value or a letter. Keys such as shift, alt and control cannot be used, since they might collide with shortcuts. Assigning works in the same way as the shortcuts.
The options dialog is used to customize your working environment and setup some necessary values needed by the tool.
Customize the colors of Resource Tree control
Configures the source control settings:
Server - should be bifrost:1666
Client - should be the clientspec of the user (can be found in Perforce, looks like christiang-bf2). This is important and must be set!
UseSourceControl – deactivate/activate source control support
SilentMode – No prompts for OpenForEdit or Add
RawDataPath – should point to your RawDataPath with an absolute path (looks like c:\dice\Projects\BF2\RawData). This is important and must be set!
ContentDataPath – should be a relative path to the content directory, usually BF2\Content
The rest are used to customize different colors in the tool
DefaultAction – the user can specify a console command that should be executed as soon as the editor has started. For instance, if an user always loads a level upon start, the command Global.OnLoad can be entered and every time the editor is started the load dialog will appear.
ViewDistance – the view distance in the renderer
RememberLastCameraPos – if this is selected the last camera position the user had when closing the tool will be remembered and restored the next time the tool is started
Status bar info
At the very bottom of the application there is a status bar that displays some information.
FPS with average fps in brackets.
Position of the camera.
Speed, where 100% is default value.
Focus. Can be either EditorFocus or EngineFocus.
EditorFocus means that the mouse moves the cursor.
EngineFocus the mouse moves the camera; in this mode the cursor is hidden.
Plug-in specific (The TerrainEditor shows the marker status, if a level is loaded)
Plug-in specific (The TerrainEditor shows the marker speed)
Source control. Shows current clientspec if source control is enabled.
There are a few different ways to control the camera. When the mouse cursor is over the engine view, the keyboard can be used to control the camera. To control the look-at with the mouse the user has two choices:
Click and hold the middle- or thumb moue button
Give the engine focus by executing the shortcut Global.ToggleFocus, which by default is Ctrl+Space. (Notice that the status bar changes the focus information to EditorFocus.) By executing the same shortcut again the focus normally toggles back to EditorFocus. This can be overridden by the plug-ins however, which for instance the TerrainEditor does, see [TODO: Add Link]. Pressing escape always gives the focus back to the editor.
To change the speed of the camera movement simply use the mouse wheel. There are also commands for this, to which the user can add a shortcut if they prefer (Movement.IncreaseSpeed and Movement.DecreaseSpeed). The speed can be reset to 100 % by executing the shortcut Movement.ResetSpeed (default shortcut Ctrl+R). The speed is saved when closing the tool. These commands can also be found in the Movement menu.
New, load and save