How the game loads a map
StarCraft reads a map up to three times, and each time it reads only the sections it
needs then: 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.
| 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, UNITVER 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, TRIGVER 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 carries on with no briefing |
A read fails at the first section it needs that is missing, or at the first copy of a section that it does not accept. What is read before the failure stays read, but the map goes no further.
The map list read runs every time the list shows the map, again when a game is made with it, and again at the start. So the nine sections it needs are needed by every map, and a map that lacks one is shown in the list but cannot be chosen.
Melee and Use Map Settings#
The game type decides what the second read takes. Melee, and every type except Use Map Settings (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, technologies or availability.
Of the placed units, a melee game keeps only the start locations and the mineral fields,
geysers and critters of Player 12. Of the unit sprites in THG2, it keeps only
Player 12's. Every other unit is left out.
Use Map Settings reads everything else that matters to play.
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. |
| 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; UNIS, UPGS, TECS, UPGR and PTEC in an older one |
THG2 can be empty when the map has no sprites. Everything else is optional or for
editors. MBRF, the briefing, is not needed: without it there is no briefing and nothing
else changes. TYPE is looked for but never read.
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. Any fault gives this message in a StarCraft 1.00 file. |
| 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. That covers a Brood War map in the original StarCraft, but also every other fault: a missing DIM, a SIDE of the wrong length, a failed VCOD check, a VER the game does not know such as Remastered's 206, and in Remastered a missing TRIG. The game names the expansion set whatever the real fault. Remastered gives the same message. |
| "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. Installation maps can only be played as 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. Melee needs MTXM, THG2, UNIT and, in a Brood War file, COLR; Use Map Settings also needs MASK, PUNI, UPRP, MRGN, TRIG and the settings tables. 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. |
| 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. |
Which game#
Everything this page says about the game was checked in StarCraft: Brood War 1.16.1, the last version before Remastered. Remastered is known to differ in these ways:
- Its map list needs
TRIG. A map with noTRIGsection is Invalid Scenario in Remastered whatever the game type, where 1.16.1 lists it and plays it as melee. - It reads
VER206,STRxandCRGB. 1.16.1 refusesVER206 and never reads the other two. - It passes over a
STRcopy shorter than 2 bytes, where 1.16.1 takes it. - It reads text as UTF-8 when the bytes are valid UTF-8 (see
STR). - In a string, a colour carries on to the next line.
Twelve of the page's claims were also played in Remastered with probe maps, and in all
but the TRIG one Remastered did what 1.16.1 does:
- a section one byte too long, and a
UNITsection that ends in part of a record, refuse the map, with the same messages; - a StarCraft 1.00 file with 255 locations, and a map with no
MASK, start as melee and stop as Use Map Settings; - a Brood War file with no
COLRstops at the start of any game; - a map with no
MBRFplays, with no briefing; - start locations come from the last
UNITsection, so a melee game of a map that puts them in the first of two is lost at once; - a Ghost placed cloaked starts cloaked only if its owner has Personal Cloaking;
- a hybrid file's
UNIxis applied over itsUNIS; - a section the game never reads may run past the end of the file.
Where the page says a fact was found playing Remastered, it was. The rest has not been
checked in Remastered; a map that 1.16.1 accepts, and that has a TRIG section, is the
safe target.