Resource:Editor: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
Line 37: Line 37:
* Start the editor, or if it is already started, click the ''New'' menu button.
* Start the editor, or if it is already started, click the ''New'' menu button.
* Click the ''Map settings'' button. In the ''Meta'' tab, fill in the Name and Author fields with the name of the map and your name respectively. Also open the ''Gamemodes'' tab and add the gamemodes your map is meant for (they will be moved to the ''Added gamemodes'' list). You can do this by selecting them and clicking ''Add'', or by double clicking them. Click OK when you're done.
* Click the ''Map settings'' button. In the ''Meta'' tab, fill in the Name and Author fields with the name of the map and your name respectively. Also open the ''Gamemodes'' tab and add the gamemodes your map is meant for (they will be moved to the ''Added gamemodes'' list). You can do this by selecting them and clicking ''Add'', or by double clicking them. Click OK when you're done.
[[Image:Mapsettings.png|center]]
[[Image:Editor_Mapsettings.png|center]]
* Click the ''Definitions'' window and add the resources of which you want to use the custom elements. These will consist of the gamemodes you selected in the ''Map settings'' window, plus eventual additional resources. For more information about editor definitions, see [[EDF]]. Click OK when you're done.
* Click the ''Definitions'' window and add the resources of which you want to use the custom elements. These will consist of the gamemodes you selected in the ''Map settings'' window, plus eventual additional resources. For more information about editor definitions, see [[EDF]]. Click OK when you're done.


Line 47: Line 47:
Camera mode can be recognized by a crosshair in the center of the screen. You can use it to select and move elements just like in cursor mode.
Camera mode can be recognized by a crosshair in the center of the screen. You can use it to select and move elements just like in cursor mode.


[[Image:Crosshair.png|center]]
[[Image:Editor_Crosshair.png|center]]


===Creating new elements===
===Creating new elements===
Line 56: Line 56:




[[Image:Addelem.png|center]]
[[Image:Editor_Addelem.png|center]]




To create custom elements that are specific to a resource, hover the cursor over the element menu and turn the scroll wheel until the desired resource comes up. Note that for this to work, you first have to add the EDF file of the resource in the ''Definitions'' window.
To create custom elements that are specific to a resource, hover the cursor over the element menu and turn the scroll wheel until the desired resource comes up. Note that for this to work, you first have to add the EDF file of the resource in the ''Definitions'' window.


[[Image:Selectedf.png|center]]
[[Image:Editor_Selectedf.png|center]]


===Selecting===
===Selecting===
Line 99: Line 99:




[[Image:Rotateelem.png|center]]
[[Image:Editor_Rotateelem.png|center]]


===Changing model and other properties===
===Changing model and other properties===
Line 108: Line 108:
* Click OK when you're done.
* Click OK when you're done.


[[Image:Props.png|center]]
[[Image:Editor_Props.png|center]]


===Cloning===
===Cloning===

Revision as of 23:46, 4 March 2009

The MTA:SA map editor allows you to create maps for gamemodes.

Starting

To start the editor, simply click the "Map editor" menu item in the main MTA menu.

Menus

Once the editor has started, you are presented with two menu bars: the main menu at the top, and the element menu in the lower left.

Main menu

These are the buttons in the main menu:

  • Editor New.png Create a new map.
  • Editor Open.png Open an existing map.
  • Editor Save.png Save the map you're working on.
  • Editor Save as.png Save your map under a different name.
  • Editor Options.png Alter general map editor settings.
  • Editor Undo.png Undo the last action.
  • Editor Redo.png Restore the last undone action.
  • Editor Locations.png Stored game world locations. The editor comes with all of SA's interior rooms in this list, but you can add your own as well.
  • Editor Current elements.png List all the elements the map contains (objects, vehicles, markers, pickups etc.)
  • Editor Map settings.png Map specific settings, like time of day, gravity etc. Here you can also specify what gamemodes the map is compatible with.
  • Editor Definitions.png Load editor definition files (EDF) that you want to use. An EDF file belongs to a single resource (usually, but not necessarily, a gamemode) and describes that resource's custom elements. More about this later.
  • Editor Test.png Go into play mode to try out the map. This will load up the gamemode the map is made for.

Element menu

The element menu is used to add new elements to the map.

  • Editor Vehicle.png Create a new vehicle.
  • Editor Object.png Create a new object (buildings, roads and other scenery).
  • Editor Pickup.png Create a new pickup (health, armor, weapons).
  • Editor Marker.png Create a new marker.

Additionally, if you have editor definitions loaded (see later on), you can roll the mousewheel in this menu to bring up custom elements.

Using the editor

This section explains how to create and modify maps.

Starting a new map

  • Start the editor, or if it is already started, click the New menu button.
  • Click the Map settings button. In the Meta tab, fill in the Name and Author fields with the name of the map and your name respectively. Also open the Gamemodes tab and add the gamemodes your map is meant for (they will be moved to the Added gamemodes list). You can do this by selecting them and clicking Add, or by double clicking them. Click OK when you're done.
Editor Mapsettings.png
  • Click the Definitions window and add the resources of which you want to use the custom elements. These will consist of the gamemodes you selected in the Map settings window, plus eventual additional resources. For more information about editor definitions, see EDF. Click OK when you're done.

Moving around the map

When you initially start the editor, you are in cursor mode. Your view is fixed, and you can use the mouse cursor to manipulate elements and use the graphical interface.

To move to a different location in the game world or simply change your viewing direction, you need to switch to camera mode. You can toggle between cursor mode and camera mode with the F key. When in camera mode, you can move with the direction keys and look around with the mouse. While moving around, you can hold Alt to move more slowly or Shift to go faster.

Camera mode can be recognized by a crosshair in the center of the screen. You can use it to select and move elements just like in cursor mode.

Editor Crosshair.png

Creating new elements

Adding elements to your map, such as vehicles and objects, is very straightforward.

  • If you are in camera mode, switch to cursor mode first by pressing F.
  • Click the button in the element menu that represents what you want. E.g., click the button with a car on it to add a vehicle.
  • A new element of the selected type will be created and attached to your cursor. Move it to the location where you want it and left click to drop it off.


Editor Addelem.png


To create custom elements that are specific to a resource, hover the cursor over the element menu and turn the scroll wheel until the desired resource comes up. Note that for this to work, you first have to add the EDF file of the resource in the Definitions window.

Editor Selectedf.png

Selecting

  • Left click an element to select it in keyboard mode.
  • Right click it to select it in mouse mode.
  • Press the spacebar or click in an empty area to deselect.

The selected element, if any, is denoted by a yellow cone marker.

Moving

Moving elements can be done in several ways.

With the mouse

  • Simply drag and drop with the left mouse button.

Or:

  • Select the element in mouse mode (right click), move it to where you want it, and click to drop it off.

You can also move the element toward and away from the camera by switching to camera mode, right clicking the element, and rolling the mouse wheel.

With the keyboard

  • Select the element in keyboard mode (left click).
  • Use the arrow keys to move the element in the horizontal plane, and PgUp/PgDn to move it vertically. Hold Alt to decrease the movement speed, or Shift to increase it.

Rotating

With the mouse

You can rotate selected elements around the Z axis with the mouse wheel.

  • Select the element in keyboard mode (left click) and roll the mouse wheel while holding LCtrl.

Or:

  • Select the element in mouse mode (right click), hold Ctrl, and roll the mouse wheel.

With the keyboard

  • Select the element in keyboard mode (left click).
  • While holding Ctrl (the selection marker will turn green), use the arrow keys and PgUp/PgDn to rotate the element around the different axes.

With both methods you can additionally hold Alt to decrease the rotation speed or Shift to increase it.


Editor Rotateelem.png

Changing model and other properties

Most elements have a variety of options that can be altered to change their appearance and behaviour. Examples are the model, color and visual upgrades of a car.

  • Open the properties window of an element by either double clicking it or by selecting it and pressing F3.
  • Make any alterations that you want. For example, to change the model of a car or object, click the Browse button next to "model" to open the model browser.
  • Click OK when you're done.
Editor Props.png

Cloning

You can clone an element by selecting it and pressing C. The cloned element will be attached to your cursor. Left click to place it in the map.

If you hold Ctrl while clicking, the element will be cloned again and will again be attached to the cursor. This way you can easily place large quantities of something.

Alternatively you can use the Pullout button located in the bottom-right corner of the properties box to clone an element.

Deleting

Simply select the element and press Del.

Alternatively you can use the Pullout button located in the bottom-right corner of the properties box to delete an element.

Controls

Here follows a list of all default controls. To change them, edit MTA\mods\deathmatch\resources\editor_main\controls.xml.

Camera

camera_move_forwards w
camera_move_backwards s
camera_move_left a
camera_move_right d
high_sensitivity_mode e

Cloning

clone_selected_element c
clone_drop_modifier lctrl

Element manipulation

element_move_forward arrow_u
element_move_backward arrow_d
element_move_left arrow_l
element_move_right arrow_r
element_move_downwards pgdn
element_move_upwards pgup
zoom_in mouse_wheel_down
zoom_out mouse_wheel_up
quick_rotate_increase mod_rotate + mouse_wheel_up
quick_rotate_decrease mod_rotate + mouse_wheel_down
mod_rotate lctrl
mod_slow_speed lalt
mod_fast_speed lshift
destroy_selected_element delete
drop_selected_element space
pickup_selected_element F2
reset_rotation mod_rotate + r

GUI

toggle_gui_display F4
toggle_cursor f
select_target_keyboard mouse1
select_target_mouse mouse2
edf_next mouse_wheel_up
edf_prev mouse_wheel_down
undo Ctrl+z
redo Ctrl+y
properties_toggle F3
browser_up arrow_u
browser_down arrow_d
browser_zoom_in mouse_wheel_up
browser_zoom_out mouse_wheel_down
browser_confirm enter
currentelements_up num_8
currentelements_down num_2