Working in the editor
Ask the AI to open the map in the editor, or link it yourself with
scmjs map open --live. The map opens in the
editor in your browser, and from then on the tools work on the map in front of you.
| While the map is linked | |
|---|---|
| A tool that reads the map | Reads what the editor has, your unsaved changes included |
| A tool that changes the map | Changes it in the editor. Edit ▸ Undo names the tool and takes its change back whole |
| The file on disk | Changes only on a save: yours with File ▸ Save, or the AI's with editor_save |
The AI can also use what is on your screen:
- What you have selected.
editor_statetells it which units and locations are selected and which part of the map is in view, so "these units" and "here" mean something. - Pointing.
editor_showbrings a place into view and flashes it, with the units or locations it names selected. - A picture.
editor_pictureis the map as the editor draws it, with the editor's own game data, so the AI needs no copy of StarCraft to look at the map. - The editor's game data. On a linked map, terrain, doodads and unit stats use the
editor's game data, a mod's included, so
map_edit,map_terrain,map_doodadsandmap_setneed no copy of StarCraft.
If you edit the map while a tool is working on it, the tool starts again from what the editor has now, and your edit is kept.
The status bar shows Linked while the map is linked. Opening the map also opens a
small scmjs tab in your browser beside the editor, which carries the link. The link ends
when the AI closes it (editor_close), when you close the map or that tab, or when the AI
app stops; the map stays open. The command line
guide has the rest: what waits for a dialog,
what stays on your computer, and that the scmJS desktop app does not link yet.