scmJS docs

Getting started

Four ways to run it:

The editor draws terrain and units with graphics out of StarCraft's own archives. Blizzard's data is not redistributable and none of it is in this repository, so the editor looks for it in three places: files bundled with the build, a copy it kept in the browser earlier, and — in the desktop app — a StarCraft installation on the disk. When none of those answers it opens Help ▸ Game Data…, which offers two ways to fix that:

Either way the extraction runs in the browser and the result is kept for next time.

npm install
npm run extract   # finds StarDat.mpq / BrooDat.mpq, writes public/
npm run dev       # http://localhost:5173

Node 22.18 or newer, because the extraction script relies on Node's built-in type stripping. If the script cannot find your install, point it at one:

npm run extract -- --from "/mnt/c/Program Files (x86)/StarCraft"

npm run extract is optional: a clone without it behaves like the hosted build and asks through Help ▸ Game Data…. Without any data the editor still runs, with flat tileset colours for terrain and coloured markers for units. See docs/game-data.md for the full story and docs/development.md for the desktop and release builds.

Open a map with Ctrl+O or by dropping it on the window. Ctrl+S saves.

A new scenario#

Ctrl+N opens the New Scenario dialog. The eight tilesets are shown as their own ground rather than as coloured squares, the terrain list under the size shows every flat terrain the tileset paints — this is the fill the map is made of, so what you see there is what the map will look like — and the preview draws the scenario at its real size and terrain, so a 64×64 map reads as coarser ground than a 256×256 one. Start locations are optional and on by default: one per player on a ring, each moved to the nearest ground it fits on, laid down with the terrain. They are part of the map from the moment it exists, so there is nothing to undo them from — untick Place automatically, or delete them on the Units layer. Without game data the dialog falls back to flat tileset colours and says so, as the map view itself does.

Saving#

Ctrl+S writes the map back where it came from. In Chrome, Edge and the desktop app the editor keeps a handle to the file it opened (from the Open dialog, a drop or the Save dialog), so Save writes in place after the browser has asked once for permission. Firefox and Safari hand over a file's contents but no way back to it, so there every save is a download and the notice that appears bottom-right says so; look in the downloads folder. Save As (Ctrl+Shift+S) and Save Copy As open the Save dialog — a copy is written without the open map changing its name or file — and a map that has no file yet goes through it on its first Ctrl+S. When a save is done, a notice appears bottom-right with the name and size, the status bar says the same, and the dot next to the map's name in the menubar stops glowing.

The Save dialog is where the file's shape is decided, with everything it will write listed on the right before it is:

The options confirmed in the dialog are what Ctrl+S reuses for that map from then on.

scmJS 0.1.0 · Generated from the repository. StarCraft and Brood War are trademarks of Blizzard Entertainment; this project ships none of their data.