scmJS docs

Data sets

The editor draws from one set of game files at a time, and a data set names one. The default is the game's own. Any other is a mod's: the game's files in the same formats with some of them replaced, such as its own units.dat, graphics, sounds or stat_txt.tbl. A Remastered installation added beside a classic copy is a data set too.

To add one, open Help ▸ Game Data…, choose Add a data set…, give it a name and pick a folder. The folder holds the mod's own files, and either the game's archives, which the mod's files are laid over, or nothing else, in which case they are laid over the copy you are drawing from now. A folder with StarDat.mpq and BrooDat.mpq but no patch_rt.mpq is laid over the game's own copy instead, when that has the patch: the two alone hold the tables from before the game's patches, and every table the mod does not replace would be those. With no such copy the data set is made over the two, and the editor says so:

MyMod/
  StarDat.mpq          the game's archives (or leave them out: the copy in use is the base)
  BrooDat.mpq
  patch_rt.mpq         applied over the two
  mymod.mpq            a mod's own archive
  My Mod.exe           a mod's self-executing loader: its archive is read, nothing is run
  plugins/gptp.qdp     its plugins, libraries and FireGraft project: never run, part of its hash
  arr/units.dat        loose files, by the game's paths
  unit/terran/marine.grp
  rez/…

The mod is read as scmjs mod info reads it (What a mod is): where its game paths start, which archives, exes and zips are its, its code, and its mod.json. Where several sources have the same file, the later one wins, as in the game: StarDat.mpq, then BrooDat.mpq, then patch_rt.mpq, then the mod's own sources where its loader lays them (archives as MPQDraft's patcher takes them, then a FireGraft patcher's archive, then loose files over all of them). The game's archives are those of a copy of the game in the folder, beside which they lie with StarDat.mpq; a patch_rt.mpq anywhere else is the mod's own. The mod's files under arr, unit, tileset, game, scripts or rez are drawn with; its other files (its sounds, say) count for its hash. A folder whose name starts with a dot (.git) is never read, and read-mes beside the mod's files are not its. A terrain.json beside mod.json (or in its place) is read with the folder and kept with the data set: its named pieces, flat ground and borrowed-terrain tables are in the Tile and Isometric palettes while the data set is in use (Terrain a mod declares). Adding the mod again replaces it, and removing the data set forgets it. The same holds for a mod's folder chosen for a map whose terrain the data in use lacks.

The data set is stored under its own name beside the game's copy, so removing one leaves the others alone. The Data sets list appears in Help ▸ Game Data… once there is a second one, and the choice is remembered. Switching drops everything decoded from the previous files, since the same ids now mean different pictures, and loads again; an open map stays open and picks the new graphics up as they arrive.

A data set laid over a copy holds only what the editor reads. The game's files for playing stay in the copy underneath. A copy made with them (see Files for playing) also has every picture the game's image table names; laid over an older copy, a new unit type drawn with a picture none of the game's own units uses can be missing.

What a data set cannot be:

Data sets made from a mod#

Many mods change more than single files. A data set takes what the larger ones ship:

What does not work yet:

A map remembers its data set#

When a map is saved while a data set other than the game's own is in use, it carries a small note naming it (a file scmjs\dataset.json inside the map's archive, with the data set's id, name, a hash of its files, when known where its makers publish it, and the races it adds when it names them). The game and other editors ignore it. Opening such a map while another data set is in use, the editor asks once: to switch, when that data set is installed here, or, when it is not, it says where its makers publish it and offers Help ▸ Game Data…. Nothing is downloaded.

The note goes with the map wherever else it leaves the editor too: an export, a map put in My Maps or shared, and the file Test Map builds all carry it while a data set other than the game's is in use, even for a map that was never saved with it. The map open in the editor is changed only by Save. Test Map also passes the data set on, so a test target that plays the map, such as the play page, knows which files the map was made for. StarCraft itself, started on its own, plays with the game's own data, and Test Map says so.

Races a data set adds. A mod can give players races past the game's eight, which none of its files name (Races a mod adds). They are named for a data set by the races of the mod.json in the folder you add it from or one folder down (Help ▸ Game Data… ▸ Add a data set…), or by a plugin, and they are kept with the data set, through a new release of the mod. Player Settings and Statistics then show them by name and offer them in the race list; without a name such a race shows as Race and its number, and Player Settings keeps it as the map has it. A map's note carries the races of its data set, and opening the map gives them to that data set when the map's data set is the one in use and none were named for it here. They are kept in the browser with your other settings: Preferences ▸ Storage lists them, and clearing them there takes the names away at once.

Terrain the data set has not got#

A map made for a mod that carries no such note, because it was made in another editor or is the map of a replay, still shows it in its terrain: a mod's tileset can have far more tile groups than the game's (Cosmonarchy's Jungle has 4,095, Remastered's 2,046). The same goes, on a smaller scale, for a map on the tiles Remastered added, opened over a 1.16 copy.

The tiles are hatched. Every tile the data set in use has no picture for is drawn as a dark plate with thin amber diagonals, in the map at every zoom, in the minimap and in an exported image. Nothing of the map changes: it is only how the tile is drawn, and it is drawn so on purpose. Left to the game's own rule most of a mod's tiles would not come out empty but as other tiles, since the game reads a tile's group with one bit fewer than a mod's long tileset uses, and a map of wrong terrain looks fine until it is played. The elevation and buildability overlays say nothing on a hatched tile, as nothing is known of it. (One case reads wrongly: a map of the game's own that sets the creep flag, the top bit of a tile value, on a tile by hand has that tile hatched and counted as a mod's, because the flag is the bit a mod's tileset uses. Maps do not do this outside of tests.)

The editor says so, once for the map while the data set stays the same, in a notice that stays until you close it. It names the data set and the tileset, counts the tiles, and says whether they are past even Remastered's tables, so the map was made for a mod, or are tiles Remastered added. It offers what can be done from where you are:

The notice goes once the data set in use has the terrain, and comes back if you switch to one that has not. A map whose note names another data set gets the offer to switch instead. Check Map lists the same tiles under Terrain.

The hash is the mod's hash: it covers every file of the data set's own — its loose files, the members of its archives (a loader .exe in the folder is read for its archive), every module of its code (its plugins, the plugins its patcher .exe carries, the libraries they load) and its FireGraft project — and is worked out by the same library as the play page and scmjs mod info work it out, so the editor, the command line and the play page give one mod the same hash. Files of the mod in the game's folders that the editor does not read, such as its sounds, count too. Nothing is compared with the copy the data set is laid over, so the hash does not depend on which copy that is. A data set made before November 2026 keeps the hash it was made with, which counted only the files that differ from the copy underneath; one made before 11 November 2026 kept a hash with no line for a patcher's own plugins or a library. Installing it again gives the hash by this rule.

Names#

The game names things in stat_txt.tbl: entries 0 to 227 are the unit types, and the weapon, upgrade and technology tables each point into the same file. The editor's own name tables are StarEdit's, which read better in about fifty places ("Cargo Ship (Unused)" where the game says "Unused") and are the names the text trigger format and other editors share.

The rule is per entry: where the loaded data's name differs from what the game's own data says for that id, the loaded name shows; everywhere else, StarEdit's stands. With Blizzard's files nothing changes. With a mod's, whatever it renamed shows the new name in every palette, list and dialog, and the text trigger parser accepts both names, so a trigger printed under a mod reads back.

scmJS 0.18.0 · 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.