Top bar, panels and camera
When a map is open, the window has a top bar, the 3D view in the middle, a status bar at the bottom, and the tool panel of the current module on the right. The window title is the map's name followed by W4 Editor.
Top bar
From left to right:
| Control | What it does |
|---|---|
| Map name | Shown at the left. You can drag the window by it. |
| Module tabs | Terrain, Objects, Triggers, Imports, Players, Shaders. Ctrl 1 to 6 switch too. |
| Undo, Redo | Step back and forward through the changes of the current module. Ctrl Z and Ctrl Shift Z. |
| Export | Packs the map into a one-file .a4m. Ctrl E. |
| Play | Packs the map and starts the engine on it. Ctrl R. |
| Panel toggle | Shows or hides the tool panel. |
| Panel width | Switches the tool panel between its normal width and twice that. |
| Commands | Opens the command palette. Ctrl K. |
| Settings | Opens the settings window. Ctrl ,. |
On a Mac, read Cmd for Ctrl. Hover a button to see its name and shortcut.
Undo and redo
Undo and Redo work in the Terrain and Objects modules. Each has its own history, which you can also see in the floating History panel. In the other modules the two buttons are greyed out. Players, scripts, shaders and imported files are not part of the undo history.
Export
Export asks where to save and proposes <map name>.a4m next to the map folder. The editor first writes any pending change to disk, then packs the map. When it is done, a toast tells you the file name, how many files went in, how big the result is, and how many unused files were left out. See Files of a map for what goes in.
Play
Play does four things in order:
- It saves pending changes.
- If the map has scripts that changed since the last build (or were never built), it builds them. Without Go installed, or if the build fails, Play stops and shows the error. It does not start an old version.
- It packs the map into a temporary
.a4m. - It starts
w4-engineon it. The editor looks for the engine next to itself, so keep the two programs in one folder.
The engine plays a copy. If the engine crashes, your map folder is not touched. The editor tells you the engine stopped and where its error output went (engine.log in the editor's data folder). The temporary copy is deleted when the engine closes.
Status bar
The bar at the bottom shows, from left to right:
- In Terrain, Objects, Triggers and Shaders, the tile under the pointer: its coordinates, the ground tile's name and the cliff level.
- The map's folder.
- The map's size in tiles.
- The save state: Saving… while a change is waiting to be written, All changes saved otherwise. A red dot and a message mean a save failed.
The tool panel
The panel on the right holds the current module. Its left edge can be dragged to resize it, from 240 to 1400 pixels, and the editor remembers the width. The panel toggle in the top bar slides it out of the way, so you see the whole map. That setting is shared by all modules.
In Imports the panel is the list itself, with a small preview beside it. See Imports.
Floating panels
History and Activity float over the bottom left of the 3D view. Each one starts as a small square with an icon and a count. Click the header to open or close it, drag the header to move it, and drag the right edge to widen it. The editor remembers where you left them.
Camera
The camera works the same way in Terrain, Objects, Triggers and Shaders.
| Input | What it does |
|---|---|
| Left button | Paints, selects or places, depending on the module and tool |
| Right button drag | Orbits the camera |
| Ctrl + left button drag | Orbits too (Cmd on a Mac). Handy on a trackpad. |
| Middle button drag | Pans |
| Shift + right button drag | Pans |
| Mouse wheel | Zooms |
| Trackpad two-finger scroll | Pans |
| Ctrl + trackpad scroll, or pinch | Zooms |
In a model preview (Imports, the model viewer) there is nothing to paint, so both the left and the right button orbit, and the trackpad scroll zooms.
The 3D view
The view draws your map the way the engine does: ground tiles blended softly, stone cliff walls with an outline, shadows from the sun, and units with their animations and particles. It also shows your map's own shaders as soon as you save them.
A small frame counter sits in the top left corner of the view. F3 hides and shows it. If you start the editor with the environment variable AQUA4_DEBUG_OVERLAY=0, it starts hidden.
If your computer is slow, two settings help: the viewport quality and Animate units, which stops placed units from playing their idle animation.