Opening and saving maps
What the editor does with a map file: what it preserves, what Save can strip, revisions, protected and built maps.
What scmJS does with a StarCraft map file when it opens and saves one. This is for map makers deciding what to keep in a release copy, for people fixing a broken or protected map, and for anyone writing a tool that reads what the editor writes. The user guide covers the Save dialog itself; the format, section by section, is in the CHK format reference.
The short version: the editor opens .scm, .scx and bare .chk files, rewrites only
the parts of the scenario you changed, and copies everything else through byte for byte,
including things it does not understand. A map loses nothing by passing through the editor
unless you ask for it in the Save dialog. The exceptions are two sections the game would
refuse as they stand, which a save puts right (below).
- The archiveA .scm or .scx file is an MPQ archive, the container format Blizzard used for its games' data.
- The scenarioThe scenario is a flat sequence of sections, each a four-character name, a length and that many bytes of data: MTXM holds the terrain, UNIT the placed units, TRIG the triggers.
- SavingThe Save dialog's What to keep choice decides what goes into the file.
- RevisionsThe revision is the VER value. It decides which sections the game reads, and so which versions of the game can play the map.
- New mapsFile ▸ New writes a Brood War map with the sections StarEdit writes for one.
- ReplaysA replay (.rep) is not a map, but it carries the map it was played on.
- Protected and damaged mapsA protected map is one written to be played but not edited: sections repeated, resized or given nonsense names, the archive's file list removed, the scenario member renamed or duplicated…
- Looking at the bytesThe Section Explorer plugin, installed from Plugins ▸ Browse Plugins…, is a hex editor over the scenario.
- In the sourceFor developers. The archive and the scenario are under src/formats/mpq/ and src/formats/chk/, and the file-level policy is in src/editor/.