scmJS docs

How the game loads a map

StarCraft reads a map up to three times, and each read uses only the sections it needs: a short read for the map list, a longer one when a game starts, and one more for the briefing. Before each read it checks VER, which must be 59, 63 or 205. Remastered also accepts 64 and 206; see Revisions.

How StarCraft opens a map: the map list, the start of a game, the briefing

Read When Sections, in the order the game handles them Fails with
Map list When the map list shows the map, when a game is created, and again when it starts VER␠, DIM␠, ERA␠, OWNR, SIDE, STR␠, SPRP, FORC, VCOD Invalid Scenario
Melee start When a game of any type but Use Map Settings starts VER 59 and 63: STR␠, MTXM, THG2, UNIT
VER 205: STR␠, MTXM, THG2, UNIT, COLR
Error loading scenario file.
Use Map Settings start When a Use Map Settings game starts VER 59 and 63: STR␠, MTXM, THG2, MASK, UNIS, UPGS, TECS, PUNI, UPGR, PTEC, UNIx (if present), UPGx (if present), TECx (if present), PUPx (if present), PTEx (if present), UNIT, UPRP, MRGN, TRIG
VER 205: STR␠, MTXM, THG2, MASK, UNIx, UPGx, TECx, PUNI, PUPx, PTEx, UNIT, UPRP, MRGN, TRIG, COLR
Error loading scenario file.
Briefing When the briefing room of a Use Map Settings game opens STR␠, MBRF Nothing. The game continues without a briefing

A read fails at the first required section that is missing, or at the first copy of a section that the game rejects. Sections read before the failure stay loaded, but loading stops there.

The map list read runs again when a game is created and when it starts, so every map needs its nine sections. A map that lacks one is shown in the list but cannot be selected.

Melee and Use Map Settings#

The game type decides which sections the second read uses. Every type except Use Map Settings (Melee, Free for All, One on One, Capture the Flag, Greed, Slaughter, Sudden Death, Top vs Bottom and the team types) reads four sections: the strings, the terrain, the sprites and the units, plus the colours in a Brood War file. It never reads the map's triggers, locations, fog, unit settings, upgrades, abilities or availability.

Of the placed units, such a game keeps only the start locations and Player 12's mineral fields, geysers and critters (UNIT). Of the unit sprites, it keeps only Player 12's (THG2).

Use Map Settings reads all the other sections that affect play.

Which sections each read needs

What a map needs#

The smallest file each kind of game will load:

A map for Needs
Melee and the other game types VER, DIM, ERA, OWNR, SIDE, STR, SPRP, FORC, VCOD, MTXM, THG2 and UNIT, and COLR in a Brood War file (VER 205). Remastered also needs TRIG, and accepts STRx in place of STR in a VER 64 or 206 file.
Use Map Settings All of those, and MASK, PUNI, UPRP, MRGN, TRIG and five settings tables: UNIx, UPGx, TECx, PUPx and PTEx in a Brood War file (VER 205 or 206); UNIS, UPGS, TECS, UPGR and PTEC in a VER 59, 63 or 64 file

THG2 can be empty when the map has no sprites. Every other section is optional or for editors.

When a map will not load#

What a player sees, and what causes it:

The player sees When Why
Invalid Scenario, with "This scenario is unreadable because it is invalid or corrupted." In the map list The map list read failed, and the file's VER is 59 or lower, or could not be read at all.
Invalid Scenario, with "This scenario is intended for use with a StarCraft Expansion Set." In the map list The map list read failed, and the file's VER is above 59. The game gives this message whatever the fault: a Brood War map in the original StarCraft, but also a missing section, a section of the wrong length, a failed VCOD check or a VER the game does not know, such as Remastered's 64 and 206.
"This map can only be played with the 'Use Map Settings' game type." Making a game The tileset is Installation and the game type is not Use Map Settings.
"Error loading scenario file." Starting a game A section this game type needs is missing, the wrong length, or runs past the end of the file. The same map may still start as melee.
"WARNING: Unit unplaceable! (name) (x,y)" The first moments of a game A placed unit had no room where it stands, and was removed (UNIT).
No briefing The briefing room MBRF is missing or not a whole number of records.
The file name in place of the map's name In the map list The name in SPRP is string 0, or an empty string.

Where Remastered differs#

This reference describes StarCraft: Brood War 1.16.1, the last version before Remastered. Remastered loads a map almost exactly as 1.16.1 does: it walks the sections the same way, runs the same reads in the same order, and applies the same length checks, the same VCOD check and the same rules for repeated sections. These are the differences. Each is described in the entry of the section it affects, and the differences in how Remastered runs triggers are in the trigger reference.

A map loads in both games if 1.16.1 accepts it, it has a TRIG section, it is no wider or taller than 256 tiles, and its CRGB, if it has one, is 32 bytes long.

scmJS 0.20.0 + main@c323d11 · 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.