scmJS documentation
scmJS is a StarCraft: Brood War map editor that runs in a browser tab or as a desktop app. It opens, edits and saves StarCraft maps: .scm, .scx and .chk files and reads .rep files.

The latest version of the editor is always available at scmjs.dev/editor.
See the getting started page for more information.
What it does
scmJS edits terrain, units, locations and triggers like any StarCraft editor. It also has the following. Items marked Browse Plugins are not installed at first; add them from Plugins ▸ Browse Plugins….
- Classic or Remastered graphics. Pointed at a Remastered installation, the editor draws with Remastered's terrain, units and moving water; View ▸ Remastered Graphics switches back. See Classic or Remastered graphics.
- Replays. File ▸ Open Replay… opens a
.repon the map it was played on, with the players' orders on a timeline, build orders and the chat. At scmjs.dev the game also plays back, with an analysis of fights, economy and tech. See Replays. - Test in the game or the browser. Tools ▸ Test Map puts the map in the game's Maps folder; at scmjs.dev, Tools ▸ Test in Browser plays it in a browser tab from your own StarCraft files. See Test Map.
- Mods. A mod such as Cosmonarchy BW plays in the browser at
scmjs.dev/play with its own plugins, optionally against a bot
made for it, and the editor plays back and analyses its replays. The editor also makes
maps for a mod, showing its units under their own names and the terrain its tilesets
add, and
scmjs modkeeps a mod as a folder of text you can edit and keep in git. See Mods. - A command line.
scmjslooks inside maps and replays, checks maps on every push with a GitHub Action, plays a map's triggers in the game, and builds and plays bots. See the command line guide. - Your own AI app on your maps. Claude Desktop, Claude Code, Cursor and other apps read, check and change a map as you ask. Claude Desktop sets it up from one file, with no terminal needed. If the map is open in the editor, each change arrives there as one undo step. See AI tools.
- Several people on one map. Share the open map and anyone with the link edits it with you, live. See Editing a map together.
- Bots. Play against a computer player somebody wrote on the play page, or write one:
a JavaScript bot is one file, and a BWAPI bot written in C++ can be built into one.
scmjs botplays them against each other from a terminal. See Bots. - A library for your own tools.
@scm-js/coreis the editor's map code as an npm package, for scripts that read and change maps. See The library. - Triggers as code. TrigScript writes triggers in TypeScript, with tests and a simulator; for Remastered it also builds code that runs in the game itself.
- AI on your own key. With your Anthropic API key, an assistant reads and edits the open map with you, and Tools ▸ AI lays out maps, writes triggers and briefings, and reviews a map. The prompts are public in ai-engine. See The AI.
- Triggers as a graph. Trigger Map (Browse Plugins) shows which triggers set and read each switch, death counter and location, and what is never set, read or run.
- Walkability. View ▸ Walkability (Ctrl+Shift+W) draws islands, regions, chokes with their widths, and distances between start locations.
- Damaged and protected maps. Repair checks each map as it opens and fixes what the game would; Section Explorer (Browse Plugins) shows the file byte by byte. See Protected and damaged maps.
- Unknown data kept on save. Unknown or malformed sections and unnamed archive files are written back as they were read, unless the game would refuse the map as it stands. See Opening and saving maps.
- Terrain from a picture. File ▸ Import ▸ Terrain from Image… turns an image into terrain, cliffs and shores included. See Plugins.
- Stamps. Save a ramp, a bridge or a mineral line once and lay it down on any map. See Cut, copy and paste.
- Doodads into terrain. Convert Doodad to Terrain turns a doodad into ordinary tiles you can edit. See Doodads.
- Wider ramps, longer bridges. Drag a ramp or a bridge as you place it and it stretches along its cliff or its deck. View ▸ Seam Overlay marks the joins that show, the Heal brush swaps them for tiles that play the same, and Pin protects hand-laid ground from the isometric brush. See Stretching a ramp or a bridge and Heal.
- A symmetry report. Tools ▸ Symmetry… says how alike the sides of a map play under each mirror and turn, and lists the places that differ. See Symmetry.
- Timelapse. Timelapse (Browse Plugins) records the map change by change and exports a GIF or WebM video. See Plugins.
- Maps from scmscx.com. File ▸ Find on scmscx.com… searches the community map archive and opens the map you pick. See Opening a map.
- Recovery and backups. Maps open in tabs, unsaved work is kept in recovery copies,
and the version a save replaced is kept as a
.bakor under File ▸ Previous Versions. See Saving and Recovery copies. - English or Korean. Preferences ▸ General switches the language. See Keyboard and preferences.
The documents
- InstallingRunning the editor in the browser, as a desktop app or in a container, and giving it the game's graphics from your StarCraft folder.
- User guideHow to use the editor: a first map, then each layer and dialog — terrain, units, triggers, settings, testing and saving — replays, plugins, and editing a map together.
- TrigScriptTriggers written as TypeScript: a quick start, triggers made by code, programs that run in StarCraft: Remastered, testing, the workspace and the reference.
- TrigScript languageWhat a program can say: numbers, arrays, maps, functions, classes, errors, tasks, units, events, input, text, sounds and libraries, and where it differs from TypeScript.
- TrigScript libraryThe modules that come with TrigScript: maths, chance, timers, signals, menus and dialogs, cutscenes, the fog as a picture, pixel screens and music, with an example of each.
- PluginsInstalling plugins, writing your first one, the core concepts, putting things on screen, and a tour of the API.
- Command linescmjs in a terminal: looking inside maps, making and changing them, maps in git and CI, a map's triggers run and tested in the game, replays, sharing, bots, plugins and AI tools, and every command on one page.
- AI toolsClaude Desktop, Claude Code, Cursor and other AI apps working on your maps through scmjs mcp: setting it up, what to ask, watching and undoing the changes in the open editor, when something goes wrong, and every tool.
- BotsComputer players on the game's own engine, on the play page or from the command line: playing against one, writing one in JavaScript, bringing a BWAPI bot, bots for mods, and the reference.
- ModsA mod read as its makers ship it, kept as a folder of PyMS text and PNG sheets, checked, compared, packed back into the MPQ the launchers load, and played.
- Library@scm-js/core: the editor's map code as an npm package — open a map, read and change its triggers, strings, units and settings, run Check Map, write it back.
- Trigger referenceEvery trigger condition and action: what it does, its arguments, its text form and where it is stored in the map.
- Opening and saving mapsWhat the editor does with a map file: what it preserves, what Save can strip, revisions, protected and built maps.
- CHK format referenceEvery section of a scenario file: its byte layout, what a repeat does, whether the game needs it, the values its fields take.
- Game dataWhere the graphics come from, what is kept, Remastered, mods as data sets, and how the pictures are drawn.
- DevelopmentRunning from source, the repository layout and conventions, tests, the desktop app, releases and the docs site.
- API referenceEvery call a plugin can make, group by group — plugin API version 1.
Where to start
- New to the editor: Getting started, then Your first map.
- Making a scenario with triggers: Your first map for the ground and the bases, then Triggers, or TrigScript's Quick start to write them as code.
- Bringing a map over from SCMDraft 2: Coming from SCMDraft 2.
- Wondering whether it does the thing you need: What it does not do.
- Installing a plugin, or wondering what one may do: Using plugins.
- Writing a plugin: try the API first in the API Playground, which runs code against the open map in the editor. Then Writing a plugin and the API reference; Hello World is the repository to copy.
- Working on the editor itself: Development and Opening and saving maps.