Map files
The MPQ container, the CHK sections, and how much of a file the editor preserves.
How scm-js reads and writes .scm, .scx and .chk, and how much of a file it
understands. For the user-facing summary see the README.
- Containers.scm and .scx are MPQ archives.
- The fidelity modelA CHK file is a flat sequence of NAME + length + payload chunks.
- Section coverageDecoded into typed fields and re-encoded when edited:
- Revision pairsBrood War widened several tables and gave the wider versions new names.
- New mapssrc/formats/chk/create.ts builds File ▸ New from nothing, with the same section set a StarEdit map has: IVE2, VCOD and the empty CUWP slots as raw bytes, everything else marked dirty and …
- Sections that may be absentISOM, MASK, WAV , CRGB and the settings tables are null when the file had no such section, and encodeSection then omits them rather than writing a zeroed one.
- Looking at the bytesA plugin can read and rewrite the file at the section level through api.document.sections (src/editor/sections.ts): currentChk serialises the open scenario — dirty sections encoded, every…