scmJS docs

Getting the files

Help ▸ Game Data… shows the current source and, when there is none, the two ways to get one.

The hosted editor also has the same controls on a page of their own, scmjs.dev/editor/data, which lists every copy the browser holds: what it is, where it came from, how many files and how large, and when it was made. The top bar of scmjs.dev shows which of them you have (no game data, the editor's graphics from Blizzard's download, or files from your own StarCraft 1.16 or Remastered) and links to that page. Nothing is read but each copy's record of where it came from, and nothing leaves the browser.

Download from Blizzard. Blizzard offers the standalone StarCraft map editor as a free download, and the package carries both archives. They are the trimmed StarEdit distribution rather than the game's own, which matters only in that they are enough: with the package's patch_rt.mpq applied over them, as an installation applies its own, they produce the same files a 1.16.1 installation does, its sounds included. The package is a 101 MB zip of which only those three archives are wanted, so the editor reads the zip's own directory and fetches just those members, 83 MB, using HTTP range requests, then inflates them in the browser.

The download goes through a small forwarder at gamedata.scmjs.dev (scm-js/cloudflare-blizzard-forwarder) rather than straight to Blizzard, because a web page cannot read Blizzard's download server directly: its HTTPS certificate is for a different name, plain HTTP is blocked on an HTTPS page, and it sends no cross-origin header. The forwarder adds that header and passes the range requests through. It stores nothing and serves nothing of its own. The desktop app uses the same address, since its window is an ordinary web page with the same rules.

Use your own files. Pick StarDat.mpq and BrooDat.mpq, or the folder holding them. The desktop app can also search the computer, or take the StarCraft folder you point it at. A patch_rt.mpq in the folder is applied over the two, as it is in the game. The folder can also be a StarCraft: Remastered installation, which is read as described below.

Either way the extraction runs on your machine, in a background thread in the browser and in the app's own process on the desktop, and the result is kept so it happens once. Open maps pick the graphics up as they arrive. The same dialog removes a copy, which puts the editor back to whatever step of the search it would have reached without it.

StarCraft: Remastered#

A Remastered installation has no .mpq archives. The launcher keeps the game in the Data folder as a few large files with an index over them, and the editor reads the files it needs out of that with kascade. Choose the folder the game is installed in, the one that holds .build.info. Nothing in the folder is changed, and only the files the editor uses are read: about 1,700 of them, 365 MB, out of an installation of several gigabytes. Most of that is Remastered's own terrain and sprite pictures (and what its water and lava need to move), which the 1.16 archives do not have (see Remastered graphics); the files both kinds of copy share are about 45 MB of it.

What comes out is the same set of files as from the 1.16 archives, plus the terrain pictures above, with one difference worth knowing. Remastered added tiles to seven of the eight tilesets (Installation is the one it left alone), so its tile tables are longer. Everything the 1.16 tables hold is in them unchanged, and a map made for 1.16 draws the same from either. A map that uses the added tiles needs the Remastered files to be drawn: from a 1.16 copy those tiles have no picture.

There are two ways in, depending on what the editor already has:

The folder is chosen through the browser's ordinary folder upload, so the browser asks whether to upload the folder's files. Nothing is uploaded anywhere: the editor is handed the files where they are and reads only the parts it needs. (Chrome and Edge have a newer folder picker that would not ask, but it refuses anything under Program Files, which is where StarCraft is installed.)

Of Remastered's high-definition art, the terrain and the sprites are read at twice the classic size. The four-times-size versions of both are in the same installation and are left alone.

Files for playing#

A copy made from your own game, whether a 1.16 installation or Remastered, also keeps the files the game itself runs on: its computer players' scripts, the rules of each game type, the cursors, the wireframes and palette tables of its interface, its sounds, and the beat of the count down before a game between people starts. The editor opens none of them. They are there for the play page at scmjs.dev/play, which runs a map in the browser from the same copy, so the game is installed once for both.

It also keeps the pictures the editor has no use for. The editor copies the graphics of what can be placed on a map; a game in play draws more than that: a building going up, a zerg unit hatching, a protoss building warping in, the mark every spell leaves on a unit, the selection circles. Those are about 170 more files.

From a Remastered installation it keeps the rest of Remastered's interface as well, which the play page draws with and the editor does not: the console, the command and resource icons, the cursors, the wireframes and each tileset's creep edges, about 35 MB.

It can keep more of every Remastered sprite too. A unit's sprite file holds its colours and, beside them, what the game's real-time lighting reads: which way each pixel faces, what shines, how much light reaches it, what glows. The editor draws with the colours alone and keeps only those. Tick "Keep the files for real-time lighting" when you choose the folder, here or on the play page, and the copy keeps the lighting's layers as well, about 200 MB more; the play page can then light units as Remastered does, under its Options. A copy made without them plays the same in every other way, and choosing the folder again with the box ticked adds them.

The sounds are most of it: about 1,100 files, roughly 95 MB from a 1.16 installation and 280 MB from Remastered, whose sounds are stored uncompressed. A Remastered copy comes to about 700 MB in all, 900 MB with the lighting's files, and installing takes correspondingly longer. The files are written one at a time as they are read, so the size is on disk and not in memory.

The play page can also make the copy itself: choose a StarCraft: Remastered folder there and it is installed by the same code, into the same place, without leaving the page. If your own 1.16 copy is already in the browser, the Remastered one is added beside it as a data set rather than replacing it. Either way the editor then opens with Remastered graphics on and that data set in use, as it does after installing from its own dialog; View ▸ Remastered Graphics and the Data sets list change it back.

A copy made from Blizzard's free download has these files too, but it is the map editor's download, not the game: the play page will show replays from it and will not start a game or test a map. Playing needs StarCraft installed, and the play page asks for its folder. A copy made by a version of the editor from before these files were kept, or before it could read the sounds of a 1.16 installation, cannot be used for either; the play page says so and asks for the files to be installed again, which replaces the copy.

The container image#

The container image at ghcr.io/scm-js/scm-js carries no game data and refuses to serve the paths the files would be at, so a container starts at step 5 and asks, like the hosted editor. To serve your own extraction to your own browser instead, mount an extracted tree over those paths:

docker run --rm -p 8080:80 \
  -v "$PWD/public/tileset:/usr/share/nginx/html/tileset:ro" \
  -v "$PWD/public/arr:/usr/share/nginx/html/arr:ro" \
  -v "$PWD/public/unit:/usr/share/nginx/html/unit:ro" \
  -v "$PWD/public/game:/usr/share/nginx/html/game:ro" \
  -v "$PWD/public/scripts:/usr/share/nginx/html/scripts:ro" \
  ghcr.io/scm-js/scm-js:latest

That is a copy on your own machine served to your own browser. Publishing an image with the files inside, or serving one from a public address, is redistributing Blizzard's data; see ATTRIBUTION.md.

scmJS 0.7.3 + main@e2d8ba5 · Generated from the repository. The source is under the MIT license, which does not cover what ATTRIBUTION.md lists. StarCraft and Brood War are trademarks of Blizzard Entertainment; this project ships none of their data.