Camera, selection and shortcuts
How to move around the editor's scene, pick things, arrange the panels, and find any command. Every key is in the shortcuts table at the bottom.
Move the camera
- Hold the right mouse button and move to look around. While it is held, W A S D fly and Q/E go down and up.
- Alt + left drag turns about where the view looks; Alt + right drag comes closer or goes back.
- The wheel zooms, out to 300 cells; past the game's own limit the mist and distance culling move back so you see the whole map.
- F frames what is selected (the whole map with nothing selected). Home resets the view.
- Numpad 7 looks straight down, Numpad 1 goes back to the usual slant, Numpad 5 switches perspective off (and on again).
- Click a face of the view cube (top right of the scene) to look from that side.
Settings › Editing › Camera speed makes the keys, the screen edges and turning half to twice as fast.
Save a view and jump back to it
- Frame the view you want.
- Press Ctrl+1 to Ctrl+9 to keep it on that number.
- Press 1 to 9 to go back to it.
View › Views kept on keys lists them. They are saved with the map, in its editor-only data.
Select things
- Pick the select tool (Q).
- Click a thing to select it; Shift+click adds or removes.
- Drag a box to select many. Trees and doodads join a box only when the tool bar says so.
- Alt+Shift+drag draws a lasso round what to select.
- Ctrl+A selects everything, Alt+I inverts the selection, Escape selects nothing.
A click picks the first thing drawn under the pointer, by its triangles: a tree by its crown, a house by its roof. Alt+click picks through a locked thing, or picks one part of a prefab instance.
Find things by owner, type or name
- Open the Hierarchy (left rail).
- Type in its search, for example
owner:2 type:footman big. - Click the button beside the field to select everything found.
Fields you can use are in the search fields table. uses:footman shows everything that names the footman type.
Keep a selection on a key
- Select the things.
- Press Ctrl+Alt+1 to Ctrl+Alt+9.
- Press Alt and the number to select them again.
Edit › Selections kept and the row under the Hierarchy's search list them; the pin there keeps the selection on the next free key.
Move, turn and resize
- Select what you want to change.
- Press W (move), E (turn) or R (resize), then drag the handles.
- Or use the keys: the arrows move a cell (Shift a quarter, Alt ten), [ and ] turn, - and = shrink and grow.
- Tick Snap on the tool bar to snap to the grid, angle and size steps; hold Ctrl (⌘ on a Mac) to do the opposite while dragging.
- Tick Along the object to give the handles a single object's own axes.
Doodads (scenery) get the full transform: an up arrow lifts them, the rings tip them forward and sideways, and the cubes size each axis. Units, camps and markers keep the flat handles. Settings › Editing sets the snap steps.
Line things up
- Select two or more things.
- Open Edit › Arrange (or the Inspector's Arrange part).
- Pick an operation: line up or spread along x or z, Spread on a line, Spread on a circle, Face toward a point you click (Shift: away), Face along a path, Snap to ground, Mirror, Flip in place or Randomise.
Each is one step to undo. See the arrange table for what each does.
Edit many things at once
- Select several things of one kind.
- The Inspector shows the fields they share, and
mixedwhere they differ. - Set a value: it applies to all of them, as one step.
To copy fields from one thing to others, select it and press Ctrl+Shift+C (Copy values), then select the others and press Ctrl+Shift+V (Paste values). Position, id, name and type are never copied. A dot beside a field means it differs from its default: click the dot to reset it.
Hide, lock, group and isolate
- Open the Hierarchy. It lists everything on the map by kind, and your groups.
- Click the eye on a row to hide it (not drawn, not picked), or the lock to lock it (drawn, not picked).
- Press Ctrl+G to group the selection; drag rows onto a group to add them. Groups nest one level.
- Press Shift+I to isolate the selection (hide everything else) until Escape.
- Press F2 to rename the focused row. A thing's name is what your rules find it by.
Sort, beside the search, lists things as placed, by name, by type or by owner. Hidden, locked and grouped state is saved with the map but never given to the game.
Find where something is used, and replace it
- Select the thing (a placed unit, a doodad, a region, a point, a path).
- The Inspector says Used by n: click it to select every use. A path is used by the units whose first orders follow it; a region by the mist, weather, cloud and picture zones over it and the detail levels that name it.
- To swap it, use Change type… (a unit), Replace the model… (a doodad) or Replace with… (a prefab instance). Each keeps place, owner, facing and name.
In the search of everything, type ? to list the uses of every type, model, prefab and marker.
Search everything
- Press Ctrl+K (⌘K), from anywhere, even while typing in a field.
- Type what you want: a command, a tool, a unit to put down, a thing on the map, a file, a setting ("fog" opens Look at Sky and mist), a key ("ctrl d").
- Start with
>for commands only,@for things on the map,#for files.
Ctrl+Shift+P opens the commands alone. Opened from inside a panel, that panel's commands come first.
Arrange the panels
- Click a rail icon to open its panel docked; click the pin in its corner to have it float over the scene instead.
- Drag a panel's tab to another side or into another panel's tabs, or drag a rail icon to another rail.
- Right-click a rail icon for more: float it, move it to the other side.
- Pick a layout in Window: Scene (the scene alone), Terrain, Objects (Hierarchy, Inspector and Content pinned), or one you saved.
- Press \ to hide every panel and back, Alt+Enter to fill the screen, Shift+M to hide the minimap.
The layout is kept for next time.
Open several maps as tabs
- Click the pin beside the map's name (or File › Pin this map as a tab).
- Open another map: the pinned one keeps its undo history and unsaved changes in its tab.
- Click a tab to switch back. Its pin closes it (you are asked first if it has unsaved changes).
File › Open Recent lists the last ten maps; Ctrl+Alt+O reopens the one before this.
Type a sum in a number field
Type = in any number field to start a sum: =10*3, = (64 - 8) / 2. Press Enter to work it out, Escape to cancel.
Change a key
- Press ? (or Help › Every key).
- Find the action by name or by its key.
- Press a new key to add it, or remove one. Clashes are shown.
Your keys are saved in the browser for every map and game.
Change the editor's settings
Open File › The editor's settings (Ctrl+,). You can set the theme (Dark, Light, Classic, Orange, or one of the game's), Size of the interface (80% to 140%), whether the Inspector opens when you select something, how many undo steps to keep (200), how often a draft is kept, snapping steps and camera speed. Graphics settings are on Metrics and debug views.
In code
// the camera
editor.framing.topView() // straight down; topView(false) for the slant
editor.framing.orthoView(true)
editor.framing.lookFrom('south')
editor.framing.keepView(1)
editor.framing.goToView(1)
// the selection
editor.selection.selectWhere('owner:2 type:footman')
editor.selection.invert()
editor.selection.keepSet({ name: 'Front line', key: 3 })
editor.nudgeSelection({ x: 1, z: 0 }, { run: false })
// arranging
editor.spreadAlong('circle')
editor.faceToward(point, false)
editor.mirrorSelection()
// the Hierarchy
editor.hideTargets(targets)
editor.groupSelection()
editor.isolateSelection()
// the dock
editor.dock.open('inspector')
editor.dock.move('look', 'left')
editor.dock.layouts.use('objects')Every key is an action in one table (EDITOR_ACTIONS), on editor.keys. Add your own on the editor scene, or in code:
export const editorActions: GameActions<EditorClient> = {
// asked before the editor's own
add: [{ id: 'td.road.look', label: 'Look at where the road starts', group: 'The tower defense', default: ['Shift+KeyR'], run: (editor) => lookAtRoad(editor) }],
// leave out some of the editor's, or change them
hide: ['sandbox'],
change: { frame: { default: ['KeyJ'] } }
}
editor.keys.define({ id: 'mine', label: 'Mine', group: 'Mine', default: ['F6'], run: (editor) => mine(editor) }, { before: 'undo' })
editor.keys.bind('frame', ['KeyJ']) // the user's own keys, kept
editor.keys.press('save') // run it as its key would
editor.keys.key('save') // 'Ctrl + S', as a menu shows itA menu line that names an action ({ id: 'td.road', action: 'td.road.look' }) shows its name and current key. KeysList of @v12-engine/client/app, given editor.keys, draws the list of every key in a panel of your own.
Reference
Keyboard shortcuts
Keys are places on the keyboard (KeyZ is the key right of the left Shift on QWERTY). Ctrl is ⌘ on a Mac. The editor's keys work wherever the focus is in the editor, except while typing in a field.
| Key | What it does |
|---|---|
| The map | |
| Ctrl+Z / Ctrl+Y, Ctrl+Shift+Z | Undo / redo |
| Ctrl+S | Save the map |
| Ctrl+Enter | Save the map and play it |
| Ctrl+O | Open a map |
| Alt+N | New map (Ctrl+N is the browser's) |
| Ctrl+Alt+O | Open the map before this one |
| Ctrl+Shift+S | Export the map (while playing: save a test point) |
| Ctrl+Shift+O | Import a map |
| Ctrl+I | Import files |
| Ctrl+, | The editor's settings |
| Ctrl+P | Play here, or stop |
| Ctrl+Shift+P | The commands (while playing: pause) |
| Ctrl+Alt+P | Step the game played here by a tick |
| Ctrl+Shift+E | Edit the map while it plays, and back |
| The view | |
| Right drag | Look around (W A S D, Q, E fly while held) |
| Alt+left drag / Alt+right drag | Turn about the view / come closer |
| Arrows (nothing selected) | Scroll the view |
| Alt+Q / Alt+E | Turn the camera |
| F | Look at what is selected |
| Shift+Z | Look closely, and back |
| Home | Reset the view |
| Numpad 7 / 1 / 5 | Straight down / usual slant / no perspective |
| 1–9, Ctrl+1–9 | Go to a kept view / keep the view |
| What is selected | |
| Ctrl+A, Alt+I, Escape | Select all, invert, select nothing |
| Alt+Shift+drag | Lasso |
| Alt+1–9, Ctrl+Alt+1–9 | Select a kept selection / keep the selection |
| Arrows (Shift, Alt) | Move a cell (a quarter, ten) |
| [ / ] | Turn left / right (also the point picked, and what is put down) |
| - / = | Smaller / bigger |
| Ctrl+C, Ctrl+X, Ctrl+V | Copy, cut, paste (between maps too) |
| Ctrl+D | A copy to the side |
| Ctrl+Shift+C / Ctrl+Shift+V | Copy values / paste values |
| Delete, Backspace | Delete |
| Ctrl+G | Group |
| Shift+I | Isolate, or show everything again |
| F2 | Rename |
| Tools | |
| Q W E R | Select / move / turn / resize handles |
| H, C, V, T, B | Height, cliffs, water, things, paint brushes (again: the next of the family) |
| G, P, L, M | Regions, point, path, measure |
| I | Light tool; with a brush, the eyedropper (also Ctrl+click) |
| X | Effect tool |
| [ / ], Alt+wheel | Brush smaller / bigger |
| ; / ', Alt+Shift+wheel | Brush weaker / stronger |
| Shift (while stroking) | The opposite: lower for raise, cliff down for cliff up |
| R (placing a prefab) | Turn it a quarter |
| What is shown | |
| Ctrl+K | Search everything |
| Ctrl+Space | Content drawer |
| \ | Hide every panel, and back |
| Alt+Enter | Full screen |
| Shift+M | Minimap |
| Shift+P, B, K, L | Overlays: walkable, buildable, slow ground, cliff levels |
| Shift+Y, J, G, T, V | Overlays: cell layers, grass styles, grid, triangles, detail |
| Shift+U, H | Overlays: grass state, hiding patches |
| Shift+F, C, N | Overlays: footprints, camps' notice, names |
| ? | Every key |
| F1 | The docs of the panel the keyboard is in |
| Panels (keyboard in the panel) | |
| Ctrl+F or / | The panel's search |
| F8 / Shift+F8 | Data panel: next / previous problem |
| Space, I, O, L, K, M | Cinematic panel: play, in, out, loop, key the camera, marker |
| Space, P, I, O, M, Delete | Animation panel: play, gizmo, loop in, loop out, mark, remove keys |
| ← → , Home, End, 0 | Animation panel: step a frame, ends, fit |
The cheats' keys (Alt+Shift and a letter, while playing) are on Play here.
Hierarchy search fields
| Field | Example | Matches |
|---|---|---|
owner | owner:2 | A player by id or name (no spaces), neutral, creeps |
type | type:footman | A unit type by id or name: objects of it, camps with it |
kind | kind:region | A row of the Hierarchy: building, doodad, a game's kind |
tag | tag:ranged | The type's tags (ranged, melee, hitsAir, the game's) |
name | name:gate | Words in its name |
uses | uses:footman | What names a type, model, prefab, region or name |
Words with no field match what the row says.
Arrange operations
| Operation | What it does | In code |
|---|---|---|
| Spread on a line | Evenly between the two farthest apart | editor.spreadAlong('line') |
| Spread on a circle | Round their average middle | editor.spreadAlong('circle') |
| Face toward | Toward a point you click (Shift: away) | editor.faceToward(point, away) |
| Face along a path | The way the nearest stretch of a path goes | editor.faceAlong(pathId) |
| Snap to ground | Lifted doodads back down | editor.snapToGround() |
| Mirror | Copies where the map's symmetry mirrors them | editor.mirrorSelection() |
| Flip in place | Each moved to its mirror place, the whole kept centred | editor.flipSelection() |
| Randomise | A random turn and a size within the Place panel's range | editor.randomiseSelection({ turn, size }) |
On a MapEditor without a screen these are batch.faceToward, faceAlong, spreadAlong, snapToGround, mirrorSelection, flipInPlace and randomise(ids, range, random).
More in code
| What | API |
|---|---|
| Kept views | editor.framing.keepView(n), goToView(n), keptViews(), forgetViews(n?) |
| Selection | editor.selection.where(query), selectWhere, invert, keepSet, selectSet, keptSets, forgetSet |
| Hide, lock, group | editor.hideTargets, lockTargets, isHidden, isLocked, groupSelection, groupTargets, addToGroup, ungroup |
| Copy values | editor.clipboard.copyValues(), pasteValues(text?); editor.resetSelectionField(field) |
| References | editor.find(ref), editor.showReferences(ref), editor.replaceWith(ref, to, where) |
| Tabs and recent maps | editor.tabs.pin(), switchTo(index), list; editor.recent.list(), openPrevious() |
| The search | editor.shellState.openPalette(query) |
| Settings | editor.setPrefs({ theme, minimap, minimapCorner, viewCube }); EditorPrefs |
| Undo toast | editor.toast(text, { undo: true }) |
| Number sums | evaluateNumber of the kit (no eval) |
The history keeps about 64 MB of the map (editor.historyBytes); past that, the oldest steps go first.