A macro is a run of map edits, yours or an AI assistant's, kept so you can replay it on another map of the same game, or at another place on the same one: a camp of spawns with its guards and props, a fenced yard, a row of lanterns along a road.
Recording
- Open a map. If the edits are built around something already on it, select that first: its centre becomes the macro's reference point (see Place at).
- Choose Tools > Record a macro. The top bar shows a red Recording macro badge with the number of steps kept so far, and Stop.
- Edit the map as usual.
- Choose Stop in the top bar, or Tools > Stop recording the macro.
Studio saves the macro, named after the time you recorded it, and opens the Macros window with it selected. A recording with no map edit in it is not saved.
What is kept
Each edit is kept a moment after you finish it, as the change it made to the map:
- objects added, moved, turned, resized, changed or deleted, however you did it: by hand, by duplicating, pasting, placing a prefab, the prop brush, arranging, spawn tuning or Populate from a map;
- objects moved to another layer;
- map settings, painted grids and a generated walkable grid;
- material effects;
- imported props and baked lighting, once the import or bake finishes;
- undo and redo, kept as the edit they make.
An assistant's edits are kept as the tool calls it made, which also covers selecting by kind or search, Select similar, a redrawn minimap and terrain from a heightmap.
The camera, showing and hiding layers, saved views, screenshots, exports, saving, Install, linking a server and opening maps are not part of a macro. Nor is a new map built from a scene or rebuilt geometry, since those make a whole map rather than edit the one in front. An edit that fails is not kept.
The Macros window
Tools > Macros… lists your macros for the game that is open. Pick one to see:
- when and on which map it was recorded, and how many steps it has;
- anything that would stop a replay, with a warning sign;
- its steps, one per line. Pick a step to move it with the arrows or Remove it.
Rename changes its name, Delete asks you to click again before it removes the macro, and Folder shows the folder the macros are kept in. Record starts a new recording from here too.
Replaying
Open the map to replay on, choose where the macro's positions land and what to do about objects from before, then choose Replay.
Everything a replay changes is one step, Macro and its name, so one Undo takes it all back. If a step fails, the replay stops there, says which step and why, and what it did up to that point is still that one step.
Place at
- Recorded: every position as it was recorded. On the same map, the macro lands where you made it.
- Selection: around the centre of what is selected now.
- Cursor: around the point on the ground under the mouse when the replay starts. The Macros window sits over the map, so this one suits a replay an assistant runs while your mouse rests on the spot; from the window, Selection is the sure way to aim it.
- First: the steps before the first new object run as recorded, and everything after follows wherever that object landed.
Selection and Cursor move the macro by the distance from its reference point to the new one. The reference point is the centre of what was selected when the recording started, or else where the first new object went, or else the first position the macro uses. A reference point taken from a step that adds nothing, such as painting, has no height, so the macro keeps its recorded heights.
Positions move; distances do not. A move by an offset, a duplicate's offset and a handle drag replay as the same offset wherever the macro lands. Painted cells repaint the same ground relative to the new place, cell by cell, even on a map whose grid has another size. A grid recorded whole, which is what a grid added, removed, resized or moved, or a very large paint stroke records, comes back as recorded and does not move.
A macro with no reference point at all cannot use Selection or Cursor.
Objects from before
Studio keeps track of the objects a macro creates, so a later step that changes one of them changes the replay's own copy. A step that names an object that was already on the map when you started recording is different: on another map that object is missing, or is something else with the same id. Those steps show in the warning colour in the step list; hover over one to see which objects it names.
Objects from before decides what to do with them:
- Stop: halt the replay before the first such step.
- Keep: run the step on whatever has those ids on this map.
- Skip: leave those steps out.
- Auto: Keep on the map the macro was recorded on, Stop on any other.
A macro that only builds new objects replays on any map. Edits to objects already on the map tie the macro to that map. An assistant can avoid that by selecting what it works on by kind or search, or with Select similar, since those selections replay on any map.
Where macros are kept
Each macro is a file in Documents\GoMMO Studio\Macros\<game>\, beside the prefabs. A macro belongs to the game rather than to a project, so every project of that game sees it, and you can share the file.
With an AI assistant
Recording keeps an assistant's map edits as well as yours, and an assistant can list, show, edit, replay and delete macros itself, with the same choices as the window. Deleting asks you first in an assistant that supports it. See Working with an AI assistant.