<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://staredit.net/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=FaRTy1billion</id>
		<title>Staredit Network Wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://staredit.net/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=FaRTy1billion"/>
		<link rel="alternate" type="text/html" href="https://staredit.net/wiki/index.php?title=Special:Contributions/FaRTy1billion"/>
		<updated>2026-04-20T22:50:07Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.27.7</generator>

	<entry>
		<id>https://staredit.net/wiki/index.php?title=Modding_Files_Overview&amp;diff=695</id>
		<title>Modding Files Overview</title>
		<link rel="alternate" type="text/html" href="https://staredit.net/wiki/index.php?title=Modding_Files_Overview&amp;diff=695"/>
				<updated>2023-06-01T18:30:59Z</updated>
		
		<summary type="html">&lt;p&gt;FaRTy1billion: added to file format category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are many file formats used in modding. Understanding what these formats represent as well as when and how to edit them is key to modding effectively.&lt;br /&gt;
&lt;br /&gt;
==BIN==&lt;br /&gt;
There exists three different *.bin files: dialog data (rez\), AI and animation scripts (scripts\), and doodad data (\tileset\*\dddata.bin).&lt;br /&gt;
&lt;br /&gt;
[[AIScript.bin Opcodes]], [[iscript.bin Opcodes]]&lt;br /&gt;
&lt;br /&gt;
*[[Bin dialog reference]]&lt;br /&gt;
*[[Bin dialog file format]]&lt;br /&gt;
*Edit bin dialogs with [[BinEdit]] &lt;br /&gt;
*note: Bin dialogs reside in &amp;quot;rez\&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For script\ files, edit with [[SCAIEdit]] (AI scripts), [[IceCC]]/[[Ice]]. (iscript, no ice link)&lt;br /&gt;
&lt;br /&gt;
==CCD==&lt;br /&gt;
(font\font.ccd) A checksum file used during decrypting the CD key.&lt;br /&gt;
&lt;br /&gt;
==CHK==&lt;br /&gt;
Raw map data. Used for maps and campaigns. Edit like normal maps.&lt;br /&gt;
&lt;br /&gt;
[[scenario.chk]] format&lt;br /&gt;
&lt;br /&gt;
==CLH==&lt;br /&gt;
(font\font.clh) This file contains the encrypted CD owner name.&lt;br /&gt;
&lt;br /&gt;
==CMD==&lt;br /&gt;
Patch command script.&lt;br /&gt;
&lt;br /&gt;
 * set the product patch name&lt;br /&gt;
 PatchVersion This patch upgrades Brood War from version 1.04 to version 1.12.&lt;br /&gt;
 * make sure that we don't patch version 1.12 or greater&lt;br /&gt;
 ProductVersionLessThan $(InstallPath)\Starcraft.exe    1.1.2.0   0xffff.0xffff.0xffff.0xffff&lt;br /&gt;
 * make sure we only patch brood war (which is numbered ##.##.##.1)&lt;br /&gt;
 * v1.02 uses 1.024, so we can only check low bit for Brood War.&lt;br /&gt;
 ProductVersionEqualTo  $(InstallPath)\Starcraft.exe    0.0.0.1   0.0.0.0x01&lt;br /&gt;
 SetLauncher $(InstallPath)\Starcraft.exe&lt;br /&gt;
&lt;br /&gt;
==CND==&lt;br /&gt;
Blizzard map signing (Candidate Scenarios).&lt;br /&gt;
*blizzard_2.cnd&lt;br /&gt;
*ladder_2.cnd&lt;br /&gt;
*ladder_3.cnd&lt;br /&gt;
*ladder_4.cnd&lt;br /&gt;
&lt;br /&gt;
==DAT==&lt;br /&gt;
Contain properties and information, such as unit stats, properties, flags, and basic AI.&lt;br /&gt;
&lt;br /&gt;
Edit with [[DatEdit]].&lt;br /&gt;
&lt;br /&gt;
==FNT==&lt;br /&gt;
StarCraft font files. Encrypted in StarDat.mpq, you can get un-encrypted ones from install.exe.&lt;br /&gt;
&lt;br /&gt;
No editor exists, but a spec sheet exists.&lt;br /&gt;
&lt;br /&gt;
The encrypted font file use the SHA-0 digest algorithm and IDEA encryption but not follow the standard form.&lt;br /&gt;
&lt;br /&gt;
All the data and calculation assume the little-endian byte order and seems a bug exist in Blizzard's SHA-0 algorithm: they did all left rotation with signed integer instead of general unsigned.&lt;br /&gt;
&lt;br /&gt;
By this you cannot use common security library such as the OpenSSL to decrypt them directly anyway...&lt;br /&gt;
&lt;br /&gt;
However, you can modify its source to make them work easily.&lt;br /&gt;
&lt;br /&gt;
==GID==&lt;br /&gt;
(font\font.gid) This file contains the encrypted CDKey.&lt;br /&gt;
&lt;br /&gt;
==GOT==&lt;br /&gt;
Game Templates. Contain different game types and their settings.&lt;br /&gt;
&lt;br /&gt;
Edit with GameTemplate.EXE&lt;br /&gt;
&lt;br /&gt;
==GRP==&lt;br /&gt;
In-game images for sprites (including units, weapons, spells, buildings, etc.).&lt;br /&gt;
&lt;br /&gt;
[[GRP image format]]&lt;br /&gt;
&lt;br /&gt;
Compile and decompile with GRPEdit, RetroGRP or SFGrp Conv on Windows, and PyGRP on Mac.&lt;br /&gt;
&lt;br /&gt;
==INS==&lt;br /&gt;
Installer script files, found in INSTALL.EXE&lt;br /&gt;
 @filename&lt;br /&gt;
&lt;br /&gt;
Include a file, essentially pastes the contents of the file into this one&lt;br /&gt;
 String variablename = &amp;quot;xyz&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Declares a variable&lt;br /&gt;
 $(variablename)&lt;br /&gt;
&lt;br /&gt;
Gets the value of a variable&lt;br /&gt;
&lt;br /&gt;
==LO*==&lt;br /&gt;
Overlay files. These files control positions of things like bunker overlay, attacks, and engine glows.&lt;br /&gt;
&lt;br /&gt;
Edit with [[LoEdit]]&lt;br /&gt;
&lt;br /&gt;
===LOA===&lt;br /&gt;
Attack overlay. Used by the bunker, this is where the firing animations are placed. Also used by siege mode siege tank.&lt;br /&gt;
&lt;br /&gt;
===LOB===&lt;br /&gt;
Birth overlay. Used to units with the 2 in 1 egg spawning option.&lt;br /&gt;
&lt;br /&gt;
===LOD===&lt;br /&gt;
Down overlays. The offsets in this file determine placement of dust when a building lands.&lt;br /&gt;
&lt;br /&gt;
===LOF===&lt;br /&gt;
Fire overlays. These files are used when a building enters critical HP and starts to display flames or blood.&lt;br /&gt;
&lt;br /&gt;
===LOO===&lt;br /&gt;
Object overlay. Used by workers to place powerups when carried.&lt;br /&gt;
&lt;br /&gt;
===LOS===&lt;br /&gt;
Shield/smoke overlay. Used when placing shield hit graphics. For smoke overlay, they are used for the vespene gas poofs.&lt;br /&gt;
&lt;br /&gt;
===LOU===&lt;br /&gt;
Up overlays. The offsets in this file determine placement of dust when a building lifts off.&lt;br /&gt;
&lt;br /&gt;
===LOG, LOL, LOX===&lt;br /&gt;
Miscellaneous overlays. Some are attack overlay offsets, some are for spells, some are for engine overlays, and then there's some more effects they have. Basically, these are used most by the Iscript, while the above ones (except for .loa) are used by the engine.&lt;br /&gt;
&lt;br /&gt;
==LST==&lt;br /&gt;
templates\templates.lst contains the list of *.got files.&lt;br /&gt;
&lt;br /&gt;
Edit with notepad or another text editor.&lt;br /&gt;
&lt;br /&gt;
==[[MPQ]]==&lt;br /&gt;
MPQ is short for Mo'PaQ, which is in turn short for Mike O'Brien Pack, the creator the format. Probably the most important format used in modding, MPQ files are similar in function to ZIP files, that is, they hold (and compress) other files inside of them.&lt;br /&gt;
&lt;br /&gt;
When creating a mod, the mod maker usually starts with an MPQ and begins filling it with edited files. The MPQ is then run through a program called MPQDraft, which applies the MPQ in a similar fashion to patch_rt.mpq (and in fact, in a grafted mod, the modded MPQ replaces patch_rt.mpq): the modded MPQ take precedence over patch_rt.mpq, which takes precedence over BrooDat.mpq, which takes precedence over StarDat.mpq. Thus, a file named FOO.BAR in the modded MPQ will be used even if there is a FOO.BAR in any of the other MPQs.&lt;br /&gt;
&lt;br /&gt;
MPQs usually contain metadata files:&lt;br /&gt;
*(listfile): Contains a list of the archive's files, one filename per line. May or may not be exhaustive. &lt;br /&gt;
*(signature): Contains the weak cryptographic signature of the archive. This type of signature is deprecated. &lt;br /&gt;
*(attributes): Contains extended file metadata. Currently known attributes are file creation date, CRC32 checksum and MD5 checksum.&lt;br /&gt;
&lt;br /&gt;
==PCX==&lt;br /&gt;
PCX files are used for the UI images (such as backgrounds, buttons, the in-game console, etc.) and color tables.&lt;br /&gt;
They can be converted to other formats by programs like Irfanview, and many image editors can edit them (e.g. Paint.NET and the GIMP). Current versions of MS Paint cannot edit PCX images, however older versions (Window 98 and before) can edit them.&lt;br /&gt;
&lt;br /&gt;
[[PalEdit2]] can be used to edit the color tables (mainly the tileset\*\*.pcx ones) and convert them to normal palette files.&lt;br /&gt;
&lt;br /&gt;
==RES==&lt;br /&gt;
(glubnres.res) Battle.net dialogs. Normal resource file.&lt;br /&gt;
&lt;br /&gt;
==SCM/SCX==&lt;br /&gt;
Map files. SCM is for Vanilla maps and SCX is for Expansion maps.&lt;br /&gt;
&lt;br /&gt;
==SMK==&lt;br /&gt;
Smacker animation files. Used for unit portraits, UI animations (main menu and campaign selection buttons), and cinematics.&lt;br /&gt;
&lt;br /&gt;
Edit with [[Smacker Tools]].&lt;br /&gt;
&lt;br /&gt;
==SNP==&lt;br /&gt;
Multiplayer resource files.&lt;br /&gt;
&lt;br /&gt;
==SPK==&lt;br /&gt;
(parallax\star.spk) Star parallax images.&lt;br /&gt;
&lt;br /&gt;
==TBL==&lt;br /&gt;
TBL files contain strings, which are anything from path names to unit/weapon/armor names, to button captions. Most strings in TBL files work just like strings in maps- you can use overlapping and colors. Some strings, particularly the button captions and unit names, are different. Button captions follow a format like this:&lt;br /&gt;
&lt;br /&gt;
button hotkey (a-z)&amp;lt;1&amp;gt;Button caption (usually with a &amp;lt;3&amp;gt;highlightedletter&amp;lt;1&amp;gt;) &amp;lt;0&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Unit names follow this format:&lt;br /&gt;
&lt;br /&gt;
Unit name&amp;lt;0&amp;gt;parenthesed in Staredit (like Jim Raynor (Vulture)) * means no text in italics&amp;lt;0&amp;gt;Group in Staredit&amp;lt;0&amp;gt;&lt;br /&gt;
&lt;br /&gt;
TBL files are edited using [[TBLPad]].&lt;br /&gt;
&lt;br /&gt;
==Tileset Files==&lt;br /&gt;
Blizzard is nuts and made tileset files into a billion little things.&lt;br /&gt;
&lt;br /&gt;
The files are pretty obviously named, however some of them have '-nc' in their name. This indicates that they don't use the color cycling palette (Normally the first row in the palette will rotate values, giving the appearance of animated water or lava.) The editor uses these.&lt;br /&gt;
&lt;br /&gt;
Edit with [[TileEdit]].&lt;br /&gt;
&lt;br /&gt;
===dddata.bin===&lt;br /&gt;
Doodad data values. Appears to be the same as the vf4 values.&lt;br /&gt;
&lt;br /&gt;
===CV5===&lt;br /&gt;
Tileset group values, main tileset file. This contains all the flags for each row of tiles, and the 16 MegaTiles in the row.&lt;br /&gt;
&lt;br /&gt;
===VF4===&lt;br /&gt;
Mini-tile type. Contains the data for mini-tiles, such as whether or not you can walk on them.&lt;br /&gt;
Bit 0 will indicates if you can walk on it. In simpler terms, if the number is odd you can walk on the minitile.&lt;br /&gt;
It also shows elevation. The higher the number, the higher the tile.&lt;br /&gt;
&lt;br /&gt;
===VR4===&lt;br /&gt;
Mini-tile image data. Every 64 bytes is one mini-tile. Each byte is a reference to the palette index (exactly like a paletted bitmap.)&lt;br /&gt;
&lt;br /&gt;
===VX4===&lt;br /&gt;
Mini-tile image pointer. Bit 0 will indicate if the tile is flipped, and the 7 high bits will indicate the image to be used.&lt;br /&gt;
&lt;br /&gt;
===WPE===&lt;br /&gt;
Tileset (in-game) palette files. 1024-byte palette file. (4-byte integer for each color.)&lt;br /&gt;
Edit with [[PalEdit2]].&lt;br /&gt;
&lt;br /&gt;
==TRG==&lt;br /&gt;
Trigger files for game templates. Similar to the ones saved by StarEdit, except they do not have the 8-byte header and contain no extra data. They cannot use any locations and can only use standard strings.&lt;br /&gt;
[/wiki]*.trg format[/wiki]&lt;br /&gt;
&lt;br /&gt;
==TXT==&lt;br /&gt;
Normal text files. rez\*.txt contain text screen scripts (credits and the campaign screens.)&lt;br /&gt;
&lt;br /&gt;
Codes:&lt;br /&gt;
*&amp;lt;/COMMENT [TEXT]&amp;gt; Comment line.&lt;br /&gt;
*&amp;lt;/FADESPEED [#]&amp;gt; Speed between frames.&lt;br /&gt;
*&amp;lt;/DISPLAYTIME [#]&amp;gt; Time each frame is shown.&lt;br /&gt;
*&amp;lt;/BACKGROUND [PATH]&amp;gt; Filepath for background.&lt;br /&gt;
*&amp;lt;/FONTCOLOR [PATH]&amp;gt; Filepath for tfont.pcx color table.&lt;br /&gt;
*&amp;lt;/SCREEN[POSTION]&amp;gt; Where on screen to show the text. (LOWERLEFT, LEFT, CENTER, RIGHT. There may exist more, but these are all I could find.)&lt;br /&gt;
*&amp;lt;/PAGE&amp;gt; End of one screen.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;lt;/COMMENT Example screen&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;/FADESPEED 100&amp;gt;&lt;br /&gt;
 &amp;lt;/DISPLAYTIME 5000&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;/COMMENT #############################################################&amp;gt;&lt;br /&gt;
 &amp;lt;/BACKGROUND glue\title\title.pcx&amp;gt;&lt;br /&gt;
 &amp;lt;/FONTCOLOR glue\title\tfont.pcx&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;/SCREENCENTER&amp;gt;&lt;br /&gt;
 LOLOL PANCAKE!&lt;br /&gt;
 &amp;lt;/PAGE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==VIS==&lt;br /&gt;
Installer dialogs&lt;br /&gt;
&lt;br /&gt;
==WAV==&lt;br /&gt;
Supported sound format for StarCraft.&lt;br /&gt;
&lt;br /&gt;
Basic edits to WAV files can be done with Sound Recorder. More advanced edits can be done with these programs.&lt;br /&gt;
&lt;br /&gt;
==Unknown Formats==&lt;br /&gt;
===CNT===&lt;br /&gt;
(files\staredit.cnt)&lt;br /&gt;
&lt;br /&gt;
===FLC===&lt;br /&gt;
(editor\mask.flc, editor\trigrgn.flc)&lt;br /&gt;
&lt;br /&gt;
===FSP===&lt;br /&gt;
(editor\mask.fsp, editor\trigrgn.fsp)&lt;br /&gt;
&lt;br /&gt;
===SCC===&lt;br /&gt;
&lt;br /&gt;
''Heinermann:'' I believe one of the formats for mask/trigrgn can be opened with quicktime.&lt;br /&gt;
''FaRTy:'' All I get is a little green square with mask.flc, and a dark blue square with trgrgn.flc... Also the mask/trgrgn.grp files are a brown square and a blue square, respectively. Can't find anything to open the *.fsp files.&lt;br /&gt;
''Clokr_:'' The editor rgn files (from region) where supposed to be used to display locations.&lt;br /&gt;
''Doodle77:'' moving INS out of Unknown, they're installer script files&lt;br /&gt;
&lt;br /&gt;
[[Category:StarCraft]]&lt;br /&gt;
[[Category:Reference]]&lt;br /&gt;
[[Category:Modding]]&lt;br /&gt;
[[Category:File Formats]]&lt;/div&gt;</summary>
		<author><name>FaRTy1billion</name></author>	</entry>

	<entry>
		<id>https://staredit.net/wiki/index.php?title=Category:File_Formats&amp;diff=694</id>
		<title>Category:File Formats</title>
		<link rel="alternate" type="text/html" href="https://staredit.net/wiki/index.php?title=Category:File_Formats&amp;diff=694"/>
				<updated>2023-06-01T18:29:17Z</updated>
		
		<summary type="html">&lt;p&gt;FaRTy1billion: Added to reference and modding categories&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Articles containing file format specifications.&lt;br /&gt;
&lt;br /&gt;
[[Category:Reference]]&lt;br /&gt;
[[Category:Modding]]&lt;/div&gt;</summary>
		<author><name>FaRTy1billion</name></author>	</entry>

	<entry>
		<id>https://staredit.net/wiki/index.php?title=SPK_Format&amp;diff=693</id>
		<title>SPK Format</title>
		<link rel="alternate" type="text/html" href="https://staredit.net/wiki/index.php?title=SPK_Format&amp;diff=693"/>
				<updated>2023-06-01T18:23:58Z</updated>
		
		<summary type="html">&lt;p&gt;FaRTy1billion: Added File Formats category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Contains the star parallax data for the space platform tileset.&lt;br /&gt;
&lt;br /&gt;
The star references are stored backwards, such that Layer 5 is first, then Layer 4, etc. down to Layer 1. This is most evident in the Remaster format, where the first stars reference the last image in star.dds.grp (0,0 with size 11x11, then 11,0 with size 11x11, etc.). It is true in the pre-remastered format as well, but was previously not documented or well understood.&lt;br /&gt;
&lt;br /&gt;
==Header/Bitmap References==&lt;br /&gt;
*'''u16''' - Number of Layers&lt;br /&gt;
*'''u16[n]''' - (1 for each layer) Number of images in each layer&lt;br /&gt;
*1 struct for the total number of images in each layers, starting with the last layer:&lt;br /&gt;
**'''u16''' - Star X Position&lt;br /&gt;
**'''u16''' - Star Y Position&lt;br /&gt;
**'''u32''' - Bitmap Offset&lt;br /&gt;
&lt;br /&gt;
==Bitmap Structure==&lt;br /&gt;
Each is positioned at an offset specified by the Bitmap Offset in the layer image lists. These are not necessarily unique and can be referenced multiple times.&lt;br /&gt;
*'''u16''' - Bitmap Width&lt;br /&gt;
*'''u16''' - Bitmap Height&lt;br /&gt;
*'''u8[n]''' - (width*height bytes) Image Data, gets drawn over black pixels (effectively making 0 = transparent)&lt;br /&gt;
&lt;br /&gt;
==Remaster Format==&lt;br /&gt;
Remastered now has two files, star.dds.grp and star.spk. Star.spk no longer contains any image data, but instead star.dds.grp contains one sprite sheet of star images corresponding to each parallax layer.&lt;br /&gt;
&lt;br /&gt;
*'''u32''' - Number of Layers&lt;br /&gt;
*'''u32''' - Offset to first star reference&lt;br /&gt;
*1 struct for each layer:&lt;br /&gt;
**'''u32''' - Number of images in this layer&lt;br /&gt;
**'''u16''' - Width of parallax layer (648 for SD, 1296 for HD2, 2592 for HD)&lt;br /&gt;
**'''u16''' - Height of parallax layer (488 for SD, 976 for HD2, 1952 for HD)&lt;br /&gt;
*1 struct for each star in each layer, starting with the last layer:&lt;br /&gt;
**'''u16''' - Layer X Position (where it is positioned on screen)&lt;br /&gt;
**'''u16''' - Layer Y Position&lt;br /&gt;
**'''u16''' - DDS X Position (where the source image is positioned in the corresponding layer's star.dds.grp image)&lt;br /&gt;
**'''u16''' - DDS Y Position&lt;br /&gt;
**'''u16''' - Width&lt;br /&gt;
**'''u16''' - Height&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:StarCraft]]&lt;br /&gt;
[[Category:Reference]]&lt;br /&gt;
[[Category:Modding]]&lt;br /&gt;
[[Category:File Formats]]&lt;/div&gt;</summary>
		<author><name>FaRTy1billion</name></author>	</entry>

	<entry>
		<id>https://staredit.net/wiki/index.php?title=Font_File_Format_(Unencrypted)&amp;diff=692</id>
		<title>Font File Format (Unencrypted)</title>
		<link rel="alternate" type="text/html" href="https://staredit.net/wiki/index.php?title=Font_File_Format_(Unencrypted)&amp;diff=692"/>
				<updated>2023-06-01T18:23:31Z</updated>
		
		<summary type="html">&lt;p&gt;FaRTy1billion: Added File Formats category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''Specs based on Stormcoast Fortress specs.''&lt;br /&gt;
&lt;br /&gt;
*Word = 2 bytes&lt;br /&gt;
*Long = 4 bytes&lt;br /&gt;
&lt;br /&gt;
==File Header==&lt;br /&gt;
*Long - File type: always &amp;quot;FONT&amp;quot; (0x544E4F46)&lt;br /&gt;
*Byte - Low Index: First character in the file&lt;br /&gt;
*Byte - High Index: Last character&lt;br /&gt;
*Byte - Width: Maximum width of each letter&lt;br /&gt;
*Byte - Height: Maximum height of each letter&lt;br /&gt;
*n Longs - Offsets to each letter structure (starting with &amp;quot;Low Index&amp;quot;, ending with &amp;quot;High Index&amp;quot;. An offset of 0 means there is no image.)&lt;br /&gt;
&lt;br /&gt;
==Letter Header==&lt;br /&gt;
*byte - Width&lt;br /&gt;
*byte - Height&lt;br /&gt;
*byte - Initial X position&lt;br /&gt;
*byte - Y offset of the image&lt;br /&gt;
*n bytes - Compressed image data:&lt;br /&gt;
*bits 0-2 - Pixel Color (x And 7)&lt;br /&gt;
*bits 3-7 - Number of pixels to skip before writing the pixel ((x And 248)/8)&lt;br /&gt;
&lt;br /&gt;
[[Category:StarCraft]]&lt;br /&gt;
[[Category:Reference]]&lt;br /&gt;
[[Category:Modding]]&lt;br /&gt;
[[Category:File Formats]]&lt;/div&gt;</summary>
		<author><name>FaRTy1billion</name></author>	</entry>

	<entry>
		<id>https://staredit.net/wiki/index.php?title=Bin_Dialog_File_Format&amp;diff=691</id>
		<title>Bin Dialog File Format</title>
		<link rel="alternate" type="text/html" href="https://staredit.net/wiki/index.php?title=Bin_Dialog_File_Format&amp;diff=691"/>
				<updated>2023-06-01T18:23:16Z</updated>
		
		<summary type="html">&lt;p&gt;FaRTy1billion: Added File Formats category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*Byte = 8 bits&lt;br /&gt;
*Word = 2 bytes (Short)&lt;br /&gt;
*Long = 4 bytes&lt;br /&gt;
*All values are unsigned.&lt;br /&gt;
&lt;br /&gt;
Character String = number of characters + the NULL (0 value) string terminator (e.g. &amp;quot;test string&amp;quot; is 12 bytes)&lt;br /&gt;
&lt;br /&gt;
==Bin File Layout==&lt;br /&gt;
*Dialog Structs&lt;br /&gt;
*SMK Structs&lt;br /&gt;
*Character Strings&lt;br /&gt;
''Note that the file does not necessarily have to be in this order as long as all pointers are correct.''&lt;br /&gt;
&lt;br /&gt;
==Dialog Struct==&lt;br /&gt;
Struct Size: 86 bytes&lt;br /&gt;
&lt;br /&gt;
''The first entry in all .bin files is setting up the dialog area. The format of it is slightly different, such as the SMK offset becomes the offset to the first control.''&lt;br /&gt;
*00 - long - Next Entry Offset&lt;br /&gt;
*04 - word - Left Position&lt;br /&gt;
*06 - word - Top Position&lt;br /&gt;
*08 - word - Right Position&lt;br /&gt;
*0A - word - Bottom Position&lt;br /&gt;
*0C - word - Width&lt;br /&gt;
*0E - word - Height&lt;br /&gt;
*10 - long - Unknown/Unused&lt;br /&gt;
*14 - long - String Offset (String use depends on object type)&lt;br /&gt;
*18 - long - Flags (See Dialog Flags)&lt;br /&gt;
*1C - long - Unknown/Unused&lt;br /&gt;
*20 - word - Control Identifier (A unique number used within SC to identify the control and how it is used. Those familiar with .res files should understand this.)&lt;br /&gt;
*22 - long - Control Type (See Control Types)&lt;br /&gt;
*26 - long - Unknown/Unused&lt;br /&gt;
*2A - long - Unknown/Unused&lt;br /&gt;
*2E - long - Unknown/Unused&lt;br /&gt;
*32 - long - Unknown/Unused&lt;br /&gt;
*36 - word - Response Area Left/Area Width&lt;br /&gt;
*38 - word - Response Area Top /Area height&lt;br /&gt;
*3A - word - Response Area Right&lt;br /&gt;
*3C - word - Response Area Bottom&lt;br /&gt;
*3E - long - Unknown/Unused&lt;br /&gt;
*42 - long - SMK Offset&lt;br /&gt;
*46 - word - Text Offset X&lt;br /&gt;
*48 - word - Text Offset Y&lt;br /&gt;
*4A - word - Response Area Width&lt;br /&gt;
*4C - word - Response Area Height&lt;br /&gt;
*4E - long - Unknown/Unused&lt;br /&gt;
*52 - long - Unknown/Unused&lt;br /&gt;
&lt;br /&gt;
==SMK Struct==&lt;br /&gt;
Struct Size: 30 bytes&lt;br /&gt;
&lt;br /&gt;
*00 - long - SMK Overlay Offset&lt;br /&gt;
*04 - word - Flags (See SMK Flags)&lt;br /&gt;
*06 - long - Unknown/Unused&lt;br /&gt;
*0A - long - SMK Filename (String Offset)&lt;br /&gt;
*0E - long - Unknown/Unused&lt;br /&gt;
*12 - word - SMK Overlay X Position&lt;br /&gt;
*14 - word - SMK Overlay Y Position&lt;br /&gt;
*16 - long - Unknown/Unused&lt;br /&gt;
*1A - long - Unknown/Unused&lt;br /&gt;
&lt;br /&gt;
==Reference Lists==&lt;br /&gt;
===Flags===&lt;br /&gt;
*0x00000001 - Unknown 0&lt;br /&gt;
*0x00000002 - Disabled&lt;br /&gt;
*0x00000004 - Unknown 2&lt;br /&gt;
*0x00000008 - Visible&lt;br /&gt;
*0x00000010 - Responds to Events&lt;br /&gt;
*0x00000020 - Unknown 5&lt;br /&gt;
*0x00000040 - Cancel Button&lt;br /&gt;
*0x00000080 - No Hover Sound&lt;br /&gt;
*0x00000100 - Special Hotkey (Virtual Key)&lt;br /&gt;
*0x00000200 - Has Hotkey&lt;br /&gt;
*0x00000400 - Smallest Font (Size 10)&lt;br /&gt;
*0x00000800 - Larger Font (Size 16)&lt;br /&gt;
*0x00001000 - Unknown 12&lt;br /&gt;
*0x00002000 - Transparent (Hide Color 0)&lt;br /&gt;
*0x00004000 - Largest Font (Size 16x)&lt;br /&gt;
*0x00008000 - Unknown 15&lt;br /&gt;
*0x00010000 - Smaller Font (Size 14)&lt;br /&gt;
*0x00020000 - Unknown 17&lt;br /&gt;
*0x00040000 - Apply Translucency&lt;br /&gt;
*0x00080000 - Default Button&lt;br /&gt;
*0x00100000 - Bring to Front&lt;br /&gt;
*0x00200000 - Center Text&lt;br /&gt;
*0x00400000 - Align Right Text&lt;br /&gt;
*0x00800000 - Center Text&lt;br /&gt;
*0x01000000 - Align Top&lt;br /&gt;
*0x02000000 - Align Middle&lt;br /&gt;
*0x04000000 - Align Bottom&lt;br /&gt;
*0x08000000 - Unknown 27&lt;br /&gt;
*0x10000000 - Unknown 28&lt;br /&gt;
*0x20000000 - Unknown 29&lt;br /&gt;
*0x40000000 - No Click Sound&lt;br /&gt;
*0x80000000 - Unknown 31&lt;br /&gt;
&lt;br /&gt;
===SMK Flags===&lt;br /&gt;
*0x0001 - Fade In&lt;br /&gt;
*0x0002 - Dark&lt;br /&gt;
*0x0004 - Repeat Forever&lt;br /&gt;
*0x0008 - Show If Over&lt;br /&gt;
*0x0010 - Unknown 4&lt;br /&gt;
*(rest unknown/unused)&lt;br /&gt;
&lt;br /&gt;
===Control Types===&lt;br /&gt;
*0x00000000 - Dialog Box&lt;br /&gt;
*0x00000001 - Default Button&lt;br /&gt;
*0x00000002 - Button&lt;br /&gt;
*0x00000003 - Option Button&lt;br /&gt;
*0x00000004 - Check box&lt;br /&gt;
*0x00000005 - Image&lt;br /&gt;
*0x00000006 - Slider bar&lt;br /&gt;
*0x00000007 - Unknown/Unused&lt;br /&gt;
*0x00000008 - Text box&lt;br /&gt;
*0x00000009 - Label (Left align)&lt;br /&gt;
*0x0000000A - Label (Right align)&lt;br /&gt;
*0x0000000B - Label (Center align)&lt;br /&gt;
*0x0000000C - List box&lt;br /&gt;
*0x0000000D - Combo box&lt;br /&gt;
*0x0000000E - Button w/ Light-Up&lt;br /&gt;
&lt;br /&gt;
[[Category:StarCraft]]&lt;br /&gt;
[[Category:Reference]]&lt;br /&gt;
[[Category:Modding]]&lt;br /&gt;
[[Category:File Formats]]&lt;/div&gt;</summary>
		<author><name>FaRTy1billion</name></author>	</entry>

	<entry>
		<id>https://staredit.net/wiki/index.php?title=GRP_Image_Format&amp;diff=690</id>
		<title>GRP Image Format</title>
		<link rel="alternate" type="text/html" href="https://staredit.net/wiki/index.php?title=GRP_Image_Format&amp;diff=690"/>
				<updated>2023-06-01T18:22:55Z</updated>
		
		<summary type="html">&lt;p&gt;FaRTy1billion: Added File Formats category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*Byte = 8 bits&lt;br /&gt;
*Word = 2 bytes (Short)&lt;br /&gt;
*Long = 4 bytes&lt;br /&gt;
*All values are unsigned.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
==GRP File Layout==&lt;br /&gt;
*GRP Header&lt;br /&gt;
*Image Header * number of images&lt;br /&gt;
*Line Offsets * number of images * image height&lt;br /&gt;
*RLE Line * number of images * image height&lt;br /&gt;
&lt;br /&gt;
===GRP Header===&lt;br /&gt;
Struct Size: 6 bytes&lt;br /&gt;
*Word - number of images&lt;br /&gt;
*Word - maximum width&lt;br /&gt;
*Word - maximum height&lt;br /&gt;
*Image Headers - one header for each image&lt;br /&gt;
&lt;br /&gt;
===Image Header===&lt;br /&gt;
Struct Size: 8 bytes&lt;br /&gt;
*Byte - difference from maximum width (?)&lt;br /&gt;
*Byte - difference from maximum height (?)&lt;br /&gt;
*Byte - width (in pixels)&lt;br /&gt;
*Byte - height (in pixels)&lt;br /&gt;
*Long - offset to Line Offsets: the number of bytes from the beginning of the file to the offset for each line.&lt;br /&gt;
&lt;br /&gt;
===Line Offsets===&lt;br /&gt;
Struct Size: 2 bytes * image height&lt;br /&gt;
*Word - offset to a RLE Line in bytes from the location of this Line Offsets.&lt;br /&gt;
*Word - another offset...&lt;br /&gt;
*Word - another...&lt;br /&gt;
*Word - another...&lt;br /&gt;
*...&lt;br /&gt;
&lt;br /&gt;
===RLE Line===&lt;br /&gt;
*Byte - Instruction and length:&lt;br /&gt;
**if bit 7 is on, it indicates X number pixels are skipped aka transparency.&lt;br /&gt;
**if bit 6 is 1 indicates X number of pixels are &amp;quot;this&amp;quot; color. (RLE compression part)&lt;br /&gt;
**else X normal pixels should be copied over.&lt;br /&gt;
&lt;br /&gt;
eh... i got lazy, sorry. :/&lt;br /&gt;
&lt;br /&gt;
===Example Code===&lt;br /&gt;
 struct definitions&lt;br /&gt;
 struct grp_image_s&lt;br /&gt;
 {&lt;br /&gt;
  uint8_t  x_offset;&lt;br /&gt;
  uint8_t  y_offset;&lt;br /&gt;
  uint8_t  width;&lt;br /&gt;
  uint8_t  height;&lt;br /&gt;
  uint32_t offsets;&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 struct grp_header_s&lt;br /&gt;
 {&lt;br /&gt;
  uint16_t     num_images;&lt;br /&gt;
  uint16_t     max_width;&lt;br /&gt;
  uint16_t     max_height;&lt;br /&gt;
 }; &lt;br /&gt;
 &lt;br /&gt;
 struct color_s&lt;br /&gt;
 {&lt;br /&gt;
  uint8_t red;&lt;br /&gt;
  uint8_t green;&lt;br /&gt;
  uint8_t blue;&lt;br /&gt;
  uint8_t alpha;&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
read the whole file into sprite_data&lt;br /&gt;
 uint8_t sprite_data = new uint8_t[file_size_in_bytes];&lt;br /&gt;
&lt;br /&gt;
allocate a color_s for each pixel (for just one image)&lt;br /&gt;
 grp_header_s* gr_file_header = (grp_header_s*)sprite_data;&lt;br /&gt;
 color_s* pixels = new color_s[grp_file_header-&amp;gt;max_width *&lt;br /&gt;
                      grp_header-&amp;gt;max_height ];&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
decoding algo&lt;br /&gt;
 for (k = 0; k &amp;lt; num_images; ++k)&lt;br /&gt;
 {&lt;br /&gt;
   current_image = (grp_image_s*)(sprite_data + 6 + (k * sizeof(grp_image_s)));&lt;br /&gt;
   line_offsets = (uint16_t*)(sprite_data + current_image-&amp;gt;offsets);&lt;br /&gt;
 &lt;br /&gt;
   image_width  = current_image-&amp;gt;width;&lt;br /&gt;
   image_height = current_image-&amp;gt;height;&lt;br /&gt;
 &lt;br /&gt;
   memset(pixels, 0, grp_header-&amp;gt;size_x * grp_header-&amp;gt;size_y * sizeof(color_s));&lt;br /&gt;
 &lt;br /&gt;
   for (y = 0; y &amp;lt; image_height; ++y)&lt;br /&gt;
   {&lt;br /&gt;
     line_data   = (uint8_t*)line_offsets + line_offsets[y];&lt;br /&gt;
     line_pixels = pixels + (image_width * y);&lt;br /&gt;
     for (data_offset = x = 0; x &amp;lt; image_width;)&lt;br /&gt;
     {&lt;br /&gt;
       if (line_data[data_offset] &amp;amp; 0x80) // transparent&lt;br /&gt;
         {x += line_data[data_offset++] &amp;amp; 0x7f;}&lt;br /&gt;
       else if (line_data[data_offset] &amp;amp; 0x40)  // data run&lt;br /&gt;
       {&lt;br /&gt;
         length    = x + (line_data[data_offset++] &amp;amp; 0x3f);&lt;br /&gt;
         rle_index =      line_data[data_offset++];&lt;br /&gt;
         while (x &amp;lt; length) {line_pixels[x++] = palette[rle_index];}&lt;br /&gt;
       }&lt;br /&gt;
       else // normal&lt;br /&gt;
       {&lt;br /&gt;
         for (length = x + line_data[data_offset++]; x &amp;lt; length;)&lt;br /&gt;
           {line_pixels[x++] = palette[line_data[data_offset++]];}&lt;br /&gt;
       }&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   COPY pixels TO ANOTHER PLACE&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
[[Category:StarCraft]]&lt;br /&gt;
[[Category:Reference]]&lt;br /&gt;
[[Category:Modding]]&lt;br /&gt;
[[Category:File Formats]]&lt;/div&gt;</summary>
		<author><name>FaRTy1billion</name></author>	</entry>

	<entry>
		<id>https://staredit.net/wiki/index.php?title=Scenario.chk&amp;diff=689</id>
		<title>Scenario.chk</title>
		<link rel="alternate" type="text/html" href="https://staredit.net/wiki/index.php?title=Scenario.chk&amp;diff=689"/>
				<updated>2023-06-01T18:22:32Z</updated>
		
		<summary type="html">&lt;p&gt;FaRTy1billion: Added File Formats category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The CHK file is a very dense file found inside the SCM or SCX file (as &amp;quot;staredit\scenario.chk&amp;quot;), which is just a renamed MPQ archive.&lt;br /&gt;
&lt;br /&gt;
In this article, some shorthand will be used for datatypes:&lt;br /&gt;
* '''u8''' for an unsigned byte&lt;br /&gt;
* '''u16''' for an unsigned short (2-byte integer)&lt;br /&gt;
* '''u32''' for an unsigned int (4-byte integer)&lt;br /&gt;
* '''uT[''a'']''' for an array of datatype '''T''' (8, 16, 32) with '''''a''''' number of elements&lt;br /&gt;
* '''uT[''a''][''b'']''' for a two-dimensional array of datatype '''T''', where each element of '''T[''a'']''' will be an array of size '''''b'''''&lt;br /&gt;
&lt;br /&gt;
=Sections=&lt;br /&gt;
The CHK is split into several named chunks (hence the file extension, an abbreviation of ''CHunK'').&lt;br /&gt;
&lt;br /&gt;
Each section begins with an 8-byte header:&lt;br /&gt;
* '''u32''' Name - A 4-byte string uniquely identifying that chunk's purpose.&lt;br /&gt;
* '''u32''' Size - The size, in bytes, of the chunk (not including this header)&lt;br /&gt;
Followed by as many bytes as 'Size', in a format described below.&lt;br /&gt;
&lt;br /&gt;
Some things to keep in mind about the CHK section:&lt;br /&gt;
* Invalid sections can exist and will be ignored. While Size is unsigned, it can safely be a negative value to read a chunk earlier in the file. This allows for &amp;quot;section stacking&amp;quot;, allowing smaller sections to be placed inside of larger ones or duplicate triggers or units to take less space in the file.&lt;br /&gt;
* All sections will marked &amp;quot;Not required.&amp;quot; are never read by StarCraft and can safely be omitted. However they may or may not be read by StarEdit, and may cause the map to be unreadable in an editor.&lt;br /&gt;
* Note &amp;quot;Hybrid&amp;quot;, or &amp;quot;Enhanced&amp;quot;, maps were introduced in 1.04. They are supported both by Original StarCraft and Brood War and usually contain sections for both types (e.g., UPGS and UPGx, TECS and TECx), but both sections aren't necessarily read.&lt;br /&gt;
* Duplicate sections will overwrite previously defined section data, except where noted. Note this only applies to those section that pass the specified &amp;quot;validation&amp;quot; parameters, as any section that does not successfully validate will be ignored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TYPE&amp;quot; - Map Type==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the type of scenario.&lt;br /&gt;
* '''u32''': Specifies the type of scenario:&lt;br /&gt;
** '''0x53574152''' or '''RAWS''' - 1.04 StarCraft and above (&amp;quot;hybrid&amp;quot;)&lt;br /&gt;
** '''0x42574152''' or '''RAWB''' - Brood War&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;VER &amp;quot; - Format Version==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section identifies the file format version.&lt;br /&gt;
* '''u16''': File format version:&lt;br /&gt;
** '''59''' - Starcraft 1.00 (original retail release)&lt;br /&gt;
** '''63''' - Starcraft 1.04 ''(hybrid)''&lt;br /&gt;
** '''64''' - Starcraft Remastered (1.21) ''(hybrid)''&lt;br /&gt;
** '''205''' - Brood War 1.00 ''(1.04)''&lt;br /&gt;
** '''206''' - Starcraft Remastered (1.21) ''(broodwar)''&lt;br /&gt;
This is the only version code section to actually be read by StarCraft (of TYPE, VER , IVER, and IVE2). Any other value is invalid in retail StarCraft and is usually a beta version.&lt;br /&gt;
&lt;br /&gt;
Other unsupported versions include:&lt;br /&gt;
* '''17''' - ''Warcraft II retail (.PUD)''&lt;br /&gt;
* '''19''' - ''Warcraft II Expansion (.PUD)''&lt;br /&gt;
* '''47''' - ''Starcraft Beta''&lt;br /&gt;
* '''57''' - ''Starcraft Prerelease''&lt;br /&gt;
* '''61''' - Brood War internal (map version 61)&lt;br /&gt;
* '''75''' - Brood War internal (map version 75) ''(Broodwar Battle.net Beta)''&lt;br /&gt;
* '''201''' - Brood War internal (map version 201)&lt;br /&gt;
* '''203''' - Brood War internal (map version 203)&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IVER&amp;quot; - Map Version==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section &amp;quot;additionally identifies&amp;quot; the map version.&lt;br /&gt;
* '''u16''': &amp;quot;Additional file format version:&amp;quot;&lt;br /&gt;
** '''9''' - beta/obsolete versions&lt;br /&gt;
** '''10''' - current versions&lt;br /&gt;
When saving as expansion this section gets removed entirely. Contrary to popular belief, it doesn't get &amp;quot;replaced&amp;quot; by IVE2 in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IVE2&amp;quot; - Map Version==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section &amp;quot;additionally identifies&amp;quot; the map version.&lt;br /&gt;
* '''u16''': &amp;quot;Additional file format version:&amp;quot;&lt;br /&gt;
** '''11''' - 1.04 StarCraft and above (&amp;quot;hybrid&amp;quot;) or Brood War.&lt;br /&gt;
This section does not &amp;quot;replace&amp;quot; IVER in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;VCOD&amp;quot; - Verification Code==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be equal to size of the VCOD data in the EXE resource. Must result in valid checksum.''&lt;br /&gt;
&lt;br /&gt;
This section has a verification code to make sure this is actually a CHK file.&lt;br /&gt;
&lt;br /&gt;
* '''u32[256]''': Seed values.&lt;br /&gt;
* '''u8[16]''': Operation codes to produce the resulting hash:&lt;br /&gt;
** '''00''' - XOR's the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''01''' - Adds to the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''02''' - Subtracts from the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''03''' - XOR's the current hash with the VCOD table at index OWNR, SIDE, FORC, and 0&lt;br /&gt;
** '''04''' - same as 0x03&lt;br /&gt;
** '''05''' - same as 0x03&lt;br /&gt;
** '''06''' - Complex function consisting of ORs and shifts&lt;br /&gt;
** '''07''' - Inverted version of 0x06, switching direction of all shifts&lt;br /&gt;
** '''08+''' - Do nothing&lt;br /&gt;
Opcodes and seeds do not have to match those in EXE resource, as long as the same value is produced.&amp;lt;br&amp;gt;&lt;br /&gt;
The only indexes in the seed table that are referenced are those that correspond individual values of [[#&amp;quot;OWNR&amp;quot; - StarCraft Player Types|OWNR]], [[#&amp;quot;SIDE&amp;quot; - Player Races|SIDE]], [[#&amp;quot;FORC&amp;quot; - Force Settings|FORC]] player assignments, and index 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IOWN&amp;quot; - StarEdit Player Types==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the owner of each player.&lt;br /&gt;
* '''u8[12]''': One byte for each player, specifies the owner of the player:&lt;br /&gt;
** '''00''' - Inactive&lt;br /&gt;
** ''01'' - Computer (game)&lt;br /&gt;
** ''02'' - Occupied by Human Player&lt;br /&gt;
** '''03''' - Rescue Passive&lt;br /&gt;
** '''04''' - Unused&lt;br /&gt;
** '''05''' - Computer&lt;br /&gt;
** '''06''' - Human (Open Slot)&lt;br /&gt;
** '''07''' - Neutral&lt;br /&gt;
** ''08'' - Closed slot&lt;br /&gt;
This section is separate from OWNR as a staredit value. Staredit does not display &amp;quot;inactive&amp;quot; as a valid option. Italicized settings denote invalid map options, which may involve a buffer overflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;OWNR&amp;quot; - StarCraft Player Types==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 12 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section designates the controller of a particular player. It is exactly the same as the &amp;quot;IOWN&amp;quot; section, except there is an additional value, 0x00 for Inactive.&lt;br /&gt;
* '''u8[12]''': One byte for each player, specifies the owner of the player:&lt;br /&gt;
** '''00''' - Inactive&lt;br /&gt;
** ''01'' - Computer (game)&lt;br /&gt;
** ''02'' - Occupied by Human Player&lt;br /&gt;
** '''03''' - Rescue Passive&lt;br /&gt;
** '''04''' - Unused&lt;br /&gt;
** '''05''' - Computer&lt;br /&gt;
** '''06''' - Human (Open Slot)&lt;br /&gt;
** '''07''' - Neutral&lt;br /&gt;
** ''08'' - Closed slot&lt;br /&gt;
Italicized settings denote invalid map options, which may involve a buffer overflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;ERA &amp;quot; - Tileset==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section indicates the tileset of the scenario.&lt;br /&gt;
* '''u16''': Designates tileset:&lt;br /&gt;
** '''00''' - Badlands&lt;br /&gt;
** '''01''' - Space Platform&lt;br /&gt;
** '''02''' - Installation&lt;br /&gt;
** '''03''' - Ashworld&lt;br /&gt;
** '''04''' - Jungle&lt;br /&gt;
** '''05''' - Desert&lt;br /&gt;
** '''06''' - Arctic&lt;br /&gt;
** '''07''' - Twilight&lt;br /&gt;
StarCraft masks the tileset indicator's bit value, so bits after the third place (anything after the value &amp;quot;7&amp;quot;) are removed. Thus, 9 (1001 in binary) is interpreted as 1 (0001), 10 (1010) as 2 (0010), etc.&amp;lt;br&amp;gt;&lt;br /&gt;
Desert, Arctic, and Twilight are Brood War-only tilesets.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;DIM &amp;quot; - Map Dimensions==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains the dimensions of the map.&lt;br /&gt;
* '''u16''': Width of the map&lt;br /&gt;
* '''u16''': Height of the map&lt;br /&gt;
The Width/Height of the map is measured in the number of square 32x32p tiles.&amp;lt;br&amp;gt;&lt;br /&gt;
Standard Dimensions are 64, 96, 128, 192, and 256.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SIDE&amp;quot; - Player Races==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 12 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains the species/race of each player.&lt;br /&gt;
* '''u8[12]''': 1 byte per player the species of that player:&lt;br /&gt;
** '''00''' - Zerg&lt;br /&gt;
** '''01''' - Terran&lt;br /&gt;
** '''02''' - Protoss&lt;br /&gt;
** ''03'' - Invalid (Independent), shown as &amp;quot;Unknown&amp;quot; in SC:R lobby&lt;br /&gt;
** ''04'' - Invalid (Neutral), shown as &amp;quot;Unknown&amp;quot;&lt;br /&gt;
** '''05''' - User Select&lt;br /&gt;
** '''06''' - Random (Forced; Acts as a selected race)&lt;br /&gt;
** ''07'' - Inactive, shown as locked &amp;quot;Select Race&amp;quot; option in SC:R lobby&lt;br /&gt;
Italicized settings denote invalid map options. Note Players 9-11 are defaultly Inactive and Player 12 is defaultly Neutral.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MTXM&amp;quot; - StarCraft Terrain==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be less than or equal to 131072 (0x20000) bytes (256 * 256 * 2).''&lt;br /&gt;
&lt;br /&gt;
Terrain section that contains a map of the level's appearance. StarEdit disregards this section and instead uses [[#&amp;quot;TILE&amp;quot; - StarEdit Terrain|TILE]]; it is only used in Starcraft.&lt;br /&gt;
* '''u16[map width * height]''': one integer for each tile.&lt;br /&gt;
Notes about MTXM:&lt;br /&gt;
* The Width/Height of the map is measured in the number of square 32x32p tiles.&lt;br /&gt;
* Tiles in this section are listed from left to right, top to bottom.&lt;br /&gt;
* The values for each integer are their respective &amp;quot;MegaTile&amp;quot; values in the scenario's tileset. If the size of this section is greater than width*height*2, the data following is ignored. If the size of this section is less, the resulting tiles that have not been defined will be null tiles.&lt;br /&gt;
* This section includes doodads as terrain; TILE, which is otherwise identical, doesn't. Out of the terrain sections (TILE, ISOM, and MTXM), SC only reads MTXM for the sake of not having to generate this data on-the-fly: it contains the exact representation of the level's appearance, including doodads. TILE, on the other hand, is directly tied via a tile lookup function to ISOM, and exists for the sake of not having to generate tiles from ISOM on-the-fly in StarEdit.&lt;br /&gt;
* If MTXM section is smaller than (map width*height), then the remaining tiles will be filled with null tiles or tiles specified by previous MTXM sections.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PUNI&amp;quot; - Player Unit Restrictions==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 5700 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains player unit restrictions: it indicates whether the player can or cannot build a particular unit.&lt;br /&gt;
* '''u8[228][12]''': 1 byte for each unit in order of its unit id, then each player, for player availability:&lt;br /&gt;
** '''00''' - That unit is not available for production if the player has 'override defaults' on&lt;br /&gt;
** '''01''' - That unit is available for production if the player has 'override defaults' on&lt;br /&gt;
* '''u8[228]''': 1 byte for each unit in order of it's unit id, for global availability defaults (for all players):&lt;br /&gt;
** '''00''' - That unit is not available for production&lt;br /&gt;
** '''01''' - That unit is available for production&lt;br /&gt;
* '''u8[228][12]''': 1 byte for each unit in order of its unit id, then each player, indicating whether a player uses the global availability defaults.&lt;br /&gt;
** '''00''' - Player overrides defaults for this unit&lt;br /&gt;
** '''01''' - Player uses defaults for this unit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGR&amp;quot; - Upgrade Restrictions==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1748 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;PUPx&amp;quot; - BW Upgrade Restrictions|&amp;quot;PUPx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains player upgrade restrictions: it indicates the starting/maximum levels at/to which a player can perform a particular upgrade.&lt;br /&gt;
* '''u8[46][12]''': 1 byte for the maximum level a player can upgrade to, in order of its upgrade id, then each player&lt;br /&gt;
* '''u8[46][12]''': 1 byte for the level of an upgrade a player starts off with, in order of its upgrade id, then each player&lt;br /&gt;
* '''u8[46]''': 1 byte for the global default maximum level of each upgrade, in order of its upgrade id.&lt;br /&gt;
* '''u8[46]''': 1 byte for the global default starting level of each upgrade, in order of its upgrade id.&lt;br /&gt;
* '''u8[46][12]''': 1 byte for each upgrade in order of its upgrade id, then each player, indicating whether a player uses the global upgrade defaults:&lt;br /&gt;
** '''00''' - Player does not use global upgrade defaults for this upgrade&lt;br /&gt;
** '''01''' - Player uses upgrade defaults for this upgrade&lt;br /&gt;
See [[#List of Upgrade IDs]].&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PTEC&amp;quot; - Tech Restrictions==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 912 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;PTEx&amp;quot; - BW Tech Restrictions|&amp;quot;PTEx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains player technology availability restrictions: it indicates whether a player starts off with a particular technology or can research a particular technology.&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology id, then each player, for player availability:&lt;br /&gt;
** '''00''' - Technology is not available for a player&lt;br /&gt;
** '''01''' - Technology is available for a player&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology id, then each player, for &amp;quot;already researched&amp;quot; status:&lt;br /&gt;
** '''00''' - Technology is not already researched&lt;br /&gt;
** '''01''' - Technology is already researched&lt;br /&gt;
* '''u8[24]''': 1 byte for each technology for global availability defaults:&lt;br /&gt;
** '''00''' - Technology is not available by default&lt;br /&gt;
** '''01''' - Technology is available by default&lt;br /&gt;
* '''u8[24]''': 1 byte for each technology for global &amp;quot;already researched&amp;quot; defaults:&lt;br /&gt;
** '''00''' - Technology is not already researched by default&lt;br /&gt;
** '''01''' - Technology is already researched by default&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology in order of its technology id, then each player, indicating whether a player uses the global defaults:&lt;br /&gt;
** '''00''' - Technology overrides defaults for player&lt;br /&gt;
** '''01''' - Technology uses default settings for player&lt;br /&gt;
See [[#List of Technology IDs]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIT&amp;quot; - Placed Units==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 36 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the pre-placed units on the map and their properties. Each unit on the map gets the following structure:&lt;br /&gt;
* '''u32''': The unit's class instance (sort of a &amp;quot;serial number&amp;quot;)&lt;br /&gt;
* U16''': X coordinate of unit&lt;br /&gt;
* U16''': Y coordinate of unit&lt;br /&gt;
* '''u16''': Unit ID&lt;br /&gt;
* '''u16''': Type of relation to another building (i.e. add-on, nydus link)&lt;br /&gt;
** '''Bit 9''' - Addon Link&lt;br /&gt;
** '''Bit 10''' - Nydus Link&lt;br /&gt;
* '''u16''': Flags of special properties which can be applied to the unit and are valid:&lt;br /&gt;
** '''Bit 0''' - Cloak is valid&lt;br /&gt;
** '''Bit 1''' - Burrow is valid&lt;br /&gt;
** '''Bit 2''' - In transit is valid&lt;br /&gt;
** '''Bit 3''' - Hallucinated is valid&lt;br /&gt;
** '''Bit 4''' - Invincible is valid&lt;br /&gt;
** '''Bit 5-15''' - Unused&lt;br /&gt;
* '''u16''': Out of the elements of the unit data, the properties which can be changed by the map maker:&lt;br /&gt;
** '''Bit 0''' - Owner player is valid (the unit is not a critter, start location, etc.; not a neutral unit)&lt;br /&gt;
** '''Bit 1''' - HP is valid&lt;br /&gt;
** '''Bit 2''' - Shields is valid&lt;br /&gt;
** '''Bit 3''' - Energy is valid (unit is a wraith, etc.)&lt;br /&gt;
** '''Bit 4''' - Resource amount is valid (unit is a mineral patch, vespene geyser, etc.)&lt;br /&gt;
** '''Bit 5''' - Amount in hangar is valid (unit is a reaver, carrier, etc.)&lt;br /&gt;
** '''Bit 6-15''' - Unused&lt;br /&gt;
* '''u8''': Player number of owner (0-based)&lt;br /&gt;
* '''u8''': Hit points % (1-100)&lt;br /&gt;
* '''u8''': Shield points % (1-100)&lt;br /&gt;
* '''u8''': Energy points % (1-100)&lt;br /&gt;
* '''u32''': Resource amount&lt;br /&gt;
* '''u16''': Number of units in hangar&lt;br /&gt;
* '''u16''': Unit state flags&lt;br /&gt;
** '''Bit 0''' - Unit is cloaked&lt;br /&gt;
** '''Bit 1''' - Unit is burrowed&lt;br /&gt;
** '''Bit 2''' - Building is in transit&lt;br /&gt;
** '''Bit 3''' - Unit is hallucinated&lt;br /&gt;
** '''Bit 4''' - Unit is invincible&lt;br /&gt;
** '''Bit 5-15''' - Unused&lt;br /&gt;
* '''u32''': Unused&lt;br /&gt;
* '''u32''': Class instance of the unit to which this unit is related to (i.e. via an add-on, nydus link, etc.). It is &amp;quot;0&amp;quot; if the unit is not linked to any other unit.&lt;br /&gt;
Notes about UNIT:&lt;br /&gt;
* The X/Y coordinates are the center of the sprite of the unit (in pixels).&lt;br /&gt;
* Please edit if you could confirm the bit values to be correct/if you know more bit values.&lt;br /&gt;
* Default values will apply if bit values are unchecked. Defaults: 100% HP, 100% SP, 100% EP, 0 resources, 0 hangar count.&lt;br /&gt;
* This section can be split. Additional UNIT sections will add more units.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;ISOM&amp;quot; - Isometric Terrain==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section is required to place isometric terrain on the map. It provides data about the nature of the isometric &amp;quot;diamonds&amp;quot; (the editing mode of StarEdit).&lt;br /&gt;
* '''u16[ (width / 2 + 1) * (height + 1) * 4 ]''': 4 integers for each 2x1 map rectangle tile (plus one extra tile to the right and bottom of the map), as per the RECT structure. Each rectangle border (left, top, right, bottom) is assigned an &amp;quot;ISOM value.&amp;quot; These form the &amp;quot;diamond&amp;quot; pattern of the map, and each rectangle thus gets two ISOM values associated with it. The index of the rectangle's right tile is that of its left tile + 16.&lt;br /&gt;
** '''Bit 0''' (0x0001) - Flag used by the editor (&amp;quot;Edited&amp;quot;?)&lt;br /&gt;
** '''Bit 1-3''' - Determines the position on the ISOM grid for the given tile edge. Each diamond covers four 2x1 map tiles, so each tile therefore has two edges per diamond.&lt;br /&gt;
*** '''0''' (0x0000) - Top Left tile horizontal edge. Also the default value upon map creation for all tiles and directions.&lt;br /&gt;
*** '''1''' (0x0002) - Top Left tile vertical edge&lt;br /&gt;
*** '''2''' (0x0004) - Top Right tile horizontal edge&lt;br /&gt;
*** '''3''' (0x0006) - Top Right tile vertical edge&lt;br /&gt;
*** '''4''' (0x0008) - Bottom Right tile horizontal edge&lt;br /&gt;
*** '''5''' (0x000A) - Bottom Right tile vertical edge&lt;br /&gt;
*** '''6''' (0x000C) - Bottom Left tile vertical edge&lt;br /&gt;
*** '''7''' (0x000E) - Bottom Left tile horizontal edge&lt;br /&gt;
** '''Bit 4-14''' - ISOM terrain type ID, used to determine what type of terrain is on that edge. This value matches the corresponding edge on the adjacent tile. The ID is related to the CV5 Index, but the actual value is determined by a hardcoded lookup table in the editor. A value of 0 is for square terrain in StarEdit.&lt;br /&gt;
** '''Bit 15''' (0x8000) - Flag used by the editor (&amp;quot;Skipped&amp;quot;?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ISOM_Grid_Values.png]]&lt;br /&gt;
&lt;br /&gt;
First 1 in each value is the terrain type ID (1 for dirt), second digit is the ISOM edge ID. Values inside the diamond are associated with that diamond, values outside are associated with the adjacent diamonds on the ISOM grid.  This arrangement of tiles is tiled across the entire map, forming the full ISOM grid.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TILE&amp;quot; - StarEdit Terrain==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section will only be different from the [[#&amp;quot;MTXM&amp;quot; - StarCraft Terrain|MTXM]] section in tiles where doodads are present.&lt;br /&gt;
* '''u16[ map width * height ]''': 1 integer for each map tile. Moves horizontally across the map.&lt;br /&gt;
The values in TILE are normally directly generated from the ISOM section (see &amp;quot;'ISOM' section&amp;quot; above), and thus do not match that of MTXM on doodad tiles.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;DD2 &amp;quot; - StarEdit Sprites (Doodads)==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section contains the doodad map of the level. There are several parts to doodads. The graphical portion is stored in the [[#&amp;quot;MTXM&amp;quot; - StarCraft Terrain|MTXM]] section. The second part of the doodad is stored in this section. This section is only used by the map editor.&lt;br /&gt;
&lt;br /&gt;
Each doodad in the map gets the following structure:&lt;br /&gt;
* '''u16''': Number of the doodad. Size of the doodad is dependent on this. Doodads are different for each tileset.&lt;br /&gt;
* '''u16''': X coordinate of the doodad unit&lt;br /&gt;
* '''u16''': Y coordinate of the doodad unit&lt;br /&gt;
* '''u8''': Player number that owns the doodad&lt;br /&gt;
* '''u8''': Enabled flag&lt;br /&gt;
** '''00''' - Doodad is enabled (trap can attack, door is closed, etc)&lt;br /&gt;
** '''01''' - Doodad is disabled&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;THG2&amp;quot; - StarCraft Sprites==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 10 bytes.''&lt;br /&gt;
&lt;br /&gt;
The map editor only writes to this section. Starcraft uses this section.&lt;br /&gt;
&lt;br /&gt;
Sprites, usually on doodads, get the following structure.&lt;br /&gt;
* '''u16''': Unit/Sprite number of the sprite&lt;br /&gt;
* '''u16''': X coordinate of the doodad unit&lt;br /&gt;
* '''u16''': Y coordinate of the doodad unit&lt;br /&gt;
* '''u8''': Player number that owns the doodad&lt;br /&gt;
* '''u8''': Unused&lt;br /&gt;
* '''u16''': Flags&lt;br /&gt;
** '''Bit 0-11''' - Unused&lt;br /&gt;
** '''Bit 12''' - Draw as sprite (Determines if it is a sprite or a unit sprite)&lt;br /&gt;
** '''Bit 13''' - Unused&lt;br /&gt;
** '''Bit 14''' - Unused&lt;br /&gt;
** '''Bit 15''' - Disabled (Only valid if Draw as sprite is unchecked, disables the unit)&lt;br /&gt;
This section can be split. Additional THG2 sections will add more sprites.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MASK&amp;quot; - Fog of War Layer==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: This section will always validate.''&lt;br /&gt;
&lt;br /&gt;
This section contains the data on fog of war for each player. This is whether at the start of the game that levels of black space that is available.&lt;br /&gt;
* '''u8[ map width * height ]''': One byte for each map tile. The bits indicate for each player the fog of war.&lt;br /&gt;
** '''Bit 0''' - Player 1's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 1''' - Player 2's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 2''' - Player 3's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 3''' - Player 4's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 4''' - Player 5's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 5''' - Player 6's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 6''' - Player 7's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 7''' - Player 8's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
Any size greater than width*height will be ignored. Any size less will default missing tiles to 0xFF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;STR &amp;quot; - String Data==&lt;br /&gt;
''Required for all versions and all game types (or STRx).''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be at least 1 byte.''&lt;br /&gt;
&lt;br /&gt;
Note, since StarCraft Remastered, the &amp;quot;STRx&amp;quot; section is also possible and it optionally replaces the STR section.&lt;br /&gt;
&lt;br /&gt;
Note, the encoding of text in the STR section is unspecified. Common encodings are CP-1252, CP-949, and later, UTF-8, (but anything is possible)&lt;br /&gt;
&lt;br /&gt;
This section contains all the strings in the map.&lt;br /&gt;
* '''u16''': Number of strings in the section (Default''': 1024)&lt;br /&gt;
* '''u16[Number of strings]''': 1 integer for each string specifying the offset (the spot where the string starts in the section from the start of it).&lt;br /&gt;
* '''Strings''': After the offsets, this is where every string in the map goes, one after another. Each one is terminated by a null character.&lt;br /&gt;
This section can contain more or less then 1024 string offsests and will work in Starcraft.&amp;lt;br&amp;gt;&lt;br /&gt;
By default the first byte in '''Strings''' is a NUL character, and all unused offsets in the STR section point to this NUL character.&lt;br /&gt;
Note that STR sections can be stacked in a similar fashion as MTXM.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;STRx&amp;quot; - String Data==&lt;br /&gt;
''Required for all versions and all game types (or STR)''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be at least 1 byte (assumed, not confirmed).''&lt;br /&gt;
&lt;br /&gt;
Note, the STR section can also exist and optionally replace the STRx section.&lt;br /&gt;
&lt;br /&gt;
Note, the encoding of text in the STRx section is unspecified. Commonly it is UTF-8 but anything is possible.&lt;br /&gt;
&lt;br /&gt;
The STRx section is a simple bit extension to the STR section introduced in StarCraft Remastered.&lt;br /&gt;
&lt;br /&gt;
This section contains all the strings in the map.&lt;br /&gt;
* '''u32''': Number of strings in the section (Default''': 1024)&lt;br /&gt;
* '''u32[Number of strings]''': 1 integer for each string specifying the offset (the spot where the string starts in the section from the start of it).&lt;br /&gt;
* '''Strings''': After the offsets, this is where every string in the map goes, one after another. Each one is terminated by a null character.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPRP&amp;quot; - CUWP Slots==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1280 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section is used whenever the create units with properties trigger is used. Since a slot has to be assigned to the action, this is where each slot is designated.&lt;br /&gt;
&lt;br /&gt;
There are 64 of the following structures regardless of how many are used and it cannot exceed 64.&lt;br /&gt;
* '''u16''': Flag of which special properties can be applied to unit, and are valid.&lt;br /&gt;
** '''Bit 0''' - Cloak bit is valid&lt;br /&gt;
** '''Bit 1''' - Burrowed bit is valid&lt;br /&gt;
** '''Bit 2''' - In transit bit is valid&lt;br /&gt;
** '''Bit 3''' - Hallucinated bit is valid&lt;br /&gt;
** '''Bit 4''' - Invincible bit is valid&lt;br /&gt;
** '''Bit 5-15''' - Unknown/unused&lt;br /&gt;
* '''u16''': Which elements of the unit data are valid, which properties can be changed by the map maker.&lt;br /&gt;
** '''Bit 0''' - Owner player is valid (unit is not neutral)&lt;br /&gt;
** '''Bit 1''' - HP is valid&lt;br /&gt;
** '''Bit 2''' - Shields is valid&lt;br /&gt;
** '''Bit 3''' - Energy is valid&lt;br /&gt;
** '''Bit 4''' - Resource amount is valid (unit is a resource)&lt;br /&gt;
** '''Bit 5''' - Amount in hanger is valid&lt;br /&gt;
** '''Bit 6''' - Unknown/unused&lt;br /&gt;
* '''u8''': Player number that owns unit. Will always be NULL in this section (0)&lt;br /&gt;
* '''u8''': Hit point % (1-100)&lt;br /&gt;
* '''u8''': Shield point % (1-100)&lt;br /&gt;
* '''u8''': Energy point % (1-100)&lt;br /&gt;
* '''u32''': Resource amount (for resources only)&lt;br /&gt;
* '''u16''': # of units in hangar&lt;br /&gt;
* '''u16''': Flags&lt;br /&gt;
** '''Bit 0''' - Unit is cloaked&lt;br /&gt;
** '''Bit 1''' - Unit is burrowed&lt;br /&gt;
** '''Bit 2''' - Building is in transit&lt;br /&gt;
** '''Bit 3''' - Unit is hallucinated&lt;br /&gt;
** '''Bit 4''' - Unit is invincible&lt;br /&gt;
** '''Bit 5-15''' - Unknown/unused&lt;br /&gt;
* '''u32''': Unknown/unused. Padding?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPUS&amp;quot; - CUWP Slots Used==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section goes along with the &amp;quot;UPRP&amp;quot; section. This section just indicates which of the 64 unit properties slot are used.&lt;br /&gt;
* '''u8[64]''': 1 byte for each trigger unit properties slot&lt;br /&gt;
** '''00''' - Properties slot is unused&lt;br /&gt;
** '''01''' - Properties slot is used&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MRGN&amp;quot; - Locations==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: 1280 bytes for retail, 5100 bytes for Hybrid and Broodwar.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the locations that the map uses. In a vanilla map, this section contains 64 locations. In a Hybrid or Brood War map, this section will expand to contain 255 locations.&lt;br /&gt;
&lt;br /&gt;
Each location gets one of the following location entries. The 'Anywhere' location, is ALWAYS location 64.&lt;br /&gt;
* '''u32''': Left (X1) coordinate of location, in pixels (usually 32 pt grid aligned)&lt;br /&gt;
* '''u32''': Top (Y1) coordinate of location, in pixels&lt;br /&gt;
* '''u32''': Right (X2) coordinate of location, in pixels&lt;br /&gt;
* '''u32''': Bottom (Y2) coordinate of location, in pixels&lt;br /&gt;
* '''u16''': String number of the name of this location&lt;br /&gt;
* '''u16''': Location elevation flags. If an elevation is disabled in the location, it's bit will be on (1)&lt;br /&gt;
** '''Bit 0''' - Low elevation&lt;br /&gt;
** '''Bit 1''' - Medium elevation&lt;br /&gt;
** '''Bit 2''' - High elevation&lt;br /&gt;
** '''Bit 3''' - Low air&lt;br /&gt;
** '''Bit 4''' - Medium air&lt;br /&gt;
** '''Bit 5''' - High air&lt;br /&gt;
** '''Bit 6-15''' - Unused&lt;br /&gt;
Note that in typical locations Right is always larger than Left and Bottom is always larger than Top. However, you can reverse one or both of these for [[Inverted Locations]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TRIG&amp;quot; - Triggers==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 2400 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the triggers in the map. This along with [[#&amp;quot;MBRF&amp;quot; - Mission Briefings|MBRF]] is the most complicated section in the entire scenario.chk file as there is a lot of data packed into too little of a space. Refer to the appendix at the bottom of this page for more information.&lt;br /&gt;
For easy reference, since each trigger contains 2400 bytes, the amount of triggers can be gotten by taking the section length and dividing by 2400.&lt;br /&gt;
Every single trigger in the map will have the following format:&lt;br /&gt;
* 16 Conditions (20 byte struct)&amp;lt;br&amp;gt; Every trigger has 16 of the following format, even if only one condition is used. See the appendix for information on which items are used for what conditions.&lt;br /&gt;
** '''u32''': Location number for the condition (1 based -- 0 refers to No Location), EUD Bitmask for a Death condition if the MaskFlag is set to &amp;quot;SC&amp;quot;&lt;br /&gt;
** '''u32''': [[#List of Players/Group IDs|Group]] that the condition applies to&lt;br /&gt;
** '''u32''': Qualified number (how many/resource amount)&lt;br /&gt;
** '''u16''': [[#Trigger Unit Types|Unit ID]] condition applies to&lt;br /&gt;
** '''u8''': [[#Numeric Comparisons|Numeric comparison]], [[#Switch States|switch state]]&lt;br /&gt;
** '''u8''': [[#Trigger Conditions List|Condition byte]]&lt;br /&gt;
** '''u8''': [[#Resource Types|Resource type]], [[#Score Types|score type]], Switch number (0-based)&lt;br /&gt;
** '''u8''': Flags&lt;br /&gt;
*** '''Bit 0''' - Unknown/unused&lt;br /&gt;
*** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled/ignored&lt;br /&gt;
*** '''Bit 2''' - Always display flag.&lt;br /&gt;
*** '''Bit 3''' - Unit properties is used. ('''Note:''' This is used in [[TRG|*.trg]] files)&lt;br /&gt;
*** '''Bit 4''' - Unit type is used. Cleared in &amp;quot;Offset + Mask&amp;quot; EUD conditions. May not be necessary otherwise?&lt;br /&gt;
*** '''Bit 5-7''' - Unknown/unused&lt;br /&gt;
** '''u16''': MaskFlag: set to &amp;quot;SC&amp;quot; (0x53, 0x43) when using the bitmask for EUDs, 0 otherwise&lt;br /&gt;
* 64 Actions (32 byte struct)&amp;lt;br&amp;gt; Immediately following the 16 conditions, there are 64 actions. There will always be 64 of the following structure, even if some of them are unused.&lt;br /&gt;
** '''u32''': Location - source location in &amp;quot;Order&amp;quot; and &amp;quot;Move Unit&amp;quot;, dest location in &amp;quot;Move Location&amp;quot; (1 based -- 0 refers to No Location), EUD Bitmask for a Death action if the MaskFlag is set to &amp;quot;SC&amp;quot;&lt;br /&gt;
** '''u32''': String number for trigger text (0 means no string)&lt;br /&gt;
** '''u32''': WAV string number (0 means no string)&lt;br /&gt;
** '''u32''': Seconds/milliseconds of time&lt;br /&gt;
** '''u32''': First (or only) [[#List of Players/Group IDs|Group/Player]] affected.&lt;br /&gt;
** '''u32''': Second group affected, secondary location (1-based), CUWP #, number, AI script (4-byte string), switch (0-based #)&lt;br /&gt;
** '''u16''': [[#Trigger Unit Types|Unit type]], [[#Score Types|score type]], [[#Resource Types|resource type]], [[#Alliance Statuses|alliance status]]&lt;br /&gt;
** '''u8''': [[#Trigger Actions List|Action byte]]&lt;br /&gt;
** '''u8''': Number of units (0 means All Units), [[#Action States|action state]], [[#Unit Orders|unit order]], [[#Number Modifiers|number modifier]]&lt;br /&gt;
** '''u8''': Flags&lt;br /&gt;
*** '''Bit 0''' - Ignore a wait/transmission once.&lt;br /&gt;
*** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled.&lt;br /&gt;
*** '''Bit 2''' - Always display flag - when not set: if the user has turned off subtitles (see sound options) the text will not display, when set: text will always display&lt;br /&gt;
*** '''Bit 3''' - Unit properties is used. Staredit uses this for *.trg files.&lt;br /&gt;
*** '''Bit 4''' - Unit type is used. Cleared in &amp;quot;Offset + Mask&amp;quot; EUD actions.&lt;br /&gt;
*** '''Bit 5-7''' - Unknown/unused&lt;br /&gt;
** '''u8''': Padding&lt;br /&gt;
** '''u16 (2 bytes)''': MaskFlag: set to &amp;quot;SC&amp;quot; (0x53, 0x43) when using the bitmask for EUDs, 0 otherwise&lt;br /&gt;
* Player Execution&amp;lt;br&amp;gt; Following the 16 conditions and 64 actions, every trigger also has this structure&lt;br /&gt;
** '''u32''': execution flags&lt;br /&gt;
*** '''Bit 0''' - All conditions are met, executing actions, cleared on the next trigger loop.&lt;br /&gt;
*** '''Bit 1''' - Ignore the following actions: Defeat, Draw.&lt;br /&gt;
*** '''Bit 2''' - Preserve trigger. (Can replace Preserve Trigger action)&lt;br /&gt;
*** '''Bit 3''' - Ignore execution.&lt;br /&gt;
*** '''Bit 4''' - Ignore all of the following actions for this trigger until the next trigger loop: Wait, PauseGame, Transmission, PlayWAV, DisplayTextMessage, CenterView, MinimapPing, TalkingPortrait, and MuteUnitSpeech.&lt;br /&gt;
*** '''Bit 5''' - This trigger has paused the game, ignoring subsequent calls to Pause Game (Unpause Game clears this flag only in the same trigger), may automatically call unpause at the end of action execution?&lt;br /&gt;
*** '''Bit 6''' - Wait skipping disabled for this trigger, cleared on next trigger loop.&lt;br /&gt;
*** '''Bit 7-31''' - Unknown/unused&lt;br /&gt;
** '''u8[27]''': 1 byte for each player in the [[#List of Players/Group IDs]]&lt;br /&gt;
*** '''00''' - Trigger is not executed for player&lt;br /&gt;
*** '''01''' - Trigger is executed for player&lt;br /&gt;
** '''u8''': Index of the current action, in StarCraft this is incremented after each action is executed, trigger execution ends when this is 64 (Max Actions) or an action is encountered with Action byte as 0&lt;br /&gt;
This section can be split. Additional TRIG sections will add more triggers.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MBRF&amp;quot; - Mission Briefings==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 2400 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all of the mission briefings shown by the players.&lt;br /&gt;
&lt;br /&gt;
See [[#&amp;quot;TRIG&amp;quot; - Triggers|&amp;quot;TRIG&amp;quot;]] section for format, as it is exactly the same except for the conditions. In this section the 16 conditions are still there, they are all null except for the very first condition, which only has a condition byte of 13. See [[#Mission Briefing Actions List]] for the action bytes for the mission briefing actions.&lt;br /&gt;
&lt;br /&gt;
This section can be split. Additional MBRF sections will add more briefing triggers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SPRP&amp;quot; - Scenario Properties==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4 bytes.''&lt;br /&gt;
&lt;br /&gt;
* '''u16''': String number of the scenario name&lt;br /&gt;
* '''u16''': String number of the scenarios description.&lt;br /&gt;
A string index of 0 for the map name will default it to its file name. A string index of 0 description will default to a predefined string.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;FORC&amp;quot; - Force Settings==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be less than or equal to 20 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the forces and the information about them.&lt;br /&gt;
* '''u8[8]''': 1 byte for each active player, specifying which of the 4 forces (0-based) that the player's on&lt;br /&gt;
* '''u16[4]''': 1 integer for each force, string number of the name of the force&lt;br /&gt;
* '''u8[4]''': 1 byte for each force specifying the properties:&lt;br /&gt;
** '''Bit 0''' - Random start location&lt;br /&gt;
** '''Bit 1''' - Allies&lt;br /&gt;
** '''Bit 2''' - Allied victory&lt;br /&gt;
** '''Bit 3''' - Shared vision&lt;br /&gt;
** '''Bit 4-7''' - Unused&lt;br /&gt;
Notes about FORC:&lt;br /&gt;
* If there is no string specified for a force name, it will default to a &amp;quot;Force #&amp;quot; string.&lt;br /&gt;
* If this section is less than 20 bytes, the remaining bytes are defaulted to 0.&lt;br /&gt;
* Players can be on a force greater than 4, however they will not appear in the game lobby.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;WAV &amp;quot; - WAV String Indexes==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
There are 512 wav entires regardless of how many are actually used.&lt;br /&gt;
* '''u32[512]''': 1 long for each WAV. Indicates a string index is used for a WAV path in the MPQ. If the entry is not used, it will be 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIS&amp;quot; - Unit Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4048 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;UNIx&amp;quot; - BW Unit Settings|&amp;quot;UNIx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains the unit settings for the level:&lt;br /&gt;
* '''u8[228]''': 1 byte for each unit, in order of Unit ID&lt;br /&gt;
** '''00''' - Unit does not use default settings&lt;br /&gt;
** '''01''' - Unit does use default settings&lt;br /&gt;
* '''u32[228]''': Hit points for unit (Note the displayed value is this value / 256, with the low byte being a fractional HP value)&lt;br /&gt;
* '''u16[228]''': Shield points, in order of Unit ID&lt;br /&gt;
* '''u8[228]''': Armor points, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Build time (1/60 seconds), in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Mineral cost, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Gas cost, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': String number, in order of Unit ID&lt;br /&gt;
* '''u16[100]''': Base weapon damage the weapon does, in weapon ID order ([[#List of Unit Weapon IDs]])&lt;br /&gt;
* '''u16[100]''': Upgrade bonus weapon damage, in weapon ID order&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGS&amp;quot; - Upgrade Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 598 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;UPGx&amp;quot; - BW Upgrade Settings|&amp;quot;UPGx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains upgrade settings:&lt;br /&gt;
* '''u8[46]''': 1 byte per each upgrade, in order of upgrade id.&lt;br /&gt;
** '''00''' - Upgrade uses custom settings&lt;br /&gt;
** '''01''' - Upgrade uses default settings&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, time factor for each upgrade, in order of upgrade id.&lt;br /&gt;
See [[#List of Upgrade IDs]] for upgrade ids.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TECS&amp;quot; - Tech Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 216 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;TECx&amp;quot; - BW Tech Settings|&amp;quot;TECx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains technology/special abilities settings:&lt;br /&gt;
* '''u8[24]''': 1 byte per each technology, specifies if the tech overrides the default settings. In order of technology id&lt;br /&gt;
** '''00''' - Technology uses custom settings&lt;br /&gt;
** '''01''' - Technology uses default settings&lt;br /&gt;
* '''u16[24]''': Mineral cost to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Gas cost to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Time required to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Energy cost to cast technology/special ability. In order of technology id.&lt;br /&gt;
See [[#List of Technology IDs]] for technology ids.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SWNM&amp;quot; - Switch Names==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section contains the strings used for each switch. There are 256 switches, and can't be any more or any less.&lt;br /&gt;
* '''u32[256]''': One long for each switch, specifies the string number for the name of each switch. Unnamed switches will have an index of 0, and have a default switch name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;COLR&amp;quot; - Player Colors==&lt;br /&gt;
''Required for Brood War only and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 8 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section indicates what color each player is, but only has effect on Brood War.&lt;br /&gt;
* '''u8[8]''': 1 byte for each player, indicates the color of the player&lt;br /&gt;
** '''00''' - Red (#F40404)&lt;br /&gt;
** '''01''' - Blue (#0C48CC)&lt;br /&gt;
** '''02''' - Teal (#2CB494)&lt;br /&gt;
** '''03''' - Purple (#88409C)&lt;br /&gt;
** '''04''' - Orange (#F88C14)&lt;br /&gt;
** '''05''' - Brown (#703014)&lt;br /&gt;
** '''06''' - White (#CCE0D0)&lt;br /&gt;
** '''07''' - Yellow (#FCFC38)&lt;br /&gt;
** '''08''' - Green (#088008)&lt;br /&gt;
** '''09''' - Pale yellow (#FCFC7C)&lt;br /&gt;
** '''10''' - Tan (#ECC4B0)&lt;br /&gt;
** '''11''' - Azure (Neutral color, #4068D4)&lt;br /&gt;
Other values can be used but may have different results depending on the tileset. Any color value above 11 is an overflow. As of patch 1.18.6, values above 11 result in default player color.&lt;br /&gt;
&lt;br /&gt;
When CRGB is present, this section still defines leaderboard colors.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;CRGB&amp;quot; - Remastered Player Colors==&lt;br /&gt;
''Requirement unknown, but can be in any map type including non-remaster maps.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 32 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''u8[8][3]''': 3 bytes for each player corresponding to an RGB color value&lt;br /&gt;
** '''u8''': R&lt;br /&gt;
** '''u8''': G&lt;br /&gt;
** '''u8''': B, or color ID for type 3&lt;br /&gt;
* '''u8[8]''': Indicates how to select the color for each player&lt;br /&gt;
** '''0''' - Random Predefined&lt;br /&gt;
** '''1''' - Player's Choice&lt;br /&gt;
** '''2''' - Custom RGB Color (RGB value for the corresponding player defined above)&lt;br /&gt;
** '''3''' - Use color ID in the &amp;quot;B&amp;quot; color channel (&amp;quot;R&amp;quot; and &amp;quot;G&amp;quot; values appear to contain junk data); leaderboard color is still defined by COLR section and can be set independently&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SC:R Only color IDs:&amp;lt;br&amp;gt;&lt;br /&gt;
Extends the [[#&amp;quot;COLR&amp;quot; - Player Colors|COLR]] section list of colors, but cannot be used in the COLR section.&lt;br /&gt;
* '''12''' - Pale Green (#74A47C)&lt;br /&gt;
* '''13''' - Blueish Grey (#7290B8)&lt;br /&gt;
* '''14''' - Cyan (#00E4FC)&lt;br /&gt;
* '''15''' - Pink (#FFC4E4)&lt;br /&gt;
* '''16''' - Olive (#808000)&lt;br /&gt;
* '''17''' - Lime (#D2F53C)&lt;br /&gt;
* '''18''' - Navy (#000080)&lt;br /&gt;
* '''19''' - Magenta (#F032E6)&lt;br /&gt;
* '''20''' - Grey (#808080)&lt;br /&gt;
* '''21''' - Black (#3C3C3C)&lt;br /&gt;
* '''22+''' - Random (can pick colors that have been used)&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PUPx&amp;quot; - BW Upgrade Restrictions==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2318 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UPGR&amp;quot; - Upgrade Restrictions|&amp;quot;UPGR&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is identical to UPGR section except it uses the Brood War set of 61 upgrades instead of the original 46.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PTEx&amp;quot; - BW Tech Restrictions==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1672 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;PTEC&amp;quot; - Tech Restrictions|&amp;quot;PTEC&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is identical to PTEC section except it uses the Brood War set of 44 technologies instead of the original 24.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIx&amp;quot; - BW Unit Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4168 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UNIS&amp;quot; - Unit Settings|&amp;quot;UNIS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is indentical to UNIS section except it uses the Brood War set of 130 weapons instead of the original 100.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGx&amp;quot; - BW Upgrade Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 794 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UPGS&amp;quot; - Upgrade Settings|&amp;quot;UPGS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section the same as UPGS except section except it uses the Brood War set of 61 upgrades instead of the original 46, and there is an unused byte after the first set:&lt;br /&gt;
* '''u8[61]''': 1 byte per each upgrade, in order of upgrade id.&lt;br /&gt;
** '''00''' - Upgrade uses custom settings&lt;br /&gt;
** '''01''' - Upgrade uses default settings&lt;br /&gt;
* '''u8''': Unused.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, time factor for each upgrade, in order of upgrade id.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TECx&amp;quot; - BW Tech Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 396 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;TECS&amp;quot; - Tech Settings|&amp;quot;TECS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is indentical to TECS section except it uses the Brood War set of 44 technologies instead of the original 24.&lt;br /&gt;
&lt;br /&gt;
=Appendix=&lt;br /&gt;
A set of references and IDs that should help you easier in the trigger section and the technology/player ids, etc:&lt;br /&gt;
&lt;br /&gt;
==Trigger Conditions List==&lt;br /&gt;
* 0 = No Condition&lt;br /&gt;
* 1 = Countdown Timer(Comparison, QNumber)&lt;br /&gt;
* 2 = Command(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 3 = Bring(Player, Comparison, TUnit, Loc, QNumber)&lt;br /&gt;
* 4 = Accumulate(Player, Comparison, QNumber, ResType)&lt;br /&gt;
* 5 = Kill(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 6 = Command the Most(TUnit)&lt;br /&gt;
* 7 = Commands the Most At(TUnit, Loc)&lt;br /&gt;
* 8 = Most Kills(TUnit)&lt;br /&gt;
* 9 = Highest Score(Score)&lt;br /&gt;
* 10 = Most Resources(ResType)&lt;br /&gt;
* 11 = Switch(Switch)&lt;br /&gt;
* 12 = Elapsed Time(Comparison, QNumber)&lt;br /&gt;
* 13 = Data is a Mission Briefing. Conditions are N/A (Same as Never)&lt;br /&gt;
* 14 = Opponents(Player, Comparison, QNumber)&lt;br /&gt;
* 15 = Deaths(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 16 = Command the Least(TUnit)&lt;br /&gt;
* 17 = Command the Least At(TUnit, Loc)&lt;br /&gt;
* 18 = Least Kills(TUnit)&lt;br /&gt;
* 19 = Lowest Score(Score)&lt;br /&gt;
* 20 = Least Resources(ResType)&lt;br /&gt;
* 21 = Score(Player, Comparison, Score, QNumber)&lt;br /&gt;
* 22 = Always (Same as No Condition)&lt;br /&gt;
* 23 = Never&lt;br /&gt;
&lt;br /&gt;
==Trigger Actions List==&lt;br /&gt;
* 0 = No Action&lt;br /&gt;
* 1 = Victory&lt;br /&gt;
* 2 = Defeat&lt;br /&gt;
* 3 = Preserve Trigger&lt;br /&gt;
* 4 = Wait(Time)&lt;br /&gt;
* 5 = Pause Game (Single player only)&lt;br /&gt;
* 6 = Unpause Game (Single player only)&lt;br /&gt;
* 7 = Transmission(Text, Unit, Loc, Time, Modifier, Wave, WavTime)&lt;br /&gt;
* 8 = Play WAV(Wav, WavTime)&lt;br /&gt;
* 9 = Display Text Message(Text)&lt;br /&gt;
* 10 = Center View(Loc)&lt;br /&gt;
* 11 = Create Unit with Properties(Player, Unit, Number, Loc, UnitProp)&lt;br /&gt;
* 12 = Set Mission Objectives(Text)&lt;br /&gt;
* 13 = Set Switch(Switch, SwAction)&lt;br /&gt;
* 14 = Set Countdown Timer(Time, Modifier)&lt;br /&gt;
* 15 = Run AI Script(AIScript)&lt;br /&gt;
* 16 = Run AI Script At Location(AIScript)&lt;br /&gt;
* 17 = Leader Board (Control) (Text, TUnit)&lt;br /&gt;
* 18 = Leader Board (Control At Location) (Text, TUnit, Loc)&lt;br /&gt;
* 19 = Leader Board (Resources) (Text, ResType)&lt;br /&gt;
* 20 = Leader Board (Kills) (Text, TUnit)&lt;br /&gt;
* 21 = Leader Board (Points) (Text, Score)&lt;br /&gt;
* 22 = Kill Unit (Player, TUnit)&lt;br /&gt;
* 23 = Kill Unit At Location(Player, TUnit, Number, Loc)&lt;br /&gt;
* 24 = Remove Unit(Player, TUnit)&lt;br /&gt;
* 25 = Remove Unit At Location(Player, TUnit, Number, Loc)&lt;br /&gt;
* 26 = Set Resources(Player, Number, Modifier, ResType)&lt;br /&gt;
* 27 = Set Score(Player, Number, Modifier, Score)&lt;br /&gt;
* 28 = Minimap Ping(Loc)&lt;br /&gt;
* 29 = Talking Portrait(Unit, Time)&lt;br /&gt;
* 30 = Mute Unit Speech&lt;br /&gt;
* 31 = Unmute Unit Speech&lt;br /&gt;
* 32 = Leaderboard Computer Players(State)&lt;br /&gt;
* 33 = Leaderboard Goal (Control) (Text, TUnit, Number)&lt;br /&gt;
* 34 = Leaderboard Goal (Control At Location) (Text, TUnit, Number, Loc)&lt;br /&gt;
* 35 = Leaderboard Goal (Resources) (Text, TUnit, Number, ResType)&lt;br /&gt;
* 36 = Leaderboard Goal (Kills) (Text, TUnit, Number)&lt;br /&gt;
* 37 = Leaderboard Goal (Points) (Text, Number, Score)&lt;br /&gt;
* 38 = Move Location(Player, TUnit, SLoc, DLoc)&lt;br /&gt;
* 39 = Move Unit(Player, TUnit, Number, SLoc, DLoc)&lt;br /&gt;
* 40 = Leaderboard (Greed) (Number)&lt;br /&gt;
* 41 = Set Next Scenario(Text) (Single player only)&lt;br /&gt;
* 42 = Set Doodad State(Player, TUnit, Loc, State)&lt;br /&gt;
* 43 = Set Invincibility(Player, TUnit, Loc, State)&lt;br /&gt;
* 44 = Create Unit(Player, Unit, Number, Loc)&lt;br /&gt;
* 45 = Set Deaths(Player, TUnit, Number, Modifier)&lt;br /&gt;
* 46 = Order(Player, TUnit, SLoc, DLoc, Order)&lt;br /&gt;
* 47 = Comment(Text)&lt;br /&gt;
* 48 = Give Units to Player(SPlayer, DPlayer, TUnit, Number, Loc)&lt;br /&gt;
* 49 = Modify Unit Hit Points(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 50 = Modify Unit Energy(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 51 = Modify Unit Shield Points(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 52 = Modify Unit Resource Amount(Player, Number, ModAmount, Loc)&lt;br /&gt;
* 53 = Modify Unit Hanger Count(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 54 = Pause Timer&lt;br /&gt;
* 55 = Unpause Timer&lt;br /&gt;
* 56 = Draw&lt;br /&gt;
* 57 = Set Alliance Status(Player, AllyStatus)&lt;br /&gt;
* 58 = Disable Debug Mode (Single player only)&lt;br /&gt;
* 59 = Enable Debug Mode (Single player only)&lt;br /&gt;
&lt;br /&gt;
==Mission Briefing Actions List==&lt;br /&gt;
* 0 - No Action&lt;br /&gt;
* 1 - Wait(Time)&lt;br /&gt;
* 2 - Play WAV(Wave, WavTime)&lt;br /&gt;
* 3 - Text Message(Text, Time)&lt;br /&gt;
* 4 - Mission Objectives(Text)&lt;br /&gt;
* 5 - Show Portrait(Unit, Slot)&lt;br /&gt;
* 6 - Hide Portrait(Slot)&lt;br /&gt;
* 7 - Display Speaking Portrait(Slot, Time)&lt;br /&gt;
* 8 - Transmission(Text, Slot, Time, Modifier, Wave, WavTime)&lt;br /&gt;
* 9 - Skip Tutorial Enabled&lt;br /&gt;
&lt;br /&gt;
==Switch States==&lt;br /&gt;
* 2 = Switch is set&lt;br /&gt;
* 3 = Switch is cleared&lt;br /&gt;
&lt;br /&gt;
==Numeric Comparisons==&lt;br /&gt;
* 0 = At least&lt;br /&gt;
* 1 = At most&lt;br /&gt;
* 10 = Exactly&lt;br /&gt;
&lt;br /&gt;
==Score Types==&lt;br /&gt;
* 0 = Total&lt;br /&gt;
* 1 = Units&lt;br /&gt;
* 2 = Buildings&lt;br /&gt;
* 3 = Units and Buildings&lt;br /&gt;
* 4 = Kills&lt;br /&gt;
* 5 = Razings&lt;br /&gt;
* 6 = Kills and Razings&lt;br /&gt;
* 7 = Custom&lt;br /&gt;
&lt;br /&gt;
==Resource Types==&lt;br /&gt;
* 0 = Ore&lt;br /&gt;
* 1 = Gas&lt;br /&gt;
* 2 = Ore and Gas&lt;br /&gt;
&lt;br /&gt;
==Alliance Statuses==&lt;br /&gt;
* 0 = Enemy&lt;br /&gt;
* 1 = Ally&lt;br /&gt;
* 2 = Allied Victory&lt;br /&gt;
&lt;br /&gt;
==Unit Orders==&lt;br /&gt;
* 0 = Move&lt;br /&gt;
* 1 = Patrol&lt;br /&gt;
* 2 = Attack&lt;br /&gt;
&lt;br /&gt;
==Action States==&lt;br /&gt;
* 4 = Enabled/Set switch&lt;br /&gt;
* 5  = Disabled/Clear switch&lt;br /&gt;
* 6 = Toggle/Toggle switch&lt;br /&gt;
* 11 = Randomize switch&lt;br /&gt;
&lt;br /&gt;
==Number Modifiers==&lt;br /&gt;
* 7 = Set to&lt;br /&gt;
* 8 = Add&lt;br /&gt;
* 9 = Subtract&lt;br /&gt;
&lt;br /&gt;
==Trigger Unit Types==&lt;br /&gt;
* All normal units (0-227)&lt;br /&gt;
* 228 = None&lt;br /&gt;
* 229 = Any unit&lt;br /&gt;
* 230 = Men&lt;br /&gt;
* 231 = Buildings&lt;br /&gt;
* 232 = Factories&lt;br /&gt;
&lt;br /&gt;
==List of Players/Group IDs==&lt;br /&gt;
* 0 = Player 1&lt;br /&gt;
* 1 = Player 2&lt;br /&gt;
* 2 = Player 3&lt;br /&gt;
* 3 = Player 4&lt;br /&gt;
* 4 = Player 5&lt;br /&gt;
* 5 = Player 6&lt;br /&gt;
* 6 = Player 7&lt;br /&gt;
* 7 = Player 8&lt;br /&gt;
* 8 = Player 9&lt;br /&gt;
* 9 = Player 10&lt;br /&gt;
* 10 = Player 11&lt;br /&gt;
* 11 = Player 12&lt;br /&gt;
* 12 = None (Unused, One-entry Overflow in some cases)&lt;br /&gt;
* 13 = Current Player&lt;br /&gt;
* 14 = Foes&lt;br /&gt;
* 15 = Allies&lt;br /&gt;
* 16 = Neutral Players&lt;br /&gt;
* 17 = All Players&lt;br /&gt;
* 18 = Force 1&lt;br /&gt;
* 19 = Force 2&lt;br /&gt;
* 20 = Force 3&lt;br /&gt;
* 21 = Force 4&lt;br /&gt;
* 22 = Unused 1&lt;br /&gt;
* 23 = Unused 2&lt;br /&gt;
* 24 = Unused 3&lt;br /&gt;
* 25 = Unused 4&lt;br /&gt;
* 26 = Non Allied Victory Players&lt;br /&gt;
&lt;br /&gt;
==List of Technology IDs==&lt;br /&gt;
* 0 = Stim Packs&lt;br /&gt;
* 1 = Lockdown&lt;br /&gt;
* 2 = EMP Shockwave&lt;br /&gt;
* 3 = Spider Mines&lt;br /&gt;
* 4 = Scanner Sweep&lt;br /&gt;
* 5 = Siege Mode&lt;br /&gt;
* 6 = Defensive Matrix&lt;br /&gt;
* 7 = Irradiate&lt;br /&gt;
* 8 = Yamato Gun&lt;br /&gt;
* 9 = Cloaking Field&lt;br /&gt;
* 10 = Personnel Cloaking&lt;br /&gt;
* 11 = Burrowing&lt;br /&gt;
* 12 = Infestation&lt;br /&gt;
* 13 = Spawn Broodling&lt;br /&gt;
* 14 = Dark Swarm&lt;br /&gt;
* 15 = Plague&lt;br /&gt;
* 16 = Consume&lt;br /&gt;
* 17 = Ensnare&lt;br /&gt;
* 18 = Parasite&lt;br /&gt;
* 19 = Psionic Storm&lt;br /&gt;
* 20 = Hallucination&lt;br /&gt;
* 21 = Recall&lt;br /&gt;
* 22 = Stasis Field&lt;br /&gt;
* 23 = Archon Warp&lt;br /&gt;
* 24 = Restoration&lt;br /&gt;
* 25 = Disruption Web&lt;br /&gt;
* 26 = Unused 26&lt;br /&gt;
* 27 = Mind Control&lt;br /&gt;
* 28 = Dark Archon Meld&lt;br /&gt;
* 29 = Feedback&lt;br /&gt;
* 30 = Optical Flare&lt;br /&gt;
* 31 = Maelstorm&lt;br /&gt;
* 32 = Lurker Aspect&lt;br /&gt;
* 33 = Unused 33&lt;br /&gt;
* 34 = Healing&lt;br /&gt;
* 35 = Unused 35&lt;br /&gt;
* 36 = Unused 36&lt;br /&gt;
* 37 = Unused 37&lt;br /&gt;
* 38 = Unused 38&lt;br /&gt;
* 39 = Unused 39&lt;br /&gt;
* 40 = Unused 40&lt;br /&gt;
* 41 = Unused 41&lt;br /&gt;
* 42 = Unused 42&lt;br /&gt;
* 43 = Unused 43&lt;br /&gt;
&lt;br /&gt;
==List of Upgrade IDs==&lt;br /&gt;
* 0 = Terran Infantry Armor&lt;br /&gt;
* 1 = Terran Vehicle Plating&lt;br /&gt;
* 2 = Terran Ship Plating&lt;br /&gt;
* 3 = Zerg Carapace&lt;br /&gt;
* 4 = Zerg Flyer Caparace&lt;br /&gt;
* 5 = Protoss Armor&lt;br /&gt;
* 6 = Protoss Plating&lt;br /&gt;
* 7 = Terran Infantry Weapons&lt;br /&gt;
* 8 = Terran Vehicle Weapons&lt;br /&gt;
* 9 = Terran Ship Weapons&lt;br /&gt;
* 10 = Zerg Melee Attacks&lt;br /&gt;
* 11 = Zerg Missile Attacks&lt;br /&gt;
* 12 = Zerg Flyer Attacks&lt;br /&gt;
* 13 = Protoss Ground Weapons&lt;br /&gt;
* 14 = Protoss Air Weapons&lt;br /&gt;
* 15 = Protoss Plasma Shields&lt;br /&gt;
* 16 = U-238 Shells&lt;br /&gt;
* 17 = Ion Thrusters&lt;br /&gt;
* 18 = Burst Lasers (Unused)&lt;br /&gt;
* 19 = Titan Reactor (SV +50)&lt;br /&gt;
* 20 = Ocular Implants&lt;br /&gt;
* 21 = Moebius Reactor (Ghost +50)&lt;br /&gt;
* 22 = Apollo Reactor (Wraith +50)&lt;br /&gt;
* 23 = Colossus Reactor (BC +50)&lt;br /&gt;
* 24 = Ventral Sacs&lt;br /&gt;
* 25 = Antennae&lt;br /&gt;
* 26 = Pneumatized Carapace&lt;br /&gt;
* 27 = Metabolic Boost&lt;br /&gt;
* 28 = Adrenal Glands&lt;br /&gt;
* 29 = Muscular Augments&lt;br /&gt;
* 30 = Grooved Spines&lt;br /&gt;
* 31 = Gamete Meiosis (Queen +50)&lt;br /&gt;
* 32 = Metasynaptic Node (Defiler +50)&lt;br /&gt;
* 33 = Singularity Charge&lt;br /&gt;
* 34 = Leg Enhancements&lt;br /&gt;
* 35 = Scarab Damage &lt;br /&gt;
* 36 = Reaver Capacity &lt;br /&gt;
* 37 = Gravitic Drive&lt;br /&gt;
* 38 = Sensor Array&lt;br /&gt;
* 39 = Gravitic Boosters&lt;br /&gt;
* 40 = Khaydarin Amulet (HT +50)&lt;br /&gt;
* 41 = Apial Sensors&lt;br /&gt;
* 42 = Gravitic Thrusters&lt;br /&gt;
* 43 = Carrier Capacity&lt;br /&gt;
* 44 = Khaydarin Core (Arbiter +50)&lt;br /&gt;
* 45 = Unknown Upgrade45&lt;br /&gt;
* 46 = Unknown Upgrade46&lt;br /&gt;
* 47 = Argus Jewel (Corsair +50)&lt;br /&gt;
* 48 = Unknown Upgrade48&lt;br /&gt;
* 49 = Argus Talisman (DA +50)&lt;br /&gt;
* 50 = Unknown Upgrade50&lt;br /&gt;
* 51 = Caduceus Reactor (Medic +50)&lt;br /&gt;
* 52 = Chitinous Plating&lt;br /&gt;
* 53 = Anabolic Synthesis&lt;br /&gt;
* 54 = Charon Booster&lt;br /&gt;
* 55 = Unknown Upgrade55&lt;br /&gt;
* 56 = Unknown Upgrade56&lt;br /&gt;
* 57 = Unknown Upgrade57&lt;br /&gt;
* 58 = Unknown Upgrade58&lt;br /&gt;
* 59 = Unknown Upgrade59&lt;br /&gt;
* 60 = Unknown Upgrade60&lt;br /&gt;
&lt;br /&gt;
==List of Unit Weapon IDs==&lt;br /&gt;
* 0 = Gauss Rifle (Normal)&lt;br /&gt;
* 1 = Gauss Rifle (Jim Raynor-Marine)&lt;br /&gt;
* 2 = C-10 Canister Rifle (Normal)&lt;br /&gt;
* 3 = C-10 Canister Rifle (Sarah Kerrigan)&lt;br /&gt;
* 4 = Fragmentation Grenade (Normal)&lt;br /&gt;
* 5 = Fragmentation Grenade (Jim Raynor-Vulture)&lt;br /&gt;
* 6 = Spider Mines&lt;br /&gt;
* 7 = Twin Autocannons (Normal)&lt;br /&gt;
* 8 = Hellfire Missile Pack (Normal)&lt;br /&gt;
* 9 = Twin Autocannons (Alan Schezar)&lt;br /&gt;
* 10 = Hellfire Missile Pack (Alan Schezar)&lt;br /&gt;
* 11 = Arclite Cannon (Normal)&lt;br /&gt;
* 12 = Arclite Cannon (Edmund Duke)&lt;br /&gt;
* 13 = Fusion Cutter&lt;br /&gt;
* 14 = Fusion Cutter (Harvest)&lt;br /&gt;
* 15 = Gemini Missiles (Normal)&lt;br /&gt;
* 16 = Burst Lasers (Normal)&lt;br /&gt;
* 17 = Gemini Missiles (Tom Kazansky)&lt;br /&gt;
* 18 = Burst Lasers (Tom Kazansky)&lt;br /&gt;
* 19 = ATS Laser Battery (Normal)&lt;br /&gt;
* 20 = ATA Laser Battery (Normal)&lt;br /&gt;
* 21 = ATS Laser Battery (Norad II+Mengsk+DuGalle)&lt;br /&gt;
* 22 = ATA Laser Battery (Norad II+Mengsk+DuGalle)&lt;br /&gt;
* 23 = ATS Laser Battery (Hyperion)&lt;br /&gt;
* 24 = ATA Laser Battery (Hyperion)&lt;br /&gt;
* 25 = Flame Thrower (Normal)&lt;br /&gt;
* 26 = Flame Thrower (Gui Montag)&lt;br /&gt;
* 27 = Arclite Shock Cannon (Normal)&lt;br /&gt;
* 28 = Arclite Shock Cannon (Edmund Duke)&lt;br /&gt;
* 29 = Longbolt Missile&lt;br /&gt;
* 30 = Yamato Gun&lt;br /&gt;
* 31 = Nuclear Missile&lt;br /&gt;
* 32 = Lockdown&lt;br /&gt;
* 33 = EMP Shockwave&lt;br /&gt;
* 34 = Irradiate&lt;br /&gt;
* 35 = Claws (Normal)&lt;br /&gt;
* 36 = Claws (Devouring One)&lt;br /&gt;
* 37 = Claws (Infested Kerrigan)&lt;br /&gt;
* 38 = Needle Spines (Normal)&lt;br /&gt;
* 39 = Needle Spines (Hunter Killer)&lt;br /&gt;
* 40 = Kaiser Blades (Normal)&lt;br /&gt;
* 41 = Kaiser Blades (Torrasque)&lt;br /&gt;
* 42 = Toxic Spores (Broodling)&lt;br /&gt;
* 43 = Spines&lt;br /&gt;
* 44 = Spines (Harvest)&lt;br /&gt;
* 45 = Acid Spray (Unused)&lt;br /&gt;
* 46 = Acid Spore (Normal)&lt;br /&gt;
* 47 = Acid Spore (Kukulza-Guardian)&lt;br /&gt;
* 48 = Glave Wurm (Normal)&lt;br /&gt;
* 49 = Glave Wurm (Kukulza-Mutalisk)&lt;br /&gt;
* 50 = Venom (Unused-Defiler)&lt;br /&gt;
* 51 = Venom (Unused-Defiler Hero)&lt;br /&gt;
* 52 = Seeker Spores&lt;br /&gt;
* 53 = Subterranean Tentacle&lt;br /&gt;
* 54 = Suicide (Infested Terran)&lt;br /&gt;
* 55 = Suicide (Scourge)&lt;br /&gt;
* 56 = Parasite&lt;br /&gt;
* 57 = Spawn Broodlings&lt;br /&gt;
* 58 = Ensnare&lt;br /&gt;
* 59 = Dark Swarm&lt;br /&gt;
* 60 = Plague&lt;br /&gt;
* 61 = Consume&lt;br /&gt;
* 62 = Particle Beam&lt;br /&gt;
* 63 = Particle Beam (Harvest)&lt;br /&gt;
* 64 = Psi Blades (Normal)&lt;br /&gt;
* 65 = Psi Blades (Fenix-Zealot)&lt;br /&gt;
* 66 = Phase Disruptor (Normal)&lt;br /&gt;
* 67 = Phase Disruptor (Fenix-Dragoon)&lt;br /&gt;
* 68 = Psi Assault (Normal-Unused)&lt;br /&gt;
* 69 = Psi Assault (Tassadar+Aldaris)&lt;br /&gt;
* 70 = Psionic Shockwave (Normal)&lt;br /&gt;
* 71 = Psionic Shockwave (Tassadar/Zeratul Archon)&lt;br /&gt;
* 72 = Unknown72&lt;br /&gt;
* 73 = Dual Photon Blasters (Normal)&lt;br /&gt;
* 74 = Anti-matter Missiles (Normal)&lt;br /&gt;
* 75 = Dual Photon Blasters (Mojo)&lt;br /&gt;
* 76 = Anti-matter Missiles (Mojo)&lt;br /&gt;
* 77 = Phase Disruptor Cannon (Normal)&lt;br /&gt;
* 78 = Phase Disruptor Cannon (Danimoth)&lt;br /&gt;
* 79 = Pulse Cannon&lt;br /&gt;
* 80 = STS Photon Cannon&lt;br /&gt;
* 81 = STA Photon Cannon&lt;br /&gt;
* 82 = Scarab&lt;br /&gt;
* 83 = Stasis Field&lt;br /&gt;
* 84 = Psi Storm&lt;br /&gt;
* 85 = Warp Blades (Zeratul)&lt;br /&gt;
* 86 = Warp Blades (Dark Templar Hero)&lt;br /&gt;
* 87 = Missiles (Unused)&lt;br /&gt;
* 88 = Laser Battery1 (Unused)&lt;br /&gt;
* 89 = Tormentor Missiles (Unused)&lt;br /&gt;
* 90 = Bombs (Unused)&lt;br /&gt;
* 91 = Raider Gun (Unused)&lt;br /&gt;
* 92 = Laser Battery2 (Unused)&lt;br /&gt;
* 93 = Laser Battery3 (Unused)&lt;br /&gt;
* 94 = Dual Photon Blasters (Unused)&lt;br /&gt;
* 95 = Flechette Grenade (Unused)&lt;br /&gt;
* 96 = Twin Autocannons (Floor Trap)&lt;br /&gt;
* 97 = Hellfire Missile Pack (Wall Trap)&lt;br /&gt;
* 98 = Flame Thrower (Wall Trap)&lt;br /&gt;
* 99 = Hellfire Missile Pack (Floor Trap)&lt;br /&gt;
* 100 = Neutron Flare&lt;br /&gt;
* 101 = Disruption Web&lt;br /&gt;
* 102 = Restoration&lt;br /&gt;
* 103 = Halo Rockets&lt;br /&gt;
* 104 = Corrosive Acid&lt;br /&gt;
* 105 = Mind Control&lt;br /&gt;
* 106 = Feedback&lt;br /&gt;
* 107 = Optical Flare&lt;br /&gt;
* 108 = Maelstrom&lt;br /&gt;
* 109 = Subterranean Spines&lt;br /&gt;
* 110 = Gauss Rifle0 (Unused)&lt;br /&gt;
* 111 = Warp Blades (Normal)&lt;br /&gt;
* 112 = C-10 Canister Rifle (Samir Duran)&lt;br /&gt;
* 113 = C-10 Canister Rifle (Infested Duran)&lt;br /&gt;
* 114 = Dual Photon Blasters (Artanis)&lt;br /&gt;
* 115 = Anti-matter Missiles (Artanis)&lt;br /&gt;
* 116 = C-10 Canister Rifle (Alexei Stukov)&lt;br /&gt;
* 117 = Gauss Rifle1 (Unused)&lt;br /&gt;
* 118 = Gauss Rifle2 (Unused)&lt;br /&gt;
* 119 = Gauss Rifle3 (Unused)&lt;br /&gt;
* 120 = Gauss Rifle4 (Unused)&lt;br /&gt;
* 121 = Gauss Rifle5 (Unused)&lt;br /&gt;
* 122 = Gauss Rifle6 (Unused)&lt;br /&gt;
* 123 = Gauss Rifle7 (Unused)&lt;br /&gt;
* 124 = Gauss Rifle8 (Unused)&lt;br /&gt;
* 125 = Gauss Rifle9 (Unused)&lt;br /&gt;
* 126 = Gauss Rifle10 (Unused)&lt;br /&gt;
* 127 = Gauss Rifle11 (Unused)&lt;br /&gt;
* 128 = Gauss Rifle12 (Unused)&lt;br /&gt;
* 129 = Gauss Rifle13 (Unused)&lt;br /&gt;
* 130 = None&lt;br /&gt;
&lt;br /&gt;
==Complete Modifier List==&lt;br /&gt;
* 0 = Condition: &amp;gt;= (greater than or equal to)&lt;br /&gt;
* 1 = Condition: &amp;lt;= (less than or equal to)&lt;br /&gt;
* 2 = Condition: == TRUE (Is True)&lt;br /&gt;
* 3 = Condition: == FALSE (Is False)&lt;br /&gt;
* 4 = Action: = TRUE (Set to True)&lt;br /&gt;
* 5 = Action: = FALSE (Set to False)&lt;br /&gt;
* 6 = Action: NOT (toggle)&lt;br /&gt;
* 7 = Action: = (Set to)&lt;br /&gt;
* 8 = Action: += (Add)&lt;br /&gt;
* 9 = Action: -= (Subtract)&lt;br /&gt;
* 10 = Condition: == (Exactly)&lt;br /&gt;
* 11 = Action: Randomize&lt;br /&gt;
&lt;br /&gt;
[[Category:StarCraft]]&lt;br /&gt;
[[Category:Reference]]&lt;br /&gt;
[[Category:File Formats]]&lt;/div&gt;</summary>
		<author><name>FaRTy1billion</name></author>	</entry>

	<entry>
		<id>https://staredit.net/wiki/index.php?title=Category:File_Formats&amp;diff=688</id>
		<title>Category:File Formats</title>
		<link rel="alternate" type="text/html" href="https://staredit.net/wiki/index.php?title=Category:File_Formats&amp;diff=688"/>
				<updated>2023-06-01T18:21:57Z</updated>
		
		<summary type="html">&lt;p&gt;FaRTy1billion: Created page with &amp;quot;Articles containing file format specifications.&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Articles containing file format specifications.&lt;/div&gt;</summary>
		<author><name>FaRTy1billion</name></author>	</entry>

	<entry>
		<id>https://staredit.net/wiki/index.php?title=Terrain_Format&amp;diff=687</id>
		<title>Terrain Format</title>
		<link rel="alternate" type="text/html" href="https://staredit.net/wiki/index.php?title=Terrain_Format&amp;diff=687"/>
				<updated>2023-06-01T18:21:01Z</updated>
		
		<summary type="html">&lt;p&gt;FaRTy1billion: Added File Foramats category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Data in the format is read left to right, top to bottom (bitmap pixel locations, minitile locations, etc.). All values are unsigned.&lt;br /&gt;
&lt;br /&gt;
==CV5==&lt;br /&gt;
This file defines the various tile groups that are referenced by the TILE/MTXM sections of the CHK (0x7FF0 for the group index, 0x000F for the tile index).&lt;br /&gt;
&lt;br /&gt;
Struct Size: 52 bytes&lt;br /&gt;
ID Range: 0-2047&lt;br /&gt;
&lt;br /&gt;
For non-doodad tiles:&lt;br /&gt;
* '''u16''' Terrain Type - 0 for unused/unplaceable, 1 for doodads, 2+ for basic terrain and edges&lt;br /&gt;
* '''u16''' Flags - Properties for this group of tiles. These values get copied directly into the activeTileArray flags, except where noted.&lt;br /&gt;
** '''0x0001''' - Walkable ''(gets overwritten by SC based on VF4 flags)''&lt;br /&gt;
** '''0x0002''' - Unknown/Unused&lt;br /&gt;
** '''0x0004''' - Unwalkable ''(gets overwritten by SC based on VF4 flags)''&lt;br /&gt;
** '''0x0008''' - Unknown/Unused&lt;br /&gt;
** '''0x0010''' - Has doodad cover&lt;br /&gt;
** '''0x0020''' - Unknown/Unused&lt;br /&gt;
** '''0x0040''' - Creep (Zerg can build here when this flag is combined with the Temporary creep flag)&lt;br /&gt;
** '''0x0080''' - Unbuildable&lt;br /&gt;
** '''0x0100''' - Blocks view ''(gets overwritten by SC based on VF4 flags)''&lt;br /&gt;
** '''0x0200''' - Mid Ground ''(gets overwritten by SC based on VF4 flags)''&lt;br /&gt;
** '''0x0400''' - High Ground ''(gets overwritten by SC based on VF4 flags)''&lt;br /&gt;
** '''0x0800''' - Occupied (unbuildable until a building on this tile gets removed)&lt;br /&gt;
** '''0x1000''' - Receding creep&lt;br /&gt;
** '''0x2000''' - Cliff edge ''(gets overwritten by SC based on VF4 flags)''&lt;br /&gt;
** '''0x4000''' - Temporary creep (Zerg can build here when this flag is combined with the Creep flag)&lt;br /&gt;
** '''0x8000''' - Allow Beacons/Start Locations to be placeable&lt;br /&gt;
* '''Rect16''' Edge Types - Determines what tile types can be adjacent to tiles in this group. Unsure if StarEdit actually uses these, or if they are just reference/outdated values.&lt;br /&gt;
** '''u16''' Left&lt;br /&gt;
** '''u16''' Up&lt;br /&gt;
** '''u16''' Right&lt;br /&gt;
** '''u16''' Down&lt;br /&gt;
* '''Rect16''' Terrain Piece Type - Determines multi-tile blocks of terrain (e.g. 2x3 cliff pieces). A value of 0 can match any appropriate tile, otherwise the edge only pairs with a matching Terrain Piece Type value and tile index. Unsure if StarEdit actually uses these, or if they are just reference/outdated values.&lt;br /&gt;
** '''u16''' Left - Unknown/unused (always 0)&lt;br /&gt;
** '''u16''' Up&lt;br /&gt;
** '''u16''' Right - Unknown/unused (always 0)&lt;br /&gt;
** '''u16''' Down&lt;br /&gt;
* '''u16[16]''' Tiles - VX4/VF4 MegaTile ID&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For doodad tiles (1024+ in pre-remaster tilesets, but SC:R puts some doodads before that index on some tilesets):&lt;br /&gt;
* '''u16''' Terrain Type - 0 for unused/unplaceable, 1 for doodads, 2+ for basic terrain and edges&lt;br /&gt;
* '''u16''' Flags - Properties for this group of tiles and doodad. Same flags as above, except these with additional meaning:&lt;br /&gt;
** '''0x1000''' - Has Sprites.dat overlay ''(is not cleared by SC, so this flag also counts as Receding creep)''&lt;br /&gt;
** '''0x2000''' - Has Units.dat overlay&lt;br /&gt;
** '''0x4000''' - Overlay is flipped (unused) ''(is not cleared SC, so this flag also counts as Temporary creep)''&lt;br /&gt;
* '''u16''' Overlay ID - Sprites.dat or Units.dat ID, depending on flags&lt;br /&gt;
* '''u16''' SC:R Doodad - Set to 1 on doodads added by SC:R&lt;br /&gt;
* '''u16''' Group String - 1-based stat_txt.tbl string index&lt;br /&gt;
* '''u16''' Unknown/unused (always 0)&lt;br /&gt;
* '''u16''' Doodad ID - dddata.bin index&lt;br /&gt;
* '''u16''' Width - Width in tiles of the doodad&lt;br /&gt;
* '''u16''' Height - Height in tiles of the doodad&lt;br /&gt;
* '''u16''' Unknown/unused (always 0)&lt;br /&gt;
* '''u16[16]''' Tiles - VX4/VF4 MegaTile ID&lt;br /&gt;
&lt;br /&gt;
==VF4==&lt;br /&gt;
MiniTile flags for each MegaTile. Referenced by CV5.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 32 Bytes&lt;br /&gt;
&lt;br /&gt;
ID Range: 0-65535&lt;br /&gt;
&lt;br /&gt;
* '''u16[16]''' - MiniTile Flags:&lt;br /&gt;
** 0x0001 - Walkable&lt;br /&gt;
** 0x0002 - Mid&lt;br /&gt;
** 0x0004 - High (Mid and High unchecked = Low)&lt;br /&gt;
** 0x0008 - Blocks View&lt;br /&gt;
** 0x0010 - Ramp - Appears in the middle of most ramps/stairs&lt;br /&gt;
** Rest unknown/unused&lt;br /&gt;
&lt;br /&gt;
==VX4==&lt;br /&gt;
MiniTile graphic references for each MegaTile. Referenced by CV5.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 32 Bytes&lt;br /&gt;
&lt;br /&gt;
ID Range: 0-65535&lt;br /&gt;
&lt;br /&gt;
* '''u16[16]''' - MiniTile graphics&lt;br /&gt;
** '''Bit 0''' (0x0001) - Horizontally Flipped&lt;br /&gt;
** '''15 Bits''' (0xFFFE) - VR4 ID&lt;br /&gt;
&lt;br /&gt;
==VX4EX==&lt;br /&gt;
Replaces VX4 in SC:Remaster and tileset expanding plugins to allow for more minitiles. Note that SC:R itself does not use this file, it is used by SCMDraft.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 64 Bytes&lt;br /&gt;
&lt;br /&gt;
ID Range: 0-4294967295&lt;br /&gt;
&lt;br /&gt;
* '''u32[16]''' - MiniTile graphics&lt;br /&gt;
** '''Bit 0''' (0x00000001) - Horizontally Flipped&lt;br /&gt;
** '''23 Bits''' (0xFFFFFFFE) - VR4 ID&lt;br /&gt;
&lt;br /&gt;
==VR4==&lt;br /&gt;
Graphical Data for minitiles. Referenced by VX4 or VX4EX.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 64 Bytes&lt;br /&gt;
&lt;br /&gt;
Max ID: 32767 (VX4) or 2147483647 (VX4EX)&lt;br /&gt;
&lt;br /&gt;
* '''u8[8][8]''' - WPE color index&lt;br /&gt;
&lt;br /&gt;
==WPE==&lt;br /&gt;
256-color RGB Palette.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 4 Bytes (entire file is always 1024 bytes).&lt;br /&gt;
&lt;br /&gt;
ID Range: 0-255&lt;br /&gt;
&lt;br /&gt;
* '''u8''' - Red&lt;br /&gt;
* '''u8''' - Green&lt;br /&gt;
* '''u8''' - Blue&lt;br /&gt;
* '''u8''' - Unused&lt;br /&gt;
&lt;br /&gt;
==DDDATA.BIN==&lt;br /&gt;
Doodad placeability. Referenced by CV5.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 512 Bytes (entire file is 256KB).&lt;br /&gt;
&lt;br /&gt;
ID Range: 0-511&lt;br /&gt;
&lt;br /&gt;
* '''u16[256]''' - CV5 Group IDs to determine doodad placeability. Only the first Doodad Width*Height indexes are used for each. A value of 0 is used on null tiles and can be placed anywhere.&lt;br /&gt;
&lt;br /&gt;
[[Category:StarCraft]]&lt;br /&gt;
[[Category:Reference]]&lt;br /&gt;
[[Category:Modding]]&lt;br /&gt;
[[Category:File Formats]]&lt;/div&gt;</summary>
		<author><name>FaRTy1billion</name></author>	</entry>

	<entry>
		<id>https://staredit.net/wiki/index.php?title=Scenario.chk&amp;diff=686</id>
		<title>Scenario.chk</title>
		<link rel="alternate" type="text/html" href="https://staredit.net/wiki/index.php?title=Scenario.chk&amp;diff=686"/>
				<updated>2023-04-24T03:03:56Z</updated>
		
		<summary type="html">&lt;p&gt;FaRTy1billion: /* &amp;quot;CRGB&amp;quot; - Remastered Player Colors */ fixed bluish grey and pink&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The CHK file is a very dense file found inside the SCM or SCX file (as &amp;quot;staredit\scenario.chk&amp;quot;), which is just a renamed MPQ archive.&lt;br /&gt;
&lt;br /&gt;
In this article, some shorthand will be used for datatypes:&lt;br /&gt;
* '''u8''' for an unsigned byte&lt;br /&gt;
* '''u16''' for an unsigned short (2-byte integer)&lt;br /&gt;
* '''u32''' for an unsigned int (4-byte integer)&lt;br /&gt;
* '''uT[''a'']''' for an array of datatype '''T''' (8, 16, 32) with '''''a''''' number of elements&lt;br /&gt;
* '''uT[''a''][''b'']''' for a two-dimensional array of datatype '''T''', where each element of '''T[''a'']''' will be an array of size '''''b'''''&lt;br /&gt;
&lt;br /&gt;
=Sections=&lt;br /&gt;
The CHK is split into several named chunks (hence the file extension, an abbreviation of ''CHunK'').&lt;br /&gt;
&lt;br /&gt;
Each section begins with an 8-byte header:&lt;br /&gt;
* '''u32''' Name - A 4-byte string uniquely identifying that chunk's purpose.&lt;br /&gt;
* '''u32''' Size - The size, in bytes, of the chunk (not including this header)&lt;br /&gt;
Followed by as many bytes as 'Size', in a format described below.&lt;br /&gt;
&lt;br /&gt;
Some things to keep in mind about the CHK section:&lt;br /&gt;
* Invalid sections can exist and will be ignored. While Size is unsigned, it can safely be a negative value to read a chunk earlier in the file. This allows for &amp;quot;section stacking&amp;quot;, allowing smaller sections to be placed inside of larger ones or duplicate triggers or units to take less space in the file.&lt;br /&gt;
* All sections will marked &amp;quot;Not required.&amp;quot; are never read by StarCraft and can safely be omitted. However they may or may not be read by StarEdit, and may cause the map to be unreadable in an editor.&lt;br /&gt;
* Note &amp;quot;Hybrid&amp;quot;, or &amp;quot;Enhanced&amp;quot;, maps were introduced in 1.04. They are supported both by Original StarCraft and Brood War and usually contain sections for both types (e.g., UPGS and UPGx, TECS and TECx), but both sections aren't necessarily read.&lt;br /&gt;
* Duplicate sections will overwrite previously defined section data, except where noted. Note this only applies to those section that pass the specified &amp;quot;validation&amp;quot; parameters, as any section that does not successfully validate will be ignored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TYPE&amp;quot; - Map Type==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the type of scenario.&lt;br /&gt;
* '''u32''': Specifies the type of scenario:&lt;br /&gt;
** '''0x53574152''' or '''RAWS''' - 1.04 StarCraft and above (&amp;quot;hybrid&amp;quot;)&lt;br /&gt;
** '''0x42574152''' or '''RAWB''' - Brood War&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;VER &amp;quot; - Format Version==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section identifies the file format version.&lt;br /&gt;
* '''u16''': File format version:&lt;br /&gt;
** '''59''' - Starcraft 1.00 (original retail release)&lt;br /&gt;
** '''63''' - Starcraft 1.04 ''(hybrid)''&lt;br /&gt;
** '''64''' - Starcraft Remastered (1.21) ''(hybrid)''&lt;br /&gt;
** '''205''' - Brood War 1.00 ''(1.04)''&lt;br /&gt;
** '''206''' - Starcraft Remastered (1.21) ''(broodwar)''&lt;br /&gt;
This is the only version code section to actually be read by StarCraft (of TYPE, VER , IVER, and IVE2). Any other value is invalid in retail StarCraft and is usually a beta version.&lt;br /&gt;
&lt;br /&gt;
Other unsupported versions include:&lt;br /&gt;
* '''17''' - ''Warcraft II retail (.PUD)''&lt;br /&gt;
* '''19''' - ''Warcraft II Expansion (.PUD)''&lt;br /&gt;
* '''47''' - ''Starcraft Beta''&lt;br /&gt;
* '''57''' - ''Starcraft Prerelease''&lt;br /&gt;
* '''61''' - Brood War internal (map version 61)&lt;br /&gt;
* '''75''' - Brood War internal (map version 75) ''(Broodwar Battle.net Beta)''&lt;br /&gt;
* '''201''' - Brood War internal (map version 201)&lt;br /&gt;
* '''203''' - Brood War internal (map version 203)&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IVER&amp;quot; - Map Version==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section &amp;quot;additionally identifies&amp;quot; the map version.&lt;br /&gt;
* '''u16''': &amp;quot;Additional file format version:&amp;quot;&lt;br /&gt;
** '''9''' - beta/obsolete versions&lt;br /&gt;
** '''10''' - current versions&lt;br /&gt;
When saving as expansion this section gets removed entirely. Contrary to popular belief, it doesn't get &amp;quot;replaced&amp;quot; by IVE2 in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IVE2&amp;quot; - Map Version==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section &amp;quot;additionally identifies&amp;quot; the map version.&lt;br /&gt;
* '''u16''': &amp;quot;Additional file format version:&amp;quot;&lt;br /&gt;
** '''11''' - 1.04 StarCraft and above (&amp;quot;hybrid&amp;quot;) or Brood War.&lt;br /&gt;
This section does not &amp;quot;replace&amp;quot; IVER in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;VCOD&amp;quot; - Verification Code==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be equal to size of the VCOD data in the EXE resource. Must result in valid checksum.''&lt;br /&gt;
&lt;br /&gt;
This section has a verification code to make sure this is actually a CHK file.&lt;br /&gt;
&lt;br /&gt;
* '''u32[256]''': Seed values.&lt;br /&gt;
* '''u8[16]''': Operation codes to produce the resulting hash:&lt;br /&gt;
** '''00''' - XOR's the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''01''' - Adds to the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''02''' - Subtracts from the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''03''' - XOR's the current hash with the VCOD table at index OWNR, SIDE, FORC, and 0&lt;br /&gt;
** '''04''' - same as 0x03&lt;br /&gt;
** '''05''' - same as 0x03&lt;br /&gt;
** '''06''' - Complex function consisting of ORs and shifts&lt;br /&gt;
** '''07''' - Inverted version of 0x06, switching direction of all shifts&lt;br /&gt;
** '''08+''' - Do nothing&lt;br /&gt;
Opcodes and seeds do not have to match those in EXE resource, as long as the same value is produced.&amp;lt;br&amp;gt;&lt;br /&gt;
The only indexes in the seed table that are referenced are those that correspond individual values of [[#&amp;quot;OWNR&amp;quot; - StarCraft Player Types|OWNR]], [[#&amp;quot;SIDE&amp;quot; - Player Races|SIDE]], [[#&amp;quot;FORC&amp;quot; - Force Settings|FORC]] player assignments, and index 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IOWN&amp;quot; - StarEdit Player Types==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the owner of each player.&lt;br /&gt;
* '''u8[12]''': One byte for each player, specifies the owner of the player:&lt;br /&gt;
** '''00''' - Inactive&lt;br /&gt;
** ''01'' - Computer (game)&lt;br /&gt;
** ''02'' - Occupied by Human Player&lt;br /&gt;
** '''03''' - Rescue Passive&lt;br /&gt;
** '''04''' - Unused&lt;br /&gt;
** '''05''' - Computer&lt;br /&gt;
** '''06''' - Human (Open Slot)&lt;br /&gt;
** '''07''' - Neutral&lt;br /&gt;
** ''08'' - Closed slot&lt;br /&gt;
This section is separate from OWNR as a staredit value. Staredit does not display &amp;quot;inactive&amp;quot; as a valid option. Italicized settings denote invalid map options, which may involve a buffer overflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;OWNR&amp;quot; - StarCraft Player Types==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 12 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section designates the controller of a particular player. It is exactly the same as the &amp;quot;IOWN&amp;quot; section, except there is an additional value, 0x00 for Inactive.&lt;br /&gt;
* '''u8[12]''': One byte for each player, specifies the owner of the player:&lt;br /&gt;
** '''00''' - Inactive&lt;br /&gt;
** ''01'' - Computer (game)&lt;br /&gt;
** ''02'' - Occupied by Human Player&lt;br /&gt;
** '''03''' - Rescue Passive&lt;br /&gt;
** '''04''' - Unused&lt;br /&gt;
** '''05''' - Computer&lt;br /&gt;
** '''06''' - Human (Open Slot)&lt;br /&gt;
** '''07''' - Neutral&lt;br /&gt;
** ''08'' - Closed slot&lt;br /&gt;
Italicized settings denote invalid map options, which may involve a buffer overflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;ERA &amp;quot; - Tileset==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section indicates the tileset of the scenario.&lt;br /&gt;
* '''u16''': Designates tileset:&lt;br /&gt;
** '''00''' - Badlands&lt;br /&gt;
** '''01''' - Space Platform&lt;br /&gt;
** '''02''' - Installation&lt;br /&gt;
** '''03''' - Ashworld&lt;br /&gt;
** '''04''' - Jungle&lt;br /&gt;
** '''05''' - Desert&lt;br /&gt;
** '''06''' - Arctic&lt;br /&gt;
** '''07''' - Twilight&lt;br /&gt;
StarCraft masks the tileset indicator's bit value, so bits after the third place (anything after the value &amp;quot;7&amp;quot;) are removed. Thus, 9 (1001 in binary) is interpreted as 1 (0001), 10 (1010) as 2 (0010), etc.&amp;lt;br&amp;gt;&lt;br /&gt;
Desert, Arctic, and Twilight are Brood War-only tilesets.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;DIM &amp;quot; - Map Dimensions==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains the dimensions of the map.&lt;br /&gt;
* '''u16''': Width of the map&lt;br /&gt;
* '''u16''': Height of the map&lt;br /&gt;
The Width/Height of the map is measured in the number of square 32x32p tiles.&amp;lt;br&amp;gt;&lt;br /&gt;
Standard Dimensions are 64, 96, 128, 192, and 256.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SIDE&amp;quot; - Player Races==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 12 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains the species/race of each player.&lt;br /&gt;
* '''u8[12]''': 1 byte per player the species of that player:&lt;br /&gt;
** '''00''' - Zerg&lt;br /&gt;
** '''01''' - Terran&lt;br /&gt;
** '''02''' - Protoss&lt;br /&gt;
** ''03'' - Invalid (Independent), shown as &amp;quot;Unknown&amp;quot; in SC:R lobby&lt;br /&gt;
** ''04'' - Invalid (Neutral), shown as &amp;quot;Unknown&amp;quot;&lt;br /&gt;
** '''05''' - User Select&lt;br /&gt;
** '''06''' - Random (Forced; Acts as a selected race)&lt;br /&gt;
** ''07'' - Inactive, shown as locked &amp;quot;Select Race&amp;quot; option in SC:R lobby&lt;br /&gt;
Italicized settings denote invalid map options. Note Players 9-11 are defaultly Inactive and Player 12 is defaultly Neutral.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MTXM&amp;quot; - StarCraft Terrain==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be less than or equal to 131072 (0x20000) bytes (256 * 256 * 2).''&lt;br /&gt;
&lt;br /&gt;
Terrain section that contains a map of the level's appearance. StarEdit disregards this section and instead uses [[#&amp;quot;TILE&amp;quot; - StarEdit Terrain|TILE]]; it is only used in Starcraft.&lt;br /&gt;
* '''u16[map width * height]''': one integer for each tile.&lt;br /&gt;
Notes about MTXM:&lt;br /&gt;
* The Width/Height of the map is measured in the number of square 32x32p tiles.&lt;br /&gt;
* Tiles in this section are listed from left to right, top to bottom.&lt;br /&gt;
* The values for each integer are their respective &amp;quot;MegaTile&amp;quot; values in the scenario's tileset. If the size of this section is greater than width*height*2, the data following is ignored. If the size of this section is less, the resulting tiles that have not been defined will be null tiles.&lt;br /&gt;
* This section includes doodads as terrain; TILE, which is otherwise identical, doesn't. Out of the terrain sections (TILE, ISOM, and MTXM), SC only reads MTXM for the sake of not having to generate this data on-the-fly: it contains the exact representation of the level's appearance, including doodads. TILE, on the other hand, is directly tied via a tile lookup function to ISOM, and exists for the sake of not having to generate tiles from ISOM on-the-fly in StarEdit.&lt;br /&gt;
* If MTXM section is smaller than (map width*height), then the remaining tiles will be filled with null tiles or tiles specified by previous MTXM sections.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PUNI&amp;quot; - Player Unit Restrictions==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 5700 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains player unit restrictions: it indicates whether the player can or cannot build a particular unit.&lt;br /&gt;
* '''u8[228][12]''': 1 byte for each unit in order of its unit id, then each player, for player availability:&lt;br /&gt;
** '''00''' - That unit is not available for production if the player has 'override defaults' on&lt;br /&gt;
** '''01''' - That unit is available for production if the player has 'override defaults' on&lt;br /&gt;
* '''u8[228]''': 1 byte for each unit in order of it's unit id, for global availability defaults (for all players):&lt;br /&gt;
** '''00''' - That unit is not available for production&lt;br /&gt;
** '''01''' - That unit is available for production&lt;br /&gt;
* '''u8[228][12]''': 1 byte for each unit in order of its unit id, then each player, indicating whether a player uses the global availability defaults.&lt;br /&gt;
** '''00''' - Player overrides defaults for this unit&lt;br /&gt;
** '''01''' - Player uses defaults for this unit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGR&amp;quot; - Upgrade Restrictions==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1748 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;PUPx&amp;quot; - BW Upgrade Restrictions|&amp;quot;PUPx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains player upgrade restrictions: it indicates the starting/maximum levels at/to which a player can perform a particular upgrade.&lt;br /&gt;
* '''u8[46][12]''': 1 byte for the maximum level a player can upgrade to, in order of its upgrade id, then each player&lt;br /&gt;
* '''u8[46][12]''': 1 byte for the level of an upgrade a player starts off with, in order of its upgrade id, then each player&lt;br /&gt;
* '''u8[46]''': 1 byte for the global default maximum level of each upgrade, in order of its upgrade id.&lt;br /&gt;
* '''u8[46]''': 1 byte for the global default starting level of each upgrade, in order of its upgrade id.&lt;br /&gt;
* '''u8[46][12]''': 1 byte for each upgrade in order of its upgrade id, then each player, indicating whether a player uses the global upgrade defaults:&lt;br /&gt;
** '''00''' - Player does not use global upgrade defaults for this upgrade&lt;br /&gt;
** '''01''' - Player uses upgrade defaults for this upgrade&lt;br /&gt;
See [[#List of Upgrade IDs]].&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PTEC&amp;quot; - Tech Restrictions==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 912 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;PTEx&amp;quot; - BW Tech Restrictions|&amp;quot;PTEx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains player technology availability restrictions: it indicates whether a player starts off with a particular technology or can research a particular technology.&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology id, then each player, for player availability:&lt;br /&gt;
** '''00''' - Technology is not available for a player&lt;br /&gt;
** '''01''' - Technology is available for a player&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology id, then each player, for &amp;quot;already researched&amp;quot; status:&lt;br /&gt;
** '''00''' - Technology is not already researched&lt;br /&gt;
** '''01''' - Technology is already researched&lt;br /&gt;
* '''u8[24]''': 1 byte for each technology for global availability defaults:&lt;br /&gt;
** '''00''' - Technology is not available by default&lt;br /&gt;
** '''01''' - Technology is available by default&lt;br /&gt;
* '''u8[24]''': 1 byte for each technology for global &amp;quot;already researched&amp;quot; defaults:&lt;br /&gt;
** '''00''' - Technology is not already researched by default&lt;br /&gt;
** '''01''' - Technology is already researched by default&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology in order of its technology id, then each player, indicating whether a player uses the global defaults:&lt;br /&gt;
** '''00''' - Technology overrides defaults for player&lt;br /&gt;
** '''01''' - Technology uses default settings for player&lt;br /&gt;
See [[#List of Technology IDs]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIT&amp;quot; - Placed Units==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 36 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the pre-placed units on the map and their properties. Each unit on the map gets the following structure:&lt;br /&gt;
* '''u32''': The unit's class instance (sort of a &amp;quot;serial number&amp;quot;)&lt;br /&gt;
* U16''': X coordinate of unit&lt;br /&gt;
* U16''': Y coordinate of unit&lt;br /&gt;
* '''u16''': Unit ID&lt;br /&gt;
* '''u16''': Type of relation to another building (i.e. add-on, nydus link)&lt;br /&gt;
** '''Bit 9''' - Addon Link&lt;br /&gt;
** '''Bit 10''' - Nydus Link&lt;br /&gt;
* '''u16''': Flags of special properties which can be applied to the unit and are valid:&lt;br /&gt;
** '''Bit 0''' - Cloak is valid&lt;br /&gt;
** '''Bit 1''' - Burrow is valid&lt;br /&gt;
** '''Bit 2''' - In transit is valid&lt;br /&gt;
** '''Bit 3''' - Hallucinated is valid&lt;br /&gt;
** '''Bit 4''' - Invincible is valid&lt;br /&gt;
** '''Bit 5-15''' - Unused&lt;br /&gt;
* '''u16''': Out of the elements of the unit data, the properties which can be changed by the map maker:&lt;br /&gt;
** '''Bit 0''' - Owner player is valid (the unit is not a critter, start location, etc.; not a neutral unit)&lt;br /&gt;
** '''Bit 1''' - HP is valid&lt;br /&gt;
** '''Bit 2''' - Shields is valid&lt;br /&gt;
** '''Bit 3''' - Energy is valid (unit is a wraith, etc.)&lt;br /&gt;
** '''Bit 4''' - Resource amount is valid (unit is a mineral patch, vespene geyser, etc.)&lt;br /&gt;
** '''Bit 5''' - Amount in hangar is valid (unit is a reaver, carrier, etc.)&lt;br /&gt;
** '''Bit 6-15''' - Unused&lt;br /&gt;
* '''u8''': Player number of owner (0-based)&lt;br /&gt;
* '''u8''': Hit points % (1-100)&lt;br /&gt;
* '''u8''': Shield points % (1-100)&lt;br /&gt;
* '''u8''': Energy points % (1-100)&lt;br /&gt;
* '''u32''': Resource amount&lt;br /&gt;
* '''u16''': Number of units in hangar&lt;br /&gt;
* '''u16''': Unit state flags&lt;br /&gt;
** '''Bit 0''' - Unit is cloaked&lt;br /&gt;
** '''Bit 1''' - Unit is burrowed&lt;br /&gt;
** '''Bit 2''' - Building is in transit&lt;br /&gt;
** '''Bit 3''' - Unit is hallucinated&lt;br /&gt;
** '''Bit 4''' - Unit is invincible&lt;br /&gt;
** '''Bit 5-15''' - Unused&lt;br /&gt;
* '''u32''': Unused&lt;br /&gt;
* '''u32''': Class instance of the unit to which this unit is related to (i.e. via an add-on, nydus link, etc.). It is &amp;quot;0&amp;quot; if the unit is not linked to any other unit.&lt;br /&gt;
Notes about UNIT:&lt;br /&gt;
* The X/Y coordinates are the center of the sprite of the unit (in pixels).&lt;br /&gt;
* Please edit if you could confirm the bit values to be correct/if you know more bit values.&lt;br /&gt;
* Default values will apply if bit values are unchecked. Defaults: 100% HP, 100% SP, 100% EP, 0 resources, 0 hangar count.&lt;br /&gt;
* This section can be split. Additional UNIT sections will add more units.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;ISOM&amp;quot; - Isometric Terrain==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section is required to place isometric terrain on the map. It provides data about the nature of the isometric &amp;quot;diamonds&amp;quot; (the editing mode of StarEdit).&lt;br /&gt;
* '''u16[ (width / 2 + 1) * (height + 1) * 4 ]''': 4 integers for each 2x1 map rectangle tile (plus one extra tile to the right and bottom of the map), as per the RECT structure. Each rectangle border (left, top, right, bottom) is assigned an &amp;quot;ISOM value.&amp;quot; These form the &amp;quot;diamond&amp;quot; pattern of the map, and each rectangle thus gets two ISOM values associated with it. The index of the rectangle's right tile is that of its left tile + 16.&lt;br /&gt;
** '''Bit 0''' (0x0001) - Flag used by the editor (&amp;quot;Edited&amp;quot;?)&lt;br /&gt;
** '''Bit 1-3''' - Determines the position on the ISOM grid for the given tile edge. Each diamond covers four 2x1 map tiles, so each tile therefore has two edges per diamond.&lt;br /&gt;
*** '''0''' (0x0000) - Top Left tile horizontal edge. Also the default value upon map creation for all tiles and directions.&lt;br /&gt;
*** '''1''' (0x0002) - Top Left tile vertical edge&lt;br /&gt;
*** '''2''' (0x0004) - Top Right tile horizontal edge&lt;br /&gt;
*** '''3''' (0x0006) - Top Right tile vertical edge&lt;br /&gt;
*** '''4''' (0x0008) - Bottom Right tile horizontal edge&lt;br /&gt;
*** '''5''' (0x000A) - Bottom Right tile vertical edge&lt;br /&gt;
*** '''6''' (0x000C) - Bottom Left tile vertical edge&lt;br /&gt;
*** '''7''' (0x000E) - Bottom Left tile horizontal edge&lt;br /&gt;
** '''Bit 4-14''' - ISOM terrain type ID, used to determine what type of terrain is on that edge. This value matches the corresponding edge on the adjacent tile. The ID is related to the CV5 Index, but the actual value is determined by a hardcoded lookup table in the editor. A value of 0 is for square terrain in StarEdit.&lt;br /&gt;
** '''Bit 15''' (0x8000) - Flag used by the editor (&amp;quot;Skipped&amp;quot;?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ISOM_Grid_Values.png]]&lt;br /&gt;
&lt;br /&gt;
First 1 in each value is the terrain type ID (1 for dirt), second digit is the ISOM edge ID. Values inside the diamond are associated with that diamond, values outside are associated with the adjacent diamonds on the ISOM grid.  This arrangement of tiles is tiled across the entire map, forming the full ISOM grid.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TILE&amp;quot; - StarEdit Terrain==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section will only be different from the [[#&amp;quot;MTXM&amp;quot; - StarCraft Terrain|MTXM]] section in tiles where doodads are present.&lt;br /&gt;
* '''u16[ map width * height ]''': 1 integer for each map tile. Moves horizontally across the map.&lt;br /&gt;
The values in TILE are normally directly generated from the ISOM section (see &amp;quot;'ISOM' section&amp;quot; above), and thus do not match that of MTXM on doodad tiles.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;DD2 &amp;quot; - StarEdit Sprites (Doodads)==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section contains the doodad map of the level. There are several parts to doodads. The graphical portion is stored in the [[#&amp;quot;MTXM&amp;quot; - StarCraft Terrain|MTXM]] section. The second part of the doodad is stored in this section. This section is only used by the map editor.&lt;br /&gt;
&lt;br /&gt;
Each doodad in the map gets the following structure:&lt;br /&gt;
* '''u16''': Number of the doodad. Size of the doodad is dependent on this. Doodads are different for each tileset.&lt;br /&gt;
* '''u16''': X coordinate of the doodad unit&lt;br /&gt;
* '''u16''': Y coordinate of the doodad unit&lt;br /&gt;
* '''u8''': Player number that owns the doodad&lt;br /&gt;
* '''u8''': Enabled flag&lt;br /&gt;
** '''00''' - Doodad is enabled (trap can attack, door is closed, etc)&lt;br /&gt;
** '''01''' - Doodad is disabled&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;THG2&amp;quot; - StarCraft Sprites==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 10 bytes.''&lt;br /&gt;
&lt;br /&gt;
The map editor only writes to this section. Starcraft uses this section.&lt;br /&gt;
&lt;br /&gt;
Sprites, usually on doodads, get the following structure.&lt;br /&gt;
* '''u16''': Unit/Sprite number of the sprite&lt;br /&gt;
* '''u16''': X coordinate of the doodad unit&lt;br /&gt;
* '''u16''': Y coordinate of the doodad unit&lt;br /&gt;
* '''u8''': Player number that owns the doodad&lt;br /&gt;
* '''u8''': Unused&lt;br /&gt;
* '''u16''': Flags&lt;br /&gt;
** '''Bit 0-11''' - Unused&lt;br /&gt;
** '''Bit 12''' - Draw as sprite (Determines if it is a sprite or a unit sprite)&lt;br /&gt;
** '''Bit 13''' - Unused&lt;br /&gt;
** '''Bit 14''' - Unused&lt;br /&gt;
** '''Bit 15''' - Disabled (Only valid if Draw as sprite is unchecked, disables the unit)&lt;br /&gt;
This section can be split. Additional THG2 sections will add more sprites.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MASK&amp;quot; - Fog of War Layer==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: This section will always validate.''&lt;br /&gt;
&lt;br /&gt;
This section contains the data on fog of war for each player. This is whether at the start of the game that levels of black space that is available.&lt;br /&gt;
* '''u8[ map width * height ]''': One byte for each map tile. The bits indicate for each player the fog of war.&lt;br /&gt;
** '''Bit 0''' - Player 1's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 1''' - Player 2's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 2''' - Player 3's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 3''' - Player 4's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 4''' - Player 5's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 5''' - Player 6's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 6''' - Player 7's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 7''' - Player 8's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
Any size greater than width*height will be ignored. Any size less will default missing tiles to 0xFF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;STR &amp;quot; - String Data==&lt;br /&gt;
''Required for all versions and all game types (or STRx).''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be at least 1 byte.''&lt;br /&gt;
&lt;br /&gt;
Note, since StarCraft Remastered, the &amp;quot;STRx&amp;quot; section is also possible and it optionally replaces the STR section.&lt;br /&gt;
&lt;br /&gt;
Note, the encoding of text in the STR section is unspecified. Common encodings are CP-1252, CP-949, and later, UTF-8, (but anything is possible)&lt;br /&gt;
&lt;br /&gt;
This section contains all the strings in the map.&lt;br /&gt;
* '''u16''': Number of strings in the section (Default''': 1024)&lt;br /&gt;
* '''u16[Number of strings]''': 1 integer for each string specifying the offset (the spot where the string starts in the section from the start of it).&lt;br /&gt;
* '''Strings''': After the offsets, this is where every string in the map goes, one after another. Each one is terminated by a null character.&lt;br /&gt;
This section can contain more or less then 1024 string offsests and will work in Starcraft.&amp;lt;br&amp;gt;&lt;br /&gt;
By default the first byte in '''Strings''' is a NUL character, and all unused offsets in the STR section point to this NUL character.&lt;br /&gt;
Note that STR sections can be stacked in a similar fashion as MTXM.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;STRx&amp;quot; - String Data==&lt;br /&gt;
''Required for all versions and all game types (or STR)''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be at least 1 byte (assumed, not confirmed).''&lt;br /&gt;
&lt;br /&gt;
Note, the STR section can also exist and optionally replace the STRx section.&lt;br /&gt;
&lt;br /&gt;
Note, the encoding of text in the STRx section is unspecified. Commonly it is UTF-8 but anything is possible.&lt;br /&gt;
&lt;br /&gt;
The STRx section is a simple bit extension to the STR section introduced in StarCraft Remastered.&lt;br /&gt;
&lt;br /&gt;
This section contains all the strings in the map.&lt;br /&gt;
* '''u32''': Number of strings in the section (Default''': 1024)&lt;br /&gt;
* '''u32[Number of strings]''': 1 integer for each string specifying the offset (the spot where the string starts in the section from the start of it).&lt;br /&gt;
* '''Strings''': After the offsets, this is where every string in the map goes, one after another. Each one is terminated by a null character.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPRP&amp;quot; - CUWP Slots==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1280 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section is used whenever the create units with properties trigger is used. Since a slot has to be assigned to the action, this is where each slot is designated.&lt;br /&gt;
&lt;br /&gt;
There are 64 of the following structures regardless of how many are used and it cannot exceed 64.&lt;br /&gt;
* '''u16''': Flag of which special properties can be applied to unit, and are valid.&lt;br /&gt;
** '''Bit 0''' - Cloak bit is valid&lt;br /&gt;
** '''Bit 1''' - Burrowed bit is valid&lt;br /&gt;
** '''Bit 2''' - In transit bit is valid&lt;br /&gt;
** '''Bit 3''' - Hallucinated bit is valid&lt;br /&gt;
** '''Bit 4''' - Invincible bit is valid&lt;br /&gt;
** '''Bit 5-15''' - Unknown/unused&lt;br /&gt;
* '''u16''': Which elements of the unit data are valid, which properties can be changed by the map maker.&lt;br /&gt;
** '''Bit 0''' - Owner player is valid (unit is not neutral)&lt;br /&gt;
** '''Bit 1''' - HP is valid&lt;br /&gt;
** '''Bit 2''' - Shields is valid&lt;br /&gt;
** '''Bit 3''' - Energy is valid&lt;br /&gt;
** '''Bit 4''' - Resource amount is valid (unit is a resource)&lt;br /&gt;
** '''Bit 5''' - Amount in hanger is valid&lt;br /&gt;
** '''Bit 6''' - Unknown/unused&lt;br /&gt;
* '''u8''': Player number that owns unit. Will always be NULL in this section (0)&lt;br /&gt;
* '''u8''': Hit point % (1-100)&lt;br /&gt;
* '''u8''': Shield point % (1-100)&lt;br /&gt;
* '''u8''': Energy point % (1-100)&lt;br /&gt;
* '''u32''': Resource amount (for resources only)&lt;br /&gt;
* '''u16''': # of units in hangar&lt;br /&gt;
* '''u16''': Flags&lt;br /&gt;
** '''Bit 0''' - Unit is cloaked&lt;br /&gt;
** '''Bit 1''' - Unit is burrowed&lt;br /&gt;
** '''Bit 2''' - Building is in transit&lt;br /&gt;
** '''Bit 3''' - Unit is hallucinated&lt;br /&gt;
** '''Bit 4''' - Unit is invincible&lt;br /&gt;
** '''Bit 5-15''' - Unknown/unused&lt;br /&gt;
* '''u32''': Unknown/unused. Padding?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPUS&amp;quot; - CUWP Slots Used==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section goes along with the &amp;quot;UPRP&amp;quot; section. This section just indicates which of the 64 unit properties slot are used.&lt;br /&gt;
* '''u8[64]''': 1 byte for each trigger unit properties slot&lt;br /&gt;
** '''00''' - Properties slot is unused&lt;br /&gt;
** '''01''' - Properties slot is used&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MRGN&amp;quot; - Locations==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: 1280 bytes for retail, 5100 bytes for Hybrid and Broodwar.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the locations that the map uses. In a vanilla map, this section contains 64 locations. In a Hybrid or Brood War map, this section will expand to contain 255 locations.&lt;br /&gt;
&lt;br /&gt;
Each location gets one of the following location entries. The 'Anywhere' location, is ALWAYS location 64.&lt;br /&gt;
* '''u32''': Left (X1) coordinate of location, in pixels (usually 32 pt grid aligned)&lt;br /&gt;
* '''u32''': Top (Y1) coordinate of location, in pixels&lt;br /&gt;
* '''u32''': Right (X2) coordinate of location, in pixels&lt;br /&gt;
* '''u32''': Bottom (Y2) coordinate of location, in pixels&lt;br /&gt;
* '''u16''': String number of the name of this location&lt;br /&gt;
* '''u16''': Location elevation flags. If an elevation is disabled in the location, it's bit will be on (1)&lt;br /&gt;
** '''Bit 0''' - Low elevation&lt;br /&gt;
** '''Bit 1''' - Medium elevation&lt;br /&gt;
** '''Bit 2''' - High elevation&lt;br /&gt;
** '''Bit 3''' - Low air&lt;br /&gt;
** '''Bit 4''' - Medium air&lt;br /&gt;
** '''Bit 5''' - High air&lt;br /&gt;
** '''Bit 6-15''' - Unused&lt;br /&gt;
Note that in typical locations Right is always larger than Left and Bottom is always larger than Top. However, you can reverse one or both of these for [[Inverted Locations]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TRIG&amp;quot; - Triggers==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 2400 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the triggers in the map. This along with [[#&amp;quot;MBRF&amp;quot; - Mission Briefings|MBRF]] is the most complicated section in the entire scenario.chk file as there is a lot of data packed into too little of a space. Refer to the appendix at the bottom of this page for more information.&lt;br /&gt;
For easy reference, since each trigger contains 2400 bytes, the amount of triggers can be gotten by taking the section length and dividing by 2400.&lt;br /&gt;
Every single trigger in the map will have the following format:&lt;br /&gt;
* 16 Conditions (20 byte struct)&amp;lt;br&amp;gt; Every trigger has 16 of the following format, even if only one condition is used. See the appendix for information on which items are used for what conditions.&lt;br /&gt;
** '''u32''': Location number for the condition (1 based -- 0 refers to No Location), EUD Bitmask for a Death condition if the MaskFlag is set to &amp;quot;SC&amp;quot;&lt;br /&gt;
** '''u32''': [[#List of Players/Group IDs|Group]] that the condition applies to&lt;br /&gt;
** '''u32''': Qualified number (how many/resource amount)&lt;br /&gt;
** '''u16''': [[#Trigger Unit Types|Unit ID]] condition applies to&lt;br /&gt;
** '''u8''': [[#Numeric Comparisons|Numeric comparison]], [[#Switch States|switch state]]&lt;br /&gt;
** '''u8''': [[#Trigger Conditions List|Condition byte]]&lt;br /&gt;
** '''u8''': [[#Resource Types|Resource type]], [[#Score Types|score type]], Switch number (0-based)&lt;br /&gt;
** '''u8''': Flags&lt;br /&gt;
*** '''Bit 0''' - Unknown/unused&lt;br /&gt;
*** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled/ignored&lt;br /&gt;
*** '''Bit 2''' - Always display flag.&lt;br /&gt;
*** '''Bit 3''' - Unit properties is used. ('''Note:''' This is used in [[TRG|*.trg]] files)&lt;br /&gt;
*** '''Bit 4''' - Unit type is used. Cleared in &amp;quot;Offset + Mask&amp;quot; EUD conditions. May not be necessary otherwise?&lt;br /&gt;
*** '''Bit 5-7''' - Unknown/unused&lt;br /&gt;
** '''u16''': MaskFlag: set to &amp;quot;SC&amp;quot; (0x53, 0x43) when using the bitmask for EUDs, 0 otherwise&lt;br /&gt;
* 64 Actions (32 byte struct)&amp;lt;br&amp;gt; Immediately following the 16 conditions, there are 64 actions. There will always be 64 of the following structure, even if some of them are unused.&lt;br /&gt;
** '''u32''': Location - source location in &amp;quot;Order&amp;quot; and &amp;quot;Move Unit&amp;quot;, dest location in &amp;quot;Move Location&amp;quot; (1 based -- 0 refers to No Location), EUD Bitmask for a Death action if the MaskFlag is set to &amp;quot;SC&amp;quot;&lt;br /&gt;
** '''u32''': String number for trigger text (0 means no string)&lt;br /&gt;
** '''u32''': WAV string number (0 means no string)&lt;br /&gt;
** '''u32''': Seconds/milliseconds of time&lt;br /&gt;
** '''u32''': First (or only) [[#List of Players/Group IDs|Group/Player]] affected.&lt;br /&gt;
** '''u32''': Second group affected, secondary location (1-based), CUWP #, number, AI script (4-byte string), switch (0-based #)&lt;br /&gt;
** '''u16''': [[#Trigger Unit Types|Unit type]], [[#Score Types|score type]], [[#Resource Types|resource type]], [[#Alliance Statuses|alliance status]]&lt;br /&gt;
** '''u8''': [[#Trigger Actions List|Action byte]]&lt;br /&gt;
** '''u8''': Number of units (0 means All Units), [[#Action States|action state]], [[#Unit Orders|unit order]], [[#Number Modifiers|number modifier]]&lt;br /&gt;
** '''u8''': Flags&lt;br /&gt;
*** '''Bit 0''' - Ignore a wait/transmission once.&lt;br /&gt;
*** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled.&lt;br /&gt;
*** '''Bit 2''' - Always display flag - when not set: if the user has turned off subtitles (see sound options) the text will not display, when set: text will always display&lt;br /&gt;
*** '''Bit 3''' - Unit properties is used. Staredit uses this for *.trg files.&lt;br /&gt;
*** '''Bit 4''' - Unit type is used. Cleared in &amp;quot;Offset + Mask&amp;quot; EUD actions.&lt;br /&gt;
*** '''Bit 5-7''' - Unknown/unused&lt;br /&gt;
** '''u8''': Padding&lt;br /&gt;
** '''u16 (2 bytes)''': MaskFlag: set to &amp;quot;SC&amp;quot; (0x53, 0x43) when using the bitmask for EUDs, 0 otherwise&lt;br /&gt;
* Player Execution&amp;lt;br&amp;gt; Following the 16 conditions and 64 actions, every trigger also has this structure&lt;br /&gt;
** '''u32''': execution flags&lt;br /&gt;
*** '''Bit 0''' - All conditions are met, executing actions, cleared on the next trigger loop.&lt;br /&gt;
*** '''Bit 1''' - Ignore the following actions: Defeat, Draw.&lt;br /&gt;
*** '''Bit 2''' - Preserve trigger. (Can replace Preserve Trigger action)&lt;br /&gt;
*** '''Bit 3''' - Ignore execution.&lt;br /&gt;
*** '''Bit 4''' - Ignore all of the following actions for this trigger until the next trigger loop: Wait, PauseGame, Transmission, PlayWAV, DisplayTextMessage, CenterView, MinimapPing, TalkingPortrait, and MuteUnitSpeech.&lt;br /&gt;
*** '''Bit 5''' - This trigger has paused the game, ignoring subsequent calls to Pause Game (Unpause Game clears this flag only in the same trigger), may automatically call unpause at the end of action execution?&lt;br /&gt;
*** '''Bit 6''' - Wait skipping disabled for this trigger, cleared on next trigger loop.&lt;br /&gt;
*** '''Bit 7-31''' - Unknown/unused&lt;br /&gt;
** '''u8[27]''': 1 byte for each player in the [[#List of Players/Group IDs]]&lt;br /&gt;
*** '''00''' - Trigger is not executed for player&lt;br /&gt;
*** '''01''' - Trigger is executed for player&lt;br /&gt;
** '''u8''': Index of the current action, in StarCraft this is incremented after each action is executed, trigger execution ends when this is 64 (Max Actions) or an action is encountered with Action byte as 0&lt;br /&gt;
This section can be split. Additional TRIG sections will add more triggers.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MBRF&amp;quot; - Mission Briefings==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 2400 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all of the mission briefings shown by the players.&lt;br /&gt;
&lt;br /&gt;
See [[#&amp;quot;TRIG&amp;quot; - Triggers|&amp;quot;TRIG&amp;quot;]] section for format, as it is exactly the same except for the conditions. In this section the 16 conditions are still there, they are all null except for the very first condition, which only has a condition byte of 13. See [[#Mission Briefing Actions List]] for the action bytes for the mission briefing actions.&lt;br /&gt;
&lt;br /&gt;
This section can be split. Additional MBRF sections will add more briefing triggers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SPRP&amp;quot; - Scenario Properties==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4 bytes.''&lt;br /&gt;
&lt;br /&gt;
* '''u16''': String number of the scenario name&lt;br /&gt;
* '''u16''': String number of the scenarios description.&lt;br /&gt;
A string index of 0 for the map name will default it to its file name. A string index of 0 description will default to a predefined string.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;FORC&amp;quot; - Force Settings==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be less than or equal to 20 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the forces and the information about them.&lt;br /&gt;
* '''u8[8]''': 1 byte for each active player, specifying which of the 4 forces (0-based) that the player's on&lt;br /&gt;
* '''u16[4]''': 1 integer for each force, string number of the name of the force&lt;br /&gt;
* '''u8[4]''': 1 byte for each force specifying the properties:&lt;br /&gt;
** '''Bit 0''' - Random start location&lt;br /&gt;
** '''Bit 1''' - Allies&lt;br /&gt;
** '''Bit 2''' - Allied victory&lt;br /&gt;
** '''Bit 3''' - Shared vision&lt;br /&gt;
** '''Bit 4-7''' - Unused&lt;br /&gt;
Notes about FORC:&lt;br /&gt;
* If there is no string specified for a force name, it will default to a &amp;quot;Force #&amp;quot; string.&lt;br /&gt;
* If this section is less than 20 bytes, the remaining bytes are defaulted to 0.&lt;br /&gt;
* Players can be on a force greater than 4, however they will not appear in the game lobby.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;WAV &amp;quot; - WAV String Indexes==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
There are 512 wav entires regardless of how many are actually used.&lt;br /&gt;
* '''u32[512]''': 1 long for each WAV. Indicates a string index is used for a WAV path in the MPQ. If the entry is not used, it will be 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIS&amp;quot; - Unit Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4048 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;UNIx&amp;quot; - BW Unit Settings|&amp;quot;UNIx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains the unit settings for the level:&lt;br /&gt;
* '''u8[228]''': 1 byte for each unit, in order of Unit ID&lt;br /&gt;
** '''00''' - Unit does not use default settings&lt;br /&gt;
** '''01''' - Unit does use default settings&lt;br /&gt;
* '''u32[228]''': Hit points for unit (Note the displayed value is this value / 256, with the low byte being a fractional HP value)&lt;br /&gt;
* '''u16[228]''': Shield points, in order of Unit ID&lt;br /&gt;
* '''u8[228]''': Armor points, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Build time (1/60 seconds), in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Mineral cost, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Gas cost, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': String number, in order of Unit ID&lt;br /&gt;
* '''u16[100]''': Base weapon damage the weapon does, in weapon ID order ([[#List of Unit Weapon IDs]])&lt;br /&gt;
* '''u16[100]''': Upgrade bonus weapon damage, in weapon ID order&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGS&amp;quot; - Upgrade Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 598 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;UPGx&amp;quot; - BW Upgrade Settings|&amp;quot;UPGx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains upgrade settings:&lt;br /&gt;
* '''u8[46]''': 1 byte per each upgrade, in order of upgrade id.&lt;br /&gt;
** '''00''' - Upgrade uses custom settings&lt;br /&gt;
** '''01''' - Upgrade uses default settings&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, time factor for each upgrade, in order of upgrade id.&lt;br /&gt;
See [[#List of Upgrade IDs]] for upgrade ids.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TECS&amp;quot; - Tech Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 216 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;TECx&amp;quot; - BW Tech Settings|&amp;quot;TECx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains technology/special abilities settings:&lt;br /&gt;
* '''u8[24]''': 1 byte per each technology, specifies if the tech overrides the default settings. In order of technology id&lt;br /&gt;
** '''00''' - Technology uses custom settings&lt;br /&gt;
** '''01''' - Technology uses default settings&lt;br /&gt;
* '''u16[24]''': Mineral cost to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Gas cost to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Time required to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Energy cost to cast technology/special ability. In order of technology id.&lt;br /&gt;
See [[#List of Technology IDs]] for technology ids.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SWNM&amp;quot; - Switch Names==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section contains the strings used for each switch. There are 256 switches, and can't be any more or any less.&lt;br /&gt;
* '''u32[256]''': One long for each switch, specifies the string number for the name of each switch. Unnamed switches will have an index of 0, and have a default switch name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;COLR&amp;quot; - Player Colors==&lt;br /&gt;
''Required for Brood War only and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 8 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section indicates what color each player is, but only has effect on Brood War.&lt;br /&gt;
* '''u8[8]''': 1 byte for each player, indicates the color of the player&lt;br /&gt;
** '''00''' - Red (#F40404)&lt;br /&gt;
** '''01''' - Blue (#0C48CC)&lt;br /&gt;
** '''02''' - Teal (#2CB494)&lt;br /&gt;
** '''03''' - Purple (#88409C)&lt;br /&gt;
** '''04''' - Orange (#F88C14)&lt;br /&gt;
** '''05''' - Brown (#703014)&lt;br /&gt;
** '''06''' - White (#CCE0D0)&lt;br /&gt;
** '''07''' - Yellow (#FCFC38)&lt;br /&gt;
** '''08''' - Green (#088008)&lt;br /&gt;
** '''09''' - Pale yellow (#FCFC7C)&lt;br /&gt;
** '''10''' - Tan (#ECC4B0)&lt;br /&gt;
** '''11''' - Azure (Neutral color, #4068D4)&lt;br /&gt;
Other values can be used but may have different results depending on the tileset. Any color value above 11 is an overflow. As of patch 1.18.6, values above 11 result in default player color.&lt;br /&gt;
&lt;br /&gt;
When CRGB is present, this section still defines leaderboard colors.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;CRGB&amp;quot; - Remastered Player Colors==&lt;br /&gt;
''Requirement unknown, but can be in any map type including non-remaster maps.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 32 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''u8[8][3]''': 3 bytes for each player corresponding to an RGB color value&lt;br /&gt;
** '''u8''': R&lt;br /&gt;
** '''u8''': G&lt;br /&gt;
** '''u8''': B, or color ID for type 3&lt;br /&gt;
* '''u8[8]''': Indicates how to select the color for each player&lt;br /&gt;
** '''0''' - Random Predefined&lt;br /&gt;
** '''1''' - Player's Choice&lt;br /&gt;
** '''2''' - Custom RGB Color (RGB value for the corresponding player defined above)&lt;br /&gt;
** '''3''' - Use color ID in the &amp;quot;B&amp;quot; color channel (&amp;quot;R&amp;quot; and &amp;quot;G&amp;quot; values appear to contain junk data); leaderboard color is still defined by COLR section and can be set independently&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SC:R Only color IDs:&amp;lt;br&amp;gt;&lt;br /&gt;
Extends the [[#&amp;quot;COLR&amp;quot; - Player Colors|COLR]] section list of colors, but cannot be used in the COLR section.&lt;br /&gt;
* '''12''' - Pale Green (#74A47C)&lt;br /&gt;
* '''13''' - Blueish Grey (#7290B8)&lt;br /&gt;
* '''14''' - Cyan (#00E4FC)&lt;br /&gt;
* '''15''' - Pink (#FFC4E4)&lt;br /&gt;
* '''16''' - Olive (#808000)&lt;br /&gt;
* '''17''' - Lime (#D2F53C)&lt;br /&gt;
* '''18''' - Navy (#000080)&lt;br /&gt;
* '''19''' - Magenta (#F032E6)&lt;br /&gt;
* '''20''' - Grey (#808080)&lt;br /&gt;
* '''21''' - Black (#3C3C3C)&lt;br /&gt;
* '''22+''' - Random (can pick colors that have been used)&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PUPx&amp;quot; - BW Upgrade Restrictions==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2318 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UPGR&amp;quot; - Upgrade Restrictions|&amp;quot;UPGR&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is identical to UPGR section except it uses the Brood War set of 61 upgrades instead of the original 46.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PTEx&amp;quot; - BW Tech Restrictions==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1672 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;PTEC&amp;quot; - Tech Restrictions|&amp;quot;PTEC&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is identical to PTEC section except it uses the Brood War set of 44 technologies instead of the original 24.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIx&amp;quot; - BW Unit Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4168 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UNIS&amp;quot; - Unit Settings|&amp;quot;UNIS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is indentical to UNIS section except it uses the Brood War set of 130 weapons instead of the original 100.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGx&amp;quot; - BW Upgrade Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 794 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UPGS&amp;quot; - Upgrade Settings|&amp;quot;UPGS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section the same as UPGS except section except it uses the Brood War set of 61 upgrades instead of the original 46, and there is an unused byte after the first set:&lt;br /&gt;
* '''u8[61]''': 1 byte per each upgrade, in order of upgrade id.&lt;br /&gt;
** '''00''' - Upgrade uses custom settings&lt;br /&gt;
** '''01''' - Upgrade uses default settings&lt;br /&gt;
* '''u8''': Unused.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, time factor for each upgrade, in order of upgrade id.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TECx&amp;quot; - BW Tech Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 396 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;TECS&amp;quot; - Tech Settings|&amp;quot;TECS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is indentical to TECS section except it uses the Brood War set of 44 technologies instead of the original 24.&lt;br /&gt;
&lt;br /&gt;
=Appendix=&lt;br /&gt;
A set of references and IDs that should help you easier in the trigger section and the technology/player ids, etc:&lt;br /&gt;
&lt;br /&gt;
==Trigger Conditions List==&lt;br /&gt;
* 0 = No Condition&lt;br /&gt;
* 1 = Countdown Timer(Comparison, QNumber)&lt;br /&gt;
* 2 = Command(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 3 = Bring(Player, Comparison, TUnit, Loc, QNumber)&lt;br /&gt;
* 4 = Accumulate(Player, Comparison, QNumber, ResType)&lt;br /&gt;
* 5 = Kill(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 6 = Command the Most(TUnit)&lt;br /&gt;
* 7 = Commands the Most At(TUnit, Loc)&lt;br /&gt;
* 8 = Most Kills(TUnit)&lt;br /&gt;
* 9 = Highest Score(Score)&lt;br /&gt;
* 10 = Most Resources(ResType)&lt;br /&gt;
* 11 = Switch(Switch)&lt;br /&gt;
* 12 = Elapsed Time(Comparison, QNumber)&lt;br /&gt;
* 13 = Data is a Mission Briefing. Conditions are N/A (Same as Never)&lt;br /&gt;
* 14 = Opponents(Player, Comparison, QNumber)&lt;br /&gt;
* 15 = Deaths(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 16 = Command the Least(TUnit)&lt;br /&gt;
* 17 = Command the Least At(TUnit, Loc)&lt;br /&gt;
* 18 = Least Kills(TUnit)&lt;br /&gt;
* 19 = Lowest Score(Score)&lt;br /&gt;
* 20 = Least Resources(ResType)&lt;br /&gt;
* 21 = Score(Player, Comparison, Score, QNumber)&lt;br /&gt;
* 22 = Always (Same as No Condition)&lt;br /&gt;
* 23 = Never&lt;br /&gt;
&lt;br /&gt;
==Trigger Actions List==&lt;br /&gt;
* 0 = No Action&lt;br /&gt;
* 1 = Victory&lt;br /&gt;
* 2 = Defeat&lt;br /&gt;
* 3 = Preserve Trigger&lt;br /&gt;
* 4 = Wait(Time)&lt;br /&gt;
* 5 = Pause Game (Single player only)&lt;br /&gt;
* 6 = Unpause Game (Single player only)&lt;br /&gt;
* 7 = Transmission(Text, Unit, Loc, Time, Modifier, Wave, WavTime)&lt;br /&gt;
* 8 = Play WAV(Wav, WavTime)&lt;br /&gt;
* 9 = Display Text Message(Text)&lt;br /&gt;
* 10 = Center View(Loc)&lt;br /&gt;
* 11 = Create Unit with Properties(Player, Unit, Number, Loc, UnitProp)&lt;br /&gt;
* 12 = Set Mission Objectives(Text)&lt;br /&gt;
* 13 = Set Switch(Switch, SwAction)&lt;br /&gt;
* 14 = Set Countdown Timer(Time, Modifier)&lt;br /&gt;
* 15 = Run AI Script(AIScript)&lt;br /&gt;
* 16 = Run AI Script At Location(AIScript)&lt;br /&gt;
* 17 = Leader Board (Control) (Text, TUnit)&lt;br /&gt;
* 18 = Leader Board (Control At Location) (Text, TUnit, Loc)&lt;br /&gt;
* 19 = Leader Board (Resources) (Text, ResType)&lt;br /&gt;
* 20 = Leader Board (Kills) (Text, TUnit)&lt;br /&gt;
* 21 = Leader Board (Points) (Text, Score)&lt;br /&gt;
* 22 = Kill Unit (Player, TUnit)&lt;br /&gt;
* 23 = Kill Unit At Location(Player, TUnit, Number, Loc)&lt;br /&gt;
* 24 = Remove Unit(Player, TUnit)&lt;br /&gt;
* 25 = Remove Unit At Location(Player, TUnit, Number, Loc)&lt;br /&gt;
* 26 = Set Resources(Player, Number, Modifier, ResType)&lt;br /&gt;
* 27 = Set Score(Player, Number, Modifier, Score)&lt;br /&gt;
* 28 = Minimap Ping(Loc)&lt;br /&gt;
* 29 = Talking Portrait(Unit, Time)&lt;br /&gt;
* 30 = Mute Unit Speech&lt;br /&gt;
* 31 = Unmute Unit Speech&lt;br /&gt;
* 32 = Leaderboard Computer Players(State)&lt;br /&gt;
* 33 = Leaderboard Goal (Control) (Text, TUnit, Number)&lt;br /&gt;
* 34 = Leaderboard Goal (Control At Location) (Text, TUnit, Number, Loc)&lt;br /&gt;
* 35 = Leaderboard Goal (Resources) (Text, TUnit, Number, ResType)&lt;br /&gt;
* 36 = Leaderboard Goal (Kills) (Text, TUnit, Number)&lt;br /&gt;
* 37 = Leaderboard Goal (Points) (Text, Number, Score)&lt;br /&gt;
* 38 = Move Location(Player, TUnit, SLoc, DLoc)&lt;br /&gt;
* 39 = Move Unit(Player, TUnit, Number, SLoc, DLoc)&lt;br /&gt;
* 40 = Leaderboard (Greed) (Number)&lt;br /&gt;
* 41 = Set Next Scenario(Text) (Single player only)&lt;br /&gt;
* 42 = Set Doodad State(Player, TUnit, Loc, State)&lt;br /&gt;
* 43 = Set Invincibility(Player, TUnit, Loc, State)&lt;br /&gt;
* 44 = Create Unit(Player, Unit, Number, Loc)&lt;br /&gt;
* 45 = Set Deaths(Player, TUnit, Number, Modifier)&lt;br /&gt;
* 46 = Order(Player, TUnit, SLoc, DLoc, Order)&lt;br /&gt;
* 47 = Comment(Text)&lt;br /&gt;
* 48 = Give Units to Player(SPlayer, DPlayer, TUnit, Number, Loc)&lt;br /&gt;
* 49 = Modify Unit Hit Points(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 50 = Modify Unit Energy(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 51 = Modify Unit Shield Points(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 52 = Modify Unit Resource Amount(Player, Number, ModAmount, Loc)&lt;br /&gt;
* 53 = Modify Unit Hanger Count(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 54 = Pause Timer&lt;br /&gt;
* 55 = Unpause Timer&lt;br /&gt;
* 56 = Draw&lt;br /&gt;
* 57 = Set Alliance Status(Player, AllyStatus)&lt;br /&gt;
* 58 = Disable Debug Mode (Single player only)&lt;br /&gt;
* 59 = Enable Debug Mode (Single player only)&lt;br /&gt;
&lt;br /&gt;
==Mission Briefing Actions List==&lt;br /&gt;
* 0 - No Action&lt;br /&gt;
* 1 - Wait(Time)&lt;br /&gt;
* 2 - Play WAV(Wave, WavTime)&lt;br /&gt;
* 3 - Text Message(Text, Time)&lt;br /&gt;
* 4 - Mission Objectives(Text)&lt;br /&gt;
* 5 - Show Portrait(Unit, Slot)&lt;br /&gt;
* 6 - Hide Portrait(Slot)&lt;br /&gt;
* 7 - Display Speaking Portrait(Slot, Time)&lt;br /&gt;
* 8 - Transmission(Text, Slot, Time, Modifier, Wave, WavTime)&lt;br /&gt;
* 9 - Skip Tutorial Enabled&lt;br /&gt;
&lt;br /&gt;
==Switch States==&lt;br /&gt;
* 2 = Switch is set&lt;br /&gt;
* 3 = Switch is cleared&lt;br /&gt;
&lt;br /&gt;
==Numeric Comparisons==&lt;br /&gt;
* 0 = At least&lt;br /&gt;
* 1 = At most&lt;br /&gt;
* 10 = Exactly&lt;br /&gt;
&lt;br /&gt;
==Score Types==&lt;br /&gt;
* 0 = Total&lt;br /&gt;
* 1 = Units&lt;br /&gt;
* 2 = Buildings&lt;br /&gt;
* 3 = Units and Buildings&lt;br /&gt;
* 4 = Kills&lt;br /&gt;
* 5 = Razings&lt;br /&gt;
* 6 = Kills and Razings&lt;br /&gt;
* 7 = Custom&lt;br /&gt;
&lt;br /&gt;
==Resource Types==&lt;br /&gt;
* 0 = Ore&lt;br /&gt;
* 1 = Gas&lt;br /&gt;
* 2 = Ore and Gas&lt;br /&gt;
&lt;br /&gt;
==Alliance Statuses==&lt;br /&gt;
* 0 = Enemy&lt;br /&gt;
* 1 = Ally&lt;br /&gt;
* 2 = Allied Victory&lt;br /&gt;
&lt;br /&gt;
==Unit Orders==&lt;br /&gt;
* 0 = Move&lt;br /&gt;
* 1 = Patrol&lt;br /&gt;
* 2 = Attack&lt;br /&gt;
&lt;br /&gt;
==Action States==&lt;br /&gt;
* 4 = Enabled/Set switch&lt;br /&gt;
* 5  = Disabled/Clear switch&lt;br /&gt;
* 6 = Toggle/Toggle switch&lt;br /&gt;
* 11 = Randomize switch&lt;br /&gt;
&lt;br /&gt;
==Number Modifiers==&lt;br /&gt;
* 7 = Set to&lt;br /&gt;
* 8 = Add&lt;br /&gt;
* 9 = Subtract&lt;br /&gt;
&lt;br /&gt;
==Trigger Unit Types==&lt;br /&gt;
* All normal units (0-227)&lt;br /&gt;
* 228 = None&lt;br /&gt;
* 229 = Any unit&lt;br /&gt;
* 230 = Men&lt;br /&gt;
* 231 = Buildings&lt;br /&gt;
* 232 = Factories&lt;br /&gt;
&lt;br /&gt;
==List of Players/Group IDs==&lt;br /&gt;
* 0 = Player 1&lt;br /&gt;
* 1 = Player 2&lt;br /&gt;
* 2 = Player 3&lt;br /&gt;
* 3 = Player 4&lt;br /&gt;
* 4 = Player 5&lt;br /&gt;
* 5 = Player 6&lt;br /&gt;
* 6 = Player 7&lt;br /&gt;
* 7 = Player 8&lt;br /&gt;
* 8 = Player 9&lt;br /&gt;
* 9 = Player 10&lt;br /&gt;
* 10 = Player 11&lt;br /&gt;
* 11 = Player 12&lt;br /&gt;
* 12 = None (Unused, One-entry Overflow in some cases)&lt;br /&gt;
* 13 = Current Player&lt;br /&gt;
* 14 = Foes&lt;br /&gt;
* 15 = Allies&lt;br /&gt;
* 16 = Neutral Players&lt;br /&gt;
* 17 = All Players&lt;br /&gt;
* 18 = Force 1&lt;br /&gt;
* 19 = Force 2&lt;br /&gt;
* 20 = Force 3&lt;br /&gt;
* 21 = Force 4&lt;br /&gt;
* 22 = Unused 1&lt;br /&gt;
* 23 = Unused 2&lt;br /&gt;
* 24 = Unused 3&lt;br /&gt;
* 25 = Unused 4&lt;br /&gt;
* 26 = Non Allied Victory Players&lt;br /&gt;
&lt;br /&gt;
==List of Technology IDs==&lt;br /&gt;
* 0 = Stim Packs&lt;br /&gt;
* 1 = Lockdown&lt;br /&gt;
* 2 = EMP Shockwave&lt;br /&gt;
* 3 = Spider Mines&lt;br /&gt;
* 4 = Scanner Sweep&lt;br /&gt;
* 5 = Siege Mode&lt;br /&gt;
* 6 = Defensive Matrix&lt;br /&gt;
* 7 = Irradiate&lt;br /&gt;
* 8 = Yamato Gun&lt;br /&gt;
* 9 = Cloaking Field&lt;br /&gt;
* 10 = Personnel Cloaking&lt;br /&gt;
* 11 = Burrowing&lt;br /&gt;
* 12 = Infestation&lt;br /&gt;
* 13 = Spawn Broodling&lt;br /&gt;
* 14 = Dark Swarm&lt;br /&gt;
* 15 = Plague&lt;br /&gt;
* 16 = Consume&lt;br /&gt;
* 17 = Ensnare&lt;br /&gt;
* 18 = Parasite&lt;br /&gt;
* 19 = Psionic Storm&lt;br /&gt;
* 20 = Hallucination&lt;br /&gt;
* 21 = Recall&lt;br /&gt;
* 22 = Stasis Field&lt;br /&gt;
* 23 = Archon Warp&lt;br /&gt;
* 24 = Restoration&lt;br /&gt;
* 25 = Disruption Web&lt;br /&gt;
* 26 = Unused 26&lt;br /&gt;
* 27 = Mind Control&lt;br /&gt;
* 28 = Dark Archon Meld&lt;br /&gt;
* 29 = Feedback&lt;br /&gt;
* 30 = Optical Flare&lt;br /&gt;
* 31 = Maelstorm&lt;br /&gt;
* 32 = Lurker Aspect&lt;br /&gt;
* 33 = Unused 33&lt;br /&gt;
* 34 = Healing&lt;br /&gt;
* 35 = Unused 35&lt;br /&gt;
* 36 = Unused 36&lt;br /&gt;
* 37 = Unused 37&lt;br /&gt;
* 38 = Unused 38&lt;br /&gt;
* 39 = Unused 39&lt;br /&gt;
* 40 = Unused 40&lt;br /&gt;
* 41 = Unused 41&lt;br /&gt;
* 42 = Unused 42&lt;br /&gt;
* 43 = Unused 43&lt;br /&gt;
&lt;br /&gt;
==List of Upgrade IDs==&lt;br /&gt;
* 0 = Terran Infantry Armor&lt;br /&gt;
* 1 = Terran Vehicle Plating&lt;br /&gt;
* 2 = Terran Ship Plating&lt;br /&gt;
* 3 = Zerg Carapace&lt;br /&gt;
* 4 = Zerg Flyer Caparace&lt;br /&gt;
* 5 = Protoss Armor&lt;br /&gt;
* 6 = Protoss Plating&lt;br /&gt;
* 7 = Terran Infantry Weapons&lt;br /&gt;
* 8 = Terran Vehicle Weapons&lt;br /&gt;
* 9 = Terran Ship Weapons&lt;br /&gt;
* 10 = Zerg Melee Attacks&lt;br /&gt;
* 11 = Zerg Missile Attacks&lt;br /&gt;
* 12 = Zerg Flyer Attacks&lt;br /&gt;
* 13 = Protoss Ground Weapons&lt;br /&gt;
* 14 = Protoss Air Weapons&lt;br /&gt;
* 15 = Protoss Plasma Shields&lt;br /&gt;
* 16 = U-238 Shells&lt;br /&gt;
* 17 = Ion Thrusters&lt;br /&gt;
* 18 = Burst Lasers (Unused)&lt;br /&gt;
* 19 = Titan Reactor (SV +50)&lt;br /&gt;
* 20 = Ocular Implants&lt;br /&gt;
* 21 = Moebius Reactor (Ghost +50)&lt;br /&gt;
* 22 = Apollo Reactor (Wraith +50)&lt;br /&gt;
* 23 = Colossus Reactor (BC +50)&lt;br /&gt;
* 24 = Ventral Sacs&lt;br /&gt;
* 25 = Antennae&lt;br /&gt;
* 26 = Pneumatized Carapace&lt;br /&gt;
* 27 = Metabolic Boost&lt;br /&gt;
* 28 = Adrenal Glands&lt;br /&gt;
* 29 = Muscular Augments&lt;br /&gt;
* 30 = Grooved Spines&lt;br /&gt;
* 31 = Gamete Meiosis (Queen +50)&lt;br /&gt;
* 32 = Metasynaptic Node (Defiler +50)&lt;br /&gt;
* 33 = Singularity Charge&lt;br /&gt;
* 34 = Leg Enhancements&lt;br /&gt;
* 35 = Scarab Damage &lt;br /&gt;
* 36 = Reaver Capacity &lt;br /&gt;
* 37 = Gravitic Drive&lt;br /&gt;
* 38 = Sensor Array&lt;br /&gt;
* 39 = Gravitic Boosters&lt;br /&gt;
* 40 = Khaydarin Amulet (HT +50)&lt;br /&gt;
* 41 = Apial Sensors&lt;br /&gt;
* 42 = Gravitic Thrusters&lt;br /&gt;
* 43 = Carrier Capacity&lt;br /&gt;
* 44 = Khaydarin Core (Arbiter +50)&lt;br /&gt;
* 45 = Unknown Upgrade45&lt;br /&gt;
* 46 = Unknown Upgrade46&lt;br /&gt;
* 47 = Argus Jewel (Corsair +50)&lt;br /&gt;
* 48 = Unknown Upgrade48&lt;br /&gt;
* 49 = Argus Talisman (DA +50)&lt;br /&gt;
* 50 = Unknown Upgrade50&lt;br /&gt;
* 51 = Caduceus Reactor (Medic +50)&lt;br /&gt;
* 52 = Chitinous Plating&lt;br /&gt;
* 53 = Anabolic Synthesis&lt;br /&gt;
* 54 = Charon Booster&lt;br /&gt;
* 55 = Unknown Upgrade55&lt;br /&gt;
* 56 = Unknown Upgrade56&lt;br /&gt;
* 57 = Unknown Upgrade57&lt;br /&gt;
* 58 = Unknown Upgrade58&lt;br /&gt;
* 59 = Unknown Upgrade59&lt;br /&gt;
* 60 = Unknown Upgrade60&lt;br /&gt;
&lt;br /&gt;
==List of Unit Weapon IDs==&lt;br /&gt;
* 0 = Gauss Rifle (Normal)&lt;br /&gt;
* 1 = Gauss Rifle (Jim Raynor-Marine)&lt;br /&gt;
* 2 = C-10 Canister Rifle (Normal)&lt;br /&gt;
* 3 = C-10 Canister Rifle (Sarah Kerrigan)&lt;br /&gt;
* 4 = Fragmentation Grenade (Normal)&lt;br /&gt;
* 5 = Fragmentation Grenade (Jim Raynor-Vulture)&lt;br /&gt;
* 6 = Spider Mines&lt;br /&gt;
* 7 = Twin Autocannons (Normal)&lt;br /&gt;
* 8 = Hellfire Missile Pack (Normal)&lt;br /&gt;
* 9 = Twin Autocannons (Alan Schezar)&lt;br /&gt;
* 10 = Hellfire Missile Pack (Alan Schezar)&lt;br /&gt;
* 11 = Arclite Cannon (Normal)&lt;br /&gt;
* 12 = Arclite Cannon (Edmund Duke)&lt;br /&gt;
* 13 = Fusion Cutter&lt;br /&gt;
* 14 = Fusion Cutter (Harvest)&lt;br /&gt;
* 15 = Gemini Missiles (Normal)&lt;br /&gt;
* 16 = Burst Lasers (Normal)&lt;br /&gt;
* 17 = Gemini Missiles (Tom Kazansky)&lt;br /&gt;
* 18 = Burst Lasers (Tom Kazansky)&lt;br /&gt;
* 19 = ATS Laser Battery (Normal)&lt;br /&gt;
* 20 = ATA Laser Battery (Normal)&lt;br /&gt;
* 21 = ATS Laser Battery (Norad II+Mengsk+DuGalle)&lt;br /&gt;
* 22 = ATA Laser Battery (Norad II+Mengsk+DuGalle)&lt;br /&gt;
* 23 = ATS Laser Battery (Hyperion)&lt;br /&gt;
* 24 = ATA Laser Battery (Hyperion)&lt;br /&gt;
* 25 = Flame Thrower (Normal)&lt;br /&gt;
* 26 = Flame Thrower (Gui Montag)&lt;br /&gt;
* 27 = Arclite Shock Cannon (Normal)&lt;br /&gt;
* 28 = Arclite Shock Cannon (Edmund Duke)&lt;br /&gt;
* 29 = Longbolt Missile&lt;br /&gt;
* 30 = Yamato Gun&lt;br /&gt;
* 31 = Nuclear Missile&lt;br /&gt;
* 32 = Lockdown&lt;br /&gt;
* 33 = EMP Shockwave&lt;br /&gt;
* 34 = Irradiate&lt;br /&gt;
* 35 = Claws (Normal)&lt;br /&gt;
* 36 = Claws (Devouring One)&lt;br /&gt;
* 37 = Claws (Infested Kerrigan)&lt;br /&gt;
* 38 = Needle Spines (Normal)&lt;br /&gt;
* 39 = Needle Spines (Hunter Killer)&lt;br /&gt;
* 40 = Kaiser Blades (Normal)&lt;br /&gt;
* 41 = Kaiser Blades (Torrasque)&lt;br /&gt;
* 42 = Toxic Spores (Broodling)&lt;br /&gt;
* 43 = Spines&lt;br /&gt;
* 44 = Spines (Harvest)&lt;br /&gt;
* 45 = Acid Spray (Unused)&lt;br /&gt;
* 46 = Acid Spore (Normal)&lt;br /&gt;
* 47 = Acid Spore (Kukulza-Guardian)&lt;br /&gt;
* 48 = Glave Wurm (Normal)&lt;br /&gt;
* 49 = Glave Wurm (Kukulza-Mutalisk)&lt;br /&gt;
* 50 = Venom (Unused-Defiler)&lt;br /&gt;
* 51 = Venom (Unused-Defiler Hero)&lt;br /&gt;
* 52 = Seeker Spores&lt;br /&gt;
* 53 = Subterranean Tentacle&lt;br /&gt;
* 54 = Suicide (Infested Terran)&lt;br /&gt;
* 55 = Suicide (Scourge)&lt;br /&gt;
* 56 = Parasite&lt;br /&gt;
* 57 = Spawn Broodlings&lt;br /&gt;
* 58 = Ensnare&lt;br /&gt;
* 59 = Dark Swarm&lt;br /&gt;
* 60 = Plague&lt;br /&gt;
* 61 = Consume&lt;br /&gt;
* 62 = Particle Beam&lt;br /&gt;
* 63 = Particle Beam (Harvest)&lt;br /&gt;
* 64 = Psi Blades (Normal)&lt;br /&gt;
* 65 = Psi Blades (Fenix-Zealot)&lt;br /&gt;
* 66 = Phase Disruptor (Normal)&lt;br /&gt;
* 67 = Phase Disruptor (Fenix-Dragoon)&lt;br /&gt;
* 68 = Psi Assault (Normal-Unused)&lt;br /&gt;
* 69 = Psi Assault (Tassadar+Aldaris)&lt;br /&gt;
* 70 = Psionic Shockwave (Normal)&lt;br /&gt;
* 71 = Psionic Shockwave (Tassadar/Zeratul Archon)&lt;br /&gt;
* 72 = Unknown72&lt;br /&gt;
* 73 = Dual Photon Blasters (Normal)&lt;br /&gt;
* 74 = Anti-matter Missiles (Normal)&lt;br /&gt;
* 75 = Dual Photon Blasters (Mojo)&lt;br /&gt;
* 76 = Anti-matter Missiles (Mojo)&lt;br /&gt;
* 77 = Phase Disruptor Cannon (Normal)&lt;br /&gt;
* 78 = Phase Disruptor Cannon (Danimoth)&lt;br /&gt;
* 79 = Pulse Cannon&lt;br /&gt;
* 80 = STS Photon Cannon&lt;br /&gt;
* 81 = STA Photon Cannon&lt;br /&gt;
* 82 = Scarab&lt;br /&gt;
* 83 = Stasis Field&lt;br /&gt;
* 84 = Psi Storm&lt;br /&gt;
* 85 = Warp Blades (Zeratul)&lt;br /&gt;
* 86 = Warp Blades (Dark Templar Hero)&lt;br /&gt;
* 87 = Missiles (Unused)&lt;br /&gt;
* 88 = Laser Battery1 (Unused)&lt;br /&gt;
* 89 = Tormentor Missiles (Unused)&lt;br /&gt;
* 90 = Bombs (Unused)&lt;br /&gt;
* 91 = Raider Gun (Unused)&lt;br /&gt;
* 92 = Laser Battery2 (Unused)&lt;br /&gt;
* 93 = Laser Battery3 (Unused)&lt;br /&gt;
* 94 = Dual Photon Blasters (Unused)&lt;br /&gt;
* 95 = Flechette Grenade (Unused)&lt;br /&gt;
* 96 = Twin Autocannons (Floor Trap)&lt;br /&gt;
* 97 = Hellfire Missile Pack (Wall Trap)&lt;br /&gt;
* 98 = Flame Thrower (Wall Trap)&lt;br /&gt;
* 99 = Hellfire Missile Pack (Floor Trap)&lt;br /&gt;
* 100 = Neutron Flare&lt;br /&gt;
* 101 = Disruption Web&lt;br /&gt;
* 102 = Restoration&lt;br /&gt;
* 103 = Halo Rockets&lt;br /&gt;
* 104 = Corrosive Acid&lt;br /&gt;
* 105 = Mind Control&lt;br /&gt;
* 106 = Feedback&lt;br /&gt;
* 107 = Optical Flare&lt;br /&gt;
* 108 = Maelstrom&lt;br /&gt;
* 109 = Subterranean Spines&lt;br /&gt;
* 110 = Gauss Rifle0 (Unused)&lt;br /&gt;
* 111 = Warp Blades (Normal)&lt;br /&gt;
* 112 = C-10 Canister Rifle (Samir Duran)&lt;br /&gt;
* 113 = C-10 Canister Rifle (Infested Duran)&lt;br /&gt;
* 114 = Dual Photon Blasters (Artanis)&lt;br /&gt;
* 115 = Anti-matter Missiles (Artanis)&lt;br /&gt;
* 116 = C-10 Canister Rifle (Alexei Stukov)&lt;br /&gt;
* 117 = Gauss Rifle1 (Unused)&lt;br /&gt;
* 118 = Gauss Rifle2 (Unused)&lt;br /&gt;
* 119 = Gauss Rifle3 (Unused)&lt;br /&gt;
* 120 = Gauss Rifle4 (Unused)&lt;br /&gt;
* 121 = Gauss Rifle5 (Unused)&lt;br /&gt;
* 122 = Gauss Rifle6 (Unused)&lt;br /&gt;
* 123 = Gauss Rifle7 (Unused)&lt;br /&gt;
* 124 = Gauss Rifle8 (Unused)&lt;br /&gt;
* 125 = Gauss Rifle9 (Unused)&lt;br /&gt;
* 126 = Gauss Rifle10 (Unused)&lt;br /&gt;
* 127 = Gauss Rifle11 (Unused)&lt;br /&gt;
* 128 = Gauss Rifle12 (Unused)&lt;br /&gt;
* 129 = Gauss Rifle13 (Unused)&lt;br /&gt;
* 130 = None&lt;br /&gt;
&lt;br /&gt;
==Complete Modifier List==&lt;br /&gt;
* 0 = Condition: &amp;gt;= (greater than or equal to)&lt;br /&gt;
* 1 = Condition: &amp;lt;= (less than or equal to)&lt;br /&gt;
* 2 = Condition: == TRUE (Is True)&lt;br /&gt;
* 3 = Condition: == FALSE (Is False)&lt;br /&gt;
* 4 = Action: = TRUE (Set to True)&lt;br /&gt;
* 5 = Action: = FALSE (Set to False)&lt;br /&gt;
* 6 = Action: NOT (toggle)&lt;br /&gt;
* 7 = Action: = (Set to)&lt;br /&gt;
* 8 = Action: += (Add)&lt;br /&gt;
* 9 = Action: -= (Subtract)&lt;br /&gt;
* 10 = Condition: == (Exactly)&lt;br /&gt;
* 11 = Action: Randomize&lt;br /&gt;
&lt;br /&gt;
[[Category:StarCraft]]&lt;br /&gt;
[[Category:Reference]]&lt;/div&gt;</summary>
		<author><name>FaRTy1billion</name></author>	</entry>

	<entry>
		<id>https://staredit.net/wiki/index.php?title=Scenario.chk&amp;diff=685</id>
		<title>Scenario.chk</title>
		<link rel="alternate" type="text/html" href="https://staredit.net/wiki/index.php?title=Scenario.chk&amp;diff=685"/>
				<updated>2023-04-24T02:37:25Z</updated>
		
		<summary type="html">&lt;p&gt;FaRTy1billion: /* &amp;quot;CRGB&amp;quot; - Remastered Player Colors */ added hex codes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The CHK file is a very dense file found inside the SCM or SCX file (as &amp;quot;staredit\scenario.chk&amp;quot;), which is just a renamed MPQ archive.&lt;br /&gt;
&lt;br /&gt;
In this article, some shorthand will be used for datatypes:&lt;br /&gt;
* '''u8''' for an unsigned byte&lt;br /&gt;
* '''u16''' for an unsigned short (2-byte integer)&lt;br /&gt;
* '''u32''' for an unsigned int (4-byte integer)&lt;br /&gt;
* '''uT[''a'']''' for an array of datatype '''T''' (8, 16, 32) with '''''a''''' number of elements&lt;br /&gt;
* '''uT[''a''][''b'']''' for a two-dimensional array of datatype '''T''', where each element of '''T[''a'']''' will be an array of size '''''b'''''&lt;br /&gt;
&lt;br /&gt;
=Sections=&lt;br /&gt;
The CHK is split into several named chunks (hence the file extension, an abbreviation of ''CHunK'').&lt;br /&gt;
&lt;br /&gt;
Each section begins with an 8-byte header:&lt;br /&gt;
* '''u32''' Name - A 4-byte string uniquely identifying that chunk's purpose.&lt;br /&gt;
* '''u32''' Size - The size, in bytes, of the chunk (not including this header)&lt;br /&gt;
Followed by as many bytes as 'Size', in a format described below.&lt;br /&gt;
&lt;br /&gt;
Some things to keep in mind about the CHK section:&lt;br /&gt;
* Invalid sections can exist and will be ignored. While Size is unsigned, it can safely be a negative value to read a chunk earlier in the file. This allows for &amp;quot;section stacking&amp;quot;, allowing smaller sections to be placed inside of larger ones or duplicate triggers or units to take less space in the file.&lt;br /&gt;
* All sections will marked &amp;quot;Not required.&amp;quot; are never read by StarCraft and can safely be omitted. However they may or may not be read by StarEdit, and may cause the map to be unreadable in an editor.&lt;br /&gt;
* Note &amp;quot;Hybrid&amp;quot;, or &amp;quot;Enhanced&amp;quot;, maps were introduced in 1.04. They are supported both by Original StarCraft and Brood War and usually contain sections for both types (e.g., UPGS and UPGx, TECS and TECx), but both sections aren't necessarily read.&lt;br /&gt;
* Duplicate sections will overwrite previously defined section data, except where noted. Note this only applies to those section that pass the specified &amp;quot;validation&amp;quot; parameters, as any section that does not successfully validate will be ignored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TYPE&amp;quot; - Map Type==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the type of scenario.&lt;br /&gt;
* '''u32''': Specifies the type of scenario:&lt;br /&gt;
** '''0x53574152''' or '''RAWS''' - 1.04 StarCraft and above (&amp;quot;hybrid&amp;quot;)&lt;br /&gt;
** '''0x42574152''' or '''RAWB''' - Brood War&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;VER &amp;quot; - Format Version==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section identifies the file format version.&lt;br /&gt;
* '''u16''': File format version:&lt;br /&gt;
** '''59''' - Starcraft 1.00 (original retail release)&lt;br /&gt;
** '''63''' - Starcraft 1.04 ''(hybrid)''&lt;br /&gt;
** '''64''' - Starcraft Remastered (1.21) ''(hybrid)''&lt;br /&gt;
** '''205''' - Brood War 1.00 ''(1.04)''&lt;br /&gt;
** '''206''' - Starcraft Remastered (1.21) ''(broodwar)''&lt;br /&gt;
This is the only version code section to actually be read by StarCraft (of TYPE, VER , IVER, and IVE2). Any other value is invalid in retail StarCraft and is usually a beta version.&lt;br /&gt;
&lt;br /&gt;
Other unsupported versions include:&lt;br /&gt;
* '''17''' - ''Warcraft II retail (.PUD)''&lt;br /&gt;
* '''19''' - ''Warcraft II Expansion (.PUD)''&lt;br /&gt;
* '''47''' - ''Starcraft Beta''&lt;br /&gt;
* '''57''' - ''Starcraft Prerelease''&lt;br /&gt;
* '''61''' - Brood War internal (map version 61)&lt;br /&gt;
* '''75''' - Brood War internal (map version 75) ''(Broodwar Battle.net Beta)''&lt;br /&gt;
* '''201''' - Brood War internal (map version 201)&lt;br /&gt;
* '''203''' - Brood War internal (map version 203)&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IVER&amp;quot; - Map Version==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section &amp;quot;additionally identifies&amp;quot; the map version.&lt;br /&gt;
* '''u16''': &amp;quot;Additional file format version:&amp;quot;&lt;br /&gt;
** '''9''' - beta/obsolete versions&lt;br /&gt;
** '''10''' - current versions&lt;br /&gt;
When saving as expansion this section gets removed entirely. Contrary to popular belief, it doesn't get &amp;quot;replaced&amp;quot; by IVE2 in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IVE2&amp;quot; - Map Version==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section &amp;quot;additionally identifies&amp;quot; the map version.&lt;br /&gt;
* '''u16''': &amp;quot;Additional file format version:&amp;quot;&lt;br /&gt;
** '''11''' - 1.04 StarCraft and above (&amp;quot;hybrid&amp;quot;) or Brood War.&lt;br /&gt;
This section does not &amp;quot;replace&amp;quot; IVER in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;VCOD&amp;quot; - Verification Code==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be equal to size of the VCOD data in the EXE resource. Must result in valid checksum.''&lt;br /&gt;
&lt;br /&gt;
This section has a verification code to make sure this is actually a CHK file.&lt;br /&gt;
&lt;br /&gt;
* '''u32[256]''': Seed values.&lt;br /&gt;
* '''u8[16]''': Operation codes to produce the resulting hash:&lt;br /&gt;
** '''00''' - XOR's the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''01''' - Adds to the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''02''' - Subtracts from the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''03''' - XOR's the current hash with the VCOD table at index OWNR, SIDE, FORC, and 0&lt;br /&gt;
** '''04''' - same as 0x03&lt;br /&gt;
** '''05''' - same as 0x03&lt;br /&gt;
** '''06''' - Complex function consisting of ORs and shifts&lt;br /&gt;
** '''07''' - Inverted version of 0x06, switching direction of all shifts&lt;br /&gt;
** '''08+''' - Do nothing&lt;br /&gt;
Opcodes and seeds do not have to match those in EXE resource, as long as the same value is produced.&amp;lt;br&amp;gt;&lt;br /&gt;
The only indexes in the seed table that are referenced are those that correspond individual values of [[#&amp;quot;OWNR&amp;quot; - StarCraft Player Types|OWNR]], [[#&amp;quot;SIDE&amp;quot; - Player Races|SIDE]], [[#&amp;quot;FORC&amp;quot; - Force Settings|FORC]] player assignments, and index 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IOWN&amp;quot; - StarEdit Player Types==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the owner of each player.&lt;br /&gt;
* '''u8[12]''': One byte for each player, specifies the owner of the player:&lt;br /&gt;
** '''00''' - Inactive&lt;br /&gt;
** ''01'' - Computer (game)&lt;br /&gt;
** ''02'' - Occupied by Human Player&lt;br /&gt;
** '''03''' - Rescue Passive&lt;br /&gt;
** '''04''' - Unused&lt;br /&gt;
** '''05''' - Computer&lt;br /&gt;
** '''06''' - Human (Open Slot)&lt;br /&gt;
** '''07''' - Neutral&lt;br /&gt;
** ''08'' - Closed slot&lt;br /&gt;
This section is separate from OWNR as a staredit value. Staredit does not display &amp;quot;inactive&amp;quot; as a valid option. Italicized settings denote invalid map options, which may involve a buffer overflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;OWNR&amp;quot; - StarCraft Player Types==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 12 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section designates the controller of a particular player. It is exactly the same as the &amp;quot;IOWN&amp;quot; section, except there is an additional value, 0x00 for Inactive.&lt;br /&gt;
* '''u8[12]''': One byte for each player, specifies the owner of the player:&lt;br /&gt;
** '''00''' - Inactive&lt;br /&gt;
** ''01'' - Computer (game)&lt;br /&gt;
** ''02'' - Occupied by Human Player&lt;br /&gt;
** '''03''' - Rescue Passive&lt;br /&gt;
** '''04''' - Unused&lt;br /&gt;
** '''05''' - Computer&lt;br /&gt;
** '''06''' - Human (Open Slot)&lt;br /&gt;
** '''07''' - Neutral&lt;br /&gt;
** ''08'' - Closed slot&lt;br /&gt;
Italicized settings denote invalid map options, which may involve a buffer overflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;ERA &amp;quot; - Tileset==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section indicates the tileset of the scenario.&lt;br /&gt;
* '''u16''': Designates tileset:&lt;br /&gt;
** '''00''' - Badlands&lt;br /&gt;
** '''01''' - Space Platform&lt;br /&gt;
** '''02''' - Installation&lt;br /&gt;
** '''03''' - Ashworld&lt;br /&gt;
** '''04''' - Jungle&lt;br /&gt;
** '''05''' - Desert&lt;br /&gt;
** '''06''' - Arctic&lt;br /&gt;
** '''07''' - Twilight&lt;br /&gt;
StarCraft masks the tileset indicator's bit value, so bits after the third place (anything after the value &amp;quot;7&amp;quot;) are removed. Thus, 9 (1001 in binary) is interpreted as 1 (0001), 10 (1010) as 2 (0010), etc.&amp;lt;br&amp;gt;&lt;br /&gt;
Desert, Arctic, and Twilight are Brood War-only tilesets.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;DIM &amp;quot; - Map Dimensions==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains the dimensions of the map.&lt;br /&gt;
* '''u16''': Width of the map&lt;br /&gt;
* '''u16''': Height of the map&lt;br /&gt;
The Width/Height of the map is measured in the number of square 32x32p tiles.&amp;lt;br&amp;gt;&lt;br /&gt;
Standard Dimensions are 64, 96, 128, 192, and 256.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SIDE&amp;quot; - Player Races==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 12 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains the species/race of each player.&lt;br /&gt;
* '''u8[12]''': 1 byte per player the species of that player:&lt;br /&gt;
** '''00''' - Zerg&lt;br /&gt;
** '''01''' - Terran&lt;br /&gt;
** '''02''' - Protoss&lt;br /&gt;
** ''03'' - Invalid (Independent), shown as &amp;quot;Unknown&amp;quot; in SC:R lobby&lt;br /&gt;
** ''04'' - Invalid (Neutral), shown as &amp;quot;Unknown&amp;quot;&lt;br /&gt;
** '''05''' - User Select&lt;br /&gt;
** '''06''' - Random (Forced; Acts as a selected race)&lt;br /&gt;
** ''07'' - Inactive, shown as locked &amp;quot;Select Race&amp;quot; option in SC:R lobby&lt;br /&gt;
Italicized settings denote invalid map options. Note Players 9-11 are defaultly Inactive and Player 12 is defaultly Neutral.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MTXM&amp;quot; - StarCraft Terrain==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be less than or equal to 131072 (0x20000) bytes (256 * 256 * 2).''&lt;br /&gt;
&lt;br /&gt;
Terrain section that contains a map of the level's appearance. StarEdit disregards this section and instead uses [[#&amp;quot;TILE&amp;quot; - StarEdit Terrain|TILE]]; it is only used in Starcraft.&lt;br /&gt;
* '''u16[map width * height]''': one integer for each tile.&lt;br /&gt;
Notes about MTXM:&lt;br /&gt;
* The Width/Height of the map is measured in the number of square 32x32p tiles.&lt;br /&gt;
* Tiles in this section are listed from left to right, top to bottom.&lt;br /&gt;
* The values for each integer are their respective &amp;quot;MegaTile&amp;quot; values in the scenario's tileset. If the size of this section is greater than width*height*2, the data following is ignored. If the size of this section is less, the resulting tiles that have not been defined will be null tiles.&lt;br /&gt;
* This section includes doodads as terrain; TILE, which is otherwise identical, doesn't. Out of the terrain sections (TILE, ISOM, and MTXM), SC only reads MTXM for the sake of not having to generate this data on-the-fly: it contains the exact representation of the level's appearance, including doodads. TILE, on the other hand, is directly tied via a tile lookup function to ISOM, and exists for the sake of not having to generate tiles from ISOM on-the-fly in StarEdit.&lt;br /&gt;
* If MTXM section is smaller than (map width*height), then the remaining tiles will be filled with null tiles or tiles specified by previous MTXM sections.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PUNI&amp;quot; - Player Unit Restrictions==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 5700 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains player unit restrictions: it indicates whether the player can or cannot build a particular unit.&lt;br /&gt;
* '''u8[228][12]''': 1 byte for each unit in order of its unit id, then each player, for player availability:&lt;br /&gt;
** '''00''' - That unit is not available for production if the player has 'override defaults' on&lt;br /&gt;
** '''01''' - That unit is available for production if the player has 'override defaults' on&lt;br /&gt;
* '''u8[228]''': 1 byte for each unit in order of it's unit id, for global availability defaults (for all players):&lt;br /&gt;
** '''00''' - That unit is not available for production&lt;br /&gt;
** '''01''' - That unit is available for production&lt;br /&gt;
* '''u8[228][12]''': 1 byte for each unit in order of its unit id, then each player, indicating whether a player uses the global availability defaults.&lt;br /&gt;
** '''00''' - Player overrides defaults for this unit&lt;br /&gt;
** '''01''' - Player uses defaults for this unit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGR&amp;quot; - Upgrade Restrictions==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1748 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;PUPx&amp;quot; - BW Upgrade Restrictions|&amp;quot;PUPx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains player upgrade restrictions: it indicates the starting/maximum levels at/to which a player can perform a particular upgrade.&lt;br /&gt;
* '''u8[46][12]''': 1 byte for the maximum level a player can upgrade to, in order of its upgrade id, then each player&lt;br /&gt;
* '''u8[46][12]''': 1 byte for the level of an upgrade a player starts off with, in order of its upgrade id, then each player&lt;br /&gt;
* '''u8[46]''': 1 byte for the global default maximum level of each upgrade, in order of its upgrade id.&lt;br /&gt;
* '''u8[46]''': 1 byte for the global default starting level of each upgrade, in order of its upgrade id.&lt;br /&gt;
* '''u8[46][12]''': 1 byte for each upgrade in order of its upgrade id, then each player, indicating whether a player uses the global upgrade defaults:&lt;br /&gt;
** '''00''' - Player does not use global upgrade defaults for this upgrade&lt;br /&gt;
** '''01''' - Player uses upgrade defaults for this upgrade&lt;br /&gt;
See [[#List of Upgrade IDs]].&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PTEC&amp;quot; - Tech Restrictions==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 912 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;PTEx&amp;quot; - BW Tech Restrictions|&amp;quot;PTEx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains player technology availability restrictions: it indicates whether a player starts off with a particular technology or can research a particular technology.&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology id, then each player, for player availability:&lt;br /&gt;
** '''00''' - Technology is not available for a player&lt;br /&gt;
** '''01''' - Technology is available for a player&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology id, then each player, for &amp;quot;already researched&amp;quot; status:&lt;br /&gt;
** '''00''' - Technology is not already researched&lt;br /&gt;
** '''01''' - Technology is already researched&lt;br /&gt;
* '''u8[24]''': 1 byte for each technology for global availability defaults:&lt;br /&gt;
** '''00''' - Technology is not available by default&lt;br /&gt;
** '''01''' - Technology is available by default&lt;br /&gt;
* '''u8[24]''': 1 byte for each technology for global &amp;quot;already researched&amp;quot; defaults:&lt;br /&gt;
** '''00''' - Technology is not already researched by default&lt;br /&gt;
** '''01''' - Technology is already researched by default&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology in order of its technology id, then each player, indicating whether a player uses the global defaults:&lt;br /&gt;
** '''00''' - Technology overrides defaults for player&lt;br /&gt;
** '''01''' - Technology uses default settings for player&lt;br /&gt;
See [[#List of Technology IDs]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIT&amp;quot; - Placed Units==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 36 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the pre-placed units on the map and their properties. Each unit on the map gets the following structure:&lt;br /&gt;
* '''u32''': The unit's class instance (sort of a &amp;quot;serial number&amp;quot;)&lt;br /&gt;
* U16''': X coordinate of unit&lt;br /&gt;
* U16''': Y coordinate of unit&lt;br /&gt;
* '''u16''': Unit ID&lt;br /&gt;
* '''u16''': Type of relation to another building (i.e. add-on, nydus link)&lt;br /&gt;
** '''Bit 9''' - Addon Link&lt;br /&gt;
** '''Bit 10''' - Nydus Link&lt;br /&gt;
* '''u16''': Flags of special properties which can be applied to the unit and are valid:&lt;br /&gt;
** '''Bit 0''' - Cloak is valid&lt;br /&gt;
** '''Bit 1''' - Burrow is valid&lt;br /&gt;
** '''Bit 2''' - In transit is valid&lt;br /&gt;
** '''Bit 3''' - Hallucinated is valid&lt;br /&gt;
** '''Bit 4''' - Invincible is valid&lt;br /&gt;
** '''Bit 5-15''' - Unused&lt;br /&gt;
* '''u16''': Out of the elements of the unit data, the properties which can be changed by the map maker:&lt;br /&gt;
** '''Bit 0''' - Owner player is valid (the unit is not a critter, start location, etc.; not a neutral unit)&lt;br /&gt;
** '''Bit 1''' - HP is valid&lt;br /&gt;
** '''Bit 2''' - Shields is valid&lt;br /&gt;
** '''Bit 3''' - Energy is valid (unit is a wraith, etc.)&lt;br /&gt;
** '''Bit 4''' - Resource amount is valid (unit is a mineral patch, vespene geyser, etc.)&lt;br /&gt;
** '''Bit 5''' - Amount in hangar is valid (unit is a reaver, carrier, etc.)&lt;br /&gt;
** '''Bit 6-15''' - Unused&lt;br /&gt;
* '''u8''': Player number of owner (0-based)&lt;br /&gt;
* '''u8''': Hit points % (1-100)&lt;br /&gt;
* '''u8''': Shield points % (1-100)&lt;br /&gt;
* '''u8''': Energy points % (1-100)&lt;br /&gt;
* '''u32''': Resource amount&lt;br /&gt;
* '''u16''': Number of units in hangar&lt;br /&gt;
* '''u16''': Unit state flags&lt;br /&gt;
** '''Bit 0''' - Unit is cloaked&lt;br /&gt;
** '''Bit 1''' - Unit is burrowed&lt;br /&gt;
** '''Bit 2''' - Building is in transit&lt;br /&gt;
** '''Bit 3''' - Unit is hallucinated&lt;br /&gt;
** '''Bit 4''' - Unit is invincible&lt;br /&gt;
** '''Bit 5-15''' - Unused&lt;br /&gt;
* '''u32''': Unused&lt;br /&gt;
* '''u32''': Class instance of the unit to which this unit is related to (i.e. via an add-on, nydus link, etc.). It is &amp;quot;0&amp;quot; if the unit is not linked to any other unit.&lt;br /&gt;
Notes about UNIT:&lt;br /&gt;
* The X/Y coordinates are the center of the sprite of the unit (in pixels).&lt;br /&gt;
* Please edit if you could confirm the bit values to be correct/if you know more bit values.&lt;br /&gt;
* Default values will apply if bit values are unchecked. Defaults: 100% HP, 100% SP, 100% EP, 0 resources, 0 hangar count.&lt;br /&gt;
* This section can be split. Additional UNIT sections will add more units.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;ISOM&amp;quot; - Isometric Terrain==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section is required to place isometric terrain on the map. It provides data about the nature of the isometric &amp;quot;diamonds&amp;quot; (the editing mode of StarEdit).&lt;br /&gt;
* '''u16[ (width / 2 + 1) * (height + 1) * 4 ]''': 4 integers for each 2x1 map rectangle tile (plus one extra tile to the right and bottom of the map), as per the RECT structure. Each rectangle border (left, top, right, bottom) is assigned an &amp;quot;ISOM value.&amp;quot; These form the &amp;quot;diamond&amp;quot; pattern of the map, and each rectangle thus gets two ISOM values associated with it. The index of the rectangle's right tile is that of its left tile + 16.&lt;br /&gt;
** '''Bit 0''' (0x0001) - Flag used by the editor (&amp;quot;Edited&amp;quot;?)&lt;br /&gt;
** '''Bit 1-3''' - Determines the position on the ISOM grid for the given tile edge. Each diamond covers four 2x1 map tiles, so each tile therefore has two edges per diamond.&lt;br /&gt;
*** '''0''' (0x0000) - Top Left tile horizontal edge. Also the default value upon map creation for all tiles and directions.&lt;br /&gt;
*** '''1''' (0x0002) - Top Left tile vertical edge&lt;br /&gt;
*** '''2''' (0x0004) - Top Right tile horizontal edge&lt;br /&gt;
*** '''3''' (0x0006) - Top Right tile vertical edge&lt;br /&gt;
*** '''4''' (0x0008) - Bottom Right tile horizontal edge&lt;br /&gt;
*** '''5''' (0x000A) - Bottom Right tile vertical edge&lt;br /&gt;
*** '''6''' (0x000C) - Bottom Left tile vertical edge&lt;br /&gt;
*** '''7''' (0x000E) - Bottom Left tile horizontal edge&lt;br /&gt;
** '''Bit 4-14''' - ISOM terrain type ID, used to determine what type of terrain is on that edge. This value matches the corresponding edge on the adjacent tile. The ID is related to the CV5 Index, but the actual value is determined by a hardcoded lookup table in the editor. A value of 0 is for square terrain in StarEdit.&lt;br /&gt;
** '''Bit 15''' (0x8000) - Flag used by the editor (&amp;quot;Skipped&amp;quot;?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ISOM_Grid_Values.png]]&lt;br /&gt;
&lt;br /&gt;
First 1 in each value is the terrain type ID (1 for dirt), second digit is the ISOM edge ID. Values inside the diamond are associated with that diamond, values outside are associated with the adjacent diamonds on the ISOM grid.  This arrangement of tiles is tiled across the entire map, forming the full ISOM grid.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TILE&amp;quot; - StarEdit Terrain==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section will only be different from the [[#&amp;quot;MTXM&amp;quot; - StarCraft Terrain|MTXM]] section in tiles where doodads are present.&lt;br /&gt;
* '''u16[ map width * height ]''': 1 integer for each map tile. Moves horizontally across the map.&lt;br /&gt;
The values in TILE are normally directly generated from the ISOM section (see &amp;quot;'ISOM' section&amp;quot; above), and thus do not match that of MTXM on doodad tiles.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;DD2 &amp;quot; - StarEdit Sprites (Doodads)==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section contains the doodad map of the level. There are several parts to doodads. The graphical portion is stored in the [[#&amp;quot;MTXM&amp;quot; - StarCraft Terrain|MTXM]] section. The second part of the doodad is stored in this section. This section is only used by the map editor.&lt;br /&gt;
&lt;br /&gt;
Each doodad in the map gets the following structure:&lt;br /&gt;
* '''u16''': Number of the doodad. Size of the doodad is dependent on this. Doodads are different for each tileset.&lt;br /&gt;
* '''u16''': X coordinate of the doodad unit&lt;br /&gt;
* '''u16''': Y coordinate of the doodad unit&lt;br /&gt;
* '''u8''': Player number that owns the doodad&lt;br /&gt;
* '''u8''': Enabled flag&lt;br /&gt;
** '''00''' - Doodad is enabled (trap can attack, door is closed, etc)&lt;br /&gt;
** '''01''' - Doodad is disabled&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;THG2&amp;quot; - StarCraft Sprites==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 10 bytes.''&lt;br /&gt;
&lt;br /&gt;
The map editor only writes to this section. Starcraft uses this section.&lt;br /&gt;
&lt;br /&gt;
Sprites, usually on doodads, get the following structure.&lt;br /&gt;
* '''u16''': Unit/Sprite number of the sprite&lt;br /&gt;
* '''u16''': X coordinate of the doodad unit&lt;br /&gt;
* '''u16''': Y coordinate of the doodad unit&lt;br /&gt;
* '''u8''': Player number that owns the doodad&lt;br /&gt;
* '''u8''': Unused&lt;br /&gt;
* '''u16''': Flags&lt;br /&gt;
** '''Bit 0-11''' - Unused&lt;br /&gt;
** '''Bit 12''' - Draw as sprite (Determines if it is a sprite or a unit sprite)&lt;br /&gt;
** '''Bit 13''' - Unused&lt;br /&gt;
** '''Bit 14''' - Unused&lt;br /&gt;
** '''Bit 15''' - Disabled (Only valid if Draw as sprite is unchecked, disables the unit)&lt;br /&gt;
This section can be split. Additional THG2 sections will add more sprites.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MASK&amp;quot; - Fog of War Layer==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: This section will always validate.''&lt;br /&gt;
&lt;br /&gt;
This section contains the data on fog of war for each player. This is whether at the start of the game that levels of black space that is available.&lt;br /&gt;
* '''u8[ map width * height ]''': One byte for each map tile. The bits indicate for each player the fog of war.&lt;br /&gt;
** '''Bit 0''' - Player 1's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 1''' - Player 2's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 2''' - Player 3's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 3''' - Player 4's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 4''' - Player 5's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 5''' - Player 6's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 6''' - Player 7's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 7''' - Player 8's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
Any size greater than width*height will be ignored. Any size less will default missing tiles to 0xFF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;STR &amp;quot; - String Data==&lt;br /&gt;
''Required for all versions and all game types (or STRx).''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be at least 1 byte.''&lt;br /&gt;
&lt;br /&gt;
Note, since StarCraft Remastered, the &amp;quot;STRx&amp;quot; section is also possible and it optionally replaces the STR section.&lt;br /&gt;
&lt;br /&gt;
Note, the encoding of text in the STR section is unspecified. Common encodings are CP-1252, CP-949, and later, UTF-8, (but anything is possible)&lt;br /&gt;
&lt;br /&gt;
This section contains all the strings in the map.&lt;br /&gt;
* '''u16''': Number of strings in the section (Default''': 1024)&lt;br /&gt;
* '''u16[Number of strings]''': 1 integer for each string specifying the offset (the spot where the string starts in the section from the start of it).&lt;br /&gt;
* '''Strings''': After the offsets, this is where every string in the map goes, one after another. Each one is terminated by a null character.&lt;br /&gt;
This section can contain more or less then 1024 string offsests and will work in Starcraft.&amp;lt;br&amp;gt;&lt;br /&gt;
By default the first byte in '''Strings''' is a NUL character, and all unused offsets in the STR section point to this NUL character.&lt;br /&gt;
Note that STR sections can be stacked in a similar fashion as MTXM.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;STRx&amp;quot; - String Data==&lt;br /&gt;
''Required for all versions and all game types (or STR)''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be at least 1 byte (assumed, not confirmed).''&lt;br /&gt;
&lt;br /&gt;
Note, the STR section can also exist and optionally replace the STRx section.&lt;br /&gt;
&lt;br /&gt;
Note, the encoding of text in the STRx section is unspecified. Commonly it is UTF-8 but anything is possible.&lt;br /&gt;
&lt;br /&gt;
The STRx section is a simple bit extension to the STR section introduced in StarCraft Remastered.&lt;br /&gt;
&lt;br /&gt;
This section contains all the strings in the map.&lt;br /&gt;
* '''u32''': Number of strings in the section (Default''': 1024)&lt;br /&gt;
* '''u32[Number of strings]''': 1 integer for each string specifying the offset (the spot where the string starts in the section from the start of it).&lt;br /&gt;
* '''Strings''': After the offsets, this is where every string in the map goes, one after another. Each one is terminated by a null character.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPRP&amp;quot; - CUWP Slots==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1280 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section is used whenever the create units with properties trigger is used. Since a slot has to be assigned to the action, this is where each slot is designated.&lt;br /&gt;
&lt;br /&gt;
There are 64 of the following structures regardless of how many are used and it cannot exceed 64.&lt;br /&gt;
* '''u16''': Flag of which special properties can be applied to unit, and are valid.&lt;br /&gt;
** '''Bit 0''' - Cloak bit is valid&lt;br /&gt;
** '''Bit 1''' - Burrowed bit is valid&lt;br /&gt;
** '''Bit 2''' - In transit bit is valid&lt;br /&gt;
** '''Bit 3''' - Hallucinated bit is valid&lt;br /&gt;
** '''Bit 4''' - Invincible bit is valid&lt;br /&gt;
** '''Bit 5-15''' - Unknown/unused&lt;br /&gt;
* '''u16''': Which elements of the unit data are valid, which properties can be changed by the map maker.&lt;br /&gt;
** '''Bit 0''' - Owner player is valid (unit is not neutral)&lt;br /&gt;
** '''Bit 1''' - HP is valid&lt;br /&gt;
** '''Bit 2''' - Shields is valid&lt;br /&gt;
** '''Bit 3''' - Energy is valid&lt;br /&gt;
** '''Bit 4''' - Resource amount is valid (unit is a resource)&lt;br /&gt;
** '''Bit 5''' - Amount in hanger is valid&lt;br /&gt;
** '''Bit 6''' - Unknown/unused&lt;br /&gt;
* '''u8''': Player number that owns unit. Will always be NULL in this section (0)&lt;br /&gt;
* '''u8''': Hit point % (1-100)&lt;br /&gt;
* '''u8''': Shield point % (1-100)&lt;br /&gt;
* '''u8''': Energy point % (1-100)&lt;br /&gt;
* '''u32''': Resource amount (for resources only)&lt;br /&gt;
* '''u16''': # of units in hangar&lt;br /&gt;
* '''u16''': Flags&lt;br /&gt;
** '''Bit 0''' - Unit is cloaked&lt;br /&gt;
** '''Bit 1''' - Unit is burrowed&lt;br /&gt;
** '''Bit 2''' - Building is in transit&lt;br /&gt;
** '''Bit 3''' - Unit is hallucinated&lt;br /&gt;
** '''Bit 4''' - Unit is invincible&lt;br /&gt;
** '''Bit 5-15''' - Unknown/unused&lt;br /&gt;
* '''u32''': Unknown/unused. Padding?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPUS&amp;quot; - CUWP Slots Used==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section goes along with the &amp;quot;UPRP&amp;quot; section. This section just indicates which of the 64 unit properties slot are used.&lt;br /&gt;
* '''u8[64]''': 1 byte for each trigger unit properties slot&lt;br /&gt;
** '''00''' - Properties slot is unused&lt;br /&gt;
** '''01''' - Properties slot is used&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MRGN&amp;quot; - Locations==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: 1280 bytes for retail, 5100 bytes for Hybrid and Broodwar.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the locations that the map uses. In a vanilla map, this section contains 64 locations. In a Hybrid or Brood War map, this section will expand to contain 255 locations.&lt;br /&gt;
&lt;br /&gt;
Each location gets one of the following location entries. The 'Anywhere' location, is ALWAYS location 64.&lt;br /&gt;
* '''u32''': Left (X1) coordinate of location, in pixels (usually 32 pt grid aligned)&lt;br /&gt;
* '''u32''': Top (Y1) coordinate of location, in pixels&lt;br /&gt;
* '''u32''': Right (X2) coordinate of location, in pixels&lt;br /&gt;
* '''u32''': Bottom (Y2) coordinate of location, in pixels&lt;br /&gt;
* '''u16''': String number of the name of this location&lt;br /&gt;
* '''u16''': Location elevation flags. If an elevation is disabled in the location, it's bit will be on (1)&lt;br /&gt;
** '''Bit 0''' - Low elevation&lt;br /&gt;
** '''Bit 1''' - Medium elevation&lt;br /&gt;
** '''Bit 2''' - High elevation&lt;br /&gt;
** '''Bit 3''' - Low air&lt;br /&gt;
** '''Bit 4''' - Medium air&lt;br /&gt;
** '''Bit 5''' - High air&lt;br /&gt;
** '''Bit 6-15''' - Unused&lt;br /&gt;
Note that in typical locations Right is always larger than Left and Bottom is always larger than Top. However, you can reverse one or both of these for [[Inverted Locations]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TRIG&amp;quot; - Triggers==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 2400 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the triggers in the map. This along with [[#&amp;quot;MBRF&amp;quot; - Mission Briefings|MBRF]] is the most complicated section in the entire scenario.chk file as there is a lot of data packed into too little of a space. Refer to the appendix at the bottom of this page for more information.&lt;br /&gt;
For easy reference, since each trigger contains 2400 bytes, the amount of triggers can be gotten by taking the section length and dividing by 2400.&lt;br /&gt;
Every single trigger in the map will have the following format:&lt;br /&gt;
* 16 Conditions (20 byte struct)&amp;lt;br&amp;gt; Every trigger has 16 of the following format, even if only one condition is used. See the appendix for information on which items are used for what conditions.&lt;br /&gt;
** '''u32''': Location number for the condition (1 based -- 0 refers to No Location), EUD Bitmask for a Death condition if the MaskFlag is set to &amp;quot;SC&amp;quot;&lt;br /&gt;
** '''u32''': [[#List of Players/Group IDs|Group]] that the condition applies to&lt;br /&gt;
** '''u32''': Qualified number (how many/resource amount)&lt;br /&gt;
** '''u16''': [[#Trigger Unit Types|Unit ID]] condition applies to&lt;br /&gt;
** '''u8''': [[#Numeric Comparisons|Numeric comparison]], [[#Switch States|switch state]]&lt;br /&gt;
** '''u8''': [[#Trigger Conditions List|Condition byte]]&lt;br /&gt;
** '''u8''': [[#Resource Types|Resource type]], [[#Score Types|score type]], Switch number (0-based)&lt;br /&gt;
** '''u8''': Flags&lt;br /&gt;
*** '''Bit 0''' - Unknown/unused&lt;br /&gt;
*** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled/ignored&lt;br /&gt;
*** '''Bit 2''' - Always display flag.&lt;br /&gt;
*** '''Bit 3''' - Unit properties is used. ('''Note:''' This is used in [[TRG|*.trg]] files)&lt;br /&gt;
*** '''Bit 4''' - Unit type is used. Cleared in &amp;quot;Offset + Mask&amp;quot; EUD conditions. May not be necessary otherwise?&lt;br /&gt;
*** '''Bit 5-7''' - Unknown/unused&lt;br /&gt;
** '''u16''': MaskFlag: set to &amp;quot;SC&amp;quot; (0x53, 0x43) when using the bitmask for EUDs, 0 otherwise&lt;br /&gt;
* 64 Actions (32 byte struct)&amp;lt;br&amp;gt; Immediately following the 16 conditions, there are 64 actions. There will always be 64 of the following structure, even if some of them are unused.&lt;br /&gt;
** '''u32''': Location - source location in &amp;quot;Order&amp;quot; and &amp;quot;Move Unit&amp;quot;, dest location in &amp;quot;Move Location&amp;quot; (1 based -- 0 refers to No Location), EUD Bitmask for a Death action if the MaskFlag is set to &amp;quot;SC&amp;quot;&lt;br /&gt;
** '''u32''': String number for trigger text (0 means no string)&lt;br /&gt;
** '''u32''': WAV string number (0 means no string)&lt;br /&gt;
** '''u32''': Seconds/milliseconds of time&lt;br /&gt;
** '''u32''': First (or only) [[#List of Players/Group IDs|Group/Player]] affected.&lt;br /&gt;
** '''u32''': Second group affected, secondary location (1-based), CUWP #, number, AI script (4-byte string), switch (0-based #)&lt;br /&gt;
** '''u16''': [[#Trigger Unit Types|Unit type]], [[#Score Types|score type]], [[#Resource Types|resource type]], [[#Alliance Statuses|alliance status]]&lt;br /&gt;
** '''u8''': [[#Trigger Actions List|Action byte]]&lt;br /&gt;
** '''u8''': Number of units (0 means All Units), [[#Action States|action state]], [[#Unit Orders|unit order]], [[#Number Modifiers|number modifier]]&lt;br /&gt;
** '''u8''': Flags&lt;br /&gt;
*** '''Bit 0''' - Ignore a wait/transmission once.&lt;br /&gt;
*** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled.&lt;br /&gt;
*** '''Bit 2''' - Always display flag - when not set: if the user has turned off subtitles (see sound options) the text will not display, when set: text will always display&lt;br /&gt;
*** '''Bit 3''' - Unit properties is used. Staredit uses this for *.trg files.&lt;br /&gt;
*** '''Bit 4''' - Unit type is used. Cleared in &amp;quot;Offset + Mask&amp;quot; EUD actions.&lt;br /&gt;
*** '''Bit 5-7''' - Unknown/unused&lt;br /&gt;
** '''u8''': Padding&lt;br /&gt;
** '''u16 (2 bytes)''': MaskFlag: set to &amp;quot;SC&amp;quot; (0x53, 0x43) when using the bitmask for EUDs, 0 otherwise&lt;br /&gt;
* Player Execution&amp;lt;br&amp;gt; Following the 16 conditions and 64 actions, every trigger also has this structure&lt;br /&gt;
** '''u32''': execution flags&lt;br /&gt;
*** '''Bit 0''' - All conditions are met, executing actions, cleared on the next trigger loop.&lt;br /&gt;
*** '''Bit 1''' - Ignore the following actions: Defeat, Draw.&lt;br /&gt;
*** '''Bit 2''' - Preserve trigger. (Can replace Preserve Trigger action)&lt;br /&gt;
*** '''Bit 3''' - Ignore execution.&lt;br /&gt;
*** '''Bit 4''' - Ignore all of the following actions for this trigger until the next trigger loop: Wait, PauseGame, Transmission, PlayWAV, DisplayTextMessage, CenterView, MinimapPing, TalkingPortrait, and MuteUnitSpeech.&lt;br /&gt;
*** '''Bit 5''' - This trigger has paused the game, ignoring subsequent calls to Pause Game (Unpause Game clears this flag only in the same trigger), may automatically call unpause at the end of action execution?&lt;br /&gt;
*** '''Bit 6''' - Wait skipping disabled for this trigger, cleared on next trigger loop.&lt;br /&gt;
*** '''Bit 7-31''' - Unknown/unused&lt;br /&gt;
** '''u8[27]''': 1 byte for each player in the [[#List of Players/Group IDs]]&lt;br /&gt;
*** '''00''' - Trigger is not executed for player&lt;br /&gt;
*** '''01''' - Trigger is executed for player&lt;br /&gt;
** '''u8''': Index of the current action, in StarCraft this is incremented after each action is executed, trigger execution ends when this is 64 (Max Actions) or an action is encountered with Action byte as 0&lt;br /&gt;
This section can be split. Additional TRIG sections will add more triggers.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MBRF&amp;quot; - Mission Briefings==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 2400 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all of the mission briefings shown by the players.&lt;br /&gt;
&lt;br /&gt;
See [[#&amp;quot;TRIG&amp;quot; - Triggers|&amp;quot;TRIG&amp;quot;]] section for format, as it is exactly the same except for the conditions. In this section the 16 conditions are still there, they are all null except for the very first condition, which only has a condition byte of 13. See [[#Mission Briefing Actions List]] for the action bytes for the mission briefing actions.&lt;br /&gt;
&lt;br /&gt;
This section can be split. Additional MBRF sections will add more briefing triggers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SPRP&amp;quot; - Scenario Properties==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4 bytes.''&lt;br /&gt;
&lt;br /&gt;
* '''u16''': String number of the scenario name&lt;br /&gt;
* '''u16''': String number of the scenarios description.&lt;br /&gt;
A string index of 0 for the map name will default it to its file name. A string index of 0 description will default to a predefined string.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;FORC&amp;quot; - Force Settings==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be less than or equal to 20 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the forces and the information about them.&lt;br /&gt;
* '''u8[8]''': 1 byte for each active player, specifying which of the 4 forces (0-based) that the player's on&lt;br /&gt;
* '''u16[4]''': 1 integer for each force, string number of the name of the force&lt;br /&gt;
* '''u8[4]''': 1 byte for each force specifying the properties:&lt;br /&gt;
** '''Bit 0''' - Random start location&lt;br /&gt;
** '''Bit 1''' - Allies&lt;br /&gt;
** '''Bit 2''' - Allied victory&lt;br /&gt;
** '''Bit 3''' - Shared vision&lt;br /&gt;
** '''Bit 4-7''' - Unused&lt;br /&gt;
Notes about FORC:&lt;br /&gt;
* If there is no string specified for a force name, it will default to a &amp;quot;Force #&amp;quot; string.&lt;br /&gt;
* If this section is less than 20 bytes, the remaining bytes are defaulted to 0.&lt;br /&gt;
* Players can be on a force greater than 4, however they will not appear in the game lobby.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;WAV &amp;quot; - WAV String Indexes==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
There are 512 wav entires regardless of how many are actually used.&lt;br /&gt;
* '''u32[512]''': 1 long for each WAV. Indicates a string index is used for a WAV path in the MPQ. If the entry is not used, it will be 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIS&amp;quot; - Unit Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4048 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;UNIx&amp;quot; - BW Unit Settings|&amp;quot;UNIx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains the unit settings for the level:&lt;br /&gt;
* '''u8[228]''': 1 byte for each unit, in order of Unit ID&lt;br /&gt;
** '''00''' - Unit does not use default settings&lt;br /&gt;
** '''01''' - Unit does use default settings&lt;br /&gt;
* '''u32[228]''': Hit points for unit (Note the displayed value is this value / 256, with the low byte being a fractional HP value)&lt;br /&gt;
* '''u16[228]''': Shield points, in order of Unit ID&lt;br /&gt;
* '''u8[228]''': Armor points, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Build time (1/60 seconds), in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Mineral cost, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Gas cost, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': String number, in order of Unit ID&lt;br /&gt;
* '''u16[100]''': Base weapon damage the weapon does, in weapon ID order ([[#List of Unit Weapon IDs]])&lt;br /&gt;
* '''u16[100]''': Upgrade bonus weapon damage, in weapon ID order&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGS&amp;quot; - Upgrade Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 598 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;UPGx&amp;quot; - BW Upgrade Settings|&amp;quot;UPGx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains upgrade settings:&lt;br /&gt;
* '''u8[46]''': 1 byte per each upgrade, in order of upgrade id.&lt;br /&gt;
** '''00''' - Upgrade uses custom settings&lt;br /&gt;
** '''01''' - Upgrade uses default settings&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, time factor for each upgrade, in order of upgrade id.&lt;br /&gt;
See [[#List of Upgrade IDs]] for upgrade ids.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TECS&amp;quot; - Tech Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 216 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;TECx&amp;quot; - BW Tech Settings|&amp;quot;TECx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains technology/special abilities settings:&lt;br /&gt;
* '''u8[24]''': 1 byte per each technology, specifies if the tech overrides the default settings. In order of technology id&lt;br /&gt;
** '''00''' - Technology uses custom settings&lt;br /&gt;
** '''01''' - Technology uses default settings&lt;br /&gt;
* '''u16[24]''': Mineral cost to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Gas cost to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Time required to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Energy cost to cast technology/special ability. In order of technology id.&lt;br /&gt;
See [[#List of Technology IDs]] for technology ids.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SWNM&amp;quot; - Switch Names==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section contains the strings used for each switch. There are 256 switches, and can't be any more or any less.&lt;br /&gt;
* '''u32[256]''': One long for each switch, specifies the string number for the name of each switch. Unnamed switches will have an index of 0, and have a default switch name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;COLR&amp;quot; - Player Colors==&lt;br /&gt;
''Required for Brood War only and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 8 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section indicates what color each player is, but only has effect on Brood War.&lt;br /&gt;
* '''u8[8]''': 1 byte for each player, indicates the color of the player&lt;br /&gt;
** '''00''' - Red (#F40404)&lt;br /&gt;
** '''01''' - Blue (#0C48CC)&lt;br /&gt;
** '''02''' - Teal (#2CB494)&lt;br /&gt;
** '''03''' - Purple (#88409C)&lt;br /&gt;
** '''04''' - Orange (#F88C14)&lt;br /&gt;
** '''05''' - Brown (#703014)&lt;br /&gt;
** '''06''' - White (#CCE0D0)&lt;br /&gt;
** '''07''' - Yellow (#FCFC38)&lt;br /&gt;
** '''08''' - Green (#088008)&lt;br /&gt;
** '''09''' - Pale yellow (#FCFC7C)&lt;br /&gt;
** '''10''' - Tan (#ECC4B0)&lt;br /&gt;
** '''11''' - Azure (Neutral color, #4068D4)&lt;br /&gt;
Other values can be used but may have different results depending on the tileset. Any color value above 11 is an overflow. As of patch 1.18.6, values above 11 result in default player color.&lt;br /&gt;
&lt;br /&gt;
When CRGB is present, this section still defines leaderboard colors.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;CRGB&amp;quot; - Remastered Player Colors==&lt;br /&gt;
''Requirement unknown, but can be in any map type including non-remaster maps.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 32 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''u8[8][3]''': 3 bytes for each player corresponding to an RGB color value&lt;br /&gt;
** '''u8''': R&lt;br /&gt;
** '''u8''': G&lt;br /&gt;
** '''u8''': B, or color ID for type 3&lt;br /&gt;
* '''u8[8]''': Indicates how to select the color for each player&lt;br /&gt;
** '''0''' - Random Predefined&lt;br /&gt;
** '''1''' - Player's Choice&lt;br /&gt;
** '''2''' - Custom RGB Color (RGB value for the corresponding player defined above)&lt;br /&gt;
** '''3''' - Use color ID in the &amp;quot;B&amp;quot; color channel (&amp;quot;R&amp;quot; and &amp;quot;G&amp;quot; values appear to contain junk data); leaderboard color is still defined by COLR section and can be set independently&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SC:R Only color IDs:&amp;lt;br&amp;gt;&lt;br /&gt;
Extends the [[#&amp;quot;COLR&amp;quot; - Player Colors|COLR]] section list of colors, but cannot be used in the COLR section. (Hex codes for 15+ are approximated)&lt;br /&gt;
* '''12''' - Pale Green (#74A47C)&lt;br /&gt;
* '''13''' - Blueish Grey (#9090B8)&lt;br /&gt;
* '''14''' - Cyan (#00E4FC)&lt;br /&gt;
* '''15''' - Pink (#FFC4E3)&lt;br /&gt;
* '''16''' - Olive (#808000)&lt;br /&gt;
* '''17''' - Lime (#D2F53C)&lt;br /&gt;
* '''18''' - Navy (#000080)&lt;br /&gt;
* '''19''' - Magenta (#F032E6)&lt;br /&gt;
* '''20''' - Grey (#808080)&lt;br /&gt;
* '''21''' - Black (#3C3C3C)&lt;br /&gt;
* '''22+''' - Random (can pick colors that have been used)&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PUPx&amp;quot; - BW Upgrade Restrictions==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2318 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UPGR&amp;quot; - Upgrade Restrictions|&amp;quot;UPGR&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is identical to UPGR section except it uses the Brood War set of 61 upgrades instead of the original 46.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PTEx&amp;quot; - BW Tech Restrictions==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1672 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;PTEC&amp;quot; - Tech Restrictions|&amp;quot;PTEC&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is identical to PTEC section except it uses the Brood War set of 44 technologies instead of the original 24.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIx&amp;quot; - BW Unit Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4168 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UNIS&amp;quot; - Unit Settings|&amp;quot;UNIS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is indentical to UNIS section except it uses the Brood War set of 130 weapons instead of the original 100.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGx&amp;quot; - BW Upgrade Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 794 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UPGS&amp;quot; - Upgrade Settings|&amp;quot;UPGS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section the same as UPGS except section except it uses the Brood War set of 61 upgrades instead of the original 46, and there is an unused byte after the first set:&lt;br /&gt;
* '''u8[61]''': 1 byte per each upgrade, in order of upgrade id.&lt;br /&gt;
** '''00''' - Upgrade uses custom settings&lt;br /&gt;
** '''01''' - Upgrade uses default settings&lt;br /&gt;
* '''u8''': Unused.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, time factor for each upgrade, in order of upgrade id.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TECx&amp;quot; - BW Tech Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 396 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;TECS&amp;quot; - Tech Settings|&amp;quot;TECS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is indentical to TECS section except it uses the Brood War set of 44 technologies instead of the original 24.&lt;br /&gt;
&lt;br /&gt;
=Appendix=&lt;br /&gt;
A set of references and IDs that should help you easier in the trigger section and the technology/player ids, etc:&lt;br /&gt;
&lt;br /&gt;
==Trigger Conditions List==&lt;br /&gt;
* 0 = No Condition&lt;br /&gt;
* 1 = Countdown Timer(Comparison, QNumber)&lt;br /&gt;
* 2 = Command(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 3 = Bring(Player, Comparison, TUnit, Loc, QNumber)&lt;br /&gt;
* 4 = Accumulate(Player, Comparison, QNumber, ResType)&lt;br /&gt;
* 5 = Kill(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 6 = Command the Most(TUnit)&lt;br /&gt;
* 7 = Commands the Most At(TUnit, Loc)&lt;br /&gt;
* 8 = Most Kills(TUnit)&lt;br /&gt;
* 9 = Highest Score(Score)&lt;br /&gt;
* 10 = Most Resources(ResType)&lt;br /&gt;
* 11 = Switch(Switch)&lt;br /&gt;
* 12 = Elapsed Time(Comparison, QNumber)&lt;br /&gt;
* 13 = Data is a Mission Briefing. Conditions are N/A (Same as Never)&lt;br /&gt;
* 14 = Opponents(Player, Comparison, QNumber)&lt;br /&gt;
* 15 = Deaths(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 16 = Command the Least(TUnit)&lt;br /&gt;
* 17 = Command the Least At(TUnit, Loc)&lt;br /&gt;
* 18 = Least Kills(TUnit)&lt;br /&gt;
* 19 = Lowest Score(Score)&lt;br /&gt;
* 20 = Least Resources(ResType)&lt;br /&gt;
* 21 = Score(Player, Comparison, Score, QNumber)&lt;br /&gt;
* 22 = Always (Same as No Condition)&lt;br /&gt;
* 23 = Never&lt;br /&gt;
&lt;br /&gt;
==Trigger Actions List==&lt;br /&gt;
* 0 = No Action&lt;br /&gt;
* 1 = Victory&lt;br /&gt;
* 2 = Defeat&lt;br /&gt;
* 3 = Preserve Trigger&lt;br /&gt;
* 4 = Wait(Time)&lt;br /&gt;
* 5 = Pause Game (Single player only)&lt;br /&gt;
* 6 = Unpause Game (Single player only)&lt;br /&gt;
* 7 = Transmission(Text, Unit, Loc, Time, Modifier, Wave, WavTime)&lt;br /&gt;
* 8 = Play WAV(Wav, WavTime)&lt;br /&gt;
* 9 = Display Text Message(Text)&lt;br /&gt;
* 10 = Center View(Loc)&lt;br /&gt;
* 11 = Create Unit with Properties(Player, Unit, Number, Loc, UnitProp)&lt;br /&gt;
* 12 = Set Mission Objectives(Text)&lt;br /&gt;
* 13 = Set Switch(Switch, SwAction)&lt;br /&gt;
* 14 = Set Countdown Timer(Time, Modifier)&lt;br /&gt;
* 15 = Run AI Script(AIScript)&lt;br /&gt;
* 16 = Run AI Script At Location(AIScript)&lt;br /&gt;
* 17 = Leader Board (Control) (Text, TUnit)&lt;br /&gt;
* 18 = Leader Board (Control At Location) (Text, TUnit, Loc)&lt;br /&gt;
* 19 = Leader Board (Resources) (Text, ResType)&lt;br /&gt;
* 20 = Leader Board (Kills) (Text, TUnit)&lt;br /&gt;
* 21 = Leader Board (Points) (Text, Score)&lt;br /&gt;
* 22 = Kill Unit (Player, TUnit)&lt;br /&gt;
* 23 = Kill Unit At Location(Player, TUnit, Number, Loc)&lt;br /&gt;
* 24 = Remove Unit(Player, TUnit)&lt;br /&gt;
* 25 = Remove Unit At Location(Player, TUnit, Number, Loc)&lt;br /&gt;
* 26 = Set Resources(Player, Number, Modifier, ResType)&lt;br /&gt;
* 27 = Set Score(Player, Number, Modifier, Score)&lt;br /&gt;
* 28 = Minimap Ping(Loc)&lt;br /&gt;
* 29 = Talking Portrait(Unit, Time)&lt;br /&gt;
* 30 = Mute Unit Speech&lt;br /&gt;
* 31 = Unmute Unit Speech&lt;br /&gt;
* 32 = Leaderboard Computer Players(State)&lt;br /&gt;
* 33 = Leaderboard Goal (Control) (Text, TUnit, Number)&lt;br /&gt;
* 34 = Leaderboard Goal (Control At Location) (Text, TUnit, Number, Loc)&lt;br /&gt;
* 35 = Leaderboard Goal (Resources) (Text, TUnit, Number, ResType)&lt;br /&gt;
* 36 = Leaderboard Goal (Kills) (Text, TUnit, Number)&lt;br /&gt;
* 37 = Leaderboard Goal (Points) (Text, Number, Score)&lt;br /&gt;
* 38 = Move Location(Player, TUnit, SLoc, DLoc)&lt;br /&gt;
* 39 = Move Unit(Player, TUnit, Number, SLoc, DLoc)&lt;br /&gt;
* 40 = Leaderboard (Greed) (Number)&lt;br /&gt;
* 41 = Set Next Scenario(Text) (Single player only)&lt;br /&gt;
* 42 = Set Doodad State(Player, TUnit, Loc, State)&lt;br /&gt;
* 43 = Set Invincibility(Player, TUnit, Loc, State)&lt;br /&gt;
* 44 = Create Unit(Player, Unit, Number, Loc)&lt;br /&gt;
* 45 = Set Deaths(Player, TUnit, Number, Modifier)&lt;br /&gt;
* 46 = Order(Player, TUnit, SLoc, DLoc, Order)&lt;br /&gt;
* 47 = Comment(Text)&lt;br /&gt;
* 48 = Give Units to Player(SPlayer, DPlayer, TUnit, Number, Loc)&lt;br /&gt;
* 49 = Modify Unit Hit Points(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 50 = Modify Unit Energy(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 51 = Modify Unit Shield Points(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 52 = Modify Unit Resource Amount(Player, Number, ModAmount, Loc)&lt;br /&gt;
* 53 = Modify Unit Hanger Count(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 54 = Pause Timer&lt;br /&gt;
* 55 = Unpause Timer&lt;br /&gt;
* 56 = Draw&lt;br /&gt;
* 57 = Set Alliance Status(Player, AllyStatus)&lt;br /&gt;
* 58 = Disable Debug Mode (Single player only)&lt;br /&gt;
* 59 = Enable Debug Mode (Single player only)&lt;br /&gt;
&lt;br /&gt;
==Mission Briefing Actions List==&lt;br /&gt;
* 0 - No Action&lt;br /&gt;
* 1 - Wait(Time)&lt;br /&gt;
* 2 - Play WAV(Wave, WavTime)&lt;br /&gt;
* 3 - Text Message(Text, Time)&lt;br /&gt;
* 4 - Mission Objectives(Text)&lt;br /&gt;
* 5 - Show Portrait(Unit, Slot)&lt;br /&gt;
* 6 - Hide Portrait(Slot)&lt;br /&gt;
* 7 - Display Speaking Portrait(Slot, Time)&lt;br /&gt;
* 8 - Transmission(Text, Slot, Time, Modifier, Wave, WavTime)&lt;br /&gt;
* 9 - Skip Tutorial Enabled&lt;br /&gt;
&lt;br /&gt;
==Switch States==&lt;br /&gt;
* 2 = Switch is set&lt;br /&gt;
* 3 = Switch is cleared&lt;br /&gt;
&lt;br /&gt;
==Numeric Comparisons==&lt;br /&gt;
* 0 = At least&lt;br /&gt;
* 1 = At most&lt;br /&gt;
* 10 = Exactly&lt;br /&gt;
&lt;br /&gt;
==Score Types==&lt;br /&gt;
* 0 = Total&lt;br /&gt;
* 1 = Units&lt;br /&gt;
* 2 = Buildings&lt;br /&gt;
* 3 = Units and Buildings&lt;br /&gt;
* 4 = Kills&lt;br /&gt;
* 5 = Razings&lt;br /&gt;
* 6 = Kills and Razings&lt;br /&gt;
* 7 = Custom&lt;br /&gt;
&lt;br /&gt;
==Resource Types==&lt;br /&gt;
* 0 = Ore&lt;br /&gt;
* 1 = Gas&lt;br /&gt;
* 2 = Ore and Gas&lt;br /&gt;
&lt;br /&gt;
==Alliance Statuses==&lt;br /&gt;
* 0 = Enemy&lt;br /&gt;
* 1 = Ally&lt;br /&gt;
* 2 = Allied Victory&lt;br /&gt;
&lt;br /&gt;
==Unit Orders==&lt;br /&gt;
* 0 = Move&lt;br /&gt;
* 1 = Patrol&lt;br /&gt;
* 2 = Attack&lt;br /&gt;
&lt;br /&gt;
==Action States==&lt;br /&gt;
* 4 = Enabled/Set switch&lt;br /&gt;
* 5  = Disabled/Clear switch&lt;br /&gt;
* 6 = Toggle/Toggle switch&lt;br /&gt;
* 11 = Randomize switch&lt;br /&gt;
&lt;br /&gt;
==Number Modifiers==&lt;br /&gt;
* 7 = Set to&lt;br /&gt;
* 8 = Add&lt;br /&gt;
* 9 = Subtract&lt;br /&gt;
&lt;br /&gt;
==Trigger Unit Types==&lt;br /&gt;
* All normal units (0-227)&lt;br /&gt;
* 228 = None&lt;br /&gt;
* 229 = Any unit&lt;br /&gt;
* 230 = Men&lt;br /&gt;
* 231 = Buildings&lt;br /&gt;
* 232 = Factories&lt;br /&gt;
&lt;br /&gt;
==List of Players/Group IDs==&lt;br /&gt;
* 0 = Player 1&lt;br /&gt;
* 1 = Player 2&lt;br /&gt;
* 2 = Player 3&lt;br /&gt;
* 3 = Player 4&lt;br /&gt;
* 4 = Player 5&lt;br /&gt;
* 5 = Player 6&lt;br /&gt;
* 6 = Player 7&lt;br /&gt;
* 7 = Player 8&lt;br /&gt;
* 8 = Player 9&lt;br /&gt;
* 9 = Player 10&lt;br /&gt;
* 10 = Player 11&lt;br /&gt;
* 11 = Player 12&lt;br /&gt;
* 12 = None (Unused, One-entry Overflow in some cases)&lt;br /&gt;
* 13 = Current Player&lt;br /&gt;
* 14 = Foes&lt;br /&gt;
* 15 = Allies&lt;br /&gt;
* 16 = Neutral Players&lt;br /&gt;
* 17 = All Players&lt;br /&gt;
* 18 = Force 1&lt;br /&gt;
* 19 = Force 2&lt;br /&gt;
* 20 = Force 3&lt;br /&gt;
* 21 = Force 4&lt;br /&gt;
* 22 = Unused 1&lt;br /&gt;
* 23 = Unused 2&lt;br /&gt;
* 24 = Unused 3&lt;br /&gt;
* 25 = Unused 4&lt;br /&gt;
* 26 = Non Allied Victory Players&lt;br /&gt;
&lt;br /&gt;
==List of Technology IDs==&lt;br /&gt;
* 0 = Stim Packs&lt;br /&gt;
* 1 = Lockdown&lt;br /&gt;
* 2 = EMP Shockwave&lt;br /&gt;
* 3 = Spider Mines&lt;br /&gt;
* 4 = Scanner Sweep&lt;br /&gt;
* 5 = Siege Mode&lt;br /&gt;
* 6 = Defensive Matrix&lt;br /&gt;
* 7 = Irradiate&lt;br /&gt;
* 8 = Yamato Gun&lt;br /&gt;
* 9 = Cloaking Field&lt;br /&gt;
* 10 = Personnel Cloaking&lt;br /&gt;
* 11 = Burrowing&lt;br /&gt;
* 12 = Infestation&lt;br /&gt;
* 13 = Spawn Broodling&lt;br /&gt;
* 14 = Dark Swarm&lt;br /&gt;
* 15 = Plague&lt;br /&gt;
* 16 = Consume&lt;br /&gt;
* 17 = Ensnare&lt;br /&gt;
* 18 = Parasite&lt;br /&gt;
* 19 = Psionic Storm&lt;br /&gt;
* 20 = Hallucination&lt;br /&gt;
* 21 = Recall&lt;br /&gt;
* 22 = Stasis Field&lt;br /&gt;
* 23 = Archon Warp&lt;br /&gt;
* 24 = Restoration&lt;br /&gt;
* 25 = Disruption Web&lt;br /&gt;
* 26 = Unused 26&lt;br /&gt;
* 27 = Mind Control&lt;br /&gt;
* 28 = Dark Archon Meld&lt;br /&gt;
* 29 = Feedback&lt;br /&gt;
* 30 = Optical Flare&lt;br /&gt;
* 31 = Maelstorm&lt;br /&gt;
* 32 = Lurker Aspect&lt;br /&gt;
* 33 = Unused 33&lt;br /&gt;
* 34 = Healing&lt;br /&gt;
* 35 = Unused 35&lt;br /&gt;
* 36 = Unused 36&lt;br /&gt;
* 37 = Unused 37&lt;br /&gt;
* 38 = Unused 38&lt;br /&gt;
* 39 = Unused 39&lt;br /&gt;
* 40 = Unused 40&lt;br /&gt;
* 41 = Unused 41&lt;br /&gt;
* 42 = Unused 42&lt;br /&gt;
* 43 = Unused 43&lt;br /&gt;
&lt;br /&gt;
==List of Upgrade IDs==&lt;br /&gt;
* 0 = Terran Infantry Armor&lt;br /&gt;
* 1 = Terran Vehicle Plating&lt;br /&gt;
* 2 = Terran Ship Plating&lt;br /&gt;
* 3 = Zerg Carapace&lt;br /&gt;
* 4 = Zerg Flyer Caparace&lt;br /&gt;
* 5 = Protoss Armor&lt;br /&gt;
* 6 = Protoss Plating&lt;br /&gt;
* 7 = Terran Infantry Weapons&lt;br /&gt;
* 8 = Terran Vehicle Weapons&lt;br /&gt;
* 9 = Terran Ship Weapons&lt;br /&gt;
* 10 = Zerg Melee Attacks&lt;br /&gt;
* 11 = Zerg Missile Attacks&lt;br /&gt;
* 12 = Zerg Flyer Attacks&lt;br /&gt;
* 13 = Protoss Ground Weapons&lt;br /&gt;
* 14 = Protoss Air Weapons&lt;br /&gt;
* 15 = Protoss Plasma Shields&lt;br /&gt;
* 16 = U-238 Shells&lt;br /&gt;
* 17 = Ion Thrusters&lt;br /&gt;
* 18 = Burst Lasers (Unused)&lt;br /&gt;
* 19 = Titan Reactor (SV +50)&lt;br /&gt;
* 20 = Ocular Implants&lt;br /&gt;
* 21 = Moebius Reactor (Ghost +50)&lt;br /&gt;
* 22 = Apollo Reactor (Wraith +50)&lt;br /&gt;
* 23 = Colossus Reactor (BC +50)&lt;br /&gt;
* 24 = Ventral Sacs&lt;br /&gt;
* 25 = Antennae&lt;br /&gt;
* 26 = Pneumatized Carapace&lt;br /&gt;
* 27 = Metabolic Boost&lt;br /&gt;
* 28 = Adrenal Glands&lt;br /&gt;
* 29 = Muscular Augments&lt;br /&gt;
* 30 = Grooved Spines&lt;br /&gt;
* 31 = Gamete Meiosis (Queen +50)&lt;br /&gt;
* 32 = Metasynaptic Node (Defiler +50)&lt;br /&gt;
* 33 = Singularity Charge&lt;br /&gt;
* 34 = Leg Enhancements&lt;br /&gt;
* 35 = Scarab Damage &lt;br /&gt;
* 36 = Reaver Capacity &lt;br /&gt;
* 37 = Gravitic Drive&lt;br /&gt;
* 38 = Sensor Array&lt;br /&gt;
* 39 = Gravitic Boosters&lt;br /&gt;
* 40 = Khaydarin Amulet (HT +50)&lt;br /&gt;
* 41 = Apial Sensors&lt;br /&gt;
* 42 = Gravitic Thrusters&lt;br /&gt;
* 43 = Carrier Capacity&lt;br /&gt;
* 44 = Khaydarin Core (Arbiter +50)&lt;br /&gt;
* 45 = Unknown Upgrade45&lt;br /&gt;
* 46 = Unknown Upgrade46&lt;br /&gt;
* 47 = Argus Jewel (Corsair +50)&lt;br /&gt;
* 48 = Unknown Upgrade48&lt;br /&gt;
* 49 = Argus Talisman (DA +50)&lt;br /&gt;
* 50 = Unknown Upgrade50&lt;br /&gt;
* 51 = Caduceus Reactor (Medic +50)&lt;br /&gt;
* 52 = Chitinous Plating&lt;br /&gt;
* 53 = Anabolic Synthesis&lt;br /&gt;
* 54 = Charon Booster&lt;br /&gt;
* 55 = Unknown Upgrade55&lt;br /&gt;
* 56 = Unknown Upgrade56&lt;br /&gt;
* 57 = Unknown Upgrade57&lt;br /&gt;
* 58 = Unknown Upgrade58&lt;br /&gt;
* 59 = Unknown Upgrade59&lt;br /&gt;
* 60 = Unknown Upgrade60&lt;br /&gt;
&lt;br /&gt;
==List of Unit Weapon IDs==&lt;br /&gt;
* 0 = Gauss Rifle (Normal)&lt;br /&gt;
* 1 = Gauss Rifle (Jim Raynor-Marine)&lt;br /&gt;
* 2 = C-10 Canister Rifle (Normal)&lt;br /&gt;
* 3 = C-10 Canister Rifle (Sarah Kerrigan)&lt;br /&gt;
* 4 = Fragmentation Grenade (Normal)&lt;br /&gt;
* 5 = Fragmentation Grenade (Jim Raynor-Vulture)&lt;br /&gt;
* 6 = Spider Mines&lt;br /&gt;
* 7 = Twin Autocannons (Normal)&lt;br /&gt;
* 8 = Hellfire Missile Pack (Normal)&lt;br /&gt;
* 9 = Twin Autocannons (Alan Schezar)&lt;br /&gt;
* 10 = Hellfire Missile Pack (Alan Schezar)&lt;br /&gt;
* 11 = Arclite Cannon (Normal)&lt;br /&gt;
* 12 = Arclite Cannon (Edmund Duke)&lt;br /&gt;
* 13 = Fusion Cutter&lt;br /&gt;
* 14 = Fusion Cutter (Harvest)&lt;br /&gt;
* 15 = Gemini Missiles (Normal)&lt;br /&gt;
* 16 = Burst Lasers (Normal)&lt;br /&gt;
* 17 = Gemini Missiles (Tom Kazansky)&lt;br /&gt;
* 18 = Burst Lasers (Tom Kazansky)&lt;br /&gt;
* 19 = ATS Laser Battery (Normal)&lt;br /&gt;
* 20 = ATA Laser Battery (Normal)&lt;br /&gt;
* 21 = ATS Laser Battery (Norad II+Mengsk+DuGalle)&lt;br /&gt;
* 22 = ATA Laser Battery (Norad II+Mengsk+DuGalle)&lt;br /&gt;
* 23 = ATS Laser Battery (Hyperion)&lt;br /&gt;
* 24 = ATA Laser Battery (Hyperion)&lt;br /&gt;
* 25 = Flame Thrower (Normal)&lt;br /&gt;
* 26 = Flame Thrower (Gui Montag)&lt;br /&gt;
* 27 = Arclite Shock Cannon (Normal)&lt;br /&gt;
* 28 = Arclite Shock Cannon (Edmund Duke)&lt;br /&gt;
* 29 = Longbolt Missile&lt;br /&gt;
* 30 = Yamato Gun&lt;br /&gt;
* 31 = Nuclear Missile&lt;br /&gt;
* 32 = Lockdown&lt;br /&gt;
* 33 = EMP Shockwave&lt;br /&gt;
* 34 = Irradiate&lt;br /&gt;
* 35 = Claws (Normal)&lt;br /&gt;
* 36 = Claws (Devouring One)&lt;br /&gt;
* 37 = Claws (Infested Kerrigan)&lt;br /&gt;
* 38 = Needle Spines (Normal)&lt;br /&gt;
* 39 = Needle Spines (Hunter Killer)&lt;br /&gt;
* 40 = Kaiser Blades (Normal)&lt;br /&gt;
* 41 = Kaiser Blades (Torrasque)&lt;br /&gt;
* 42 = Toxic Spores (Broodling)&lt;br /&gt;
* 43 = Spines&lt;br /&gt;
* 44 = Spines (Harvest)&lt;br /&gt;
* 45 = Acid Spray (Unused)&lt;br /&gt;
* 46 = Acid Spore (Normal)&lt;br /&gt;
* 47 = Acid Spore (Kukulza-Guardian)&lt;br /&gt;
* 48 = Glave Wurm (Normal)&lt;br /&gt;
* 49 = Glave Wurm (Kukulza-Mutalisk)&lt;br /&gt;
* 50 = Venom (Unused-Defiler)&lt;br /&gt;
* 51 = Venom (Unused-Defiler Hero)&lt;br /&gt;
* 52 = Seeker Spores&lt;br /&gt;
* 53 = Subterranean Tentacle&lt;br /&gt;
* 54 = Suicide (Infested Terran)&lt;br /&gt;
* 55 = Suicide (Scourge)&lt;br /&gt;
* 56 = Parasite&lt;br /&gt;
* 57 = Spawn Broodlings&lt;br /&gt;
* 58 = Ensnare&lt;br /&gt;
* 59 = Dark Swarm&lt;br /&gt;
* 60 = Plague&lt;br /&gt;
* 61 = Consume&lt;br /&gt;
* 62 = Particle Beam&lt;br /&gt;
* 63 = Particle Beam (Harvest)&lt;br /&gt;
* 64 = Psi Blades (Normal)&lt;br /&gt;
* 65 = Psi Blades (Fenix-Zealot)&lt;br /&gt;
* 66 = Phase Disruptor (Normal)&lt;br /&gt;
* 67 = Phase Disruptor (Fenix-Dragoon)&lt;br /&gt;
* 68 = Psi Assault (Normal-Unused)&lt;br /&gt;
* 69 = Psi Assault (Tassadar+Aldaris)&lt;br /&gt;
* 70 = Psionic Shockwave (Normal)&lt;br /&gt;
* 71 = Psionic Shockwave (Tassadar/Zeratul Archon)&lt;br /&gt;
* 72 = Unknown72&lt;br /&gt;
* 73 = Dual Photon Blasters (Normal)&lt;br /&gt;
* 74 = Anti-matter Missiles (Normal)&lt;br /&gt;
* 75 = Dual Photon Blasters (Mojo)&lt;br /&gt;
* 76 = Anti-matter Missiles (Mojo)&lt;br /&gt;
* 77 = Phase Disruptor Cannon (Normal)&lt;br /&gt;
* 78 = Phase Disruptor Cannon (Danimoth)&lt;br /&gt;
* 79 = Pulse Cannon&lt;br /&gt;
* 80 = STS Photon Cannon&lt;br /&gt;
* 81 = STA Photon Cannon&lt;br /&gt;
* 82 = Scarab&lt;br /&gt;
* 83 = Stasis Field&lt;br /&gt;
* 84 = Psi Storm&lt;br /&gt;
* 85 = Warp Blades (Zeratul)&lt;br /&gt;
* 86 = Warp Blades (Dark Templar Hero)&lt;br /&gt;
* 87 = Missiles (Unused)&lt;br /&gt;
* 88 = Laser Battery1 (Unused)&lt;br /&gt;
* 89 = Tormentor Missiles (Unused)&lt;br /&gt;
* 90 = Bombs (Unused)&lt;br /&gt;
* 91 = Raider Gun (Unused)&lt;br /&gt;
* 92 = Laser Battery2 (Unused)&lt;br /&gt;
* 93 = Laser Battery3 (Unused)&lt;br /&gt;
* 94 = Dual Photon Blasters (Unused)&lt;br /&gt;
* 95 = Flechette Grenade (Unused)&lt;br /&gt;
* 96 = Twin Autocannons (Floor Trap)&lt;br /&gt;
* 97 = Hellfire Missile Pack (Wall Trap)&lt;br /&gt;
* 98 = Flame Thrower (Wall Trap)&lt;br /&gt;
* 99 = Hellfire Missile Pack (Floor Trap)&lt;br /&gt;
* 100 = Neutron Flare&lt;br /&gt;
* 101 = Disruption Web&lt;br /&gt;
* 102 = Restoration&lt;br /&gt;
* 103 = Halo Rockets&lt;br /&gt;
* 104 = Corrosive Acid&lt;br /&gt;
* 105 = Mind Control&lt;br /&gt;
* 106 = Feedback&lt;br /&gt;
* 107 = Optical Flare&lt;br /&gt;
* 108 = Maelstrom&lt;br /&gt;
* 109 = Subterranean Spines&lt;br /&gt;
* 110 = Gauss Rifle0 (Unused)&lt;br /&gt;
* 111 = Warp Blades (Normal)&lt;br /&gt;
* 112 = C-10 Canister Rifle (Samir Duran)&lt;br /&gt;
* 113 = C-10 Canister Rifle (Infested Duran)&lt;br /&gt;
* 114 = Dual Photon Blasters (Artanis)&lt;br /&gt;
* 115 = Anti-matter Missiles (Artanis)&lt;br /&gt;
* 116 = C-10 Canister Rifle (Alexei Stukov)&lt;br /&gt;
* 117 = Gauss Rifle1 (Unused)&lt;br /&gt;
* 118 = Gauss Rifle2 (Unused)&lt;br /&gt;
* 119 = Gauss Rifle3 (Unused)&lt;br /&gt;
* 120 = Gauss Rifle4 (Unused)&lt;br /&gt;
* 121 = Gauss Rifle5 (Unused)&lt;br /&gt;
* 122 = Gauss Rifle6 (Unused)&lt;br /&gt;
* 123 = Gauss Rifle7 (Unused)&lt;br /&gt;
* 124 = Gauss Rifle8 (Unused)&lt;br /&gt;
* 125 = Gauss Rifle9 (Unused)&lt;br /&gt;
* 126 = Gauss Rifle10 (Unused)&lt;br /&gt;
* 127 = Gauss Rifle11 (Unused)&lt;br /&gt;
* 128 = Gauss Rifle12 (Unused)&lt;br /&gt;
* 129 = Gauss Rifle13 (Unused)&lt;br /&gt;
* 130 = None&lt;br /&gt;
&lt;br /&gt;
==Complete Modifier List==&lt;br /&gt;
* 0 = Condition: &amp;gt;= (greater than or equal to)&lt;br /&gt;
* 1 = Condition: &amp;lt;= (less than or equal to)&lt;br /&gt;
* 2 = Condition: == TRUE (Is True)&lt;br /&gt;
* 3 = Condition: == FALSE (Is False)&lt;br /&gt;
* 4 = Action: = TRUE (Set to True)&lt;br /&gt;
* 5 = Action: = FALSE (Set to False)&lt;br /&gt;
* 6 = Action: NOT (toggle)&lt;br /&gt;
* 7 = Action: = (Set to)&lt;br /&gt;
* 8 = Action: += (Add)&lt;br /&gt;
* 9 = Action: -= (Subtract)&lt;br /&gt;
* 10 = Condition: == (Exactly)&lt;br /&gt;
* 11 = Action: Randomize&lt;br /&gt;
&lt;br /&gt;
[[Category:StarCraft]]&lt;br /&gt;
[[Category:Reference]]&lt;/div&gt;</summary>
		<author><name>FaRTy1billion</name></author>	</entry>

	<entry>
		<id>https://staredit.net/wiki/index.php?title=Scenario.chk&amp;diff=684</id>
		<title>Scenario.chk</title>
		<link rel="alternate" type="text/html" href="https://staredit.net/wiki/index.php?title=Scenario.chk&amp;diff=684"/>
				<updated>2023-04-24T02:33:23Z</updated>
		
		<summary type="html">&lt;p&gt;FaRTy1billion: /* &amp;quot;COLR&amp;quot; - Player Colors */ added hex colors&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The CHK file is a very dense file found inside the SCM or SCX file (as &amp;quot;staredit\scenario.chk&amp;quot;), which is just a renamed MPQ archive.&lt;br /&gt;
&lt;br /&gt;
In this article, some shorthand will be used for datatypes:&lt;br /&gt;
* '''u8''' for an unsigned byte&lt;br /&gt;
* '''u16''' for an unsigned short (2-byte integer)&lt;br /&gt;
* '''u32''' for an unsigned int (4-byte integer)&lt;br /&gt;
* '''uT[''a'']''' for an array of datatype '''T''' (8, 16, 32) with '''''a''''' number of elements&lt;br /&gt;
* '''uT[''a''][''b'']''' for a two-dimensional array of datatype '''T''', where each element of '''T[''a'']''' will be an array of size '''''b'''''&lt;br /&gt;
&lt;br /&gt;
=Sections=&lt;br /&gt;
The CHK is split into several named chunks (hence the file extension, an abbreviation of ''CHunK'').&lt;br /&gt;
&lt;br /&gt;
Each section begins with an 8-byte header:&lt;br /&gt;
* '''u32''' Name - A 4-byte string uniquely identifying that chunk's purpose.&lt;br /&gt;
* '''u32''' Size - The size, in bytes, of the chunk (not including this header)&lt;br /&gt;
Followed by as many bytes as 'Size', in a format described below.&lt;br /&gt;
&lt;br /&gt;
Some things to keep in mind about the CHK section:&lt;br /&gt;
* Invalid sections can exist and will be ignored. While Size is unsigned, it can safely be a negative value to read a chunk earlier in the file. This allows for &amp;quot;section stacking&amp;quot;, allowing smaller sections to be placed inside of larger ones or duplicate triggers or units to take less space in the file.&lt;br /&gt;
* All sections will marked &amp;quot;Not required.&amp;quot; are never read by StarCraft and can safely be omitted. However they may or may not be read by StarEdit, and may cause the map to be unreadable in an editor.&lt;br /&gt;
* Note &amp;quot;Hybrid&amp;quot;, or &amp;quot;Enhanced&amp;quot;, maps were introduced in 1.04. They are supported both by Original StarCraft and Brood War and usually contain sections for both types (e.g., UPGS and UPGx, TECS and TECx), but both sections aren't necessarily read.&lt;br /&gt;
* Duplicate sections will overwrite previously defined section data, except where noted. Note this only applies to those section that pass the specified &amp;quot;validation&amp;quot; parameters, as any section that does not successfully validate will be ignored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TYPE&amp;quot; - Map Type==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the type of scenario.&lt;br /&gt;
* '''u32''': Specifies the type of scenario:&lt;br /&gt;
** '''0x53574152''' or '''RAWS''' - 1.04 StarCraft and above (&amp;quot;hybrid&amp;quot;)&lt;br /&gt;
** '''0x42574152''' or '''RAWB''' - Brood War&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;VER &amp;quot; - Format Version==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section identifies the file format version.&lt;br /&gt;
* '''u16''': File format version:&lt;br /&gt;
** '''59''' - Starcraft 1.00 (original retail release)&lt;br /&gt;
** '''63''' - Starcraft 1.04 ''(hybrid)''&lt;br /&gt;
** '''64''' - Starcraft Remastered (1.21) ''(hybrid)''&lt;br /&gt;
** '''205''' - Brood War 1.00 ''(1.04)''&lt;br /&gt;
** '''206''' - Starcraft Remastered (1.21) ''(broodwar)''&lt;br /&gt;
This is the only version code section to actually be read by StarCraft (of TYPE, VER , IVER, and IVE2). Any other value is invalid in retail StarCraft and is usually a beta version.&lt;br /&gt;
&lt;br /&gt;
Other unsupported versions include:&lt;br /&gt;
* '''17''' - ''Warcraft II retail (.PUD)''&lt;br /&gt;
* '''19''' - ''Warcraft II Expansion (.PUD)''&lt;br /&gt;
* '''47''' - ''Starcraft Beta''&lt;br /&gt;
* '''57''' - ''Starcraft Prerelease''&lt;br /&gt;
* '''61''' - Brood War internal (map version 61)&lt;br /&gt;
* '''75''' - Brood War internal (map version 75) ''(Broodwar Battle.net Beta)''&lt;br /&gt;
* '''201''' - Brood War internal (map version 201)&lt;br /&gt;
* '''203''' - Brood War internal (map version 203)&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IVER&amp;quot; - Map Version==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section &amp;quot;additionally identifies&amp;quot; the map version.&lt;br /&gt;
* '''u16''': &amp;quot;Additional file format version:&amp;quot;&lt;br /&gt;
** '''9''' - beta/obsolete versions&lt;br /&gt;
** '''10''' - current versions&lt;br /&gt;
When saving as expansion this section gets removed entirely. Contrary to popular belief, it doesn't get &amp;quot;replaced&amp;quot; by IVE2 in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IVE2&amp;quot; - Map Version==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section &amp;quot;additionally identifies&amp;quot; the map version.&lt;br /&gt;
* '''u16''': &amp;quot;Additional file format version:&amp;quot;&lt;br /&gt;
** '''11''' - 1.04 StarCraft and above (&amp;quot;hybrid&amp;quot;) or Brood War.&lt;br /&gt;
This section does not &amp;quot;replace&amp;quot; IVER in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;VCOD&amp;quot; - Verification Code==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be equal to size of the VCOD data in the EXE resource. Must result in valid checksum.''&lt;br /&gt;
&lt;br /&gt;
This section has a verification code to make sure this is actually a CHK file.&lt;br /&gt;
&lt;br /&gt;
* '''u32[256]''': Seed values.&lt;br /&gt;
* '''u8[16]''': Operation codes to produce the resulting hash:&lt;br /&gt;
** '''00''' - XOR's the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''01''' - Adds to the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''02''' - Subtracts from the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''03''' - XOR's the current hash with the VCOD table at index OWNR, SIDE, FORC, and 0&lt;br /&gt;
** '''04''' - same as 0x03&lt;br /&gt;
** '''05''' - same as 0x03&lt;br /&gt;
** '''06''' - Complex function consisting of ORs and shifts&lt;br /&gt;
** '''07''' - Inverted version of 0x06, switching direction of all shifts&lt;br /&gt;
** '''08+''' - Do nothing&lt;br /&gt;
Opcodes and seeds do not have to match those in EXE resource, as long as the same value is produced.&amp;lt;br&amp;gt;&lt;br /&gt;
The only indexes in the seed table that are referenced are those that correspond individual values of [[#&amp;quot;OWNR&amp;quot; - StarCraft Player Types|OWNR]], [[#&amp;quot;SIDE&amp;quot; - Player Races|SIDE]], [[#&amp;quot;FORC&amp;quot; - Force Settings|FORC]] player assignments, and index 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IOWN&amp;quot; - StarEdit Player Types==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the owner of each player.&lt;br /&gt;
* '''u8[12]''': One byte for each player, specifies the owner of the player:&lt;br /&gt;
** '''00''' - Inactive&lt;br /&gt;
** ''01'' - Computer (game)&lt;br /&gt;
** ''02'' - Occupied by Human Player&lt;br /&gt;
** '''03''' - Rescue Passive&lt;br /&gt;
** '''04''' - Unused&lt;br /&gt;
** '''05''' - Computer&lt;br /&gt;
** '''06''' - Human (Open Slot)&lt;br /&gt;
** '''07''' - Neutral&lt;br /&gt;
** ''08'' - Closed slot&lt;br /&gt;
This section is separate from OWNR as a staredit value. Staredit does not display &amp;quot;inactive&amp;quot; as a valid option. Italicized settings denote invalid map options, which may involve a buffer overflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;OWNR&amp;quot; - StarCraft Player Types==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 12 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section designates the controller of a particular player. It is exactly the same as the &amp;quot;IOWN&amp;quot; section, except there is an additional value, 0x00 for Inactive.&lt;br /&gt;
* '''u8[12]''': One byte for each player, specifies the owner of the player:&lt;br /&gt;
** '''00''' - Inactive&lt;br /&gt;
** ''01'' - Computer (game)&lt;br /&gt;
** ''02'' - Occupied by Human Player&lt;br /&gt;
** '''03''' - Rescue Passive&lt;br /&gt;
** '''04''' - Unused&lt;br /&gt;
** '''05''' - Computer&lt;br /&gt;
** '''06''' - Human (Open Slot)&lt;br /&gt;
** '''07''' - Neutral&lt;br /&gt;
** ''08'' - Closed slot&lt;br /&gt;
Italicized settings denote invalid map options, which may involve a buffer overflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;ERA &amp;quot; - Tileset==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section indicates the tileset of the scenario.&lt;br /&gt;
* '''u16''': Designates tileset:&lt;br /&gt;
** '''00''' - Badlands&lt;br /&gt;
** '''01''' - Space Platform&lt;br /&gt;
** '''02''' - Installation&lt;br /&gt;
** '''03''' - Ashworld&lt;br /&gt;
** '''04''' - Jungle&lt;br /&gt;
** '''05''' - Desert&lt;br /&gt;
** '''06''' - Arctic&lt;br /&gt;
** '''07''' - Twilight&lt;br /&gt;
StarCraft masks the tileset indicator's bit value, so bits after the third place (anything after the value &amp;quot;7&amp;quot;) are removed. Thus, 9 (1001 in binary) is interpreted as 1 (0001), 10 (1010) as 2 (0010), etc.&amp;lt;br&amp;gt;&lt;br /&gt;
Desert, Arctic, and Twilight are Brood War-only tilesets.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;DIM &amp;quot; - Map Dimensions==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains the dimensions of the map.&lt;br /&gt;
* '''u16''': Width of the map&lt;br /&gt;
* '''u16''': Height of the map&lt;br /&gt;
The Width/Height of the map is measured in the number of square 32x32p tiles.&amp;lt;br&amp;gt;&lt;br /&gt;
Standard Dimensions are 64, 96, 128, 192, and 256.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SIDE&amp;quot; - Player Races==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 12 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains the species/race of each player.&lt;br /&gt;
* '''u8[12]''': 1 byte per player the species of that player:&lt;br /&gt;
** '''00''' - Zerg&lt;br /&gt;
** '''01''' - Terran&lt;br /&gt;
** '''02''' - Protoss&lt;br /&gt;
** ''03'' - Invalid (Independent), shown as &amp;quot;Unknown&amp;quot; in SC:R lobby&lt;br /&gt;
** ''04'' - Invalid (Neutral), shown as &amp;quot;Unknown&amp;quot;&lt;br /&gt;
** '''05''' - User Select&lt;br /&gt;
** '''06''' - Random (Forced; Acts as a selected race)&lt;br /&gt;
** ''07'' - Inactive, shown as locked &amp;quot;Select Race&amp;quot; option in SC:R lobby&lt;br /&gt;
Italicized settings denote invalid map options. Note Players 9-11 are defaultly Inactive and Player 12 is defaultly Neutral.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MTXM&amp;quot; - StarCraft Terrain==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be less than or equal to 131072 (0x20000) bytes (256 * 256 * 2).''&lt;br /&gt;
&lt;br /&gt;
Terrain section that contains a map of the level's appearance. StarEdit disregards this section and instead uses [[#&amp;quot;TILE&amp;quot; - StarEdit Terrain|TILE]]; it is only used in Starcraft.&lt;br /&gt;
* '''u16[map width * height]''': one integer for each tile.&lt;br /&gt;
Notes about MTXM:&lt;br /&gt;
* The Width/Height of the map is measured in the number of square 32x32p tiles.&lt;br /&gt;
* Tiles in this section are listed from left to right, top to bottom.&lt;br /&gt;
* The values for each integer are their respective &amp;quot;MegaTile&amp;quot; values in the scenario's tileset. If the size of this section is greater than width*height*2, the data following is ignored. If the size of this section is less, the resulting tiles that have not been defined will be null tiles.&lt;br /&gt;
* This section includes doodads as terrain; TILE, which is otherwise identical, doesn't. Out of the terrain sections (TILE, ISOM, and MTXM), SC only reads MTXM for the sake of not having to generate this data on-the-fly: it contains the exact representation of the level's appearance, including doodads. TILE, on the other hand, is directly tied via a tile lookup function to ISOM, and exists for the sake of not having to generate tiles from ISOM on-the-fly in StarEdit.&lt;br /&gt;
* If MTXM section is smaller than (map width*height), then the remaining tiles will be filled with null tiles or tiles specified by previous MTXM sections.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PUNI&amp;quot; - Player Unit Restrictions==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 5700 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains player unit restrictions: it indicates whether the player can or cannot build a particular unit.&lt;br /&gt;
* '''u8[228][12]''': 1 byte for each unit in order of its unit id, then each player, for player availability:&lt;br /&gt;
** '''00''' - That unit is not available for production if the player has 'override defaults' on&lt;br /&gt;
** '''01''' - That unit is available for production if the player has 'override defaults' on&lt;br /&gt;
* '''u8[228]''': 1 byte for each unit in order of it's unit id, for global availability defaults (for all players):&lt;br /&gt;
** '''00''' - That unit is not available for production&lt;br /&gt;
** '''01''' - That unit is available for production&lt;br /&gt;
* '''u8[228][12]''': 1 byte for each unit in order of its unit id, then each player, indicating whether a player uses the global availability defaults.&lt;br /&gt;
** '''00''' - Player overrides defaults for this unit&lt;br /&gt;
** '''01''' - Player uses defaults for this unit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGR&amp;quot; - Upgrade Restrictions==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1748 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;PUPx&amp;quot; - BW Upgrade Restrictions|&amp;quot;PUPx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains player upgrade restrictions: it indicates the starting/maximum levels at/to which a player can perform a particular upgrade.&lt;br /&gt;
* '''u8[46][12]''': 1 byte for the maximum level a player can upgrade to, in order of its upgrade id, then each player&lt;br /&gt;
* '''u8[46][12]''': 1 byte for the level of an upgrade a player starts off with, in order of its upgrade id, then each player&lt;br /&gt;
* '''u8[46]''': 1 byte for the global default maximum level of each upgrade, in order of its upgrade id.&lt;br /&gt;
* '''u8[46]''': 1 byte for the global default starting level of each upgrade, in order of its upgrade id.&lt;br /&gt;
* '''u8[46][12]''': 1 byte for each upgrade in order of its upgrade id, then each player, indicating whether a player uses the global upgrade defaults:&lt;br /&gt;
** '''00''' - Player does not use global upgrade defaults for this upgrade&lt;br /&gt;
** '''01''' - Player uses upgrade defaults for this upgrade&lt;br /&gt;
See [[#List of Upgrade IDs]].&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PTEC&amp;quot; - Tech Restrictions==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 912 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;PTEx&amp;quot; - BW Tech Restrictions|&amp;quot;PTEx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains player technology availability restrictions: it indicates whether a player starts off with a particular technology or can research a particular technology.&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology id, then each player, for player availability:&lt;br /&gt;
** '''00''' - Technology is not available for a player&lt;br /&gt;
** '''01''' - Technology is available for a player&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology id, then each player, for &amp;quot;already researched&amp;quot; status:&lt;br /&gt;
** '''00''' - Technology is not already researched&lt;br /&gt;
** '''01''' - Technology is already researched&lt;br /&gt;
* '''u8[24]''': 1 byte for each technology for global availability defaults:&lt;br /&gt;
** '''00''' - Technology is not available by default&lt;br /&gt;
** '''01''' - Technology is available by default&lt;br /&gt;
* '''u8[24]''': 1 byte for each technology for global &amp;quot;already researched&amp;quot; defaults:&lt;br /&gt;
** '''00''' - Technology is not already researched by default&lt;br /&gt;
** '''01''' - Technology is already researched by default&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology in order of its technology id, then each player, indicating whether a player uses the global defaults:&lt;br /&gt;
** '''00''' - Technology overrides defaults for player&lt;br /&gt;
** '''01''' - Technology uses default settings for player&lt;br /&gt;
See [[#List of Technology IDs]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIT&amp;quot; - Placed Units==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 36 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the pre-placed units on the map and their properties. Each unit on the map gets the following structure:&lt;br /&gt;
* '''u32''': The unit's class instance (sort of a &amp;quot;serial number&amp;quot;)&lt;br /&gt;
* U16''': X coordinate of unit&lt;br /&gt;
* U16''': Y coordinate of unit&lt;br /&gt;
* '''u16''': Unit ID&lt;br /&gt;
* '''u16''': Type of relation to another building (i.e. add-on, nydus link)&lt;br /&gt;
** '''Bit 9''' - Addon Link&lt;br /&gt;
** '''Bit 10''' - Nydus Link&lt;br /&gt;
* '''u16''': Flags of special properties which can be applied to the unit and are valid:&lt;br /&gt;
** '''Bit 0''' - Cloak is valid&lt;br /&gt;
** '''Bit 1''' - Burrow is valid&lt;br /&gt;
** '''Bit 2''' - In transit is valid&lt;br /&gt;
** '''Bit 3''' - Hallucinated is valid&lt;br /&gt;
** '''Bit 4''' - Invincible is valid&lt;br /&gt;
** '''Bit 5-15''' - Unused&lt;br /&gt;
* '''u16''': Out of the elements of the unit data, the properties which can be changed by the map maker:&lt;br /&gt;
** '''Bit 0''' - Owner player is valid (the unit is not a critter, start location, etc.; not a neutral unit)&lt;br /&gt;
** '''Bit 1''' - HP is valid&lt;br /&gt;
** '''Bit 2''' - Shields is valid&lt;br /&gt;
** '''Bit 3''' - Energy is valid (unit is a wraith, etc.)&lt;br /&gt;
** '''Bit 4''' - Resource amount is valid (unit is a mineral patch, vespene geyser, etc.)&lt;br /&gt;
** '''Bit 5''' - Amount in hangar is valid (unit is a reaver, carrier, etc.)&lt;br /&gt;
** '''Bit 6-15''' - Unused&lt;br /&gt;
* '''u8''': Player number of owner (0-based)&lt;br /&gt;
* '''u8''': Hit points % (1-100)&lt;br /&gt;
* '''u8''': Shield points % (1-100)&lt;br /&gt;
* '''u8''': Energy points % (1-100)&lt;br /&gt;
* '''u32''': Resource amount&lt;br /&gt;
* '''u16''': Number of units in hangar&lt;br /&gt;
* '''u16''': Unit state flags&lt;br /&gt;
** '''Bit 0''' - Unit is cloaked&lt;br /&gt;
** '''Bit 1''' - Unit is burrowed&lt;br /&gt;
** '''Bit 2''' - Building is in transit&lt;br /&gt;
** '''Bit 3''' - Unit is hallucinated&lt;br /&gt;
** '''Bit 4''' - Unit is invincible&lt;br /&gt;
** '''Bit 5-15''' - Unused&lt;br /&gt;
* '''u32''': Unused&lt;br /&gt;
* '''u32''': Class instance of the unit to which this unit is related to (i.e. via an add-on, nydus link, etc.). It is &amp;quot;0&amp;quot; if the unit is not linked to any other unit.&lt;br /&gt;
Notes about UNIT:&lt;br /&gt;
* The X/Y coordinates are the center of the sprite of the unit (in pixels).&lt;br /&gt;
* Please edit if you could confirm the bit values to be correct/if you know more bit values.&lt;br /&gt;
* Default values will apply if bit values are unchecked. Defaults: 100% HP, 100% SP, 100% EP, 0 resources, 0 hangar count.&lt;br /&gt;
* This section can be split. Additional UNIT sections will add more units.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;ISOM&amp;quot; - Isometric Terrain==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section is required to place isometric terrain on the map. It provides data about the nature of the isometric &amp;quot;diamonds&amp;quot; (the editing mode of StarEdit).&lt;br /&gt;
* '''u16[ (width / 2 + 1) * (height + 1) * 4 ]''': 4 integers for each 2x1 map rectangle tile (plus one extra tile to the right and bottom of the map), as per the RECT structure. Each rectangle border (left, top, right, bottom) is assigned an &amp;quot;ISOM value.&amp;quot; These form the &amp;quot;diamond&amp;quot; pattern of the map, and each rectangle thus gets two ISOM values associated with it. The index of the rectangle's right tile is that of its left tile + 16.&lt;br /&gt;
** '''Bit 0''' (0x0001) - Flag used by the editor (&amp;quot;Edited&amp;quot;?)&lt;br /&gt;
** '''Bit 1-3''' - Determines the position on the ISOM grid for the given tile edge. Each diamond covers four 2x1 map tiles, so each tile therefore has two edges per diamond.&lt;br /&gt;
*** '''0''' (0x0000) - Top Left tile horizontal edge. Also the default value upon map creation for all tiles and directions.&lt;br /&gt;
*** '''1''' (0x0002) - Top Left tile vertical edge&lt;br /&gt;
*** '''2''' (0x0004) - Top Right tile horizontal edge&lt;br /&gt;
*** '''3''' (0x0006) - Top Right tile vertical edge&lt;br /&gt;
*** '''4''' (0x0008) - Bottom Right tile horizontal edge&lt;br /&gt;
*** '''5''' (0x000A) - Bottom Right tile vertical edge&lt;br /&gt;
*** '''6''' (0x000C) - Bottom Left tile vertical edge&lt;br /&gt;
*** '''7''' (0x000E) - Bottom Left tile horizontal edge&lt;br /&gt;
** '''Bit 4-14''' - ISOM terrain type ID, used to determine what type of terrain is on that edge. This value matches the corresponding edge on the adjacent tile. The ID is related to the CV5 Index, but the actual value is determined by a hardcoded lookup table in the editor. A value of 0 is for square terrain in StarEdit.&lt;br /&gt;
** '''Bit 15''' (0x8000) - Flag used by the editor (&amp;quot;Skipped&amp;quot;?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ISOM_Grid_Values.png]]&lt;br /&gt;
&lt;br /&gt;
First 1 in each value is the terrain type ID (1 for dirt), second digit is the ISOM edge ID. Values inside the diamond are associated with that diamond, values outside are associated with the adjacent diamonds on the ISOM grid.  This arrangement of tiles is tiled across the entire map, forming the full ISOM grid.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TILE&amp;quot; - StarEdit Terrain==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section will only be different from the [[#&amp;quot;MTXM&amp;quot; - StarCraft Terrain|MTXM]] section in tiles where doodads are present.&lt;br /&gt;
* '''u16[ map width * height ]''': 1 integer for each map tile. Moves horizontally across the map.&lt;br /&gt;
The values in TILE are normally directly generated from the ISOM section (see &amp;quot;'ISOM' section&amp;quot; above), and thus do not match that of MTXM on doodad tiles.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;DD2 &amp;quot; - StarEdit Sprites (Doodads)==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section contains the doodad map of the level. There are several parts to doodads. The graphical portion is stored in the [[#&amp;quot;MTXM&amp;quot; - StarCraft Terrain|MTXM]] section. The second part of the doodad is stored in this section. This section is only used by the map editor.&lt;br /&gt;
&lt;br /&gt;
Each doodad in the map gets the following structure:&lt;br /&gt;
* '''u16''': Number of the doodad. Size of the doodad is dependent on this. Doodads are different for each tileset.&lt;br /&gt;
* '''u16''': X coordinate of the doodad unit&lt;br /&gt;
* '''u16''': Y coordinate of the doodad unit&lt;br /&gt;
* '''u8''': Player number that owns the doodad&lt;br /&gt;
* '''u8''': Enabled flag&lt;br /&gt;
** '''00''' - Doodad is enabled (trap can attack, door is closed, etc)&lt;br /&gt;
** '''01''' - Doodad is disabled&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;THG2&amp;quot; - StarCraft Sprites==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 10 bytes.''&lt;br /&gt;
&lt;br /&gt;
The map editor only writes to this section. Starcraft uses this section.&lt;br /&gt;
&lt;br /&gt;
Sprites, usually on doodads, get the following structure.&lt;br /&gt;
* '''u16''': Unit/Sprite number of the sprite&lt;br /&gt;
* '''u16''': X coordinate of the doodad unit&lt;br /&gt;
* '''u16''': Y coordinate of the doodad unit&lt;br /&gt;
* '''u8''': Player number that owns the doodad&lt;br /&gt;
* '''u8''': Unused&lt;br /&gt;
* '''u16''': Flags&lt;br /&gt;
** '''Bit 0-11''' - Unused&lt;br /&gt;
** '''Bit 12''' - Draw as sprite (Determines if it is a sprite or a unit sprite)&lt;br /&gt;
** '''Bit 13''' - Unused&lt;br /&gt;
** '''Bit 14''' - Unused&lt;br /&gt;
** '''Bit 15''' - Disabled (Only valid if Draw as sprite is unchecked, disables the unit)&lt;br /&gt;
This section can be split. Additional THG2 sections will add more sprites.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MASK&amp;quot; - Fog of War Layer==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: This section will always validate.''&lt;br /&gt;
&lt;br /&gt;
This section contains the data on fog of war for each player. This is whether at the start of the game that levels of black space that is available.&lt;br /&gt;
* '''u8[ map width * height ]''': One byte for each map tile. The bits indicate for each player the fog of war.&lt;br /&gt;
** '''Bit 0''' - Player 1's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 1''' - Player 2's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 2''' - Player 3's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 3''' - Player 4's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 4''' - Player 5's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 5''' - Player 6's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 6''' - Player 7's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 7''' - Player 8's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
Any size greater than width*height will be ignored. Any size less will default missing tiles to 0xFF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;STR &amp;quot; - String Data==&lt;br /&gt;
''Required for all versions and all game types (or STRx).''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be at least 1 byte.''&lt;br /&gt;
&lt;br /&gt;
Note, since StarCraft Remastered, the &amp;quot;STRx&amp;quot; section is also possible and it optionally replaces the STR section.&lt;br /&gt;
&lt;br /&gt;
Note, the encoding of text in the STR section is unspecified. Common encodings are CP-1252, CP-949, and later, UTF-8, (but anything is possible)&lt;br /&gt;
&lt;br /&gt;
This section contains all the strings in the map.&lt;br /&gt;
* '''u16''': Number of strings in the section (Default''': 1024)&lt;br /&gt;
* '''u16[Number of strings]''': 1 integer for each string specifying the offset (the spot where the string starts in the section from the start of it).&lt;br /&gt;
* '''Strings''': After the offsets, this is where every string in the map goes, one after another. Each one is terminated by a null character.&lt;br /&gt;
This section can contain more or less then 1024 string offsests and will work in Starcraft.&amp;lt;br&amp;gt;&lt;br /&gt;
By default the first byte in '''Strings''' is a NUL character, and all unused offsets in the STR section point to this NUL character.&lt;br /&gt;
Note that STR sections can be stacked in a similar fashion as MTXM.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;STRx&amp;quot; - String Data==&lt;br /&gt;
''Required for all versions and all game types (or STR)''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be at least 1 byte (assumed, not confirmed).''&lt;br /&gt;
&lt;br /&gt;
Note, the STR section can also exist and optionally replace the STRx section.&lt;br /&gt;
&lt;br /&gt;
Note, the encoding of text in the STRx section is unspecified. Commonly it is UTF-8 but anything is possible.&lt;br /&gt;
&lt;br /&gt;
The STRx section is a simple bit extension to the STR section introduced in StarCraft Remastered.&lt;br /&gt;
&lt;br /&gt;
This section contains all the strings in the map.&lt;br /&gt;
* '''u32''': Number of strings in the section (Default''': 1024)&lt;br /&gt;
* '''u32[Number of strings]''': 1 integer for each string specifying the offset (the spot where the string starts in the section from the start of it).&lt;br /&gt;
* '''Strings''': After the offsets, this is where every string in the map goes, one after another. Each one is terminated by a null character.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPRP&amp;quot; - CUWP Slots==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1280 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section is used whenever the create units with properties trigger is used. Since a slot has to be assigned to the action, this is where each slot is designated.&lt;br /&gt;
&lt;br /&gt;
There are 64 of the following structures regardless of how many are used and it cannot exceed 64.&lt;br /&gt;
* '''u16''': Flag of which special properties can be applied to unit, and are valid.&lt;br /&gt;
** '''Bit 0''' - Cloak bit is valid&lt;br /&gt;
** '''Bit 1''' - Burrowed bit is valid&lt;br /&gt;
** '''Bit 2''' - In transit bit is valid&lt;br /&gt;
** '''Bit 3''' - Hallucinated bit is valid&lt;br /&gt;
** '''Bit 4''' - Invincible bit is valid&lt;br /&gt;
** '''Bit 5-15''' - Unknown/unused&lt;br /&gt;
* '''u16''': Which elements of the unit data are valid, which properties can be changed by the map maker.&lt;br /&gt;
** '''Bit 0''' - Owner player is valid (unit is not neutral)&lt;br /&gt;
** '''Bit 1''' - HP is valid&lt;br /&gt;
** '''Bit 2''' - Shields is valid&lt;br /&gt;
** '''Bit 3''' - Energy is valid&lt;br /&gt;
** '''Bit 4''' - Resource amount is valid (unit is a resource)&lt;br /&gt;
** '''Bit 5''' - Amount in hanger is valid&lt;br /&gt;
** '''Bit 6''' - Unknown/unused&lt;br /&gt;
* '''u8''': Player number that owns unit. Will always be NULL in this section (0)&lt;br /&gt;
* '''u8''': Hit point % (1-100)&lt;br /&gt;
* '''u8''': Shield point % (1-100)&lt;br /&gt;
* '''u8''': Energy point % (1-100)&lt;br /&gt;
* '''u32''': Resource amount (for resources only)&lt;br /&gt;
* '''u16''': # of units in hangar&lt;br /&gt;
* '''u16''': Flags&lt;br /&gt;
** '''Bit 0''' - Unit is cloaked&lt;br /&gt;
** '''Bit 1''' - Unit is burrowed&lt;br /&gt;
** '''Bit 2''' - Building is in transit&lt;br /&gt;
** '''Bit 3''' - Unit is hallucinated&lt;br /&gt;
** '''Bit 4''' - Unit is invincible&lt;br /&gt;
** '''Bit 5-15''' - Unknown/unused&lt;br /&gt;
* '''u32''': Unknown/unused. Padding?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPUS&amp;quot; - CUWP Slots Used==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section goes along with the &amp;quot;UPRP&amp;quot; section. This section just indicates which of the 64 unit properties slot are used.&lt;br /&gt;
* '''u8[64]''': 1 byte for each trigger unit properties slot&lt;br /&gt;
** '''00''' - Properties slot is unused&lt;br /&gt;
** '''01''' - Properties slot is used&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MRGN&amp;quot; - Locations==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: 1280 bytes for retail, 5100 bytes for Hybrid and Broodwar.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the locations that the map uses. In a vanilla map, this section contains 64 locations. In a Hybrid or Brood War map, this section will expand to contain 255 locations.&lt;br /&gt;
&lt;br /&gt;
Each location gets one of the following location entries. The 'Anywhere' location, is ALWAYS location 64.&lt;br /&gt;
* '''u32''': Left (X1) coordinate of location, in pixels (usually 32 pt grid aligned)&lt;br /&gt;
* '''u32''': Top (Y1) coordinate of location, in pixels&lt;br /&gt;
* '''u32''': Right (X2) coordinate of location, in pixels&lt;br /&gt;
* '''u32''': Bottom (Y2) coordinate of location, in pixels&lt;br /&gt;
* '''u16''': String number of the name of this location&lt;br /&gt;
* '''u16''': Location elevation flags. If an elevation is disabled in the location, it's bit will be on (1)&lt;br /&gt;
** '''Bit 0''' - Low elevation&lt;br /&gt;
** '''Bit 1''' - Medium elevation&lt;br /&gt;
** '''Bit 2''' - High elevation&lt;br /&gt;
** '''Bit 3''' - Low air&lt;br /&gt;
** '''Bit 4''' - Medium air&lt;br /&gt;
** '''Bit 5''' - High air&lt;br /&gt;
** '''Bit 6-15''' - Unused&lt;br /&gt;
Note that in typical locations Right is always larger than Left and Bottom is always larger than Top. However, you can reverse one or both of these for [[Inverted Locations]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TRIG&amp;quot; - Triggers==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 2400 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the triggers in the map. This along with [[#&amp;quot;MBRF&amp;quot; - Mission Briefings|MBRF]] is the most complicated section in the entire scenario.chk file as there is a lot of data packed into too little of a space. Refer to the appendix at the bottom of this page for more information.&lt;br /&gt;
For easy reference, since each trigger contains 2400 bytes, the amount of triggers can be gotten by taking the section length and dividing by 2400.&lt;br /&gt;
Every single trigger in the map will have the following format:&lt;br /&gt;
* 16 Conditions (20 byte struct)&amp;lt;br&amp;gt; Every trigger has 16 of the following format, even if only one condition is used. See the appendix for information on which items are used for what conditions.&lt;br /&gt;
** '''u32''': Location number for the condition (1 based -- 0 refers to No Location), EUD Bitmask for a Death condition if the MaskFlag is set to &amp;quot;SC&amp;quot;&lt;br /&gt;
** '''u32''': [[#List of Players/Group IDs|Group]] that the condition applies to&lt;br /&gt;
** '''u32''': Qualified number (how many/resource amount)&lt;br /&gt;
** '''u16''': [[#Trigger Unit Types|Unit ID]] condition applies to&lt;br /&gt;
** '''u8''': [[#Numeric Comparisons|Numeric comparison]], [[#Switch States|switch state]]&lt;br /&gt;
** '''u8''': [[#Trigger Conditions List|Condition byte]]&lt;br /&gt;
** '''u8''': [[#Resource Types|Resource type]], [[#Score Types|score type]], Switch number (0-based)&lt;br /&gt;
** '''u8''': Flags&lt;br /&gt;
*** '''Bit 0''' - Unknown/unused&lt;br /&gt;
*** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled/ignored&lt;br /&gt;
*** '''Bit 2''' - Always display flag.&lt;br /&gt;
*** '''Bit 3''' - Unit properties is used. ('''Note:''' This is used in [[TRG|*.trg]] files)&lt;br /&gt;
*** '''Bit 4''' - Unit type is used. Cleared in &amp;quot;Offset + Mask&amp;quot; EUD conditions. May not be necessary otherwise?&lt;br /&gt;
*** '''Bit 5-7''' - Unknown/unused&lt;br /&gt;
** '''u16''': MaskFlag: set to &amp;quot;SC&amp;quot; (0x53, 0x43) when using the bitmask for EUDs, 0 otherwise&lt;br /&gt;
* 64 Actions (32 byte struct)&amp;lt;br&amp;gt; Immediately following the 16 conditions, there are 64 actions. There will always be 64 of the following structure, even if some of them are unused.&lt;br /&gt;
** '''u32''': Location - source location in &amp;quot;Order&amp;quot; and &amp;quot;Move Unit&amp;quot;, dest location in &amp;quot;Move Location&amp;quot; (1 based -- 0 refers to No Location), EUD Bitmask for a Death action if the MaskFlag is set to &amp;quot;SC&amp;quot;&lt;br /&gt;
** '''u32''': String number for trigger text (0 means no string)&lt;br /&gt;
** '''u32''': WAV string number (0 means no string)&lt;br /&gt;
** '''u32''': Seconds/milliseconds of time&lt;br /&gt;
** '''u32''': First (or only) [[#List of Players/Group IDs|Group/Player]] affected.&lt;br /&gt;
** '''u32''': Second group affected, secondary location (1-based), CUWP #, number, AI script (4-byte string), switch (0-based #)&lt;br /&gt;
** '''u16''': [[#Trigger Unit Types|Unit type]], [[#Score Types|score type]], [[#Resource Types|resource type]], [[#Alliance Statuses|alliance status]]&lt;br /&gt;
** '''u8''': [[#Trigger Actions List|Action byte]]&lt;br /&gt;
** '''u8''': Number of units (0 means All Units), [[#Action States|action state]], [[#Unit Orders|unit order]], [[#Number Modifiers|number modifier]]&lt;br /&gt;
** '''u8''': Flags&lt;br /&gt;
*** '''Bit 0''' - Ignore a wait/transmission once.&lt;br /&gt;
*** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled.&lt;br /&gt;
*** '''Bit 2''' - Always display flag - when not set: if the user has turned off subtitles (see sound options) the text will not display, when set: text will always display&lt;br /&gt;
*** '''Bit 3''' - Unit properties is used. Staredit uses this for *.trg files.&lt;br /&gt;
*** '''Bit 4''' - Unit type is used. Cleared in &amp;quot;Offset + Mask&amp;quot; EUD actions.&lt;br /&gt;
*** '''Bit 5-7''' - Unknown/unused&lt;br /&gt;
** '''u8''': Padding&lt;br /&gt;
** '''u16 (2 bytes)''': MaskFlag: set to &amp;quot;SC&amp;quot; (0x53, 0x43) when using the bitmask for EUDs, 0 otherwise&lt;br /&gt;
* Player Execution&amp;lt;br&amp;gt; Following the 16 conditions and 64 actions, every trigger also has this structure&lt;br /&gt;
** '''u32''': execution flags&lt;br /&gt;
*** '''Bit 0''' - All conditions are met, executing actions, cleared on the next trigger loop.&lt;br /&gt;
*** '''Bit 1''' - Ignore the following actions: Defeat, Draw.&lt;br /&gt;
*** '''Bit 2''' - Preserve trigger. (Can replace Preserve Trigger action)&lt;br /&gt;
*** '''Bit 3''' - Ignore execution.&lt;br /&gt;
*** '''Bit 4''' - Ignore all of the following actions for this trigger until the next trigger loop: Wait, PauseGame, Transmission, PlayWAV, DisplayTextMessage, CenterView, MinimapPing, TalkingPortrait, and MuteUnitSpeech.&lt;br /&gt;
*** '''Bit 5''' - This trigger has paused the game, ignoring subsequent calls to Pause Game (Unpause Game clears this flag only in the same trigger), may automatically call unpause at the end of action execution?&lt;br /&gt;
*** '''Bit 6''' - Wait skipping disabled for this trigger, cleared on next trigger loop.&lt;br /&gt;
*** '''Bit 7-31''' - Unknown/unused&lt;br /&gt;
** '''u8[27]''': 1 byte for each player in the [[#List of Players/Group IDs]]&lt;br /&gt;
*** '''00''' - Trigger is not executed for player&lt;br /&gt;
*** '''01''' - Trigger is executed for player&lt;br /&gt;
** '''u8''': Index of the current action, in StarCraft this is incremented after each action is executed, trigger execution ends when this is 64 (Max Actions) or an action is encountered with Action byte as 0&lt;br /&gt;
This section can be split. Additional TRIG sections will add more triggers.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MBRF&amp;quot; - Mission Briefings==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 2400 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all of the mission briefings shown by the players.&lt;br /&gt;
&lt;br /&gt;
See [[#&amp;quot;TRIG&amp;quot; - Triggers|&amp;quot;TRIG&amp;quot;]] section for format, as it is exactly the same except for the conditions. In this section the 16 conditions are still there, they are all null except for the very first condition, which only has a condition byte of 13. See [[#Mission Briefing Actions List]] for the action bytes for the mission briefing actions.&lt;br /&gt;
&lt;br /&gt;
This section can be split. Additional MBRF sections will add more briefing triggers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SPRP&amp;quot; - Scenario Properties==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4 bytes.''&lt;br /&gt;
&lt;br /&gt;
* '''u16''': String number of the scenario name&lt;br /&gt;
* '''u16''': String number of the scenarios description.&lt;br /&gt;
A string index of 0 for the map name will default it to its file name. A string index of 0 description will default to a predefined string.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;FORC&amp;quot; - Force Settings==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be less than or equal to 20 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the forces and the information about them.&lt;br /&gt;
* '''u8[8]''': 1 byte for each active player, specifying which of the 4 forces (0-based) that the player's on&lt;br /&gt;
* '''u16[4]''': 1 integer for each force, string number of the name of the force&lt;br /&gt;
* '''u8[4]''': 1 byte for each force specifying the properties:&lt;br /&gt;
** '''Bit 0''' - Random start location&lt;br /&gt;
** '''Bit 1''' - Allies&lt;br /&gt;
** '''Bit 2''' - Allied victory&lt;br /&gt;
** '''Bit 3''' - Shared vision&lt;br /&gt;
** '''Bit 4-7''' - Unused&lt;br /&gt;
Notes about FORC:&lt;br /&gt;
* If there is no string specified for a force name, it will default to a &amp;quot;Force #&amp;quot; string.&lt;br /&gt;
* If this section is less than 20 bytes, the remaining bytes are defaulted to 0.&lt;br /&gt;
* Players can be on a force greater than 4, however they will not appear in the game lobby.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;WAV &amp;quot; - WAV String Indexes==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
There are 512 wav entires regardless of how many are actually used.&lt;br /&gt;
* '''u32[512]''': 1 long for each WAV. Indicates a string index is used for a WAV path in the MPQ. If the entry is not used, it will be 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIS&amp;quot; - Unit Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4048 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;UNIx&amp;quot; - BW Unit Settings|&amp;quot;UNIx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains the unit settings for the level:&lt;br /&gt;
* '''u8[228]''': 1 byte for each unit, in order of Unit ID&lt;br /&gt;
** '''00''' - Unit does not use default settings&lt;br /&gt;
** '''01''' - Unit does use default settings&lt;br /&gt;
* '''u32[228]''': Hit points for unit (Note the displayed value is this value / 256, with the low byte being a fractional HP value)&lt;br /&gt;
* '''u16[228]''': Shield points, in order of Unit ID&lt;br /&gt;
* '''u8[228]''': Armor points, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Build time (1/60 seconds), in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Mineral cost, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Gas cost, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': String number, in order of Unit ID&lt;br /&gt;
* '''u16[100]''': Base weapon damage the weapon does, in weapon ID order ([[#List of Unit Weapon IDs]])&lt;br /&gt;
* '''u16[100]''': Upgrade bonus weapon damage, in weapon ID order&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGS&amp;quot; - Upgrade Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 598 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;UPGx&amp;quot; - BW Upgrade Settings|&amp;quot;UPGx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains upgrade settings:&lt;br /&gt;
* '''u8[46]''': 1 byte per each upgrade, in order of upgrade id.&lt;br /&gt;
** '''00''' - Upgrade uses custom settings&lt;br /&gt;
** '''01''' - Upgrade uses default settings&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, time factor for each upgrade, in order of upgrade id.&lt;br /&gt;
See [[#List of Upgrade IDs]] for upgrade ids.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TECS&amp;quot; - Tech Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 216 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;TECx&amp;quot; - BW Tech Settings|&amp;quot;TECx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains technology/special abilities settings:&lt;br /&gt;
* '''u8[24]''': 1 byte per each technology, specifies if the tech overrides the default settings. In order of technology id&lt;br /&gt;
** '''00''' - Technology uses custom settings&lt;br /&gt;
** '''01''' - Technology uses default settings&lt;br /&gt;
* '''u16[24]''': Mineral cost to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Gas cost to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Time required to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Energy cost to cast technology/special ability. In order of technology id.&lt;br /&gt;
See [[#List of Technology IDs]] for technology ids.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SWNM&amp;quot; - Switch Names==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section contains the strings used for each switch. There are 256 switches, and can't be any more or any less.&lt;br /&gt;
* '''u32[256]''': One long for each switch, specifies the string number for the name of each switch. Unnamed switches will have an index of 0, and have a default switch name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;COLR&amp;quot; - Player Colors==&lt;br /&gt;
''Required for Brood War only and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 8 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section indicates what color each player is, but only has effect on Brood War.&lt;br /&gt;
* '''u8[8]''': 1 byte for each player, indicates the color of the player&lt;br /&gt;
** '''00''' - Red (#F40404)&lt;br /&gt;
** '''01''' - Blue (#0C48CC)&lt;br /&gt;
** '''02''' - Teal (#2CB494)&lt;br /&gt;
** '''03''' - Purple (#88409C)&lt;br /&gt;
** '''04''' - Orange (#F88C14)&lt;br /&gt;
** '''05''' - Brown (#703014)&lt;br /&gt;
** '''06''' - White (#CCE0D0)&lt;br /&gt;
** '''07''' - Yellow (#FCFC38)&lt;br /&gt;
** '''08''' - Green (#088008)&lt;br /&gt;
** '''09''' - Pale yellow (#FCFC7C)&lt;br /&gt;
** '''10''' - Tan (#ECC4B0)&lt;br /&gt;
** '''11''' - Azure (Neutral color, #4068D4)&lt;br /&gt;
Other values can be used but may have different results depending on the tileset. Any color value above 11 is an overflow. As of patch 1.18.6, values above 11 result in default player color.&lt;br /&gt;
&lt;br /&gt;
When CRGB is present, this section still defines leaderboard colors.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;CRGB&amp;quot; - Remastered Player Colors==&lt;br /&gt;
''Requirement unknown, but can be in any map type including non-remaster maps.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 32 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''u8[8][3]''': 3 bytes for each player corresponding to an RGB color value&lt;br /&gt;
** '''u8''': R&lt;br /&gt;
** '''u8''': G&lt;br /&gt;
** '''u8''': B, or color ID for type 3&lt;br /&gt;
* '''u8[8]''': Indicates how to select the color for each player&lt;br /&gt;
** '''0''' - Random Predefined&lt;br /&gt;
** '''1''' - Player's Choice&lt;br /&gt;
** '''2''' - Custom RGB Color (RGB value for the corresponding player defined above)&lt;br /&gt;
** '''3''' - Use color ID in the &amp;quot;B&amp;quot; color channel (&amp;quot;R&amp;quot; and &amp;quot;G&amp;quot; values appear to contain junk data); leaderboard color is still defined by COLR section and can be set independently&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SC:R Only color IDs:&amp;lt;br&amp;gt;&lt;br /&gt;
Extends the [[#&amp;quot;COLR&amp;quot; - Player Colors|COLR]] section list of colors, but cannot be used in the COLR section.&lt;br /&gt;
* '''12''' - Pale Green&lt;br /&gt;
* '''13''' - Blueish Grey&lt;br /&gt;
* '''14''' - Cyan&lt;br /&gt;
* '''15''' - Pink&lt;br /&gt;
* '''16''' - Olive&lt;br /&gt;
* '''17''' - Lime&lt;br /&gt;
* '''18''' - Navy&lt;br /&gt;
* '''19''' - Magenta&lt;br /&gt;
* '''20''' - Grey&lt;br /&gt;
* '''21''' - Black&lt;br /&gt;
* '''22+''' - Random (can pick colors that have been used)&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PUPx&amp;quot; - BW Upgrade Restrictions==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2318 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UPGR&amp;quot; - Upgrade Restrictions|&amp;quot;UPGR&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is identical to UPGR section except it uses the Brood War set of 61 upgrades instead of the original 46.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PTEx&amp;quot; - BW Tech Restrictions==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1672 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;PTEC&amp;quot; - Tech Restrictions|&amp;quot;PTEC&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is identical to PTEC section except it uses the Brood War set of 44 technologies instead of the original 24.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIx&amp;quot; - BW Unit Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4168 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UNIS&amp;quot; - Unit Settings|&amp;quot;UNIS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is indentical to UNIS section except it uses the Brood War set of 130 weapons instead of the original 100.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGx&amp;quot; - BW Upgrade Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 794 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UPGS&amp;quot; - Upgrade Settings|&amp;quot;UPGS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section the same as UPGS except section except it uses the Brood War set of 61 upgrades instead of the original 46, and there is an unused byte after the first set:&lt;br /&gt;
* '''u8[61]''': 1 byte per each upgrade, in order of upgrade id.&lt;br /&gt;
** '''00''' - Upgrade uses custom settings&lt;br /&gt;
** '''01''' - Upgrade uses default settings&lt;br /&gt;
* '''u8''': Unused.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, time factor for each upgrade, in order of upgrade id.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TECx&amp;quot; - BW Tech Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 396 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;TECS&amp;quot; - Tech Settings|&amp;quot;TECS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is indentical to TECS section except it uses the Brood War set of 44 technologies instead of the original 24.&lt;br /&gt;
&lt;br /&gt;
=Appendix=&lt;br /&gt;
A set of references and IDs that should help you easier in the trigger section and the technology/player ids, etc:&lt;br /&gt;
&lt;br /&gt;
==Trigger Conditions List==&lt;br /&gt;
* 0 = No Condition&lt;br /&gt;
* 1 = Countdown Timer(Comparison, QNumber)&lt;br /&gt;
* 2 = Command(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 3 = Bring(Player, Comparison, TUnit, Loc, QNumber)&lt;br /&gt;
* 4 = Accumulate(Player, Comparison, QNumber, ResType)&lt;br /&gt;
* 5 = Kill(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 6 = Command the Most(TUnit)&lt;br /&gt;
* 7 = Commands the Most At(TUnit, Loc)&lt;br /&gt;
* 8 = Most Kills(TUnit)&lt;br /&gt;
* 9 = Highest Score(Score)&lt;br /&gt;
* 10 = Most Resources(ResType)&lt;br /&gt;
* 11 = Switch(Switch)&lt;br /&gt;
* 12 = Elapsed Time(Comparison, QNumber)&lt;br /&gt;
* 13 = Data is a Mission Briefing. Conditions are N/A (Same as Never)&lt;br /&gt;
* 14 = Opponents(Player, Comparison, QNumber)&lt;br /&gt;
* 15 = Deaths(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 16 = Command the Least(TUnit)&lt;br /&gt;
* 17 = Command the Least At(TUnit, Loc)&lt;br /&gt;
* 18 = Least Kills(TUnit)&lt;br /&gt;
* 19 = Lowest Score(Score)&lt;br /&gt;
* 20 = Least Resources(ResType)&lt;br /&gt;
* 21 = Score(Player, Comparison, Score, QNumber)&lt;br /&gt;
* 22 = Always (Same as No Condition)&lt;br /&gt;
* 23 = Never&lt;br /&gt;
&lt;br /&gt;
==Trigger Actions List==&lt;br /&gt;
* 0 = No Action&lt;br /&gt;
* 1 = Victory&lt;br /&gt;
* 2 = Defeat&lt;br /&gt;
* 3 = Preserve Trigger&lt;br /&gt;
* 4 = Wait(Time)&lt;br /&gt;
* 5 = Pause Game (Single player only)&lt;br /&gt;
* 6 = Unpause Game (Single player only)&lt;br /&gt;
* 7 = Transmission(Text, Unit, Loc, Time, Modifier, Wave, WavTime)&lt;br /&gt;
* 8 = Play WAV(Wav, WavTime)&lt;br /&gt;
* 9 = Display Text Message(Text)&lt;br /&gt;
* 10 = Center View(Loc)&lt;br /&gt;
* 11 = Create Unit with Properties(Player, Unit, Number, Loc, UnitProp)&lt;br /&gt;
* 12 = Set Mission Objectives(Text)&lt;br /&gt;
* 13 = Set Switch(Switch, SwAction)&lt;br /&gt;
* 14 = Set Countdown Timer(Time, Modifier)&lt;br /&gt;
* 15 = Run AI Script(AIScript)&lt;br /&gt;
* 16 = Run AI Script At Location(AIScript)&lt;br /&gt;
* 17 = Leader Board (Control) (Text, TUnit)&lt;br /&gt;
* 18 = Leader Board (Control At Location) (Text, TUnit, Loc)&lt;br /&gt;
* 19 = Leader Board (Resources) (Text, ResType)&lt;br /&gt;
* 20 = Leader Board (Kills) (Text, TUnit)&lt;br /&gt;
* 21 = Leader Board (Points) (Text, Score)&lt;br /&gt;
* 22 = Kill Unit (Player, TUnit)&lt;br /&gt;
* 23 = Kill Unit At Location(Player, TUnit, Number, Loc)&lt;br /&gt;
* 24 = Remove Unit(Player, TUnit)&lt;br /&gt;
* 25 = Remove Unit At Location(Player, TUnit, Number, Loc)&lt;br /&gt;
* 26 = Set Resources(Player, Number, Modifier, ResType)&lt;br /&gt;
* 27 = Set Score(Player, Number, Modifier, Score)&lt;br /&gt;
* 28 = Minimap Ping(Loc)&lt;br /&gt;
* 29 = Talking Portrait(Unit, Time)&lt;br /&gt;
* 30 = Mute Unit Speech&lt;br /&gt;
* 31 = Unmute Unit Speech&lt;br /&gt;
* 32 = Leaderboard Computer Players(State)&lt;br /&gt;
* 33 = Leaderboard Goal (Control) (Text, TUnit, Number)&lt;br /&gt;
* 34 = Leaderboard Goal (Control At Location) (Text, TUnit, Number, Loc)&lt;br /&gt;
* 35 = Leaderboard Goal (Resources) (Text, TUnit, Number, ResType)&lt;br /&gt;
* 36 = Leaderboard Goal (Kills) (Text, TUnit, Number)&lt;br /&gt;
* 37 = Leaderboard Goal (Points) (Text, Number, Score)&lt;br /&gt;
* 38 = Move Location(Player, TUnit, SLoc, DLoc)&lt;br /&gt;
* 39 = Move Unit(Player, TUnit, Number, SLoc, DLoc)&lt;br /&gt;
* 40 = Leaderboard (Greed) (Number)&lt;br /&gt;
* 41 = Set Next Scenario(Text) (Single player only)&lt;br /&gt;
* 42 = Set Doodad State(Player, TUnit, Loc, State)&lt;br /&gt;
* 43 = Set Invincibility(Player, TUnit, Loc, State)&lt;br /&gt;
* 44 = Create Unit(Player, Unit, Number, Loc)&lt;br /&gt;
* 45 = Set Deaths(Player, TUnit, Number, Modifier)&lt;br /&gt;
* 46 = Order(Player, TUnit, SLoc, DLoc, Order)&lt;br /&gt;
* 47 = Comment(Text)&lt;br /&gt;
* 48 = Give Units to Player(SPlayer, DPlayer, TUnit, Number, Loc)&lt;br /&gt;
* 49 = Modify Unit Hit Points(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 50 = Modify Unit Energy(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 51 = Modify Unit Shield Points(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 52 = Modify Unit Resource Amount(Player, Number, ModAmount, Loc)&lt;br /&gt;
* 53 = Modify Unit Hanger Count(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 54 = Pause Timer&lt;br /&gt;
* 55 = Unpause Timer&lt;br /&gt;
* 56 = Draw&lt;br /&gt;
* 57 = Set Alliance Status(Player, AllyStatus)&lt;br /&gt;
* 58 = Disable Debug Mode (Single player only)&lt;br /&gt;
* 59 = Enable Debug Mode (Single player only)&lt;br /&gt;
&lt;br /&gt;
==Mission Briefing Actions List==&lt;br /&gt;
* 0 - No Action&lt;br /&gt;
* 1 - Wait(Time)&lt;br /&gt;
* 2 - Play WAV(Wave, WavTime)&lt;br /&gt;
* 3 - Text Message(Text, Time)&lt;br /&gt;
* 4 - Mission Objectives(Text)&lt;br /&gt;
* 5 - Show Portrait(Unit, Slot)&lt;br /&gt;
* 6 - Hide Portrait(Slot)&lt;br /&gt;
* 7 - Display Speaking Portrait(Slot, Time)&lt;br /&gt;
* 8 - Transmission(Text, Slot, Time, Modifier, Wave, WavTime)&lt;br /&gt;
* 9 - Skip Tutorial Enabled&lt;br /&gt;
&lt;br /&gt;
==Switch States==&lt;br /&gt;
* 2 = Switch is set&lt;br /&gt;
* 3 = Switch is cleared&lt;br /&gt;
&lt;br /&gt;
==Numeric Comparisons==&lt;br /&gt;
* 0 = At least&lt;br /&gt;
* 1 = At most&lt;br /&gt;
* 10 = Exactly&lt;br /&gt;
&lt;br /&gt;
==Score Types==&lt;br /&gt;
* 0 = Total&lt;br /&gt;
* 1 = Units&lt;br /&gt;
* 2 = Buildings&lt;br /&gt;
* 3 = Units and Buildings&lt;br /&gt;
* 4 = Kills&lt;br /&gt;
* 5 = Razings&lt;br /&gt;
* 6 = Kills and Razings&lt;br /&gt;
* 7 = Custom&lt;br /&gt;
&lt;br /&gt;
==Resource Types==&lt;br /&gt;
* 0 = Ore&lt;br /&gt;
* 1 = Gas&lt;br /&gt;
* 2 = Ore and Gas&lt;br /&gt;
&lt;br /&gt;
==Alliance Statuses==&lt;br /&gt;
* 0 = Enemy&lt;br /&gt;
* 1 = Ally&lt;br /&gt;
* 2 = Allied Victory&lt;br /&gt;
&lt;br /&gt;
==Unit Orders==&lt;br /&gt;
* 0 = Move&lt;br /&gt;
* 1 = Patrol&lt;br /&gt;
* 2 = Attack&lt;br /&gt;
&lt;br /&gt;
==Action States==&lt;br /&gt;
* 4 = Enabled/Set switch&lt;br /&gt;
* 5  = Disabled/Clear switch&lt;br /&gt;
* 6 = Toggle/Toggle switch&lt;br /&gt;
* 11 = Randomize switch&lt;br /&gt;
&lt;br /&gt;
==Number Modifiers==&lt;br /&gt;
* 7 = Set to&lt;br /&gt;
* 8 = Add&lt;br /&gt;
* 9 = Subtract&lt;br /&gt;
&lt;br /&gt;
==Trigger Unit Types==&lt;br /&gt;
* All normal units (0-227)&lt;br /&gt;
* 228 = None&lt;br /&gt;
* 229 = Any unit&lt;br /&gt;
* 230 = Men&lt;br /&gt;
* 231 = Buildings&lt;br /&gt;
* 232 = Factories&lt;br /&gt;
&lt;br /&gt;
==List of Players/Group IDs==&lt;br /&gt;
* 0 = Player 1&lt;br /&gt;
* 1 = Player 2&lt;br /&gt;
* 2 = Player 3&lt;br /&gt;
* 3 = Player 4&lt;br /&gt;
* 4 = Player 5&lt;br /&gt;
* 5 = Player 6&lt;br /&gt;
* 6 = Player 7&lt;br /&gt;
* 7 = Player 8&lt;br /&gt;
* 8 = Player 9&lt;br /&gt;
* 9 = Player 10&lt;br /&gt;
* 10 = Player 11&lt;br /&gt;
* 11 = Player 12&lt;br /&gt;
* 12 = None (Unused, One-entry Overflow in some cases)&lt;br /&gt;
* 13 = Current Player&lt;br /&gt;
* 14 = Foes&lt;br /&gt;
* 15 = Allies&lt;br /&gt;
* 16 = Neutral Players&lt;br /&gt;
* 17 = All Players&lt;br /&gt;
* 18 = Force 1&lt;br /&gt;
* 19 = Force 2&lt;br /&gt;
* 20 = Force 3&lt;br /&gt;
* 21 = Force 4&lt;br /&gt;
* 22 = Unused 1&lt;br /&gt;
* 23 = Unused 2&lt;br /&gt;
* 24 = Unused 3&lt;br /&gt;
* 25 = Unused 4&lt;br /&gt;
* 26 = Non Allied Victory Players&lt;br /&gt;
&lt;br /&gt;
==List of Technology IDs==&lt;br /&gt;
* 0 = Stim Packs&lt;br /&gt;
* 1 = Lockdown&lt;br /&gt;
* 2 = EMP Shockwave&lt;br /&gt;
* 3 = Spider Mines&lt;br /&gt;
* 4 = Scanner Sweep&lt;br /&gt;
* 5 = Siege Mode&lt;br /&gt;
* 6 = Defensive Matrix&lt;br /&gt;
* 7 = Irradiate&lt;br /&gt;
* 8 = Yamato Gun&lt;br /&gt;
* 9 = Cloaking Field&lt;br /&gt;
* 10 = Personnel Cloaking&lt;br /&gt;
* 11 = Burrowing&lt;br /&gt;
* 12 = Infestation&lt;br /&gt;
* 13 = Spawn Broodling&lt;br /&gt;
* 14 = Dark Swarm&lt;br /&gt;
* 15 = Plague&lt;br /&gt;
* 16 = Consume&lt;br /&gt;
* 17 = Ensnare&lt;br /&gt;
* 18 = Parasite&lt;br /&gt;
* 19 = Psionic Storm&lt;br /&gt;
* 20 = Hallucination&lt;br /&gt;
* 21 = Recall&lt;br /&gt;
* 22 = Stasis Field&lt;br /&gt;
* 23 = Archon Warp&lt;br /&gt;
* 24 = Restoration&lt;br /&gt;
* 25 = Disruption Web&lt;br /&gt;
* 26 = Unused 26&lt;br /&gt;
* 27 = Mind Control&lt;br /&gt;
* 28 = Dark Archon Meld&lt;br /&gt;
* 29 = Feedback&lt;br /&gt;
* 30 = Optical Flare&lt;br /&gt;
* 31 = Maelstorm&lt;br /&gt;
* 32 = Lurker Aspect&lt;br /&gt;
* 33 = Unused 33&lt;br /&gt;
* 34 = Healing&lt;br /&gt;
* 35 = Unused 35&lt;br /&gt;
* 36 = Unused 36&lt;br /&gt;
* 37 = Unused 37&lt;br /&gt;
* 38 = Unused 38&lt;br /&gt;
* 39 = Unused 39&lt;br /&gt;
* 40 = Unused 40&lt;br /&gt;
* 41 = Unused 41&lt;br /&gt;
* 42 = Unused 42&lt;br /&gt;
* 43 = Unused 43&lt;br /&gt;
&lt;br /&gt;
==List of Upgrade IDs==&lt;br /&gt;
* 0 = Terran Infantry Armor&lt;br /&gt;
* 1 = Terran Vehicle Plating&lt;br /&gt;
* 2 = Terran Ship Plating&lt;br /&gt;
* 3 = Zerg Carapace&lt;br /&gt;
* 4 = Zerg Flyer Caparace&lt;br /&gt;
* 5 = Protoss Armor&lt;br /&gt;
* 6 = Protoss Plating&lt;br /&gt;
* 7 = Terran Infantry Weapons&lt;br /&gt;
* 8 = Terran Vehicle Weapons&lt;br /&gt;
* 9 = Terran Ship Weapons&lt;br /&gt;
* 10 = Zerg Melee Attacks&lt;br /&gt;
* 11 = Zerg Missile Attacks&lt;br /&gt;
* 12 = Zerg Flyer Attacks&lt;br /&gt;
* 13 = Protoss Ground Weapons&lt;br /&gt;
* 14 = Protoss Air Weapons&lt;br /&gt;
* 15 = Protoss Plasma Shields&lt;br /&gt;
* 16 = U-238 Shells&lt;br /&gt;
* 17 = Ion Thrusters&lt;br /&gt;
* 18 = Burst Lasers (Unused)&lt;br /&gt;
* 19 = Titan Reactor (SV +50)&lt;br /&gt;
* 20 = Ocular Implants&lt;br /&gt;
* 21 = Moebius Reactor (Ghost +50)&lt;br /&gt;
* 22 = Apollo Reactor (Wraith +50)&lt;br /&gt;
* 23 = Colossus Reactor (BC +50)&lt;br /&gt;
* 24 = Ventral Sacs&lt;br /&gt;
* 25 = Antennae&lt;br /&gt;
* 26 = Pneumatized Carapace&lt;br /&gt;
* 27 = Metabolic Boost&lt;br /&gt;
* 28 = Adrenal Glands&lt;br /&gt;
* 29 = Muscular Augments&lt;br /&gt;
* 30 = Grooved Spines&lt;br /&gt;
* 31 = Gamete Meiosis (Queen +50)&lt;br /&gt;
* 32 = Metasynaptic Node (Defiler +50)&lt;br /&gt;
* 33 = Singularity Charge&lt;br /&gt;
* 34 = Leg Enhancements&lt;br /&gt;
* 35 = Scarab Damage &lt;br /&gt;
* 36 = Reaver Capacity &lt;br /&gt;
* 37 = Gravitic Drive&lt;br /&gt;
* 38 = Sensor Array&lt;br /&gt;
* 39 = Gravitic Boosters&lt;br /&gt;
* 40 = Khaydarin Amulet (HT +50)&lt;br /&gt;
* 41 = Apial Sensors&lt;br /&gt;
* 42 = Gravitic Thrusters&lt;br /&gt;
* 43 = Carrier Capacity&lt;br /&gt;
* 44 = Khaydarin Core (Arbiter +50)&lt;br /&gt;
* 45 = Unknown Upgrade45&lt;br /&gt;
* 46 = Unknown Upgrade46&lt;br /&gt;
* 47 = Argus Jewel (Corsair +50)&lt;br /&gt;
* 48 = Unknown Upgrade48&lt;br /&gt;
* 49 = Argus Talisman (DA +50)&lt;br /&gt;
* 50 = Unknown Upgrade50&lt;br /&gt;
* 51 = Caduceus Reactor (Medic +50)&lt;br /&gt;
* 52 = Chitinous Plating&lt;br /&gt;
* 53 = Anabolic Synthesis&lt;br /&gt;
* 54 = Charon Booster&lt;br /&gt;
* 55 = Unknown Upgrade55&lt;br /&gt;
* 56 = Unknown Upgrade56&lt;br /&gt;
* 57 = Unknown Upgrade57&lt;br /&gt;
* 58 = Unknown Upgrade58&lt;br /&gt;
* 59 = Unknown Upgrade59&lt;br /&gt;
* 60 = Unknown Upgrade60&lt;br /&gt;
&lt;br /&gt;
==List of Unit Weapon IDs==&lt;br /&gt;
* 0 = Gauss Rifle (Normal)&lt;br /&gt;
* 1 = Gauss Rifle (Jim Raynor-Marine)&lt;br /&gt;
* 2 = C-10 Canister Rifle (Normal)&lt;br /&gt;
* 3 = C-10 Canister Rifle (Sarah Kerrigan)&lt;br /&gt;
* 4 = Fragmentation Grenade (Normal)&lt;br /&gt;
* 5 = Fragmentation Grenade (Jim Raynor-Vulture)&lt;br /&gt;
* 6 = Spider Mines&lt;br /&gt;
* 7 = Twin Autocannons (Normal)&lt;br /&gt;
* 8 = Hellfire Missile Pack (Normal)&lt;br /&gt;
* 9 = Twin Autocannons (Alan Schezar)&lt;br /&gt;
* 10 = Hellfire Missile Pack (Alan Schezar)&lt;br /&gt;
* 11 = Arclite Cannon (Normal)&lt;br /&gt;
* 12 = Arclite Cannon (Edmund Duke)&lt;br /&gt;
* 13 = Fusion Cutter&lt;br /&gt;
* 14 = Fusion Cutter (Harvest)&lt;br /&gt;
* 15 = Gemini Missiles (Normal)&lt;br /&gt;
* 16 = Burst Lasers (Normal)&lt;br /&gt;
* 17 = Gemini Missiles (Tom Kazansky)&lt;br /&gt;
* 18 = Burst Lasers (Tom Kazansky)&lt;br /&gt;
* 19 = ATS Laser Battery (Normal)&lt;br /&gt;
* 20 = ATA Laser Battery (Normal)&lt;br /&gt;
* 21 = ATS Laser Battery (Norad II+Mengsk+DuGalle)&lt;br /&gt;
* 22 = ATA Laser Battery (Norad II+Mengsk+DuGalle)&lt;br /&gt;
* 23 = ATS Laser Battery (Hyperion)&lt;br /&gt;
* 24 = ATA Laser Battery (Hyperion)&lt;br /&gt;
* 25 = Flame Thrower (Normal)&lt;br /&gt;
* 26 = Flame Thrower (Gui Montag)&lt;br /&gt;
* 27 = Arclite Shock Cannon (Normal)&lt;br /&gt;
* 28 = Arclite Shock Cannon (Edmund Duke)&lt;br /&gt;
* 29 = Longbolt Missile&lt;br /&gt;
* 30 = Yamato Gun&lt;br /&gt;
* 31 = Nuclear Missile&lt;br /&gt;
* 32 = Lockdown&lt;br /&gt;
* 33 = EMP Shockwave&lt;br /&gt;
* 34 = Irradiate&lt;br /&gt;
* 35 = Claws (Normal)&lt;br /&gt;
* 36 = Claws (Devouring One)&lt;br /&gt;
* 37 = Claws (Infested Kerrigan)&lt;br /&gt;
* 38 = Needle Spines (Normal)&lt;br /&gt;
* 39 = Needle Spines (Hunter Killer)&lt;br /&gt;
* 40 = Kaiser Blades (Normal)&lt;br /&gt;
* 41 = Kaiser Blades (Torrasque)&lt;br /&gt;
* 42 = Toxic Spores (Broodling)&lt;br /&gt;
* 43 = Spines&lt;br /&gt;
* 44 = Spines (Harvest)&lt;br /&gt;
* 45 = Acid Spray (Unused)&lt;br /&gt;
* 46 = Acid Spore (Normal)&lt;br /&gt;
* 47 = Acid Spore (Kukulza-Guardian)&lt;br /&gt;
* 48 = Glave Wurm (Normal)&lt;br /&gt;
* 49 = Glave Wurm (Kukulza-Mutalisk)&lt;br /&gt;
* 50 = Venom (Unused-Defiler)&lt;br /&gt;
* 51 = Venom (Unused-Defiler Hero)&lt;br /&gt;
* 52 = Seeker Spores&lt;br /&gt;
* 53 = Subterranean Tentacle&lt;br /&gt;
* 54 = Suicide (Infested Terran)&lt;br /&gt;
* 55 = Suicide (Scourge)&lt;br /&gt;
* 56 = Parasite&lt;br /&gt;
* 57 = Spawn Broodlings&lt;br /&gt;
* 58 = Ensnare&lt;br /&gt;
* 59 = Dark Swarm&lt;br /&gt;
* 60 = Plague&lt;br /&gt;
* 61 = Consume&lt;br /&gt;
* 62 = Particle Beam&lt;br /&gt;
* 63 = Particle Beam (Harvest)&lt;br /&gt;
* 64 = Psi Blades (Normal)&lt;br /&gt;
* 65 = Psi Blades (Fenix-Zealot)&lt;br /&gt;
* 66 = Phase Disruptor (Normal)&lt;br /&gt;
* 67 = Phase Disruptor (Fenix-Dragoon)&lt;br /&gt;
* 68 = Psi Assault (Normal-Unused)&lt;br /&gt;
* 69 = Psi Assault (Tassadar+Aldaris)&lt;br /&gt;
* 70 = Psionic Shockwave (Normal)&lt;br /&gt;
* 71 = Psionic Shockwave (Tassadar/Zeratul Archon)&lt;br /&gt;
* 72 = Unknown72&lt;br /&gt;
* 73 = Dual Photon Blasters (Normal)&lt;br /&gt;
* 74 = Anti-matter Missiles (Normal)&lt;br /&gt;
* 75 = Dual Photon Blasters (Mojo)&lt;br /&gt;
* 76 = Anti-matter Missiles (Mojo)&lt;br /&gt;
* 77 = Phase Disruptor Cannon (Normal)&lt;br /&gt;
* 78 = Phase Disruptor Cannon (Danimoth)&lt;br /&gt;
* 79 = Pulse Cannon&lt;br /&gt;
* 80 = STS Photon Cannon&lt;br /&gt;
* 81 = STA Photon Cannon&lt;br /&gt;
* 82 = Scarab&lt;br /&gt;
* 83 = Stasis Field&lt;br /&gt;
* 84 = Psi Storm&lt;br /&gt;
* 85 = Warp Blades (Zeratul)&lt;br /&gt;
* 86 = Warp Blades (Dark Templar Hero)&lt;br /&gt;
* 87 = Missiles (Unused)&lt;br /&gt;
* 88 = Laser Battery1 (Unused)&lt;br /&gt;
* 89 = Tormentor Missiles (Unused)&lt;br /&gt;
* 90 = Bombs (Unused)&lt;br /&gt;
* 91 = Raider Gun (Unused)&lt;br /&gt;
* 92 = Laser Battery2 (Unused)&lt;br /&gt;
* 93 = Laser Battery3 (Unused)&lt;br /&gt;
* 94 = Dual Photon Blasters (Unused)&lt;br /&gt;
* 95 = Flechette Grenade (Unused)&lt;br /&gt;
* 96 = Twin Autocannons (Floor Trap)&lt;br /&gt;
* 97 = Hellfire Missile Pack (Wall Trap)&lt;br /&gt;
* 98 = Flame Thrower (Wall Trap)&lt;br /&gt;
* 99 = Hellfire Missile Pack (Floor Trap)&lt;br /&gt;
* 100 = Neutron Flare&lt;br /&gt;
* 101 = Disruption Web&lt;br /&gt;
* 102 = Restoration&lt;br /&gt;
* 103 = Halo Rockets&lt;br /&gt;
* 104 = Corrosive Acid&lt;br /&gt;
* 105 = Mind Control&lt;br /&gt;
* 106 = Feedback&lt;br /&gt;
* 107 = Optical Flare&lt;br /&gt;
* 108 = Maelstrom&lt;br /&gt;
* 109 = Subterranean Spines&lt;br /&gt;
* 110 = Gauss Rifle0 (Unused)&lt;br /&gt;
* 111 = Warp Blades (Normal)&lt;br /&gt;
* 112 = C-10 Canister Rifle (Samir Duran)&lt;br /&gt;
* 113 = C-10 Canister Rifle (Infested Duran)&lt;br /&gt;
* 114 = Dual Photon Blasters (Artanis)&lt;br /&gt;
* 115 = Anti-matter Missiles (Artanis)&lt;br /&gt;
* 116 = C-10 Canister Rifle (Alexei Stukov)&lt;br /&gt;
* 117 = Gauss Rifle1 (Unused)&lt;br /&gt;
* 118 = Gauss Rifle2 (Unused)&lt;br /&gt;
* 119 = Gauss Rifle3 (Unused)&lt;br /&gt;
* 120 = Gauss Rifle4 (Unused)&lt;br /&gt;
* 121 = Gauss Rifle5 (Unused)&lt;br /&gt;
* 122 = Gauss Rifle6 (Unused)&lt;br /&gt;
* 123 = Gauss Rifle7 (Unused)&lt;br /&gt;
* 124 = Gauss Rifle8 (Unused)&lt;br /&gt;
* 125 = Gauss Rifle9 (Unused)&lt;br /&gt;
* 126 = Gauss Rifle10 (Unused)&lt;br /&gt;
* 127 = Gauss Rifle11 (Unused)&lt;br /&gt;
* 128 = Gauss Rifle12 (Unused)&lt;br /&gt;
* 129 = Gauss Rifle13 (Unused)&lt;br /&gt;
* 130 = None&lt;br /&gt;
&lt;br /&gt;
==Complete Modifier List==&lt;br /&gt;
* 0 = Condition: &amp;gt;= (greater than or equal to)&lt;br /&gt;
* 1 = Condition: &amp;lt;= (less than or equal to)&lt;br /&gt;
* 2 = Condition: == TRUE (Is True)&lt;br /&gt;
* 3 = Condition: == FALSE (Is False)&lt;br /&gt;
* 4 = Action: = TRUE (Set to True)&lt;br /&gt;
* 5 = Action: = FALSE (Set to False)&lt;br /&gt;
* 6 = Action: NOT (toggle)&lt;br /&gt;
* 7 = Action: = (Set to)&lt;br /&gt;
* 8 = Action: += (Add)&lt;br /&gt;
* 9 = Action: -= (Subtract)&lt;br /&gt;
* 10 = Condition: == (Exactly)&lt;br /&gt;
* 11 = Action: Randomize&lt;br /&gt;
&lt;br /&gt;
[[Category:StarCraft]]&lt;br /&gt;
[[Category:Reference]]&lt;/div&gt;</summary>
		<author><name>FaRTy1billion</name></author>	</entry>

	<entry>
		<id>https://staredit.net/wiki/index.php?title=Scenario.chk&amp;diff=683</id>
		<title>Scenario.chk</title>
		<link rel="alternate" type="text/html" href="https://staredit.net/wiki/index.php?title=Scenario.chk&amp;diff=683"/>
				<updated>2023-04-23T22:51:57Z</updated>
		
		<summary type="html">&lt;p&gt;FaRTy1billion: /* &amp;quot;UNIT&amp;quot; - Placed Units */ addon and nydus link values were reversed&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The CHK file is a very dense file found inside the SCM or SCX file (as &amp;quot;staredit\scenario.chk&amp;quot;), which is just a renamed MPQ archive.&lt;br /&gt;
&lt;br /&gt;
In this article, some shorthand will be used for datatypes:&lt;br /&gt;
* '''u8''' for an unsigned byte&lt;br /&gt;
* '''u16''' for an unsigned short (2-byte integer)&lt;br /&gt;
* '''u32''' for an unsigned int (4-byte integer)&lt;br /&gt;
* '''uT[''a'']''' for an array of datatype '''T''' (8, 16, 32) with '''''a''''' number of elements&lt;br /&gt;
* '''uT[''a''][''b'']''' for a two-dimensional array of datatype '''T''', where each element of '''T[''a'']''' will be an array of size '''''b'''''&lt;br /&gt;
&lt;br /&gt;
=Sections=&lt;br /&gt;
The CHK is split into several named chunks (hence the file extension, an abbreviation of ''CHunK'').&lt;br /&gt;
&lt;br /&gt;
Each section begins with an 8-byte header:&lt;br /&gt;
* '''u32''' Name - A 4-byte string uniquely identifying that chunk's purpose.&lt;br /&gt;
* '''u32''' Size - The size, in bytes, of the chunk (not including this header)&lt;br /&gt;
Followed by as many bytes as 'Size', in a format described below.&lt;br /&gt;
&lt;br /&gt;
Some things to keep in mind about the CHK section:&lt;br /&gt;
* Invalid sections can exist and will be ignored. While Size is unsigned, it can safely be a negative value to read a chunk earlier in the file. This allows for &amp;quot;section stacking&amp;quot;, allowing smaller sections to be placed inside of larger ones or duplicate triggers or units to take less space in the file.&lt;br /&gt;
* All sections will marked &amp;quot;Not required.&amp;quot; are never read by StarCraft and can safely be omitted. However they may or may not be read by StarEdit, and may cause the map to be unreadable in an editor.&lt;br /&gt;
* Note &amp;quot;Hybrid&amp;quot;, or &amp;quot;Enhanced&amp;quot;, maps were introduced in 1.04. They are supported both by Original StarCraft and Brood War and usually contain sections for both types (e.g., UPGS and UPGx, TECS and TECx), but both sections aren't necessarily read.&lt;br /&gt;
* Duplicate sections will overwrite previously defined section data, except where noted. Note this only applies to those section that pass the specified &amp;quot;validation&amp;quot; parameters, as any section that does not successfully validate will be ignored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TYPE&amp;quot; - Map Type==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the type of scenario.&lt;br /&gt;
* '''u32''': Specifies the type of scenario:&lt;br /&gt;
** '''0x53574152''' or '''RAWS''' - 1.04 StarCraft and above (&amp;quot;hybrid&amp;quot;)&lt;br /&gt;
** '''0x42574152''' or '''RAWB''' - Brood War&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;VER &amp;quot; - Format Version==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section identifies the file format version.&lt;br /&gt;
* '''u16''': File format version:&lt;br /&gt;
** '''59''' - Starcraft 1.00 (original retail release)&lt;br /&gt;
** '''63''' - Starcraft 1.04 ''(hybrid)''&lt;br /&gt;
** '''64''' - Starcraft Remastered (1.21) ''(hybrid)''&lt;br /&gt;
** '''205''' - Brood War 1.00 ''(1.04)''&lt;br /&gt;
** '''206''' - Starcraft Remastered (1.21) ''(broodwar)''&lt;br /&gt;
This is the only version code section to actually be read by StarCraft (of TYPE, VER , IVER, and IVE2). Any other value is invalid in retail StarCraft and is usually a beta version.&lt;br /&gt;
&lt;br /&gt;
Other unsupported versions include:&lt;br /&gt;
* '''17''' - ''Warcraft II retail (.PUD)''&lt;br /&gt;
* '''19''' - ''Warcraft II Expansion (.PUD)''&lt;br /&gt;
* '''47''' - ''Starcraft Beta''&lt;br /&gt;
* '''57''' - ''Starcraft Prerelease''&lt;br /&gt;
* '''61''' - Brood War internal (map version 61)&lt;br /&gt;
* '''75''' - Brood War internal (map version 75) ''(Broodwar Battle.net Beta)''&lt;br /&gt;
* '''201''' - Brood War internal (map version 201)&lt;br /&gt;
* '''203''' - Brood War internal (map version 203)&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IVER&amp;quot; - Map Version==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section &amp;quot;additionally identifies&amp;quot; the map version.&lt;br /&gt;
* '''u16''': &amp;quot;Additional file format version:&amp;quot;&lt;br /&gt;
** '''9''' - beta/obsolete versions&lt;br /&gt;
** '''10''' - current versions&lt;br /&gt;
When saving as expansion this section gets removed entirely. Contrary to popular belief, it doesn't get &amp;quot;replaced&amp;quot; by IVE2 in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IVE2&amp;quot; - Map Version==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section &amp;quot;additionally identifies&amp;quot; the map version.&lt;br /&gt;
* '''u16''': &amp;quot;Additional file format version:&amp;quot;&lt;br /&gt;
** '''11''' - 1.04 StarCraft and above (&amp;quot;hybrid&amp;quot;) or Brood War.&lt;br /&gt;
This section does not &amp;quot;replace&amp;quot; IVER in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;VCOD&amp;quot; - Verification Code==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be equal to size of the VCOD data in the EXE resource. Must result in valid checksum.''&lt;br /&gt;
&lt;br /&gt;
This section has a verification code to make sure this is actually a CHK file.&lt;br /&gt;
&lt;br /&gt;
* '''u32[256]''': Seed values.&lt;br /&gt;
* '''u8[16]''': Operation codes to produce the resulting hash:&lt;br /&gt;
** '''00''' - XOR's the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''01''' - Adds to the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''02''' - Subtracts from the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''03''' - XOR's the current hash with the VCOD table at index OWNR, SIDE, FORC, and 0&lt;br /&gt;
** '''04''' - same as 0x03&lt;br /&gt;
** '''05''' - same as 0x03&lt;br /&gt;
** '''06''' - Complex function consisting of ORs and shifts&lt;br /&gt;
** '''07''' - Inverted version of 0x06, switching direction of all shifts&lt;br /&gt;
** '''08+''' - Do nothing&lt;br /&gt;
Opcodes and seeds do not have to match those in EXE resource, as long as the same value is produced.&amp;lt;br&amp;gt;&lt;br /&gt;
The only indexes in the seed table that are referenced are those that correspond individual values of [[#&amp;quot;OWNR&amp;quot; - StarCraft Player Types|OWNR]], [[#&amp;quot;SIDE&amp;quot; - Player Races|SIDE]], [[#&amp;quot;FORC&amp;quot; - Force Settings|FORC]] player assignments, and index 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IOWN&amp;quot; - StarEdit Player Types==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the owner of each player.&lt;br /&gt;
* '''u8[12]''': One byte for each player, specifies the owner of the player:&lt;br /&gt;
** '''00''' - Inactive&lt;br /&gt;
** ''01'' - Computer (game)&lt;br /&gt;
** ''02'' - Occupied by Human Player&lt;br /&gt;
** '''03''' - Rescue Passive&lt;br /&gt;
** '''04''' - Unused&lt;br /&gt;
** '''05''' - Computer&lt;br /&gt;
** '''06''' - Human (Open Slot)&lt;br /&gt;
** '''07''' - Neutral&lt;br /&gt;
** ''08'' - Closed slot&lt;br /&gt;
This section is separate from OWNR as a staredit value. Staredit does not display &amp;quot;inactive&amp;quot; as a valid option. Italicized settings denote invalid map options, which may involve a buffer overflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;OWNR&amp;quot; - StarCraft Player Types==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 12 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section designates the controller of a particular player. It is exactly the same as the &amp;quot;IOWN&amp;quot; section, except there is an additional value, 0x00 for Inactive.&lt;br /&gt;
* '''u8[12]''': One byte for each player, specifies the owner of the player:&lt;br /&gt;
** '''00''' - Inactive&lt;br /&gt;
** ''01'' - Computer (game)&lt;br /&gt;
** ''02'' - Occupied by Human Player&lt;br /&gt;
** '''03''' - Rescue Passive&lt;br /&gt;
** '''04''' - Unused&lt;br /&gt;
** '''05''' - Computer&lt;br /&gt;
** '''06''' - Human (Open Slot)&lt;br /&gt;
** '''07''' - Neutral&lt;br /&gt;
** ''08'' - Closed slot&lt;br /&gt;
Italicized settings denote invalid map options, which may involve a buffer overflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;ERA &amp;quot; - Tileset==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section indicates the tileset of the scenario.&lt;br /&gt;
* '''u16''': Designates tileset:&lt;br /&gt;
** '''00''' - Badlands&lt;br /&gt;
** '''01''' - Space Platform&lt;br /&gt;
** '''02''' - Installation&lt;br /&gt;
** '''03''' - Ashworld&lt;br /&gt;
** '''04''' - Jungle&lt;br /&gt;
** '''05''' - Desert&lt;br /&gt;
** '''06''' - Arctic&lt;br /&gt;
** '''07''' - Twilight&lt;br /&gt;
StarCraft masks the tileset indicator's bit value, so bits after the third place (anything after the value &amp;quot;7&amp;quot;) are removed. Thus, 9 (1001 in binary) is interpreted as 1 (0001), 10 (1010) as 2 (0010), etc.&amp;lt;br&amp;gt;&lt;br /&gt;
Desert, Arctic, and Twilight are Brood War-only tilesets.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;DIM &amp;quot; - Map Dimensions==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains the dimensions of the map.&lt;br /&gt;
* '''u16''': Width of the map&lt;br /&gt;
* '''u16''': Height of the map&lt;br /&gt;
The Width/Height of the map is measured in the number of square 32x32p tiles.&amp;lt;br&amp;gt;&lt;br /&gt;
Standard Dimensions are 64, 96, 128, 192, and 256.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SIDE&amp;quot; - Player Races==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 12 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains the species/race of each player.&lt;br /&gt;
* '''u8[12]''': 1 byte per player the species of that player:&lt;br /&gt;
** '''00''' - Zerg&lt;br /&gt;
** '''01''' - Terran&lt;br /&gt;
** '''02''' - Protoss&lt;br /&gt;
** ''03'' - Invalid (Independent), shown as &amp;quot;Unknown&amp;quot; in SC:R lobby&lt;br /&gt;
** ''04'' - Invalid (Neutral), shown as &amp;quot;Unknown&amp;quot;&lt;br /&gt;
** '''05''' - User Select&lt;br /&gt;
** '''06''' - Random (Forced; Acts as a selected race)&lt;br /&gt;
** ''07'' - Inactive, shown as locked &amp;quot;Select Race&amp;quot; option in SC:R lobby&lt;br /&gt;
Italicized settings denote invalid map options. Note Players 9-11 are defaultly Inactive and Player 12 is defaultly Neutral.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MTXM&amp;quot; - StarCraft Terrain==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be less than or equal to 131072 (0x20000) bytes (256 * 256 * 2).''&lt;br /&gt;
&lt;br /&gt;
Terrain section that contains a map of the level's appearance. StarEdit disregards this section and instead uses [[#&amp;quot;TILE&amp;quot; - StarEdit Terrain|TILE]]; it is only used in Starcraft.&lt;br /&gt;
* '''u16[map width * height]''': one integer for each tile.&lt;br /&gt;
Notes about MTXM:&lt;br /&gt;
* The Width/Height of the map is measured in the number of square 32x32p tiles.&lt;br /&gt;
* Tiles in this section are listed from left to right, top to bottom.&lt;br /&gt;
* The values for each integer are their respective &amp;quot;MegaTile&amp;quot; values in the scenario's tileset. If the size of this section is greater than width*height*2, the data following is ignored. If the size of this section is less, the resulting tiles that have not been defined will be null tiles.&lt;br /&gt;
* This section includes doodads as terrain; TILE, which is otherwise identical, doesn't. Out of the terrain sections (TILE, ISOM, and MTXM), SC only reads MTXM for the sake of not having to generate this data on-the-fly: it contains the exact representation of the level's appearance, including doodads. TILE, on the other hand, is directly tied via a tile lookup function to ISOM, and exists for the sake of not having to generate tiles from ISOM on-the-fly in StarEdit.&lt;br /&gt;
* If MTXM section is smaller than (map width*height), then the remaining tiles will be filled with null tiles or tiles specified by previous MTXM sections.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PUNI&amp;quot; - Player Unit Restrictions==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 5700 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains player unit restrictions: it indicates whether the player can or cannot build a particular unit.&lt;br /&gt;
* '''u8[228][12]''': 1 byte for each unit in order of its unit id, then each player, for player availability:&lt;br /&gt;
** '''00''' - That unit is not available for production if the player has 'override defaults' on&lt;br /&gt;
** '''01''' - That unit is available for production if the player has 'override defaults' on&lt;br /&gt;
* '''u8[228]''': 1 byte for each unit in order of it's unit id, for global availability defaults (for all players):&lt;br /&gt;
** '''00''' - That unit is not available for production&lt;br /&gt;
** '''01''' - That unit is available for production&lt;br /&gt;
* '''u8[228][12]''': 1 byte for each unit in order of its unit id, then each player, indicating whether a player uses the global availability defaults.&lt;br /&gt;
** '''00''' - Player overrides defaults for this unit&lt;br /&gt;
** '''01''' - Player uses defaults for this unit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGR&amp;quot; - Upgrade Restrictions==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1748 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;PUPx&amp;quot; - BW Upgrade Restrictions|&amp;quot;PUPx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains player upgrade restrictions: it indicates the starting/maximum levels at/to which a player can perform a particular upgrade.&lt;br /&gt;
* '''u8[46][12]''': 1 byte for the maximum level a player can upgrade to, in order of its upgrade id, then each player&lt;br /&gt;
* '''u8[46][12]''': 1 byte for the level of an upgrade a player starts off with, in order of its upgrade id, then each player&lt;br /&gt;
* '''u8[46]''': 1 byte for the global default maximum level of each upgrade, in order of its upgrade id.&lt;br /&gt;
* '''u8[46]''': 1 byte for the global default starting level of each upgrade, in order of its upgrade id.&lt;br /&gt;
* '''u8[46][12]''': 1 byte for each upgrade in order of its upgrade id, then each player, indicating whether a player uses the global upgrade defaults:&lt;br /&gt;
** '''00''' - Player does not use global upgrade defaults for this upgrade&lt;br /&gt;
** '''01''' - Player uses upgrade defaults for this upgrade&lt;br /&gt;
See [[#List of Upgrade IDs]].&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PTEC&amp;quot; - Tech Restrictions==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 912 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;PTEx&amp;quot; - BW Tech Restrictions|&amp;quot;PTEx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains player technology availability restrictions: it indicates whether a player starts off with a particular technology or can research a particular technology.&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology id, then each player, for player availability:&lt;br /&gt;
** '''00''' - Technology is not available for a player&lt;br /&gt;
** '''01''' - Technology is available for a player&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology id, then each player, for &amp;quot;already researched&amp;quot; status:&lt;br /&gt;
** '''00''' - Technology is not already researched&lt;br /&gt;
** '''01''' - Technology is already researched&lt;br /&gt;
* '''u8[24]''': 1 byte for each technology for global availability defaults:&lt;br /&gt;
** '''00''' - Technology is not available by default&lt;br /&gt;
** '''01''' - Technology is available by default&lt;br /&gt;
* '''u8[24]''': 1 byte for each technology for global &amp;quot;already researched&amp;quot; defaults:&lt;br /&gt;
** '''00''' - Technology is not already researched by default&lt;br /&gt;
** '''01''' - Technology is already researched by default&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology in order of its technology id, then each player, indicating whether a player uses the global defaults:&lt;br /&gt;
** '''00''' - Technology overrides defaults for player&lt;br /&gt;
** '''01''' - Technology uses default settings for player&lt;br /&gt;
See [[#List of Technology IDs]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIT&amp;quot; - Placed Units==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 36 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the pre-placed units on the map and their properties. Each unit on the map gets the following structure:&lt;br /&gt;
* '''u32''': The unit's class instance (sort of a &amp;quot;serial number&amp;quot;)&lt;br /&gt;
* U16''': X coordinate of unit&lt;br /&gt;
* U16''': Y coordinate of unit&lt;br /&gt;
* '''u16''': Unit ID&lt;br /&gt;
* '''u16''': Type of relation to another building (i.e. add-on, nydus link)&lt;br /&gt;
** '''Bit 9''' - Addon Link&lt;br /&gt;
** '''Bit 10''' - Nydus Link&lt;br /&gt;
* '''u16''': Flags of special properties which can be applied to the unit and are valid:&lt;br /&gt;
** '''Bit 0''' - Cloak is valid&lt;br /&gt;
** '''Bit 1''' - Burrow is valid&lt;br /&gt;
** '''Bit 2''' - In transit is valid&lt;br /&gt;
** '''Bit 3''' - Hallucinated is valid&lt;br /&gt;
** '''Bit 4''' - Invincible is valid&lt;br /&gt;
** '''Bit 5-15''' - Unused&lt;br /&gt;
* '''u16''': Out of the elements of the unit data, the properties which can be changed by the map maker:&lt;br /&gt;
** '''Bit 0''' - Owner player is valid (the unit is not a critter, start location, etc.; not a neutral unit)&lt;br /&gt;
** '''Bit 1''' - HP is valid&lt;br /&gt;
** '''Bit 2''' - Shields is valid&lt;br /&gt;
** '''Bit 3''' - Energy is valid (unit is a wraith, etc.)&lt;br /&gt;
** '''Bit 4''' - Resource amount is valid (unit is a mineral patch, vespene geyser, etc.)&lt;br /&gt;
** '''Bit 5''' - Amount in hangar is valid (unit is a reaver, carrier, etc.)&lt;br /&gt;
** '''Bit 6-15''' - Unused&lt;br /&gt;
* '''u8''': Player number of owner (0-based)&lt;br /&gt;
* '''u8''': Hit points % (1-100)&lt;br /&gt;
* '''u8''': Shield points % (1-100)&lt;br /&gt;
* '''u8''': Energy points % (1-100)&lt;br /&gt;
* '''u32''': Resource amount&lt;br /&gt;
* '''u16''': Number of units in hangar&lt;br /&gt;
* '''u16''': Unit state flags&lt;br /&gt;
** '''Bit 0''' - Unit is cloaked&lt;br /&gt;
** '''Bit 1''' - Unit is burrowed&lt;br /&gt;
** '''Bit 2''' - Building is in transit&lt;br /&gt;
** '''Bit 3''' - Unit is hallucinated&lt;br /&gt;
** '''Bit 4''' - Unit is invincible&lt;br /&gt;
** '''Bit 5-15''' - Unused&lt;br /&gt;
* '''u32''': Unused&lt;br /&gt;
* '''u32''': Class instance of the unit to which this unit is related to (i.e. via an add-on, nydus link, etc.). It is &amp;quot;0&amp;quot; if the unit is not linked to any other unit.&lt;br /&gt;
Notes about UNIT:&lt;br /&gt;
* The X/Y coordinates are the center of the sprite of the unit (in pixels).&lt;br /&gt;
* Please edit if you could confirm the bit values to be correct/if you know more bit values.&lt;br /&gt;
* Default values will apply if bit values are unchecked. Defaults: 100% HP, 100% SP, 100% EP, 0 resources, 0 hangar count.&lt;br /&gt;
* This section can be split. Additional UNIT sections will add more units.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;ISOM&amp;quot; - Isometric Terrain==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section is required to place isometric terrain on the map. It provides data about the nature of the isometric &amp;quot;diamonds&amp;quot; (the editing mode of StarEdit).&lt;br /&gt;
* '''u16[ (width / 2 + 1) * (height + 1) * 4 ]''': 4 integers for each 2x1 map rectangle tile (plus one extra tile to the right and bottom of the map), as per the RECT structure. Each rectangle border (left, top, right, bottom) is assigned an &amp;quot;ISOM value.&amp;quot; These form the &amp;quot;diamond&amp;quot; pattern of the map, and each rectangle thus gets two ISOM values associated with it. The index of the rectangle's right tile is that of its left tile + 16.&lt;br /&gt;
** '''Bit 0''' (0x0001) - Flag used by the editor (&amp;quot;Edited&amp;quot;?)&lt;br /&gt;
** '''Bit 1-3''' - Determines the position on the ISOM grid for the given tile edge. Each diamond covers four 2x1 map tiles, so each tile therefore has two edges per diamond.&lt;br /&gt;
*** '''0''' (0x0000) - Top Left tile horizontal edge. Also the default value upon map creation for all tiles and directions.&lt;br /&gt;
*** '''1''' (0x0002) - Top Left tile vertical edge&lt;br /&gt;
*** '''2''' (0x0004) - Top Right tile horizontal edge&lt;br /&gt;
*** '''3''' (0x0006) - Top Right tile vertical edge&lt;br /&gt;
*** '''4''' (0x0008) - Bottom Right tile horizontal edge&lt;br /&gt;
*** '''5''' (0x000A) - Bottom Right tile vertical edge&lt;br /&gt;
*** '''6''' (0x000C) - Bottom Left tile vertical edge&lt;br /&gt;
*** '''7''' (0x000E) - Bottom Left tile horizontal edge&lt;br /&gt;
** '''Bit 4-14''' - ISOM terrain type ID, used to determine what type of terrain is on that edge. This value matches the corresponding edge on the adjacent tile. The ID is related to the CV5 Index, but the actual value is determined by a hardcoded lookup table in the editor. A value of 0 is for square terrain in StarEdit.&lt;br /&gt;
** '''Bit 15''' (0x8000) - Flag used by the editor (&amp;quot;Skipped&amp;quot;?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ISOM_Grid_Values.png]]&lt;br /&gt;
&lt;br /&gt;
First 1 in each value is the terrain type ID (1 for dirt), second digit is the ISOM edge ID. Values inside the diamond are associated with that diamond, values outside are associated with the adjacent diamonds on the ISOM grid.  This arrangement of tiles is tiled across the entire map, forming the full ISOM grid.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TILE&amp;quot; - StarEdit Terrain==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section will only be different from the [[#&amp;quot;MTXM&amp;quot; - StarCraft Terrain|MTXM]] section in tiles where doodads are present.&lt;br /&gt;
* '''u16[ map width * height ]''': 1 integer for each map tile. Moves horizontally across the map.&lt;br /&gt;
The values in TILE are normally directly generated from the ISOM section (see &amp;quot;'ISOM' section&amp;quot; above), and thus do not match that of MTXM on doodad tiles.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;DD2 &amp;quot; - StarEdit Sprites (Doodads)==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section contains the doodad map of the level. There are several parts to doodads. The graphical portion is stored in the [[#&amp;quot;MTXM&amp;quot; - StarCraft Terrain|MTXM]] section. The second part of the doodad is stored in this section. This section is only used by the map editor.&lt;br /&gt;
&lt;br /&gt;
Each doodad in the map gets the following structure:&lt;br /&gt;
* '''u16''': Number of the doodad. Size of the doodad is dependent on this. Doodads are different for each tileset.&lt;br /&gt;
* '''u16''': X coordinate of the doodad unit&lt;br /&gt;
* '''u16''': Y coordinate of the doodad unit&lt;br /&gt;
* '''u8''': Player number that owns the doodad&lt;br /&gt;
* '''u8''': Enabled flag&lt;br /&gt;
** '''00''' - Doodad is enabled (trap can attack, door is closed, etc)&lt;br /&gt;
** '''01''' - Doodad is disabled&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;THG2&amp;quot; - StarCraft Sprites==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 10 bytes.''&lt;br /&gt;
&lt;br /&gt;
The map editor only writes to this section. Starcraft uses this section.&lt;br /&gt;
&lt;br /&gt;
Sprites, usually on doodads, get the following structure.&lt;br /&gt;
* '''u16''': Unit/Sprite number of the sprite&lt;br /&gt;
* '''u16''': X coordinate of the doodad unit&lt;br /&gt;
* '''u16''': Y coordinate of the doodad unit&lt;br /&gt;
* '''u8''': Player number that owns the doodad&lt;br /&gt;
* '''u8''': Unused&lt;br /&gt;
* '''u16''': Flags&lt;br /&gt;
** '''Bit 0-11''' - Unused&lt;br /&gt;
** '''Bit 12''' - Draw as sprite (Determines if it is a sprite or a unit sprite)&lt;br /&gt;
** '''Bit 13''' - Unused&lt;br /&gt;
** '''Bit 14''' - Unused&lt;br /&gt;
** '''Bit 15''' - Disabled (Only valid if Draw as sprite is unchecked, disables the unit)&lt;br /&gt;
This section can be split. Additional THG2 sections will add more sprites.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MASK&amp;quot; - Fog of War Layer==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: This section will always validate.''&lt;br /&gt;
&lt;br /&gt;
This section contains the data on fog of war for each player. This is whether at the start of the game that levels of black space that is available.&lt;br /&gt;
* '''u8[ map width * height ]''': One byte for each map tile. The bits indicate for each player the fog of war.&lt;br /&gt;
** '''Bit 0''' - Player 1's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 1''' - Player 2's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 2''' - Player 3's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 3''' - Player 4's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 4''' - Player 5's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 5''' - Player 6's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 6''' - Player 7's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 7''' - Player 8's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
Any size greater than width*height will be ignored. Any size less will default missing tiles to 0xFF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;STR &amp;quot; - String Data==&lt;br /&gt;
''Required for all versions and all game types (or STRx).''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be at least 1 byte.''&lt;br /&gt;
&lt;br /&gt;
Note, since StarCraft Remastered, the &amp;quot;STRx&amp;quot; section is also possible and it optionally replaces the STR section.&lt;br /&gt;
&lt;br /&gt;
Note, the encoding of text in the STR section is unspecified. Common encodings are CP-1252, CP-949, and later, UTF-8, (but anything is possible)&lt;br /&gt;
&lt;br /&gt;
This section contains all the strings in the map.&lt;br /&gt;
* '''u16''': Number of strings in the section (Default''': 1024)&lt;br /&gt;
* '''u16[Number of strings]''': 1 integer for each string specifying the offset (the spot where the string starts in the section from the start of it).&lt;br /&gt;
* '''Strings''': After the offsets, this is where every string in the map goes, one after another. Each one is terminated by a null character.&lt;br /&gt;
This section can contain more or less then 1024 string offsests and will work in Starcraft.&amp;lt;br&amp;gt;&lt;br /&gt;
By default the first byte in '''Strings''' is a NUL character, and all unused offsets in the STR section point to this NUL character.&lt;br /&gt;
Note that STR sections can be stacked in a similar fashion as MTXM.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;STRx&amp;quot; - String Data==&lt;br /&gt;
''Required for all versions and all game types (or STR)''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be at least 1 byte (assumed, not confirmed).''&lt;br /&gt;
&lt;br /&gt;
Note, the STR section can also exist and optionally replace the STRx section.&lt;br /&gt;
&lt;br /&gt;
Note, the encoding of text in the STRx section is unspecified. Commonly it is UTF-8 but anything is possible.&lt;br /&gt;
&lt;br /&gt;
The STRx section is a simple bit extension to the STR section introduced in StarCraft Remastered.&lt;br /&gt;
&lt;br /&gt;
This section contains all the strings in the map.&lt;br /&gt;
* '''u32''': Number of strings in the section (Default''': 1024)&lt;br /&gt;
* '''u32[Number of strings]''': 1 integer for each string specifying the offset (the spot where the string starts in the section from the start of it).&lt;br /&gt;
* '''Strings''': After the offsets, this is where every string in the map goes, one after another. Each one is terminated by a null character.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPRP&amp;quot; - CUWP Slots==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1280 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section is used whenever the create units with properties trigger is used. Since a slot has to be assigned to the action, this is where each slot is designated.&lt;br /&gt;
&lt;br /&gt;
There are 64 of the following structures regardless of how many are used and it cannot exceed 64.&lt;br /&gt;
* '''u16''': Flag of which special properties can be applied to unit, and are valid.&lt;br /&gt;
** '''Bit 0''' - Cloak bit is valid&lt;br /&gt;
** '''Bit 1''' - Burrowed bit is valid&lt;br /&gt;
** '''Bit 2''' - In transit bit is valid&lt;br /&gt;
** '''Bit 3''' - Hallucinated bit is valid&lt;br /&gt;
** '''Bit 4''' - Invincible bit is valid&lt;br /&gt;
** '''Bit 5-15''' - Unknown/unused&lt;br /&gt;
* '''u16''': Which elements of the unit data are valid, which properties can be changed by the map maker.&lt;br /&gt;
** '''Bit 0''' - Owner player is valid (unit is not neutral)&lt;br /&gt;
** '''Bit 1''' - HP is valid&lt;br /&gt;
** '''Bit 2''' - Shields is valid&lt;br /&gt;
** '''Bit 3''' - Energy is valid&lt;br /&gt;
** '''Bit 4''' - Resource amount is valid (unit is a resource)&lt;br /&gt;
** '''Bit 5''' - Amount in hanger is valid&lt;br /&gt;
** '''Bit 6''' - Unknown/unused&lt;br /&gt;
* '''u8''': Player number that owns unit. Will always be NULL in this section (0)&lt;br /&gt;
* '''u8''': Hit point % (1-100)&lt;br /&gt;
* '''u8''': Shield point % (1-100)&lt;br /&gt;
* '''u8''': Energy point % (1-100)&lt;br /&gt;
* '''u32''': Resource amount (for resources only)&lt;br /&gt;
* '''u16''': # of units in hangar&lt;br /&gt;
* '''u16''': Flags&lt;br /&gt;
** '''Bit 0''' - Unit is cloaked&lt;br /&gt;
** '''Bit 1''' - Unit is burrowed&lt;br /&gt;
** '''Bit 2''' - Building is in transit&lt;br /&gt;
** '''Bit 3''' - Unit is hallucinated&lt;br /&gt;
** '''Bit 4''' - Unit is invincible&lt;br /&gt;
** '''Bit 5-15''' - Unknown/unused&lt;br /&gt;
* '''u32''': Unknown/unused. Padding?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPUS&amp;quot; - CUWP Slots Used==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section goes along with the &amp;quot;UPRP&amp;quot; section. This section just indicates which of the 64 unit properties slot are used.&lt;br /&gt;
* '''u8[64]''': 1 byte for each trigger unit properties slot&lt;br /&gt;
** '''00''' - Properties slot is unused&lt;br /&gt;
** '''01''' - Properties slot is used&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MRGN&amp;quot; - Locations==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: 1280 bytes for retail, 5100 bytes for Hybrid and Broodwar.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the locations that the map uses. In a vanilla map, this section contains 64 locations. In a Hybrid or Brood War map, this section will expand to contain 255 locations.&lt;br /&gt;
&lt;br /&gt;
Each location gets one of the following location entries. The 'Anywhere' location, is ALWAYS location 64.&lt;br /&gt;
* '''u32''': Left (X1) coordinate of location, in pixels (usually 32 pt grid aligned)&lt;br /&gt;
* '''u32''': Top (Y1) coordinate of location, in pixels&lt;br /&gt;
* '''u32''': Right (X2) coordinate of location, in pixels&lt;br /&gt;
* '''u32''': Bottom (Y2) coordinate of location, in pixels&lt;br /&gt;
* '''u16''': String number of the name of this location&lt;br /&gt;
* '''u16''': Location elevation flags. If an elevation is disabled in the location, it's bit will be on (1)&lt;br /&gt;
** '''Bit 0''' - Low elevation&lt;br /&gt;
** '''Bit 1''' - Medium elevation&lt;br /&gt;
** '''Bit 2''' - High elevation&lt;br /&gt;
** '''Bit 3''' - Low air&lt;br /&gt;
** '''Bit 4''' - Medium air&lt;br /&gt;
** '''Bit 5''' - High air&lt;br /&gt;
** '''Bit 6-15''' - Unused&lt;br /&gt;
Note that in typical locations Right is always larger than Left and Bottom is always larger than Top. However, you can reverse one or both of these for [[Inverted Locations]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TRIG&amp;quot; - Triggers==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 2400 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the triggers in the map. This along with [[#&amp;quot;MBRF&amp;quot; - Mission Briefings|MBRF]] is the most complicated section in the entire scenario.chk file as there is a lot of data packed into too little of a space. Refer to the appendix at the bottom of this page for more information.&lt;br /&gt;
For easy reference, since each trigger contains 2400 bytes, the amount of triggers can be gotten by taking the section length and dividing by 2400.&lt;br /&gt;
Every single trigger in the map will have the following format:&lt;br /&gt;
* 16 Conditions (20 byte struct)&amp;lt;br&amp;gt; Every trigger has 16 of the following format, even if only one condition is used. See the appendix for information on which items are used for what conditions.&lt;br /&gt;
** '''u32''': Location number for the condition (1 based -- 0 refers to No Location), EUD Bitmask for a Death condition if the MaskFlag is set to &amp;quot;SC&amp;quot;&lt;br /&gt;
** '''u32''': [[#List of Players/Group IDs|Group]] that the condition applies to&lt;br /&gt;
** '''u32''': Qualified number (how many/resource amount)&lt;br /&gt;
** '''u16''': [[#Trigger Unit Types|Unit ID]] condition applies to&lt;br /&gt;
** '''u8''': [[#Numeric Comparisons|Numeric comparison]], [[#Switch States|switch state]]&lt;br /&gt;
** '''u8''': [[#Trigger Conditions List|Condition byte]]&lt;br /&gt;
** '''u8''': [[#Resource Types|Resource type]], [[#Score Types|score type]], Switch number (0-based)&lt;br /&gt;
** '''u8''': Flags&lt;br /&gt;
*** '''Bit 0''' - Unknown/unused&lt;br /&gt;
*** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled/ignored&lt;br /&gt;
*** '''Bit 2''' - Always display flag.&lt;br /&gt;
*** '''Bit 3''' - Unit properties is used. ('''Note:''' This is used in [[TRG|*.trg]] files)&lt;br /&gt;
*** '''Bit 4''' - Unit type is used. Cleared in &amp;quot;Offset + Mask&amp;quot; EUD conditions. May not be necessary otherwise?&lt;br /&gt;
*** '''Bit 5-7''' - Unknown/unused&lt;br /&gt;
** '''u16''': MaskFlag: set to &amp;quot;SC&amp;quot; (0x53, 0x43) when using the bitmask for EUDs, 0 otherwise&lt;br /&gt;
* 64 Actions (32 byte struct)&amp;lt;br&amp;gt; Immediately following the 16 conditions, there are 64 actions. There will always be 64 of the following structure, even if some of them are unused.&lt;br /&gt;
** '''u32''': Location - source location in &amp;quot;Order&amp;quot; and &amp;quot;Move Unit&amp;quot;, dest location in &amp;quot;Move Location&amp;quot; (1 based -- 0 refers to No Location), EUD Bitmask for a Death action if the MaskFlag is set to &amp;quot;SC&amp;quot;&lt;br /&gt;
** '''u32''': String number for trigger text (0 means no string)&lt;br /&gt;
** '''u32''': WAV string number (0 means no string)&lt;br /&gt;
** '''u32''': Seconds/milliseconds of time&lt;br /&gt;
** '''u32''': First (or only) [[#List of Players/Group IDs|Group/Player]] affected.&lt;br /&gt;
** '''u32''': Second group affected, secondary location (1-based), CUWP #, number, AI script (4-byte string), switch (0-based #)&lt;br /&gt;
** '''u16''': [[#Trigger Unit Types|Unit type]], [[#Score Types|score type]], [[#Resource Types|resource type]], [[#Alliance Statuses|alliance status]]&lt;br /&gt;
** '''u8''': [[#Trigger Actions List|Action byte]]&lt;br /&gt;
** '''u8''': Number of units (0 means All Units), [[#Action States|action state]], [[#Unit Orders|unit order]], [[#Number Modifiers|number modifier]]&lt;br /&gt;
** '''u8''': Flags&lt;br /&gt;
*** '''Bit 0''' - Ignore a wait/transmission once.&lt;br /&gt;
*** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled.&lt;br /&gt;
*** '''Bit 2''' - Always display flag - when not set: if the user has turned off subtitles (see sound options) the text will not display, when set: text will always display&lt;br /&gt;
*** '''Bit 3''' - Unit properties is used. Staredit uses this for *.trg files.&lt;br /&gt;
*** '''Bit 4''' - Unit type is used. Cleared in &amp;quot;Offset + Mask&amp;quot; EUD actions.&lt;br /&gt;
*** '''Bit 5-7''' - Unknown/unused&lt;br /&gt;
** '''u8''': Padding&lt;br /&gt;
** '''u16 (2 bytes)''': MaskFlag: set to &amp;quot;SC&amp;quot; (0x53, 0x43) when using the bitmask for EUDs, 0 otherwise&lt;br /&gt;
* Player Execution&amp;lt;br&amp;gt; Following the 16 conditions and 64 actions, every trigger also has this structure&lt;br /&gt;
** '''u32''': execution flags&lt;br /&gt;
*** '''Bit 0''' - All conditions are met, executing actions, cleared on the next trigger loop.&lt;br /&gt;
*** '''Bit 1''' - Ignore the following actions: Defeat, Draw.&lt;br /&gt;
*** '''Bit 2''' - Preserve trigger. (Can replace Preserve Trigger action)&lt;br /&gt;
*** '''Bit 3''' - Ignore execution.&lt;br /&gt;
*** '''Bit 4''' - Ignore all of the following actions for this trigger until the next trigger loop: Wait, PauseGame, Transmission, PlayWAV, DisplayTextMessage, CenterView, MinimapPing, TalkingPortrait, and MuteUnitSpeech.&lt;br /&gt;
*** '''Bit 5''' - This trigger has paused the game, ignoring subsequent calls to Pause Game (Unpause Game clears this flag only in the same trigger), may automatically call unpause at the end of action execution?&lt;br /&gt;
*** '''Bit 6''' - Wait skipping disabled for this trigger, cleared on next trigger loop.&lt;br /&gt;
*** '''Bit 7-31''' - Unknown/unused&lt;br /&gt;
** '''u8[27]''': 1 byte for each player in the [[#List of Players/Group IDs]]&lt;br /&gt;
*** '''00''' - Trigger is not executed for player&lt;br /&gt;
*** '''01''' - Trigger is executed for player&lt;br /&gt;
** '''u8''': Index of the current action, in StarCraft this is incremented after each action is executed, trigger execution ends when this is 64 (Max Actions) or an action is encountered with Action byte as 0&lt;br /&gt;
This section can be split. Additional TRIG sections will add more triggers.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MBRF&amp;quot; - Mission Briefings==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 2400 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all of the mission briefings shown by the players.&lt;br /&gt;
&lt;br /&gt;
See [[#&amp;quot;TRIG&amp;quot; - Triggers|&amp;quot;TRIG&amp;quot;]] section for format, as it is exactly the same except for the conditions. In this section the 16 conditions are still there, they are all null except for the very first condition, which only has a condition byte of 13. See [[#Mission Briefing Actions List]] for the action bytes for the mission briefing actions.&lt;br /&gt;
&lt;br /&gt;
This section can be split. Additional MBRF sections will add more briefing triggers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SPRP&amp;quot; - Scenario Properties==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4 bytes.''&lt;br /&gt;
&lt;br /&gt;
* '''u16''': String number of the scenario name&lt;br /&gt;
* '''u16''': String number of the scenarios description.&lt;br /&gt;
A string index of 0 for the map name will default it to its file name. A string index of 0 description will default to a predefined string.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;FORC&amp;quot; - Force Settings==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be less than or equal to 20 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the forces and the information about them.&lt;br /&gt;
* '''u8[8]''': 1 byte for each active player, specifying which of the 4 forces (0-based) that the player's on&lt;br /&gt;
* '''u16[4]''': 1 integer for each force, string number of the name of the force&lt;br /&gt;
* '''u8[4]''': 1 byte for each force specifying the properties:&lt;br /&gt;
** '''Bit 0''' - Random start location&lt;br /&gt;
** '''Bit 1''' - Allies&lt;br /&gt;
** '''Bit 2''' - Allied victory&lt;br /&gt;
** '''Bit 3''' - Shared vision&lt;br /&gt;
** '''Bit 4-7''' - Unused&lt;br /&gt;
Notes about FORC:&lt;br /&gt;
* If there is no string specified for a force name, it will default to a &amp;quot;Force #&amp;quot; string.&lt;br /&gt;
* If this section is less than 20 bytes, the remaining bytes are defaulted to 0.&lt;br /&gt;
* Players can be on a force greater than 4, however they will not appear in the game lobby.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;WAV &amp;quot; - WAV String Indexes==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
There are 512 wav entires regardless of how many are actually used.&lt;br /&gt;
* '''u32[512]''': 1 long for each WAV. Indicates a string index is used for a WAV path in the MPQ. If the entry is not used, it will be 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIS&amp;quot; - Unit Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4048 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;UNIx&amp;quot; - BW Unit Settings|&amp;quot;UNIx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains the unit settings for the level:&lt;br /&gt;
* '''u8[228]''': 1 byte for each unit, in order of Unit ID&lt;br /&gt;
** '''00''' - Unit does not use default settings&lt;br /&gt;
** '''01''' - Unit does use default settings&lt;br /&gt;
* '''u32[228]''': Hit points for unit (Note the displayed value is this value / 256, with the low byte being a fractional HP value)&lt;br /&gt;
* '''u16[228]''': Shield points, in order of Unit ID&lt;br /&gt;
* '''u8[228]''': Armor points, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Build time (1/60 seconds), in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Mineral cost, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Gas cost, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': String number, in order of Unit ID&lt;br /&gt;
* '''u16[100]''': Base weapon damage the weapon does, in weapon ID order ([[#List of Unit Weapon IDs]])&lt;br /&gt;
* '''u16[100]''': Upgrade bonus weapon damage, in weapon ID order&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGS&amp;quot; - Upgrade Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 598 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;UPGx&amp;quot; - BW Upgrade Settings|&amp;quot;UPGx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains upgrade settings:&lt;br /&gt;
* '''u8[46]''': 1 byte per each upgrade, in order of upgrade id.&lt;br /&gt;
** '''00''' - Upgrade uses custom settings&lt;br /&gt;
** '''01''' - Upgrade uses default settings&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, time factor for each upgrade, in order of upgrade id.&lt;br /&gt;
See [[#List of Upgrade IDs]] for upgrade ids.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TECS&amp;quot; - Tech Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 216 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;TECx&amp;quot; - BW Tech Settings|&amp;quot;TECx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains technology/special abilities settings:&lt;br /&gt;
* '''u8[24]''': 1 byte per each technology, specifies if the tech overrides the default settings. In order of technology id&lt;br /&gt;
** '''00''' - Technology uses custom settings&lt;br /&gt;
** '''01''' - Technology uses default settings&lt;br /&gt;
* '''u16[24]''': Mineral cost to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Gas cost to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Time required to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Energy cost to cast technology/special ability. In order of technology id.&lt;br /&gt;
See [[#List of Technology IDs]] for technology ids.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SWNM&amp;quot; - Switch Names==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section contains the strings used for each switch. There are 256 switches, and can't be any more or any less.&lt;br /&gt;
* '''u32[256]''': One long for each switch, specifies the string number for the name of each switch. Unnamed switches will have an index of 0, and have a default switch name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;COLR&amp;quot; - Player Colors==&lt;br /&gt;
''Required for Brood War only and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 8 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section indicates what color each player is, but only has effect on Brood War.&lt;br /&gt;
* '''u8[8]''': 1 byte for each player, indicates the color of the player&lt;br /&gt;
** '''00''' - Red&lt;br /&gt;
** '''01''' - Blue&lt;br /&gt;
** '''02''' - Teal&lt;br /&gt;
** '''03''' - Purple&lt;br /&gt;
** '''04''' - Orange&lt;br /&gt;
** '''05''' - Brown&lt;br /&gt;
** '''06''' - White&lt;br /&gt;
** '''07''' - Yellow&lt;br /&gt;
** '''08''' - Green&lt;br /&gt;
** '''09''' - Pale yellow&lt;br /&gt;
** '''10''' - Tan&lt;br /&gt;
** '''11''' - Azure (Neutral color)&lt;br /&gt;
Other values can be used but may have different results depending on the tileset. Any color value above 11 is an overflow. As of patch 1.18.6, values above 11 result in default player color.&lt;br /&gt;
&lt;br /&gt;
When CRGB is present, this section still defines leaderboard colors.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;CRGB&amp;quot; - Remastered Player Colors==&lt;br /&gt;
''Requirement unknown, but can be in any map type including non-remaster maps.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 32 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''u8[8][3]''': 3 bytes for each player corresponding to an RGB color value&lt;br /&gt;
** '''u8''': R&lt;br /&gt;
** '''u8''': G&lt;br /&gt;
** '''u8''': B, or color ID for type 3&lt;br /&gt;
* '''u8[8]''': Indicates how to select the color for each player&lt;br /&gt;
** '''0''' - Random Predefined&lt;br /&gt;
** '''1''' - Player's Choice&lt;br /&gt;
** '''2''' - Custom RGB Color (RGB value for the corresponding player defined above)&lt;br /&gt;
** '''3''' - Use color ID in the &amp;quot;B&amp;quot; color channel (&amp;quot;R&amp;quot; and &amp;quot;G&amp;quot; values appear to contain junk data); leaderboard color is still defined by COLR section and can be set independently&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SC:R Only color IDs:&amp;lt;br&amp;gt;&lt;br /&gt;
Extends the [[#&amp;quot;COLR&amp;quot; - Player Colors|COLR]] section list of colors, but cannot be used in the COLR section.&lt;br /&gt;
* '''12''' - Pale Green&lt;br /&gt;
* '''13''' - Blueish Grey&lt;br /&gt;
* '''14''' - Cyan&lt;br /&gt;
* '''15''' - Pink&lt;br /&gt;
* '''16''' - Olive&lt;br /&gt;
* '''17''' - Lime&lt;br /&gt;
* '''18''' - Navy&lt;br /&gt;
* '''19''' - Magenta&lt;br /&gt;
* '''20''' - Grey&lt;br /&gt;
* '''21''' - Black&lt;br /&gt;
* '''22+''' - Random (can pick colors that have been used)&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PUPx&amp;quot; - BW Upgrade Restrictions==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2318 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UPGR&amp;quot; - Upgrade Restrictions|&amp;quot;UPGR&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is identical to UPGR section except it uses the Brood War set of 61 upgrades instead of the original 46.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PTEx&amp;quot; - BW Tech Restrictions==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1672 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;PTEC&amp;quot; - Tech Restrictions|&amp;quot;PTEC&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is identical to PTEC section except it uses the Brood War set of 44 technologies instead of the original 24.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIx&amp;quot; - BW Unit Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4168 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UNIS&amp;quot; - Unit Settings|&amp;quot;UNIS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is indentical to UNIS section except it uses the Brood War set of 130 weapons instead of the original 100.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGx&amp;quot; - BW Upgrade Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 794 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UPGS&amp;quot; - Upgrade Settings|&amp;quot;UPGS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section the same as UPGS except section except it uses the Brood War set of 61 upgrades instead of the original 46, and there is an unused byte after the first set:&lt;br /&gt;
* '''u8[61]''': 1 byte per each upgrade, in order of upgrade id.&lt;br /&gt;
** '''00''' - Upgrade uses custom settings&lt;br /&gt;
** '''01''' - Upgrade uses default settings&lt;br /&gt;
* '''u8''': Unused.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, time factor for each upgrade, in order of upgrade id.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TECx&amp;quot; - BW Tech Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 396 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;TECS&amp;quot; - Tech Settings|&amp;quot;TECS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is indentical to TECS section except it uses the Brood War set of 44 technologies instead of the original 24.&lt;br /&gt;
&lt;br /&gt;
=Appendix=&lt;br /&gt;
A set of references and IDs that should help you easier in the trigger section and the technology/player ids, etc:&lt;br /&gt;
&lt;br /&gt;
==Trigger Conditions List==&lt;br /&gt;
* 0 = No Condition&lt;br /&gt;
* 1 = Countdown Timer(Comparison, QNumber)&lt;br /&gt;
* 2 = Command(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 3 = Bring(Player, Comparison, TUnit, Loc, QNumber)&lt;br /&gt;
* 4 = Accumulate(Player, Comparison, QNumber, ResType)&lt;br /&gt;
* 5 = Kill(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 6 = Command the Most(TUnit)&lt;br /&gt;
* 7 = Commands the Most At(TUnit, Loc)&lt;br /&gt;
* 8 = Most Kills(TUnit)&lt;br /&gt;
* 9 = Highest Score(Score)&lt;br /&gt;
* 10 = Most Resources(ResType)&lt;br /&gt;
* 11 = Switch(Switch)&lt;br /&gt;
* 12 = Elapsed Time(Comparison, QNumber)&lt;br /&gt;
* 13 = Data is a Mission Briefing. Conditions are N/A (Same as Never)&lt;br /&gt;
* 14 = Opponents(Player, Comparison, QNumber)&lt;br /&gt;
* 15 = Deaths(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 16 = Command the Least(TUnit)&lt;br /&gt;
* 17 = Command the Least At(TUnit, Loc)&lt;br /&gt;
* 18 = Least Kills(TUnit)&lt;br /&gt;
* 19 = Lowest Score(Score)&lt;br /&gt;
* 20 = Least Resources(ResType)&lt;br /&gt;
* 21 = Score(Player, Comparison, Score, QNumber)&lt;br /&gt;
* 22 = Always (Same as No Condition)&lt;br /&gt;
* 23 = Never&lt;br /&gt;
&lt;br /&gt;
==Trigger Actions List==&lt;br /&gt;
* 0 = No Action&lt;br /&gt;
* 1 = Victory&lt;br /&gt;
* 2 = Defeat&lt;br /&gt;
* 3 = Preserve Trigger&lt;br /&gt;
* 4 = Wait(Time)&lt;br /&gt;
* 5 = Pause Game (Single player only)&lt;br /&gt;
* 6 = Unpause Game (Single player only)&lt;br /&gt;
* 7 = Transmission(Text, Unit, Loc, Time, Modifier, Wave, WavTime)&lt;br /&gt;
* 8 = Play WAV(Wav, WavTime)&lt;br /&gt;
* 9 = Display Text Message(Text)&lt;br /&gt;
* 10 = Center View(Loc)&lt;br /&gt;
* 11 = Create Unit with Properties(Player, Unit, Number, Loc, UnitProp)&lt;br /&gt;
* 12 = Set Mission Objectives(Text)&lt;br /&gt;
* 13 = Set Switch(Switch, SwAction)&lt;br /&gt;
* 14 = Set Countdown Timer(Time, Modifier)&lt;br /&gt;
* 15 = Run AI Script(AIScript)&lt;br /&gt;
* 16 = Run AI Script At Location(AIScript)&lt;br /&gt;
* 17 = Leader Board (Control) (Text, TUnit)&lt;br /&gt;
* 18 = Leader Board (Control At Location) (Text, TUnit, Loc)&lt;br /&gt;
* 19 = Leader Board (Resources) (Text, ResType)&lt;br /&gt;
* 20 = Leader Board (Kills) (Text, TUnit)&lt;br /&gt;
* 21 = Leader Board (Points) (Text, Score)&lt;br /&gt;
* 22 = Kill Unit (Player, TUnit)&lt;br /&gt;
* 23 = Kill Unit At Location(Player, TUnit, Number, Loc)&lt;br /&gt;
* 24 = Remove Unit(Player, TUnit)&lt;br /&gt;
* 25 = Remove Unit At Location(Player, TUnit, Number, Loc)&lt;br /&gt;
* 26 = Set Resources(Player, Number, Modifier, ResType)&lt;br /&gt;
* 27 = Set Score(Player, Number, Modifier, Score)&lt;br /&gt;
* 28 = Minimap Ping(Loc)&lt;br /&gt;
* 29 = Talking Portrait(Unit, Time)&lt;br /&gt;
* 30 = Mute Unit Speech&lt;br /&gt;
* 31 = Unmute Unit Speech&lt;br /&gt;
* 32 = Leaderboard Computer Players(State)&lt;br /&gt;
* 33 = Leaderboard Goal (Control) (Text, TUnit, Number)&lt;br /&gt;
* 34 = Leaderboard Goal (Control At Location) (Text, TUnit, Number, Loc)&lt;br /&gt;
* 35 = Leaderboard Goal (Resources) (Text, TUnit, Number, ResType)&lt;br /&gt;
* 36 = Leaderboard Goal (Kills) (Text, TUnit, Number)&lt;br /&gt;
* 37 = Leaderboard Goal (Points) (Text, Number, Score)&lt;br /&gt;
* 38 = Move Location(Player, TUnit, SLoc, DLoc)&lt;br /&gt;
* 39 = Move Unit(Player, TUnit, Number, SLoc, DLoc)&lt;br /&gt;
* 40 = Leaderboard (Greed) (Number)&lt;br /&gt;
* 41 = Set Next Scenario(Text) (Single player only)&lt;br /&gt;
* 42 = Set Doodad State(Player, TUnit, Loc, State)&lt;br /&gt;
* 43 = Set Invincibility(Player, TUnit, Loc, State)&lt;br /&gt;
* 44 = Create Unit(Player, Unit, Number, Loc)&lt;br /&gt;
* 45 = Set Deaths(Player, TUnit, Number, Modifier)&lt;br /&gt;
* 46 = Order(Player, TUnit, SLoc, DLoc, Order)&lt;br /&gt;
* 47 = Comment(Text)&lt;br /&gt;
* 48 = Give Units to Player(SPlayer, DPlayer, TUnit, Number, Loc)&lt;br /&gt;
* 49 = Modify Unit Hit Points(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 50 = Modify Unit Energy(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 51 = Modify Unit Shield Points(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 52 = Modify Unit Resource Amount(Player, Number, ModAmount, Loc)&lt;br /&gt;
* 53 = Modify Unit Hanger Count(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 54 = Pause Timer&lt;br /&gt;
* 55 = Unpause Timer&lt;br /&gt;
* 56 = Draw&lt;br /&gt;
* 57 = Set Alliance Status(Player, AllyStatus)&lt;br /&gt;
* 58 = Disable Debug Mode (Single player only)&lt;br /&gt;
* 59 = Enable Debug Mode (Single player only)&lt;br /&gt;
&lt;br /&gt;
==Mission Briefing Actions List==&lt;br /&gt;
* 0 - No Action&lt;br /&gt;
* 1 - Wait(Time)&lt;br /&gt;
* 2 - Play WAV(Wave, WavTime)&lt;br /&gt;
* 3 - Text Message(Text, Time)&lt;br /&gt;
* 4 - Mission Objectives(Text)&lt;br /&gt;
* 5 - Show Portrait(Unit, Slot)&lt;br /&gt;
* 6 - Hide Portrait(Slot)&lt;br /&gt;
* 7 - Display Speaking Portrait(Slot, Time)&lt;br /&gt;
* 8 - Transmission(Text, Slot, Time, Modifier, Wave, WavTime)&lt;br /&gt;
* 9 - Skip Tutorial Enabled&lt;br /&gt;
&lt;br /&gt;
==Switch States==&lt;br /&gt;
* 2 = Switch is set&lt;br /&gt;
* 3 = Switch is cleared&lt;br /&gt;
&lt;br /&gt;
==Numeric Comparisons==&lt;br /&gt;
* 0 = At least&lt;br /&gt;
* 1 = At most&lt;br /&gt;
* 10 = Exactly&lt;br /&gt;
&lt;br /&gt;
==Score Types==&lt;br /&gt;
* 0 = Total&lt;br /&gt;
* 1 = Units&lt;br /&gt;
* 2 = Buildings&lt;br /&gt;
* 3 = Units and Buildings&lt;br /&gt;
* 4 = Kills&lt;br /&gt;
* 5 = Razings&lt;br /&gt;
* 6 = Kills and Razings&lt;br /&gt;
* 7 = Custom&lt;br /&gt;
&lt;br /&gt;
==Resource Types==&lt;br /&gt;
* 0 = Ore&lt;br /&gt;
* 1 = Gas&lt;br /&gt;
* 2 = Ore and Gas&lt;br /&gt;
&lt;br /&gt;
==Alliance Statuses==&lt;br /&gt;
* 0 = Enemy&lt;br /&gt;
* 1 = Ally&lt;br /&gt;
* 2 = Allied Victory&lt;br /&gt;
&lt;br /&gt;
==Unit Orders==&lt;br /&gt;
* 0 = Move&lt;br /&gt;
* 1 = Patrol&lt;br /&gt;
* 2 = Attack&lt;br /&gt;
&lt;br /&gt;
==Action States==&lt;br /&gt;
* 4 = Enabled/Set switch&lt;br /&gt;
* 5  = Disabled/Clear switch&lt;br /&gt;
* 6 = Toggle/Toggle switch&lt;br /&gt;
* 11 = Randomize switch&lt;br /&gt;
&lt;br /&gt;
==Number Modifiers==&lt;br /&gt;
* 7 = Set to&lt;br /&gt;
* 8 = Add&lt;br /&gt;
* 9 = Subtract&lt;br /&gt;
&lt;br /&gt;
==Trigger Unit Types==&lt;br /&gt;
* All normal units (0-227)&lt;br /&gt;
* 228 = None&lt;br /&gt;
* 229 = Any unit&lt;br /&gt;
* 230 = Men&lt;br /&gt;
* 231 = Buildings&lt;br /&gt;
* 232 = Factories&lt;br /&gt;
&lt;br /&gt;
==List of Players/Group IDs==&lt;br /&gt;
* 0 = Player 1&lt;br /&gt;
* 1 = Player 2&lt;br /&gt;
* 2 = Player 3&lt;br /&gt;
* 3 = Player 4&lt;br /&gt;
* 4 = Player 5&lt;br /&gt;
* 5 = Player 6&lt;br /&gt;
* 6 = Player 7&lt;br /&gt;
* 7 = Player 8&lt;br /&gt;
* 8 = Player 9&lt;br /&gt;
* 9 = Player 10&lt;br /&gt;
* 10 = Player 11&lt;br /&gt;
* 11 = Player 12&lt;br /&gt;
* 12 = None (Unused, One-entry Overflow in some cases)&lt;br /&gt;
* 13 = Current Player&lt;br /&gt;
* 14 = Foes&lt;br /&gt;
* 15 = Allies&lt;br /&gt;
* 16 = Neutral Players&lt;br /&gt;
* 17 = All Players&lt;br /&gt;
* 18 = Force 1&lt;br /&gt;
* 19 = Force 2&lt;br /&gt;
* 20 = Force 3&lt;br /&gt;
* 21 = Force 4&lt;br /&gt;
* 22 = Unused 1&lt;br /&gt;
* 23 = Unused 2&lt;br /&gt;
* 24 = Unused 3&lt;br /&gt;
* 25 = Unused 4&lt;br /&gt;
* 26 = Non Allied Victory Players&lt;br /&gt;
&lt;br /&gt;
==List of Technology IDs==&lt;br /&gt;
* 0 = Stim Packs&lt;br /&gt;
* 1 = Lockdown&lt;br /&gt;
* 2 = EMP Shockwave&lt;br /&gt;
* 3 = Spider Mines&lt;br /&gt;
* 4 = Scanner Sweep&lt;br /&gt;
* 5 = Siege Mode&lt;br /&gt;
* 6 = Defensive Matrix&lt;br /&gt;
* 7 = Irradiate&lt;br /&gt;
* 8 = Yamato Gun&lt;br /&gt;
* 9 = Cloaking Field&lt;br /&gt;
* 10 = Personnel Cloaking&lt;br /&gt;
* 11 = Burrowing&lt;br /&gt;
* 12 = Infestation&lt;br /&gt;
* 13 = Spawn Broodling&lt;br /&gt;
* 14 = Dark Swarm&lt;br /&gt;
* 15 = Plague&lt;br /&gt;
* 16 = Consume&lt;br /&gt;
* 17 = Ensnare&lt;br /&gt;
* 18 = Parasite&lt;br /&gt;
* 19 = Psionic Storm&lt;br /&gt;
* 20 = Hallucination&lt;br /&gt;
* 21 = Recall&lt;br /&gt;
* 22 = Stasis Field&lt;br /&gt;
* 23 = Archon Warp&lt;br /&gt;
* 24 = Restoration&lt;br /&gt;
* 25 = Disruption Web&lt;br /&gt;
* 26 = Unused 26&lt;br /&gt;
* 27 = Mind Control&lt;br /&gt;
* 28 = Dark Archon Meld&lt;br /&gt;
* 29 = Feedback&lt;br /&gt;
* 30 = Optical Flare&lt;br /&gt;
* 31 = Maelstorm&lt;br /&gt;
* 32 = Lurker Aspect&lt;br /&gt;
* 33 = Unused 33&lt;br /&gt;
* 34 = Healing&lt;br /&gt;
* 35 = Unused 35&lt;br /&gt;
* 36 = Unused 36&lt;br /&gt;
* 37 = Unused 37&lt;br /&gt;
* 38 = Unused 38&lt;br /&gt;
* 39 = Unused 39&lt;br /&gt;
* 40 = Unused 40&lt;br /&gt;
* 41 = Unused 41&lt;br /&gt;
* 42 = Unused 42&lt;br /&gt;
* 43 = Unused 43&lt;br /&gt;
&lt;br /&gt;
==List of Upgrade IDs==&lt;br /&gt;
* 0 = Terran Infantry Armor&lt;br /&gt;
* 1 = Terran Vehicle Plating&lt;br /&gt;
* 2 = Terran Ship Plating&lt;br /&gt;
* 3 = Zerg Carapace&lt;br /&gt;
* 4 = Zerg Flyer Caparace&lt;br /&gt;
* 5 = Protoss Armor&lt;br /&gt;
* 6 = Protoss Plating&lt;br /&gt;
* 7 = Terran Infantry Weapons&lt;br /&gt;
* 8 = Terran Vehicle Weapons&lt;br /&gt;
* 9 = Terran Ship Weapons&lt;br /&gt;
* 10 = Zerg Melee Attacks&lt;br /&gt;
* 11 = Zerg Missile Attacks&lt;br /&gt;
* 12 = Zerg Flyer Attacks&lt;br /&gt;
* 13 = Protoss Ground Weapons&lt;br /&gt;
* 14 = Protoss Air Weapons&lt;br /&gt;
* 15 = Protoss Plasma Shields&lt;br /&gt;
* 16 = U-238 Shells&lt;br /&gt;
* 17 = Ion Thrusters&lt;br /&gt;
* 18 = Burst Lasers (Unused)&lt;br /&gt;
* 19 = Titan Reactor (SV +50)&lt;br /&gt;
* 20 = Ocular Implants&lt;br /&gt;
* 21 = Moebius Reactor (Ghost +50)&lt;br /&gt;
* 22 = Apollo Reactor (Wraith +50)&lt;br /&gt;
* 23 = Colossus Reactor (BC +50)&lt;br /&gt;
* 24 = Ventral Sacs&lt;br /&gt;
* 25 = Antennae&lt;br /&gt;
* 26 = Pneumatized Carapace&lt;br /&gt;
* 27 = Metabolic Boost&lt;br /&gt;
* 28 = Adrenal Glands&lt;br /&gt;
* 29 = Muscular Augments&lt;br /&gt;
* 30 = Grooved Spines&lt;br /&gt;
* 31 = Gamete Meiosis (Queen +50)&lt;br /&gt;
* 32 = Metasynaptic Node (Defiler +50)&lt;br /&gt;
* 33 = Singularity Charge&lt;br /&gt;
* 34 = Leg Enhancements&lt;br /&gt;
* 35 = Scarab Damage &lt;br /&gt;
* 36 = Reaver Capacity &lt;br /&gt;
* 37 = Gravitic Drive&lt;br /&gt;
* 38 = Sensor Array&lt;br /&gt;
* 39 = Gravitic Boosters&lt;br /&gt;
* 40 = Khaydarin Amulet (HT +50)&lt;br /&gt;
* 41 = Apial Sensors&lt;br /&gt;
* 42 = Gravitic Thrusters&lt;br /&gt;
* 43 = Carrier Capacity&lt;br /&gt;
* 44 = Khaydarin Core (Arbiter +50)&lt;br /&gt;
* 45 = Unknown Upgrade45&lt;br /&gt;
* 46 = Unknown Upgrade46&lt;br /&gt;
* 47 = Argus Jewel (Corsair +50)&lt;br /&gt;
* 48 = Unknown Upgrade48&lt;br /&gt;
* 49 = Argus Talisman (DA +50)&lt;br /&gt;
* 50 = Unknown Upgrade50&lt;br /&gt;
* 51 = Caduceus Reactor (Medic +50)&lt;br /&gt;
* 52 = Chitinous Plating&lt;br /&gt;
* 53 = Anabolic Synthesis&lt;br /&gt;
* 54 = Charon Booster&lt;br /&gt;
* 55 = Unknown Upgrade55&lt;br /&gt;
* 56 = Unknown Upgrade56&lt;br /&gt;
* 57 = Unknown Upgrade57&lt;br /&gt;
* 58 = Unknown Upgrade58&lt;br /&gt;
* 59 = Unknown Upgrade59&lt;br /&gt;
* 60 = Unknown Upgrade60&lt;br /&gt;
&lt;br /&gt;
==List of Unit Weapon IDs==&lt;br /&gt;
* 0 = Gauss Rifle (Normal)&lt;br /&gt;
* 1 = Gauss Rifle (Jim Raynor-Marine)&lt;br /&gt;
* 2 = C-10 Canister Rifle (Normal)&lt;br /&gt;
* 3 = C-10 Canister Rifle (Sarah Kerrigan)&lt;br /&gt;
* 4 = Fragmentation Grenade (Normal)&lt;br /&gt;
* 5 = Fragmentation Grenade (Jim Raynor-Vulture)&lt;br /&gt;
* 6 = Spider Mines&lt;br /&gt;
* 7 = Twin Autocannons (Normal)&lt;br /&gt;
* 8 = Hellfire Missile Pack (Normal)&lt;br /&gt;
* 9 = Twin Autocannons (Alan Schezar)&lt;br /&gt;
* 10 = Hellfire Missile Pack (Alan Schezar)&lt;br /&gt;
* 11 = Arclite Cannon (Normal)&lt;br /&gt;
* 12 = Arclite Cannon (Edmund Duke)&lt;br /&gt;
* 13 = Fusion Cutter&lt;br /&gt;
* 14 = Fusion Cutter (Harvest)&lt;br /&gt;
* 15 = Gemini Missiles (Normal)&lt;br /&gt;
* 16 = Burst Lasers (Normal)&lt;br /&gt;
* 17 = Gemini Missiles (Tom Kazansky)&lt;br /&gt;
* 18 = Burst Lasers (Tom Kazansky)&lt;br /&gt;
* 19 = ATS Laser Battery (Normal)&lt;br /&gt;
* 20 = ATA Laser Battery (Normal)&lt;br /&gt;
* 21 = ATS Laser Battery (Norad II+Mengsk+DuGalle)&lt;br /&gt;
* 22 = ATA Laser Battery (Norad II+Mengsk+DuGalle)&lt;br /&gt;
* 23 = ATS Laser Battery (Hyperion)&lt;br /&gt;
* 24 = ATA Laser Battery (Hyperion)&lt;br /&gt;
* 25 = Flame Thrower (Normal)&lt;br /&gt;
* 26 = Flame Thrower (Gui Montag)&lt;br /&gt;
* 27 = Arclite Shock Cannon (Normal)&lt;br /&gt;
* 28 = Arclite Shock Cannon (Edmund Duke)&lt;br /&gt;
* 29 = Longbolt Missile&lt;br /&gt;
* 30 = Yamato Gun&lt;br /&gt;
* 31 = Nuclear Missile&lt;br /&gt;
* 32 = Lockdown&lt;br /&gt;
* 33 = EMP Shockwave&lt;br /&gt;
* 34 = Irradiate&lt;br /&gt;
* 35 = Claws (Normal)&lt;br /&gt;
* 36 = Claws (Devouring One)&lt;br /&gt;
* 37 = Claws (Infested Kerrigan)&lt;br /&gt;
* 38 = Needle Spines (Normal)&lt;br /&gt;
* 39 = Needle Spines (Hunter Killer)&lt;br /&gt;
* 40 = Kaiser Blades (Normal)&lt;br /&gt;
* 41 = Kaiser Blades (Torrasque)&lt;br /&gt;
* 42 = Toxic Spores (Broodling)&lt;br /&gt;
* 43 = Spines&lt;br /&gt;
* 44 = Spines (Harvest)&lt;br /&gt;
* 45 = Acid Spray (Unused)&lt;br /&gt;
* 46 = Acid Spore (Normal)&lt;br /&gt;
* 47 = Acid Spore (Kukulza-Guardian)&lt;br /&gt;
* 48 = Glave Wurm (Normal)&lt;br /&gt;
* 49 = Glave Wurm (Kukulza-Mutalisk)&lt;br /&gt;
* 50 = Venom (Unused-Defiler)&lt;br /&gt;
* 51 = Venom (Unused-Defiler Hero)&lt;br /&gt;
* 52 = Seeker Spores&lt;br /&gt;
* 53 = Subterranean Tentacle&lt;br /&gt;
* 54 = Suicide (Infested Terran)&lt;br /&gt;
* 55 = Suicide (Scourge)&lt;br /&gt;
* 56 = Parasite&lt;br /&gt;
* 57 = Spawn Broodlings&lt;br /&gt;
* 58 = Ensnare&lt;br /&gt;
* 59 = Dark Swarm&lt;br /&gt;
* 60 = Plague&lt;br /&gt;
* 61 = Consume&lt;br /&gt;
* 62 = Particle Beam&lt;br /&gt;
* 63 = Particle Beam (Harvest)&lt;br /&gt;
* 64 = Psi Blades (Normal)&lt;br /&gt;
* 65 = Psi Blades (Fenix-Zealot)&lt;br /&gt;
* 66 = Phase Disruptor (Normal)&lt;br /&gt;
* 67 = Phase Disruptor (Fenix-Dragoon)&lt;br /&gt;
* 68 = Psi Assault (Normal-Unused)&lt;br /&gt;
* 69 = Psi Assault (Tassadar+Aldaris)&lt;br /&gt;
* 70 = Psionic Shockwave (Normal)&lt;br /&gt;
* 71 = Psionic Shockwave (Tassadar/Zeratul Archon)&lt;br /&gt;
* 72 = Unknown72&lt;br /&gt;
* 73 = Dual Photon Blasters (Normal)&lt;br /&gt;
* 74 = Anti-matter Missiles (Normal)&lt;br /&gt;
* 75 = Dual Photon Blasters (Mojo)&lt;br /&gt;
* 76 = Anti-matter Missiles (Mojo)&lt;br /&gt;
* 77 = Phase Disruptor Cannon (Normal)&lt;br /&gt;
* 78 = Phase Disruptor Cannon (Danimoth)&lt;br /&gt;
* 79 = Pulse Cannon&lt;br /&gt;
* 80 = STS Photon Cannon&lt;br /&gt;
* 81 = STA Photon Cannon&lt;br /&gt;
* 82 = Scarab&lt;br /&gt;
* 83 = Stasis Field&lt;br /&gt;
* 84 = Psi Storm&lt;br /&gt;
* 85 = Warp Blades (Zeratul)&lt;br /&gt;
* 86 = Warp Blades (Dark Templar Hero)&lt;br /&gt;
* 87 = Missiles (Unused)&lt;br /&gt;
* 88 = Laser Battery1 (Unused)&lt;br /&gt;
* 89 = Tormentor Missiles (Unused)&lt;br /&gt;
* 90 = Bombs (Unused)&lt;br /&gt;
* 91 = Raider Gun (Unused)&lt;br /&gt;
* 92 = Laser Battery2 (Unused)&lt;br /&gt;
* 93 = Laser Battery3 (Unused)&lt;br /&gt;
* 94 = Dual Photon Blasters (Unused)&lt;br /&gt;
* 95 = Flechette Grenade (Unused)&lt;br /&gt;
* 96 = Twin Autocannons (Floor Trap)&lt;br /&gt;
* 97 = Hellfire Missile Pack (Wall Trap)&lt;br /&gt;
* 98 = Flame Thrower (Wall Trap)&lt;br /&gt;
* 99 = Hellfire Missile Pack (Floor Trap)&lt;br /&gt;
* 100 = Neutron Flare&lt;br /&gt;
* 101 = Disruption Web&lt;br /&gt;
* 102 = Restoration&lt;br /&gt;
* 103 = Halo Rockets&lt;br /&gt;
* 104 = Corrosive Acid&lt;br /&gt;
* 105 = Mind Control&lt;br /&gt;
* 106 = Feedback&lt;br /&gt;
* 107 = Optical Flare&lt;br /&gt;
* 108 = Maelstrom&lt;br /&gt;
* 109 = Subterranean Spines&lt;br /&gt;
* 110 = Gauss Rifle0 (Unused)&lt;br /&gt;
* 111 = Warp Blades (Normal)&lt;br /&gt;
* 112 = C-10 Canister Rifle (Samir Duran)&lt;br /&gt;
* 113 = C-10 Canister Rifle (Infested Duran)&lt;br /&gt;
* 114 = Dual Photon Blasters (Artanis)&lt;br /&gt;
* 115 = Anti-matter Missiles (Artanis)&lt;br /&gt;
* 116 = C-10 Canister Rifle (Alexei Stukov)&lt;br /&gt;
* 117 = Gauss Rifle1 (Unused)&lt;br /&gt;
* 118 = Gauss Rifle2 (Unused)&lt;br /&gt;
* 119 = Gauss Rifle3 (Unused)&lt;br /&gt;
* 120 = Gauss Rifle4 (Unused)&lt;br /&gt;
* 121 = Gauss Rifle5 (Unused)&lt;br /&gt;
* 122 = Gauss Rifle6 (Unused)&lt;br /&gt;
* 123 = Gauss Rifle7 (Unused)&lt;br /&gt;
* 124 = Gauss Rifle8 (Unused)&lt;br /&gt;
* 125 = Gauss Rifle9 (Unused)&lt;br /&gt;
* 126 = Gauss Rifle10 (Unused)&lt;br /&gt;
* 127 = Gauss Rifle11 (Unused)&lt;br /&gt;
* 128 = Gauss Rifle12 (Unused)&lt;br /&gt;
* 129 = Gauss Rifle13 (Unused)&lt;br /&gt;
* 130 = None&lt;br /&gt;
&lt;br /&gt;
==Complete Modifier List==&lt;br /&gt;
* 0 = Condition: &amp;gt;= (greater than or equal to)&lt;br /&gt;
* 1 = Condition: &amp;lt;= (less than or equal to)&lt;br /&gt;
* 2 = Condition: == TRUE (Is True)&lt;br /&gt;
* 3 = Condition: == FALSE (Is False)&lt;br /&gt;
* 4 = Action: = TRUE (Set to True)&lt;br /&gt;
* 5 = Action: = FALSE (Set to False)&lt;br /&gt;
* 6 = Action: NOT (toggle)&lt;br /&gt;
* 7 = Action: = (Set to)&lt;br /&gt;
* 8 = Action: += (Add)&lt;br /&gt;
* 9 = Action: -= (Subtract)&lt;br /&gt;
* 10 = Condition: == (Exactly)&lt;br /&gt;
* 11 = Action: Randomize&lt;br /&gt;
&lt;br /&gt;
[[Category:StarCraft]]&lt;br /&gt;
[[Category:Reference]]&lt;/div&gt;</summary>
		<author><name>FaRTy1billion</name></author>	</entry>

	<entry>
		<id>https://staredit.net/wiki/index.php?title=SPK_Format&amp;diff=682</id>
		<title>SPK Format</title>
		<link rel="alternate" type="text/html" href="https://staredit.net/wiki/index.php?title=SPK_Format&amp;diff=682"/>
				<updated>2023-01-26T23:09:19Z</updated>
		
		<summary type="html">&lt;p&gt;FaRTy1billion: Added remaster format&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Contains the star parallax data for the space platform tileset.&lt;br /&gt;
&lt;br /&gt;
The star references are stored backwards, such that Layer 5 is first, then Layer 4, etc. down to Layer 1. This is most evident in the Remaster format, where the first stars reference the last image in star.dds.grp (0,0 with size 11x11, then 11,0 with size 11x11, etc.). It is true in the pre-remastered format as well, but was previously not documented or well understood.&lt;br /&gt;
&lt;br /&gt;
==Header/Bitmap References==&lt;br /&gt;
*'''u16''' - Number of Layers&lt;br /&gt;
*'''u16[n]''' - (1 for each layer) Number of images in each layer&lt;br /&gt;
*1 struct for the total number of images in each layers, starting with the last layer:&lt;br /&gt;
**'''u16''' - Star X Position&lt;br /&gt;
**'''u16''' - Star Y Position&lt;br /&gt;
**'''u32''' - Bitmap Offset&lt;br /&gt;
&lt;br /&gt;
==Bitmap Structure==&lt;br /&gt;
Each is positioned at an offset specified by the Bitmap Offset in the layer image lists. These are not necessarily unique and can be referenced multiple times.&lt;br /&gt;
*'''u16''' - Bitmap Width&lt;br /&gt;
*'''u16''' - Bitmap Height&lt;br /&gt;
*'''u8[n]''' - (width*height bytes) Image Data, gets drawn over black pixels (effectively making 0 = transparent)&lt;br /&gt;
&lt;br /&gt;
==Remaster Format==&lt;br /&gt;
Remastered now has two files, star.dds.grp and star.spk. Star.spk no longer contains any image data, but instead star.dds.grp contains one sprite sheet of star images corresponding to each parallax layer.&lt;br /&gt;
&lt;br /&gt;
*'''u32''' - Number of Layers&lt;br /&gt;
*'''u32''' - Offset to first star reference&lt;br /&gt;
*1 struct for each layer:&lt;br /&gt;
**'''u32''' - Number of images in this layer&lt;br /&gt;
**'''u16''' - Width of parallax layer (648 for SD, 1296 for HD2, 2592 for HD)&lt;br /&gt;
**'''u16''' - Height of parallax layer (488 for SD, 976 for HD2, 1952 for HD)&lt;br /&gt;
*1 struct for each star in each layer, starting with the last layer:&lt;br /&gt;
**'''u16''' - Layer X Position (where it is positioned on screen)&lt;br /&gt;
**'''u16''' - Layer Y Position&lt;br /&gt;
**'''u16''' - DDS X Position (where the source image is positioned in the corresponding layer's star.dds.grp image)&lt;br /&gt;
**'''u16''' - DDS Y Position&lt;br /&gt;
**'''u16''' - Width&lt;br /&gt;
**'''u16''' - Height&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:StarCraft]]&lt;br /&gt;
[[Category:Reference]]&lt;br /&gt;
[[Category:Modding]]&lt;/div&gt;</summary>
		<author><name>FaRTy1billion</name></author>	</entry>

	<entry>
		<id>https://staredit.net/wiki/index.php?title=Terrain_Format&amp;diff=672</id>
		<title>Terrain Format</title>
		<link rel="alternate" type="text/html" href="https://staredit.net/wiki/index.php?title=Terrain_Format&amp;diff=672"/>
				<updated>2022-08-16T22:19:49Z</updated>
		
		<summary type="html">&lt;p&gt;FaRTy1billion: /* CV5 */ removed old text&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Data in the format is read left to right, top to bottom (bitmap pixel locations, minitile locations, etc.). All values are unsigned.&lt;br /&gt;
&lt;br /&gt;
==CV5==&lt;br /&gt;
This file defines the various tile groups that are referenced by the TILE/MTXM sections of the CHK (0x7FF0 for the group index, 0x000F for the tile index).&lt;br /&gt;
&lt;br /&gt;
Struct Size: 52 bytes&lt;br /&gt;
ID Range: 0-2047&lt;br /&gt;
&lt;br /&gt;
For non-doodad tiles:&lt;br /&gt;
* '''u16''' Terrain Type - 0 for unused/unplaceable, 1 for doodads, 2+ for basic terrain and edges&lt;br /&gt;
* '''u16''' Flags - Properties for this group of tiles. These values get copied directly into the activeTileArray flags, except where noted.&lt;br /&gt;
** '''0x0001''' - Walkable ''(gets overwritten by SC based on VF4 flags)''&lt;br /&gt;
** '''0x0002''' - Unknown/Unused&lt;br /&gt;
** '''0x0004''' - Unwalkable ''(gets overwritten by SC based on VF4 flags)''&lt;br /&gt;
** '''0x0008''' - Unknown/Unused&lt;br /&gt;
** '''0x0010''' - Has doodad cover&lt;br /&gt;
** '''0x0020''' - Unknown/Unused&lt;br /&gt;
** '''0x0040''' - Creep (Zerg can build here when this flag is combined with the Temporary creep flag)&lt;br /&gt;
** '''0x0080''' - Unbuildable&lt;br /&gt;
** '''0x0100''' - Blocks view ''(gets overwritten by SC based on VF4 flags)''&lt;br /&gt;
** '''0x0200''' - Mid Ground ''(gets overwritten by SC based on VF4 flags)''&lt;br /&gt;
** '''0x0400''' - High Ground ''(gets overwritten by SC based on VF4 flags)''&lt;br /&gt;
** '''0x0800''' - Occupied (unbuildable until a building on this tile gets removed)&lt;br /&gt;
** '''0x1000''' - Receding creep&lt;br /&gt;
** '''0x2000''' - Cliff edge ''(gets overwritten by SC based on VF4 flags)''&lt;br /&gt;
** '''0x4000''' - Temporary creep (Zerg can build here when this flag is combined with the Creep flag)&lt;br /&gt;
** '''0x8000''' - Allow Beacons/Start Locations to be placeable&lt;br /&gt;
* '''Rect16''' Edge Types - Determines what tile types can be adjacent to tiles in this group. Unsure if StarEdit actually uses these, or if they are just reference/outdated values.&lt;br /&gt;
** '''u16''' Left&lt;br /&gt;
** '''u16''' Up&lt;br /&gt;
** '''u16''' Right&lt;br /&gt;
** '''u16''' Down&lt;br /&gt;
* '''Rect16''' Terrain Piece Type - Determines multi-tile blocks of terrain (e.g. 2x3 cliff pieces). A value of 0 can match any appropriate tile, otherwise the edge only pairs with a matching Terrain Piece Type value and tile index. Unsure if StarEdit actually uses these, or if they are just reference/outdated values.&lt;br /&gt;
** '''u16''' Left - Unknown/unused (always 0)&lt;br /&gt;
** '''u16''' Up&lt;br /&gt;
** '''u16''' Right - Unknown/unused (always 0)&lt;br /&gt;
** '''u16''' Down&lt;br /&gt;
* '''u16[16]''' Tiles - VX4/VF4 MegaTile ID&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For doodad tiles (1024+ in pre-remaster tilesets, but SC:R puts some doodads before that index on some tilesets):&lt;br /&gt;
* '''u16''' Terrain Type - 0 for unused/unplaceable, 1 for doodads, 2+ for basic terrain and edges&lt;br /&gt;
* '''u16''' Flags - Properties for this group of tiles and doodad. Same flags as above, except these with additional meaning:&lt;br /&gt;
** '''0x1000''' - Has Sprites.dat overlay ''(is not cleared by SC, so this flag also counts as Receding creep)''&lt;br /&gt;
** '''0x2000''' - Has Units.dat overlay&lt;br /&gt;
** '''0x4000''' - Overlay is flipped (unused) ''(is not cleared SC, so this flag also counts as Temporary creep)''&lt;br /&gt;
* '''u16''' Overlay ID - Sprites.dat or Units.dat ID, depending on flags&lt;br /&gt;
* '''u16''' SC:R Doodad - Set to 1 on doodads added by SC:R&lt;br /&gt;
* '''u16''' Group String - 1-based stat_txt.tbl string index&lt;br /&gt;
* '''u16''' Unknown/unused (always 0)&lt;br /&gt;
* '''u16''' Doodad ID - dddata.bin index&lt;br /&gt;
* '''u16''' Width - Width in tiles of the doodad&lt;br /&gt;
* '''u16''' Height - Height in tiles of the doodad&lt;br /&gt;
* '''u16''' Unknown/unused (always 0)&lt;br /&gt;
* '''u16[16]''' Tiles - VX4/VF4 MegaTile ID&lt;br /&gt;
&lt;br /&gt;
==VF4==&lt;br /&gt;
MiniTile flags for each MegaTile. Referenced by CV5.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 32 Bytes&lt;br /&gt;
&lt;br /&gt;
ID Range: 0-65535&lt;br /&gt;
&lt;br /&gt;
* '''u16[16]''' - MiniTile Flags:&lt;br /&gt;
** 0x0001 - Walkable&lt;br /&gt;
** 0x0002 - Mid&lt;br /&gt;
** 0x0004 - High (Mid and High unchecked = Low)&lt;br /&gt;
** 0x0008 - Blocks View&lt;br /&gt;
** 0x0010 - Ramp - Appears in the middle of most ramps/stairs&lt;br /&gt;
** Rest unknown/unused&lt;br /&gt;
&lt;br /&gt;
==VX4==&lt;br /&gt;
MiniTile graphic references for each MegaTile. Referenced by CV5.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 32 Bytes&lt;br /&gt;
&lt;br /&gt;
ID Range: 0-65535&lt;br /&gt;
&lt;br /&gt;
* '''u16[16]''' - MiniTile graphics&lt;br /&gt;
** '''Bit 0''' (0x0001) - Horizontally Flipped&lt;br /&gt;
** '''15 Bits''' (0xFFFE) - VR4 ID&lt;br /&gt;
&lt;br /&gt;
==VX4EX==&lt;br /&gt;
Replaces VX4 in SC:Remaster and tileset expanding plugins to allow for more minitiles. Note that SC:R itself does not use this file, it is used by SCMDraft.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 64 Bytes&lt;br /&gt;
&lt;br /&gt;
ID Range: 0-4294967295&lt;br /&gt;
&lt;br /&gt;
* '''u32[16]''' - MiniTile graphics&lt;br /&gt;
** '''Bit 0''' (0x00000001) - Horizontally Flipped&lt;br /&gt;
** '''23 Bits''' (0xFFFFFFFE) - VR4 ID&lt;br /&gt;
&lt;br /&gt;
==VR4==&lt;br /&gt;
Graphical Data for minitiles. Referenced by VX4 or VX4EX.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 64 Bytes&lt;br /&gt;
&lt;br /&gt;
Max ID: 32767 (VX4) or 2147483647 (VX4EX)&lt;br /&gt;
&lt;br /&gt;
* '''u8[8][8]''' - WPE color index&lt;br /&gt;
&lt;br /&gt;
==WPE==&lt;br /&gt;
256-color RGB Palette.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 4 Bytes (entire file is always 1024 bytes).&lt;br /&gt;
&lt;br /&gt;
ID Range: 0-255&lt;br /&gt;
&lt;br /&gt;
* '''u8''' - Red&lt;br /&gt;
* '''u8''' - Green&lt;br /&gt;
* '''u8''' - Blue&lt;br /&gt;
* '''u8''' - Unused&lt;br /&gt;
&lt;br /&gt;
==DDDATA.BIN==&lt;br /&gt;
Doodad placeability. Referenced by CV5.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 512 Bytes (entire file is 256KB).&lt;br /&gt;
&lt;br /&gt;
ID Range: 0-511&lt;br /&gt;
&lt;br /&gt;
* '''u16[256]''' - CV5 Group IDs to determine doodad placeability. Only the first Doodad Width*Height indexes are used for each. A value of 0 is used on null tiles and can be placed anywhere.&lt;br /&gt;
&lt;br /&gt;
[[Category:StarCraft]]&lt;br /&gt;
[[Category:Reference]]&lt;br /&gt;
[[Category:Modding]]&lt;/div&gt;</summary>
		<author><name>FaRTy1billion</name></author>	</entry>

	<entry>
		<id>https://staredit.net/wiki/index.php?title=Color&amp;diff=671</id>
		<title>Color</title>
		<link rel="alternate" type="text/html" href="https://staredit.net/wiki/index.php?title=Color&amp;diff=671"/>
				<updated>2022-08-11T18:31:41Z</updated>
		
		<summary type="html">&lt;p&gt;FaRTy1billion: Added color hex codes and (hopefully) clarified mimic&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Text in StarCraft can be formatted to a certain extent. By placing control characters in front of text, you can modify the way that text is displayed. Most control characters affect '''color''', though some affect alignment. Their effects tend to stop when a line break, word wrap point, or other control character is encountered. Third-party map editors allow mappers to insert these control characters into various places.&lt;br /&gt;
&lt;br /&gt;
==Comprehensive list==&lt;br /&gt;
&lt;br /&gt;
[[File:Colorlistdo6.png‎]] [[File:15ppilt.png‎]]&lt;br /&gt;
&lt;br /&gt;
==In-game formatting==&lt;br /&gt;
&lt;br /&gt;
These are the control characters in-game. They affect all in-game text, including Mission Objectives. Notably, the &amp;quot;Grey&amp;quot; and &amp;quot;Invisible&amp;quot; characters will override all subsequent control characters until their effects are stopped by a line break.&lt;br /&gt;
&lt;br /&gt;
Line breaks do not stop control characters in Mission Objectives. Among other things, this means that invisible and grey control characters in Mission Objectives will affect all text that comes after them, up to the end of the string.&lt;br /&gt;
&lt;br /&gt;
Mimic color is initialized to the default blue color (2), and every time the text color is changed the current text color is saved. E.g. In &amp;quot;&amp;lt;3&amp;gt;Hello &amp;lt;4&amp;gt;World &amp;lt;1&amp;gt;!!&amp;quot; the &amp;quot;!!&amp;quot; would be yellow, because yellow was saved as the mimic color when &amp;lt;4&amp;gt; changed the color. The color itself is saved and not the control character used, so &amp;quot;&amp;lt;3&amp;gt;Y&amp;lt;4&amp;gt;W&amp;lt;1&amp;gt;Y&amp;lt;4&amp;gt;W&amp;lt;1&amp;gt;Y&amp;quot; would alternate yellow and white and &amp;quot;&amp;lt;6&amp;gt;R&amp;lt;4&amp;gt;W&amp;lt;1&amp;gt;R&amp;lt;4&amp;gt;W&amp;lt;1&amp;gt;R&amp;quot; would alternate red and white.&lt;br /&gt;
&lt;br /&gt;
 0x01 - Mimic&lt;br /&gt;
 0x02 - Cyan (#B8B8E8)&lt;br /&gt;
 0x03 - Yellow (#DCDC3C)&lt;br /&gt;
 0x04 - White (#FFFFFF)&lt;br /&gt;
 0x05 - Grey (#847474)&lt;br /&gt;
 0x06 - Red (#C81818)&lt;br /&gt;
 0x07 - Green (#10FC18)&lt;br /&gt;
 0x08 - Red (P1, #F40404)&lt;br /&gt;
 0x09 - Tab&lt;br /&gt;
 0x0A - Newline&lt;br /&gt;
 0x0B - Invisible&lt;br /&gt;
 0x0C - Remove beyond (large font), newline (small font)&lt;br /&gt;
 0x0E - Blue (P2, #0C48CC)&lt;br /&gt;
 0x0F - Teal (P3, #2CB494)&lt;br /&gt;
 0x10 - Purple (P4, #88409C)&lt;br /&gt;
 0x11 - Orange (P5, #F88C14)&lt;br /&gt;
 0x12 - Right Align&lt;br /&gt;
 0x13 - Center Align&lt;br /&gt;
 0x14 - Invisible&lt;br /&gt;
 0x15 - Brown (P6, #703014)&lt;br /&gt;
 0x16 - White (P7, #CCE0D0)&lt;br /&gt;
 0x17 - Yellow (P8, #FCFC38)&lt;br /&gt;
 0x18 - Green (P9, #088008)&lt;br /&gt;
 0x19 - Brighter Yellow (P10, #FCFC7C)&lt;br /&gt;
 0x1A - Nothing (does not change color, does not do anything)&lt;br /&gt;
 0x1B - Pinkish (P11, #ECC4B0)&lt;br /&gt;
 0x1C - Dark Cyan (P12, #4068D4)&lt;br /&gt;
 0x1D - Greygreen (#74A47C)&lt;br /&gt;
 0x1E - Bluegrey (#9090B8)&lt;br /&gt;
 0x1F - Turquoise (#00E4FC)&lt;br /&gt;
&lt;br /&gt;
==Menu formatting==&lt;br /&gt;
&lt;br /&gt;
These control characters are for the pregame lobby. Note that due to patch 1.14, alignment characters and line breaks in map titles make games unjoinable, and no control codes function in Force names.&lt;br /&gt;
&lt;br /&gt;
 0x01 - Mimic&lt;br /&gt;
 0x02 - Cyan (#A4B4F8)&lt;br /&gt;
 0x03 - Green (#4CC428)&lt;br /&gt;
 0x04 - Light Green (#B4FC74)&lt;br /&gt;
 0x05 - Grey (#585858)&lt;br /&gt;
 0x06 - White (#FFFFFF)&lt;br /&gt;
 0x07 - Red (#FC0000)&lt;br /&gt;
 0x08 - Black*&lt;br /&gt;
 0x09 - Tab&lt;br /&gt;
 0x0A - Newline&lt;br /&gt;
 0x0B - Invisible&lt;br /&gt;
 0x0C - Remove beyond&lt;br /&gt;
 0x0E - Black*&lt;br /&gt;
 0x0F - Black*&lt;br /&gt;
 0x10 - Black*&lt;br /&gt;
 0x11 - Black*&lt;br /&gt;
 0x12 - Right Align&lt;br /&gt;
 0x13 - Center Align&lt;br /&gt;
 0x14 - Invisible&lt;br /&gt;
 0x15 - Black*&lt;br /&gt;
 0x16 - Black*&lt;br /&gt;
 0x17 - Black*&lt;br /&gt;
 0x18 - Black*&lt;br /&gt;
 0x19 - Black*&lt;br /&gt;
 0x1A - Nothing (does not change color, does not do anything)&lt;br /&gt;
 0x1B - Black*&lt;br /&gt;
 0x1C - Black*&lt;br /&gt;
&lt;br /&gt;
* Black colors are technically a buffer overflow, and may therefore appear as colors other than black.&lt;br /&gt;
&lt;br /&gt;
==Third-party map editors==&lt;br /&gt;
&lt;br /&gt;
Though third-party map editors support the insertion of control codes, their implementations vary. X-tra Edit shows the characters next to text windows; they must be copied and pasted into fields manually. [[StarForge]] uses buttons to insert the characters. [[SCMDraft 2]] uses small codes consisting of the control character's hex code (such as 0E) wrapped in angle brackets (&amp;lt;0E&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
==Extended player colors==&lt;br /&gt;
&lt;br /&gt;
In addition to text colors, some third-party map editors allow the use of abnormal player colors in maps. SCMDraft 2's implementation is particularly easy; simply type a number into the player color fields, instead of selecting a color name.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, these color palettes vary between patches and operating systems (because they're technically not color palettes at all; they're random data that the game is being tricked into reading as color palettes). Because of this variability, programs have been made that allow mappers to preview and save colors. One such utility is PColor [http://www.staredit.net/files/464/], by FaRTy1billion. PColor allows mappers to choose a unit, a tileset, and a player color. It then displays what that unit will look like when the map is played with the currently installed version of StarCraft. Another utility (with fewer features) is Colors 1.14 [http://www.staredit.net/files/256/], which allows a color to be picked, copied, and pasted into SCMDraft 2 and StarForge.&lt;br /&gt;
&lt;br /&gt;
One of the most popular extended player colors is black. However, due to differences in how these colors look on different operating systems, nearly all black colors will only appear black for some players, while appearing as a broken color for many other players.&lt;br /&gt;
&lt;br /&gt;
The player color 138 is the only known color which appears as a perfect black across all operating systems.&lt;br /&gt;
&lt;br /&gt;
[[Category:StarCraft]]&lt;br /&gt;
[[Category:Reference]]&lt;/div&gt;</summary>
		<author><name>FaRTy1billion</name></author>	</entry>

	<entry>
		<id>https://staredit.net/wiki/index.php?title=Terrain_Format&amp;diff=670</id>
		<title>Terrain Format</title>
		<link rel="alternate" type="text/html" href="https://staredit.net/wiki/index.php?title=Terrain_Format&amp;diff=670"/>
				<updated>2022-08-09T07:10:47Z</updated>
		
		<summary type="html">&lt;p&gt;FaRTy1billion: /* CV5 */ updated flag descriptions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Data in the format is read left to right, top to bottom (bitmap pixel locations, minitile locations, etc.). All values are unsigned.&lt;br /&gt;
&lt;br /&gt;
==CV5==&lt;br /&gt;
This file defines the various tile groups that are referenced by the TILE/MTXM sections of the CHK (0x7FF0 for the group index, 0x000F for the tile index).&lt;br /&gt;
&lt;br /&gt;
Struct Size: 52 bytes&lt;br /&gt;
ID Range: 0-2047&lt;br /&gt;
&lt;br /&gt;
For non-doodad tiles:&lt;br /&gt;
* '''u16''' Terrain Type - 0 for unused/unplaceable, 1 for doodads, 2+ for basic terrain and edges&lt;br /&gt;
* '''u16''' Flags - Properties for this group of tiles. These values get copied directly into the activeTileArray flags, except where noted.&lt;br /&gt;
** '''0x0001''' - Walkable ''(gets overwritten by SC based on VF4 flags)''&lt;br /&gt;
** '''0x0002''' - Unknown/Unused&lt;br /&gt;
** '''0x0004''' - Unwalkable ''(gets overwritten by SC based on VF4 flags)''&lt;br /&gt;
** '''0x0008''' - Unknown/Unused&lt;br /&gt;
** '''0x0010''' - Has doodad cover&lt;br /&gt;
** '''0x0020''' - Unknown/Unused&lt;br /&gt;
** '''0x0040''' - Creep (Zerg can build here when this flag is combined with the Temporary creep flag)&lt;br /&gt;
** '''0x0080''' - Unbuildable&lt;br /&gt;
** '''0x0100''' - Blocks view ''(gets overwritten by SC based on VF4 flags)''&lt;br /&gt;
** '''0x0200''' - Mid Ground ''(gets overwritten by SC based on VF4 flags)''&lt;br /&gt;
** '''0x0400''' - High Ground ''(gets overwritten by SC based on VF4 flags)''&lt;br /&gt;
** '''0x0800''' - Occupied (unbuildable until a building on this tile gets removed)&lt;br /&gt;
** '''0x1000''' - Receding creep&lt;br /&gt;
** '''0x2000''' - Cliff edge ''(gets overwritten by SC based on VF4 flags)''&lt;br /&gt;
** '''0x4000''' - Temporary creep (Zerg can build here when this flag is combined with the Creep flag)&lt;br /&gt;
** '''0x8000''' - Allow Beacons/Start Locations to be placeable&lt;br /&gt;
* '''Rect16''' Edge Types - Determines what tile types can be adjacent to tiles in this group. Unsure if StarEdit actually uses these, or if they are just reference/outdated values.&lt;br /&gt;
** '''u16''' Left&lt;br /&gt;
** '''u16''' Up&lt;br /&gt;
** '''u16''' Right&lt;br /&gt;
** '''u16''' Down&lt;br /&gt;
* '''Rect16''' Terrain Piece Type - Determines multi-tile blocks of terrain (e.g. 2x3 cliff pieces). A value of 0 can match any appropriate tile, otherwise the edge only pairs with a matching Terrain Piece Type value and tile index. Unsure if StarEdit actually uses these, or if they are just reference/outdated values.&lt;br /&gt;
** '''u16''' Left - Unknown/unused (always 0)&lt;br /&gt;
** '''u16''' Up&lt;br /&gt;
** '''u16''' Right - Unknown/unused (always 0)&lt;br /&gt;
** '''u16''' Down&lt;br /&gt;
* '''u16[16]''' Tiles - VX4/VF4 MegaTile ID&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For doodad tiles (1024+ in pre-remaster tilesets, but SC:R puts some doodads before that index on some tilesets):&lt;br /&gt;
* '''u16''' Terrain Type - 0 for unused/unplaceable, 1 for doodads, 2+ for basic terrain and edges&lt;br /&gt;
* '''u16''' Flags - Properties for this group of tiles and doodad. Same flags as above, except these with additional meaning:&lt;br /&gt;
** '''0x1000''' - Has Sprites.dat overlay ''(is not cleared by SC, so this flag also counts as Receding creep)''&lt;br /&gt;
** '''0x2000''' - Has Units.dat overlay&lt;br /&gt;
** '''0x4000''' - Overlay is flipped (unused) ''(is not cleared SC, so this flag also counts as Temporary creep)''&lt;br /&gt;
* '''u16''' Overlay ID - Sprites.dat or Units.dat ID, depending on flags&lt;br /&gt;
* '''u16''' SC:R Doodad - Set to 1 on doodads added by SC:R&lt;br /&gt;
* '''u16''' Group String - 1-based stat_txt.tbl string index&lt;br /&gt;
* '''u16''' Unknown/unused (always 0)&lt;br /&gt;
* '''u16''' Doodad ID - dddata.bin index&lt;br /&gt;
* '''u16''' Width - Width in tiles of the doodad&lt;br /&gt;
* '''u16''' Height - Height in tiles of the doodad&lt;br /&gt;
* '''u16''' Unknown/unused (always 0)&lt;br /&gt;
* '''u16[16]''' Tiles - VX4/VF4 MegaTile ID&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Flag Values (some flags appear to be unused/outdated, while others appear to be used internally by StarCraft. These values have been italicized):&lt;br /&gt;
&lt;br /&gt;
==VF4==&lt;br /&gt;
MiniTile flags for each MegaTile. Referenced by CV5.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 32 Bytes&lt;br /&gt;
&lt;br /&gt;
ID Range: 0-65535&lt;br /&gt;
&lt;br /&gt;
* '''u16[16]''' - MiniTile Flags:&lt;br /&gt;
** 0x0001 - Walkable&lt;br /&gt;
** 0x0002 - Mid&lt;br /&gt;
** 0x0004 - High (Mid and High unchecked = Low)&lt;br /&gt;
** 0x0008 - Blocks View&lt;br /&gt;
** 0x0010 - Ramp - Appears in the middle of most ramps/stairs&lt;br /&gt;
** Rest unknown/unused&lt;br /&gt;
&lt;br /&gt;
==VX4==&lt;br /&gt;
MiniTile graphic references for each MegaTile. Referenced by CV5.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 32 Bytes&lt;br /&gt;
&lt;br /&gt;
ID Range: 0-65535&lt;br /&gt;
&lt;br /&gt;
* '''u16[16]''' - MiniTile graphics&lt;br /&gt;
** '''Bit 0''' (0x0001) - Horizontally Flipped&lt;br /&gt;
** '''15 Bits''' (0xFFFE) - VR4 ID&lt;br /&gt;
&lt;br /&gt;
==VX4EX==&lt;br /&gt;
Replaces VX4 in SC:Remaster and tileset expanding plugins to allow for more minitiles. Note that SC:R itself does not use this file, it is used by SCMDraft.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 64 Bytes&lt;br /&gt;
&lt;br /&gt;
ID Range: 0-4294967295&lt;br /&gt;
&lt;br /&gt;
* '''u32[16]''' - MiniTile graphics&lt;br /&gt;
** '''Bit 0''' (0x00000001) - Horizontally Flipped&lt;br /&gt;
** '''23 Bits''' (0xFFFFFFFE) - VR4 ID&lt;br /&gt;
&lt;br /&gt;
==VR4==&lt;br /&gt;
Graphical Data for minitiles. Referenced by VX4 or VX4EX.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 64 Bytes&lt;br /&gt;
&lt;br /&gt;
Max ID: 32767 (VX4) or 2147483647 (VX4EX)&lt;br /&gt;
&lt;br /&gt;
* '''u8[8][8]''' - WPE color index&lt;br /&gt;
&lt;br /&gt;
==WPE==&lt;br /&gt;
256-color RGB Palette.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 4 Bytes (entire file is always 1024 bytes).&lt;br /&gt;
&lt;br /&gt;
ID Range: 0-255&lt;br /&gt;
&lt;br /&gt;
* '''u8''' - Red&lt;br /&gt;
* '''u8''' - Green&lt;br /&gt;
* '''u8''' - Blue&lt;br /&gt;
* '''u8''' - Unused&lt;br /&gt;
&lt;br /&gt;
==DDDATA.BIN==&lt;br /&gt;
Doodad placeability. Referenced by CV5.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 512 Bytes (entire file is 256KB).&lt;br /&gt;
&lt;br /&gt;
ID Range: 0-511&lt;br /&gt;
&lt;br /&gt;
* '''u16[256]''' - CV5 Group IDs to determine doodad placeability. Only the first Doodad Width*Height indexes are used for each. A value of 0 is used on null tiles and can be placed anywhere.&lt;br /&gt;
&lt;br /&gt;
[[Category:StarCraft]]&lt;br /&gt;
[[Category:Reference]]&lt;br /&gt;
[[Category:Modding]]&lt;/div&gt;</summary>
		<author><name>FaRTy1billion</name></author>	</entry>

	<entry>
		<id>https://staredit.net/wiki/index.php?title=Terrain_Format&amp;diff=669</id>
		<title>Terrain Format</title>
		<link rel="alternate" type="text/html" href="https://staredit.net/wiki/index.php?title=Terrain_Format&amp;diff=669"/>
				<updated>2022-08-09T05:42:59Z</updated>
		
		<summary type="html">&lt;p&gt;FaRTy1billion: /* VF4 */ fixed formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Data in the format is read left to right, top to bottom (bitmap pixel locations, minitile locations, etc.). All values are unsigned.&lt;br /&gt;
&lt;br /&gt;
==CV5==&lt;br /&gt;
This file defines the various tile groups that are referenced by the TILE/MTXM sections of the CHK (0x7FF0 for the group index, 0x000F for the tile index).&lt;br /&gt;
&lt;br /&gt;
Struct Size: 52 bytes&lt;br /&gt;
ID Range: 0-2047&lt;br /&gt;
&lt;br /&gt;
For non-doodad tiles:&lt;br /&gt;
* '''u16''' Terrain Type - 0 for unused/unplaceable, 1 for doodads, 2+ for basic terrain and edges&lt;br /&gt;
* '''u16''' Flags - Properties for this group of tiles&lt;br /&gt;
* '''Rect16''' Edge Types - Determines what tile types can be adjacent to tiles in this group. Unsure if StarEdit actually uses these, or if they are just reference/outdated values.&lt;br /&gt;
** '''u16''' Left&lt;br /&gt;
** '''u16''' Up&lt;br /&gt;
** '''u16''' Right&lt;br /&gt;
** '''u16''' Down&lt;br /&gt;
* '''Rect16''' Terrain Piece Type - Determines multi-tile blocks of terrain (e.g. 2x3 cliff pieces). A value of 0 can match any appropriate tile, otherwise the edge only pairs with a matching Terrain Piece Type value and tile index. Unsure if StarEdit actually uses these, or if they are just reference/outdated values.&lt;br /&gt;
** '''u16''' Left - Unknown/unused (always 0)&lt;br /&gt;
** '''u16''' Up&lt;br /&gt;
** '''u16''' Right - Unknown/unused (always 0)&lt;br /&gt;
** '''u16''' Down&lt;br /&gt;
* '''u16[16]''' Tiles - VX4/VF4 MegaTile ID&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For doodad tiles (1024+ in pre-remaster tilesets, but SC:R puts some doodads before that index on some tilesets):&lt;br /&gt;
* '''u16''' Terrain Type - 0 for unused/unplaceable, 1 for doodads, 2+ for basic terrain and edges&lt;br /&gt;
* '''u16''' Flags - Properties for this group of tiles and doodad&lt;br /&gt;
* '''u16''' Overlay ID - Sprites.dat or Units.dat ID, depending on flags&lt;br /&gt;
* '''u16''' SC:R Doodad - Set to 1 on doodads added by SC:R&lt;br /&gt;
* '''u16''' Group String - 1-based stat_txt.tbl string index&lt;br /&gt;
* '''u16''' Unknown/unused (always 0)&lt;br /&gt;
* '''u16''' Doodad ID - dddata.bin index&lt;br /&gt;
* '''u16''' Width - Width in tiles of the doodad&lt;br /&gt;
* '''u16''' Height - Height in tiles of the doodad&lt;br /&gt;
* '''u16''' Unknown/unused (always 0)&lt;br /&gt;
* '''u16[16]''' Tiles - VX4/VF4 MegaTile ID&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Flag Values (some flags appear to be unused/outdated, while others appear to be used internally by StarCraft. These values have been italicized):&lt;br /&gt;
* '''0x0001''' - ''(Generally) buildable and/or passable terrain types?''&lt;br /&gt;
* '''0x0002''' - ''Unknown/Unused''&lt;br /&gt;
* '''0x0004''' - ''Impassable terrain types?''&lt;br /&gt;
* '''0x0008''' - ''Unknown/Unused''&lt;br /&gt;
* '''0x0010''' - ''Trees?''&lt;br /&gt;
* '''0x0020''' - ''Unknown/Unused''&lt;br /&gt;
* '''0x0040''' - Creep (unbuildable for non-creep buildings)&lt;br /&gt;
* '''0x0080''' - Unbuildable&lt;br /&gt;
* '''0x0100''' - ''Objects/Rocks/Trees?''&lt;br /&gt;
* '''0x0200''' - ''Mid Ground (deprecated? some values are incorrect)''&lt;br /&gt;
* '''0x0400''' - ''High Ground (deprecated? some values are incorrect)''&lt;br /&gt;
* '''0x0800''' - ''Unknown/Unused''&lt;br /&gt;
* '''0x1000''' - Has Sprites.dat overlay&lt;br /&gt;
* '''0x2000''' - Has Units.dat overlay&lt;br /&gt;
* '''0x4000''' - ''Overlay is flipped (unused)''&lt;br /&gt;
* '''0x8000''' - Allow Beacons/Start Locations to be placeable&lt;br /&gt;
&lt;br /&gt;
==VF4==&lt;br /&gt;
MiniTile flags for each MegaTile. Referenced by CV5.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 32 Bytes&lt;br /&gt;
&lt;br /&gt;
ID Range: 0-65535&lt;br /&gt;
&lt;br /&gt;
* '''u16[16]''' - MiniTile Flags:&lt;br /&gt;
** 0x0001 - Walkable&lt;br /&gt;
** 0x0002 - Mid&lt;br /&gt;
** 0x0004 - High (Mid and High unchecked = Low)&lt;br /&gt;
** 0x0008 - Blocks View&lt;br /&gt;
** 0x0010 - Ramp - Appears in the middle of most ramps/stairs&lt;br /&gt;
** Rest unknown/unused&lt;br /&gt;
&lt;br /&gt;
==VX4==&lt;br /&gt;
MiniTile graphic references for each MegaTile. Referenced by CV5.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 32 Bytes&lt;br /&gt;
&lt;br /&gt;
ID Range: 0-65535&lt;br /&gt;
&lt;br /&gt;
* '''u16[16]''' - MiniTile graphics&lt;br /&gt;
** '''Bit 0''' (0x0001) - Horizontally Flipped&lt;br /&gt;
** '''15 Bits''' (0xFFFE) - VR4 ID&lt;br /&gt;
&lt;br /&gt;
==VX4EX==&lt;br /&gt;
Replaces VX4 in SC:Remaster and tileset expanding plugins to allow for more minitiles. Note that SC:R itself does not use this file, it is used by SCMDraft.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 64 Bytes&lt;br /&gt;
&lt;br /&gt;
ID Range: 0-4294967295&lt;br /&gt;
&lt;br /&gt;
* '''u32[16]''' - MiniTile graphics&lt;br /&gt;
** '''Bit 0''' (0x00000001) - Horizontally Flipped&lt;br /&gt;
** '''23 Bits''' (0xFFFFFFFE) - VR4 ID&lt;br /&gt;
&lt;br /&gt;
==VR4==&lt;br /&gt;
Graphical Data for minitiles. Referenced by VX4 or VX4EX.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 64 Bytes&lt;br /&gt;
&lt;br /&gt;
Max ID: 32767 (VX4) or 2147483647 (VX4EX)&lt;br /&gt;
&lt;br /&gt;
* '''u8[8][8]''' - WPE color index&lt;br /&gt;
&lt;br /&gt;
==WPE==&lt;br /&gt;
256-color RGB Palette.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 4 Bytes (entire file is always 1024 bytes).&lt;br /&gt;
&lt;br /&gt;
ID Range: 0-255&lt;br /&gt;
&lt;br /&gt;
* '''u8''' - Red&lt;br /&gt;
* '''u8''' - Green&lt;br /&gt;
* '''u8''' - Blue&lt;br /&gt;
* '''u8''' - Unused&lt;br /&gt;
&lt;br /&gt;
==DDDATA.BIN==&lt;br /&gt;
Doodad placeability. Referenced by CV5.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 512 Bytes (entire file is 256KB).&lt;br /&gt;
&lt;br /&gt;
ID Range: 0-511&lt;br /&gt;
&lt;br /&gt;
* '''u16[256]''' - CV5 Group IDs to determine doodad placeability. Only the first Doodad Width*Height indexes are used for each. A value of 0 is used on null tiles and can be placed anywhere.&lt;br /&gt;
&lt;br /&gt;
[[Category:StarCraft]]&lt;br /&gt;
[[Category:Reference]]&lt;br /&gt;
[[Category:Modding]]&lt;/div&gt;</summary>
		<author><name>FaRTy1billion</name></author>	</entry>

	<entry>
		<id>https://staredit.net/wiki/index.php?title=Terrain_Format&amp;diff=668</id>
		<title>Terrain Format</title>
		<link rel="alternate" type="text/html" href="https://staredit.net/wiki/index.php?title=Terrain_Format&amp;diff=668"/>
				<updated>2022-08-09T03:25:26Z</updated>
		
		<summary type="html">&lt;p&gt;FaRTy1billion: changed instances of the word &amp;quot;reference&amp;quot; to &amp;quot;ID&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Data in the format is read left to right, top to bottom (bitmap pixel locations, minitile locations, etc.). All values are unsigned.&lt;br /&gt;
&lt;br /&gt;
==CV5==&lt;br /&gt;
This file defines the various tile groups that are referenced by the TILE/MTXM sections of the CHK (0x7FF0 for the group index, 0x000F for the tile index).&lt;br /&gt;
&lt;br /&gt;
Struct Size: 52 bytes&lt;br /&gt;
ID Range: 0-2047&lt;br /&gt;
&lt;br /&gt;
For non-doodad tiles:&lt;br /&gt;
* '''u16''' Terrain Type - 0 for unused/unplaceable, 1 for doodads, 2+ for basic terrain and edges&lt;br /&gt;
* '''u16''' Flags - Properties for this group of tiles&lt;br /&gt;
* '''Rect16''' Edge Types - Determines what tile types can be adjacent to tiles in this group. Unsure if StarEdit actually uses these, or if they are just reference/outdated values.&lt;br /&gt;
** '''u16''' Left&lt;br /&gt;
** '''u16''' Up&lt;br /&gt;
** '''u16''' Right&lt;br /&gt;
** '''u16''' Down&lt;br /&gt;
* '''Rect16''' Terrain Piece Type - Determines multi-tile blocks of terrain (e.g. 2x3 cliff pieces). A value of 0 can match any appropriate tile, otherwise the edge only pairs with a matching Terrain Piece Type value and tile index. Unsure if StarEdit actually uses these, or if they are just reference/outdated values.&lt;br /&gt;
** '''u16''' Left - Unknown/unused (always 0)&lt;br /&gt;
** '''u16''' Up&lt;br /&gt;
** '''u16''' Right - Unknown/unused (always 0)&lt;br /&gt;
** '''u16''' Down&lt;br /&gt;
* '''u16[16]''' Tiles - VX4/VF4 MegaTile ID&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For doodad tiles (1024+ in pre-remaster tilesets, but SC:R puts some doodads before that index on some tilesets):&lt;br /&gt;
* '''u16''' Terrain Type - 0 for unused/unplaceable, 1 for doodads, 2+ for basic terrain and edges&lt;br /&gt;
* '''u16''' Flags - Properties for this group of tiles and doodad&lt;br /&gt;
* '''u16''' Overlay ID - Sprites.dat or Units.dat ID, depending on flags&lt;br /&gt;
* '''u16''' SC:R Doodad - Set to 1 on doodads added by SC:R&lt;br /&gt;
* '''u16''' Group String - 1-based stat_txt.tbl string index&lt;br /&gt;
* '''u16''' Unknown/unused (always 0)&lt;br /&gt;
* '''u16''' Doodad ID - dddata.bin index&lt;br /&gt;
* '''u16''' Width - Width in tiles of the doodad&lt;br /&gt;
* '''u16''' Height - Height in tiles of the doodad&lt;br /&gt;
* '''u16''' Unknown/unused (always 0)&lt;br /&gt;
* '''u16[16]''' Tiles - VX4/VF4 MegaTile ID&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Flag Values (some flags appear to be unused/outdated, while others appear to be used internally by StarCraft. These values have been italicized):&lt;br /&gt;
* '''0x0001''' - ''(Generally) buildable and/or passable terrain types?''&lt;br /&gt;
* '''0x0002''' - ''Unknown/Unused''&lt;br /&gt;
* '''0x0004''' - ''Impassable terrain types?''&lt;br /&gt;
* '''0x0008''' - ''Unknown/Unused''&lt;br /&gt;
* '''0x0010''' - ''Trees?''&lt;br /&gt;
* '''0x0020''' - ''Unknown/Unused''&lt;br /&gt;
* '''0x0040''' - Creep (unbuildable for non-creep buildings)&lt;br /&gt;
* '''0x0080''' - Unbuildable&lt;br /&gt;
* '''0x0100''' - ''Objects/Rocks/Trees?''&lt;br /&gt;
* '''0x0200''' - ''Mid Ground (deprecated? some values are incorrect)''&lt;br /&gt;
* '''0x0400''' - ''High Ground (deprecated? some values are incorrect)''&lt;br /&gt;
* '''0x0800''' - ''Unknown/Unused''&lt;br /&gt;
* '''0x1000''' - Has Sprites.dat overlay&lt;br /&gt;
* '''0x2000''' - Has Units.dat overlay&lt;br /&gt;
* '''0x4000''' - ''Overlay is flipped (unused)''&lt;br /&gt;
* '''0x8000''' - Allow Beacons/Start Locations to be placeable&lt;br /&gt;
&lt;br /&gt;
==VF4==&lt;br /&gt;
MiniTile flags for each MegaTile. Referenced by CV5.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 32 Bytes&lt;br /&gt;
&lt;br /&gt;
ID Range: 0-65535&lt;br /&gt;
&lt;br /&gt;
* '''u16[16]``` - MiniTile Flags:&lt;br /&gt;
** 0x0001 - Walkable&lt;br /&gt;
** 0x0002 - Mid&lt;br /&gt;
** 0x0004 - High (Mid and High unchecked = Low)&lt;br /&gt;
** 0x0008 - Blocks View&lt;br /&gt;
** 0x0010 - Ramp - Appears in the middle of most ramps/stairs&lt;br /&gt;
** Rest unknown/unused&lt;br /&gt;
&lt;br /&gt;
==VX4==&lt;br /&gt;
MiniTile graphic references for each MegaTile. Referenced by CV5.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 32 Bytes&lt;br /&gt;
&lt;br /&gt;
ID Range: 0-65535&lt;br /&gt;
&lt;br /&gt;
* '''u16[16]''' - MiniTile graphics&lt;br /&gt;
** '''Bit 0''' (0x0001) - Horizontally Flipped&lt;br /&gt;
** '''15 Bits''' (0xFFFE) - VR4 ID&lt;br /&gt;
&lt;br /&gt;
==VX4EX==&lt;br /&gt;
Replaces VX4 in SC:Remaster and tileset expanding plugins to allow for more minitiles. Note that SC:R itself does not use this file, it is used by SCMDraft.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 64 Bytes&lt;br /&gt;
&lt;br /&gt;
ID Range: 0-4294967295&lt;br /&gt;
&lt;br /&gt;
* '''u32[16]''' - MiniTile graphics&lt;br /&gt;
** '''Bit 0''' (0x00000001) - Horizontally Flipped&lt;br /&gt;
** '''23 Bits''' (0xFFFFFFFE) - VR4 ID&lt;br /&gt;
&lt;br /&gt;
==VR4==&lt;br /&gt;
Graphical Data for minitiles. Referenced by VX4 or VX4EX.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 64 Bytes&lt;br /&gt;
&lt;br /&gt;
Max ID: 32767 (VX4) or 2147483647 (VX4EX)&lt;br /&gt;
&lt;br /&gt;
* '''u8[8][8]''' - WPE color index&lt;br /&gt;
&lt;br /&gt;
==WPE==&lt;br /&gt;
256-color RGB Palette.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 4 Bytes (entire file is always 1024 bytes).&lt;br /&gt;
&lt;br /&gt;
ID Range: 0-255&lt;br /&gt;
&lt;br /&gt;
* '''u8''' - Red&lt;br /&gt;
* '''u8''' - Green&lt;br /&gt;
* '''u8''' - Blue&lt;br /&gt;
* '''u8''' - Unused&lt;br /&gt;
&lt;br /&gt;
==DDDATA.BIN==&lt;br /&gt;
Doodad placeability. Referenced by CV5.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 512 Bytes (entire file is 256KB).&lt;br /&gt;
&lt;br /&gt;
ID Range: 0-511&lt;br /&gt;
&lt;br /&gt;
* '''u16[256]''' - CV5 Group IDs to determine doodad placeability. Only the first Doodad Width*Height indexes are used for each. A value of 0 is used on null tiles and can be placed anywhere.&lt;br /&gt;
&lt;br /&gt;
[[Category:StarCraft]]&lt;br /&gt;
[[Category:Reference]]&lt;br /&gt;
[[Category:Modding]]&lt;/div&gt;</summary>
		<author><name>FaRTy1billion</name></author>	</entry>

	<entry>
		<id>https://staredit.net/wiki/index.php?title=Terrain_Format&amp;diff=667</id>
		<title>Terrain Format</title>
		<link rel="alternate" type="text/html" href="https://staredit.net/wiki/index.php?title=Terrain_Format&amp;diff=667"/>
				<updated>2022-08-09T03:17:59Z</updated>
		
		<summary type="html">&lt;p&gt;FaRTy1billion: /* VX4EX */ fixed number and removed unnecessary newline&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Data in the format is read left to right, top to bottom (bitmap pixel locations, minitile locations, etc.). All values are unsigned.&lt;br /&gt;
&lt;br /&gt;
==CV5==&lt;br /&gt;
This file defines the various tile groups that are referenced by the TILE/MTXM sections of the CHK (0x7FF0 for the group index, 0x000F for the tile index).&lt;br /&gt;
&lt;br /&gt;
Struct Size: 52 bytes&lt;br /&gt;
ID Range: 0-2047&lt;br /&gt;
&lt;br /&gt;
For non-doodad tiles:&lt;br /&gt;
* '''u16''' Terrain Type - 0 for unused/unplaceable, 1 for doodads, 2+ for basic terrain and edges&lt;br /&gt;
* '''u16''' Flags - Properties for this group of tiles&lt;br /&gt;
* '''Rect16''' Edge Types - Determines what tile types can be adjacent to tiles in this group. Unsure if StarEdit actually uses these, or if they are just reference/outdated values.&lt;br /&gt;
** '''u16''' Left&lt;br /&gt;
** '''u16''' Up&lt;br /&gt;
** '''u16''' Right&lt;br /&gt;
** '''u16''' Down&lt;br /&gt;
* '''Rect16''' Terrain Piece Type - Determines multi-tile blocks of terrain (e.g. 2x3 cliff pieces). A value of 0 can match any appropriate tile, otherwise the edge only pairs with a matching Terrain Piece Type value and tile index. Unsure if StarEdit actually uses these, or if they are just reference/outdated values.&lt;br /&gt;
** '''u16''' Left - Unknown/unused (always 0)&lt;br /&gt;
** '''u16''' Up&lt;br /&gt;
** '''u16''' Right - Unknown/unused (always 0)&lt;br /&gt;
** '''u16''' Down&lt;br /&gt;
* '''u16[16]''' Tiles - VX4/VF4 MegaTile reference&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For doodad tiles (1024+ in pre-remaster tilesets, but SC:R puts some doodads before that index on some tilesets):&lt;br /&gt;
* '''u16''' Terrain Type - 0 for unused/unplaceable, 1 for doodads, 2+ for basic terrain and edges&lt;br /&gt;
* '''u16''' Flags - Properties for this group of tiles and doodad&lt;br /&gt;
* '''u16''' Overlay ID - Sprites.dat or Units.dat ID, depending on flags&lt;br /&gt;
* '''u16''' SC:R Doodad - Set to 1 on doodads added by SC:R&lt;br /&gt;
* '''u16''' Group String - 1-based stat_txt.tbl string index&lt;br /&gt;
* '''u16''' Unknown/unused (always 0)&lt;br /&gt;
* '''u16''' Doodad ID - dddata.bin index&lt;br /&gt;
* '''u16''' Width - Width in tiles of the doodad&lt;br /&gt;
* '''u16''' Height - Height in tiles of the doodad&lt;br /&gt;
* '''u16''' Unknown/unused (always 0)&lt;br /&gt;
* '''u16[16]''' Tiles - VX4/VF4 MegaTile reference&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Flag Values (some flags appear to be unused/outdated, while others appear to be used internally by StarCraft. These values have been italicized):&lt;br /&gt;
* '''0x0001''' - ''(Generally) buildable and/or passable terrain types?''&lt;br /&gt;
* '''0x0002''' - ''Unknown/Unused''&lt;br /&gt;
* '''0x0004''' - ''Impassable terrain types?''&lt;br /&gt;
* '''0x0008''' - ''Unknown/Unused''&lt;br /&gt;
* '''0x0010''' - ''Trees?''&lt;br /&gt;
* '''0x0020''' - ''Unknown/Unused''&lt;br /&gt;
* '''0x0040''' - Creep (unbuildable for non-creep buildings)&lt;br /&gt;
* '''0x0080''' - Unbuildable&lt;br /&gt;
* '''0x0100''' - ''Objects/Rocks/Trees?''&lt;br /&gt;
* '''0x0200''' - ''Mid Ground (deprecated? some values are incorrect)''&lt;br /&gt;
* '''0x0400''' - ''High Ground (deprecated? some values are incorrect)''&lt;br /&gt;
* '''0x0800''' - ''Unknown/Unused''&lt;br /&gt;
* '''0x1000''' - Has Sprites.dat overlay&lt;br /&gt;
* '''0x2000''' - Has Units.dat overlay&lt;br /&gt;
* '''0x4000''' - ''Overlay is flipped (unused)''&lt;br /&gt;
* '''0x8000''' - Allow Beacons/Start Locations to be placeable&lt;br /&gt;
&lt;br /&gt;
==VF4==&lt;br /&gt;
MiniTile flags for each MegaTile. Referenced by CV5.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 32 Bytes&lt;br /&gt;
&lt;br /&gt;
ID Range: 0-65535&lt;br /&gt;
&lt;br /&gt;
* '''u16[16]``` - MiniTile Flags:&lt;br /&gt;
** 0x0001 - Walkable&lt;br /&gt;
** 0x0002 - Mid&lt;br /&gt;
** 0x0004 - High (Mid and High unchecked = Low)&lt;br /&gt;
** 0x0008 - Blocks View&lt;br /&gt;
** 0x0010 - Ramp - Appears in the middle of most ramps/stairs&lt;br /&gt;
** Rest unknown/unused&lt;br /&gt;
&lt;br /&gt;
==VX4==&lt;br /&gt;
MiniTile graphic references for each MegaTile. Referenced by CV5.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 32 Bytes&lt;br /&gt;
&lt;br /&gt;
ID Range: 0-65535&lt;br /&gt;
&lt;br /&gt;
* '''u16[16]''' - MiniTile graphics&lt;br /&gt;
** '''Bit 0''' (0x0001) - Horizontally Flipped&lt;br /&gt;
** '''15 Bits''' (0xFFFE) - VR4 reference&lt;br /&gt;
&lt;br /&gt;
==VX4EX==&lt;br /&gt;
Replaces VX4 in SC:Remaster and tileset expanding plugins to allow for more minitiles. Note that SC:R itself does not use this file, it is used by SCMDraft.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 64 Bytes&lt;br /&gt;
&lt;br /&gt;
ID Range: 0-4294967295&lt;br /&gt;
&lt;br /&gt;
* '''u32[16]''' - MiniTile graphics&lt;br /&gt;
** '''Bit 0''' (0x00000001) - Horizontally Flipped&lt;br /&gt;
** '''23 Bits''' (0xFFFFFFFE) - VR4 reference&lt;br /&gt;
&lt;br /&gt;
==VR4==&lt;br /&gt;
Graphical Data for minitiles. Referenced by VX4 or VX4EX.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 64 Bytes&lt;br /&gt;
&lt;br /&gt;
Max ID: 32767 (VX4) or 2147483647 (VX4EX)&lt;br /&gt;
&lt;br /&gt;
* '''u8[8][8]''' - WPE color index&lt;br /&gt;
&lt;br /&gt;
==WPE==&lt;br /&gt;
256-color RGB Palette.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 4 Bytes (entire file is always 1024 bytes).&lt;br /&gt;
&lt;br /&gt;
ID Range: 0-255&lt;br /&gt;
&lt;br /&gt;
* '''u8''' - Red&lt;br /&gt;
* '''u8''' - Green&lt;br /&gt;
* '''u8''' - Blue&lt;br /&gt;
* '''u8''' - Unused&lt;br /&gt;
&lt;br /&gt;
==DDDATA.BIN==&lt;br /&gt;
Doodad placeability. Referenced by CV5.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 512 Bytes (entire file is 256KB).&lt;br /&gt;
&lt;br /&gt;
ID Range: 0-511&lt;br /&gt;
&lt;br /&gt;
* '''u16[256]''' - CV5 Group ID references for placeability. Only the first Doodad Width*Height indexes are used for each doodad. A value of 0 is used on null tiles and can be placed anywhere.&lt;br /&gt;
&lt;br /&gt;
[[Category:StarCraft]]&lt;br /&gt;
[[Category:Reference]]&lt;br /&gt;
[[Category:Modding]]&lt;/div&gt;</summary>
		<author><name>FaRTy1billion</name></author>	</entry>

	<entry>
		<id>https://staredit.net/wiki/index.php?title=Terrain_Format&amp;diff=666</id>
		<title>Terrain Format</title>
		<link rel="alternate" type="text/html" href="https://staredit.net/wiki/index.php?title=Terrain_Format&amp;diff=666"/>
				<updated>2022-08-09T03:17:07Z</updated>
		
		<summary type="html">&lt;p&gt;FaRTy1billion: Updated formatting and information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Data in the format is read left to right, top to bottom (bitmap pixel locations, minitile locations, etc.). All values are unsigned.&lt;br /&gt;
&lt;br /&gt;
==CV5==&lt;br /&gt;
This file defines the various tile groups that are referenced by the TILE/MTXM sections of the CHK (0x7FF0 for the group index, 0x000F for the tile index).&lt;br /&gt;
&lt;br /&gt;
Struct Size: 52 bytes&lt;br /&gt;
ID Range: 0-2047&lt;br /&gt;
&lt;br /&gt;
For non-doodad tiles:&lt;br /&gt;
* '''u16''' Terrain Type - 0 for unused/unplaceable, 1 for doodads, 2+ for basic terrain and edges&lt;br /&gt;
* '''u16''' Flags - Properties for this group of tiles&lt;br /&gt;
* '''Rect16''' Edge Types - Determines what tile types can be adjacent to tiles in this group. Unsure if StarEdit actually uses these, or if they are just reference/outdated values.&lt;br /&gt;
** '''u16''' Left&lt;br /&gt;
** '''u16''' Up&lt;br /&gt;
** '''u16''' Right&lt;br /&gt;
** '''u16''' Down&lt;br /&gt;
* '''Rect16''' Terrain Piece Type - Determines multi-tile blocks of terrain (e.g. 2x3 cliff pieces). A value of 0 can match any appropriate tile, otherwise the edge only pairs with a matching Terrain Piece Type value and tile index. Unsure if StarEdit actually uses these, or if they are just reference/outdated values.&lt;br /&gt;
** '''u16''' Left - Unknown/unused (always 0)&lt;br /&gt;
** '''u16''' Up&lt;br /&gt;
** '''u16''' Right - Unknown/unused (always 0)&lt;br /&gt;
** '''u16''' Down&lt;br /&gt;
* '''u16[16]''' Tiles - VX4/VF4 MegaTile reference&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For doodad tiles (1024+ in pre-remaster tilesets, but SC:R puts some doodads before that index on some tilesets):&lt;br /&gt;
* '''u16''' Terrain Type - 0 for unused/unplaceable, 1 for doodads, 2+ for basic terrain and edges&lt;br /&gt;
* '''u16''' Flags - Properties for this group of tiles and doodad&lt;br /&gt;
* '''u16''' Overlay ID - Sprites.dat or Units.dat ID, depending on flags&lt;br /&gt;
* '''u16''' SC:R Doodad - Set to 1 on doodads added by SC:R&lt;br /&gt;
* '''u16''' Group String - 1-based stat_txt.tbl string index&lt;br /&gt;
* '''u16''' Unknown/unused (always 0)&lt;br /&gt;
* '''u16''' Doodad ID - dddata.bin index&lt;br /&gt;
* '''u16''' Width - Width in tiles of the doodad&lt;br /&gt;
* '''u16''' Height - Height in tiles of the doodad&lt;br /&gt;
* '''u16''' Unknown/unused (always 0)&lt;br /&gt;
* '''u16[16]''' Tiles - VX4/VF4 MegaTile reference&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Flag Values (some flags appear to be unused/outdated, while others appear to be used internally by StarCraft. These values have been italicized):&lt;br /&gt;
* '''0x0001''' - ''(Generally) buildable and/or passable terrain types?''&lt;br /&gt;
* '''0x0002''' - ''Unknown/Unused''&lt;br /&gt;
* '''0x0004''' - ''Impassable terrain types?''&lt;br /&gt;
* '''0x0008''' - ''Unknown/Unused''&lt;br /&gt;
* '''0x0010''' - ''Trees?''&lt;br /&gt;
* '''0x0020''' - ''Unknown/Unused''&lt;br /&gt;
* '''0x0040''' - Creep (unbuildable for non-creep buildings)&lt;br /&gt;
* '''0x0080''' - Unbuildable&lt;br /&gt;
* '''0x0100''' - ''Objects/Rocks/Trees?''&lt;br /&gt;
* '''0x0200''' - ''Mid Ground (deprecated? some values are incorrect)''&lt;br /&gt;
* '''0x0400''' - ''High Ground (deprecated? some values are incorrect)''&lt;br /&gt;
* '''0x0800''' - ''Unknown/Unused''&lt;br /&gt;
* '''0x1000''' - Has Sprites.dat overlay&lt;br /&gt;
* '''0x2000''' - Has Units.dat overlay&lt;br /&gt;
* '''0x4000''' - ''Overlay is flipped (unused)''&lt;br /&gt;
* '''0x8000''' - Allow Beacons/Start Locations to be placeable&lt;br /&gt;
&lt;br /&gt;
==VF4==&lt;br /&gt;
MiniTile flags for each MegaTile. Referenced by CV5.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 32 Bytes&lt;br /&gt;
&lt;br /&gt;
ID Range: 0-65535&lt;br /&gt;
&lt;br /&gt;
* '''u16[16]``` - MiniTile Flags:&lt;br /&gt;
** 0x0001 - Walkable&lt;br /&gt;
** 0x0002 - Mid&lt;br /&gt;
** 0x0004 - High (Mid and High unchecked = Low)&lt;br /&gt;
** 0x0008 - Blocks View&lt;br /&gt;
** 0x0010 - Ramp - Appears in the middle of most ramps/stairs&lt;br /&gt;
** Rest unknown/unused&lt;br /&gt;
&lt;br /&gt;
==VX4==&lt;br /&gt;
MiniTile graphic references for each MegaTile. Referenced by CV5.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 32 Bytes&lt;br /&gt;
&lt;br /&gt;
ID Range: 0-65535&lt;br /&gt;
&lt;br /&gt;
* '''u16[16]''' - MiniTile graphics&lt;br /&gt;
** '''Bit 0''' (0x0001) - Horizontally Flipped&lt;br /&gt;
** '''15 Bits''' (0xFFFE) - VR4 reference&lt;br /&gt;
&lt;br /&gt;
==VX4EX==&lt;br /&gt;
Replaces VX4 in SC:Remaster and tileset expanding plugins to allow for more minitiles. Note that SC:R itself does not use this file, it is used by SCMDraft.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 64 Bytes&lt;br /&gt;
&lt;br /&gt;
ID Range: 0-4294967296&lt;br /&gt;
&lt;br /&gt;
* '''u32[16]''' - MiniTile graphics&lt;br /&gt;
** '''Bit 0''' (0x00000001) - Horizontally Flipped&lt;br /&gt;
** '''23 Bits''' (0xFFFFFFFE) - VR4 reference&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==VR4==&lt;br /&gt;
Graphical Data for minitiles. Referenced by VX4 or VX4EX.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 64 Bytes&lt;br /&gt;
&lt;br /&gt;
Max ID: 32767 (VX4) or 2147483647 (VX4EX)&lt;br /&gt;
&lt;br /&gt;
* '''u8[8][8]''' - WPE color index&lt;br /&gt;
&lt;br /&gt;
==WPE==&lt;br /&gt;
256-color RGB Palette.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 4 Bytes (entire file is always 1024 bytes).&lt;br /&gt;
&lt;br /&gt;
ID Range: 0-255&lt;br /&gt;
&lt;br /&gt;
* '''u8''' - Red&lt;br /&gt;
* '''u8''' - Green&lt;br /&gt;
* '''u8''' - Blue&lt;br /&gt;
* '''u8''' - Unused&lt;br /&gt;
&lt;br /&gt;
==DDDATA.BIN==&lt;br /&gt;
Doodad placeability. Referenced by CV5.&lt;br /&gt;
&lt;br /&gt;
Struct Size: 512 Bytes (entire file is 256KB).&lt;br /&gt;
&lt;br /&gt;
ID Range: 0-511&lt;br /&gt;
&lt;br /&gt;
* '''u16[256]''' - CV5 Group ID references for placeability. Only the first Doodad Width*Height indexes are used for each doodad. A value of 0 is used on null tiles and can be placed anywhere.&lt;br /&gt;
&lt;br /&gt;
[[Category:StarCraft]]&lt;br /&gt;
[[Category:Reference]]&lt;br /&gt;
[[Category:Modding]]&lt;/div&gt;</summary>
		<author><name>FaRTy1billion</name></author>	</entry>

	<entry>
		<id>https://staredit.net/wiki/index.php?title=Scenario.chk&amp;diff=665</id>
		<title>Scenario.chk</title>
		<link rel="alternate" type="text/html" href="https://staredit.net/wiki/index.php?title=Scenario.chk&amp;diff=665"/>
				<updated>2022-07-23T23:47:09Z</updated>
		
		<summary type="html">&lt;p&gt;FaRTy1billion: /* &amp;quot;ISOM&amp;quot; - Isometric Terrain */ removed unnecessary &amp;quot;or&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The CHK file is a very dense file found inside the SCM or SCX file (as &amp;quot;staredit\scenario.chk&amp;quot;), which is just a renamed MPQ archive.&lt;br /&gt;
&lt;br /&gt;
In this article, some shorthand will be used for datatypes:&lt;br /&gt;
* '''u8''' for an unsigned byte&lt;br /&gt;
* '''u16''' for an unsigned short (2-byte integer)&lt;br /&gt;
* '''u32''' for an unsigned int (4-byte integer)&lt;br /&gt;
* '''uT[''a'']''' for an array of datatype '''T''' (8, 16, 32) with '''''a''''' number of elements&lt;br /&gt;
* '''uT[''a''][''b'']''' for a two-dimensional array of datatype '''T''', where each element of '''T[''a'']''' will be an array of size '''''b'''''&lt;br /&gt;
&lt;br /&gt;
=Sections=&lt;br /&gt;
The CHK is split into several named chunks (hence the file extension, an abbreviation of ''CHunK'').&lt;br /&gt;
&lt;br /&gt;
Each section begins with an 8-byte header:&lt;br /&gt;
* '''u32''' Name - A 4-byte string uniquely identifying that chunk's purpose.&lt;br /&gt;
* '''u32''' Size - The size, in bytes, of the chunk (not including this header)&lt;br /&gt;
Followed by as many bytes as 'Size', in a format described below.&lt;br /&gt;
&lt;br /&gt;
Some things to keep in mind about the CHK section:&lt;br /&gt;
* Invalid sections can exist and will be ignored. While Size is unsigned, it can safely be a negative value to read a chunk earlier in the file. This allows for &amp;quot;section stacking&amp;quot;, allowing smaller sections to be placed inside of larger ones or duplicate triggers or units to take less space in the file.&lt;br /&gt;
* All sections will marked &amp;quot;Not required.&amp;quot; are never read by StarCraft and can safely be omitted. However they may or may not be read by StarEdit, and may cause the map to be unreadable in an editor.&lt;br /&gt;
* Note &amp;quot;Hybrid&amp;quot;, or &amp;quot;Enhanced&amp;quot;, maps were introduced in 1.04. They are supported both by Original StarCraft and Brood War and usually contain sections for both types (e.g., UPGS and UPGx, TECS and TECx), but both sections aren't necessarily read.&lt;br /&gt;
* Duplicate sections will overwrite previously defined section data, except where noted. Note this only applies to those section that pass the specified &amp;quot;validation&amp;quot; parameters, as any section that does not successfully validate will be ignored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TYPE&amp;quot; - Map Type==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the type of scenario.&lt;br /&gt;
* '''u32''': Specifies the type of scenario:&lt;br /&gt;
** '''0x53574152''' or '''RAWS''' - 1.04 StarCraft and above (&amp;quot;hybrid&amp;quot;)&lt;br /&gt;
** '''0x42574152''' or '''RAWB''' - Brood War&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;VER &amp;quot; - Format Version==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section identifies the file format version.&lt;br /&gt;
* '''u16''': File format version:&lt;br /&gt;
** '''59''' - Starcraft 1.00 (original retail release)&lt;br /&gt;
** '''63''' - Starcraft 1.04 ''(hybrid)''&lt;br /&gt;
** '''64''' - Starcraft Remastered (1.21) ''(hybrid)''&lt;br /&gt;
** '''205''' - Brood War 1.00 ''(1.04)''&lt;br /&gt;
** '''206''' - Starcraft Remastered (1.21) ''(broodwar)''&lt;br /&gt;
This is the only version code section to actually be read by StarCraft (of TYPE, VER , IVER, and IVE2). Any other value is invalid in retail StarCraft and is usually a beta version.&lt;br /&gt;
&lt;br /&gt;
Other unsupported versions include:&lt;br /&gt;
* '''0-19''' - ''Warcraft II versions (.PUD)''&lt;br /&gt;
* '''47''' - ''Starcraft Beta''&lt;br /&gt;
* '''61''' - Brood War internal (map version 61)&lt;br /&gt;
* '''75''' - Brood War internal (map version 75)&lt;br /&gt;
* '''201''' - Brood War internal (map version 201)&lt;br /&gt;
* '''203''' - Brood War internal (map version 203)&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IVER&amp;quot; - Map Version==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section &amp;quot;additionally identifies&amp;quot; the map version.&lt;br /&gt;
* '''u16''': &amp;quot;Additional file format version:&amp;quot;&lt;br /&gt;
** '''9''' - beta/obsolete versions&lt;br /&gt;
** '''10''' - current versions&lt;br /&gt;
When saving as expansion this section gets removed entirely. Contrary to popular belief, it doesn't get &amp;quot;replaced&amp;quot; by IVE2 in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IVE2&amp;quot; - Map Version==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section &amp;quot;additionally identifies&amp;quot; the map version.&lt;br /&gt;
* '''u16''': &amp;quot;Additional file format version:&amp;quot;&lt;br /&gt;
** '''11''' - 1.04 StarCraft and above (&amp;quot;hybrid&amp;quot;) or Brood War.&lt;br /&gt;
This section does not &amp;quot;replace&amp;quot; IVER in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;VCOD&amp;quot; - Verification Code==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be equal to size of the VCOD data in the EXE resource. Must result in valid checksum.''&lt;br /&gt;
&lt;br /&gt;
This section has a verification code to make sure this is actually a CHK file.&lt;br /&gt;
&lt;br /&gt;
* '''u32[256]''': Seed values.&lt;br /&gt;
* '''u8[16]''': Operation codes to produce the resulting hash:&lt;br /&gt;
** '''00''' - XOR's the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''01''' - Adds to the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''02''' - Subtracts from the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''03''' - XOR's the current hash with the VCOD table at index OWNR, SIDE, FORC, and 0&lt;br /&gt;
** '''04''' - same as 0x03&lt;br /&gt;
** '''05''' - same as 0x03&lt;br /&gt;
** '''06''' - Complex function consisting of ORs and shifts&lt;br /&gt;
** '''07''' - Inverted version of 0x06, switching direction of all shifts&lt;br /&gt;
** '''08+''' - Do nothing&lt;br /&gt;
Opcodes and seeds do not have to match those in EXE resource, as long as the same value is produced.&amp;lt;br&amp;gt;&lt;br /&gt;
The only indexes in the seed table that are referenced are those that correspond individual values of [[#&amp;quot;OWNR&amp;quot; - StarCraft Player Types|OWNR]], [[#&amp;quot;SIDE&amp;quot; - Player Races|SIDE]], [[#&amp;quot;FORC&amp;quot; - Force Settings|FORC]] player assignments, and index 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IOWN&amp;quot; - StarEdit Player Types==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the owner of each player.&lt;br /&gt;
* '''u8[12]''': One byte for each player, specifies the owner of the player:&lt;br /&gt;
** '''00''' - Inactive&lt;br /&gt;
** ''01'' - Computer (game)&lt;br /&gt;
** ''02'' - Occupied by Human Player&lt;br /&gt;
** '''03''' - Rescue Passive&lt;br /&gt;
** '''04''' - Unused&lt;br /&gt;
** '''05''' - Computer&lt;br /&gt;
** '''06''' - Human (Open Slot)&lt;br /&gt;
** '''07''' - Neutral&lt;br /&gt;
** ''08'' - Closed slot&lt;br /&gt;
This section is separate from OWNR as a staredit value. Staredit does not display &amp;quot;inactive&amp;quot; as a valid option. Italicized settings denote invalid map options, which may involve a buffer overflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;OWNR&amp;quot; - StarCraft Player Types==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 12 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section designates the controller of a particular player. It is exactly the same as the &amp;quot;IOWN&amp;quot; section, except there is an additional value, 0x00 for Inactive.&lt;br /&gt;
* '''u8[12]''': One byte for each player, specifies the owner of the player:&lt;br /&gt;
** '''00''' - Inactive&lt;br /&gt;
** ''01'' - Computer (game)&lt;br /&gt;
** ''02'' - Occupied by Human Player&lt;br /&gt;
** '''03''' - Rescue Passive&lt;br /&gt;
** '''04''' - Unused&lt;br /&gt;
** '''05''' - Computer&lt;br /&gt;
** '''06''' - Human (Open Slot)&lt;br /&gt;
** '''07''' - Neutral&lt;br /&gt;
** ''08'' - Closed slot&lt;br /&gt;
Italicized settings denote invalid map options, which may involve a buffer overflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;ERA &amp;quot; - Tileset==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section indicates the tileset of the scenario.&lt;br /&gt;
* '''u16''': Designates tileset:&lt;br /&gt;
** '''00''' - Badlands&lt;br /&gt;
** '''01''' - Space Platform&lt;br /&gt;
** '''02''' - Installation&lt;br /&gt;
** '''03''' - Ashworld&lt;br /&gt;
** '''04''' - Jungle&lt;br /&gt;
** '''05''' - Desert&lt;br /&gt;
** '''06''' - Arctic&lt;br /&gt;
** '''07''' - Twilight&lt;br /&gt;
StarCraft masks the tileset indicator's bit value, so bits after the third place (anything after the value &amp;quot;7&amp;quot;) are removed. Thus, 9 (1001 in binary) is interpreted as 1 (0001), 10 (1010) as 2 (0010), etc.&amp;lt;br&amp;gt;&lt;br /&gt;
Desert, Arctic, and Twilight are Brood War-only tilesets.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;DIM &amp;quot; - Map Dimensions==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains the dimensions of the map.&lt;br /&gt;
* '''u16''': Width of the map&lt;br /&gt;
* '''u16''': Height of the map&lt;br /&gt;
The Width/Height of the map is measured in the number of square 32x32p tiles.&amp;lt;br&amp;gt;&lt;br /&gt;
Standard Dimensions are 64, 96, 128, 192, and 256.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SIDE&amp;quot; - Player Races==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 12 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains the species/race of each player.&lt;br /&gt;
* '''u8[12]''': 1 byte per player the species of that player:&lt;br /&gt;
** '''00''' - Zerg&lt;br /&gt;
** '''01''' - Terran&lt;br /&gt;
** '''02''' - Protoss&lt;br /&gt;
** ''03'' - Invalid (Independent), shown as &amp;quot;Unknown&amp;quot; in SC:R lobby&lt;br /&gt;
** ''04'' - Invalid (Neutral), shown as &amp;quot;Unknown&amp;quot;&lt;br /&gt;
** '''05''' - User Select&lt;br /&gt;
** '''06''' - Random (Forced; Acts as a selected race)&lt;br /&gt;
** ''07'' - Inactive, shown as locked &amp;quot;Select Race&amp;quot; option in SC:R lobby&lt;br /&gt;
Italicized settings denote invalid map options. Note Players 9-11 are defaultly Inactive and Player 12 is defaultly Neutral.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MTXM&amp;quot; - StarCraft Terrain==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be less than or equal to 131072 (0x20000) bytes (256 * 256 * 2).''&lt;br /&gt;
&lt;br /&gt;
Terrain section that contains a map of the level's appearance. StarEdit disregards this section and instead uses [[#&amp;quot;TILE&amp;quot; - StarEdit Terrain|TILE]]; it is only used in Starcraft.&lt;br /&gt;
* '''u16[map width * height]''': one integer for each tile.&lt;br /&gt;
Notes about MTXM:&lt;br /&gt;
* The Width/Height of the map is measured in the number of square 32x32p tiles.&lt;br /&gt;
* Tiles in this section are listed from left to right, top to bottom.&lt;br /&gt;
* The values for each integer are their respective &amp;quot;MegaTile&amp;quot; values in the scenario's tileset. If the size of this section is greater than width*height*2, the data following is ignored. If the size of this section is less, the resulting tiles that have not been defined will be null tiles.&lt;br /&gt;
* This section includes doodads as terrain; TILE, which is otherwise identical, doesn't. Out of the terrain sections (TILE, ISOM, and MTXM), SC only reads MTXM for the sake of not having to generate this data on-the-fly: it contains the exact representation of the level's appearance, including doodads. TILE, on the other hand, is directly tied via a tile lookup function to ISOM, and exists for the sake of not having to generate tiles from ISOM on-the-fly in StarEdit.&lt;br /&gt;
* If MTXM section is smaller than (map width*height), then the remaining tiles will be filled with null tiles or tiles specified by previous MTXM sections.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PUNI&amp;quot; - Player Unit Restrictions==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 5700 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains player unit restrictions: it indicates whether the player can or cannot build a particular unit.&lt;br /&gt;
* '''u8[228][12]''': 1 byte for each unit in order of its unit id, then each player, for player availability:&lt;br /&gt;
** '''00''' - That unit is not available for production if the player has 'override defaults' on&lt;br /&gt;
** '''01''' - That unit is available for production if the player has 'override defaults' on&lt;br /&gt;
* '''u8[228]''': 1 byte for each unit in order of it's unit id, for global availability defaults (for all players):&lt;br /&gt;
** '''00''' - That unit is not available for production&lt;br /&gt;
** '''01''' - That unit is available for production&lt;br /&gt;
* '''u8[228][12]''': 1 byte for each unit in order of its unit id, then each player, indicating whether a player uses the global availability defaults.&lt;br /&gt;
** '''00''' - Player overrides defaults for this unit&lt;br /&gt;
** '''01''' - Player uses defaults for this unit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGR&amp;quot; - Upgrade Restrictions==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1748 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;PUPx&amp;quot; - BW Upgrade Restrictions|&amp;quot;PUPx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains player upgrade restrictions: it indicates the starting/maximum levels at/to which a player can perform a particular upgrade.&lt;br /&gt;
* '''u8[46][12]''': 1 byte for the maximum level a player can upgrade to, in order of its upgrade id, then each player&lt;br /&gt;
* '''u8[46][12]''': 1 byte for the level of an upgrade a player starts off with, in order of its upgrade id, then each player&lt;br /&gt;
* '''u8[46]''': 1 byte for the global default maximum level of each upgrade, in order of its upgrade id.&lt;br /&gt;
* '''u8[46]''': 1 byte for the global default starting level of each upgrade, in order of its upgrade id.&lt;br /&gt;
* '''u8[46][12]''': 1 byte for each upgrade in order of its upgrade id, then each player, indicating whether a player uses the global upgrade defaults:&lt;br /&gt;
** '''00''' - Player does not use global upgrade defaults for this upgrade&lt;br /&gt;
** '''01''' - Player uses upgrade defaults for this upgrade&lt;br /&gt;
See [[#List of Upgrade IDs]].&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PTEC&amp;quot; - Tech Restrictions==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 912 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;PTEx&amp;quot; - BW Tech Restrictions|&amp;quot;PTEx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains player technology availability restrictions: it indicates whether a player starts off with a particular technology or can research a particular technology.&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology id, then each player, for player availability:&lt;br /&gt;
** '''00''' - Technology is not available for a player&lt;br /&gt;
** '''01''' - Technology is available for a player&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology id, then each player, for &amp;quot;already researched&amp;quot; status:&lt;br /&gt;
** '''00''' - Technology is not already researched&lt;br /&gt;
** '''01''' - Technology is already researched&lt;br /&gt;
* '''u8[24]''': 1 byte for each technology for global availability defaults:&lt;br /&gt;
** '''00''' - Technology is not available by default&lt;br /&gt;
** '''01''' - Technology is available by default&lt;br /&gt;
* '''u8[24]''': 1 byte for each technology for global &amp;quot;already researched&amp;quot; defaults:&lt;br /&gt;
** '''00''' - Technology is not already researched by default&lt;br /&gt;
** '''01''' - Technology is already researched by default&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology in order of its technology id, then each player, indicating whether a player uses the global defaults:&lt;br /&gt;
** '''00''' - Technology overrides defaults for player&lt;br /&gt;
** '''01''' - Technology uses default settings for player&lt;br /&gt;
See [[#List of Technology IDs]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIT&amp;quot; - Placed Units==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 36 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the pre-placed units on the map and their properties. Each unit on the map gets the following structure:&lt;br /&gt;
* '''u32''': The unit's class instance (sort of a &amp;quot;serial number&amp;quot;)&lt;br /&gt;
* U16''': X coordinate of unit&lt;br /&gt;
* U16''': Y coordinate of unit&lt;br /&gt;
* '''u16''': Unit ID&lt;br /&gt;
* '''u16''': Type of relation to another building (i.e. add-on, nydus link)&lt;br /&gt;
** '''Bit 9''' - Nydus Link&lt;br /&gt;
** '''Bit 10''' - Addon Link&lt;br /&gt;
* '''u16''': Flags of special properties which can be applied to the unit and are valid:&lt;br /&gt;
** '''Bit 0''' - Cloak is valid&lt;br /&gt;
** '''Bit 1''' - Burrow is valid&lt;br /&gt;
** '''Bit 2''' - In transit is valid&lt;br /&gt;
** '''Bit 3''' - Hallucinated is valid&lt;br /&gt;
** '''Bit 4''' - Invincible is valid&lt;br /&gt;
** '''Bit 5-15''' - Unused&lt;br /&gt;
* '''u16''': Out of the elements of the unit data, the properties which can be changed by the map maker:&lt;br /&gt;
** '''Bit 0''' - Owner player is valid (the unit is not a critter, start location, etc.; not a neutral unit)&lt;br /&gt;
** '''Bit 1''' - HP is valid&lt;br /&gt;
** '''Bit 2''' - Shields is valid&lt;br /&gt;
** '''Bit 3''' - Energy is valid (unit is a wraith, etc.)&lt;br /&gt;
** '''Bit 4''' - Resource amount is valid (unit is a mineral patch, vespene geyser, etc.)&lt;br /&gt;
** '''Bit 5''' - Amount in hangar is valid (unit is a reaver, carrier, etc.)&lt;br /&gt;
** '''Bit 6-15''' - Unused&lt;br /&gt;
* '''u8''': Player number of owner (0-based)&lt;br /&gt;
* '''u8''': Hit points % (1-100)&lt;br /&gt;
* '''u8''': Shield points % (1-100)&lt;br /&gt;
* '''u8''': Energy points % (1-100)&lt;br /&gt;
* '''u32''': Resource amount&lt;br /&gt;
* '''u16''': Number of units in hangar&lt;br /&gt;
* '''u16''': Unit state flags&lt;br /&gt;
** '''Bit 0''' - Unit is cloaked&lt;br /&gt;
** '''Bit 1''' - Unit is burrowed&lt;br /&gt;
** '''Bit 2''' - Building is in transit&lt;br /&gt;
** '''Bit 3''' - Unit is hallucinated&lt;br /&gt;
** '''Bit 4''' - Unit is invincible&lt;br /&gt;
** '''Bit 5-15''' - Unused&lt;br /&gt;
* '''u32''': Unused&lt;br /&gt;
* '''u32''': Class instance of the unit to which this unit is related to (i.e. via an add-on, nydus link, etc.). It is &amp;quot;0&amp;quot; if the unit is not linked to any other unit.&lt;br /&gt;
Notes about UNIT:&lt;br /&gt;
* The X/Y coordinates are the center of the sprite of the unit (in pixels).&lt;br /&gt;
* Please edit if you could confirm the bit values to be correct/if you know more bit values.&lt;br /&gt;
* Default values will apply if bit values are unchecked. Defaults: 100% HP, 100% SP, 100% EP, 0 resources, 0 hangar count.&lt;br /&gt;
* This section can be split. Additional UNIT sections will add more units.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;ISOM&amp;quot; - Isometric Terrain==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section is required to place isometric terrain on the map. It provides data about the nature of the isometric &amp;quot;diamonds&amp;quot; (the editing mode of StarEdit).&lt;br /&gt;
* '''u16[ (width / 2 + 1) * (height + 1) * 4 ]''': 4 integers for each 2x1 map rectangle tile (plus one extra tile to the right and bottom of the map), as per the RECT structure. Each rectangle border (left, top, right, bottom) is assigned an &amp;quot;ISOM value.&amp;quot; These form the &amp;quot;diamond&amp;quot; pattern of the map, and each rectangle thus gets two ISOM values associated with it. The index of the rectangle's right tile is that of its left tile + 16.&lt;br /&gt;
** '''Bit 0''' (0x0001) - Flag used by the editor (&amp;quot;Edited&amp;quot;?)&lt;br /&gt;
** '''Bit 1-3''' - Determines the position on the ISOM grid for the given tile edge. Each diamond covers four 2x1 map tiles, so each tile therefore has two edges per diamond.&lt;br /&gt;
*** '''0''' (0x0000) - Top Left tile horizontal edge. Also the default value upon map creation for all tiles and directions.&lt;br /&gt;
*** '''1''' (0x0002) - Top Left tile vertical edge&lt;br /&gt;
*** '''2''' (0x0004) - Top Right tile horizontal edge&lt;br /&gt;
*** '''3''' (0x0006) - Top Right tile vertical edge&lt;br /&gt;
*** '''4''' (0x0008) - Bottom Right tile horizontal edge&lt;br /&gt;
*** '''5''' (0x000A) - Bottom Right tile vertical edge&lt;br /&gt;
*** '''6''' (0x000C) - Bottom Left tile vertical edge&lt;br /&gt;
*** '''7''' (0x000E) - Bottom Left tile horizontal edge&lt;br /&gt;
** '''Bit 4-14''' - ISOM terrain type ID, used to determine what type of terrain is on that edge. This value matches the corresponding edge on the adjacent tile. The ID is related to the CV5 Index, but the actual value is determined by a hardcoded lookup table in the editor. A value of 0 is for square terrain in StarEdit.&lt;br /&gt;
** '''Bit 15''' (0x8000) - Flag used by the editor (&amp;quot;Skipped&amp;quot;?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ISOM_Grid_Values.png]]&lt;br /&gt;
&lt;br /&gt;
First 1 in each value is the terrain type ID (1 for dirt), second digit is the ISOM edge ID. Values inside the diamond are associated with that diamond, values outside are associated with the adjacent diamonds on the ISOM grid.  This arrangement of tiles is tiled across the entire map, forming the full ISOM grid.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TILE&amp;quot; - StarEdit Terrain==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section will only be different from the [[#&amp;quot;MTXM&amp;quot; - StarCraft Terrain|MTXM]] section in tiles where doodads are present.&lt;br /&gt;
* '''u16[ map width * height ]''': 1 integer for each map tile. Moves horizontally across the map.&lt;br /&gt;
The values in TILE are normally directly generated from the ISOM section (see &amp;quot;'ISOM' section&amp;quot; above), and thus do not match that of MTXM on doodad tiles.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;DD2 &amp;quot; - StarEdit Sprites (Doodads)==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section contains the doodad map of the level. There are several parts to doodads. The graphical portion is stored in the [[#&amp;quot;MTXM&amp;quot; - StarCraft Terrain|MTXM]] section. The second part of the doodad is stored in this section. This section is only used by the map editor.&lt;br /&gt;
&lt;br /&gt;
Each doodad in the map gets the following structure:&lt;br /&gt;
* '''u16''': Number of the doodad. Size of the doodad is dependent on this. Doodads are different for each tileset.&lt;br /&gt;
* '''u16''': X coordinate of the doodad unit&lt;br /&gt;
* '''u16''': Y coordinate of the doodad unit&lt;br /&gt;
* '''u8''': Player number that owns the doodad&lt;br /&gt;
* '''u8''': Enabled flag&lt;br /&gt;
** '''00''' - Doodad is enabled (trap can attack, door is closed, etc)&lt;br /&gt;
** '''01''' - Doodad is disabled&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;THG2&amp;quot; - StarCraft Sprites==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 10 bytes.''&lt;br /&gt;
&lt;br /&gt;
The map editor only writes to this section. Starcraft uses this section.&lt;br /&gt;
&lt;br /&gt;
Sprites, usually on doodads, get the following structure.&lt;br /&gt;
* '''u16''': Unit/Sprite number of the sprite&lt;br /&gt;
* '''u16''': X coordinate of the doodad unit&lt;br /&gt;
* '''u16''': Y coordinate of the doodad unit&lt;br /&gt;
* '''u8''': Player number that owns the doodad&lt;br /&gt;
* '''u8''': Unused&lt;br /&gt;
* '''u16''': Flags&lt;br /&gt;
** '''Bit 0-11''' - Unused&lt;br /&gt;
** '''Bit 12''' - Draw as sprite (Determines if it is a sprite or a unit sprite)&lt;br /&gt;
** '''Bit 13''' - Unused&lt;br /&gt;
** '''Bit 14''' - Unused&lt;br /&gt;
** '''Bit 15''' - Disabled (Only valid if Draw as sprite is unchecked, disables the unit)&lt;br /&gt;
This section can be split. Additional THG2 sections will add more sprites.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MASK&amp;quot; - Fog of War Layer==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: This section will always validate.''&lt;br /&gt;
&lt;br /&gt;
This section contains the data on fog of war for each player. This is whether at the start of the game that levels of black space that is available.&lt;br /&gt;
* '''u8[ map width * height ]''': One byte for each map tile. The bits indicate for each player the fog of war.&lt;br /&gt;
** '''Bit 0''' - Player 1's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 1''' - Player 2's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 2''' - Player 3's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 3''' - Player 4's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 4''' - Player 5's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 5''' - Player 6's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 6''' - Player 7's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 7''' - Player 8's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
Any size greater than width*height will be ignored. Any size less will default missing tiles to 0xFF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;STR &amp;quot; - String Data==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be at least 1 byte.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the strings in the map.&lt;br /&gt;
* '''u16''': Number of strings in the section (Default''': 1024)&lt;br /&gt;
* '''u16[Number of strings]''': 1 integer for each string specifying the offset (the spot where the string starts in the section from the start of it).&lt;br /&gt;
* '''Strings''': After the offsets, this is where every string in the map goes, one after another. Each one is terminated by a null character.&lt;br /&gt;
This section can contain more or less then 1024 string offsests and will work in Starcraft.&amp;lt;br&amp;gt;&lt;br /&gt;
By default the first byte in '''Strings''' is a NUL character, and all unused offsets in the STR section point to this NUL character.&lt;br /&gt;
Note that STR sections can be stacked in a smiliar fashion as MTXM. The exact mechanisms of this are uncertain.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPRP&amp;quot; - CUWP Slots==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1280 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section is used whenever the create units with properties trigger is used. Since a slot has to be assigned to the action, this is where each slot is designated.&lt;br /&gt;
&lt;br /&gt;
There are 64 of the following structures regardless of how many are used and it cannot exceed 64.&lt;br /&gt;
* '''u16''': Flag of which special properties can be applied to unit, and are valid.&lt;br /&gt;
** '''Bit 0''' - Cloak bit is valid&lt;br /&gt;
** '''Bit 1''' - Burrowed bit is valid&lt;br /&gt;
** '''Bit 2''' - In transit bit is valid&lt;br /&gt;
** '''Bit 3''' - Hallucinated bit is valid&lt;br /&gt;
** '''Bit 4''' - Invincible bit is valid&lt;br /&gt;
** '''Bit 5-15''' - Unknown/unused&lt;br /&gt;
* '''u16''': Which elements of the unit data are valid, which properties can be changed by the map maker.&lt;br /&gt;
** '''Bit 0''' - Owner player is valid (unit is not neutral)&lt;br /&gt;
** '''Bit 1''' - HP is valid&lt;br /&gt;
** '''Bit 2''' - Shields is valid&lt;br /&gt;
** '''Bit 3''' - Energy is valid&lt;br /&gt;
** '''Bit 4''' - Resource amount is valid (unit is a resource)&lt;br /&gt;
** '''Bit 5''' - Amount in hanger is valid&lt;br /&gt;
** '''Bit 6''' - Unknown/unused&lt;br /&gt;
* '''u8''': Player number that owns unit. Will always be NULL in this section (0)&lt;br /&gt;
* '''u8''': Hit point % (1-100)&lt;br /&gt;
* '''u8''': Shield point % (1-100)&lt;br /&gt;
* '''u8''': Energy point % (1-100)&lt;br /&gt;
* '''u32''': Resource amount (for resources only)&lt;br /&gt;
* '''u16''': # of units in hangar&lt;br /&gt;
* '''u16''': Flags&lt;br /&gt;
** '''Bit 0''' - Unit is cloaked&lt;br /&gt;
** '''Bit 1''' - Unit is burrowed&lt;br /&gt;
** '''Bit 2''' - Building is in transit&lt;br /&gt;
** '''Bit 3''' - Unit is hallucinated&lt;br /&gt;
** '''Bit 4''' - Unit is invincible&lt;br /&gt;
** '''Bit 5-15''' - Unknown/unused&lt;br /&gt;
* '''u32''': Unknown/unused. Padding?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPUS&amp;quot; - CUWP Slots Used==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section goes along with the &amp;quot;UPRP&amp;quot; section. This section just indicates which of the 64 unit properties slot are used.&lt;br /&gt;
* '''u8[64]''': 1 byte for each trigger unit properties slot&lt;br /&gt;
** '''00''' - Properties slot is unused&lt;br /&gt;
** '''01''' - Properties slot is used&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MRGN&amp;quot; - Locations==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: 1280 bytes for retail, 5100 bytes for Hybrid and Broodwar.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the locations that the map uses. In a vanilla map, this section contains 64 locations. In a Hybrid or Brood War map, this section will expand to contain 255 locations.&lt;br /&gt;
&lt;br /&gt;
Each location gets one of the following location entries. The 'Anywhere' location, is ALWAYS location 64.&lt;br /&gt;
* '''u32''': Left (X1) coordinate of location, in pixels (usually 32 pt grid aligned)&lt;br /&gt;
* '''u32''': Top (Y1) coordinate of location, in pixels&lt;br /&gt;
* '''u32''': Right (X2) coordinate of location, in pixels&lt;br /&gt;
* '''u32''': Bottom (Y2) coordinate of location, in pixels&lt;br /&gt;
* '''u16''': String number of the name of this location&lt;br /&gt;
* '''u16''': Location elevation flags. If an elevation is disabled in the location, it's bit will be on (1)&lt;br /&gt;
** '''Bit 0''' - Low elevation&lt;br /&gt;
** '''Bit 1''' - Medium elevation&lt;br /&gt;
** '''Bit 2''' - High elevation&lt;br /&gt;
** '''Bit 3''' - Low air&lt;br /&gt;
** '''Bit 4''' - Medium air&lt;br /&gt;
** '''Bit 5''' - High air&lt;br /&gt;
** '''Bit 6-15''' - Unused&lt;br /&gt;
Note that in typical locations Right is always larger than Left and Bottom is always larger than Top. However, you can reverse one or both of these for [[Inverted Locations]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TRIG&amp;quot; - Triggers==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 2400 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the triggers in the map. This along with [[#&amp;quot;MBRF&amp;quot; - Mission Briefings|MBRF]] is the most complicated section in the entire scenario.chk file as there is a lot of data packed into too little of a space. Refer to the appendix at the bottom of this page for more information.&lt;br /&gt;
For easy reference, since each trigger contains 2400 bytes, the amount of triggers can be gotten by taking the section length and dividing by 2400.&lt;br /&gt;
Every single trigger in the map will have the following format:&lt;br /&gt;
* 16 Conditions (20 byte struct)&amp;lt;br&amp;gt; Every trigger has 16 of the following format, even if only one condition is used. See the appendix for information on which items are used for what conditions.&lt;br /&gt;
** '''u32''': Location number for the condition (1 based -- 0 refers to No Location), EUD Bitmask for a Death condition if the MaskFlag is set to &amp;quot;SC&amp;quot;&lt;br /&gt;
** '''u32''': [[#List of Players/Group IDs|Group]] that the condition applies to&lt;br /&gt;
** '''u32''': Qualified number (how many/resource amount)&lt;br /&gt;
** '''u16''': [[#Trigger Unit Types|Unit ID]] condition applies to&lt;br /&gt;
** '''u8''': [[#Numeric Comparisons|Numeric comparison]], [[#Switch States|switch state]]&lt;br /&gt;
** '''u8''': [[#Trigger Conditions List|Condition byte]]&lt;br /&gt;
** '''u8''': [[#Resource Types|Resource type]], [[#Score Types|score type]], Switch number (0-based)&lt;br /&gt;
** '''u8''': Flags&lt;br /&gt;
*** '''Bit 0''' - Unknown/unused&lt;br /&gt;
*** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled/ignored&lt;br /&gt;
*** '''Bit 2''' - Always display flag.&lt;br /&gt;
*** '''Bit 3''' - Unit properties is used. ('''Note:''' This is used in [[TRG|*.trg]] files)&lt;br /&gt;
*** '''Bit 4''' - Unit type is used. Cleared in &amp;quot;Offset + Mask&amp;quot; EUD conditions. May not be necessary otherwise?&lt;br /&gt;
*** '''Bit 5-7''' - Unknown/unused&lt;br /&gt;
** '''u16''': MaskFlag: set to &amp;quot;SC&amp;quot; (0x53, 0x43) when using the bitmask for EUDs, 0 otherwise&lt;br /&gt;
* 64 Actions (32 byte struct)&amp;lt;br&amp;gt; Immediately following the 16 conditions, there are 64 actions. There will always be 64 of the following structure, even if some of them are unused.&lt;br /&gt;
** '''u32''': Location - source location in &amp;quot;Order&amp;quot; and &amp;quot;Move Unit&amp;quot;, dest location in &amp;quot;Move Location&amp;quot; (1 based -- 0 refers to No Location), EUD Bitmask for a Death action if the MaskFlag is set to &amp;quot;SC&amp;quot;&lt;br /&gt;
** '''u32''': String number for trigger text (0 means no string)&lt;br /&gt;
** '''u32''': WAV string number (0 means no string)&lt;br /&gt;
** '''u32''': Seconds/milliseconds of time&lt;br /&gt;
** '''u32''': First (or only) [[#List of Players/Group IDs|Group/Player]] affected.&lt;br /&gt;
** '''u32''': Second group affected, secondary location (1-based), CUWP #, number, AI script (4-byte string), switch (0-based #)&lt;br /&gt;
** '''u16''': [[#Trigger Unit Types|Unit type]], [[#Score Types|score type]], [[#Resource Types|resource type]], [[#Alliance Statuses|alliance status]]&lt;br /&gt;
** '''u8''': [[#Trigger Actions List|Action byte]]&lt;br /&gt;
** '''u8''': Number of units (0 means All Units), [[#Action States|action state]], [[#Unit Orders|unit order]], [[#Number Modifiers|number modifier]]&lt;br /&gt;
** '''u8''': Flags&lt;br /&gt;
*** '''Bit 0''' - Ignore a wait/transmission once.&lt;br /&gt;
*** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled.&lt;br /&gt;
*** '''Bit 2''' - Always display flag - when not set: if the user has turned off subtitles (see sound options) the text will not display, when set: text will always display&lt;br /&gt;
*** '''Bit 3''' - Unit properties is used. Staredit uses this for *.trg files.&lt;br /&gt;
*** '''Bit 4''' - Unit type is used. Cleared in &amp;quot;Offset + Mask&amp;quot; EUD actions.&lt;br /&gt;
*** '''Bit 5-7''' - Unknown/unused&lt;br /&gt;
** '''u8''': Padding&lt;br /&gt;
** '''u16 (2 bytes)''': MaskFlag: set to &amp;quot;SC&amp;quot; (0x53, 0x43) when using the bitmask for EUDs, 0 otherwise&lt;br /&gt;
* Player Execution&amp;lt;br&amp;gt; Following the 16 conditions and 64 actions, every trigger also has this structure&lt;br /&gt;
** '''u32''': execution flags&lt;br /&gt;
*** '''Bit 0''' - All conditions are met, executing actions, cleared on the next trigger loop.&lt;br /&gt;
*** '''Bit 1''' - Ignore the following actions: Defeat, Draw.&lt;br /&gt;
*** '''Bit 2''' - Preserve trigger. (Can replace Preserve Trigger action)&lt;br /&gt;
*** '''Bit 3''' - Ignore execution.&lt;br /&gt;
*** '''Bit 4''' - Ignore all of the following actions for this trigger until the next trigger loop: Wait, PauseGame, Transmission, PlayWAV, DisplayTextMessage, CenterView, MinimapPing, TalkingPortrait, and MuteUnitSpeech.&lt;br /&gt;
*** '''Bit 5''' - This trigger has paused the game, ignoring subsequent calls to Pause Game (Unpause Game clears this flag only in the same trigger), may automatically call unpause at the end of action execution?&lt;br /&gt;
*** '''Bit 6''' - Wait skipping disabled for this trigger, cleared on next trigger loop.&lt;br /&gt;
*** '''Bit 7-31''' - Unknown/unused&lt;br /&gt;
** '''u8[27]''': 1 byte for each player in the [[#List of Players/Group IDs]]&lt;br /&gt;
*** '''00''' - Trigger is not executed for player&lt;br /&gt;
*** '''01''' - Trigger is executed for player&lt;br /&gt;
** '''u8''': Index of the current action, in StarCraft this is incremented after each action is executed, trigger execution ends when this is 64 (Max Actions) or an action is encountered with Action byte as 0&lt;br /&gt;
This section can be split. Additional TRIG sections will add more triggers.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MBRF&amp;quot; - Mission Briefings==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 2400 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all of the mission briefings shown by the players.&lt;br /&gt;
&lt;br /&gt;
See [[#&amp;quot;TRIG&amp;quot; - Triggers|&amp;quot;TRIG&amp;quot;]] section for format, as it is exactly the same except for the conditions. In this section the 16 conditions are still there, they are all null except for the very first condition, which only has a condition byte of 13. See [[#Mission Briefing Actions List]] for the action bytes for the mission briefing actions.&lt;br /&gt;
&lt;br /&gt;
This section can be split. Additional MBRF sections will add more briefing triggers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SPRP&amp;quot; - Scenario Properties==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4 bytes.''&lt;br /&gt;
&lt;br /&gt;
* '''u16''': String number of the scenario name&lt;br /&gt;
* '''u16''': String number of the scenarios description.&lt;br /&gt;
A string index of 0 for the map name will default it to its file name. A string index of 0 description will default to a predefined string.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;FORC&amp;quot; - Force Settings==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be less than or equal to 20 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the forces and the information about them.&lt;br /&gt;
* '''u8[8]''': 1 byte for each active player, specifying which of the 4 forces (0-based) that the player's on&lt;br /&gt;
* '''u16[4]''': 1 integer for each force, string number of the name of the force&lt;br /&gt;
* '''u8[4]''': 1 byte for each force specifying the properties:&lt;br /&gt;
** '''Bit 0''' - Random start location&lt;br /&gt;
** '''Bit 1''' - Allies&lt;br /&gt;
** '''Bit 2''' - Allied victory&lt;br /&gt;
** '''Bit 3''' - Shared vision&lt;br /&gt;
** '''Bit 4-7''' - Unused&lt;br /&gt;
Notes about FORC:&lt;br /&gt;
* If there is no string specified for a force name, it will default to a &amp;quot;Force #&amp;quot; string.&lt;br /&gt;
* If this section is less than 20 bytes, the remaining bytes are defaulted to 0.&lt;br /&gt;
* Players can be on a force greater than 4, however they will not appear in the game lobby.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;WAV &amp;quot; - WAV String Indexes==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
There are 512 wav entires regardless of how many are actually used.&lt;br /&gt;
* '''u32[512]''': 1 long for each WAV. Indicates a string index is used for a WAV path in the MPQ. If the entry is not used, it will be 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIS&amp;quot; - Unit Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4048 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;UNIx&amp;quot; - BW Unit Settings|&amp;quot;UNIx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains the unit settings for the level:&lt;br /&gt;
* '''u8[228]''': 1 byte for each unit, in order of Unit ID&lt;br /&gt;
** '''00''' - Unit does not use default settings&lt;br /&gt;
** '''01''' - Unit does use default settings&lt;br /&gt;
* '''u32[228]''': Hit points for unit (Note the displayed value is this value / 256, with the low byte being a fractional HP value)&lt;br /&gt;
* '''u16[228]''': Shield points, in order of Unit ID&lt;br /&gt;
* '''u8[228]''': Armor points, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Build time (1/60 seconds), in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Mineral cost, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Gas cost, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': String number, in order of Unit ID&lt;br /&gt;
* '''u16[100]''': Base weapon damage the weapon does, in weapon ID order ([[#List of Unit Weapon IDs]])&lt;br /&gt;
* '''u16[100]''': Upgrade bonus weapon damage, in weapon ID order&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGS&amp;quot; - Upgrade Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 598 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;UPGx&amp;quot; - BW Upgrade Settings|&amp;quot;UPGx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains upgrade settings:&lt;br /&gt;
* '''u8[46]''': 1 byte per each upgrade, in order of upgrade id.&lt;br /&gt;
** '''00''' - Upgrade uses custom settings&lt;br /&gt;
** '''01''' - Upgrade uses default settings&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, time factor for each upgrade, in order of upgrade id.&lt;br /&gt;
See [[#List of Upgrade IDs]] for upgrade ids.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TECS&amp;quot; - Tech Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 216 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;TECx&amp;quot; - BW Tech Settings|&amp;quot;TECx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains technology/special abilities settings:&lt;br /&gt;
* '''u8[24]''': 1 byte per each technology, specifies if the tech overrides the default settings. In order of technology id&lt;br /&gt;
** '''00''' - Technology uses custom settings&lt;br /&gt;
** '''01''' - Technology uses default settings&lt;br /&gt;
* '''u16[24]''': Mineral cost to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Gas cost to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Time required to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Energy cost to cast technology/special ability. In order of technology id.&lt;br /&gt;
See [[#List of Technology IDs]] for technology ids.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SWNM&amp;quot; - Switch Names==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section contains the strings used for each switch. There are 256 switches, and can't be any more or any less.&lt;br /&gt;
* '''u32[256]''': One long for each switch, specifies the string number for the name of each switch. Unnamed switches will have an index of 0, and have a default switch name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;COLR&amp;quot; - Player Colors==&lt;br /&gt;
''Required for Brood War only and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 8 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section indicates what color each player is, but only has effect on Brood War.&lt;br /&gt;
* '''u8[8]''': 1 byte for each player, indicates the color of the player&lt;br /&gt;
** '''00''' - Red&lt;br /&gt;
** '''01''' - Blue&lt;br /&gt;
** '''02''' - Teal&lt;br /&gt;
** '''03''' - Purple&lt;br /&gt;
** '''04''' - Orange&lt;br /&gt;
** '''05''' - Brown&lt;br /&gt;
** '''06''' - White&lt;br /&gt;
** '''07''' - Yellow&lt;br /&gt;
** '''08''' - Green&lt;br /&gt;
** '''09''' - Pale yellow&lt;br /&gt;
** '''10''' - Tan&lt;br /&gt;
** '''11''' - Azure (Neutral color)&lt;br /&gt;
Other values can be used but may have different results depending on the tileset. Any color value above 11 is an overflow. As of patch 1.18.6, values above 11 result in default player color.&lt;br /&gt;
&lt;br /&gt;
When CRGB is present, this section still defines leaderboard colors.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;CRGB&amp;quot; - Remastered Player Colors==&lt;br /&gt;
''Requirement unknown, but can be in any map type including non-remaster maps.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 32 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''u8[8][3]''': 3 bytes for each player corresponding to an RGB color value&lt;br /&gt;
** '''u8''': R&lt;br /&gt;
** '''u8''': G&lt;br /&gt;
** '''u8''': B, or color ID for type 3&lt;br /&gt;
* '''u8[8]''': Indicates how to select the color for each player&lt;br /&gt;
** '''0''' - Random Predefined&lt;br /&gt;
** '''1''' - Player's Choice&lt;br /&gt;
** '''2''' - Custom RGB Color (RGB value for the corresponding player defined above)&lt;br /&gt;
** '''3''' - Use color ID in the &amp;quot;B&amp;quot; color channel (&amp;quot;R&amp;quot; and &amp;quot;G&amp;quot; values appear to contain junk data); leaderboard color is still defined by COLR section and can be set independently&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SC:R Only color IDs:&amp;lt;br&amp;gt;&lt;br /&gt;
Extends the [[#&amp;quot;COLR&amp;quot; - Player Colors|COLR]] section list of colors, but cannot be used in the COLR section.&lt;br /&gt;
* '''12''' - Pale Green&lt;br /&gt;
* '''13''' - Blueish Grey&lt;br /&gt;
* '''14''' - Cyan&lt;br /&gt;
* '''15''' - Pink&lt;br /&gt;
* '''16''' - Olive&lt;br /&gt;
* '''17''' - Lime&lt;br /&gt;
* '''18''' - Navy&lt;br /&gt;
* '''19''' - Magenta&lt;br /&gt;
* '''20''' - Grey&lt;br /&gt;
* '''21''' - Black&lt;br /&gt;
* '''22+''' - Random (can pick colors that have been used)&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PUPx&amp;quot; - BW Upgrade Restrictions==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2318 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UPGR&amp;quot; - Upgrade Restrictions|&amp;quot;UPGR&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is identical to UPGR section except it uses the Brood War set of 61 upgrades instead of the original 46.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PTEx&amp;quot; - BW Tech Restrictions==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1672 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;PTEC&amp;quot; - Tech Restrictions|&amp;quot;PTEC&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is identical to PTEC section except it uses the Brood War set of 44 technologies instead of the original 24.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIx&amp;quot; - BW Unit Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4168 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UNIS&amp;quot; - Unit Settings|&amp;quot;UNIS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is indentical to UNIS section except it uses the Brood War set of 130 weapons instead of the original 100.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGx&amp;quot; - BW Upgrade Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 794 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UPGS&amp;quot; - Upgrade Settings|&amp;quot;UPGS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section the same as UPGS except section except it uses the Brood War set of 61 upgrades instead of the original 46, and there is an unused byte after the first set:&lt;br /&gt;
* '''u8[61]''': 1 byte per each upgrade, in order of upgrade id.&lt;br /&gt;
** '''00''' - Upgrade uses custom settings&lt;br /&gt;
** '''01''' - Upgrade uses default settings&lt;br /&gt;
* '''u8''': Unused.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, time factor for each upgrade, in order of upgrade id.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TECx&amp;quot; - BW Tech Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 396 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;TECS&amp;quot; - Tech Settings|&amp;quot;TECS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is indentical to TECS section except it uses the Brood War set of 44 technologies instead of the original 24.&lt;br /&gt;
&lt;br /&gt;
=Appendix=&lt;br /&gt;
A set of references and IDs that should help you easier in the trigger section and the technology/player ids, etc:&lt;br /&gt;
&lt;br /&gt;
==Trigger Conditions List==&lt;br /&gt;
* 0 = No Condition&lt;br /&gt;
* 1 = Countdown Timer(Comparison, QNumber)&lt;br /&gt;
* 2 = Command(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 3 = Bring(Player, Comparison, TUnit, Loc, QNumber)&lt;br /&gt;
* 4 = Accumulate(Player, Comparison, QNumber, ResType)&lt;br /&gt;
* 5 = Kill(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 6 = Command the Most(TUnit)&lt;br /&gt;
* 7 = Commands the Most At(TUnit, Loc)&lt;br /&gt;
* 8 = Most Kills(TUnit)&lt;br /&gt;
* 9 = Highest Score(Score)&lt;br /&gt;
* 10 = Most Resources(ResType)&lt;br /&gt;
* 11 = Switch(Switch)&lt;br /&gt;
* 12 = Elapsed Time(Comparison, QNumber)&lt;br /&gt;
* 13 = Data is a Mission Briefing. Conditions are N/A (Same as Never)&lt;br /&gt;
* 14 = Opponents(Player, Comparison, QNumber)&lt;br /&gt;
* 15 = Deaths(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 16 = Command the Least(TUnit)&lt;br /&gt;
* 17 = Command the Least At(TUnit, Loc)&lt;br /&gt;
* 18 = Least Kills(TUnit)&lt;br /&gt;
* 19 = Lowest Score(Score)&lt;br /&gt;
* 20 = Least Resources(ResType)&lt;br /&gt;
* 21 = Score(Player, Comparison, Score, QNumber)&lt;br /&gt;
* 22 = Always (Same as No Condition)&lt;br /&gt;
* 23 = Never&lt;br /&gt;
&lt;br /&gt;
==Trigger Actions List==&lt;br /&gt;
* 0 = No Action&lt;br /&gt;
* 1 = Victory&lt;br /&gt;
* 2 = Defeat&lt;br /&gt;
* 3 = Preserve Trigger&lt;br /&gt;
* 4 = Wait(Time)&lt;br /&gt;
* 5 = Pause Game (Single player only)&lt;br /&gt;
* 6 = Unpause Game (Single player only)&lt;br /&gt;
* 7 = Transmission(Text, Unit, Loc, Time, Modifier, Wave, WavTime)&lt;br /&gt;
* 8 = Play WAV(Wav, WavTime)&lt;br /&gt;
* 9 = Display Text Message(Text)&lt;br /&gt;
* 10 = Center View(Loc)&lt;br /&gt;
* 11 = Create Unit with Properties(Player, Unit, Number, Loc, UnitProp)&lt;br /&gt;
* 12 = Set Mission Objectives(Text)&lt;br /&gt;
* 13 = Set Switch(Switch, SwAction)&lt;br /&gt;
* 14 = Set Countdown Timer(Time, Modifier)&lt;br /&gt;
* 15 = Run AI Script(AIScript)&lt;br /&gt;
* 16 = Run AI Script At Location(AIScript)&lt;br /&gt;
* 17 = Leader Board (Control) (Text, TUnit)&lt;br /&gt;
* 18 = Leader Board (Control At Location) (Text, TUnit, Loc)&lt;br /&gt;
* 19 = Leader Board (Resources) (Text, ResType)&lt;br /&gt;
* 20 = Leader Board (Kills) (Text, TUnit)&lt;br /&gt;
* 21 = Leader Board (Points) (Text, Score)&lt;br /&gt;
* 22 = Kill Unit (Player, TUnit)&lt;br /&gt;
* 23 = Kill Unit At Location(Player, TUnit, Number, Loc)&lt;br /&gt;
* 24 = Remove Unit(Player, TUnit)&lt;br /&gt;
* 25 = Remove Unit At Location(Player, TUnit, Number, Loc)&lt;br /&gt;
* 26 = Set Resources(Player, Number, Modifier, ResType)&lt;br /&gt;
* 27 = Set Score(Player, Number, Modifier, Score)&lt;br /&gt;
* 28 = Minimap Ping(Loc)&lt;br /&gt;
* 29 = Talking Portrait(Unit, Time)&lt;br /&gt;
* 30 = Mute Unit Speech&lt;br /&gt;
* 31 = Unmute Unit Speech&lt;br /&gt;
* 32 = Leaderboard Computer Players(State)&lt;br /&gt;
* 33 = Leaderboard Goal (Control) (Text, TUnit, Number)&lt;br /&gt;
* 34 = Leaderboard Goal (Control At Location) (Text, TUnit, Number, Loc)&lt;br /&gt;
* 35 = Leaderboard Goal (Resources) (Text, TUnit, Number, ResType)&lt;br /&gt;
* 36 = Leaderboard Goal (Kills) (Text, TUnit, Number)&lt;br /&gt;
* 37 = Leaderboard Goal (Points) (Text, Number, Score)&lt;br /&gt;
* 38 = Move Location(Player, TUnit, SLoc, DLoc)&lt;br /&gt;
* 39 = Move Unit(Player, TUnit, Number, SLoc, DLoc)&lt;br /&gt;
* 40 = Leaderboard (Greed) (Number)&lt;br /&gt;
* 41 = Set Next Scenario(Text) (Single player only)&lt;br /&gt;
* 42 = Set Doodad State(Player, TUnit, Loc, State)&lt;br /&gt;
* 43 = Set Invincibility(Player, TUnit, Loc, State)&lt;br /&gt;
* 44 = Create Unit(Player, Unit, Number, Loc)&lt;br /&gt;
* 45 = Set Deaths(Player, TUnit, Number, Modifier)&lt;br /&gt;
* 46 = Order(Player, TUnit, SLoc, DLoc, Order)&lt;br /&gt;
* 47 = Comment(Text)&lt;br /&gt;
* 48 = Give Units to Player(SPlayer, DPlayer, TUnit, Number, Loc)&lt;br /&gt;
* 49 = Modify Unit Hit Points(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 50 = Modify Unit Energy(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 51 = Modify Unit Shield Points(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 52 = Modify Unit Resource Amount(Player, Number, ModAmount, Loc)&lt;br /&gt;
* 53 = Modify Unit Hanger Count(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 54 = Pause Timer&lt;br /&gt;
* 55 = Unpause Timer&lt;br /&gt;
* 56 = Draw&lt;br /&gt;
* 57 = Set Alliance Status(Player, AllyStatus)&lt;br /&gt;
* 58 = Disable Debug Mode (Single player only)&lt;br /&gt;
* 59 = Enable Debug Mode (Single player only)&lt;br /&gt;
&lt;br /&gt;
==Mission Briefing Actions List==&lt;br /&gt;
* 0 - No Action&lt;br /&gt;
* 1 - Wait(Time)&lt;br /&gt;
* 2 - Play WAV(Wave, WavTime)&lt;br /&gt;
* 3 - Text Message(Text, Time)&lt;br /&gt;
* 4 - Mission Objectives(Text)&lt;br /&gt;
* 5 - Show Portrait(Unit, Slot)&lt;br /&gt;
* 6 - Hide Portrait(Slot)&lt;br /&gt;
* 7 - Display Speaking Portrait(Slot, Time)&lt;br /&gt;
* 8 - Transmission(Text, Slot, Time, Modifier, Wave, WavTime)&lt;br /&gt;
* 9 - Skip Tutorial Enabled&lt;br /&gt;
&lt;br /&gt;
==Switch States==&lt;br /&gt;
* 2 = Switch is set&lt;br /&gt;
* 3 = Switch is cleared&lt;br /&gt;
&lt;br /&gt;
==Numeric Comparisons==&lt;br /&gt;
* 0 = At least&lt;br /&gt;
* 1 = At most&lt;br /&gt;
* 10 = Exactly&lt;br /&gt;
&lt;br /&gt;
==Score Types==&lt;br /&gt;
* 0 = Total&lt;br /&gt;
* 1 = Units&lt;br /&gt;
* 2 = Buildings&lt;br /&gt;
* 3 = Units and Buildings&lt;br /&gt;
* 4 = Kills&lt;br /&gt;
* 5 = Razings&lt;br /&gt;
* 6 = Kills and Razings&lt;br /&gt;
* 7 = Custom&lt;br /&gt;
&lt;br /&gt;
==Resource Types==&lt;br /&gt;
* 0 = Ore&lt;br /&gt;
* 1 = Gas&lt;br /&gt;
* 2 = Ore and Gas&lt;br /&gt;
&lt;br /&gt;
==Alliance Statuses==&lt;br /&gt;
* 0 = Enemy&lt;br /&gt;
* 1 = Ally&lt;br /&gt;
* 2 = Allied Victory&lt;br /&gt;
&lt;br /&gt;
==Unit Orders==&lt;br /&gt;
* 0 = Move&lt;br /&gt;
* 1 = Patrol&lt;br /&gt;
* 2 = Attack&lt;br /&gt;
&lt;br /&gt;
==Action States==&lt;br /&gt;
* 4 = Enabled/Set switch&lt;br /&gt;
* 5  = Disabled/Clear switch&lt;br /&gt;
* 6 = Toggle/Toggle switch&lt;br /&gt;
* 11 = Randomize switch&lt;br /&gt;
&lt;br /&gt;
==Number Modifiers==&lt;br /&gt;
* 7 = Set to&lt;br /&gt;
* 8 = Add&lt;br /&gt;
* 9 = Subtract&lt;br /&gt;
&lt;br /&gt;
==Trigger Unit Types==&lt;br /&gt;
* All normal units (0-227)&lt;br /&gt;
* 228 = None&lt;br /&gt;
* 229 = Any unit&lt;br /&gt;
* 230 = Men&lt;br /&gt;
* 231 = Buildings&lt;br /&gt;
* 232 = Factories&lt;br /&gt;
&lt;br /&gt;
==List of Players/Group IDs==&lt;br /&gt;
* 0 = Player 1&lt;br /&gt;
* 1 = Player 2&lt;br /&gt;
* 2 = Player 3&lt;br /&gt;
* 3 = Player 4&lt;br /&gt;
* 4 = Player 5&lt;br /&gt;
* 5 = Player 6&lt;br /&gt;
* 6 = Player 7&lt;br /&gt;
* 7 = Player 8&lt;br /&gt;
* 8 = Player 9&lt;br /&gt;
* 9 = Player 10&lt;br /&gt;
* 10 = Player 11&lt;br /&gt;
* 11 = Player 12&lt;br /&gt;
* 12 = None (Unused, One-entry Overflow in some cases)&lt;br /&gt;
* 13 = Current Player&lt;br /&gt;
* 14 = Foes&lt;br /&gt;
* 15 = Allies&lt;br /&gt;
* 16 = Neutral Players&lt;br /&gt;
* 17 = All Players&lt;br /&gt;
* 18 = Force 1&lt;br /&gt;
* 19 = Force 2&lt;br /&gt;
* 20 = Force 3&lt;br /&gt;
* 21 = Force 4&lt;br /&gt;
* 22 = Unused 1&lt;br /&gt;
* 23 = Unused 2&lt;br /&gt;
* 24 = Unused 3&lt;br /&gt;
* 25 = Unused 4&lt;br /&gt;
* 26 = Non Allied Victory Players&lt;br /&gt;
&lt;br /&gt;
==List of Technology IDs==&lt;br /&gt;
* 0 = Stim Packs&lt;br /&gt;
* 1 = Lockdown&lt;br /&gt;
* 2 = EMP Shockwave&lt;br /&gt;
* 3 = Spider Mines&lt;br /&gt;
* 4 = Scanner Sweep&lt;br /&gt;
* 5 = Siege Mode&lt;br /&gt;
* 6 = Defensive Matrix&lt;br /&gt;
* 7 = Irradiate&lt;br /&gt;
* 8 = Yamato Gun&lt;br /&gt;
* 9 = Cloaking Field&lt;br /&gt;
* 10 = Personnel Cloaking&lt;br /&gt;
* 11 = Burrowing&lt;br /&gt;
* 12 = Infestation&lt;br /&gt;
* 13 = Spawn Broodling&lt;br /&gt;
* 14 = Dark Swarm&lt;br /&gt;
* 15 = Plague&lt;br /&gt;
* 16 = Consume&lt;br /&gt;
* 17 = Ensnare&lt;br /&gt;
* 18 = Parasite&lt;br /&gt;
* 19 = Psionic Storm&lt;br /&gt;
* 20 = Hallucination&lt;br /&gt;
* 21 = Recall&lt;br /&gt;
* 22 = Stasis Field&lt;br /&gt;
* 23 = Archon Warp&lt;br /&gt;
* 24 = Restoration&lt;br /&gt;
* 25 = Disruption Web&lt;br /&gt;
* 26 = Unused 26&lt;br /&gt;
* 27 = Mind Control&lt;br /&gt;
* 28 = Dark Archon Meld&lt;br /&gt;
* 29 = Feedback&lt;br /&gt;
* 30 = Optical Flare&lt;br /&gt;
* 31 = Maelstorm&lt;br /&gt;
* 32 = Lurker Aspect&lt;br /&gt;
* 33 = Unused 33&lt;br /&gt;
* 34 = Healing&lt;br /&gt;
* 35 = Unused 35&lt;br /&gt;
* 36 = Unused 36&lt;br /&gt;
* 37 = Unused 37&lt;br /&gt;
* 38 = Unused 38&lt;br /&gt;
* 39 = Unused 39&lt;br /&gt;
* 40 = Unused 40&lt;br /&gt;
* 41 = Unused 41&lt;br /&gt;
* 42 = Unused 42&lt;br /&gt;
* 43 = Unused 43&lt;br /&gt;
&lt;br /&gt;
==List of Upgrade IDs==&lt;br /&gt;
* 0 = Terran Infantry Armor&lt;br /&gt;
* 1 = Terran Vehicle Plating&lt;br /&gt;
* 2 = Terran Ship Plating&lt;br /&gt;
* 3 = Zerg Carapace&lt;br /&gt;
* 4 = Zerg Flyer Caparace&lt;br /&gt;
* 5 = Protoss Armor&lt;br /&gt;
* 6 = Protoss Plating&lt;br /&gt;
* 7 = Terran Infantry Weapons&lt;br /&gt;
* 8 = Terran Vehicle Weapons&lt;br /&gt;
* 9 = Terran Ship Weapons&lt;br /&gt;
* 10 = Zerg Melee Attacks&lt;br /&gt;
* 11 = Zerg Missile Attacks&lt;br /&gt;
* 12 = Zerg Flyer Attacks&lt;br /&gt;
* 13 = Protoss Ground Weapons&lt;br /&gt;
* 14 = Protoss Air Weapons&lt;br /&gt;
* 15 = Protoss Plasma Shields&lt;br /&gt;
* 16 = U-238 Shells&lt;br /&gt;
* 17 = Ion Thrusters&lt;br /&gt;
* 18 = Burst Lasers (Unused)&lt;br /&gt;
* 19 = Titan Reactor (SV +50)&lt;br /&gt;
* 20 = Ocular Implants&lt;br /&gt;
* 21 = Moebius Reactor (Ghost +50)&lt;br /&gt;
* 22 = Apollo Reactor (Wraith +50)&lt;br /&gt;
* 23 = Colossus Reactor (BC +50)&lt;br /&gt;
* 24 = Ventral Sacs&lt;br /&gt;
* 25 = Antennae&lt;br /&gt;
* 26 = Pneumatized Carapace&lt;br /&gt;
* 27 = Metabolic Boost&lt;br /&gt;
* 28 = Adrenal Glands&lt;br /&gt;
* 29 = Muscular Augments&lt;br /&gt;
* 30 = Grooved Spines&lt;br /&gt;
* 31 = Gamete Meiosis (Queen +50)&lt;br /&gt;
* 32 = Metasynaptic Node (Defiler +50)&lt;br /&gt;
* 33 = Singularity Charge&lt;br /&gt;
* 34 = Leg Enhancements&lt;br /&gt;
* 35 = Scarab Damage &lt;br /&gt;
* 36 = Reaver Capacity &lt;br /&gt;
* 37 = Gravitic Drive&lt;br /&gt;
* 38 = Sensor Array&lt;br /&gt;
* 39 = Gravitic Boosters&lt;br /&gt;
* 40 = Khaydarin Amulet (HT +50)&lt;br /&gt;
* 41 = Apial Sensors&lt;br /&gt;
* 42 = Gravitic Thrusters&lt;br /&gt;
* 43 = Carrier Capacity&lt;br /&gt;
* 44 = Khaydarin Core (Arbiter +50)&lt;br /&gt;
* 45 = Unknown Upgrade45&lt;br /&gt;
* 46 = Unknown Upgrade46&lt;br /&gt;
* 47 = Argus Jewel (Corsair +50)&lt;br /&gt;
* 48 = Unknown Upgrade48&lt;br /&gt;
* 49 = Argus Talisman (DA +50)&lt;br /&gt;
* 50 = Unknown Upgrade50&lt;br /&gt;
* 51 = Caduceus Reactor (Medic +50)&lt;br /&gt;
* 52 = Chitinous Plating&lt;br /&gt;
* 53 = Anabolic Synthesis&lt;br /&gt;
* 54 = Charon Booster&lt;br /&gt;
* 55 = Unknown Upgrade55&lt;br /&gt;
* 56 = Unknown Upgrade56&lt;br /&gt;
* 57 = Unknown Upgrade57&lt;br /&gt;
* 58 = Unknown Upgrade58&lt;br /&gt;
* 59 = Unknown Upgrade59&lt;br /&gt;
* 60 = Unknown Upgrade60&lt;br /&gt;
&lt;br /&gt;
==List of Unit Weapon IDs==&lt;br /&gt;
* 0 = Gauss Rifle (Normal)&lt;br /&gt;
* 1 = Gauss Rifle (Jim Raynor-Marine)&lt;br /&gt;
* 2 = C-10 Concussion Rifle (Normal)&lt;br /&gt;
* 3 = C-10 Concussion Rifle (Sarah Kerrigan)&lt;br /&gt;
* 4 = Fragmentation Grenade (Normal)&lt;br /&gt;
* 5 = Fragmentation Grenade (Jim Raynor-Vulture)&lt;br /&gt;
* 6 = Spider Mines&lt;br /&gt;
* 7 = Twin Autocannons (Normal)&lt;br /&gt;
* 8 = Hellfire Missile Pack (Normal)&lt;br /&gt;
* 9 = Twin Autocannons (Alan Schezar)&lt;br /&gt;
* 10 = Hellfire Missile Pack (Alan Schezar)&lt;br /&gt;
* 11 = Arclite Cannon (Normal)&lt;br /&gt;
* 12 = Arclite Cannon (Edmund Duke)&lt;br /&gt;
* 13 = Fusion Cutter&lt;br /&gt;
* 14 = Fusion Cutter (Harvest)&lt;br /&gt;
* 15 = Gemini Missiles (Normal)&lt;br /&gt;
* 16 = Burst Lasers (Normal)&lt;br /&gt;
* 17 = Gemini Missiles (Tom Kazansky)&lt;br /&gt;
* 18 = Burst Lasers (Tom Kazansky)&lt;br /&gt;
* 19 = ATS Laser Battery (Normal)&lt;br /&gt;
* 20 = ATA Laser Battery (Normal)&lt;br /&gt;
* 21 = ATS Laser Battery (Norad II+Mengsk+DuGalle)&lt;br /&gt;
* 22 = ATA Laser Battery (Norad II+Mengsk+DuGalle)&lt;br /&gt;
* 23 = ATS Laser Battery (Hyperion)&lt;br /&gt;
* 24 = ATA Laser Battery (Hyperion)&lt;br /&gt;
* 25 = Flame Thrower (Normal)&lt;br /&gt;
* 26 = Flame Thrower (Gui Montag)&lt;br /&gt;
* 27 = Arclite Shock Cannon (Normal)&lt;br /&gt;
* 28 = Arclite Shock Cannon (Edmund Duke)&lt;br /&gt;
* 29 = Longbolt Missiles&lt;br /&gt;
* 30 = Yamato Gun&lt;br /&gt;
* 31 = Nuclear Missile&lt;br /&gt;
* 32 = Lockdown&lt;br /&gt;
* 33 = EMP Shockwave&lt;br /&gt;
* 34 = Irradiate&lt;br /&gt;
* 35 = Claws (Normal)&lt;br /&gt;
* 36 = Claws (Devouring One)&lt;br /&gt;
* 37 = Claws (Infested Kerrigan)&lt;br /&gt;
* 38 = Needle Spines (Normal)&lt;br /&gt;
* 39 = Needle Spines (Hunter Killer)&lt;br /&gt;
* 40 = Kaiser Blades (Normal)&lt;br /&gt;
* 41 = Kaiser Blades (Torrasque)&lt;br /&gt;
* 42 = Toxic Spores (Broodling)&lt;br /&gt;
* 43 = Spines&lt;br /&gt;
* 44 = Spines (Harvest)&lt;br /&gt;
* 45 = Acid Spray (Unused)&lt;br /&gt;
* 46 = Acid Spore (Normal)&lt;br /&gt;
* 47 = Acid Spore (Kukulza-Guardian)&lt;br /&gt;
* 48 = Glave Wurm (Normal)&lt;br /&gt;
* 49 = Glave Wurm (Kukulza-Mutalisk)&lt;br /&gt;
* 50 = Venom (Unused-Defiler)&lt;br /&gt;
* 51 = Venom (Unused-Defiler Hero)&lt;br /&gt;
* 52 = Seeker Spores&lt;br /&gt;
* 53 = Subterranean Tentacle&lt;br /&gt;
* 54 = Suicide (Infested Terran)&lt;br /&gt;
* 55 = Suicide (Scourge)&lt;br /&gt;
* 56 = Parasite&lt;br /&gt;
* 57 = Spawn Broodlings&lt;br /&gt;
* 58 = Ensnare&lt;br /&gt;
* 59 = Dark Swarm&lt;br /&gt;
* 60 = Plague&lt;br /&gt;
* 61 = Consume&lt;br /&gt;
* 62 = Particle Beam&lt;br /&gt;
* 63 = Particle Beam (Harvest)&lt;br /&gt;
* 64 = Psi Blades (Normal)&lt;br /&gt;
* 65 = Psi Blades (Fenix-Zealot)&lt;br /&gt;
* 66 = Phase Disruptor (Normal)&lt;br /&gt;
* 67 = Phase Disruptor (Fenix-Dragoon)&lt;br /&gt;
* 68 = Psi Assault (Normal-Unused)&lt;br /&gt;
* 69 = Psi Assault (Tassadar+Aldaris)&lt;br /&gt;
* 70 = Psionic Shockwave (Normal)&lt;br /&gt;
* 71 = Psionic Shockwave (Tassadar/Zeratul Archon)&lt;br /&gt;
* 72 = Unknown72&lt;br /&gt;
* 73 = Dual Photon Blasters (Normal)&lt;br /&gt;
* 74 = Anti-matter Missiles (Normal)&lt;br /&gt;
* 75 = Dual Photon Blasters (Mojo)&lt;br /&gt;
* 76 = Anit-matter Missiles (Mojo)&lt;br /&gt;
* 77 = Phase Disruptor Cannon (Normal)&lt;br /&gt;
* 78 = Phase Disruptor Cannon (Danimoth)&lt;br /&gt;
* 79 = Pulse Cannon&lt;br /&gt;
* 80 = STS Photon Cannon&lt;br /&gt;
* 81 = STA Photon Cannon&lt;br /&gt;
* 82 = Scarab&lt;br /&gt;
* 83 = Stasis Field&lt;br /&gt;
* 84 = Psi Storm&lt;br /&gt;
* 85 = Warp Blades (Zeratul)&lt;br /&gt;
* 86 = Warp Blades (Dark Templar Hero)&lt;br /&gt;
* 87 = Missiles (Unused)&lt;br /&gt;
* 88 = Laser Battery1 (Unused)&lt;br /&gt;
* 89 = Tormentor Missiles (Unused)&lt;br /&gt;
* 90 = Bombs (Unused)&lt;br /&gt;
* 91 = Raider Gun (Unused)&lt;br /&gt;
* 92 = Laser Battery2 (Unused)&lt;br /&gt;
* 93 = Laser Battery3 (Unused)&lt;br /&gt;
* 94 = Dual Photon Blasters (Unused)&lt;br /&gt;
* 95 = Flechette Grenade (Unused)&lt;br /&gt;
* 96 = Twin Autocannons (Floor Trap)&lt;br /&gt;
* 97 = Hellfire Missile Pack (Wall Trap)&lt;br /&gt;
* 98 = Flame Thrower (Wall Trap)&lt;br /&gt;
* 99 = Hellfire Missile Pack (Floor Trap)&lt;br /&gt;
* 100 = Neutron Flare&lt;br /&gt;
* 101 = Disruption Web&lt;br /&gt;
* 102 = Restoration&lt;br /&gt;
* 103 = Halo Rockets&lt;br /&gt;
* 104 = Corrosive Acid&lt;br /&gt;
* 105 = Mind Control&lt;br /&gt;
* 106 = Feedback&lt;br /&gt;
* 107 = Optical Flare&lt;br /&gt;
* 108 = Maelstrom&lt;br /&gt;
* 109 = Subterranean Spines&lt;br /&gt;
* 110 = Gauss Rifle0 (Unused)&lt;br /&gt;
* 111 = Warp Blades (Normal)&lt;br /&gt;
* 112 = C-10 Concussion Rifle (Samir Duran)&lt;br /&gt;
* 113 = C-10 Concussion Rifle (Infested Duran)&lt;br /&gt;
* 114 = Dual Photon Blasters (Artanis)&lt;br /&gt;
* 115 = Anti-matter Missiles (Artanis)&lt;br /&gt;
* 116 = C-10 Concussion Rifle (Alexei Stukov)&lt;br /&gt;
* 117 = Gauss Rifle1 (Unused)&lt;br /&gt;
* 118 = Gauss Rifle2 (Unused)&lt;br /&gt;
* 119 = Gauss Rifle3 (Unused)&lt;br /&gt;
* 120 = Gauss Rifle4 (Unused)&lt;br /&gt;
* 121 = Gauss Rifle5 (Unused)&lt;br /&gt;
* 122 = Gauss Rifle6 (Unused)&lt;br /&gt;
* 123 = Gauss Rifle7 (Unused)&lt;br /&gt;
* 124 = Gauss Rifle8 (Unused)&lt;br /&gt;
* 125 = Gauss Rifle9 (Unused)&lt;br /&gt;
* 126 = Gauss Rifle10 (Unused)&lt;br /&gt;
* 127 = Gauss Rifle11 (Unused)&lt;br /&gt;
* 128 = Gauss Rifle12 (Unused)&lt;br /&gt;
* 129 = Gauss Rifle13 (Unused)&lt;br /&gt;
* 130 = None&lt;br /&gt;
&lt;br /&gt;
==Complete Modifier List==&lt;br /&gt;
* 0 = Condition: &amp;gt;= (greater than or equal to)&lt;br /&gt;
* 1 = Condition: &amp;lt;= (less than or equal to)&lt;br /&gt;
* 2 = Condition: == TRUE (Is True)&lt;br /&gt;
* 3 = Condition: == FALSE (Is False)&lt;br /&gt;
* 4 = Action: = TRUE (Set to True)&lt;br /&gt;
* 5 = Action: = FALSE (Set to False)&lt;br /&gt;
* 6 = Action: NOT (toggle)&lt;br /&gt;
* 7 = Action: = (Set to)&lt;br /&gt;
* 8 = Action: += (Add)&lt;br /&gt;
* 9 = Action: -= (Subtract)&lt;br /&gt;
* 10 = Condition: == (Exactly)&lt;br /&gt;
* 11 = Action: Randomize&lt;br /&gt;
&lt;br /&gt;
[[Category:StarCraft]]&lt;br /&gt;
[[Category:Reference]]&lt;/div&gt;</summary>
		<author><name>FaRTy1billion</name></author>	</entry>

	<entry>
		<id>https://staredit.net/wiki/index.php?title=Scenario.chk&amp;diff=664</id>
		<title>Scenario.chk</title>
		<link rel="alternate" type="text/html" href="https://staredit.net/wiki/index.php?title=Scenario.chk&amp;diff=664"/>
				<updated>2022-07-23T23:44:11Z</updated>
		
		<summary type="html">&lt;p&gt;FaRTy1billion: /* &amp;quot;ISOM&amp;quot; - Isometric Terrain */ Fixed linebreaks&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The CHK file is a very dense file found inside the SCM or SCX file (as &amp;quot;staredit\scenario.chk&amp;quot;), which is just a renamed MPQ archive.&lt;br /&gt;
&lt;br /&gt;
In this article, some shorthand will be used for datatypes:&lt;br /&gt;
* '''u8''' for an unsigned byte&lt;br /&gt;
* '''u16''' for an unsigned short (2-byte integer)&lt;br /&gt;
* '''u32''' for an unsigned int (4-byte integer)&lt;br /&gt;
* '''uT[''a'']''' for an array of datatype '''T''' (8, 16, 32) with '''''a''''' number of elements&lt;br /&gt;
* '''uT[''a''][''b'']''' for a two-dimensional array of datatype '''T''', where each element of '''T[''a'']''' will be an array of size '''''b'''''&lt;br /&gt;
&lt;br /&gt;
=Sections=&lt;br /&gt;
The CHK is split into several named chunks (hence the file extension, an abbreviation of ''CHunK'').&lt;br /&gt;
&lt;br /&gt;
Each section begins with an 8-byte header:&lt;br /&gt;
* '''u32''' Name - A 4-byte string uniquely identifying that chunk's purpose.&lt;br /&gt;
* '''u32''' Size - The size, in bytes, of the chunk (not including this header)&lt;br /&gt;
Followed by as many bytes as 'Size', in a format described below.&lt;br /&gt;
&lt;br /&gt;
Some things to keep in mind about the CHK section:&lt;br /&gt;
* Invalid sections can exist and will be ignored. While Size is unsigned, it can safely be a negative value to read a chunk earlier in the file. This allows for &amp;quot;section stacking&amp;quot;, allowing smaller sections to be placed inside of larger ones or duplicate triggers or units to take less space in the file.&lt;br /&gt;
* All sections will marked &amp;quot;Not required.&amp;quot; are never read by StarCraft and can safely be omitted. However they may or may not be read by StarEdit, and may cause the map to be unreadable in an editor.&lt;br /&gt;
* Note &amp;quot;Hybrid&amp;quot;, or &amp;quot;Enhanced&amp;quot;, maps were introduced in 1.04. They are supported both by Original StarCraft and Brood War and usually contain sections for both types (e.g., UPGS and UPGx, TECS and TECx), but both sections aren't necessarily read.&lt;br /&gt;
* Duplicate sections will overwrite previously defined section data, except where noted. Note this only applies to those section that pass the specified &amp;quot;validation&amp;quot; parameters, as any section that does not successfully validate will be ignored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TYPE&amp;quot; - Map Type==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the type of scenario.&lt;br /&gt;
* '''u32''': Specifies the type of scenario:&lt;br /&gt;
** '''0x53574152''' or '''RAWS''' - 1.04 StarCraft and above (&amp;quot;hybrid&amp;quot;)&lt;br /&gt;
** '''0x42574152''' or '''RAWB''' - Brood War&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;VER &amp;quot; - Format Version==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section identifies the file format version.&lt;br /&gt;
* '''u16''': File format version:&lt;br /&gt;
** '''59''' - Starcraft 1.00 (original retail release)&lt;br /&gt;
** '''63''' - Starcraft 1.04 ''(hybrid)''&lt;br /&gt;
** '''64''' - Starcraft Remastered (1.21) ''(hybrid)''&lt;br /&gt;
** '''205''' - Brood War 1.00 ''(1.04)''&lt;br /&gt;
** '''206''' - Starcraft Remastered (1.21) ''(broodwar)''&lt;br /&gt;
This is the only version code section to actually be read by StarCraft (of TYPE, VER , IVER, and IVE2). Any other value is invalid in retail StarCraft and is usually a beta version.&lt;br /&gt;
&lt;br /&gt;
Other unsupported versions include:&lt;br /&gt;
* '''0-19''' - ''Warcraft II versions (.PUD)''&lt;br /&gt;
* '''47''' - ''Starcraft Beta''&lt;br /&gt;
* '''61''' - Brood War internal (map version 61)&lt;br /&gt;
* '''75''' - Brood War internal (map version 75)&lt;br /&gt;
* '''201''' - Brood War internal (map version 201)&lt;br /&gt;
* '''203''' - Brood War internal (map version 203)&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IVER&amp;quot; - Map Version==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section &amp;quot;additionally identifies&amp;quot; the map version.&lt;br /&gt;
* '''u16''': &amp;quot;Additional file format version:&amp;quot;&lt;br /&gt;
** '''9''' - beta/obsolete versions&lt;br /&gt;
** '''10''' - current versions&lt;br /&gt;
When saving as expansion this section gets removed entirely. Contrary to popular belief, it doesn't get &amp;quot;replaced&amp;quot; by IVE2 in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IVE2&amp;quot; - Map Version==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section &amp;quot;additionally identifies&amp;quot; the map version.&lt;br /&gt;
* '''u16''': &amp;quot;Additional file format version:&amp;quot;&lt;br /&gt;
** '''11''' - 1.04 StarCraft and above (&amp;quot;hybrid&amp;quot;) or Brood War.&lt;br /&gt;
This section does not &amp;quot;replace&amp;quot; IVER in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;VCOD&amp;quot; - Verification Code==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be equal to size of the VCOD data in the EXE resource. Must result in valid checksum.''&lt;br /&gt;
&lt;br /&gt;
This section has a verification code to make sure this is actually a CHK file.&lt;br /&gt;
&lt;br /&gt;
* '''u32[256]''': Seed values.&lt;br /&gt;
* '''u8[16]''': Operation codes to produce the resulting hash:&lt;br /&gt;
** '''00''' - XOR's the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''01''' - Adds to the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''02''' - Subtracts from the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''03''' - XOR's the current hash with the VCOD table at index OWNR, SIDE, FORC, and 0&lt;br /&gt;
** '''04''' - same as 0x03&lt;br /&gt;
** '''05''' - same as 0x03&lt;br /&gt;
** '''06''' - Complex function consisting of ORs and shifts&lt;br /&gt;
** '''07''' - Inverted version of 0x06, switching direction of all shifts&lt;br /&gt;
** '''08+''' - Do nothing&lt;br /&gt;
Opcodes and seeds do not have to match those in EXE resource, as long as the same value is produced.&amp;lt;br&amp;gt;&lt;br /&gt;
The only indexes in the seed table that are referenced are those that correspond individual values of [[#&amp;quot;OWNR&amp;quot; - StarCraft Player Types|OWNR]], [[#&amp;quot;SIDE&amp;quot; - Player Races|SIDE]], [[#&amp;quot;FORC&amp;quot; - Force Settings|FORC]] player assignments, and index 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IOWN&amp;quot; - StarEdit Player Types==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the owner of each player.&lt;br /&gt;
* '''u8[12]''': One byte for each player, specifies the owner of the player:&lt;br /&gt;
** '''00''' - Inactive&lt;br /&gt;
** ''01'' - Computer (game)&lt;br /&gt;
** ''02'' - Occupied by Human Player&lt;br /&gt;
** '''03''' - Rescue Passive&lt;br /&gt;
** '''04''' - Unused&lt;br /&gt;
** '''05''' - Computer&lt;br /&gt;
** '''06''' - Human (Open Slot)&lt;br /&gt;
** '''07''' - Neutral&lt;br /&gt;
** ''08'' - Closed slot&lt;br /&gt;
This section is separate from OWNR as a staredit value. Staredit does not display &amp;quot;inactive&amp;quot; as a valid option. Italicized settings denote invalid map options, which may involve a buffer overflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;OWNR&amp;quot; - StarCraft Player Types==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 12 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section designates the controller of a particular player. It is exactly the same as the &amp;quot;IOWN&amp;quot; section, except there is an additional value, 0x00 for Inactive.&lt;br /&gt;
* '''u8[12]''': One byte for each player, specifies the owner of the player:&lt;br /&gt;
** '''00''' - Inactive&lt;br /&gt;
** ''01'' - Computer (game)&lt;br /&gt;
** ''02'' - Occupied by Human Player&lt;br /&gt;
** '''03''' - Rescue Passive&lt;br /&gt;
** '''04''' - Unused&lt;br /&gt;
** '''05''' - Computer&lt;br /&gt;
** '''06''' - Human (Open Slot)&lt;br /&gt;
** '''07''' - Neutral&lt;br /&gt;
** ''08'' - Closed slot&lt;br /&gt;
Italicized settings denote invalid map options, which may involve a buffer overflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;ERA &amp;quot; - Tileset==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section indicates the tileset of the scenario.&lt;br /&gt;
* '''u16''': Designates tileset:&lt;br /&gt;
** '''00''' - Badlands&lt;br /&gt;
** '''01''' - Space Platform&lt;br /&gt;
** '''02''' - Installation&lt;br /&gt;
** '''03''' - Ashworld&lt;br /&gt;
** '''04''' - Jungle&lt;br /&gt;
** '''05''' - Desert&lt;br /&gt;
** '''06''' - Arctic&lt;br /&gt;
** '''07''' - Twilight&lt;br /&gt;
StarCraft masks the tileset indicator's bit value, so bits after the third place (anything after the value &amp;quot;7&amp;quot;) are removed. Thus, 9 (1001 in binary) is interpreted as 1 (0001), 10 (1010) as 2 (0010), etc.&amp;lt;br&amp;gt;&lt;br /&gt;
Desert, Arctic, and Twilight are Brood War-only tilesets.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;DIM &amp;quot; - Map Dimensions==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains the dimensions of the map.&lt;br /&gt;
* '''u16''': Width of the map&lt;br /&gt;
* '''u16''': Height of the map&lt;br /&gt;
The Width/Height of the map is measured in the number of square 32x32p tiles.&amp;lt;br&amp;gt;&lt;br /&gt;
Standard Dimensions are 64, 96, 128, 192, and 256.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SIDE&amp;quot; - Player Races==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 12 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains the species/race of each player.&lt;br /&gt;
* '''u8[12]''': 1 byte per player the species of that player:&lt;br /&gt;
** '''00''' - Zerg&lt;br /&gt;
** '''01''' - Terran&lt;br /&gt;
** '''02''' - Protoss&lt;br /&gt;
** ''03'' - Invalid (Independent), shown as &amp;quot;Unknown&amp;quot; in SC:R lobby&lt;br /&gt;
** ''04'' - Invalid (Neutral), shown as &amp;quot;Unknown&amp;quot;&lt;br /&gt;
** '''05''' - User Select&lt;br /&gt;
** '''06''' - Random (Forced; Acts as a selected race)&lt;br /&gt;
** ''07'' - Inactive, shown as locked &amp;quot;Select Race&amp;quot; option in SC:R lobby&lt;br /&gt;
Italicized settings denote invalid map options. Note Players 9-11 are defaultly Inactive and Player 12 is defaultly Neutral.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MTXM&amp;quot; - StarCraft Terrain==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be less than or equal to 131072 (0x20000) bytes (256 * 256 * 2).''&lt;br /&gt;
&lt;br /&gt;
Terrain section that contains a map of the level's appearance. StarEdit disregards this section and instead uses [[#&amp;quot;TILE&amp;quot; - StarEdit Terrain|TILE]]; it is only used in Starcraft.&lt;br /&gt;
* '''u16[map width * height]''': one integer for each tile.&lt;br /&gt;
Notes about MTXM:&lt;br /&gt;
* The Width/Height of the map is measured in the number of square 32x32p tiles.&lt;br /&gt;
* Tiles in this section are listed from left to right, top to bottom.&lt;br /&gt;
* The values for each integer are their respective &amp;quot;MegaTile&amp;quot; values in the scenario's tileset. If the size of this section is greater than width*height*2, the data following is ignored. If the size of this section is less, the resulting tiles that have not been defined will be null tiles.&lt;br /&gt;
* This section includes doodads as terrain; TILE, which is otherwise identical, doesn't. Out of the terrain sections (TILE, ISOM, and MTXM), SC only reads MTXM for the sake of not having to generate this data on-the-fly: it contains the exact representation of the level's appearance, including doodads. TILE, on the other hand, is directly tied via a tile lookup function to ISOM, and exists for the sake of not having to generate tiles from ISOM on-the-fly in StarEdit.&lt;br /&gt;
* If MTXM section is smaller than (map width*height), then the remaining tiles will be filled with null tiles or tiles specified by previous MTXM sections.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PUNI&amp;quot; - Player Unit Restrictions==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 5700 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains player unit restrictions: it indicates whether the player can or cannot build a particular unit.&lt;br /&gt;
* '''u8[228][12]''': 1 byte for each unit in order of its unit id, then each player, for player availability:&lt;br /&gt;
** '''00''' - That unit is not available for production if the player has 'override defaults' on&lt;br /&gt;
** '''01''' - That unit is available for production if the player has 'override defaults' on&lt;br /&gt;
* '''u8[228]''': 1 byte for each unit in order of it's unit id, for global availability defaults (for all players):&lt;br /&gt;
** '''00''' - That unit is not available for production&lt;br /&gt;
** '''01''' - That unit is available for production&lt;br /&gt;
* '''u8[228][12]''': 1 byte for each unit in order of its unit id, then each player, indicating whether a player uses the global availability defaults.&lt;br /&gt;
** '''00''' - Player overrides defaults for this unit&lt;br /&gt;
** '''01''' - Player uses defaults for this unit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGR&amp;quot; - Upgrade Restrictions==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1748 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;PUPx&amp;quot; - BW Upgrade Restrictions|&amp;quot;PUPx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains player upgrade restrictions: it indicates the starting/maximum levels at/to which a player can perform a particular upgrade.&lt;br /&gt;
* '''u8[46][12]''': 1 byte for the maximum level a player can upgrade to, in order of its upgrade id, then each player&lt;br /&gt;
* '''u8[46][12]''': 1 byte for the level of an upgrade a player starts off with, in order of its upgrade id, then each player&lt;br /&gt;
* '''u8[46]''': 1 byte for the global default maximum level of each upgrade, in order of its upgrade id.&lt;br /&gt;
* '''u8[46]''': 1 byte for the global default starting level of each upgrade, in order of its upgrade id.&lt;br /&gt;
* '''u8[46][12]''': 1 byte for each upgrade in order of its upgrade id, then each player, indicating whether a player uses the global upgrade defaults:&lt;br /&gt;
** '''00''' - Player does not use global upgrade defaults for this upgrade&lt;br /&gt;
** '''01''' - Player uses upgrade defaults for this upgrade&lt;br /&gt;
See [[#List of Upgrade IDs]].&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PTEC&amp;quot; - Tech Restrictions==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 912 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;PTEx&amp;quot; - BW Tech Restrictions|&amp;quot;PTEx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains player technology availability restrictions: it indicates whether a player starts off with a particular technology or can research a particular technology.&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology id, then each player, for player availability:&lt;br /&gt;
** '''00''' - Technology is not available for a player&lt;br /&gt;
** '''01''' - Technology is available for a player&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology id, then each player, for &amp;quot;already researched&amp;quot; status:&lt;br /&gt;
** '''00''' - Technology is not already researched&lt;br /&gt;
** '''01''' - Technology is already researched&lt;br /&gt;
* '''u8[24]''': 1 byte for each technology for global availability defaults:&lt;br /&gt;
** '''00''' - Technology is not available by default&lt;br /&gt;
** '''01''' - Technology is available by default&lt;br /&gt;
* '''u8[24]''': 1 byte for each technology for global &amp;quot;already researched&amp;quot; defaults:&lt;br /&gt;
** '''00''' - Technology is not already researched by default&lt;br /&gt;
** '''01''' - Technology is already researched by default&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology in order of its technology id, then each player, indicating whether a player uses the global defaults:&lt;br /&gt;
** '''00''' - Technology overrides defaults for player&lt;br /&gt;
** '''01''' - Technology uses default settings for player&lt;br /&gt;
See [[#List of Technology IDs]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIT&amp;quot; - Placed Units==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 36 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the pre-placed units on the map and their properties. Each unit on the map gets the following structure:&lt;br /&gt;
* '''u32''': The unit's class instance (sort of a &amp;quot;serial number&amp;quot;)&lt;br /&gt;
* U16''': X coordinate of unit&lt;br /&gt;
* U16''': Y coordinate of unit&lt;br /&gt;
* '''u16''': Unit ID&lt;br /&gt;
* '''u16''': Type of relation to another building (i.e. add-on, nydus link)&lt;br /&gt;
** '''Bit 9''' - Nydus Link&lt;br /&gt;
** '''Bit 10''' - Addon Link&lt;br /&gt;
* '''u16''': Flags of special properties which can be applied to the unit and are valid:&lt;br /&gt;
** '''Bit 0''' - Cloak is valid&lt;br /&gt;
** '''Bit 1''' - Burrow is valid&lt;br /&gt;
** '''Bit 2''' - In transit is valid&lt;br /&gt;
** '''Bit 3''' - Hallucinated is valid&lt;br /&gt;
** '''Bit 4''' - Invincible is valid&lt;br /&gt;
** '''Bit 5-15''' - Unused&lt;br /&gt;
* '''u16''': Out of the elements of the unit data, the properties which can be changed by the map maker:&lt;br /&gt;
** '''Bit 0''' - Owner player is valid (the unit is not a critter, start location, etc.; not a neutral unit)&lt;br /&gt;
** '''Bit 1''' - HP is valid&lt;br /&gt;
** '''Bit 2''' - Shields is valid&lt;br /&gt;
** '''Bit 3''' - Energy is valid (unit is a wraith, etc.)&lt;br /&gt;
** '''Bit 4''' - Resource amount is valid (unit is a mineral patch, vespene geyser, etc.)&lt;br /&gt;
** '''Bit 5''' - Amount in hangar is valid (unit is a reaver, carrier, etc.)&lt;br /&gt;
** '''Bit 6-15''' - Unused&lt;br /&gt;
* '''u8''': Player number of owner (0-based)&lt;br /&gt;
* '''u8''': Hit points % (1-100)&lt;br /&gt;
* '''u8''': Shield points % (1-100)&lt;br /&gt;
* '''u8''': Energy points % (1-100)&lt;br /&gt;
* '''u32''': Resource amount&lt;br /&gt;
* '''u16''': Number of units in hangar&lt;br /&gt;
* '''u16''': Unit state flags&lt;br /&gt;
** '''Bit 0''' - Unit is cloaked&lt;br /&gt;
** '''Bit 1''' - Unit is burrowed&lt;br /&gt;
** '''Bit 2''' - Building is in transit&lt;br /&gt;
** '''Bit 3''' - Unit is hallucinated&lt;br /&gt;
** '''Bit 4''' - Unit is invincible&lt;br /&gt;
** '''Bit 5-15''' - Unused&lt;br /&gt;
* '''u32''': Unused&lt;br /&gt;
* '''u32''': Class instance of the unit to which this unit is related to (i.e. via an add-on, nydus link, etc.). It is &amp;quot;0&amp;quot; if the unit is not linked to any other unit.&lt;br /&gt;
Notes about UNIT:&lt;br /&gt;
* The X/Y coordinates are the center of the sprite of the unit (in pixels).&lt;br /&gt;
* Please edit if you could confirm the bit values to be correct/if you know more bit values.&lt;br /&gt;
* Default values will apply if bit values are unchecked. Defaults: 100% HP, 100% SP, 100% EP, 0 resources, 0 hangar count.&lt;br /&gt;
* This section can be split. Additional UNIT sections will add more units.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;ISOM&amp;quot; - Isometric Terrain==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section is required to place isometric terrain on the map. It provides data about the nature of the isometric &amp;quot;diamonds&amp;quot; (the editing mode of StarEdit).&lt;br /&gt;
* '''u16[ (width / 2 + 1) * (height + 1) * 4 ]''': 4 integers for each 2x1 map rectangle tile (plus one extra tile to the right and bottom of the map), as per the RECT structure. Each rectangle border (left, top, right, bottom) is assigned an &amp;quot;ISOM value.&amp;quot; These form the &amp;quot;diamond&amp;quot; pattern of the map, and each rectangle thus gets two ISOM values associated with it. The index of the rectangle's right tile is that of its left tile + 16.&lt;br /&gt;
** '''Bit 0''' (0x0001) - Flag used by the editor (&amp;quot;Edited&amp;quot;?)&lt;br /&gt;
** '''Bit 1-3''' - Determines the position on the ISOM grid for the given tile edge. Each diamond covers four 2x1 map tiles, so each tile therefore has two edges per diamond.&lt;br /&gt;
*** '''0''' (0x0000) - Top Left tile horizontal edge. Also the default value upon map creation for all tiles and directions.&lt;br /&gt;
*** '''1''' (0x0002) - Top Left tile vertical edge&lt;br /&gt;
*** '''2''' (0x0004) - Top Right tile horizontal edge&lt;br /&gt;
*** '''3''' (0x0006) - Top Right tile vertical edge&lt;br /&gt;
*** '''4''' (0x0008) - Bottom Right tile horizontal edge&lt;br /&gt;
*** '''5''' (0x000A) - Bottom Right tile vertical edge&lt;br /&gt;
*** '''6''' (0x000C) - Bottom Left tile vertical edge&lt;br /&gt;
*** '''7''' (0x000E) - Bottom Left tile horizontal edge&lt;br /&gt;
** '''Bit 4-14''' - ISOM terrain type ID, used to determine what type of terrain or is on that edge. This value matches the corresponding edge on the adjacent tile. The ID is related to the CV5 Index, but the actual value is determined by a hardcoded lookup table in the editor. A value of 0 is for square terrain in StarEdit.&lt;br /&gt;
** '''Bit 15''' (0x8000) - Flag used by the editor (&amp;quot;Skipped&amp;quot;?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ISOM_Grid_Values.png]]&lt;br /&gt;
&lt;br /&gt;
First 1 in each value is the terrain type ID (1 for dirt), second digit is the ISOM edge ID. Values inside the diamond are associated with that diamond, values outside are associated with the adjacent diamonds on the ISOM grid.  This arrangement of tiles is tiled across the entire map, forming the full ISOM grid.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TILE&amp;quot; - StarEdit Terrain==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section will only be different from the [[#&amp;quot;MTXM&amp;quot; - StarCraft Terrain|MTXM]] section in tiles where doodads are present.&lt;br /&gt;
* '''u16[ map width * height ]''': 1 integer for each map tile. Moves horizontally across the map.&lt;br /&gt;
The values in TILE are normally directly generated from the ISOM section (see &amp;quot;'ISOM' section&amp;quot; above), and thus do not match that of MTXM on doodad tiles.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;DD2 &amp;quot; - StarEdit Sprites (Doodads)==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section contains the doodad map of the level. There are several parts to doodads. The graphical portion is stored in the [[#&amp;quot;MTXM&amp;quot; - StarCraft Terrain|MTXM]] section. The second part of the doodad is stored in this section. This section is only used by the map editor.&lt;br /&gt;
&lt;br /&gt;
Each doodad in the map gets the following structure:&lt;br /&gt;
* '''u16''': Number of the doodad. Size of the doodad is dependent on this. Doodads are different for each tileset.&lt;br /&gt;
* '''u16''': X coordinate of the doodad unit&lt;br /&gt;
* '''u16''': Y coordinate of the doodad unit&lt;br /&gt;
* '''u8''': Player number that owns the doodad&lt;br /&gt;
* '''u8''': Enabled flag&lt;br /&gt;
** '''00''' - Doodad is enabled (trap can attack, door is closed, etc)&lt;br /&gt;
** '''01''' - Doodad is disabled&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;THG2&amp;quot; - StarCraft Sprites==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 10 bytes.''&lt;br /&gt;
&lt;br /&gt;
The map editor only writes to this section. Starcraft uses this section.&lt;br /&gt;
&lt;br /&gt;
Sprites, usually on doodads, get the following structure.&lt;br /&gt;
* '''u16''': Unit/Sprite number of the sprite&lt;br /&gt;
* '''u16''': X coordinate of the doodad unit&lt;br /&gt;
* '''u16''': Y coordinate of the doodad unit&lt;br /&gt;
* '''u8''': Player number that owns the doodad&lt;br /&gt;
* '''u8''': Unused&lt;br /&gt;
* '''u16''': Flags&lt;br /&gt;
** '''Bit 0-11''' - Unused&lt;br /&gt;
** '''Bit 12''' - Draw as sprite (Determines if it is a sprite or a unit sprite)&lt;br /&gt;
** '''Bit 13''' - Unused&lt;br /&gt;
** '''Bit 14''' - Unused&lt;br /&gt;
** '''Bit 15''' - Disabled (Only valid if Draw as sprite is unchecked, disables the unit)&lt;br /&gt;
This section can be split. Additional THG2 sections will add more sprites.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MASK&amp;quot; - Fog of War Layer==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: This section will always validate.''&lt;br /&gt;
&lt;br /&gt;
This section contains the data on fog of war for each player. This is whether at the start of the game that levels of black space that is available.&lt;br /&gt;
* '''u8[ map width * height ]''': One byte for each map tile. The bits indicate for each player the fog of war.&lt;br /&gt;
** '''Bit 0''' - Player 1's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 1''' - Player 2's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 2''' - Player 3's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 3''' - Player 4's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 4''' - Player 5's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 5''' - Player 6's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 6''' - Player 7's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 7''' - Player 8's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
Any size greater than width*height will be ignored. Any size less will default missing tiles to 0xFF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;STR &amp;quot; - String Data==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be at least 1 byte.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the strings in the map.&lt;br /&gt;
* '''u16''': Number of strings in the section (Default''': 1024)&lt;br /&gt;
* '''u16[Number of strings]''': 1 integer for each string specifying the offset (the spot where the string starts in the section from the start of it).&lt;br /&gt;
* '''Strings''': After the offsets, this is where every string in the map goes, one after another. Each one is terminated by a null character.&lt;br /&gt;
This section can contain more or less then 1024 string offsests and will work in Starcraft.&amp;lt;br&amp;gt;&lt;br /&gt;
By default the first byte in '''Strings''' is a NUL character, and all unused offsets in the STR section point to this NUL character.&lt;br /&gt;
Note that STR sections can be stacked in a smiliar fashion as MTXM. The exact mechanisms of this are uncertain.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPRP&amp;quot; - CUWP Slots==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1280 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section is used whenever the create units with properties trigger is used. Since a slot has to be assigned to the action, this is where each slot is designated.&lt;br /&gt;
&lt;br /&gt;
There are 64 of the following structures regardless of how many are used and it cannot exceed 64.&lt;br /&gt;
* '''u16''': Flag of which special properties can be applied to unit, and are valid.&lt;br /&gt;
** '''Bit 0''' - Cloak bit is valid&lt;br /&gt;
** '''Bit 1''' - Burrowed bit is valid&lt;br /&gt;
** '''Bit 2''' - In transit bit is valid&lt;br /&gt;
** '''Bit 3''' - Hallucinated bit is valid&lt;br /&gt;
** '''Bit 4''' - Invincible bit is valid&lt;br /&gt;
** '''Bit 5-15''' - Unknown/unused&lt;br /&gt;
* '''u16''': Which elements of the unit data are valid, which properties can be changed by the map maker.&lt;br /&gt;
** '''Bit 0''' - Owner player is valid (unit is not neutral)&lt;br /&gt;
** '''Bit 1''' - HP is valid&lt;br /&gt;
** '''Bit 2''' - Shields is valid&lt;br /&gt;
** '''Bit 3''' - Energy is valid&lt;br /&gt;
** '''Bit 4''' - Resource amount is valid (unit is a resource)&lt;br /&gt;
** '''Bit 5''' - Amount in hanger is valid&lt;br /&gt;
** '''Bit 6''' - Unknown/unused&lt;br /&gt;
* '''u8''': Player number that owns unit. Will always be NULL in this section (0)&lt;br /&gt;
* '''u8''': Hit point % (1-100)&lt;br /&gt;
* '''u8''': Shield point % (1-100)&lt;br /&gt;
* '''u8''': Energy point % (1-100)&lt;br /&gt;
* '''u32''': Resource amount (for resources only)&lt;br /&gt;
* '''u16''': # of units in hangar&lt;br /&gt;
* '''u16''': Flags&lt;br /&gt;
** '''Bit 0''' - Unit is cloaked&lt;br /&gt;
** '''Bit 1''' - Unit is burrowed&lt;br /&gt;
** '''Bit 2''' - Building is in transit&lt;br /&gt;
** '''Bit 3''' - Unit is hallucinated&lt;br /&gt;
** '''Bit 4''' - Unit is invincible&lt;br /&gt;
** '''Bit 5-15''' - Unknown/unused&lt;br /&gt;
* '''u32''': Unknown/unused. Padding?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPUS&amp;quot; - CUWP Slots Used==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section goes along with the &amp;quot;UPRP&amp;quot; section. This section just indicates which of the 64 unit properties slot are used.&lt;br /&gt;
* '''u8[64]''': 1 byte for each trigger unit properties slot&lt;br /&gt;
** '''00''' - Properties slot is unused&lt;br /&gt;
** '''01''' - Properties slot is used&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MRGN&amp;quot; - Locations==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: 1280 bytes for retail, 5100 bytes for Hybrid and Broodwar.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the locations that the map uses. In a vanilla map, this section contains 64 locations. In a Hybrid or Brood War map, this section will expand to contain 255 locations.&lt;br /&gt;
&lt;br /&gt;
Each location gets one of the following location entries. The 'Anywhere' location, is ALWAYS location 64.&lt;br /&gt;
* '''u32''': Left (X1) coordinate of location, in pixels (usually 32 pt grid aligned)&lt;br /&gt;
* '''u32''': Top (Y1) coordinate of location, in pixels&lt;br /&gt;
* '''u32''': Right (X2) coordinate of location, in pixels&lt;br /&gt;
* '''u32''': Bottom (Y2) coordinate of location, in pixels&lt;br /&gt;
* '''u16''': String number of the name of this location&lt;br /&gt;
* '''u16''': Location elevation flags. If an elevation is disabled in the location, it's bit will be on (1)&lt;br /&gt;
** '''Bit 0''' - Low elevation&lt;br /&gt;
** '''Bit 1''' - Medium elevation&lt;br /&gt;
** '''Bit 2''' - High elevation&lt;br /&gt;
** '''Bit 3''' - Low air&lt;br /&gt;
** '''Bit 4''' - Medium air&lt;br /&gt;
** '''Bit 5''' - High air&lt;br /&gt;
** '''Bit 6-15''' - Unused&lt;br /&gt;
Note that in typical locations Right is always larger than Left and Bottom is always larger than Top. However, you can reverse one or both of these for [[Inverted Locations]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TRIG&amp;quot; - Triggers==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 2400 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the triggers in the map. This along with [[#&amp;quot;MBRF&amp;quot; - Mission Briefings|MBRF]] is the most complicated section in the entire scenario.chk file as there is a lot of data packed into too little of a space. Refer to the appendix at the bottom of this page for more information.&lt;br /&gt;
For easy reference, since each trigger contains 2400 bytes, the amount of triggers can be gotten by taking the section length and dividing by 2400.&lt;br /&gt;
Every single trigger in the map will have the following format:&lt;br /&gt;
* 16 Conditions (20 byte struct)&amp;lt;br&amp;gt; Every trigger has 16 of the following format, even if only one condition is used. See the appendix for information on which items are used for what conditions.&lt;br /&gt;
** '''u32''': Location number for the condition (1 based -- 0 refers to No Location), EUD Bitmask for a Death condition if the MaskFlag is set to &amp;quot;SC&amp;quot;&lt;br /&gt;
** '''u32''': [[#List of Players/Group IDs|Group]] that the condition applies to&lt;br /&gt;
** '''u32''': Qualified number (how many/resource amount)&lt;br /&gt;
** '''u16''': [[#Trigger Unit Types|Unit ID]] condition applies to&lt;br /&gt;
** '''u8''': [[#Numeric Comparisons|Numeric comparison]], [[#Switch States|switch state]]&lt;br /&gt;
** '''u8''': [[#Trigger Conditions List|Condition byte]]&lt;br /&gt;
** '''u8''': [[#Resource Types|Resource type]], [[#Score Types|score type]], Switch number (0-based)&lt;br /&gt;
** '''u8''': Flags&lt;br /&gt;
*** '''Bit 0''' - Unknown/unused&lt;br /&gt;
*** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled/ignored&lt;br /&gt;
*** '''Bit 2''' - Always display flag.&lt;br /&gt;
*** '''Bit 3''' - Unit properties is used. ('''Note:''' This is used in [[TRG|*.trg]] files)&lt;br /&gt;
*** '''Bit 4''' - Unit type is used. Cleared in &amp;quot;Offset + Mask&amp;quot; EUD conditions. May not be necessary otherwise?&lt;br /&gt;
*** '''Bit 5-7''' - Unknown/unused&lt;br /&gt;
** '''u16''': MaskFlag: set to &amp;quot;SC&amp;quot; (0x53, 0x43) when using the bitmask for EUDs, 0 otherwise&lt;br /&gt;
* 64 Actions (32 byte struct)&amp;lt;br&amp;gt; Immediately following the 16 conditions, there are 64 actions. There will always be 64 of the following structure, even if some of them are unused.&lt;br /&gt;
** '''u32''': Location - source location in &amp;quot;Order&amp;quot; and &amp;quot;Move Unit&amp;quot;, dest location in &amp;quot;Move Location&amp;quot; (1 based -- 0 refers to No Location), EUD Bitmask for a Death action if the MaskFlag is set to &amp;quot;SC&amp;quot;&lt;br /&gt;
** '''u32''': String number for trigger text (0 means no string)&lt;br /&gt;
** '''u32''': WAV string number (0 means no string)&lt;br /&gt;
** '''u32''': Seconds/milliseconds of time&lt;br /&gt;
** '''u32''': First (or only) [[#List of Players/Group IDs|Group/Player]] affected.&lt;br /&gt;
** '''u32''': Second group affected, secondary location (1-based), CUWP #, number, AI script (4-byte string), switch (0-based #)&lt;br /&gt;
** '''u16''': [[#Trigger Unit Types|Unit type]], [[#Score Types|score type]], [[#Resource Types|resource type]], [[#Alliance Statuses|alliance status]]&lt;br /&gt;
** '''u8''': [[#Trigger Actions List|Action byte]]&lt;br /&gt;
** '''u8''': Number of units (0 means All Units), [[#Action States|action state]], [[#Unit Orders|unit order]], [[#Number Modifiers|number modifier]]&lt;br /&gt;
** '''u8''': Flags&lt;br /&gt;
*** '''Bit 0''' - Ignore a wait/transmission once.&lt;br /&gt;
*** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled.&lt;br /&gt;
*** '''Bit 2''' - Always display flag - when not set: if the user has turned off subtitles (see sound options) the text will not display, when set: text will always display&lt;br /&gt;
*** '''Bit 3''' - Unit properties is used. Staredit uses this for *.trg files.&lt;br /&gt;
*** '''Bit 4''' - Unit type is used. Cleared in &amp;quot;Offset + Mask&amp;quot; EUD actions.&lt;br /&gt;
*** '''Bit 5-7''' - Unknown/unused&lt;br /&gt;
** '''u8''': Padding&lt;br /&gt;
** '''u16 (2 bytes)''': MaskFlag: set to &amp;quot;SC&amp;quot; (0x53, 0x43) when using the bitmask for EUDs, 0 otherwise&lt;br /&gt;
* Player Execution&amp;lt;br&amp;gt; Following the 16 conditions and 64 actions, every trigger also has this structure&lt;br /&gt;
** '''u32''': execution flags&lt;br /&gt;
*** '''Bit 0''' - All conditions are met, executing actions, cleared on the next trigger loop.&lt;br /&gt;
*** '''Bit 1''' - Ignore the following actions: Defeat, Draw.&lt;br /&gt;
*** '''Bit 2''' - Preserve trigger. (Can replace Preserve Trigger action)&lt;br /&gt;
*** '''Bit 3''' - Ignore execution.&lt;br /&gt;
*** '''Bit 4''' - Ignore all of the following actions for this trigger until the next trigger loop: Wait, PauseGame, Transmission, PlayWAV, DisplayTextMessage, CenterView, MinimapPing, TalkingPortrait, and MuteUnitSpeech.&lt;br /&gt;
*** '''Bit 5''' - This trigger has paused the game, ignoring subsequent calls to Pause Game (Unpause Game clears this flag only in the same trigger), may automatically call unpause at the end of action execution?&lt;br /&gt;
*** '''Bit 6''' - Wait skipping disabled for this trigger, cleared on next trigger loop.&lt;br /&gt;
*** '''Bit 7-31''' - Unknown/unused&lt;br /&gt;
** '''u8[27]''': 1 byte for each player in the [[#List of Players/Group IDs]]&lt;br /&gt;
*** '''00''' - Trigger is not executed for player&lt;br /&gt;
*** '''01''' - Trigger is executed for player&lt;br /&gt;
** '''u8''': Index of the current action, in StarCraft this is incremented after each action is executed, trigger execution ends when this is 64 (Max Actions) or an action is encountered with Action byte as 0&lt;br /&gt;
This section can be split. Additional TRIG sections will add more triggers.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MBRF&amp;quot; - Mission Briefings==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 2400 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all of the mission briefings shown by the players.&lt;br /&gt;
&lt;br /&gt;
See [[#&amp;quot;TRIG&amp;quot; - Triggers|&amp;quot;TRIG&amp;quot;]] section for format, as it is exactly the same except for the conditions. In this section the 16 conditions are still there, they are all null except for the very first condition, which only has a condition byte of 13. See [[#Mission Briefing Actions List]] for the action bytes for the mission briefing actions.&lt;br /&gt;
&lt;br /&gt;
This section can be split. Additional MBRF sections will add more briefing triggers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SPRP&amp;quot; - Scenario Properties==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4 bytes.''&lt;br /&gt;
&lt;br /&gt;
* '''u16''': String number of the scenario name&lt;br /&gt;
* '''u16''': String number of the scenarios description.&lt;br /&gt;
A string index of 0 for the map name will default it to its file name. A string index of 0 description will default to a predefined string.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;FORC&amp;quot; - Force Settings==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be less than or equal to 20 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the forces and the information about them.&lt;br /&gt;
* '''u8[8]''': 1 byte for each active player, specifying which of the 4 forces (0-based) that the player's on&lt;br /&gt;
* '''u16[4]''': 1 integer for each force, string number of the name of the force&lt;br /&gt;
* '''u8[4]''': 1 byte for each force specifying the properties:&lt;br /&gt;
** '''Bit 0''' - Random start location&lt;br /&gt;
** '''Bit 1''' - Allies&lt;br /&gt;
** '''Bit 2''' - Allied victory&lt;br /&gt;
** '''Bit 3''' - Shared vision&lt;br /&gt;
** '''Bit 4-7''' - Unused&lt;br /&gt;
Notes about FORC:&lt;br /&gt;
* If there is no string specified for a force name, it will default to a &amp;quot;Force #&amp;quot; string.&lt;br /&gt;
* If this section is less than 20 bytes, the remaining bytes are defaulted to 0.&lt;br /&gt;
* Players can be on a force greater than 4, however they will not appear in the game lobby.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;WAV &amp;quot; - WAV String Indexes==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
There are 512 wav entires regardless of how many are actually used.&lt;br /&gt;
* '''u32[512]''': 1 long for each WAV. Indicates a string index is used for a WAV path in the MPQ. If the entry is not used, it will be 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIS&amp;quot; - Unit Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4048 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;UNIx&amp;quot; - BW Unit Settings|&amp;quot;UNIx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains the unit settings for the level:&lt;br /&gt;
* '''u8[228]''': 1 byte for each unit, in order of Unit ID&lt;br /&gt;
** '''00''' - Unit does not use default settings&lt;br /&gt;
** '''01''' - Unit does use default settings&lt;br /&gt;
* '''u32[228]''': Hit points for unit (Note the displayed value is this value / 256, with the low byte being a fractional HP value)&lt;br /&gt;
* '''u16[228]''': Shield points, in order of Unit ID&lt;br /&gt;
* '''u8[228]''': Armor points, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Build time (1/60 seconds), in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Mineral cost, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Gas cost, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': String number, in order of Unit ID&lt;br /&gt;
* '''u16[100]''': Base weapon damage the weapon does, in weapon ID order ([[#List of Unit Weapon IDs]])&lt;br /&gt;
* '''u16[100]''': Upgrade bonus weapon damage, in weapon ID order&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGS&amp;quot; - Upgrade Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 598 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;UPGx&amp;quot; - BW Upgrade Settings|&amp;quot;UPGx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains upgrade settings:&lt;br /&gt;
* '''u8[46]''': 1 byte per each upgrade, in order of upgrade id.&lt;br /&gt;
** '''00''' - Upgrade uses custom settings&lt;br /&gt;
** '''01''' - Upgrade uses default settings&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, time factor for each upgrade, in order of upgrade id.&lt;br /&gt;
See [[#List of Upgrade IDs]] for upgrade ids.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TECS&amp;quot; - Tech Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 216 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;TECx&amp;quot; - BW Tech Settings|&amp;quot;TECx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains technology/special abilities settings:&lt;br /&gt;
* '''u8[24]''': 1 byte per each technology, specifies if the tech overrides the default settings. In order of technology id&lt;br /&gt;
** '''00''' - Technology uses custom settings&lt;br /&gt;
** '''01''' - Technology uses default settings&lt;br /&gt;
* '''u16[24]''': Mineral cost to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Gas cost to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Time required to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Energy cost to cast technology/special ability. In order of technology id.&lt;br /&gt;
See [[#List of Technology IDs]] for technology ids.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SWNM&amp;quot; - Switch Names==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section contains the strings used for each switch. There are 256 switches, and can't be any more or any less.&lt;br /&gt;
* '''u32[256]''': One long for each switch, specifies the string number for the name of each switch. Unnamed switches will have an index of 0, and have a default switch name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;COLR&amp;quot; - Player Colors==&lt;br /&gt;
''Required for Brood War only and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 8 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section indicates what color each player is, but only has effect on Brood War.&lt;br /&gt;
* '''u8[8]''': 1 byte for each player, indicates the color of the player&lt;br /&gt;
** '''00''' - Red&lt;br /&gt;
** '''01''' - Blue&lt;br /&gt;
** '''02''' - Teal&lt;br /&gt;
** '''03''' - Purple&lt;br /&gt;
** '''04''' - Orange&lt;br /&gt;
** '''05''' - Brown&lt;br /&gt;
** '''06''' - White&lt;br /&gt;
** '''07''' - Yellow&lt;br /&gt;
** '''08''' - Green&lt;br /&gt;
** '''09''' - Pale yellow&lt;br /&gt;
** '''10''' - Tan&lt;br /&gt;
** '''11''' - Azure (Neutral color)&lt;br /&gt;
Other values can be used but may have different results depending on the tileset. Any color value above 11 is an overflow. As of patch 1.18.6, values above 11 result in default player color.&lt;br /&gt;
&lt;br /&gt;
When CRGB is present, this section still defines leaderboard colors.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;CRGB&amp;quot; - Remastered Player Colors==&lt;br /&gt;
''Requirement unknown, but can be in any map type including non-remaster maps.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 32 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''u8[8][3]''': 3 bytes for each player corresponding to an RGB color value&lt;br /&gt;
** '''u8''': R&lt;br /&gt;
** '''u8''': G&lt;br /&gt;
** '''u8''': B, or color ID for type 3&lt;br /&gt;
* '''u8[8]''': Indicates how to select the color for each player&lt;br /&gt;
** '''0''' - Random Predefined&lt;br /&gt;
** '''1''' - Player's Choice&lt;br /&gt;
** '''2''' - Custom RGB Color (RGB value for the corresponding player defined above)&lt;br /&gt;
** '''3''' - Use color ID in the &amp;quot;B&amp;quot; color channel (&amp;quot;R&amp;quot; and &amp;quot;G&amp;quot; values appear to contain junk data); leaderboard color is still defined by COLR section and can be set independently&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SC:R Only color IDs:&amp;lt;br&amp;gt;&lt;br /&gt;
Extends the [[#&amp;quot;COLR&amp;quot; - Player Colors|COLR]] section list of colors, but cannot be used in the COLR section.&lt;br /&gt;
* '''12''' - Pale Green&lt;br /&gt;
* '''13''' - Blueish Grey&lt;br /&gt;
* '''14''' - Cyan&lt;br /&gt;
* '''15''' - Pink&lt;br /&gt;
* '''16''' - Olive&lt;br /&gt;
* '''17''' - Lime&lt;br /&gt;
* '''18''' - Navy&lt;br /&gt;
* '''19''' - Magenta&lt;br /&gt;
* '''20''' - Grey&lt;br /&gt;
* '''21''' - Black&lt;br /&gt;
* '''22+''' - Random (can pick colors that have been used)&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PUPx&amp;quot; - BW Upgrade Restrictions==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2318 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UPGR&amp;quot; - Upgrade Restrictions|&amp;quot;UPGR&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is identical to UPGR section except it uses the Brood War set of 61 upgrades instead of the original 46.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PTEx&amp;quot; - BW Tech Restrictions==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1672 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;PTEC&amp;quot; - Tech Restrictions|&amp;quot;PTEC&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is identical to PTEC section except it uses the Brood War set of 44 technologies instead of the original 24.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIx&amp;quot; - BW Unit Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4168 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UNIS&amp;quot; - Unit Settings|&amp;quot;UNIS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is indentical to UNIS section except it uses the Brood War set of 130 weapons instead of the original 100.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGx&amp;quot; - BW Upgrade Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 794 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UPGS&amp;quot; - Upgrade Settings|&amp;quot;UPGS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section the same as UPGS except section except it uses the Brood War set of 61 upgrades instead of the original 46, and there is an unused byte after the first set:&lt;br /&gt;
* '''u8[61]''': 1 byte per each upgrade, in order of upgrade id.&lt;br /&gt;
** '''00''' - Upgrade uses custom settings&lt;br /&gt;
** '''01''' - Upgrade uses default settings&lt;br /&gt;
* '''u8''': Unused.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, time factor for each upgrade, in order of upgrade id.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TECx&amp;quot; - BW Tech Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 396 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;TECS&amp;quot; - Tech Settings|&amp;quot;TECS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is indentical to TECS section except it uses the Brood War set of 44 technologies instead of the original 24.&lt;br /&gt;
&lt;br /&gt;
=Appendix=&lt;br /&gt;
A set of references and IDs that should help you easier in the trigger section and the technology/player ids, etc:&lt;br /&gt;
&lt;br /&gt;
==Trigger Conditions List==&lt;br /&gt;
* 0 = No Condition&lt;br /&gt;
* 1 = Countdown Timer(Comparison, QNumber)&lt;br /&gt;
* 2 = Command(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 3 = Bring(Player, Comparison, TUnit, Loc, QNumber)&lt;br /&gt;
* 4 = Accumulate(Player, Comparison, QNumber, ResType)&lt;br /&gt;
* 5 = Kill(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 6 = Command the Most(TUnit)&lt;br /&gt;
* 7 = Commands the Most At(TUnit, Loc)&lt;br /&gt;
* 8 = Most Kills(TUnit)&lt;br /&gt;
* 9 = Highest Score(Score)&lt;br /&gt;
* 10 = Most Resources(ResType)&lt;br /&gt;
* 11 = Switch(Switch)&lt;br /&gt;
* 12 = Elapsed Time(Comparison, QNumber)&lt;br /&gt;
* 13 = Data is a Mission Briefing. Conditions are N/A (Same as Never)&lt;br /&gt;
* 14 = Opponents(Player, Comparison, QNumber)&lt;br /&gt;
* 15 = Deaths(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 16 = Command the Least(TUnit)&lt;br /&gt;
* 17 = Command the Least At(TUnit, Loc)&lt;br /&gt;
* 18 = Least Kills(TUnit)&lt;br /&gt;
* 19 = Lowest Score(Score)&lt;br /&gt;
* 20 = Least Resources(ResType)&lt;br /&gt;
* 21 = Score(Player, Comparison, Score, QNumber)&lt;br /&gt;
* 22 = Always (Same as No Condition)&lt;br /&gt;
* 23 = Never&lt;br /&gt;
&lt;br /&gt;
==Trigger Actions List==&lt;br /&gt;
* 0 = No Action&lt;br /&gt;
* 1 = Victory&lt;br /&gt;
* 2 = Defeat&lt;br /&gt;
* 3 = Preserve Trigger&lt;br /&gt;
* 4 = Wait(Time)&lt;br /&gt;
* 5 = Pause Game (Single player only)&lt;br /&gt;
* 6 = Unpause Game (Single player only)&lt;br /&gt;
* 7 = Transmission(Text, Unit, Loc, Time, Modifier, Wave, WavTime)&lt;br /&gt;
* 8 = Play WAV(Wav, WavTime)&lt;br /&gt;
* 9 = Display Text Message(Text)&lt;br /&gt;
* 10 = Center View(Loc)&lt;br /&gt;
* 11 = Create Unit with Properties(Player, Unit, Number, Loc, UnitProp)&lt;br /&gt;
* 12 = Set Mission Objectives(Text)&lt;br /&gt;
* 13 = Set Switch(Switch, SwAction)&lt;br /&gt;
* 14 = Set Countdown Timer(Time, Modifier)&lt;br /&gt;
* 15 = Run AI Script(AIScript)&lt;br /&gt;
* 16 = Run AI Script At Location(AIScript)&lt;br /&gt;
* 17 = Leader Board (Control) (Text, TUnit)&lt;br /&gt;
* 18 = Leader Board (Control At Location) (Text, TUnit, Loc)&lt;br /&gt;
* 19 = Leader Board (Resources) (Text, ResType)&lt;br /&gt;
* 20 = Leader Board (Kills) (Text, TUnit)&lt;br /&gt;
* 21 = Leader Board (Points) (Text, Score)&lt;br /&gt;
* 22 = Kill Unit (Player, TUnit)&lt;br /&gt;
* 23 = Kill Unit At Location(Player, TUnit, Number, Loc)&lt;br /&gt;
* 24 = Remove Unit(Player, TUnit)&lt;br /&gt;
* 25 = Remove Unit At Location(Player, TUnit, Number, Loc)&lt;br /&gt;
* 26 = Set Resources(Player, Number, Modifier, ResType)&lt;br /&gt;
* 27 = Set Score(Player, Number, Modifier, Score)&lt;br /&gt;
* 28 = Minimap Ping(Loc)&lt;br /&gt;
* 29 = Talking Portrait(Unit, Time)&lt;br /&gt;
* 30 = Mute Unit Speech&lt;br /&gt;
* 31 = Unmute Unit Speech&lt;br /&gt;
* 32 = Leaderboard Computer Players(State)&lt;br /&gt;
* 33 = Leaderboard Goal (Control) (Text, TUnit, Number)&lt;br /&gt;
* 34 = Leaderboard Goal (Control At Location) (Text, TUnit, Number, Loc)&lt;br /&gt;
* 35 = Leaderboard Goal (Resources) (Text, TUnit, Number, ResType)&lt;br /&gt;
* 36 = Leaderboard Goal (Kills) (Text, TUnit, Number)&lt;br /&gt;
* 37 = Leaderboard Goal (Points) (Text, Number, Score)&lt;br /&gt;
* 38 = Move Location(Player, TUnit, SLoc, DLoc)&lt;br /&gt;
* 39 = Move Unit(Player, TUnit, Number, SLoc, DLoc)&lt;br /&gt;
* 40 = Leaderboard (Greed) (Number)&lt;br /&gt;
* 41 = Set Next Scenario(Text) (Single player only)&lt;br /&gt;
* 42 = Set Doodad State(Player, TUnit, Loc, State)&lt;br /&gt;
* 43 = Set Invincibility(Player, TUnit, Loc, State)&lt;br /&gt;
* 44 = Create Unit(Player, Unit, Number, Loc)&lt;br /&gt;
* 45 = Set Deaths(Player, TUnit, Number, Modifier)&lt;br /&gt;
* 46 = Order(Player, TUnit, SLoc, DLoc, Order)&lt;br /&gt;
* 47 = Comment(Text)&lt;br /&gt;
* 48 = Give Units to Player(SPlayer, DPlayer, TUnit, Number, Loc)&lt;br /&gt;
* 49 = Modify Unit Hit Points(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 50 = Modify Unit Energy(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 51 = Modify Unit Shield Points(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 52 = Modify Unit Resource Amount(Player, Number, ModAmount, Loc)&lt;br /&gt;
* 53 = Modify Unit Hanger Count(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 54 = Pause Timer&lt;br /&gt;
* 55 = Unpause Timer&lt;br /&gt;
* 56 = Draw&lt;br /&gt;
* 57 = Set Alliance Status(Player, AllyStatus)&lt;br /&gt;
* 58 = Disable Debug Mode (Single player only)&lt;br /&gt;
* 59 = Enable Debug Mode (Single player only)&lt;br /&gt;
&lt;br /&gt;
==Mission Briefing Actions List==&lt;br /&gt;
* 0 - No Action&lt;br /&gt;
* 1 - Wait(Time)&lt;br /&gt;
* 2 - Play WAV(Wave, WavTime)&lt;br /&gt;
* 3 - Text Message(Text, Time)&lt;br /&gt;
* 4 - Mission Objectives(Text)&lt;br /&gt;
* 5 - Show Portrait(Unit, Slot)&lt;br /&gt;
* 6 - Hide Portrait(Slot)&lt;br /&gt;
* 7 - Display Speaking Portrait(Slot, Time)&lt;br /&gt;
* 8 - Transmission(Text, Slot, Time, Modifier, Wave, WavTime)&lt;br /&gt;
* 9 - Skip Tutorial Enabled&lt;br /&gt;
&lt;br /&gt;
==Switch States==&lt;br /&gt;
* 2 = Switch is set&lt;br /&gt;
* 3 = Switch is cleared&lt;br /&gt;
&lt;br /&gt;
==Numeric Comparisons==&lt;br /&gt;
* 0 = At least&lt;br /&gt;
* 1 = At most&lt;br /&gt;
* 10 = Exactly&lt;br /&gt;
&lt;br /&gt;
==Score Types==&lt;br /&gt;
* 0 = Total&lt;br /&gt;
* 1 = Units&lt;br /&gt;
* 2 = Buildings&lt;br /&gt;
* 3 = Units and Buildings&lt;br /&gt;
* 4 = Kills&lt;br /&gt;
* 5 = Razings&lt;br /&gt;
* 6 = Kills and Razings&lt;br /&gt;
* 7 = Custom&lt;br /&gt;
&lt;br /&gt;
==Resource Types==&lt;br /&gt;
* 0 = Ore&lt;br /&gt;
* 1 = Gas&lt;br /&gt;
* 2 = Ore and Gas&lt;br /&gt;
&lt;br /&gt;
==Alliance Statuses==&lt;br /&gt;
* 0 = Enemy&lt;br /&gt;
* 1 = Ally&lt;br /&gt;
* 2 = Allied Victory&lt;br /&gt;
&lt;br /&gt;
==Unit Orders==&lt;br /&gt;
* 0 = Move&lt;br /&gt;
* 1 = Patrol&lt;br /&gt;
* 2 = Attack&lt;br /&gt;
&lt;br /&gt;
==Action States==&lt;br /&gt;
* 4 = Enabled/Set switch&lt;br /&gt;
* 5  = Disabled/Clear switch&lt;br /&gt;
* 6 = Toggle/Toggle switch&lt;br /&gt;
* 11 = Randomize switch&lt;br /&gt;
&lt;br /&gt;
==Number Modifiers==&lt;br /&gt;
* 7 = Set to&lt;br /&gt;
* 8 = Add&lt;br /&gt;
* 9 = Subtract&lt;br /&gt;
&lt;br /&gt;
==Trigger Unit Types==&lt;br /&gt;
* All normal units (0-227)&lt;br /&gt;
* 228 = None&lt;br /&gt;
* 229 = Any unit&lt;br /&gt;
* 230 = Men&lt;br /&gt;
* 231 = Buildings&lt;br /&gt;
* 232 = Factories&lt;br /&gt;
&lt;br /&gt;
==List of Players/Group IDs==&lt;br /&gt;
* 0 = Player 1&lt;br /&gt;
* 1 = Player 2&lt;br /&gt;
* 2 = Player 3&lt;br /&gt;
* 3 = Player 4&lt;br /&gt;
* 4 = Player 5&lt;br /&gt;
* 5 = Player 6&lt;br /&gt;
* 6 = Player 7&lt;br /&gt;
* 7 = Player 8&lt;br /&gt;
* 8 = Player 9&lt;br /&gt;
* 9 = Player 10&lt;br /&gt;
* 10 = Player 11&lt;br /&gt;
* 11 = Player 12&lt;br /&gt;
* 12 = None (Unused, One-entry Overflow in some cases)&lt;br /&gt;
* 13 = Current Player&lt;br /&gt;
* 14 = Foes&lt;br /&gt;
* 15 = Allies&lt;br /&gt;
* 16 = Neutral Players&lt;br /&gt;
* 17 = All Players&lt;br /&gt;
* 18 = Force 1&lt;br /&gt;
* 19 = Force 2&lt;br /&gt;
* 20 = Force 3&lt;br /&gt;
* 21 = Force 4&lt;br /&gt;
* 22 = Unused 1&lt;br /&gt;
* 23 = Unused 2&lt;br /&gt;
* 24 = Unused 3&lt;br /&gt;
* 25 = Unused 4&lt;br /&gt;
* 26 = Non Allied Victory Players&lt;br /&gt;
&lt;br /&gt;
==List of Technology IDs==&lt;br /&gt;
* 0 = Stim Packs&lt;br /&gt;
* 1 = Lockdown&lt;br /&gt;
* 2 = EMP Shockwave&lt;br /&gt;
* 3 = Spider Mines&lt;br /&gt;
* 4 = Scanner Sweep&lt;br /&gt;
* 5 = Siege Mode&lt;br /&gt;
* 6 = Defensive Matrix&lt;br /&gt;
* 7 = Irradiate&lt;br /&gt;
* 8 = Yamato Gun&lt;br /&gt;
* 9 = Cloaking Field&lt;br /&gt;
* 10 = Personnel Cloaking&lt;br /&gt;
* 11 = Burrowing&lt;br /&gt;
* 12 = Infestation&lt;br /&gt;
* 13 = Spawn Broodling&lt;br /&gt;
* 14 = Dark Swarm&lt;br /&gt;
* 15 = Plague&lt;br /&gt;
* 16 = Consume&lt;br /&gt;
* 17 = Ensnare&lt;br /&gt;
* 18 = Parasite&lt;br /&gt;
* 19 = Psionic Storm&lt;br /&gt;
* 20 = Hallucination&lt;br /&gt;
* 21 = Recall&lt;br /&gt;
* 22 = Stasis Field&lt;br /&gt;
* 23 = Archon Warp&lt;br /&gt;
* 24 = Restoration&lt;br /&gt;
* 25 = Disruption Web&lt;br /&gt;
* 26 = Unused 26&lt;br /&gt;
* 27 = Mind Control&lt;br /&gt;
* 28 = Dark Archon Meld&lt;br /&gt;
* 29 = Feedback&lt;br /&gt;
* 30 = Optical Flare&lt;br /&gt;
* 31 = Maelstorm&lt;br /&gt;
* 32 = Lurker Aspect&lt;br /&gt;
* 33 = Unused 33&lt;br /&gt;
* 34 = Healing&lt;br /&gt;
* 35 = Unused 35&lt;br /&gt;
* 36 = Unused 36&lt;br /&gt;
* 37 = Unused 37&lt;br /&gt;
* 38 = Unused 38&lt;br /&gt;
* 39 = Unused 39&lt;br /&gt;
* 40 = Unused 40&lt;br /&gt;
* 41 = Unused 41&lt;br /&gt;
* 42 = Unused 42&lt;br /&gt;
* 43 = Unused 43&lt;br /&gt;
&lt;br /&gt;
==List of Upgrade IDs==&lt;br /&gt;
* 0 = Terran Infantry Armor&lt;br /&gt;
* 1 = Terran Vehicle Plating&lt;br /&gt;
* 2 = Terran Ship Plating&lt;br /&gt;
* 3 = Zerg Carapace&lt;br /&gt;
* 4 = Zerg Flyer Caparace&lt;br /&gt;
* 5 = Protoss Armor&lt;br /&gt;
* 6 = Protoss Plating&lt;br /&gt;
* 7 = Terran Infantry Weapons&lt;br /&gt;
* 8 = Terran Vehicle Weapons&lt;br /&gt;
* 9 = Terran Ship Weapons&lt;br /&gt;
* 10 = Zerg Melee Attacks&lt;br /&gt;
* 11 = Zerg Missile Attacks&lt;br /&gt;
* 12 = Zerg Flyer Attacks&lt;br /&gt;
* 13 = Protoss Ground Weapons&lt;br /&gt;
* 14 = Protoss Air Weapons&lt;br /&gt;
* 15 = Protoss Plasma Shields&lt;br /&gt;
* 16 = U-238 Shells&lt;br /&gt;
* 17 = Ion Thrusters&lt;br /&gt;
* 18 = Burst Lasers (Unused)&lt;br /&gt;
* 19 = Titan Reactor (SV +50)&lt;br /&gt;
* 20 = Ocular Implants&lt;br /&gt;
* 21 = Moebius Reactor (Ghost +50)&lt;br /&gt;
* 22 = Apollo Reactor (Wraith +50)&lt;br /&gt;
* 23 = Colossus Reactor (BC +50)&lt;br /&gt;
* 24 = Ventral Sacs&lt;br /&gt;
* 25 = Antennae&lt;br /&gt;
* 26 = Pneumatized Carapace&lt;br /&gt;
* 27 = Metabolic Boost&lt;br /&gt;
* 28 = Adrenal Glands&lt;br /&gt;
* 29 = Muscular Augments&lt;br /&gt;
* 30 = Grooved Spines&lt;br /&gt;
* 31 = Gamete Meiosis (Queen +50)&lt;br /&gt;
* 32 = Metasynaptic Node (Defiler +50)&lt;br /&gt;
* 33 = Singularity Charge&lt;br /&gt;
* 34 = Leg Enhancements&lt;br /&gt;
* 35 = Scarab Damage &lt;br /&gt;
* 36 = Reaver Capacity &lt;br /&gt;
* 37 = Gravitic Drive&lt;br /&gt;
* 38 = Sensor Array&lt;br /&gt;
* 39 = Gravitic Boosters&lt;br /&gt;
* 40 = Khaydarin Amulet (HT +50)&lt;br /&gt;
* 41 = Apial Sensors&lt;br /&gt;
* 42 = Gravitic Thrusters&lt;br /&gt;
* 43 = Carrier Capacity&lt;br /&gt;
* 44 = Khaydarin Core (Arbiter +50)&lt;br /&gt;
* 45 = Unknown Upgrade45&lt;br /&gt;
* 46 = Unknown Upgrade46&lt;br /&gt;
* 47 = Argus Jewel (Corsair +50)&lt;br /&gt;
* 48 = Unknown Upgrade48&lt;br /&gt;
* 49 = Argus Talisman (DA +50)&lt;br /&gt;
* 50 = Unknown Upgrade50&lt;br /&gt;
* 51 = Caduceus Reactor (Medic +50)&lt;br /&gt;
* 52 = Chitinous Plating&lt;br /&gt;
* 53 = Anabolic Synthesis&lt;br /&gt;
* 54 = Charon Booster&lt;br /&gt;
* 55 = Unknown Upgrade55&lt;br /&gt;
* 56 = Unknown Upgrade56&lt;br /&gt;
* 57 = Unknown Upgrade57&lt;br /&gt;
* 58 = Unknown Upgrade58&lt;br /&gt;
* 59 = Unknown Upgrade59&lt;br /&gt;
* 60 = Unknown Upgrade60&lt;br /&gt;
&lt;br /&gt;
==List of Unit Weapon IDs==&lt;br /&gt;
* 0 = Gauss Rifle (Normal)&lt;br /&gt;
* 1 = Gauss Rifle (Jim Raynor-Marine)&lt;br /&gt;
* 2 = C-10 Concussion Rifle (Normal)&lt;br /&gt;
* 3 = C-10 Concussion Rifle (Sarah Kerrigan)&lt;br /&gt;
* 4 = Fragmentation Grenade (Normal)&lt;br /&gt;
* 5 = Fragmentation Grenade (Jim Raynor-Vulture)&lt;br /&gt;
* 6 = Spider Mines&lt;br /&gt;
* 7 = Twin Autocannons (Normal)&lt;br /&gt;
* 8 = Hellfire Missile Pack (Normal)&lt;br /&gt;
* 9 = Twin Autocannons (Alan Schezar)&lt;br /&gt;
* 10 = Hellfire Missile Pack (Alan Schezar)&lt;br /&gt;
* 11 = Arclite Cannon (Normal)&lt;br /&gt;
* 12 = Arclite Cannon (Edmund Duke)&lt;br /&gt;
* 13 = Fusion Cutter&lt;br /&gt;
* 14 = Fusion Cutter (Harvest)&lt;br /&gt;
* 15 = Gemini Missiles (Normal)&lt;br /&gt;
* 16 = Burst Lasers (Normal)&lt;br /&gt;
* 17 = Gemini Missiles (Tom Kazansky)&lt;br /&gt;
* 18 = Burst Lasers (Tom Kazansky)&lt;br /&gt;
* 19 = ATS Laser Battery (Normal)&lt;br /&gt;
* 20 = ATA Laser Battery (Normal)&lt;br /&gt;
* 21 = ATS Laser Battery (Norad II+Mengsk+DuGalle)&lt;br /&gt;
* 22 = ATA Laser Battery (Norad II+Mengsk+DuGalle)&lt;br /&gt;
* 23 = ATS Laser Battery (Hyperion)&lt;br /&gt;
* 24 = ATA Laser Battery (Hyperion)&lt;br /&gt;
* 25 = Flame Thrower (Normal)&lt;br /&gt;
* 26 = Flame Thrower (Gui Montag)&lt;br /&gt;
* 27 = Arclite Shock Cannon (Normal)&lt;br /&gt;
* 28 = Arclite Shock Cannon (Edmund Duke)&lt;br /&gt;
* 29 = Longbolt Missiles&lt;br /&gt;
* 30 = Yamato Gun&lt;br /&gt;
* 31 = Nuclear Missile&lt;br /&gt;
* 32 = Lockdown&lt;br /&gt;
* 33 = EMP Shockwave&lt;br /&gt;
* 34 = Irradiate&lt;br /&gt;
* 35 = Claws (Normal)&lt;br /&gt;
* 36 = Claws (Devouring One)&lt;br /&gt;
* 37 = Claws (Infested Kerrigan)&lt;br /&gt;
* 38 = Needle Spines (Normal)&lt;br /&gt;
* 39 = Needle Spines (Hunter Killer)&lt;br /&gt;
* 40 = Kaiser Blades (Normal)&lt;br /&gt;
* 41 = Kaiser Blades (Torrasque)&lt;br /&gt;
* 42 = Toxic Spores (Broodling)&lt;br /&gt;
* 43 = Spines&lt;br /&gt;
* 44 = Spines (Harvest)&lt;br /&gt;
* 45 = Acid Spray (Unused)&lt;br /&gt;
* 46 = Acid Spore (Normal)&lt;br /&gt;
* 47 = Acid Spore (Kukulza-Guardian)&lt;br /&gt;
* 48 = Glave Wurm (Normal)&lt;br /&gt;
* 49 = Glave Wurm (Kukulza-Mutalisk)&lt;br /&gt;
* 50 = Venom (Unused-Defiler)&lt;br /&gt;
* 51 = Venom (Unused-Defiler Hero)&lt;br /&gt;
* 52 = Seeker Spores&lt;br /&gt;
* 53 = Subterranean Tentacle&lt;br /&gt;
* 54 = Suicide (Infested Terran)&lt;br /&gt;
* 55 = Suicide (Scourge)&lt;br /&gt;
* 56 = Parasite&lt;br /&gt;
* 57 = Spawn Broodlings&lt;br /&gt;
* 58 = Ensnare&lt;br /&gt;
* 59 = Dark Swarm&lt;br /&gt;
* 60 = Plague&lt;br /&gt;
* 61 = Consume&lt;br /&gt;
* 62 = Particle Beam&lt;br /&gt;
* 63 = Particle Beam (Harvest)&lt;br /&gt;
* 64 = Psi Blades (Normal)&lt;br /&gt;
* 65 = Psi Blades (Fenix-Zealot)&lt;br /&gt;
* 66 = Phase Disruptor (Normal)&lt;br /&gt;
* 67 = Phase Disruptor (Fenix-Dragoon)&lt;br /&gt;
* 68 = Psi Assault (Normal-Unused)&lt;br /&gt;
* 69 = Psi Assault (Tassadar+Aldaris)&lt;br /&gt;
* 70 = Psionic Shockwave (Normal)&lt;br /&gt;
* 71 = Psionic Shockwave (Tassadar/Zeratul Archon)&lt;br /&gt;
* 72 = Unknown72&lt;br /&gt;
* 73 = Dual Photon Blasters (Normal)&lt;br /&gt;
* 74 = Anti-matter Missiles (Normal)&lt;br /&gt;
* 75 = Dual Photon Blasters (Mojo)&lt;br /&gt;
* 76 = Anit-matter Missiles (Mojo)&lt;br /&gt;
* 77 = Phase Disruptor Cannon (Normal)&lt;br /&gt;
* 78 = Phase Disruptor Cannon (Danimoth)&lt;br /&gt;
* 79 = Pulse Cannon&lt;br /&gt;
* 80 = STS Photon Cannon&lt;br /&gt;
* 81 = STA Photon Cannon&lt;br /&gt;
* 82 = Scarab&lt;br /&gt;
* 83 = Stasis Field&lt;br /&gt;
* 84 = Psi Storm&lt;br /&gt;
* 85 = Warp Blades (Zeratul)&lt;br /&gt;
* 86 = Warp Blades (Dark Templar Hero)&lt;br /&gt;
* 87 = Missiles (Unused)&lt;br /&gt;
* 88 = Laser Battery1 (Unused)&lt;br /&gt;
* 89 = Tormentor Missiles (Unused)&lt;br /&gt;
* 90 = Bombs (Unused)&lt;br /&gt;
* 91 = Raider Gun (Unused)&lt;br /&gt;
* 92 = Laser Battery2 (Unused)&lt;br /&gt;
* 93 = Laser Battery3 (Unused)&lt;br /&gt;
* 94 = Dual Photon Blasters (Unused)&lt;br /&gt;
* 95 = Flechette Grenade (Unused)&lt;br /&gt;
* 96 = Twin Autocannons (Floor Trap)&lt;br /&gt;
* 97 = Hellfire Missile Pack (Wall Trap)&lt;br /&gt;
* 98 = Flame Thrower (Wall Trap)&lt;br /&gt;
* 99 = Hellfire Missile Pack (Floor Trap)&lt;br /&gt;
* 100 = Neutron Flare&lt;br /&gt;
* 101 = Disruption Web&lt;br /&gt;
* 102 = Restoration&lt;br /&gt;
* 103 = Halo Rockets&lt;br /&gt;
* 104 = Corrosive Acid&lt;br /&gt;
* 105 = Mind Control&lt;br /&gt;
* 106 = Feedback&lt;br /&gt;
* 107 = Optical Flare&lt;br /&gt;
* 108 = Maelstrom&lt;br /&gt;
* 109 = Subterranean Spines&lt;br /&gt;
* 110 = Gauss Rifle0 (Unused)&lt;br /&gt;
* 111 = Warp Blades (Normal)&lt;br /&gt;
* 112 = C-10 Concussion Rifle (Samir Duran)&lt;br /&gt;
* 113 = C-10 Concussion Rifle (Infested Duran)&lt;br /&gt;
* 114 = Dual Photon Blasters (Artanis)&lt;br /&gt;
* 115 = Anti-matter Missiles (Artanis)&lt;br /&gt;
* 116 = C-10 Concussion Rifle (Alexei Stukov)&lt;br /&gt;
* 117 = Gauss Rifle1 (Unused)&lt;br /&gt;
* 118 = Gauss Rifle2 (Unused)&lt;br /&gt;
* 119 = Gauss Rifle3 (Unused)&lt;br /&gt;
* 120 = Gauss Rifle4 (Unused)&lt;br /&gt;
* 121 = Gauss Rifle5 (Unused)&lt;br /&gt;
* 122 = Gauss Rifle6 (Unused)&lt;br /&gt;
* 123 = Gauss Rifle7 (Unused)&lt;br /&gt;
* 124 = Gauss Rifle8 (Unused)&lt;br /&gt;
* 125 = Gauss Rifle9 (Unused)&lt;br /&gt;
* 126 = Gauss Rifle10 (Unused)&lt;br /&gt;
* 127 = Gauss Rifle11 (Unused)&lt;br /&gt;
* 128 = Gauss Rifle12 (Unused)&lt;br /&gt;
* 129 = Gauss Rifle13 (Unused)&lt;br /&gt;
* 130 = None&lt;br /&gt;
&lt;br /&gt;
==Complete Modifier List==&lt;br /&gt;
* 0 = Condition: &amp;gt;= (greater than or equal to)&lt;br /&gt;
* 1 = Condition: &amp;lt;= (less than or equal to)&lt;br /&gt;
* 2 = Condition: == TRUE (Is True)&lt;br /&gt;
* 3 = Condition: == FALSE (Is False)&lt;br /&gt;
* 4 = Action: = TRUE (Set to True)&lt;br /&gt;
* 5 = Action: = FALSE (Set to False)&lt;br /&gt;
* 6 = Action: NOT (toggle)&lt;br /&gt;
* 7 = Action: = (Set to)&lt;br /&gt;
* 8 = Action: += (Add)&lt;br /&gt;
* 9 = Action: -= (Subtract)&lt;br /&gt;
* 10 = Condition: == (Exactly)&lt;br /&gt;
* 11 = Action: Randomize&lt;br /&gt;
&lt;br /&gt;
[[Category:StarCraft]]&lt;br /&gt;
[[Category:Reference]]&lt;/div&gt;</summary>
		<author><name>FaRTy1billion</name></author>	</entry>

	<entry>
		<id>https://staredit.net/wiki/index.php?title=Scenario.chk&amp;diff=663</id>
		<title>Scenario.chk</title>
		<link rel="alternate" type="text/html" href="https://staredit.net/wiki/index.php?title=Scenario.chk&amp;diff=663"/>
				<updated>2022-07-23T23:42:25Z</updated>
		
		<summary type="html">&lt;p&gt;FaRTy1billion: /* &amp;quot;ISOM&amp;quot; - Isometric Terrain */ Added value details&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The CHK file is a very dense file found inside the SCM or SCX file (as &amp;quot;staredit\scenario.chk&amp;quot;), which is just a renamed MPQ archive.&lt;br /&gt;
&lt;br /&gt;
In this article, some shorthand will be used for datatypes:&lt;br /&gt;
* '''u8''' for an unsigned byte&lt;br /&gt;
* '''u16''' for an unsigned short (2-byte integer)&lt;br /&gt;
* '''u32''' for an unsigned int (4-byte integer)&lt;br /&gt;
* '''uT[''a'']''' for an array of datatype '''T''' (8, 16, 32) with '''''a''''' number of elements&lt;br /&gt;
* '''uT[''a''][''b'']''' for a two-dimensional array of datatype '''T''', where each element of '''T[''a'']''' will be an array of size '''''b'''''&lt;br /&gt;
&lt;br /&gt;
=Sections=&lt;br /&gt;
The CHK is split into several named chunks (hence the file extension, an abbreviation of ''CHunK'').&lt;br /&gt;
&lt;br /&gt;
Each section begins with an 8-byte header:&lt;br /&gt;
* '''u32''' Name - A 4-byte string uniquely identifying that chunk's purpose.&lt;br /&gt;
* '''u32''' Size - The size, in bytes, of the chunk (not including this header)&lt;br /&gt;
Followed by as many bytes as 'Size', in a format described below.&lt;br /&gt;
&lt;br /&gt;
Some things to keep in mind about the CHK section:&lt;br /&gt;
* Invalid sections can exist and will be ignored. While Size is unsigned, it can safely be a negative value to read a chunk earlier in the file. This allows for &amp;quot;section stacking&amp;quot;, allowing smaller sections to be placed inside of larger ones or duplicate triggers or units to take less space in the file.&lt;br /&gt;
* All sections will marked &amp;quot;Not required.&amp;quot; are never read by StarCraft and can safely be omitted. However they may or may not be read by StarEdit, and may cause the map to be unreadable in an editor.&lt;br /&gt;
* Note &amp;quot;Hybrid&amp;quot;, or &amp;quot;Enhanced&amp;quot;, maps were introduced in 1.04. They are supported both by Original StarCraft and Brood War and usually contain sections for both types (e.g., UPGS and UPGx, TECS and TECx), but both sections aren't necessarily read.&lt;br /&gt;
* Duplicate sections will overwrite previously defined section data, except where noted. Note this only applies to those section that pass the specified &amp;quot;validation&amp;quot; parameters, as any section that does not successfully validate will be ignored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TYPE&amp;quot; - Map Type==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the type of scenario.&lt;br /&gt;
* '''u32''': Specifies the type of scenario:&lt;br /&gt;
** '''0x53574152''' or '''RAWS''' - 1.04 StarCraft and above (&amp;quot;hybrid&amp;quot;)&lt;br /&gt;
** '''0x42574152''' or '''RAWB''' - Brood War&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;VER &amp;quot; - Format Version==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section identifies the file format version.&lt;br /&gt;
* '''u16''': File format version:&lt;br /&gt;
** '''59''' - Starcraft 1.00 (original retail release)&lt;br /&gt;
** '''63''' - Starcraft 1.04 ''(hybrid)''&lt;br /&gt;
** '''64''' - Starcraft Remastered (1.21) ''(hybrid)''&lt;br /&gt;
** '''205''' - Brood War 1.00 ''(1.04)''&lt;br /&gt;
** '''206''' - Starcraft Remastered (1.21) ''(broodwar)''&lt;br /&gt;
This is the only version code section to actually be read by StarCraft (of TYPE, VER , IVER, and IVE2). Any other value is invalid in retail StarCraft and is usually a beta version.&lt;br /&gt;
&lt;br /&gt;
Other unsupported versions include:&lt;br /&gt;
* '''0-19''' - ''Warcraft II versions (.PUD)''&lt;br /&gt;
* '''47''' - ''Starcraft Beta''&lt;br /&gt;
* '''61''' - Brood War internal (map version 61)&lt;br /&gt;
* '''75''' - Brood War internal (map version 75)&lt;br /&gt;
* '''201''' - Brood War internal (map version 201)&lt;br /&gt;
* '''203''' - Brood War internal (map version 203)&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IVER&amp;quot; - Map Version==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section &amp;quot;additionally identifies&amp;quot; the map version.&lt;br /&gt;
* '''u16''': &amp;quot;Additional file format version:&amp;quot;&lt;br /&gt;
** '''9''' - beta/obsolete versions&lt;br /&gt;
** '''10''' - current versions&lt;br /&gt;
When saving as expansion this section gets removed entirely. Contrary to popular belief, it doesn't get &amp;quot;replaced&amp;quot; by IVE2 in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IVE2&amp;quot; - Map Version==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section &amp;quot;additionally identifies&amp;quot; the map version.&lt;br /&gt;
* '''u16''': &amp;quot;Additional file format version:&amp;quot;&lt;br /&gt;
** '''11''' - 1.04 StarCraft and above (&amp;quot;hybrid&amp;quot;) or Brood War.&lt;br /&gt;
This section does not &amp;quot;replace&amp;quot; IVER in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;VCOD&amp;quot; - Verification Code==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be equal to size of the VCOD data in the EXE resource. Must result in valid checksum.''&lt;br /&gt;
&lt;br /&gt;
This section has a verification code to make sure this is actually a CHK file.&lt;br /&gt;
&lt;br /&gt;
* '''u32[256]''': Seed values.&lt;br /&gt;
* '''u8[16]''': Operation codes to produce the resulting hash:&lt;br /&gt;
** '''00''' - XOR's the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''01''' - Adds to the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''02''' - Subtracts from the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''03''' - XOR's the current hash with the VCOD table at index OWNR, SIDE, FORC, and 0&lt;br /&gt;
** '''04''' - same as 0x03&lt;br /&gt;
** '''05''' - same as 0x03&lt;br /&gt;
** '''06''' - Complex function consisting of ORs and shifts&lt;br /&gt;
** '''07''' - Inverted version of 0x06, switching direction of all shifts&lt;br /&gt;
** '''08+''' - Do nothing&lt;br /&gt;
Opcodes and seeds do not have to match those in EXE resource, as long as the same value is produced.&amp;lt;br&amp;gt;&lt;br /&gt;
The only indexes in the seed table that are referenced are those that correspond individual values of [[#&amp;quot;OWNR&amp;quot; - StarCraft Player Types|OWNR]], [[#&amp;quot;SIDE&amp;quot; - Player Races|SIDE]], [[#&amp;quot;FORC&amp;quot; - Force Settings|FORC]] player assignments, and index 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IOWN&amp;quot; - StarEdit Player Types==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the owner of each player.&lt;br /&gt;
* '''u8[12]''': One byte for each player, specifies the owner of the player:&lt;br /&gt;
** '''00''' - Inactive&lt;br /&gt;
** ''01'' - Computer (game)&lt;br /&gt;
** ''02'' - Occupied by Human Player&lt;br /&gt;
** '''03''' - Rescue Passive&lt;br /&gt;
** '''04''' - Unused&lt;br /&gt;
** '''05''' - Computer&lt;br /&gt;
** '''06''' - Human (Open Slot)&lt;br /&gt;
** '''07''' - Neutral&lt;br /&gt;
** ''08'' - Closed slot&lt;br /&gt;
This section is separate from OWNR as a staredit value. Staredit does not display &amp;quot;inactive&amp;quot; as a valid option. Italicized settings denote invalid map options, which may involve a buffer overflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;OWNR&amp;quot; - StarCraft Player Types==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 12 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section designates the controller of a particular player. It is exactly the same as the &amp;quot;IOWN&amp;quot; section, except there is an additional value, 0x00 for Inactive.&lt;br /&gt;
* '''u8[12]''': One byte for each player, specifies the owner of the player:&lt;br /&gt;
** '''00''' - Inactive&lt;br /&gt;
** ''01'' - Computer (game)&lt;br /&gt;
** ''02'' - Occupied by Human Player&lt;br /&gt;
** '''03''' - Rescue Passive&lt;br /&gt;
** '''04''' - Unused&lt;br /&gt;
** '''05''' - Computer&lt;br /&gt;
** '''06''' - Human (Open Slot)&lt;br /&gt;
** '''07''' - Neutral&lt;br /&gt;
** ''08'' - Closed slot&lt;br /&gt;
Italicized settings denote invalid map options, which may involve a buffer overflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;ERA &amp;quot; - Tileset==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section indicates the tileset of the scenario.&lt;br /&gt;
* '''u16''': Designates tileset:&lt;br /&gt;
** '''00''' - Badlands&lt;br /&gt;
** '''01''' - Space Platform&lt;br /&gt;
** '''02''' - Installation&lt;br /&gt;
** '''03''' - Ashworld&lt;br /&gt;
** '''04''' - Jungle&lt;br /&gt;
** '''05''' - Desert&lt;br /&gt;
** '''06''' - Arctic&lt;br /&gt;
** '''07''' - Twilight&lt;br /&gt;
StarCraft masks the tileset indicator's bit value, so bits after the third place (anything after the value &amp;quot;7&amp;quot;) are removed. Thus, 9 (1001 in binary) is interpreted as 1 (0001), 10 (1010) as 2 (0010), etc.&amp;lt;br&amp;gt;&lt;br /&gt;
Desert, Arctic, and Twilight are Brood War-only tilesets.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;DIM &amp;quot; - Map Dimensions==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains the dimensions of the map.&lt;br /&gt;
* '''u16''': Width of the map&lt;br /&gt;
* '''u16''': Height of the map&lt;br /&gt;
The Width/Height of the map is measured in the number of square 32x32p tiles.&amp;lt;br&amp;gt;&lt;br /&gt;
Standard Dimensions are 64, 96, 128, 192, and 256.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SIDE&amp;quot; - Player Races==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 12 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains the species/race of each player.&lt;br /&gt;
* '''u8[12]''': 1 byte per player the species of that player:&lt;br /&gt;
** '''00''' - Zerg&lt;br /&gt;
** '''01''' - Terran&lt;br /&gt;
** '''02''' - Protoss&lt;br /&gt;
** ''03'' - Invalid (Independent), shown as &amp;quot;Unknown&amp;quot; in SC:R lobby&lt;br /&gt;
** ''04'' - Invalid (Neutral), shown as &amp;quot;Unknown&amp;quot;&lt;br /&gt;
** '''05''' - User Select&lt;br /&gt;
** '''06''' - Random (Forced; Acts as a selected race)&lt;br /&gt;
** ''07'' - Inactive, shown as locked &amp;quot;Select Race&amp;quot; option in SC:R lobby&lt;br /&gt;
Italicized settings denote invalid map options. Note Players 9-11 are defaultly Inactive and Player 12 is defaultly Neutral.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MTXM&amp;quot; - StarCraft Terrain==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be less than or equal to 131072 (0x20000) bytes (256 * 256 * 2).''&lt;br /&gt;
&lt;br /&gt;
Terrain section that contains a map of the level's appearance. StarEdit disregards this section and instead uses [[#&amp;quot;TILE&amp;quot; - StarEdit Terrain|TILE]]; it is only used in Starcraft.&lt;br /&gt;
* '''u16[map width * height]''': one integer for each tile.&lt;br /&gt;
Notes about MTXM:&lt;br /&gt;
* The Width/Height of the map is measured in the number of square 32x32p tiles.&lt;br /&gt;
* Tiles in this section are listed from left to right, top to bottom.&lt;br /&gt;
* The values for each integer are their respective &amp;quot;MegaTile&amp;quot; values in the scenario's tileset. If the size of this section is greater than width*height*2, the data following is ignored. If the size of this section is less, the resulting tiles that have not been defined will be null tiles.&lt;br /&gt;
* This section includes doodads as terrain; TILE, which is otherwise identical, doesn't. Out of the terrain sections (TILE, ISOM, and MTXM), SC only reads MTXM for the sake of not having to generate this data on-the-fly: it contains the exact representation of the level's appearance, including doodads. TILE, on the other hand, is directly tied via a tile lookup function to ISOM, and exists for the sake of not having to generate tiles from ISOM on-the-fly in StarEdit.&lt;br /&gt;
* If MTXM section is smaller than (map width*height), then the remaining tiles will be filled with null tiles or tiles specified by previous MTXM sections.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PUNI&amp;quot; - Player Unit Restrictions==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 5700 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains player unit restrictions: it indicates whether the player can or cannot build a particular unit.&lt;br /&gt;
* '''u8[228][12]''': 1 byte for each unit in order of its unit id, then each player, for player availability:&lt;br /&gt;
** '''00''' - That unit is not available for production if the player has 'override defaults' on&lt;br /&gt;
** '''01''' - That unit is available for production if the player has 'override defaults' on&lt;br /&gt;
* '''u8[228]''': 1 byte for each unit in order of it's unit id, for global availability defaults (for all players):&lt;br /&gt;
** '''00''' - That unit is not available for production&lt;br /&gt;
** '''01''' - That unit is available for production&lt;br /&gt;
* '''u8[228][12]''': 1 byte for each unit in order of its unit id, then each player, indicating whether a player uses the global availability defaults.&lt;br /&gt;
** '''00''' - Player overrides defaults for this unit&lt;br /&gt;
** '''01''' - Player uses defaults for this unit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGR&amp;quot; - Upgrade Restrictions==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1748 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;PUPx&amp;quot; - BW Upgrade Restrictions|&amp;quot;PUPx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains player upgrade restrictions: it indicates the starting/maximum levels at/to which a player can perform a particular upgrade.&lt;br /&gt;
* '''u8[46][12]''': 1 byte for the maximum level a player can upgrade to, in order of its upgrade id, then each player&lt;br /&gt;
* '''u8[46][12]''': 1 byte for the level of an upgrade a player starts off with, in order of its upgrade id, then each player&lt;br /&gt;
* '''u8[46]''': 1 byte for the global default maximum level of each upgrade, in order of its upgrade id.&lt;br /&gt;
* '''u8[46]''': 1 byte for the global default starting level of each upgrade, in order of its upgrade id.&lt;br /&gt;
* '''u8[46][12]''': 1 byte for each upgrade in order of its upgrade id, then each player, indicating whether a player uses the global upgrade defaults:&lt;br /&gt;
** '''00''' - Player does not use global upgrade defaults for this upgrade&lt;br /&gt;
** '''01''' - Player uses upgrade defaults for this upgrade&lt;br /&gt;
See [[#List of Upgrade IDs]].&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PTEC&amp;quot; - Tech Restrictions==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 912 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;PTEx&amp;quot; - BW Tech Restrictions|&amp;quot;PTEx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains player technology availability restrictions: it indicates whether a player starts off with a particular technology or can research a particular technology.&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology id, then each player, for player availability:&lt;br /&gt;
** '''00''' - Technology is not available for a player&lt;br /&gt;
** '''01''' - Technology is available for a player&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology id, then each player, for &amp;quot;already researched&amp;quot; status:&lt;br /&gt;
** '''00''' - Technology is not already researched&lt;br /&gt;
** '''01''' - Technology is already researched&lt;br /&gt;
* '''u8[24]''': 1 byte for each technology for global availability defaults:&lt;br /&gt;
** '''00''' - Technology is not available by default&lt;br /&gt;
** '''01''' - Technology is available by default&lt;br /&gt;
* '''u8[24]''': 1 byte for each technology for global &amp;quot;already researched&amp;quot; defaults:&lt;br /&gt;
** '''00''' - Technology is not already researched by default&lt;br /&gt;
** '''01''' - Technology is already researched by default&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology in order of its technology id, then each player, indicating whether a player uses the global defaults:&lt;br /&gt;
** '''00''' - Technology overrides defaults for player&lt;br /&gt;
** '''01''' - Technology uses default settings for player&lt;br /&gt;
See [[#List of Technology IDs]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIT&amp;quot; - Placed Units==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 36 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the pre-placed units on the map and their properties. Each unit on the map gets the following structure:&lt;br /&gt;
* '''u32''': The unit's class instance (sort of a &amp;quot;serial number&amp;quot;)&lt;br /&gt;
* U16''': X coordinate of unit&lt;br /&gt;
* U16''': Y coordinate of unit&lt;br /&gt;
* '''u16''': Unit ID&lt;br /&gt;
* '''u16''': Type of relation to another building (i.e. add-on, nydus link)&lt;br /&gt;
** '''Bit 9''' - Nydus Link&lt;br /&gt;
** '''Bit 10''' - Addon Link&lt;br /&gt;
* '''u16''': Flags of special properties which can be applied to the unit and are valid:&lt;br /&gt;
** '''Bit 0''' - Cloak is valid&lt;br /&gt;
** '''Bit 1''' - Burrow is valid&lt;br /&gt;
** '''Bit 2''' - In transit is valid&lt;br /&gt;
** '''Bit 3''' - Hallucinated is valid&lt;br /&gt;
** '''Bit 4''' - Invincible is valid&lt;br /&gt;
** '''Bit 5-15''' - Unused&lt;br /&gt;
* '''u16''': Out of the elements of the unit data, the properties which can be changed by the map maker:&lt;br /&gt;
** '''Bit 0''' - Owner player is valid (the unit is not a critter, start location, etc.; not a neutral unit)&lt;br /&gt;
** '''Bit 1''' - HP is valid&lt;br /&gt;
** '''Bit 2''' - Shields is valid&lt;br /&gt;
** '''Bit 3''' - Energy is valid (unit is a wraith, etc.)&lt;br /&gt;
** '''Bit 4''' - Resource amount is valid (unit is a mineral patch, vespene geyser, etc.)&lt;br /&gt;
** '''Bit 5''' - Amount in hangar is valid (unit is a reaver, carrier, etc.)&lt;br /&gt;
** '''Bit 6-15''' - Unused&lt;br /&gt;
* '''u8''': Player number of owner (0-based)&lt;br /&gt;
* '''u8''': Hit points % (1-100)&lt;br /&gt;
* '''u8''': Shield points % (1-100)&lt;br /&gt;
* '''u8''': Energy points % (1-100)&lt;br /&gt;
* '''u32''': Resource amount&lt;br /&gt;
* '''u16''': Number of units in hangar&lt;br /&gt;
* '''u16''': Unit state flags&lt;br /&gt;
** '''Bit 0''' - Unit is cloaked&lt;br /&gt;
** '''Bit 1''' - Unit is burrowed&lt;br /&gt;
** '''Bit 2''' - Building is in transit&lt;br /&gt;
** '''Bit 3''' - Unit is hallucinated&lt;br /&gt;
** '''Bit 4''' - Unit is invincible&lt;br /&gt;
** '''Bit 5-15''' - Unused&lt;br /&gt;
* '''u32''': Unused&lt;br /&gt;
* '''u32''': Class instance of the unit to which this unit is related to (i.e. via an add-on, nydus link, etc.). It is &amp;quot;0&amp;quot; if the unit is not linked to any other unit.&lt;br /&gt;
Notes about UNIT:&lt;br /&gt;
* The X/Y coordinates are the center of the sprite of the unit (in pixels).&lt;br /&gt;
* Please edit if you could confirm the bit values to be correct/if you know more bit values.&lt;br /&gt;
* Default values will apply if bit values are unchecked. Defaults: 100% HP, 100% SP, 100% EP, 0 resources, 0 hangar count.&lt;br /&gt;
* This section can be split. Additional UNIT sections will add more units.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;ISOM&amp;quot; - Isometric Terrain==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section is required to place isometric terrain on the map. It provides data about the nature of the isometric &amp;quot;diamonds&amp;quot; (the editing mode of StarEdit).&lt;br /&gt;
* '''u16[ (width / 2 + 1) * (height + 1) * 4 ]''': 4 integers for each 2x1 map rectangle tile (plus one extra tile to the right and bottom of the map), as per the RECT structure. Each rectangle border (left, top, right, bottom) is assigned an &amp;quot;ISOM value.&amp;quot; These form the &amp;quot;diamond&amp;quot; pattern of the map, and each rectangle thus gets two ISOM values associated with it. The index of the rectangle's right tile is that of its left tile + 16.&lt;br /&gt;
** '''Bit 0''' (0x0001) - Flag used by the editor (&amp;quot;Edited&amp;quot;?)&lt;br /&gt;
** '''Bit 1-3''' - Determines the position on the ISOM grid for the given tile edge. Each diamond covers four 2x1 map tiles, so each tile therefore has two edges per diamond.&lt;br /&gt;
*** '''0''' (0x0000) - Top Left tile horizontal edge. Also the default value upon map creation for all tiles and directions.&lt;br /&gt;
*** '''1''' (0x0002) - Top Left tile vertical edge&lt;br /&gt;
*** '''2''' (0x0004) - Top Right tile horizontal edge&lt;br /&gt;
*** '''3''' (0x0006) - Top Right tile vertical edge&lt;br /&gt;
*** '''4''' (0x0008) - Bottom Right tile horizontal edge&lt;br /&gt;
*** '''5''' (0x000A) - Bottom Right tile vertical edge&lt;br /&gt;
*** '''6''' (0x000C) - Bottom Left tile vertical edge&lt;br /&gt;
*** '''7''' (0x000E) - Bottom Left tile horizontal edge&lt;br /&gt;
** '''Bit 4-14''' - ISOM terrain type ID, used to determine what type of terrain or is on that edge. This value matches the corresponding edge on the adjacent tile. The ID is related to the CV5 Index, but the actual value is determined by a hardcoded lookup table in the editor. A value of 0 is for square terrain in StarEdit.&lt;br /&gt;
** '''Bit 15''' (0x8000) - Flag used by the editor (&amp;quot;Skipped&amp;quot;?)&lt;br /&gt;
&lt;br /&gt;
[[File:ISOM_Grid_Values.png]]&lt;br /&gt;
First 1 in each value is the terrain type ID (1 for dirt), second digit is the ISOM edge ID. Values inside the diamond are associated with that diamond, values outside are associated with the adjacent diamonds on the ISOM grid.  This arrangement of tiles is tiled across the entire map, forming the full ISOM grid.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TILE&amp;quot; - StarEdit Terrain==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section will only be different from the [[#&amp;quot;MTXM&amp;quot; - StarCraft Terrain|MTXM]] section in tiles where doodads are present.&lt;br /&gt;
* '''u16[ map width * height ]''': 1 integer for each map tile. Moves horizontally across the map.&lt;br /&gt;
The values in TILE are normally directly generated from the ISOM section (see &amp;quot;'ISOM' section&amp;quot; above), and thus do not match that of MTXM on doodad tiles.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;DD2 &amp;quot; - StarEdit Sprites (Doodads)==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section contains the doodad map of the level. There are several parts to doodads. The graphical portion is stored in the [[#&amp;quot;MTXM&amp;quot; - StarCraft Terrain|MTXM]] section. The second part of the doodad is stored in this section. This section is only used by the map editor.&lt;br /&gt;
&lt;br /&gt;
Each doodad in the map gets the following structure:&lt;br /&gt;
* '''u16''': Number of the doodad. Size of the doodad is dependent on this. Doodads are different for each tileset.&lt;br /&gt;
* '''u16''': X coordinate of the doodad unit&lt;br /&gt;
* '''u16''': Y coordinate of the doodad unit&lt;br /&gt;
* '''u8''': Player number that owns the doodad&lt;br /&gt;
* '''u8''': Enabled flag&lt;br /&gt;
** '''00''' - Doodad is enabled (trap can attack, door is closed, etc)&lt;br /&gt;
** '''01''' - Doodad is disabled&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;THG2&amp;quot; - StarCraft Sprites==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 10 bytes.''&lt;br /&gt;
&lt;br /&gt;
The map editor only writes to this section. Starcraft uses this section.&lt;br /&gt;
&lt;br /&gt;
Sprites, usually on doodads, get the following structure.&lt;br /&gt;
* '''u16''': Unit/Sprite number of the sprite&lt;br /&gt;
* '''u16''': X coordinate of the doodad unit&lt;br /&gt;
* '''u16''': Y coordinate of the doodad unit&lt;br /&gt;
* '''u8''': Player number that owns the doodad&lt;br /&gt;
* '''u8''': Unused&lt;br /&gt;
* '''u16''': Flags&lt;br /&gt;
** '''Bit 0-11''' - Unused&lt;br /&gt;
** '''Bit 12''' - Draw as sprite (Determines if it is a sprite or a unit sprite)&lt;br /&gt;
** '''Bit 13''' - Unused&lt;br /&gt;
** '''Bit 14''' - Unused&lt;br /&gt;
** '''Bit 15''' - Disabled (Only valid if Draw as sprite is unchecked, disables the unit)&lt;br /&gt;
This section can be split. Additional THG2 sections will add more sprites.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MASK&amp;quot; - Fog of War Layer==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: This section will always validate.''&lt;br /&gt;
&lt;br /&gt;
This section contains the data on fog of war for each player. This is whether at the start of the game that levels of black space that is available.&lt;br /&gt;
* '''u8[ map width * height ]''': One byte for each map tile. The bits indicate for each player the fog of war.&lt;br /&gt;
** '''Bit 0''' - Player 1's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 1''' - Player 2's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 2''' - Player 3's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 3''' - Player 4's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 4''' - Player 5's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 5''' - Player 6's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 6''' - Player 7's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 7''' - Player 8's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
Any size greater than width*height will be ignored. Any size less will default missing tiles to 0xFF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;STR &amp;quot; - String Data==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be at least 1 byte.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the strings in the map.&lt;br /&gt;
* '''u16''': Number of strings in the section (Default''': 1024)&lt;br /&gt;
* '''u16[Number of strings]''': 1 integer for each string specifying the offset (the spot where the string starts in the section from the start of it).&lt;br /&gt;
* '''Strings''': After the offsets, this is where every string in the map goes, one after another. Each one is terminated by a null character.&lt;br /&gt;
This section can contain more or less then 1024 string offsests and will work in Starcraft.&amp;lt;br&amp;gt;&lt;br /&gt;
By default the first byte in '''Strings''' is a NUL character, and all unused offsets in the STR section point to this NUL character.&lt;br /&gt;
Note that STR sections can be stacked in a smiliar fashion as MTXM. The exact mechanisms of this are uncertain.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPRP&amp;quot; - CUWP Slots==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1280 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section is used whenever the create units with properties trigger is used. Since a slot has to be assigned to the action, this is where each slot is designated.&lt;br /&gt;
&lt;br /&gt;
There are 64 of the following structures regardless of how many are used and it cannot exceed 64.&lt;br /&gt;
* '''u16''': Flag of which special properties can be applied to unit, and are valid.&lt;br /&gt;
** '''Bit 0''' - Cloak bit is valid&lt;br /&gt;
** '''Bit 1''' - Burrowed bit is valid&lt;br /&gt;
** '''Bit 2''' - In transit bit is valid&lt;br /&gt;
** '''Bit 3''' - Hallucinated bit is valid&lt;br /&gt;
** '''Bit 4''' - Invincible bit is valid&lt;br /&gt;
** '''Bit 5-15''' - Unknown/unused&lt;br /&gt;
* '''u16''': Which elements of the unit data are valid, which properties can be changed by the map maker.&lt;br /&gt;
** '''Bit 0''' - Owner player is valid (unit is not neutral)&lt;br /&gt;
** '''Bit 1''' - HP is valid&lt;br /&gt;
** '''Bit 2''' - Shields is valid&lt;br /&gt;
** '''Bit 3''' - Energy is valid&lt;br /&gt;
** '''Bit 4''' - Resource amount is valid (unit is a resource)&lt;br /&gt;
** '''Bit 5''' - Amount in hanger is valid&lt;br /&gt;
** '''Bit 6''' - Unknown/unused&lt;br /&gt;
* '''u8''': Player number that owns unit. Will always be NULL in this section (0)&lt;br /&gt;
* '''u8''': Hit point % (1-100)&lt;br /&gt;
* '''u8''': Shield point % (1-100)&lt;br /&gt;
* '''u8''': Energy point % (1-100)&lt;br /&gt;
* '''u32''': Resource amount (for resources only)&lt;br /&gt;
* '''u16''': # of units in hangar&lt;br /&gt;
* '''u16''': Flags&lt;br /&gt;
** '''Bit 0''' - Unit is cloaked&lt;br /&gt;
** '''Bit 1''' - Unit is burrowed&lt;br /&gt;
** '''Bit 2''' - Building is in transit&lt;br /&gt;
** '''Bit 3''' - Unit is hallucinated&lt;br /&gt;
** '''Bit 4''' - Unit is invincible&lt;br /&gt;
** '''Bit 5-15''' - Unknown/unused&lt;br /&gt;
* '''u32''': Unknown/unused. Padding?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPUS&amp;quot; - CUWP Slots Used==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section goes along with the &amp;quot;UPRP&amp;quot; section. This section just indicates which of the 64 unit properties slot are used.&lt;br /&gt;
* '''u8[64]''': 1 byte for each trigger unit properties slot&lt;br /&gt;
** '''00''' - Properties slot is unused&lt;br /&gt;
** '''01''' - Properties slot is used&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MRGN&amp;quot; - Locations==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: 1280 bytes for retail, 5100 bytes for Hybrid and Broodwar.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the locations that the map uses. In a vanilla map, this section contains 64 locations. In a Hybrid or Brood War map, this section will expand to contain 255 locations.&lt;br /&gt;
&lt;br /&gt;
Each location gets one of the following location entries. The 'Anywhere' location, is ALWAYS location 64.&lt;br /&gt;
* '''u32''': Left (X1) coordinate of location, in pixels (usually 32 pt grid aligned)&lt;br /&gt;
* '''u32''': Top (Y1) coordinate of location, in pixels&lt;br /&gt;
* '''u32''': Right (X2) coordinate of location, in pixels&lt;br /&gt;
* '''u32''': Bottom (Y2) coordinate of location, in pixels&lt;br /&gt;
* '''u16''': String number of the name of this location&lt;br /&gt;
* '''u16''': Location elevation flags. If an elevation is disabled in the location, it's bit will be on (1)&lt;br /&gt;
** '''Bit 0''' - Low elevation&lt;br /&gt;
** '''Bit 1''' - Medium elevation&lt;br /&gt;
** '''Bit 2''' - High elevation&lt;br /&gt;
** '''Bit 3''' - Low air&lt;br /&gt;
** '''Bit 4''' - Medium air&lt;br /&gt;
** '''Bit 5''' - High air&lt;br /&gt;
** '''Bit 6-15''' - Unused&lt;br /&gt;
Note that in typical locations Right is always larger than Left and Bottom is always larger than Top. However, you can reverse one or both of these for [[Inverted Locations]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TRIG&amp;quot; - Triggers==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 2400 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the triggers in the map. This along with [[#&amp;quot;MBRF&amp;quot; - Mission Briefings|MBRF]] is the most complicated section in the entire scenario.chk file as there is a lot of data packed into too little of a space. Refer to the appendix at the bottom of this page for more information.&lt;br /&gt;
For easy reference, since each trigger contains 2400 bytes, the amount of triggers can be gotten by taking the section length and dividing by 2400.&lt;br /&gt;
Every single trigger in the map will have the following format:&lt;br /&gt;
* 16 Conditions (20 byte struct)&amp;lt;br&amp;gt; Every trigger has 16 of the following format, even if only one condition is used. See the appendix for information on which items are used for what conditions.&lt;br /&gt;
** '''u32''': Location number for the condition (1 based -- 0 refers to No Location), EUD Bitmask for a Death condition if the MaskFlag is set to &amp;quot;SC&amp;quot;&lt;br /&gt;
** '''u32''': [[#List of Players/Group IDs|Group]] that the condition applies to&lt;br /&gt;
** '''u32''': Qualified number (how many/resource amount)&lt;br /&gt;
** '''u16''': [[#Trigger Unit Types|Unit ID]] condition applies to&lt;br /&gt;
** '''u8''': [[#Numeric Comparisons|Numeric comparison]], [[#Switch States|switch state]]&lt;br /&gt;
** '''u8''': [[#Trigger Conditions List|Condition byte]]&lt;br /&gt;
** '''u8''': [[#Resource Types|Resource type]], [[#Score Types|score type]], Switch number (0-based)&lt;br /&gt;
** '''u8''': Flags&lt;br /&gt;
*** '''Bit 0''' - Unknown/unused&lt;br /&gt;
*** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled/ignored&lt;br /&gt;
*** '''Bit 2''' - Always display flag.&lt;br /&gt;
*** '''Bit 3''' - Unit properties is used. ('''Note:''' This is used in [[TRG|*.trg]] files)&lt;br /&gt;
*** '''Bit 4''' - Unit type is used. Cleared in &amp;quot;Offset + Mask&amp;quot; EUD conditions. May not be necessary otherwise?&lt;br /&gt;
*** '''Bit 5-7''' - Unknown/unused&lt;br /&gt;
** '''u16''': MaskFlag: set to &amp;quot;SC&amp;quot; (0x53, 0x43) when using the bitmask for EUDs, 0 otherwise&lt;br /&gt;
* 64 Actions (32 byte struct)&amp;lt;br&amp;gt; Immediately following the 16 conditions, there are 64 actions. There will always be 64 of the following structure, even if some of them are unused.&lt;br /&gt;
** '''u32''': Location - source location in &amp;quot;Order&amp;quot; and &amp;quot;Move Unit&amp;quot;, dest location in &amp;quot;Move Location&amp;quot; (1 based -- 0 refers to No Location), EUD Bitmask for a Death action if the MaskFlag is set to &amp;quot;SC&amp;quot;&lt;br /&gt;
** '''u32''': String number for trigger text (0 means no string)&lt;br /&gt;
** '''u32''': WAV string number (0 means no string)&lt;br /&gt;
** '''u32''': Seconds/milliseconds of time&lt;br /&gt;
** '''u32''': First (or only) [[#List of Players/Group IDs|Group/Player]] affected.&lt;br /&gt;
** '''u32''': Second group affected, secondary location (1-based), CUWP #, number, AI script (4-byte string), switch (0-based #)&lt;br /&gt;
** '''u16''': [[#Trigger Unit Types|Unit type]], [[#Score Types|score type]], [[#Resource Types|resource type]], [[#Alliance Statuses|alliance status]]&lt;br /&gt;
** '''u8''': [[#Trigger Actions List|Action byte]]&lt;br /&gt;
** '''u8''': Number of units (0 means All Units), [[#Action States|action state]], [[#Unit Orders|unit order]], [[#Number Modifiers|number modifier]]&lt;br /&gt;
** '''u8''': Flags&lt;br /&gt;
*** '''Bit 0''' - Ignore a wait/transmission once.&lt;br /&gt;
*** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled.&lt;br /&gt;
*** '''Bit 2''' - Always display flag - when not set: if the user has turned off subtitles (see sound options) the text will not display, when set: text will always display&lt;br /&gt;
*** '''Bit 3''' - Unit properties is used. Staredit uses this for *.trg files.&lt;br /&gt;
*** '''Bit 4''' - Unit type is used. Cleared in &amp;quot;Offset + Mask&amp;quot; EUD actions.&lt;br /&gt;
*** '''Bit 5-7''' - Unknown/unused&lt;br /&gt;
** '''u8''': Padding&lt;br /&gt;
** '''u16 (2 bytes)''': MaskFlag: set to &amp;quot;SC&amp;quot; (0x53, 0x43) when using the bitmask for EUDs, 0 otherwise&lt;br /&gt;
* Player Execution&amp;lt;br&amp;gt; Following the 16 conditions and 64 actions, every trigger also has this structure&lt;br /&gt;
** '''u32''': execution flags&lt;br /&gt;
*** '''Bit 0''' - All conditions are met, executing actions, cleared on the next trigger loop.&lt;br /&gt;
*** '''Bit 1''' - Ignore the following actions: Defeat, Draw.&lt;br /&gt;
*** '''Bit 2''' - Preserve trigger. (Can replace Preserve Trigger action)&lt;br /&gt;
*** '''Bit 3''' - Ignore execution.&lt;br /&gt;
*** '''Bit 4''' - Ignore all of the following actions for this trigger until the next trigger loop: Wait, PauseGame, Transmission, PlayWAV, DisplayTextMessage, CenterView, MinimapPing, TalkingPortrait, and MuteUnitSpeech.&lt;br /&gt;
*** '''Bit 5''' - This trigger has paused the game, ignoring subsequent calls to Pause Game (Unpause Game clears this flag only in the same trigger), may automatically call unpause at the end of action execution?&lt;br /&gt;
*** '''Bit 6''' - Wait skipping disabled for this trigger, cleared on next trigger loop.&lt;br /&gt;
*** '''Bit 7-31''' - Unknown/unused&lt;br /&gt;
** '''u8[27]''': 1 byte for each player in the [[#List of Players/Group IDs]]&lt;br /&gt;
*** '''00''' - Trigger is not executed for player&lt;br /&gt;
*** '''01''' - Trigger is executed for player&lt;br /&gt;
** '''u8''': Index of the current action, in StarCraft this is incremented after each action is executed, trigger execution ends when this is 64 (Max Actions) or an action is encountered with Action byte as 0&lt;br /&gt;
This section can be split. Additional TRIG sections will add more triggers.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MBRF&amp;quot; - Mission Briefings==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 2400 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all of the mission briefings shown by the players.&lt;br /&gt;
&lt;br /&gt;
See [[#&amp;quot;TRIG&amp;quot; - Triggers|&amp;quot;TRIG&amp;quot;]] section for format, as it is exactly the same except for the conditions. In this section the 16 conditions are still there, they are all null except for the very first condition, which only has a condition byte of 13. See [[#Mission Briefing Actions List]] for the action bytes for the mission briefing actions.&lt;br /&gt;
&lt;br /&gt;
This section can be split. Additional MBRF sections will add more briefing triggers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SPRP&amp;quot; - Scenario Properties==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4 bytes.''&lt;br /&gt;
&lt;br /&gt;
* '''u16''': String number of the scenario name&lt;br /&gt;
* '''u16''': String number of the scenarios description.&lt;br /&gt;
A string index of 0 for the map name will default it to its file name. A string index of 0 description will default to a predefined string.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;FORC&amp;quot; - Force Settings==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be less than or equal to 20 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the forces and the information about them.&lt;br /&gt;
* '''u8[8]''': 1 byte for each active player, specifying which of the 4 forces (0-based) that the player's on&lt;br /&gt;
* '''u16[4]''': 1 integer for each force, string number of the name of the force&lt;br /&gt;
* '''u8[4]''': 1 byte for each force specifying the properties:&lt;br /&gt;
** '''Bit 0''' - Random start location&lt;br /&gt;
** '''Bit 1''' - Allies&lt;br /&gt;
** '''Bit 2''' - Allied victory&lt;br /&gt;
** '''Bit 3''' - Shared vision&lt;br /&gt;
** '''Bit 4-7''' - Unused&lt;br /&gt;
Notes about FORC:&lt;br /&gt;
* If there is no string specified for a force name, it will default to a &amp;quot;Force #&amp;quot; string.&lt;br /&gt;
* If this section is less than 20 bytes, the remaining bytes are defaulted to 0.&lt;br /&gt;
* Players can be on a force greater than 4, however they will not appear in the game lobby.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;WAV &amp;quot; - WAV String Indexes==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
There are 512 wav entires regardless of how many are actually used.&lt;br /&gt;
* '''u32[512]''': 1 long for each WAV. Indicates a string index is used for a WAV path in the MPQ. If the entry is not used, it will be 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIS&amp;quot; - Unit Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4048 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;UNIx&amp;quot; - BW Unit Settings|&amp;quot;UNIx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains the unit settings for the level:&lt;br /&gt;
* '''u8[228]''': 1 byte for each unit, in order of Unit ID&lt;br /&gt;
** '''00''' - Unit does not use default settings&lt;br /&gt;
** '''01''' - Unit does use default settings&lt;br /&gt;
* '''u32[228]''': Hit points for unit (Note the displayed value is this value / 256, with the low byte being a fractional HP value)&lt;br /&gt;
* '''u16[228]''': Shield points, in order of Unit ID&lt;br /&gt;
* '''u8[228]''': Armor points, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Build time (1/60 seconds), in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Mineral cost, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Gas cost, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': String number, in order of Unit ID&lt;br /&gt;
* '''u16[100]''': Base weapon damage the weapon does, in weapon ID order ([[#List of Unit Weapon IDs]])&lt;br /&gt;
* '''u16[100]''': Upgrade bonus weapon damage, in weapon ID order&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGS&amp;quot; - Upgrade Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 598 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;UPGx&amp;quot; - BW Upgrade Settings|&amp;quot;UPGx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains upgrade settings:&lt;br /&gt;
* '''u8[46]''': 1 byte per each upgrade, in order of upgrade id.&lt;br /&gt;
** '''00''' - Upgrade uses custom settings&lt;br /&gt;
** '''01''' - Upgrade uses default settings&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, time factor for each upgrade, in order of upgrade id.&lt;br /&gt;
See [[#List of Upgrade IDs]] for upgrade ids.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TECS&amp;quot; - Tech Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 216 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;TECx&amp;quot; - BW Tech Settings|&amp;quot;TECx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains technology/special abilities settings:&lt;br /&gt;
* '''u8[24]''': 1 byte per each technology, specifies if the tech overrides the default settings. In order of technology id&lt;br /&gt;
** '''00''' - Technology uses custom settings&lt;br /&gt;
** '''01''' - Technology uses default settings&lt;br /&gt;
* '''u16[24]''': Mineral cost to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Gas cost to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Time required to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Energy cost to cast technology/special ability. In order of technology id.&lt;br /&gt;
See [[#List of Technology IDs]] for technology ids.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SWNM&amp;quot; - Switch Names==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section contains the strings used for each switch. There are 256 switches, and can't be any more or any less.&lt;br /&gt;
* '''u32[256]''': One long for each switch, specifies the string number for the name of each switch. Unnamed switches will have an index of 0, and have a default switch name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;COLR&amp;quot; - Player Colors==&lt;br /&gt;
''Required for Brood War only and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 8 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section indicates what color each player is, but only has effect on Brood War.&lt;br /&gt;
* '''u8[8]''': 1 byte for each player, indicates the color of the player&lt;br /&gt;
** '''00''' - Red&lt;br /&gt;
** '''01''' - Blue&lt;br /&gt;
** '''02''' - Teal&lt;br /&gt;
** '''03''' - Purple&lt;br /&gt;
** '''04''' - Orange&lt;br /&gt;
** '''05''' - Brown&lt;br /&gt;
** '''06''' - White&lt;br /&gt;
** '''07''' - Yellow&lt;br /&gt;
** '''08''' - Green&lt;br /&gt;
** '''09''' - Pale yellow&lt;br /&gt;
** '''10''' - Tan&lt;br /&gt;
** '''11''' - Azure (Neutral color)&lt;br /&gt;
Other values can be used but may have different results depending on the tileset. Any color value above 11 is an overflow. As of patch 1.18.6, values above 11 result in default player color.&lt;br /&gt;
&lt;br /&gt;
When CRGB is present, this section still defines leaderboard colors.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;CRGB&amp;quot; - Remastered Player Colors==&lt;br /&gt;
''Requirement unknown, but can be in any map type including non-remaster maps.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 32 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''u8[8][3]''': 3 bytes for each player corresponding to an RGB color value&lt;br /&gt;
** '''u8''': R&lt;br /&gt;
** '''u8''': G&lt;br /&gt;
** '''u8''': B, or color ID for type 3&lt;br /&gt;
* '''u8[8]''': Indicates how to select the color for each player&lt;br /&gt;
** '''0''' - Random Predefined&lt;br /&gt;
** '''1''' - Player's Choice&lt;br /&gt;
** '''2''' - Custom RGB Color (RGB value for the corresponding player defined above)&lt;br /&gt;
** '''3''' - Use color ID in the &amp;quot;B&amp;quot; color channel (&amp;quot;R&amp;quot; and &amp;quot;G&amp;quot; values appear to contain junk data); leaderboard color is still defined by COLR section and can be set independently&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SC:R Only color IDs:&amp;lt;br&amp;gt;&lt;br /&gt;
Extends the [[#&amp;quot;COLR&amp;quot; - Player Colors|COLR]] section list of colors, but cannot be used in the COLR section.&lt;br /&gt;
* '''12''' - Pale Green&lt;br /&gt;
* '''13''' - Blueish Grey&lt;br /&gt;
* '''14''' - Cyan&lt;br /&gt;
* '''15''' - Pink&lt;br /&gt;
* '''16''' - Olive&lt;br /&gt;
* '''17''' - Lime&lt;br /&gt;
* '''18''' - Navy&lt;br /&gt;
* '''19''' - Magenta&lt;br /&gt;
* '''20''' - Grey&lt;br /&gt;
* '''21''' - Black&lt;br /&gt;
* '''22+''' - Random (can pick colors that have been used)&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PUPx&amp;quot; - BW Upgrade Restrictions==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2318 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UPGR&amp;quot; - Upgrade Restrictions|&amp;quot;UPGR&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is identical to UPGR section except it uses the Brood War set of 61 upgrades instead of the original 46.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PTEx&amp;quot; - BW Tech Restrictions==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1672 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;PTEC&amp;quot; - Tech Restrictions|&amp;quot;PTEC&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is identical to PTEC section except it uses the Brood War set of 44 technologies instead of the original 24.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIx&amp;quot; - BW Unit Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4168 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UNIS&amp;quot; - Unit Settings|&amp;quot;UNIS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is indentical to UNIS section except it uses the Brood War set of 130 weapons instead of the original 100.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGx&amp;quot; - BW Upgrade Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 794 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UPGS&amp;quot; - Upgrade Settings|&amp;quot;UPGS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section the same as UPGS except section except it uses the Brood War set of 61 upgrades instead of the original 46, and there is an unused byte after the first set:&lt;br /&gt;
* '''u8[61]''': 1 byte per each upgrade, in order of upgrade id.&lt;br /&gt;
** '''00''' - Upgrade uses custom settings&lt;br /&gt;
** '''01''' - Upgrade uses default settings&lt;br /&gt;
* '''u8''': Unused.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, time factor for each upgrade, in order of upgrade id.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TECx&amp;quot; - BW Tech Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 396 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;TECS&amp;quot; - Tech Settings|&amp;quot;TECS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is indentical to TECS section except it uses the Brood War set of 44 technologies instead of the original 24.&lt;br /&gt;
&lt;br /&gt;
=Appendix=&lt;br /&gt;
A set of references and IDs that should help you easier in the trigger section and the technology/player ids, etc:&lt;br /&gt;
&lt;br /&gt;
==Trigger Conditions List==&lt;br /&gt;
* 0 = No Condition&lt;br /&gt;
* 1 = Countdown Timer(Comparison, QNumber)&lt;br /&gt;
* 2 = Command(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 3 = Bring(Player, Comparison, TUnit, Loc, QNumber)&lt;br /&gt;
* 4 = Accumulate(Player, Comparison, QNumber, ResType)&lt;br /&gt;
* 5 = Kill(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 6 = Command the Most(TUnit)&lt;br /&gt;
* 7 = Commands the Most At(TUnit, Loc)&lt;br /&gt;
* 8 = Most Kills(TUnit)&lt;br /&gt;
* 9 = Highest Score(Score)&lt;br /&gt;
* 10 = Most Resources(ResType)&lt;br /&gt;
* 11 = Switch(Switch)&lt;br /&gt;
* 12 = Elapsed Time(Comparison, QNumber)&lt;br /&gt;
* 13 = Data is a Mission Briefing. Conditions are N/A (Same as Never)&lt;br /&gt;
* 14 = Opponents(Player, Comparison, QNumber)&lt;br /&gt;
* 15 = Deaths(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 16 = Command the Least(TUnit)&lt;br /&gt;
* 17 = Command the Least At(TUnit, Loc)&lt;br /&gt;
* 18 = Least Kills(TUnit)&lt;br /&gt;
* 19 = Lowest Score(Score)&lt;br /&gt;
* 20 = Least Resources(ResType)&lt;br /&gt;
* 21 = Score(Player, Comparison, Score, QNumber)&lt;br /&gt;
* 22 = Always (Same as No Condition)&lt;br /&gt;
* 23 = Never&lt;br /&gt;
&lt;br /&gt;
==Trigger Actions List==&lt;br /&gt;
* 0 = No Action&lt;br /&gt;
* 1 = Victory&lt;br /&gt;
* 2 = Defeat&lt;br /&gt;
* 3 = Preserve Trigger&lt;br /&gt;
* 4 = Wait(Time)&lt;br /&gt;
* 5 = Pause Game (Single player only)&lt;br /&gt;
* 6 = Unpause Game (Single player only)&lt;br /&gt;
* 7 = Transmission(Text, Unit, Loc, Time, Modifier, Wave, WavTime)&lt;br /&gt;
* 8 = Play WAV(Wav, WavTime)&lt;br /&gt;
* 9 = Display Text Message(Text)&lt;br /&gt;
* 10 = Center View(Loc)&lt;br /&gt;
* 11 = Create Unit with Properties(Player, Unit, Number, Loc, UnitProp)&lt;br /&gt;
* 12 = Set Mission Objectives(Text)&lt;br /&gt;
* 13 = Set Switch(Switch, SwAction)&lt;br /&gt;
* 14 = Set Countdown Timer(Time, Modifier)&lt;br /&gt;
* 15 = Run AI Script(AIScript)&lt;br /&gt;
* 16 = Run AI Script At Location(AIScript)&lt;br /&gt;
* 17 = Leader Board (Control) (Text, TUnit)&lt;br /&gt;
* 18 = Leader Board (Control At Location) (Text, TUnit, Loc)&lt;br /&gt;
* 19 = Leader Board (Resources) (Text, ResType)&lt;br /&gt;
* 20 = Leader Board (Kills) (Text, TUnit)&lt;br /&gt;
* 21 = Leader Board (Points) (Text, Score)&lt;br /&gt;
* 22 = Kill Unit (Player, TUnit)&lt;br /&gt;
* 23 = Kill Unit At Location(Player, TUnit, Number, Loc)&lt;br /&gt;
* 24 = Remove Unit(Player, TUnit)&lt;br /&gt;
* 25 = Remove Unit At Location(Player, TUnit, Number, Loc)&lt;br /&gt;
* 26 = Set Resources(Player, Number, Modifier, ResType)&lt;br /&gt;
* 27 = Set Score(Player, Number, Modifier, Score)&lt;br /&gt;
* 28 = Minimap Ping(Loc)&lt;br /&gt;
* 29 = Talking Portrait(Unit, Time)&lt;br /&gt;
* 30 = Mute Unit Speech&lt;br /&gt;
* 31 = Unmute Unit Speech&lt;br /&gt;
* 32 = Leaderboard Computer Players(State)&lt;br /&gt;
* 33 = Leaderboard Goal (Control) (Text, TUnit, Number)&lt;br /&gt;
* 34 = Leaderboard Goal (Control At Location) (Text, TUnit, Number, Loc)&lt;br /&gt;
* 35 = Leaderboard Goal (Resources) (Text, TUnit, Number, ResType)&lt;br /&gt;
* 36 = Leaderboard Goal (Kills) (Text, TUnit, Number)&lt;br /&gt;
* 37 = Leaderboard Goal (Points) (Text, Number, Score)&lt;br /&gt;
* 38 = Move Location(Player, TUnit, SLoc, DLoc)&lt;br /&gt;
* 39 = Move Unit(Player, TUnit, Number, SLoc, DLoc)&lt;br /&gt;
* 40 = Leaderboard (Greed) (Number)&lt;br /&gt;
* 41 = Set Next Scenario(Text) (Single player only)&lt;br /&gt;
* 42 = Set Doodad State(Player, TUnit, Loc, State)&lt;br /&gt;
* 43 = Set Invincibility(Player, TUnit, Loc, State)&lt;br /&gt;
* 44 = Create Unit(Player, Unit, Number, Loc)&lt;br /&gt;
* 45 = Set Deaths(Player, TUnit, Number, Modifier)&lt;br /&gt;
* 46 = Order(Player, TUnit, SLoc, DLoc, Order)&lt;br /&gt;
* 47 = Comment(Text)&lt;br /&gt;
* 48 = Give Units to Player(SPlayer, DPlayer, TUnit, Number, Loc)&lt;br /&gt;
* 49 = Modify Unit Hit Points(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 50 = Modify Unit Energy(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 51 = Modify Unit Shield Points(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 52 = Modify Unit Resource Amount(Player, Number, ModAmount, Loc)&lt;br /&gt;
* 53 = Modify Unit Hanger Count(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 54 = Pause Timer&lt;br /&gt;
* 55 = Unpause Timer&lt;br /&gt;
* 56 = Draw&lt;br /&gt;
* 57 = Set Alliance Status(Player, AllyStatus)&lt;br /&gt;
* 58 = Disable Debug Mode (Single player only)&lt;br /&gt;
* 59 = Enable Debug Mode (Single player only)&lt;br /&gt;
&lt;br /&gt;
==Mission Briefing Actions List==&lt;br /&gt;
* 0 - No Action&lt;br /&gt;
* 1 - Wait(Time)&lt;br /&gt;
* 2 - Play WAV(Wave, WavTime)&lt;br /&gt;
* 3 - Text Message(Text, Time)&lt;br /&gt;
* 4 - Mission Objectives(Text)&lt;br /&gt;
* 5 - Show Portrait(Unit, Slot)&lt;br /&gt;
* 6 - Hide Portrait(Slot)&lt;br /&gt;
* 7 - Display Speaking Portrait(Slot, Time)&lt;br /&gt;
* 8 - Transmission(Text, Slot, Time, Modifier, Wave, WavTime)&lt;br /&gt;
* 9 - Skip Tutorial Enabled&lt;br /&gt;
&lt;br /&gt;
==Switch States==&lt;br /&gt;
* 2 = Switch is set&lt;br /&gt;
* 3 = Switch is cleared&lt;br /&gt;
&lt;br /&gt;
==Numeric Comparisons==&lt;br /&gt;
* 0 = At least&lt;br /&gt;
* 1 = At most&lt;br /&gt;
* 10 = Exactly&lt;br /&gt;
&lt;br /&gt;
==Score Types==&lt;br /&gt;
* 0 = Total&lt;br /&gt;
* 1 = Units&lt;br /&gt;
* 2 = Buildings&lt;br /&gt;
* 3 = Units and Buildings&lt;br /&gt;
* 4 = Kills&lt;br /&gt;
* 5 = Razings&lt;br /&gt;
* 6 = Kills and Razings&lt;br /&gt;
* 7 = Custom&lt;br /&gt;
&lt;br /&gt;
==Resource Types==&lt;br /&gt;
* 0 = Ore&lt;br /&gt;
* 1 = Gas&lt;br /&gt;
* 2 = Ore and Gas&lt;br /&gt;
&lt;br /&gt;
==Alliance Statuses==&lt;br /&gt;
* 0 = Enemy&lt;br /&gt;
* 1 = Ally&lt;br /&gt;
* 2 = Allied Victory&lt;br /&gt;
&lt;br /&gt;
==Unit Orders==&lt;br /&gt;
* 0 = Move&lt;br /&gt;
* 1 = Patrol&lt;br /&gt;
* 2 = Attack&lt;br /&gt;
&lt;br /&gt;
==Action States==&lt;br /&gt;
* 4 = Enabled/Set switch&lt;br /&gt;
* 5  = Disabled/Clear switch&lt;br /&gt;
* 6 = Toggle/Toggle switch&lt;br /&gt;
* 11 = Randomize switch&lt;br /&gt;
&lt;br /&gt;
==Number Modifiers==&lt;br /&gt;
* 7 = Set to&lt;br /&gt;
* 8 = Add&lt;br /&gt;
* 9 = Subtract&lt;br /&gt;
&lt;br /&gt;
==Trigger Unit Types==&lt;br /&gt;
* All normal units (0-227)&lt;br /&gt;
* 228 = None&lt;br /&gt;
* 229 = Any unit&lt;br /&gt;
* 230 = Men&lt;br /&gt;
* 231 = Buildings&lt;br /&gt;
* 232 = Factories&lt;br /&gt;
&lt;br /&gt;
==List of Players/Group IDs==&lt;br /&gt;
* 0 = Player 1&lt;br /&gt;
* 1 = Player 2&lt;br /&gt;
* 2 = Player 3&lt;br /&gt;
* 3 = Player 4&lt;br /&gt;
* 4 = Player 5&lt;br /&gt;
* 5 = Player 6&lt;br /&gt;
* 6 = Player 7&lt;br /&gt;
* 7 = Player 8&lt;br /&gt;
* 8 = Player 9&lt;br /&gt;
* 9 = Player 10&lt;br /&gt;
* 10 = Player 11&lt;br /&gt;
* 11 = Player 12&lt;br /&gt;
* 12 = None (Unused, One-entry Overflow in some cases)&lt;br /&gt;
* 13 = Current Player&lt;br /&gt;
* 14 = Foes&lt;br /&gt;
* 15 = Allies&lt;br /&gt;
* 16 = Neutral Players&lt;br /&gt;
* 17 = All Players&lt;br /&gt;
* 18 = Force 1&lt;br /&gt;
* 19 = Force 2&lt;br /&gt;
* 20 = Force 3&lt;br /&gt;
* 21 = Force 4&lt;br /&gt;
* 22 = Unused 1&lt;br /&gt;
* 23 = Unused 2&lt;br /&gt;
* 24 = Unused 3&lt;br /&gt;
* 25 = Unused 4&lt;br /&gt;
* 26 = Non Allied Victory Players&lt;br /&gt;
&lt;br /&gt;
==List of Technology IDs==&lt;br /&gt;
* 0 = Stim Packs&lt;br /&gt;
* 1 = Lockdown&lt;br /&gt;
* 2 = EMP Shockwave&lt;br /&gt;
* 3 = Spider Mines&lt;br /&gt;
* 4 = Scanner Sweep&lt;br /&gt;
* 5 = Siege Mode&lt;br /&gt;
* 6 = Defensive Matrix&lt;br /&gt;
* 7 = Irradiate&lt;br /&gt;
* 8 = Yamato Gun&lt;br /&gt;
* 9 = Cloaking Field&lt;br /&gt;
* 10 = Personnel Cloaking&lt;br /&gt;
* 11 = Burrowing&lt;br /&gt;
* 12 = Infestation&lt;br /&gt;
* 13 = Spawn Broodling&lt;br /&gt;
* 14 = Dark Swarm&lt;br /&gt;
* 15 = Plague&lt;br /&gt;
* 16 = Consume&lt;br /&gt;
* 17 = Ensnare&lt;br /&gt;
* 18 = Parasite&lt;br /&gt;
* 19 = Psionic Storm&lt;br /&gt;
* 20 = Hallucination&lt;br /&gt;
* 21 = Recall&lt;br /&gt;
* 22 = Stasis Field&lt;br /&gt;
* 23 = Archon Warp&lt;br /&gt;
* 24 = Restoration&lt;br /&gt;
* 25 = Disruption Web&lt;br /&gt;
* 26 = Unused 26&lt;br /&gt;
* 27 = Mind Control&lt;br /&gt;
* 28 = Dark Archon Meld&lt;br /&gt;
* 29 = Feedback&lt;br /&gt;
* 30 = Optical Flare&lt;br /&gt;
* 31 = Maelstorm&lt;br /&gt;
* 32 = Lurker Aspect&lt;br /&gt;
* 33 = Unused 33&lt;br /&gt;
* 34 = Healing&lt;br /&gt;
* 35 = Unused 35&lt;br /&gt;
* 36 = Unused 36&lt;br /&gt;
* 37 = Unused 37&lt;br /&gt;
* 38 = Unused 38&lt;br /&gt;
* 39 = Unused 39&lt;br /&gt;
* 40 = Unused 40&lt;br /&gt;
* 41 = Unused 41&lt;br /&gt;
* 42 = Unused 42&lt;br /&gt;
* 43 = Unused 43&lt;br /&gt;
&lt;br /&gt;
==List of Upgrade IDs==&lt;br /&gt;
* 0 = Terran Infantry Armor&lt;br /&gt;
* 1 = Terran Vehicle Plating&lt;br /&gt;
* 2 = Terran Ship Plating&lt;br /&gt;
* 3 = Zerg Carapace&lt;br /&gt;
* 4 = Zerg Flyer Caparace&lt;br /&gt;
* 5 = Protoss Armor&lt;br /&gt;
* 6 = Protoss Plating&lt;br /&gt;
* 7 = Terran Infantry Weapons&lt;br /&gt;
* 8 = Terran Vehicle Weapons&lt;br /&gt;
* 9 = Terran Ship Weapons&lt;br /&gt;
* 10 = Zerg Melee Attacks&lt;br /&gt;
* 11 = Zerg Missile Attacks&lt;br /&gt;
* 12 = Zerg Flyer Attacks&lt;br /&gt;
* 13 = Protoss Ground Weapons&lt;br /&gt;
* 14 = Protoss Air Weapons&lt;br /&gt;
* 15 = Protoss Plasma Shields&lt;br /&gt;
* 16 = U-238 Shells&lt;br /&gt;
* 17 = Ion Thrusters&lt;br /&gt;
* 18 = Burst Lasers (Unused)&lt;br /&gt;
* 19 = Titan Reactor (SV +50)&lt;br /&gt;
* 20 = Ocular Implants&lt;br /&gt;
* 21 = Moebius Reactor (Ghost +50)&lt;br /&gt;
* 22 = Apollo Reactor (Wraith +50)&lt;br /&gt;
* 23 = Colossus Reactor (BC +50)&lt;br /&gt;
* 24 = Ventral Sacs&lt;br /&gt;
* 25 = Antennae&lt;br /&gt;
* 26 = Pneumatized Carapace&lt;br /&gt;
* 27 = Metabolic Boost&lt;br /&gt;
* 28 = Adrenal Glands&lt;br /&gt;
* 29 = Muscular Augments&lt;br /&gt;
* 30 = Grooved Spines&lt;br /&gt;
* 31 = Gamete Meiosis (Queen +50)&lt;br /&gt;
* 32 = Metasynaptic Node (Defiler +50)&lt;br /&gt;
* 33 = Singularity Charge&lt;br /&gt;
* 34 = Leg Enhancements&lt;br /&gt;
* 35 = Scarab Damage &lt;br /&gt;
* 36 = Reaver Capacity &lt;br /&gt;
* 37 = Gravitic Drive&lt;br /&gt;
* 38 = Sensor Array&lt;br /&gt;
* 39 = Gravitic Boosters&lt;br /&gt;
* 40 = Khaydarin Amulet (HT +50)&lt;br /&gt;
* 41 = Apial Sensors&lt;br /&gt;
* 42 = Gravitic Thrusters&lt;br /&gt;
* 43 = Carrier Capacity&lt;br /&gt;
* 44 = Khaydarin Core (Arbiter +50)&lt;br /&gt;
* 45 = Unknown Upgrade45&lt;br /&gt;
* 46 = Unknown Upgrade46&lt;br /&gt;
* 47 = Argus Jewel (Corsair +50)&lt;br /&gt;
* 48 = Unknown Upgrade48&lt;br /&gt;
* 49 = Argus Talisman (DA +50)&lt;br /&gt;
* 50 = Unknown Upgrade50&lt;br /&gt;
* 51 = Caduceus Reactor (Medic +50)&lt;br /&gt;
* 52 = Chitinous Plating&lt;br /&gt;
* 53 = Anabolic Synthesis&lt;br /&gt;
* 54 = Charon Booster&lt;br /&gt;
* 55 = Unknown Upgrade55&lt;br /&gt;
* 56 = Unknown Upgrade56&lt;br /&gt;
* 57 = Unknown Upgrade57&lt;br /&gt;
* 58 = Unknown Upgrade58&lt;br /&gt;
* 59 = Unknown Upgrade59&lt;br /&gt;
* 60 = Unknown Upgrade60&lt;br /&gt;
&lt;br /&gt;
==List of Unit Weapon IDs==&lt;br /&gt;
* 0 = Gauss Rifle (Normal)&lt;br /&gt;
* 1 = Gauss Rifle (Jim Raynor-Marine)&lt;br /&gt;
* 2 = C-10 Concussion Rifle (Normal)&lt;br /&gt;
* 3 = C-10 Concussion Rifle (Sarah Kerrigan)&lt;br /&gt;
* 4 = Fragmentation Grenade (Normal)&lt;br /&gt;
* 5 = Fragmentation Grenade (Jim Raynor-Vulture)&lt;br /&gt;
* 6 = Spider Mines&lt;br /&gt;
* 7 = Twin Autocannons (Normal)&lt;br /&gt;
* 8 = Hellfire Missile Pack (Normal)&lt;br /&gt;
* 9 = Twin Autocannons (Alan Schezar)&lt;br /&gt;
* 10 = Hellfire Missile Pack (Alan Schezar)&lt;br /&gt;
* 11 = Arclite Cannon (Normal)&lt;br /&gt;
* 12 = Arclite Cannon (Edmund Duke)&lt;br /&gt;
* 13 = Fusion Cutter&lt;br /&gt;
* 14 = Fusion Cutter (Harvest)&lt;br /&gt;
* 15 = Gemini Missiles (Normal)&lt;br /&gt;
* 16 = Burst Lasers (Normal)&lt;br /&gt;
* 17 = Gemini Missiles (Tom Kazansky)&lt;br /&gt;
* 18 = Burst Lasers (Tom Kazansky)&lt;br /&gt;
* 19 = ATS Laser Battery (Normal)&lt;br /&gt;
* 20 = ATA Laser Battery (Normal)&lt;br /&gt;
* 21 = ATS Laser Battery (Norad II+Mengsk+DuGalle)&lt;br /&gt;
* 22 = ATA Laser Battery (Norad II+Mengsk+DuGalle)&lt;br /&gt;
* 23 = ATS Laser Battery (Hyperion)&lt;br /&gt;
* 24 = ATA Laser Battery (Hyperion)&lt;br /&gt;
* 25 = Flame Thrower (Normal)&lt;br /&gt;
* 26 = Flame Thrower (Gui Montag)&lt;br /&gt;
* 27 = Arclite Shock Cannon (Normal)&lt;br /&gt;
* 28 = Arclite Shock Cannon (Edmund Duke)&lt;br /&gt;
* 29 = Longbolt Missiles&lt;br /&gt;
* 30 = Yamato Gun&lt;br /&gt;
* 31 = Nuclear Missile&lt;br /&gt;
* 32 = Lockdown&lt;br /&gt;
* 33 = EMP Shockwave&lt;br /&gt;
* 34 = Irradiate&lt;br /&gt;
* 35 = Claws (Normal)&lt;br /&gt;
* 36 = Claws (Devouring One)&lt;br /&gt;
* 37 = Claws (Infested Kerrigan)&lt;br /&gt;
* 38 = Needle Spines (Normal)&lt;br /&gt;
* 39 = Needle Spines (Hunter Killer)&lt;br /&gt;
* 40 = Kaiser Blades (Normal)&lt;br /&gt;
* 41 = Kaiser Blades (Torrasque)&lt;br /&gt;
* 42 = Toxic Spores (Broodling)&lt;br /&gt;
* 43 = Spines&lt;br /&gt;
* 44 = Spines (Harvest)&lt;br /&gt;
* 45 = Acid Spray (Unused)&lt;br /&gt;
* 46 = Acid Spore (Normal)&lt;br /&gt;
* 47 = Acid Spore (Kukulza-Guardian)&lt;br /&gt;
* 48 = Glave Wurm (Normal)&lt;br /&gt;
* 49 = Glave Wurm (Kukulza-Mutalisk)&lt;br /&gt;
* 50 = Venom (Unused-Defiler)&lt;br /&gt;
* 51 = Venom (Unused-Defiler Hero)&lt;br /&gt;
* 52 = Seeker Spores&lt;br /&gt;
* 53 = Subterranean Tentacle&lt;br /&gt;
* 54 = Suicide (Infested Terran)&lt;br /&gt;
* 55 = Suicide (Scourge)&lt;br /&gt;
* 56 = Parasite&lt;br /&gt;
* 57 = Spawn Broodlings&lt;br /&gt;
* 58 = Ensnare&lt;br /&gt;
* 59 = Dark Swarm&lt;br /&gt;
* 60 = Plague&lt;br /&gt;
* 61 = Consume&lt;br /&gt;
* 62 = Particle Beam&lt;br /&gt;
* 63 = Particle Beam (Harvest)&lt;br /&gt;
* 64 = Psi Blades (Normal)&lt;br /&gt;
* 65 = Psi Blades (Fenix-Zealot)&lt;br /&gt;
* 66 = Phase Disruptor (Normal)&lt;br /&gt;
* 67 = Phase Disruptor (Fenix-Dragoon)&lt;br /&gt;
* 68 = Psi Assault (Normal-Unused)&lt;br /&gt;
* 69 = Psi Assault (Tassadar+Aldaris)&lt;br /&gt;
* 70 = Psionic Shockwave (Normal)&lt;br /&gt;
* 71 = Psionic Shockwave (Tassadar/Zeratul Archon)&lt;br /&gt;
* 72 = Unknown72&lt;br /&gt;
* 73 = Dual Photon Blasters (Normal)&lt;br /&gt;
* 74 = Anti-matter Missiles (Normal)&lt;br /&gt;
* 75 = Dual Photon Blasters (Mojo)&lt;br /&gt;
* 76 = Anit-matter Missiles (Mojo)&lt;br /&gt;
* 77 = Phase Disruptor Cannon (Normal)&lt;br /&gt;
* 78 = Phase Disruptor Cannon (Danimoth)&lt;br /&gt;
* 79 = Pulse Cannon&lt;br /&gt;
* 80 = STS Photon Cannon&lt;br /&gt;
* 81 = STA Photon Cannon&lt;br /&gt;
* 82 = Scarab&lt;br /&gt;
* 83 = Stasis Field&lt;br /&gt;
* 84 = Psi Storm&lt;br /&gt;
* 85 = Warp Blades (Zeratul)&lt;br /&gt;
* 86 = Warp Blades (Dark Templar Hero)&lt;br /&gt;
* 87 = Missiles (Unused)&lt;br /&gt;
* 88 = Laser Battery1 (Unused)&lt;br /&gt;
* 89 = Tormentor Missiles (Unused)&lt;br /&gt;
* 90 = Bombs (Unused)&lt;br /&gt;
* 91 = Raider Gun (Unused)&lt;br /&gt;
* 92 = Laser Battery2 (Unused)&lt;br /&gt;
* 93 = Laser Battery3 (Unused)&lt;br /&gt;
* 94 = Dual Photon Blasters (Unused)&lt;br /&gt;
* 95 = Flechette Grenade (Unused)&lt;br /&gt;
* 96 = Twin Autocannons (Floor Trap)&lt;br /&gt;
* 97 = Hellfire Missile Pack (Wall Trap)&lt;br /&gt;
* 98 = Flame Thrower (Wall Trap)&lt;br /&gt;
* 99 = Hellfire Missile Pack (Floor Trap)&lt;br /&gt;
* 100 = Neutron Flare&lt;br /&gt;
* 101 = Disruption Web&lt;br /&gt;
* 102 = Restoration&lt;br /&gt;
* 103 = Halo Rockets&lt;br /&gt;
* 104 = Corrosive Acid&lt;br /&gt;
* 105 = Mind Control&lt;br /&gt;
* 106 = Feedback&lt;br /&gt;
* 107 = Optical Flare&lt;br /&gt;
* 108 = Maelstrom&lt;br /&gt;
* 109 = Subterranean Spines&lt;br /&gt;
* 110 = Gauss Rifle0 (Unused)&lt;br /&gt;
* 111 = Warp Blades (Normal)&lt;br /&gt;
* 112 = C-10 Concussion Rifle (Samir Duran)&lt;br /&gt;
* 113 = C-10 Concussion Rifle (Infested Duran)&lt;br /&gt;
* 114 = Dual Photon Blasters (Artanis)&lt;br /&gt;
* 115 = Anti-matter Missiles (Artanis)&lt;br /&gt;
* 116 = C-10 Concussion Rifle (Alexei Stukov)&lt;br /&gt;
* 117 = Gauss Rifle1 (Unused)&lt;br /&gt;
* 118 = Gauss Rifle2 (Unused)&lt;br /&gt;
* 119 = Gauss Rifle3 (Unused)&lt;br /&gt;
* 120 = Gauss Rifle4 (Unused)&lt;br /&gt;
* 121 = Gauss Rifle5 (Unused)&lt;br /&gt;
* 122 = Gauss Rifle6 (Unused)&lt;br /&gt;
* 123 = Gauss Rifle7 (Unused)&lt;br /&gt;
* 124 = Gauss Rifle8 (Unused)&lt;br /&gt;
* 125 = Gauss Rifle9 (Unused)&lt;br /&gt;
* 126 = Gauss Rifle10 (Unused)&lt;br /&gt;
* 127 = Gauss Rifle11 (Unused)&lt;br /&gt;
* 128 = Gauss Rifle12 (Unused)&lt;br /&gt;
* 129 = Gauss Rifle13 (Unused)&lt;br /&gt;
* 130 = None&lt;br /&gt;
&lt;br /&gt;
==Complete Modifier List==&lt;br /&gt;
* 0 = Condition: &amp;gt;= (greater than or equal to)&lt;br /&gt;
* 1 = Condition: &amp;lt;= (less than or equal to)&lt;br /&gt;
* 2 = Condition: == TRUE (Is True)&lt;br /&gt;
* 3 = Condition: == FALSE (Is False)&lt;br /&gt;
* 4 = Action: = TRUE (Set to True)&lt;br /&gt;
* 5 = Action: = FALSE (Set to False)&lt;br /&gt;
* 6 = Action: NOT (toggle)&lt;br /&gt;
* 7 = Action: = (Set to)&lt;br /&gt;
* 8 = Action: += (Add)&lt;br /&gt;
* 9 = Action: -= (Subtract)&lt;br /&gt;
* 10 = Condition: == (Exactly)&lt;br /&gt;
* 11 = Action: Randomize&lt;br /&gt;
&lt;br /&gt;
[[Category:StarCraft]]&lt;br /&gt;
[[Category:Reference]]&lt;/div&gt;</summary>
		<author><name>FaRTy1billion</name></author>	</entry>

	<entry>
		<id>https://staredit.net/wiki/index.php?title=File:ISOM_Grid_Values.png&amp;diff=662</id>
		<title>File:ISOM Grid Values.png</title>
		<link rel="alternate" type="text/html" href="https://staredit.net/wiki/index.php?title=File:ISOM_Grid_Values.png&amp;diff=662"/>
				<updated>2022-07-23T23:27:19Z</updated>
		
		<summary type="html">&lt;p&gt;FaRTy1billion: Shows ISOM direction values relative to the placement diamond.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Shows ISOM direction values relative to the placement diamond.&lt;/div&gt;</summary>
		<author><name>FaRTy1billion</name></author>	</entry>

	<entry>
		<id>https://staredit.net/wiki/index.php?title=Scenario.chk&amp;diff=661</id>
		<title>Scenario.chk</title>
		<link rel="alternate" type="text/html" href="https://staredit.net/wiki/index.php?title=Scenario.chk&amp;diff=661"/>
				<updated>2022-07-09T23:04:34Z</updated>
		
		<summary type="html">&lt;p&gt;FaRTy1billion: /* &amp;quot;CRGB&amp;quot; - Remastered Player Colors */ fixed some line breaks&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The CHK file is a very dense file found inside the SCM or SCX file (as &amp;quot;staredit\scenario.chk&amp;quot;), which is just a renamed MPQ archive.&lt;br /&gt;
&lt;br /&gt;
In this article, some shorthand will be used for datatypes:&lt;br /&gt;
* '''u8''' for an unsigned byte&lt;br /&gt;
* '''u16''' for an unsigned short (2-byte integer)&lt;br /&gt;
* '''u32''' for an unsigned int (4-byte integer)&lt;br /&gt;
* '''uT[''a'']''' for an array of datatype '''T''' (8, 16, 32) with '''''a''''' number of elements&lt;br /&gt;
* '''uT[''a''][''b'']''' for a two-dimensional array of datatype '''T''', where each element of '''T[''a'']''' will be an array of size '''''b'''''&lt;br /&gt;
&lt;br /&gt;
=Sections=&lt;br /&gt;
The CHK is split into several named chunks (hence the file extension, an abbreviation of ''CHunK'').&lt;br /&gt;
&lt;br /&gt;
Each section begins with an 8-byte header:&lt;br /&gt;
* '''u32''' Name - A 4-byte string uniquely identifying that chunk's purpose.&lt;br /&gt;
* '''u32''' Size - The size, in bytes, of the chunk (not including this header)&lt;br /&gt;
Followed by as many bytes as 'Size', in a format described below.&lt;br /&gt;
&lt;br /&gt;
Some things to keep in mind about the CHK section:&lt;br /&gt;
* Invalid sections can exist and will be ignored. While Size is unsigned, it can safely be a negative value to read a chunk earlier in the file. This allows for &amp;quot;section stacking&amp;quot;, allowing smaller sections to be placed inside of larger ones or duplicate triggers or units to take less space in the file.&lt;br /&gt;
* All sections will marked &amp;quot;Not required.&amp;quot; are never read by StarCraft and can safely be omitted. However they may or may not be read by StarEdit, and may cause the map to be unreadable in an editor.&lt;br /&gt;
* Note &amp;quot;Hybrid&amp;quot;, or &amp;quot;Enhanced&amp;quot;, maps were introduced in 1.04. They are supported both by Original StarCraft and Brood War and usually contain sections for both types (e.g., UPGS and UPGx, TECS and TECx), but both sections aren't necessarily read.&lt;br /&gt;
* Duplicate sections will overwrite previously defined section data, except where noted. Note this only applies to those section that pass the specified &amp;quot;validation&amp;quot; parameters, as any section that does not successfully validate will be ignored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TYPE&amp;quot; - Map Type==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the type of scenario.&lt;br /&gt;
* '''u32''': Specifies the type of scenario:&lt;br /&gt;
** '''0x53574152''' or '''RAWS''' - 1.04 StarCraft and above (&amp;quot;hybrid&amp;quot;)&lt;br /&gt;
** '''0x42574152''' or '''RAWB''' - Brood War&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;VER &amp;quot; - Format Version==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section identifies the file format version.&lt;br /&gt;
* '''u16''': File format version:&lt;br /&gt;
** '''59''' - Starcraft 1.00 (original retail release)&lt;br /&gt;
** '''63''' - Starcraft 1.04 ''(hybrid)''&lt;br /&gt;
** '''64''' - Starcraft Remastered (1.21) ''(hybrid)''&lt;br /&gt;
** '''205''' - Brood War 1.00 ''(1.04)''&lt;br /&gt;
** '''206''' - Starcraft Remastered (1.21) ''(broodwar)''&lt;br /&gt;
This is the only version code section to actually be read by StarCraft (of TYPE, VER , IVER, and IVE2). Any other value is invalid in retail StarCraft and is usually a beta version.&lt;br /&gt;
&lt;br /&gt;
Other unsupported versions include:&lt;br /&gt;
* '''0-19''' - ''Warcraft II versions (.PUD)''&lt;br /&gt;
* '''47''' - ''Starcraft Beta''&lt;br /&gt;
* '''61''' - Brood War internal (map version 61)&lt;br /&gt;
* '''75''' - Brood War internal (map version 75)&lt;br /&gt;
* '''201''' - Brood War internal (map version 201)&lt;br /&gt;
* '''203''' - Brood War internal (map version 203)&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IVER&amp;quot; - Map Version==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section &amp;quot;additionally identifies&amp;quot; the map version.&lt;br /&gt;
* '''u16''': &amp;quot;Additional file format version:&amp;quot;&lt;br /&gt;
** '''9''' - beta/obsolete versions&lt;br /&gt;
** '''10''' - current versions&lt;br /&gt;
When saving as expansion this section gets removed entirely. Contrary to popular belief, it doesn't get &amp;quot;replaced&amp;quot; by IVE2 in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IVE2&amp;quot; - Map Version==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section &amp;quot;additionally identifies&amp;quot; the map version.&lt;br /&gt;
* '''u16''': &amp;quot;Additional file format version:&amp;quot;&lt;br /&gt;
** '''11''' - 1.04 StarCraft and above (&amp;quot;hybrid&amp;quot;) or Brood War.&lt;br /&gt;
This section does not &amp;quot;replace&amp;quot; IVER in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;VCOD&amp;quot; - Verification Code==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be equal to size of the VCOD data in the EXE resource. Must result in valid checksum.''&lt;br /&gt;
&lt;br /&gt;
This section has a verification code to make sure this is actually a CHK file.&lt;br /&gt;
&lt;br /&gt;
* '''u32[256]''': Seed values.&lt;br /&gt;
* '''u8[16]''': Operation codes to produce the resulting hash:&lt;br /&gt;
** '''00''' - XOR's the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''01''' - Adds to the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''02''' - Subtracts from the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''03''' - XOR's the current hash with the VCOD table at index OWNR, SIDE, FORC, and 0&lt;br /&gt;
** '''04''' - same as 0x03&lt;br /&gt;
** '''05''' - same as 0x03&lt;br /&gt;
** '''06''' - Complex function consisting of ORs and shifts&lt;br /&gt;
** '''07''' - Inverted version of 0x06, switching direction of all shifts&lt;br /&gt;
** '''08+''' - Do nothing&lt;br /&gt;
Opcodes and seeds do not have to match those in EXE resource, as long as the same value is produced.&amp;lt;br&amp;gt;&lt;br /&gt;
The only indexes in the seed table that are referenced are those that correspond individual values of [[#&amp;quot;OWNR&amp;quot; - StarCraft Player Types|OWNR]], [[#&amp;quot;SIDE&amp;quot; - Player Races|SIDE]], [[#&amp;quot;FORC&amp;quot; - Force Settings|FORC]] player assignments, and index 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IOWN&amp;quot; - StarEdit Player Types==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the owner of each player.&lt;br /&gt;
* '''u8[12]''': One byte for each player, specifies the owner of the player:&lt;br /&gt;
** '''00''' - Inactive&lt;br /&gt;
** ''01'' - Computer (game)&lt;br /&gt;
** ''02'' - Occupied by Human Player&lt;br /&gt;
** '''03''' - Rescue Passive&lt;br /&gt;
** '''04''' - Unused&lt;br /&gt;
** '''05''' - Computer&lt;br /&gt;
** '''06''' - Human (Open Slot)&lt;br /&gt;
** '''07''' - Neutral&lt;br /&gt;
** ''08'' - Closed slot&lt;br /&gt;
This section is separate from OWNR as a staredit value. Staredit does not display &amp;quot;inactive&amp;quot; as a valid option. Italicized settings denote invalid map options, which may involve a buffer overflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;OWNR&amp;quot; - StarCraft Player Types==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 12 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section designates the controller of a particular player. It is exactly the same as the &amp;quot;IOWN&amp;quot; section, except there is an additional value, 0x00 for Inactive.&lt;br /&gt;
* '''u8[12]''': One byte for each player, specifies the owner of the player:&lt;br /&gt;
** '''00''' - Inactive&lt;br /&gt;
** ''01'' - Computer (game)&lt;br /&gt;
** ''02'' - Occupied by Human Player&lt;br /&gt;
** '''03''' - Rescue Passive&lt;br /&gt;
** '''04''' - Unused&lt;br /&gt;
** '''05''' - Computer&lt;br /&gt;
** '''06''' - Human (Open Slot)&lt;br /&gt;
** '''07''' - Neutral&lt;br /&gt;
** ''08'' - Closed slot&lt;br /&gt;
Italicized settings denote invalid map options, which may involve a buffer overflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;ERA &amp;quot; - Tileset==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section indicates the tileset of the scenario.&lt;br /&gt;
* '''u16''': Designates tileset:&lt;br /&gt;
** '''00''' - Badlands&lt;br /&gt;
** '''01''' - Space Platform&lt;br /&gt;
** '''02''' - Installation&lt;br /&gt;
** '''03''' - Ashworld&lt;br /&gt;
** '''04''' - Jungle&lt;br /&gt;
** '''05''' - Desert&lt;br /&gt;
** '''06''' - Arctic&lt;br /&gt;
** '''07''' - Twilight&lt;br /&gt;
StarCraft masks the tileset indicator's bit value, so bits after the third place (anything after the value &amp;quot;7&amp;quot;) are removed. Thus, 9 (1001 in binary) is interpreted as 1 (0001), 10 (1010) as 2 (0010), etc.&amp;lt;br&amp;gt;&lt;br /&gt;
Desert, Arctic, and Twilight are Brood War-only tilesets.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;DIM &amp;quot; - Map Dimensions==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains the dimensions of the map.&lt;br /&gt;
* '''u16''': Width of the map&lt;br /&gt;
* '''u16''': Height of the map&lt;br /&gt;
The Width/Height of the map is measured in the number of square 32x32p tiles.&amp;lt;br&amp;gt;&lt;br /&gt;
Standard Dimensions are 64, 96, 128, 192, and 256.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SIDE&amp;quot; - Player Races==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 12 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains the species/race of each player.&lt;br /&gt;
* '''u8[12]''': 1 byte per player the species of that player:&lt;br /&gt;
** '''00''' - Zerg&lt;br /&gt;
** '''01''' - Terran&lt;br /&gt;
** '''02''' - Protoss&lt;br /&gt;
** ''03'' - Invalid (Independent), shown as &amp;quot;Unknown&amp;quot; in SC:R lobby&lt;br /&gt;
** ''04'' - Invalid (Neutral), shown as &amp;quot;Unknown&amp;quot;&lt;br /&gt;
** '''05''' - User Select&lt;br /&gt;
** '''06''' - Random (Forced; Acts as a selected race)&lt;br /&gt;
** ''07'' - Inactive, shown as locked &amp;quot;Select Race&amp;quot; option in SC:R lobby&lt;br /&gt;
Italicized settings denote invalid map options. Note Players 9-11 are defaultly Inactive and Player 12 is defaultly Neutral.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MTXM&amp;quot; - StarCraft Terrain==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be less than or equal to 131072 (0x20000) bytes (256 * 256 * 2).''&lt;br /&gt;
&lt;br /&gt;
Terrain section that contains a map of the level's appearance. StarEdit disregards this section and instead uses [[#&amp;quot;TILE&amp;quot; - StarEdit Terrain|TILE]]; it is only used in Starcraft.&lt;br /&gt;
* '''u16[map width * height]''': one integer for each tile.&lt;br /&gt;
Notes about MTXM:&lt;br /&gt;
* The Width/Height of the map is measured in the number of square 32x32p tiles.&lt;br /&gt;
* Tiles in this section are listed from left to right, top to bottom.&lt;br /&gt;
* The values for each integer are their respective &amp;quot;MegaTile&amp;quot; values in the scenario's tileset. If the size of this section is greater than width*height*2, the data following is ignored. If the size of this section is less, the resulting tiles that have not been defined will be null tiles.&lt;br /&gt;
* This section includes doodads as terrain; TILE, which is otherwise identical, doesn't. Out of the terrain sections (TILE, ISOM, and MTXM), SC only reads MTXM for the sake of not having to generate this data on-the-fly: it contains the exact representation of the level's appearance, including doodads. TILE, on the other hand, is directly tied via a tile lookup function to ISOM, and exists for the sake of not having to generate tiles from ISOM on-the-fly in StarEdit.&lt;br /&gt;
* If MTXM section is smaller than (map width*height), then the remaining tiles will be filled with null tiles or tiles specified by previous MTXM sections.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PUNI&amp;quot; - Player Unit Restrictions==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 5700 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains player unit restrictions: it indicates whether the player can or cannot build a particular unit.&lt;br /&gt;
* '''u8[228][12]''': 1 byte for each unit in order of its unit id, then each player, for player availability:&lt;br /&gt;
** '''00''' - That unit is not available for production if the player has 'override defaults' on&lt;br /&gt;
** '''01''' - That unit is available for production if the player has 'override defaults' on&lt;br /&gt;
* '''u8[228]''': 1 byte for each unit in order of it's unit id, for global availability defaults (for all players):&lt;br /&gt;
** '''00''' - That unit is not available for production&lt;br /&gt;
** '''01''' - That unit is available for production&lt;br /&gt;
* '''u8[228][12]''': 1 byte for each unit in order of its unit id, then each player, indicating whether a player uses the global availability defaults.&lt;br /&gt;
** '''00''' - Player overrides defaults for this unit&lt;br /&gt;
** '''01''' - Player uses defaults for this unit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGR&amp;quot; - Upgrade Restrictions==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1748 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;PUPx&amp;quot; - BW Upgrade Restrictions|&amp;quot;PUPx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains player upgrade restrictions: it indicates the starting/maximum levels at/to which a player can perform a particular upgrade.&lt;br /&gt;
* '''u8[46][12]''': 1 byte for the maximum level a player can upgrade to, in order of its upgrade id, then each player&lt;br /&gt;
* '''u8[46][12]''': 1 byte for the level of an upgrade a player starts off with, in order of its upgrade id, then each player&lt;br /&gt;
* '''u8[46]''': 1 byte for the global default maximum level of each upgrade, in order of its upgrade id.&lt;br /&gt;
* '''u8[46]''': 1 byte for the global default starting level of each upgrade, in order of its upgrade id.&lt;br /&gt;
* '''u8[46][12]''': 1 byte for each upgrade in order of its upgrade id, then each player, indicating whether a player uses the global upgrade defaults:&lt;br /&gt;
** '''00''' - Player does not use global upgrade defaults for this upgrade&lt;br /&gt;
** '''01''' - Player uses upgrade defaults for this upgrade&lt;br /&gt;
See [[#List of Upgrade IDs]].&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PTEC&amp;quot; - Tech Restrictions==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 912 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;PTEx&amp;quot; - BW Tech Restrictions|&amp;quot;PTEx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains player technology availability restrictions: it indicates whether a player starts off with a particular technology or can research a particular technology.&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology id, then each player, for player availability:&lt;br /&gt;
** '''00''' - Technology is not available for a player&lt;br /&gt;
** '''01''' - Technology is available for a player&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology id, then each player, for &amp;quot;already researched&amp;quot; status:&lt;br /&gt;
** '''00''' - Technology is not already researched&lt;br /&gt;
** '''01''' - Technology is already researched&lt;br /&gt;
* '''u8[24]''': 1 byte for each technology for global availability defaults:&lt;br /&gt;
** '''00''' - Technology is not available by default&lt;br /&gt;
** '''01''' - Technology is available by default&lt;br /&gt;
* '''u8[24]''': 1 byte for each technology for global &amp;quot;already researched&amp;quot; defaults:&lt;br /&gt;
** '''00''' - Technology is not already researched by default&lt;br /&gt;
** '''01''' - Technology is already researched by default&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology in order of its technology id, then each player, indicating whether a player uses the global defaults:&lt;br /&gt;
** '''00''' - Technology overrides defaults for player&lt;br /&gt;
** '''01''' - Technology uses default settings for player&lt;br /&gt;
See [[#List of Technology IDs]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIT&amp;quot; - Placed Units==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 36 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the pre-placed units on the map and their properties. Each unit on the map gets the following structure:&lt;br /&gt;
* '''u32''': The unit's class instance (sort of a &amp;quot;serial number&amp;quot;)&lt;br /&gt;
* U16''': X coordinate of unit&lt;br /&gt;
* U16''': Y coordinate of unit&lt;br /&gt;
* '''u16''': Unit ID&lt;br /&gt;
* '''u16''': Type of relation to another building (i.e. add-on, nydus link)&lt;br /&gt;
** '''Bit 9''' - Nydus Link&lt;br /&gt;
** '''Bit 10''' - Addon Link&lt;br /&gt;
* '''u16''': Flags of special properties which can be applied to the unit and are valid:&lt;br /&gt;
** '''Bit 0''' - Cloak is valid&lt;br /&gt;
** '''Bit 1''' - Burrow is valid&lt;br /&gt;
** '''Bit 2''' - In transit is valid&lt;br /&gt;
** '''Bit 3''' - Hallucinated is valid&lt;br /&gt;
** '''Bit 4''' - Invincible is valid&lt;br /&gt;
** '''Bit 5-15''' - Unused&lt;br /&gt;
* '''u16''': Out of the elements of the unit data, the properties which can be changed by the map maker:&lt;br /&gt;
** '''Bit 0''' - Owner player is valid (the unit is not a critter, start location, etc.; not a neutral unit)&lt;br /&gt;
** '''Bit 1''' - HP is valid&lt;br /&gt;
** '''Bit 2''' - Shields is valid&lt;br /&gt;
** '''Bit 3''' - Energy is valid (unit is a wraith, etc.)&lt;br /&gt;
** '''Bit 4''' - Resource amount is valid (unit is a mineral patch, vespene geyser, etc.)&lt;br /&gt;
** '''Bit 5''' - Amount in hangar is valid (unit is a reaver, carrier, etc.)&lt;br /&gt;
** '''Bit 6-15''' - Unused&lt;br /&gt;
* '''u8''': Player number of owner (0-based)&lt;br /&gt;
* '''u8''': Hit points % (1-100)&lt;br /&gt;
* '''u8''': Shield points % (1-100)&lt;br /&gt;
* '''u8''': Energy points % (1-100)&lt;br /&gt;
* '''u32''': Resource amount&lt;br /&gt;
* '''u16''': Number of units in hangar&lt;br /&gt;
* '''u16''': Unit state flags&lt;br /&gt;
** '''Bit 0''' - Unit is cloaked&lt;br /&gt;
** '''Bit 1''' - Unit is burrowed&lt;br /&gt;
** '''Bit 2''' - Building is in transit&lt;br /&gt;
** '''Bit 3''' - Unit is hallucinated&lt;br /&gt;
** '''Bit 4''' - Unit is invincible&lt;br /&gt;
** '''Bit 5-15''' - Unused&lt;br /&gt;
* '''u32''': Unused&lt;br /&gt;
* '''u32''': Class instance of the unit to which this unit is related to (i.e. via an add-on, nydus link, etc.). It is &amp;quot;0&amp;quot; if the unit is not linked to any other unit.&lt;br /&gt;
Notes about UNIT:&lt;br /&gt;
* The X/Y coordinates are the center of the sprite of the unit (in pixels).&lt;br /&gt;
* Please edit if you could confirm the bit values to be correct/if you know more bit values.&lt;br /&gt;
* Default values will apply if bit values are unchecked. Defaults: 100% HP, 100% SP, 100% EP, 0 resources, 0 hangar count.&lt;br /&gt;
* This section can be split. Additional UNIT sections will add more units.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;ISOM&amp;quot; - Isometric Terrain==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section is required to place isometric terrain on the map. It provides data about the nature of the isometrical &amp;quot;diamonds&amp;quot; (the editing mode of StarEdit).&lt;br /&gt;
* '''u16[ (width / 2 + 1) * (height + 1) * 4 ]''': 4 integers for each map rectangle tile (plus one extra tile to the right and bottom of the map), as per the RECT structure. Each rectangle border (left, top, right, bottom) is assigned an &amp;quot;ISOM value.&amp;quot; These form the &amp;quot;diamond&amp;quot; pattern of the map, and each rectangle thus gets two ISOM values associated with it. StarEdit somehow hashes these (the exact algorithm is unknown) and thus produces the tile index of the rectangle (which it stores in TILE for reasons of efficiency). The index of the rectangle's right tile is that of its left tile + 16.&lt;br /&gt;
This section is the only truly unknown section of the .chk format. If you're an ex-Blizzard employee or SI, please edit this section. If you have additional research, post on the forums about it and/or edit this section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TILE&amp;quot; - StarEdit Terrain==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section will only be different from the [[#&amp;quot;MTXM&amp;quot; - StarCraft Terrain|MTXM]] section in tiles where doodads are present.&lt;br /&gt;
* '''u16[ map width * height ]''': 1 integer for each map tile. Moves horizontally across the map.&lt;br /&gt;
The values in TILE are normally directly generated from the ISOM section (see &amp;quot;'ISOM' section&amp;quot; above), and thus do not match that of MTXM on doodad tiles.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;DD2 &amp;quot; - StarEdit Sprites (Doodads)==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section contains the doodad map of the level. There are several parts to doodads. The graphical portion is stored in the [[#&amp;quot;MTXM&amp;quot; - StarCraft Terrain|MTXM]] section. The second part of the doodad is stored in this section. This section is only used by the map editor.&lt;br /&gt;
&lt;br /&gt;
Each doodad in the map gets the following structure:&lt;br /&gt;
* '''u16''': Number of the doodad. Size of the doodad is dependent on this. Doodads are different for each tileset.&lt;br /&gt;
* '''u16''': X coordinate of the doodad unit&lt;br /&gt;
* '''u16''': Y coordinate of the doodad unit&lt;br /&gt;
* '''u8''': Player number that owns the doodad&lt;br /&gt;
* '''u8''': Enabled flag&lt;br /&gt;
** '''00''' - Doodad is enabled (trap can attack, door is closed, etc)&lt;br /&gt;
** '''01''' - Doodad is disabled&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;THG2&amp;quot; - StarCraft Sprites==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 10 bytes.''&lt;br /&gt;
&lt;br /&gt;
The map editor only writes to this section. Starcraft uses this section.&lt;br /&gt;
&lt;br /&gt;
Sprites, usually on doodads, get the following structure.&lt;br /&gt;
* '''u16''': Unit/Sprite number of the sprite&lt;br /&gt;
* '''u16''': X coordinate of the doodad unit&lt;br /&gt;
* '''u16''': Y coordinate of the doodad unit&lt;br /&gt;
* '''u8''': Player number that owns the doodad&lt;br /&gt;
* '''u8''': Unused&lt;br /&gt;
* '''u16''': Flags&lt;br /&gt;
** '''Bit 0-11''' - Unused&lt;br /&gt;
** '''Bit 12''' - Draw as sprite (Determines if it is a sprite or a unit sprite)&lt;br /&gt;
** '''Bit 13''' - Unused&lt;br /&gt;
** '''Bit 14''' - Unused&lt;br /&gt;
** '''Bit 15''' - Disabled (Only valid if Draw as sprite is unchecked, disables the unit)&lt;br /&gt;
This section can be split. Additional THG2 sections will add more sprites.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MASK&amp;quot; - Fog of War Layer==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: This section will always validate.''&lt;br /&gt;
&lt;br /&gt;
This section contains the data on fog of war for each player. This is whether at the start of the game that levels of black space that is available.&lt;br /&gt;
* '''u8[ map width * height ]''': One byte for each map tile. The bits indicate for each player the fog of war.&lt;br /&gt;
** '''Bit 0''' - Player 1's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 1''' - Player 2's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 2''' - Player 3's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 3''' - Player 4's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 4''' - Player 5's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 5''' - Player 6's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 6''' - Player 7's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 7''' - Player 8's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
Any size greater than width*height will be ignored. Any size less will default missing tiles to 0xFF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;STR &amp;quot; - String Data==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be at least 1 byte.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the strings in the map.&lt;br /&gt;
* '''u16''': Number of strings in the section (Default''': 1024)&lt;br /&gt;
* '''u16[Number of strings]''': 1 integer for each string specifying the offset (the spot where the string starts in the section from the start of it).&lt;br /&gt;
* '''Strings''': After the offsets, this is where every string in the map goes, one after another. Each one is terminated by a null character.&lt;br /&gt;
This section can contain more or less then 1024 string offsests and will work in Starcraft.&amp;lt;br&amp;gt;&lt;br /&gt;
By default the first byte in '''Strings''' is a NUL character, and all unused offsets in the STR section point to this NUL character.&lt;br /&gt;
Note that STR sections can be stacked in a smiliar fashion as MTXM. The exact mechanisms of this are uncertain.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPRP&amp;quot; - CUWP Slots==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1280 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section is used whenever the create units with properties trigger is used. Since a slot has to be assigned to the action, this is where each slot is designated.&lt;br /&gt;
&lt;br /&gt;
There are 64 of the following structures regardless of how many are used and it cannot exceed 64.&lt;br /&gt;
* '''u16''': Flag of which special properties can be applied to unit, and are valid.&lt;br /&gt;
** '''Bit 0''' - Cloak bit is valid&lt;br /&gt;
** '''Bit 1''' - Burrowed bit is valid&lt;br /&gt;
** '''Bit 2''' - In transit bit is valid&lt;br /&gt;
** '''Bit 3''' - Hallucinated bit is valid&lt;br /&gt;
** '''Bit 4''' - Invincible bit is valid&lt;br /&gt;
** '''Bit 5-15''' - Unknown/unused&lt;br /&gt;
* '''u16''': Which elements of the unit data are valid, which properties can be changed by the map maker.&lt;br /&gt;
** '''Bit 0''' - Owner player is valid (unit is not neutral)&lt;br /&gt;
** '''Bit 1''' - HP is valid&lt;br /&gt;
** '''Bit 2''' - Shields is valid&lt;br /&gt;
** '''Bit 3''' - Energy is valid&lt;br /&gt;
** '''Bit 4''' - Resource amount is valid (unit is a resource)&lt;br /&gt;
** '''Bit 5''' - Amount in hanger is valid&lt;br /&gt;
** '''Bit 6''' - Unknown/unused&lt;br /&gt;
* '''u8''': Player number that owns unit. Will always be NULL in this section (0)&lt;br /&gt;
* '''u8''': Hit point % (1-100)&lt;br /&gt;
* '''u8''': Shield point % (1-100)&lt;br /&gt;
* '''u8''': Energy point % (1-100)&lt;br /&gt;
* '''u32''': Resource amount (for resources only)&lt;br /&gt;
* '''u16''': # of units in hangar&lt;br /&gt;
* '''u16''': Flags&lt;br /&gt;
** '''Bit 0''' - Unit is cloaked&lt;br /&gt;
** '''Bit 1''' - Unit is burrowed&lt;br /&gt;
** '''Bit 2''' - Building is in transit&lt;br /&gt;
** '''Bit 3''' - Unit is hallucinated&lt;br /&gt;
** '''Bit 4''' - Unit is invincible&lt;br /&gt;
** '''Bit 5-15''' - Unknown/unused&lt;br /&gt;
* '''u32''': Unknown/unused. Padding?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPUS&amp;quot; - CUWP Slots Used==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section goes along with the &amp;quot;UPRP&amp;quot; section. This section just indicates which of the 64 unit properties slot are used.&lt;br /&gt;
* '''u8[64]''': 1 byte for each trigger unit properties slot&lt;br /&gt;
** '''00''' - Properties slot is unused&lt;br /&gt;
** '''01''' - Properties slot is used&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MRGN&amp;quot; - Locations==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: 1280 bytes for retail, 5100 bytes for Hybrid and Broodwar.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the locations that the map uses. In a vanilla map, this section contains 64 locations. In a Hybrid or Brood War map, this section will expand to contain 255 locations.&lt;br /&gt;
&lt;br /&gt;
Each location gets one of the following location entries. The 'Anywhere' location, is ALWAYS location 64.&lt;br /&gt;
* '''u32''': Left (X1) coordinate of location, in pixels (usually 32 pt grid aligned)&lt;br /&gt;
* '''u32''': Top (Y1) coordinate of location, in pixels&lt;br /&gt;
* '''u32''': Right (X2) coordinate of location, in pixels&lt;br /&gt;
* '''u32''': Bottom (Y2) coordinate of location, in pixels&lt;br /&gt;
* '''u16''': String number of the name of this location&lt;br /&gt;
* '''u16''': Location elevation flags. If an elevation is disabled in the location, it's bit will be on (1)&lt;br /&gt;
** '''Bit 0''' - Low elevation&lt;br /&gt;
** '''Bit 1''' - Medium elevation&lt;br /&gt;
** '''Bit 2''' - High elevation&lt;br /&gt;
** '''Bit 3''' - Low air&lt;br /&gt;
** '''Bit 4''' - Medium air&lt;br /&gt;
** '''Bit 5''' - High air&lt;br /&gt;
** '''Bit 6-15''' - Unused&lt;br /&gt;
Note that in typical locations Right is always larger than Left and Bottom is always larger than Top. However, you can reverse one or both of these for [[Inverted Locations]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TRIG&amp;quot; - Triggers==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 2400 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the triggers in the map. This along with [[#&amp;quot;MBRF&amp;quot; - Mission Briefings|MBRF]] is the most complicated section in the entire scenario.chk file as there is a lot of data packed into too little of a space. Refer to the appendix at the bottom of this page for more information.&lt;br /&gt;
For easy reference, since each trigger contains 2400 bytes, the amount of triggers can be gotten by taking the section length and dividing by 2400.&lt;br /&gt;
Every single trigger in the map will have the following format:&lt;br /&gt;
* 16 Conditions (20 byte struct)&amp;lt;br&amp;gt; Every trigger has 16 of the following format, even if only one condition is used. See the appendix for information on which items are used for what conditions.&lt;br /&gt;
** '''u32''': Location number for the condition (1 based -- 0 refers to No Location), EUD Bitmask for a Death condition if the MaskFlag is set to &amp;quot;SC&amp;quot;&lt;br /&gt;
** '''u32''': [[#List of Players/Group IDs|Group]] that the condition applies to&lt;br /&gt;
** '''u32''': Qualified number (how many/resource amount)&lt;br /&gt;
** '''u16''': [[#Trigger Unit Types|Unit ID]] condition applies to&lt;br /&gt;
** '''u8''': [[#Numeric Comparisons|Numeric comparison]], [[#Switch States|switch state]]&lt;br /&gt;
** '''u8''': [[#Trigger Conditions List|Condition byte]]&lt;br /&gt;
** '''u8''': [[#Resource Types|Resource type]], [[#Score Types|score type]], Switch number (0-based)&lt;br /&gt;
** '''u8''': Flags&lt;br /&gt;
*** '''Bit 0''' - Unknown/unused&lt;br /&gt;
*** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled/ignored&lt;br /&gt;
*** '''Bit 2''' - Always display flag.&lt;br /&gt;
*** '''Bit 3''' - Unit properties is used. ('''Note:''' This is used in [[TRG|*.trg]] files)&lt;br /&gt;
*** '''Bit 4''' - Unit type is used. Cleared in &amp;quot;Offset + Mask&amp;quot; EUD conditions. May not be necessary otherwise?&lt;br /&gt;
*** '''Bit 5-7''' - Unknown/unused&lt;br /&gt;
** '''u16''': MaskFlag: set to &amp;quot;SC&amp;quot; (0x53, 0x43) when using the bitmask for EUDs, 0 otherwise&lt;br /&gt;
* 64 Actions (32 byte struct)&amp;lt;br&amp;gt; Immediately following the 16 conditions, there are 64 actions. There will always be 64 of the following structure, even if some of them are unused.&lt;br /&gt;
** '''u32''': Location - source location in &amp;quot;Order&amp;quot; and &amp;quot;Move Unit&amp;quot;, dest location in &amp;quot;Move Location&amp;quot; (1 based -- 0 refers to No Location), EUD Bitmask for a Death action if the MaskFlag is set to &amp;quot;SC&amp;quot;&lt;br /&gt;
** '''u32''': String number for trigger text (0 means no string)&lt;br /&gt;
** '''u32''': WAV string number (0 means no string)&lt;br /&gt;
** '''u32''': Seconds/milliseconds of time&lt;br /&gt;
** '''u32''': First (or only) [[#List of Players/Group IDs|Group/Player]] affected.&lt;br /&gt;
** '''u32''': Second group affected, secondary location (1-based), CUWP #, number, AI script (4-byte string), switch (0-based #)&lt;br /&gt;
** '''u16''': [[#Trigger Unit Types|Unit type]], [[#Score Types|score type]], [[#Resource Types|resource type]], [[#Alliance Statuses|alliance status]]&lt;br /&gt;
** '''u8''': [[#Trigger Actions List|Action byte]]&lt;br /&gt;
** '''u8''': Number of units (0 means All Units), [[#Action States|action state]], [[#Unit Orders|unit order]], [[#Number Modifiers|number modifier]]&lt;br /&gt;
** '''u8''': Flags&lt;br /&gt;
*** '''Bit 0''' - Ignore a wait/transmission once.&lt;br /&gt;
*** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled.&lt;br /&gt;
*** '''Bit 2''' - Always display flag - when not set: if the user has turned off subtitles (see sound options) the text will not display, when set: text will always display&lt;br /&gt;
*** '''Bit 3''' - Unit properties is used. Staredit uses this for *.trg files.&lt;br /&gt;
*** '''Bit 4''' - Unit type is used. Cleared in &amp;quot;Offset + Mask&amp;quot; EUD actions.&lt;br /&gt;
*** '''Bit 5-7''' - Unknown/unused&lt;br /&gt;
** '''u8''': Padding&lt;br /&gt;
** '''u16 (2 bytes)''': MaskFlag: set to &amp;quot;SC&amp;quot; (0x53, 0x43) when using the bitmask for EUDs, 0 otherwise&lt;br /&gt;
* Player Execution&amp;lt;br&amp;gt; Following the 16 conditions and 64 actions, every trigger also has this structure&lt;br /&gt;
** '''u32''': execution flags&lt;br /&gt;
*** '''Bit 0''' - All conditions are met, executing actions, cleared on the next trigger loop.&lt;br /&gt;
*** '''Bit 1''' - Ignore the following actions: Defeat, Draw.&lt;br /&gt;
*** '''Bit 2''' - Preserve trigger. (Can replace Preserve Trigger action)&lt;br /&gt;
*** '''Bit 3''' - Ignore execution.&lt;br /&gt;
*** '''Bit 4''' - Ignore all of the following actions for this trigger until the next trigger loop: Wait, PauseGame, Transmission, PlayWAV, DisplayTextMessage, CenterView, MinimapPing, TalkingPortrait, and MuteUnitSpeech.&lt;br /&gt;
*** '''Bit 5''' - This trigger has paused the game, ignoring subsequent calls to Pause Game (Unpause Game clears this flag only in the same trigger), may automatically call unpause at the end of action execution?&lt;br /&gt;
*** '''Bit 6''' - Wait skipping disabled for this trigger, cleared on next trigger loop.&lt;br /&gt;
*** '''Bit 7-31''' - Unknown/unused&lt;br /&gt;
** '''u8[27]''': 1 byte for each player in the [[#List of Players/Group IDs]]&lt;br /&gt;
*** '''00''' - Trigger is not executed for player&lt;br /&gt;
*** '''01''' - Trigger is executed for player&lt;br /&gt;
** '''u8''': Index of the current action, in StarCraft this is incremented after each action is executed, trigger execution ends when this is 64 (Max Actions) or an action is encountered with Action byte as 0&lt;br /&gt;
This section can be split. Additional TRIG sections will add more triggers.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MBRF&amp;quot; - Mission Briefings==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 2400 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all of the mission briefings shown by the players.&lt;br /&gt;
&lt;br /&gt;
See [[#&amp;quot;TRIG&amp;quot; - Triggers|&amp;quot;TRIG&amp;quot;]] section for format, as it is exactly the same except for the conditions. In this section the 16 conditions are still there, they are all null except for the very first condition, which only has a condition byte of 13. See [[#Mission Briefing Actions List]] for the action bytes for the mission briefing actions.&lt;br /&gt;
&lt;br /&gt;
This section can be split. Additional MBRF sections will add more briefing triggers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SPRP&amp;quot; - Scenario Properties==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4 bytes.''&lt;br /&gt;
&lt;br /&gt;
* '''u16''': String number of the scenario name&lt;br /&gt;
* '''u16''': String number of the scenarios description.&lt;br /&gt;
A string index of 0 for the map name will default it to its file name. A string index of 0 description will default to a predefined string.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;FORC&amp;quot; - Force Settings==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be less than or equal to 20 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the forces and the information about them.&lt;br /&gt;
* '''u8[8]''': 1 byte for each active player, specifying which of the 4 forces (0-based) that the player's on&lt;br /&gt;
* '''u16[4]''': 1 integer for each force, string number of the name of the force&lt;br /&gt;
* '''u8[4]''': 1 byte for each force specifying the properties:&lt;br /&gt;
** '''Bit 0''' - Random start location&lt;br /&gt;
** '''Bit 1''' - Allies&lt;br /&gt;
** '''Bit 2''' - Allied victory&lt;br /&gt;
** '''Bit 3''' - Shared vision&lt;br /&gt;
** '''Bit 4-7''' - Unused&lt;br /&gt;
Notes about FORC:&lt;br /&gt;
* If there is no string specified for a force name, it will default to a &amp;quot;Force #&amp;quot; string.&lt;br /&gt;
* If this section is less than 20 bytes, the remaining bytes are defaulted to 0.&lt;br /&gt;
* Players can be on a force greater than 4, however they will not appear in the game lobby.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;WAV &amp;quot; - WAV String Indexes==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
There are 512 wav entires regardless of how many are actually used.&lt;br /&gt;
* '''u32[512]''': 1 long for each WAV. Indicates a string index is used for a WAV path in the MPQ. If the entry is not used, it will be 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIS&amp;quot; - Unit Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4048 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;UNIx&amp;quot; - BW Unit Settings|&amp;quot;UNIx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains the unit settings for the level:&lt;br /&gt;
* '''u8[228]''': 1 byte for each unit, in order of Unit ID&lt;br /&gt;
** '''00''' - Unit does not use default settings&lt;br /&gt;
** '''01''' - Unit does use default settings&lt;br /&gt;
* '''u32[228]''': Hit points for unit (Note the displayed value is this value / 256, with the low byte being a fractional HP value)&lt;br /&gt;
* '''u16[228]''': Shield points, in order of Unit ID&lt;br /&gt;
* '''u8[228]''': Armor points, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Build time (1/60 seconds), in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Mineral cost, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Gas cost, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': String number, in order of Unit ID&lt;br /&gt;
* '''u16[100]''': Base weapon damage the weapon does, in weapon ID order ([[#List of Unit Weapon IDs]])&lt;br /&gt;
* '''u16[100]''': Upgrade bonus weapon damage, in weapon ID order&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGS&amp;quot; - Upgrade Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 598 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;UPGx&amp;quot; - BW Upgrade Settings|&amp;quot;UPGx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains upgrade settings:&lt;br /&gt;
* '''u8[46]''': 1 byte per each upgrade, in order of upgrade id.&lt;br /&gt;
** '''00''' - Upgrade uses custom settings&lt;br /&gt;
** '''01''' - Upgrade uses default settings&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, time factor for each upgrade, in order of upgrade id.&lt;br /&gt;
See [[#List of Upgrade IDs]] for upgrade ids.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TECS&amp;quot; - Tech Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 216 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;TECx&amp;quot; - BW Tech Settings|&amp;quot;TECx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains technology/special abilities settings:&lt;br /&gt;
* '''u8[24]''': 1 byte per each technology, specifies if the tech overrides the default settings. In order of technology id&lt;br /&gt;
** '''00''' - Technology uses custom settings&lt;br /&gt;
** '''01''' - Technology uses default settings&lt;br /&gt;
* '''u16[24]''': Mineral cost to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Gas cost to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Time required to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Energy cost to cast technology/special ability. In order of technology id.&lt;br /&gt;
See [[#List of Technology IDs]] for technology ids.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SWNM&amp;quot; - Switch Names==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section contains the strings used for each switch. There are 256 switches, and can't be any more or any less.&lt;br /&gt;
* '''u32[256]''': One long for each switch, specifies the string number for the name of each switch. Unnamed switches will have an index of 0, and have a default switch name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;COLR&amp;quot; - Player Colors==&lt;br /&gt;
''Required for Brood War only and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 8 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section indicates what color each player is, but only has effect on Brood War.&lt;br /&gt;
* '''u8[8]''': 1 byte for each player, indicates the color of the player&lt;br /&gt;
** '''00''' - Red&lt;br /&gt;
** '''01''' - Blue&lt;br /&gt;
** '''02''' - Teal&lt;br /&gt;
** '''03''' - Purple&lt;br /&gt;
** '''04''' - Orange&lt;br /&gt;
** '''05''' - Brown&lt;br /&gt;
** '''06''' - White&lt;br /&gt;
** '''07''' - Yellow&lt;br /&gt;
** '''08''' - Green&lt;br /&gt;
** '''09''' - Pale yellow&lt;br /&gt;
** '''10''' - Tan&lt;br /&gt;
** '''11''' - Azure (Neutral color)&lt;br /&gt;
Other values can be used but may have different results depending on the tileset. Any color value above 11 is an overflow. As of patch 1.18.6, values above 11 result in default player color.&lt;br /&gt;
&lt;br /&gt;
When CRGB is present, this section still defines leaderboard colors.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;CRGB&amp;quot; - Remastered Player Colors==&lt;br /&gt;
''Requirement unknown, but can be in any map type including non-remaster maps.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 32 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''u8[8][3]''': 3 bytes for each player corresponding to an RGB color value&lt;br /&gt;
** '''u8''': R&lt;br /&gt;
** '''u8''': G&lt;br /&gt;
** '''u8''': B, or color ID for type 3&lt;br /&gt;
* '''u8[8]''': Indicates how to select the color for each player&lt;br /&gt;
** '''0''' - Random Predefined&lt;br /&gt;
** '''1''' - Player's Choice&lt;br /&gt;
** '''2''' - Custom RGB Color (RGB value for the corresponding player defined above)&lt;br /&gt;
** '''3''' - Use color ID in the &amp;quot;B&amp;quot; color channel (&amp;quot;R&amp;quot; and &amp;quot;G&amp;quot; values appear to contain junk data); leaderboard color is still defined by COLR section and can be set independently&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SC:R Only color IDs:&amp;lt;br&amp;gt;&lt;br /&gt;
Extends the [[#&amp;quot;COLR&amp;quot; - Player Colors|COLR]] section list of colors, but cannot be used in the COLR section.&lt;br /&gt;
* '''12''' - Pale Green&lt;br /&gt;
* '''13''' - Blueish Grey&lt;br /&gt;
* '''14''' - Cyan&lt;br /&gt;
* '''15''' - Pink&lt;br /&gt;
* '''16''' - Olive&lt;br /&gt;
* '''17''' - Lime&lt;br /&gt;
* '''18''' - Navy&lt;br /&gt;
* '''19''' - Magenta&lt;br /&gt;
* '''20''' - Grey&lt;br /&gt;
* '''21''' - Black&lt;br /&gt;
* '''22+''' - Random (can pick colors that have been used)&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PUPx&amp;quot; - BW Upgrade Restrictions==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2318 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UPGR&amp;quot; - Upgrade Restrictions|&amp;quot;UPGR&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is identical to UPGR section except it uses the Brood War set of 61 upgrades instead of the original 46.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PTEx&amp;quot; - BW Tech Restrictions==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1672 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;PTEC&amp;quot; - Tech Restrictions|&amp;quot;PTEC&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is identical to PTEC section except it uses the Brood War set of 44 technologies instead of the original 24.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIx&amp;quot; - BW Unit Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4168 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UNIS&amp;quot; - Unit Settings|&amp;quot;UNIS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is indentical to UNIS section except it uses the Brood War set of 130 weapons instead of the original 100.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGx&amp;quot; - BW Upgrade Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 794 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UPGS&amp;quot; - Upgrade Settings|&amp;quot;UPGS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section the same as UPGS except section except it uses the Brood War set of 61 upgrades instead of the original 46, and there is an unused byte after the first set:&lt;br /&gt;
* '''u8[61]''': 1 byte per each upgrade, in order of upgrade id.&lt;br /&gt;
** '''00''' - Upgrade uses custom settings&lt;br /&gt;
** '''01''' - Upgrade uses default settings&lt;br /&gt;
* '''u8''': Unused.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, time factor for each upgrade, in order of upgrade id.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TECx&amp;quot; - BW Tech Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 396 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;TECS&amp;quot; - Tech Settings|&amp;quot;TECS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is indentical to TECS section except it uses the Brood War set of 44 technologies instead of the original 24.&lt;br /&gt;
&lt;br /&gt;
=Appendix=&lt;br /&gt;
A set of references and IDs that should help you easier in the trigger section and the technology/player ids, etc:&lt;br /&gt;
&lt;br /&gt;
==Trigger Conditions List==&lt;br /&gt;
* 0 = No Condition&lt;br /&gt;
* 1 = Countdown Timer(Comparison, QNumber)&lt;br /&gt;
* 2 = Command(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 3 = Bring(Player, Comparison, TUnit, Loc, QNumber)&lt;br /&gt;
* 4 = Accumulate(Player, Comparison, QNumber, ResType)&lt;br /&gt;
* 5 = Kill(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 6 = Command the Most(TUnit)&lt;br /&gt;
* 7 = Commands the Most At(TUnit, Loc)&lt;br /&gt;
* 8 = Most Kills(TUnit)&lt;br /&gt;
* 9 = Highest Score(Score)&lt;br /&gt;
* 10 = Most Resources(ResType)&lt;br /&gt;
* 11 = Switch(Switch)&lt;br /&gt;
* 12 = Elapsed Time(Comparison, QNumber)&lt;br /&gt;
* 13 = Data is a Mission Briefing. Conditions are N/A (Same as Never)&lt;br /&gt;
* 14 = Opponents(Player, Comparison, QNumber)&lt;br /&gt;
* 15 = Deaths(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 16 = Command the Least(TUnit)&lt;br /&gt;
* 17 = Command the Least At(TUnit, Loc)&lt;br /&gt;
* 18 = Least Kills(TUnit)&lt;br /&gt;
* 19 = Lowest Score(Score)&lt;br /&gt;
* 20 = Least Resources(ResType)&lt;br /&gt;
* 21 = Score(Player, Comparison, Score, QNumber)&lt;br /&gt;
* 22 = Always (Same as No Condition)&lt;br /&gt;
* 23 = Never&lt;br /&gt;
&lt;br /&gt;
==Trigger Actions List==&lt;br /&gt;
* 0 = No Action&lt;br /&gt;
* 1 = Victory&lt;br /&gt;
* 2 = Defeat&lt;br /&gt;
* 3 = Preserve Trigger&lt;br /&gt;
* 4 = Wait(Time)&lt;br /&gt;
* 5 = Pause Game (Single player only)&lt;br /&gt;
* 6 = Unpause Game (Single player only)&lt;br /&gt;
* 7 = Transmission(Text, Unit, Loc, Time, Modifier, Wave, WavTime)&lt;br /&gt;
* 8 = Play WAV(Wav, WavTime)&lt;br /&gt;
* 9 = Display Text Message(Text)&lt;br /&gt;
* 10 = Center View(Loc)&lt;br /&gt;
* 11 = Create Unit with Properties(Player, Unit, Number, Loc, UnitProp)&lt;br /&gt;
* 12 = Set Mission Objectives(Text)&lt;br /&gt;
* 13 = Set Switch(Switch, SwAction)&lt;br /&gt;
* 14 = Set Countdown Timer(Time, Modifier)&lt;br /&gt;
* 15 = Run AI Script(AIScript)&lt;br /&gt;
* 16 = Run AI Script At Location(AIScript)&lt;br /&gt;
* 17 = Leader Board (Control) (Text, TUnit)&lt;br /&gt;
* 18 = Leader Board (Control At Location) (Text, TUnit, Loc)&lt;br /&gt;
* 19 = Leader Board (Resources) (Text, ResType)&lt;br /&gt;
* 20 = Leader Board (Kills) (Text, TUnit)&lt;br /&gt;
* 21 = Leader Board (Points) (Text, Score)&lt;br /&gt;
* 22 = Kill Unit (Player, TUnit)&lt;br /&gt;
* 23 = Kill Unit At Location(Player, TUnit, Number, Loc)&lt;br /&gt;
* 24 = Remove Unit(Player, TUnit)&lt;br /&gt;
* 25 = Remove Unit At Location(Player, TUnit, Number, Loc)&lt;br /&gt;
* 26 = Set Resources(Player, Number, Modifier, ResType)&lt;br /&gt;
* 27 = Set Score(Player, Number, Modifier, Score)&lt;br /&gt;
* 28 = Minimap Ping(Loc)&lt;br /&gt;
* 29 = Talking Portrait(Unit, Time)&lt;br /&gt;
* 30 = Mute Unit Speech&lt;br /&gt;
* 31 = Unmute Unit Speech&lt;br /&gt;
* 32 = Leaderboard Computer Players(State)&lt;br /&gt;
* 33 = Leaderboard Goal (Control) (Text, TUnit, Number)&lt;br /&gt;
* 34 = Leaderboard Goal (Control At Location) (Text, TUnit, Number, Loc)&lt;br /&gt;
* 35 = Leaderboard Goal (Resources) (Text, TUnit, Number, ResType)&lt;br /&gt;
* 36 = Leaderboard Goal (Kills) (Text, TUnit, Number)&lt;br /&gt;
* 37 = Leaderboard Goal (Points) (Text, Number, Score)&lt;br /&gt;
* 38 = Move Location(Player, TUnit, SLoc, DLoc)&lt;br /&gt;
* 39 = Move Unit(Player, TUnit, Number, SLoc, DLoc)&lt;br /&gt;
* 40 = Leaderboard (Greed) (Number)&lt;br /&gt;
* 41 = Set Next Scenario(Text) (Single player only)&lt;br /&gt;
* 42 = Set Doodad State(Player, TUnit, Loc, State)&lt;br /&gt;
* 43 = Set Invincibility(Player, TUnit, Loc, State)&lt;br /&gt;
* 44 = Create Unit(Player, Unit, Number, Loc)&lt;br /&gt;
* 45 = Set Deaths(Player, TUnit, Number, Modifier)&lt;br /&gt;
* 46 = Order(Player, TUnit, SLoc, DLoc, Order)&lt;br /&gt;
* 47 = Comment(Text)&lt;br /&gt;
* 48 = Give Units to Player(SPlayer, DPlayer, TUnit, Number, Loc)&lt;br /&gt;
* 49 = Modify Unit Hit Points(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 50 = Modify Unit Energy(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 51 = Modify Unit Shield Points(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 52 = Modify Unit Resource Amount(Player, Number, ModAmount, Loc)&lt;br /&gt;
* 53 = Modify Unit Hanger Count(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 54 = Pause Timer&lt;br /&gt;
* 55 = Unpause Timer&lt;br /&gt;
* 56 = Draw&lt;br /&gt;
* 57 = Set Alliance Status(Player, AllyStatus)&lt;br /&gt;
* 58 = Disable Debug Mode (Single player only)&lt;br /&gt;
* 59 = Enable Debug Mode (Single player only)&lt;br /&gt;
&lt;br /&gt;
==Mission Briefing Actions List==&lt;br /&gt;
* 0 - No Action&lt;br /&gt;
* 1 - Wait(Time)&lt;br /&gt;
* 2 - Play WAV(Wave, WavTime)&lt;br /&gt;
* 3 - Text Message(Text, Time)&lt;br /&gt;
* 4 - Mission Objectives(Text)&lt;br /&gt;
* 5 - Show Portrait(Unit, Slot)&lt;br /&gt;
* 6 - Hide Portrait(Slot)&lt;br /&gt;
* 7 - Display Speaking Portrait(Slot, Time)&lt;br /&gt;
* 8 - Transmission(Text, Slot, Time, Modifier, Wave, WavTime)&lt;br /&gt;
* 9 - Skip Tutorial Enabled&lt;br /&gt;
&lt;br /&gt;
==Switch States==&lt;br /&gt;
* 2 = Switch is set&lt;br /&gt;
* 3 = Switch is cleared&lt;br /&gt;
&lt;br /&gt;
==Numeric Comparisons==&lt;br /&gt;
* 0 = At least&lt;br /&gt;
* 1 = At most&lt;br /&gt;
* 10 = Exactly&lt;br /&gt;
&lt;br /&gt;
==Score Types==&lt;br /&gt;
* 0 = Total&lt;br /&gt;
* 1 = Units&lt;br /&gt;
* 2 = Buildings&lt;br /&gt;
* 3 = Units and Buildings&lt;br /&gt;
* 4 = Kills&lt;br /&gt;
* 5 = Razings&lt;br /&gt;
* 6 = Kills and Razings&lt;br /&gt;
* 7 = Custom&lt;br /&gt;
&lt;br /&gt;
==Resource Types==&lt;br /&gt;
* 0 = Ore&lt;br /&gt;
* 1 = Gas&lt;br /&gt;
* 2 = Ore and Gas&lt;br /&gt;
&lt;br /&gt;
==Alliance Statuses==&lt;br /&gt;
* 0 = Enemy&lt;br /&gt;
* 1 = Ally&lt;br /&gt;
* 2 = Allied Victory&lt;br /&gt;
&lt;br /&gt;
==Unit Orders==&lt;br /&gt;
* 0 = Move&lt;br /&gt;
* 1 = Patrol&lt;br /&gt;
* 2 = Attack&lt;br /&gt;
&lt;br /&gt;
==Action States==&lt;br /&gt;
* 4 = Enabled/Set switch&lt;br /&gt;
* 5  = Disabled/Clear switch&lt;br /&gt;
* 6 = Toggle/Toggle switch&lt;br /&gt;
* 11 = Randomize switch&lt;br /&gt;
&lt;br /&gt;
==Number Modifiers==&lt;br /&gt;
* 7 = Set to&lt;br /&gt;
* 8 = Add&lt;br /&gt;
* 9 = Subtract&lt;br /&gt;
&lt;br /&gt;
==Trigger Unit Types==&lt;br /&gt;
* All normal units (0-227)&lt;br /&gt;
* 228 = None&lt;br /&gt;
* 229 = Any unit&lt;br /&gt;
* 230 = Men&lt;br /&gt;
* 231 = Buildings&lt;br /&gt;
* 232 = Factories&lt;br /&gt;
&lt;br /&gt;
==List of Players/Group IDs==&lt;br /&gt;
* 0 = Player 1&lt;br /&gt;
* 1 = Player 2&lt;br /&gt;
* 2 = Player 3&lt;br /&gt;
* 3 = Player 4&lt;br /&gt;
* 4 = Player 5&lt;br /&gt;
* 5 = Player 6&lt;br /&gt;
* 6 = Player 7&lt;br /&gt;
* 7 = Player 8&lt;br /&gt;
* 8 = Player 9&lt;br /&gt;
* 9 = Player 10&lt;br /&gt;
* 10 = Player 11&lt;br /&gt;
* 11 = Player 12&lt;br /&gt;
* 12 = None (Unused, One-entry Overflow in some cases)&lt;br /&gt;
* 13 = Current Player&lt;br /&gt;
* 14 = Foes&lt;br /&gt;
* 15 = Allies&lt;br /&gt;
* 16 = Neutral Players&lt;br /&gt;
* 17 = All Players&lt;br /&gt;
* 18 = Force 1&lt;br /&gt;
* 19 = Force 2&lt;br /&gt;
* 20 = Force 3&lt;br /&gt;
* 21 = Force 4&lt;br /&gt;
* 22 = Unused 1&lt;br /&gt;
* 23 = Unused 2&lt;br /&gt;
* 24 = Unused 3&lt;br /&gt;
* 25 = Unused 4&lt;br /&gt;
* 26 = Non Allied Victory Players&lt;br /&gt;
&lt;br /&gt;
==List of Technology IDs==&lt;br /&gt;
* 0 = Stim Packs&lt;br /&gt;
* 1 = Lockdown&lt;br /&gt;
* 2 = EMP Shockwave&lt;br /&gt;
* 3 = Spider Mines&lt;br /&gt;
* 4 = Scanner Sweep&lt;br /&gt;
* 5 = Siege Mode&lt;br /&gt;
* 6 = Defensive Matrix&lt;br /&gt;
* 7 = Irradiate&lt;br /&gt;
* 8 = Yamato Gun&lt;br /&gt;
* 9 = Cloaking Field&lt;br /&gt;
* 10 = Personnel Cloaking&lt;br /&gt;
* 11 = Burrowing&lt;br /&gt;
* 12 = Infestation&lt;br /&gt;
* 13 = Spawn Broodling&lt;br /&gt;
* 14 = Dark Swarm&lt;br /&gt;
* 15 = Plague&lt;br /&gt;
* 16 = Consume&lt;br /&gt;
* 17 = Ensnare&lt;br /&gt;
* 18 = Parasite&lt;br /&gt;
* 19 = Psionic Storm&lt;br /&gt;
* 20 = Hallucination&lt;br /&gt;
* 21 = Recall&lt;br /&gt;
* 22 = Stasis Field&lt;br /&gt;
* 23 = Archon Warp&lt;br /&gt;
* 24 = Restoration&lt;br /&gt;
* 25 = Disruption Web&lt;br /&gt;
* 26 = Unused 26&lt;br /&gt;
* 27 = Mind Control&lt;br /&gt;
* 28 = Dark Archon Meld&lt;br /&gt;
* 29 = Feedback&lt;br /&gt;
* 30 = Optical Flare&lt;br /&gt;
* 31 = Maelstorm&lt;br /&gt;
* 32 = Lurker Aspect&lt;br /&gt;
* 33 = Unused 33&lt;br /&gt;
* 34 = Healing&lt;br /&gt;
* 35 = Unused 35&lt;br /&gt;
* 36 = Unused 36&lt;br /&gt;
* 37 = Unused 37&lt;br /&gt;
* 38 = Unused 38&lt;br /&gt;
* 39 = Unused 39&lt;br /&gt;
* 40 = Unused 40&lt;br /&gt;
* 41 = Unused 41&lt;br /&gt;
* 42 = Unused 42&lt;br /&gt;
* 43 = Unused 43&lt;br /&gt;
&lt;br /&gt;
==List of Upgrade IDs==&lt;br /&gt;
* 0 = Terran Infantry Armor&lt;br /&gt;
* 1 = Terran Vehicle Plating&lt;br /&gt;
* 2 = Terran Ship Plating&lt;br /&gt;
* 3 = Zerg Carapace&lt;br /&gt;
* 4 = Zerg Flyer Caparace&lt;br /&gt;
* 5 = Protoss Armor&lt;br /&gt;
* 6 = Protoss Plating&lt;br /&gt;
* 7 = Terran Infantry Weapons&lt;br /&gt;
* 8 = Terran Vehicle Weapons&lt;br /&gt;
* 9 = Terran Ship Weapons&lt;br /&gt;
* 10 = Zerg Melee Attacks&lt;br /&gt;
* 11 = Zerg Missile Attacks&lt;br /&gt;
* 12 = Zerg Flyer Attacks&lt;br /&gt;
* 13 = Protoss Ground Weapons&lt;br /&gt;
* 14 = Protoss Air Weapons&lt;br /&gt;
* 15 = Protoss Plasma Shields&lt;br /&gt;
* 16 = U-238 Shells&lt;br /&gt;
* 17 = Ion Thrusters&lt;br /&gt;
* 18 = Burst Lasers (Unused)&lt;br /&gt;
* 19 = Titan Reactor (SV +50)&lt;br /&gt;
* 20 = Ocular Implants&lt;br /&gt;
* 21 = Moebius Reactor (Ghost +50)&lt;br /&gt;
* 22 = Apollo Reactor (Wraith +50)&lt;br /&gt;
* 23 = Colossus Reactor (BC +50)&lt;br /&gt;
* 24 = Ventral Sacs&lt;br /&gt;
* 25 = Antennae&lt;br /&gt;
* 26 = Pneumatized Carapace&lt;br /&gt;
* 27 = Metabolic Boost&lt;br /&gt;
* 28 = Adrenal Glands&lt;br /&gt;
* 29 = Muscular Augments&lt;br /&gt;
* 30 = Grooved Spines&lt;br /&gt;
* 31 = Gamete Meiosis (Queen +50)&lt;br /&gt;
* 32 = Metasynaptic Node (Defiler +50)&lt;br /&gt;
* 33 = Singularity Charge&lt;br /&gt;
* 34 = Leg Enhancements&lt;br /&gt;
* 35 = Scarab Damage &lt;br /&gt;
* 36 = Reaver Capacity &lt;br /&gt;
* 37 = Gravitic Drive&lt;br /&gt;
* 38 = Sensor Array&lt;br /&gt;
* 39 = Gravitic Boosters&lt;br /&gt;
* 40 = Khaydarin Amulet (HT +50)&lt;br /&gt;
* 41 = Apial Sensors&lt;br /&gt;
* 42 = Gravitic Thrusters&lt;br /&gt;
* 43 = Carrier Capacity&lt;br /&gt;
* 44 = Khaydarin Core (Arbiter +50)&lt;br /&gt;
* 45 = Unknown Upgrade45&lt;br /&gt;
* 46 = Unknown Upgrade46&lt;br /&gt;
* 47 = Argus Jewel (Corsair +50)&lt;br /&gt;
* 48 = Unknown Upgrade48&lt;br /&gt;
* 49 = Argus Talisman (DA +50)&lt;br /&gt;
* 50 = Unknown Upgrade50&lt;br /&gt;
* 51 = Caduceus Reactor (Medic +50)&lt;br /&gt;
* 52 = Chitinous Plating&lt;br /&gt;
* 53 = Anabolic Synthesis&lt;br /&gt;
* 54 = Charon Booster&lt;br /&gt;
* 55 = Unknown Upgrade55&lt;br /&gt;
* 56 = Unknown Upgrade56&lt;br /&gt;
* 57 = Unknown Upgrade57&lt;br /&gt;
* 58 = Unknown Upgrade58&lt;br /&gt;
* 59 = Unknown Upgrade59&lt;br /&gt;
* 60 = Unknown Upgrade60&lt;br /&gt;
&lt;br /&gt;
==List of Unit Weapon IDs==&lt;br /&gt;
* 0 = Gauss Rifle (Normal)&lt;br /&gt;
* 1 = Gauss Rifle (Jim Raynor-Marine)&lt;br /&gt;
* 2 = C-10 Concussion Rifle (Normal)&lt;br /&gt;
* 3 = C-10 Concussion Rifle (Sarah Kerrigan)&lt;br /&gt;
* 4 = Fragmentation Grenade (Normal)&lt;br /&gt;
* 5 = Fragmentation Grenade (Jim Raynor-Vulture)&lt;br /&gt;
* 6 = Spider Mines&lt;br /&gt;
* 7 = Twin Autocannons (Normal)&lt;br /&gt;
* 8 = Hellfire Missile Pack (Normal)&lt;br /&gt;
* 9 = Twin Autocannons (Alan Schezar)&lt;br /&gt;
* 10 = Hellfire Missile Pack (Alan Schezar)&lt;br /&gt;
* 11 = Arclite Cannon (Normal)&lt;br /&gt;
* 12 = Arclite Cannon (Edmund Duke)&lt;br /&gt;
* 13 = Fusion Cutter&lt;br /&gt;
* 14 = Fusion Cutter (Harvest)&lt;br /&gt;
* 15 = Gemini Missiles (Normal)&lt;br /&gt;
* 16 = Burst Lasers (Normal)&lt;br /&gt;
* 17 = Gemini Missiles (Tom Kazansky)&lt;br /&gt;
* 18 = Burst Lasers (Tom Kazansky)&lt;br /&gt;
* 19 = ATS Laser Battery (Normal)&lt;br /&gt;
* 20 = ATA Laser Battery (Normal)&lt;br /&gt;
* 21 = ATS Laser Battery (Norad II+Mengsk+DuGalle)&lt;br /&gt;
* 22 = ATA Laser Battery (Norad II+Mengsk+DuGalle)&lt;br /&gt;
* 23 = ATS Laser Battery (Hyperion)&lt;br /&gt;
* 24 = ATA Laser Battery (Hyperion)&lt;br /&gt;
* 25 = Flame Thrower (Normal)&lt;br /&gt;
* 26 = Flame Thrower (Gui Montag)&lt;br /&gt;
* 27 = Arclite Shock Cannon (Normal)&lt;br /&gt;
* 28 = Arclite Shock Cannon (Edmund Duke)&lt;br /&gt;
* 29 = Longbolt Missiles&lt;br /&gt;
* 30 = Yamato Gun&lt;br /&gt;
* 31 = Nuclear Missile&lt;br /&gt;
* 32 = Lockdown&lt;br /&gt;
* 33 = EMP Shockwave&lt;br /&gt;
* 34 = Irradiate&lt;br /&gt;
* 35 = Claws (Normal)&lt;br /&gt;
* 36 = Claws (Devouring One)&lt;br /&gt;
* 37 = Claws (Infested Kerrigan)&lt;br /&gt;
* 38 = Needle Spines (Normal)&lt;br /&gt;
* 39 = Needle Spines (Hunter Killer)&lt;br /&gt;
* 40 = Kaiser Blades (Normal)&lt;br /&gt;
* 41 = Kaiser Blades (Torrasque)&lt;br /&gt;
* 42 = Toxic Spores (Broodling)&lt;br /&gt;
* 43 = Spines&lt;br /&gt;
* 44 = Spines (Harvest)&lt;br /&gt;
* 45 = Acid Spray (Unused)&lt;br /&gt;
* 46 = Acid Spore (Normal)&lt;br /&gt;
* 47 = Acid Spore (Kukulza-Guardian)&lt;br /&gt;
* 48 = Glave Wurm (Normal)&lt;br /&gt;
* 49 = Glave Wurm (Kukulza-Mutalisk)&lt;br /&gt;
* 50 = Venom (Unused-Defiler)&lt;br /&gt;
* 51 = Venom (Unused-Defiler Hero)&lt;br /&gt;
* 52 = Seeker Spores&lt;br /&gt;
* 53 = Subterranean Tentacle&lt;br /&gt;
* 54 = Suicide (Infested Terran)&lt;br /&gt;
* 55 = Suicide (Scourge)&lt;br /&gt;
* 56 = Parasite&lt;br /&gt;
* 57 = Spawn Broodlings&lt;br /&gt;
* 58 = Ensnare&lt;br /&gt;
* 59 = Dark Swarm&lt;br /&gt;
* 60 = Plague&lt;br /&gt;
* 61 = Consume&lt;br /&gt;
* 62 = Particle Beam&lt;br /&gt;
* 63 = Particle Beam (Harvest)&lt;br /&gt;
* 64 = Psi Blades (Normal)&lt;br /&gt;
* 65 = Psi Blades (Fenix-Zealot)&lt;br /&gt;
* 66 = Phase Disruptor (Normal)&lt;br /&gt;
* 67 = Phase Disruptor (Fenix-Dragoon)&lt;br /&gt;
* 68 = Psi Assault (Normal-Unused)&lt;br /&gt;
* 69 = Psi Assault (Tassadar+Aldaris)&lt;br /&gt;
* 70 = Psionic Shockwave (Normal)&lt;br /&gt;
* 71 = Psionic Shockwave (Tassadar/Zeratul Archon)&lt;br /&gt;
* 72 = Unknown72&lt;br /&gt;
* 73 = Dual Photon Blasters (Normal)&lt;br /&gt;
* 74 = Anti-matter Missiles (Normal)&lt;br /&gt;
* 75 = Dual Photon Blasters (Mojo)&lt;br /&gt;
* 76 = Anit-matter Missiles (Mojo)&lt;br /&gt;
* 77 = Phase Disruptor Cannon (Normal)&lt;br /&gt;
* 78 = Phase Disruptor Cannon (Danimoth)&lt;br /&gt;
* 79 = Pulse Cannon&lt;br /&gt;
* 80 = STS Photon Cannon&lt;br /&gt;
* 81 = STA Photon Cannon&lt;br /&gt;
* 82 = Scarab&lt;br /&gt;
* 83 = Stasis Field&lt;br /&gt;
* 84 = Psi Storm&lt;br /&gt;
* 85 = Warp Blades (Zeratul)&lt;br /&gt;
* 86 = Warp Blades (Dark Templar Hero)&lt;br /&gt;
* 87 = Missiles (Unused)&lt;br /&gt;
* 88 = Laser Battery1 (Unused)&lt;br /&gt;
* 89 = Tormentor Missiles (Unused)&lt;br /&gt;
* 90 = Bombs (Unused)&lt;br /&gt;
* 91 = Raider Gun (Unused)&lt;br /&gt;
* 92 = Laser Battery2 (Unused)&lt;br /&gt;
* 93 = Laser Battery3 (Unused)&lt;br /&gt;
* 94 = Dual Photon Blasters (Unused)&lt;br /&gt;
* 95 = Flechette Grenade (Unused)&lt;br /&gt;
* 96 = Twin Autocannons (Floor Trap)&lt;br /&gt;
* 97 = Hellfire Missile Pack (Wall Trap)&lt;br /&gt;
* 98 = Flame Thrower (Wall Trap)&lt;br /&gt;
* 99 = Hellfire Missile Pack (Floor Trap)&lt;br /&gt;
* 100 = Neutron Flare&lt;br /&gt;
* 101 = Disruption Web&lt;br /&gt;
* 102 = Restoration&lt;br /&gt;
* 103 = Halo Rockets&lt;br /&gt;
* 104 = Corrosive Acid&lt;br /&gt;
* 105 = Mind Control&lt;br /&gt;
* 106 = Feedback&lt;br /&gt;
* 107 = Optical Flare&lt;br /&gt;
* 108 = Maelstrom&lt;br /&gt;
* 109 = Subterranean Spines&lt;br /&gt;
* 110 = Gauss Rifle0 (Unused)&lt;br /&gt;
* 111 = Warp Blades (Normal)&lt;br /&gt;
* 112 = C-10 Concussion Rifle (Samir Duran)&lt;br /&gt;
* 113 = C-10 Concussion Rifle (Infested Duran)&lt;br /&gt;
* 114 = Dual Photon Blasters (Artanis)&lt;br /&gt;
* 115 = Anti-matter Missiles (Artanis)&lt;br /&gt;
* 116 = C-10 Concussion Rifle (Alexei Stukov)&lt;br /&gt;
* 117 = Gauss Rifle1 (Unused)&lt;br /&gt;
* 118 = Gauss Rifle2 (Unused)&lt;br /&gt;
* 119 = Gauss Rifle3 (Unused)&lt;br /&gt;
* 120 = Gauss Rifle4 (Unused)&lt;br /&gt;
* 121 = Gauss Rifle5 (Unused)&lt;br /&gt;
* 122 = Gauss Rifle6 (Unused)&lt;br /&gt;
* 123 = Gauss Rifle7 (Unused)&lt;br /&gt;
* 124 = Gauss Rifle8 (Unused)&lt;br /&gt;
* 125 = Gauss Rifle9 (Unused)&lt;br /&gt;
* 126 = Gauss Rifle10 (Unused)&lt;br /&gt;
* 127 = Gauss Rifle11 (Unused)&lt;br /&gt;
* 128 = Gauss Rifle12 (Unused)&lt;br /&gt;
* 129 = Gauss Rifle13 (Unused)&lt;br /&gt;
* 130 = None&lt;br /&gt;
&lt;br /&gt;
==Complete Modifier List==&lt;br /&gt;
* 0 = Condition: &amp;gt;= (greater than or equal to)&lt;br /&gt;
* 1 = Condition: &amp;lt;= (less than or equal to)&lt;br /&gt;
* 2 = Condition: == TRUE (Is True)&lt;br /&gt;
* 3 = Condition: == FALSE (Is False)&lt;br /&gt;
* 4 = Action: = TRUE (Set to True)&lt;br /&gt;
* 5 = Action: = FALSE (Set to False)&lt;br /&gt;
* 6 = Action: NOT (toggle)&lt;br /&gt;
* 7 = Action: = (Set to)&lt;br /&gt;
* 8 = Action: += (Add)&lt;br /&gt;
* 9 = Action: -= (Subtract)&lt;br /&gt;
* 10 = Condition: == (Exactly)&lt;br /&gt;
* 11 = Action: Randomize&lt;br /&gt;
&lt;br /&gt;
[[Category:StarCraft]]&lt;br /&gt;
[[Category:Reference]]&lt;/div&gt;</summary>
		<author><name>FaRTy1billion</name></author>	</entry>

	<entry>
		<id>https://staredit.net/wiki/index.php?title=Scenario.chk&amp;diff=660</id>
		<title>Scenario.chk</title>
		<link rel="alternate" type="text/html" href="https://staredit.net/wiki/index.php?title=Scenario.chk&amp;diff=660"/>
				<updated>2022-07-09T23:02:28Z</updated>
		
		<summary type="html">&lt;p&gt;FaRTy1billion: /* &amp;quot;CRGB&amp;quot; - Remastered Player Colors */ clarified &amp;quot;B&amp;quot; description&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The CHK file is a very dense file found inside the SCM or SCX file (as &amp;quot;staredit\scenario.chk&amp;quot;), which is just a renamed MPQ archive.&lt;br /&gt;
&lt;br /&gt;
In this article, some shorthand will be used for datatypes:&lt;br /&gt;
* '''u8''' for an unsigned byte&lt;br /&gt;
* '''u16''' for an unsigned short (2-byte integer)&lt;br /&gt;
* '''u32''' for an unsigned int (4-byte integer)&lt;br /&gt;
* '''uT[''a'']''' for an array of datatype '''T''' (8, 16, 32) with '''''a''''' number of elements&lt;br /&gt;
* '''uT[''a''][''b'']''' for a two-dimensional array of datatype '''T''', where each element of '''T[''a'']''' will be an array of size '''''b'''''&lt;br /&gt;
&lt;br /&gt;
=Sections=&lt;br /&gt;
The CHK is split into several named chunks (hence the file extension, an abbreviation of ''CHunK'').&lt;br /&gt;
&lt;br /&gt;
Each section begins with an 8-byte header:&lt;br /&gt;
* '''u32''' Name - A 4-byte string uniquely identifying that chunk's purpose.&lt;br /&gt;
* '''u32''' Size - The size, in bytes, of the chunk (not including this header)&lt;br /&gt;
Followed by as many bytes as 'Size', in a format described below.&lt;br /&gt;
&lt;br /&gt;
Some things to keep in mind about the CHK section:&lt;br /&gt;
* Invalid sections can exist and will be ignored. While Size is unsigned, it can safely be a negative value to read a chunk earlier in the file. This allows for &amp;quot;section stacking&amp;quot;, allowing smaller sections to be placed inside of larger ones or duplicate triggers or units to take less space in the file.&lt;br /&gt;
* All sections will marked &amp;quot;Not required.&amp;quot; are never read by StarCraft and can safely be omitted. However they may or may not be read by StarEdit, and may cause the map to be unreadable in an editor.&lt;br /&gt;
* Note &amp;quot;Hybrid&amp;quot;, or &amp;quot;Enhanced&amp;quot;, maps were introduced in 1.04. They are supported both by Original StarCraft and Brood War and usually contain sections for both types (e.g., UPGS and UPGx, TECS and TECx), but both sections aren't necessarily read.&lt;br /&gt;
* Duplicate sections will overwrite previously defined section data, except where noted. Note this only applies to those section that pass the specified &amp;quot;validation&amp;quot; parameters, as any section that does not successfully validate will be ignored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TYPE&amp;quot; - Map Type==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the type of scenario.&lt;br /&gt;
* '''u32''': Specifies the type of scenario:&lt;br /&gt;
** '''0x53574152''' or '''RAWS''' - 1.04 StarCraft and above (&amp;quot;hybrid&amp;quot;)&lt;br /&gt;
** '''0x42574152''' or '''RAWB''' - Brood War&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;VER &amp;quot; - Format Version==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section identifies the file format version.&lt;br /&gt;
* '''u16''': File format version:&lt;br /&gt;
** '''59''' - Starcraft 1.00 (original retail release)&lt;br /&gt;
** '''63''' - Starcraft 1.04 ''(hybrid)''&lt;br /&gt;
** '''64''' - Starcraft Remastered (1.21) ''(hybrid)''&lt;br /&gt;
** '''205''' - Brood War 1.00 ''(1.04)''&lt;br /&gt;
** '''206''' - Starcraft Remastered (1.21) ''(broodwar)''&lt;br /&gt;
This is the only version code section to actually be read by StarCraft (of TYPE, VER , IVER, and IVE2). Any other value is invalid in retail StarCraft and is usually a beta version.&lt;br /&gt;
&lt;br /&gt;
Other unsupported versions include:&lt;br /&gt;
* '''0-19''' - ''Warcraft II versions (.PUD)''&lt;br /&gt;
* '''47''' - ''Starcraft Beta''&lt;br /&gt;
* '''61''' - Brood War internal (map version 61)&lt;br /&gt;
* '''75''' - Brood War internal (map version 75)&lt;br /&gt;
* '''201''' - Brood War internal (map version 201)&lt;br /&gt;
* '''203''' - Brood War internal (map version 203)&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IVER&amp;quot; - Map Version==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section &amp;quot;additionally identifies&amp;quot; the map version.&lt;br /&gt;
* '''u16''': &amp;quot;Additional file format version:&amp;quot;&lt;br /&gt;
** '''9''' - beta/obsolete versions&lt;br /&gt;
** '''10''' - current versions&lt;br /&gt;
When saving as expansion this section gets removed entirely. Contrary to popular belief, it doesn't get &amp;quot;replaced&amp;quot; by IVE2 in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IVE2&amp;quot; - Map Version==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section &amp;quot;additionally identifies&amp;quot; the map version.&lt;br /&gt;
* '''u16''': &amp;quot;Additional file format version:&amp;quot;&lt;br /&gt;
** '''11''' - 1.04 StarCraft and above (&amp;quot;hybrid&amp;quot;) or Brood War.&lt;br /&gt;
This section does not &amp;quot;replace&amp;quot; IVER in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;VCOD&amp;quot; - Verification Code==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be equal to size of the VCOD data in the EXE resource. Must result in valid checksum.''&lt;br /&gt;
&lt;br /&gt;
This section has a verification code to make sure this is actually a CHK file.&lt;br /&gt;
&lt;br /&gt;
* '''u32[256]''': Seed values.&lt;br /&gt;
* '''u8[16]''': Operation codes to produce the resulting hash:&lt;br /&gt;
** '''00''' - XOR's the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''01''' - Adds to the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''02''' - Subtracts from the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''03''' - XOR's the current hash with the VCOD table at index OWNR, SIDE, FORC, and 0&lt;br /&gt;
** '''04''' - same as 0x03&lt;br /&gt;
** '''05''' - same as 0x03&lt;br /&gt;
** '''06''' - Complex function consisting of ORs and shifts&lt;br /&gt;
** '''07''' - Inverted version of 0x06, switching direction of all shifts&lt;br /&gt;
** '''08+''' - Do nothing&lt;br /&gt;
Opcodes and seeds do not have to match those in EXE resource, as long as the same value is produced.&amp;lt;br&amp;gt;&lt;br /&gt;
The only indexes in the seed table that are referenced are those that correspond individual values of [[#&amp;quot;OWNR&amp;quot; - StarCraft Player Types|OWNR]], [[#&amp;quot;SIDE&amp;quot; - Player Races|SIDE]], [[#&amp;quot;FORC&amp;quot; - Force Settings|FORC]] player assignments, and index 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IOWN&amp;quot; - StarEdit Player Types==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the owner of each player.&lt;br /&gt;
* '''u8[12]''': One byte for each player, specifies the owner of the player:&lt;br /&gt;
** '''00''' - Inactive&lt;br /&gt;
** ''01'' - Computer (game)&lt;br /&gt;
** ''02'' - Occupied by Human Player&lt;br /&gt;
** '''03''' - Rescue Passive&lt;br /&gt;
** '''04''' - Unused&lt;br /&gt;
** '''05''' - Computer&lt;br /&gt;
** '''06''' - Human (Open Slot)&lt;br /&gt;
** '''07''' - Neutral&lt;br /&gt;
** ''08'' - Closed slot&lt;br /&gt;
This section is separate from OWNR as a staredit value. Staredit does not display &amp;quot;inactive&amp;quot; as a valid option. Italicized settings denote invalid map options, which may involve a buffer overflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;OWNR&amp;quot; - StarCraft Player Types==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 12 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section designates the controller of a particular player. It is exactly the same as the &amp;quot;IOWN&amp;quot; section, except there is an additional value, 0x00 for Inactive.&lt;br /&gt;
* '''u8[12]''': One byte for each player, specifies the owner of the player:&lt;br /&gt;
** '''00''' - Inactive&lt;br /&gt;
** ''01'' - Computer (game)&lt;br /&gt;
** ''02'' - Occupied by Human Player&lt;br /&gt;
** '''03''' - Rescue Passive&lt;br /&gt;
** '''04''' - Unused&lt;br /&gt;
** '''05''' - Computer&lt;br /&gt;
** '''06''' - Human (Open Slot)&lt;br /&gt;
** '''07''' - Neutral&lt;br /&gt;
** ''08'' - Closed slot&lt;br /&gt;
Italicized settings denote invalid map options, which may involve a buffer overflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;ERA &amp;quot; - Tileset==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section indicates the tileset of the scenario.&lt;br /&gt;
* '''u16''': Designates tileset:&lt;br /&gt;
** '''00''' - Badlands&lt;br /&gt;
** '''01''' - Space Platform&lt;br /&gt;
** '''02''' - Installation&lt;br /&gt;
** '''03''' - Ashworld&lt;br /&gt;
** '''04''' - Jungle&lt;br /&gt;
** '''05''' - Desert&lt;br /&gt;
** '''06''' - Arctic&lt;br /&gt;
** '''07''' - Twilight&lt;br /&gt;
StarCraft masks the tileset indicator's bit value, so bits after the third place (anything after the value &amp;quot;7&amp;quot;) are removed. Thus, 9 (1001 in binary) is interpreted as 1 (0001), 10 (1010) as 2 (0010), etc.&amp;lt;br&amp;gt;&lt;br /&gt;
Desert, Arctic, and Twilight are Brood War-only tilesets.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;DIM &amp;quot; - Map Dimensions==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains the dimensions of the map.&lt;br /&gt;
* '''u16''': Width of the map&lt;br /&gt;
* '''u16''': Height of the map&lt;br /&gt;
The Width/Height of the map is measured in the number of square 32x32p tiles.&amp;lt;br&amp;gt;&lt;br /&gt;
Standard Dimensions are 64, 96, 128, 192, and 256.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SIDE&amp;quot; - Player Races==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 12 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains the species/race of each player.&lt;br /&gt;
* '''u8[12]''': 1 byte per player the species of that player:&lt;br /&gt;
** '''00''' - Zerg&lt;br /&gt;
** '''01''' - Terran&lt;br /&gt;
** '''02''' - Protoss&lt;br /&gt;
** ''03'' - Invalid (Independent), shown as &amp;quot;Unknown&amp;quot; in SC:R lobby&lt;br /&gt;
** ''04'' - Invalid (Neutral), shown as &amp;quot;Unknown&amp;quot;&lt;br /&gt;
** '''05''' - User Select&lt;br /&gt;
** '''06''' - Random (Forced; Acts as a selected race)&lt;br /&gt;
** ''07'' - Inactive, shown as locked &amp;quot;Select Race&amp;quot; option in SC:R lobby&lt;br /&gt;
Italicized settings denote invalid map options. Note Players 9-11 are defaultly Inactive and Player 12 is defaultly Neutral.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MTXM&amp;quot; - StarCraft Terrain==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be less than or equal to 131072 (0x20000) bytes (256 * 256 * 2).''&lt;br /&gt;
&lt;br /&gt;
Terrain section that contains a map of the level's appearance. StarEdit disregards this section and instead uses [[#&amp;quot;TILE&amp;quot; - StarEdit Terrain|TILE]]; it is only used in Starcraft.&lt;br /&gt;
* '''u16[map width * height]''': one integer for each tile.&lt;br /&gt;
Notes about MTXM:&lt;br /&gt;
* The Width/Height of the map is measured in the number of square 32x32p tiles.&lt;br /&gt;
* Tiles in this section are listed from left to right, top to bottom.&lt;br /&gt;
* The values for each integer are their respective &amp;quot;MegaTile&amp;quot; values in the scenario's tileset. If the size of this section is greater than width*height*2, the data following is ignored. If the size of this section is less, the resulting tiles that have not been defined will be null tiles.&lt;br /&gt;
* This section includes doodads as terrain; TILE, which is otherwise identical, doesn't. Out of the terrain sections (TILE, ISOM, and MTXM), SC only reads MTXM for the sake of not having to generate this data on-the-fly: it contains the exact representation of the level's appearance, including doodads. TILE, on the other hand, is directly tied via a tile lookup function to ISOM, and exists for the sake of not having to generate tiles from ISOM on-the-fly in StarEdit.&lt;br /&gt;
* If MTXM section is smaller than (map width*height), then the remaining tiles will be filled with null tiles or tiles specified by previous MTXM sections.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PUNI&amp;quot; - Player Unit Restrictions==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 5700 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains player unit restrictions: it indicates whether the player can or cannot build a particular unit.&lt;br /&gt;
* '''u8[228][12]''': 1 byte for each unit in order of its unit id, then each player, for player availability:&lt;br /&gt;
** '''00''' - That unit is not available for production if the player has 'override defaults' on&lt;br /&gt;
** '''01''' - That unit is available for production if the player has 'override defaults' on&lt;br /&gt;
* '''u8[228]''': 1 byte for each unit in order of it's unit id, for global availability defaults (for all players):&lt;br /&gt;
** '''00''' - That unit is not available for production&lt;br /&gt;
** '''01''' - That unit is available for production&lt;br /&gt;
* '''u8[228][12]''': 1 byte for each unit in order of its unit id, then each player, indicating whether a player uses the global availability defaults.&lt;br /&gt;
** '''00''' - Player overrides defaults for this unit&lt;br /&gt;
** '''01''' - Player uses defaults for this unit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGR&amp;quot; - Upgrade Restrictions==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1748 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;PUPx&amp;quot; - BW Upgrade Restrictions|&amp;quot;PUPx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains player upgrade restrictions: it indicates the starting/maximum levels at/to which a player can perform a particular upgrade.&lt;br /&gt;
* '''u8[46][12]''': 1 byte for the maximum level a player can upgrade to, in order of its upgrade id, then each player&lt;br /&gt;
* '''u8[46][12]''': 1 byte for the level of an upgrade a player starts off with, in order of its upgrade id, then each player&lt;br /&gt;
* '''u8[46]''': 1 byte for the global default maximum level of each upgrade, in order of its upgrade id.&lt;br /&gt;
* '''u8[46]''': 1 byte for the global default starting level of each upgrade, in order of its upgrade id.&lt;br /&gt;
* '''u8[46][12]''': 1 byte for each upgrade in order of its upgrade id, then each player, indicating whether a player uses the global upgrade defaults:&lt;br /&gt;
** '''00''' - Player does not use global upgrade defaults for this upgrade&lt;br /&gt;
** '''01''' - Player uses upgrade defaults for this upgrade&lt;br /&gt;
See [[#List of Upgrade IDs]].&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PTEC&amp;quot; - Tech Restrictions==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 912 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;PTEx&amp;quot; - BW Tech Restrictions|&amp;quot;PTEx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains player technology availability restrictions: it indicates whether a player starts off with a particular technology or can research a particular technology.&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology id, then each player, for player availability:&lt;br /&gt;
** '''00''' - Technology is not available for a player&lt;br /&gt;
** '''01''' - Technology is available for a player&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology id, then each player, for &amp;quot;already researched&amp;quot; status:&lt;br /&gt;
** '''00''' - Technology is not already researched&lt;br /&gt;
** '''01''' - Technology is already researched&lt;br /&gt;
* '''u8[24]''': 1 byte for each technology for global availability defaults:&lt;br /&gt;
** '''00''' - Technology is not available by default&lt;br /&gt;
** '''01''' - Technology is available by default&lt;br /&gt;
* '''u8[24]''': 1 byte for each technology for global &amp;quot;already researched&amp;quot; defaults:&lt;br /&gt;
** '''00''' - Technology is not already researched by default&lt;br /&gt;
** '''01''' - Technology is already researched by default&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology in order of its technology id, then each player, indicating whether a player uses the global defaults:&lt;br /&gt;
** '''00''' - Technology overrides defaults for player&lt;br /&gt;
** '''01''' - Technology uses default settings for player&lt;br /&gt;
See [[#List of Technology IDs]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIT&amp;quot; - Placed Units==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 36 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the pre-placed units on the map and their properties. Each unit on the map gets the following structure:&lt;br /&gt;
* '''u32''': The unit's class instance (sort of a &amp;quot;serial number&amp;quot;)&lt;br /&gt;
* U16''': X coordinate of unit&lt;br /&gt;
* U16''': Y coordinate of unit&lt;br /&gt;
* '''u16''': Unit ID&lt;br /&gt;
* '''u16''': Type of relation to another building (i.e. add-on, nydus link)&lt;br /&gt;
** '''Bit 9''' - Nydus Link&lt;br /&gt;
** '''Bit 10''' - Addon Link&lt;br /&gt;
* '''u16''': Flags of special properties which can be applied to the unit and are valid:&lt;br /&gt;
** '''Bit 0''' - Cloak is valid&lt;br /&gt;
** '''Bit 1''' - Burrow is valid&lt;br /&gt;
** '''Bit 2''' - In transit is valid&lt;br /&gt;
** '''Bit 3''' - Hallucinated is valid&lt;br /&gt;
** '''Bit 4''' - Invincible is valid&lt;br /&gt;
** '''Bit 5-15''' - Unused&lt;br /&gt;
* '''u16''': Out of the elements of the unit data, the properties which can be changed by the map maker:&lt;br /&gt;
** '''Bit 0''' - Owner player is valid (the unit is not a critter, start location, etc.; not a neutral unit)&lt;br /&gt;
** '''Bit 1''' - HP is valid&lt;br /&gt;
** '''Bit 2''' - Shields is valid&lt;br /&gt;
** '''Bit 3''' - Energy is valid (unit is a wraith, etc.)&lt;br /&gt;
** '''Bit 4''' - Resource amount is valid (unit is a mineral patch, vespene geyser, etc.)&lt;br /&gt;
** '''Bit 5''' - Amount in hangar is valid (unit is a reaver, carrier, etc.)&lt;br /&gt;
** '''Bit 6-15''' - Unused&lt;br /&gt;
* '''u8''': Player number of owner (0-based)&lt;br /&gt;
* '''u8''': Hit points % (1-100)&lt;br /&gt;
* '''u8''': Shield points % (1-100)&lt;br /&gt;
* '''u8''': Energy points % (1-100)&lt;br /&gt;
* '''u32''': Resource amount&lt;br /&gt;
* '''u16''': Number of units in hangar&lt;br /&gt;
* '''u16''': Unit state flags&lt;br /&gt;
** '''Bit 0''' - Unit is cloaked&lt;br /&gt;
** '''Bit 1''' - Unit is burrowed&lt;br /&gt;
** '''Bit 2''' - Building is in transit&lt;br /&gt;
** '''Bit 3''' - Unit is hallucinated&lt;br /&gt;
** '''Bit 4''' - Unit is invincible&lt;br /&gt;
** '''Bit 5-15''' - Unused&lt;br /&gt;
* '''u32''': Unused&lt;br /&gt;
* '''u32''': Class instance of the unit to which this unit is related to (i.e. via an add-on, nydus link, etc.). It is &amp;quot;0&amp;quot; if the unit is not linked to any other unit.&lt;br /&gt;
Notes about UNIT:&lt;br /&gt;
* The X/Y coordinates are the center of the sprite of the unit (in pixels).&lt;br /&gt;
* Please edit if you could confirm the bit values to be correct/if you know more bit values.&lt;br /&gt;
* Default values will apply if bit values are unchecked. Defaults: 100% HP, 100% SP, 100% EP, 0 resources, 0 hangar count.&lt;br /&gt;
* This section can be split. Additional UNIT sections will add more units.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;ISOM&amp;quot; - Isometric Terrain==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section is required to place isometric terrain on the map. It provides data about the nature of the isometrical &amp;quot;diamonds&amp;quot; (the editing mode of StarEdit).&lt;br /&gt;
* '''u16[ (width / 2 + 1) * (height + 1) * 4 ]''': 4 integers for each map rectangle tile (plus one extra tile to the right and bottom of the map), as per the RECT structure. Each rectangle border (left, top, right, bottom) is assigned an &amp;quot;ISOM value.&amp;quot; These form the &amp;quot;diamond&amp;quot; pattern of the map, and each rectangle thus gets two ISOM values associated with it. StarEdit somehow hashes these (the exact algorithm is unknown) and thus produces the tile index of the rectangle (which it stores in TILE for reasons of efficiency). The index of the rectangle's right tile is that of its left tile + 16.&lt;br /&gt;
This section is the only truly unknown section of the .chk format. If you're an ex-Blizzard employee or SI, please edit this section. If you have additional research, post on the forums about it and/or edit this section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TILE&amp;quot; - StarEdit Terrain==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section will only be different from the [[#&amp;quot;MTXM&amp;quot; - StarCraft Terrain|MTXM]] section in tiles where doodads are present.&lt;br /&gt;
* '''u16[ map width * height ]''': 1 integer for each map tile. Moves horizontally across the map.&lt;br /&gt;
The values in TILE are normally directly generated from the ISOM section (see &amp;quot;'ISOM' section&amp;quot; above), and thus do not match that of MTXM on doodad tiles.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;DD2 &amp;quot; - StarEdit Sprites (Doodads)==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section contains the doodad map of the level. There are several parts to doodads. The graphical portion is stored in the [[#&amp;quot;MTXM&amp;quot; - StarCraft Terrain|MTXM]] section. The second part of the doodad is stored in this section. This section is only used by the map editor.&lt;br /&gt;
&lt;br /&gt;
Each doodad in the map gets the following structure:&lt;br /&gt;
* '''u16''': Number of the doodad. Size of the doodad is dependent on this. Doodads are different for each tileset.&lt;br /&gt;
* '''u16''': X coordinate of the doodad unit&lt;br /&gt;
* '''u16''': Y coordinate of the doodad unit&lt;br /&gt;
* '''u8''': Player number that owns the doodad&lt;br /&gt;
* '''u8''': Enabled flag&lt;br /&gt;
** '''00''' - Doodad is enabled (trap can attack, door is closed, etc)&lt;br /&gt;
** '''01''' - Doodad is disabled&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;THG2&amp;quot; - StarCraft Sprites==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 10 bytes.''&lt;br /&gt;
&lt;br /&gt;
The map editor only writes to this section. Starcraft uses this section.&lt;br /&gt;
&lt;br /&gt;
Sprites, usually on doodads, get the following structure.&lt;br /&gt;
* '''u16''': Unit/Sprite number of the sprite&lt;br /&gt;
* '''u16''': X coordinate of the doodad unit&lt;br /&gt;
* '''u16''': Y coordinate of the doodad unit&lt;br /&gt;
* '''u8''': Player number that owns the doodad&lt;br /&gt;
* '''u8''': Unused&lt;br /&gt;
* '''u16''': Flags&lt;br /&gt;
** '''Bit 0-11''' - Unused&lt;br /&gt;
** '''Bit 12''' - Draw as sprite (Determines if it is a sprite or a unit sprite)&lt;br /&gt;
** '''Bit 13''' - Unused&lt;br /&gt;
** '''Bit 14''' - Unused&lt;br /&gt;
** '''Bit 15''' - Disabled (Only valid if Draw as sprite is unchecked, disables the unit)&lt;br /&gt;
This section can be split. Additional THG2 sections will add more sprites.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MASK&amp;quot; - Fog of War Layer==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: This section will always validate.''&lt;br /&gt;
&lt;br /&gt;
This section contains the data on fog of war for each player. This is whether at the start of the game that levels of black space that is available.&lt;br /&gt;
* '''u8[ map width * height ]''': One byte for each map tile. The bits indicate for each player the fog of war.&lt;br /&gt;
** '''Bit 0''' - Player 1's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 1''' - Player 2's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 2''' - Player 3's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 3''' - Player 4's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 4''' - Player 5's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 5''' - Player 6's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 6''' - Player 7's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 7''' - Player 8's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
Any size greater than width*height will be ignored. Any size less will default missing tiles to 0xFF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;STR &amp;quot; - String Data==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be at least 1 byte.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the strings in the map.&lt;br /&gt;
* '''u16''': Number of strings in the section (Default''': 1024)&lt;br /&gt;
* '''u16[Number of strings]''': 1 integer for each string specifying the offset (the spot where the string starts in the section from the start of it).&lt;br /&gt;
* '''Strings''': After the offsets, this is where every string in the map goes, one after another. Each one is terminated by a null character.&lt;br /&gt;
This section can contain more or less then 1024 string offsests and will work in Starcraft.&amp;lt;br&amp;gt;&lt;br /&gt;
By default the first byte in '''Strings''' is a NUL character, and all unused offsets in the STR section point to this NUL character.&lt;br /&gt;
Note that STR sections can be stacked in a smiliar fashion as MTXM. The exact mechanisms of this are uncertain.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPRP&amp;quot; - CUWP Slots==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1280 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section is used whenever the create units with properties trigger is used. Since a slot has to be assigned to the action, this is where each slot is designated.&lt;br /&gt;
&lt;br /&gt;
There are 64 of the following structures regardless of how many are used and it cannot exceed 64.&lt;br /&gt;
* '''u16''': Flag of which special properties can be applied to unit, and are valid.&lt;br /&gt;
** '''Bit 0''' - Cloak bit is valid&lt;br /&gt;
** '''Bit 1''' - Burrowed bit is valid&lt;br /&gt;
** '''Bit 2''' - In transit bit is valid&lt;br /&gt;
** '''Bit 3''' - Hallucinated bit is valid&lt;br /&gt;
** '''Bit 4''' - Invincible bit is valid&lt;br /&gt;
** '''Bit 5-15''' - Unknown/unused&lt;br /&gt;
* '''u16''': Which elements of the unit data are valid, which properties can be changed by the map maker.&lt;br /&gt;
** '''Bit 0''' - Owner player is valid (unit is not neutral)&lt;br /&gt;
** '''Bit 1''' - HP is valid&lt;br /&gt;
** '''Bit 2''' - Shields is valid&lt;br /&gt;
** '''Bit 3''' - Energy is valid&lt;br /&gt;
** '''Bit 4''' - Resource amount is valid (unit is a resource)&lt;br /&gt;
** '''Bit 5''' - Amount in hanger is valid&lt;br /&gt;
** '''Bit 6''' - Unknown/unused&lt;br /&gt;
* '''u8''': Player number that owns unit. Will always be NULL in this section (0)&lt;br /&gt;
* '''u8''': Hit point % (1-100)&lt;br /&gt;
* '''u8''': Shield point % (1-100)&lt;br /&gt;
* '''u8''': Energy point % (1-100)&lt;br /&gt;
* '''u32''': Resource amount (for resources only)&lt;br /&gt;
* '''u16''': # of units in hangar&lt;br /&gt;
* '''u16''': Flags&lt;br /&gt;
** '''Bit 0''' - Unit is cloaked&lt;br /&gt;
** '''Bit 1''' - Unit is burrowed&lt;br /&gt;
** '''Bit 2''' - Building is in transit&lt;br /&gt;
** '''Bit 3''' - Unit is hallucinated&lt;br /&gt;
** '''Bit 4''' - Unit is invincible&lt;br /&gt;
** '''Bit 5-15''' - Unknown/unused&lt;br /&gt;
* '''u32''': Unknown/unused. Padding?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPUS&amp;quot; - CUWP Slots Used==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section goes along with the &amp;quot;UPRP&amp;quot; section. This section just indicates which of the 64 unit properties slot are used.&lt;br /&gt;
* '''u8[64]''': 1 byte for each trigger unit properties slot&lt;br /&gt;
** '''00''' - Properties slot is unused&lt;br /&gt;
** '''01''' - Properties slot is used&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MRGN&amp;quot; - Locations==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: 1280 bytes for retail, 5100 bytes for Hybrid and Broodwar.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the locations that the map uses. In a vanilla map, this section contains 64 locations. In a Hybrid or Brood War map, this section will expand to contain 255 locations.&lt;br /&gt;
&lt;br /&gt;
Each location gets one of the following location entries. The 'Anywhere' location, is ALWAYS location 64.&lt;br /&gt;
* '''u32''': Left (X1) coordinate of location, in pixels (usually 32 pt grid aligned)&lt;br /&gt;
* '''u32''': Top (Y1) coordinate of location, in pixels&lt;br /&gt;
* '''u32''': Right (X2) coordinate of location, in pixels&lt;br /&gt;
* '''u32''': Bottom (Y2) coordinate of location, in pixels&lt;br /&gt;
* '''u16''': String number of the name of this location&lt;br /&gt;
* '''u16''': Location elevation flags. If an elevation is disabled in the location, it's bit will be on (1)&lt;br /&gt;
** '''Bit 0''' - Low elevation&lt;br /&gt;
** '''Bit 1''' - Medium elevation&lt;br /&gt;
** '''Bit 2''' - High elevation&lt;br /&gt;
** '''Bit 3''' - Low air&lt;br /&gt;
** '''Bit 4''' - Medium air&lt;br /&gt;
** '''Bit 5''' - High air&lt;br /&gt;
** '''Bit 6-15''' - Unused&lt;br /&gt;
Note that in typical locations Right is always larger than Left and Bottom is always larger than Top. However, you can reverse one or both of these for [[Inverted Locations]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TRIG&amp;quot; - Triggers==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 2400 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the triggers in the map. This along with [[#&amp;quot;MBRF&amp;quot; - Mission Briefings|MBRF]] is the most complicated section in the entire scenario.chk file as there is a lot of data packed into too little of a space. Refer to the appendix at the bottom of this page for more information.&lt;br /&gt;
For easy reference, since each trigger contains 2400 bytes, the amount of triggers can be gotten by taking the section length and dividing by 2400.&lt;br /&gt;
Every single trigger in the map will have the following format:&lt;br /&gt;
* 16 Conditions (20 byte struct)&amp;lt;br&amp;gt; Every trigger has 16 of the following format, even if only one condition is used. See the appendix for information on which items are used for what conditions.&lt;br /&gt;
** '''u32''': Location number for the condition (1 based -- 0 refers to No Location), EUD Bitmask for a Death condition if the MaskFlag is set to &amp;quot;SC&amp;quot;&lt;br /&gt;
** '''u32''': [[#List of Players/Group IDs|Group]] that the condition applies to&lt;br /&gt;
** '''u32''': Qualified number (how many/resource amount)&lt;br /&gt;
** '''u16''': [[#Trigger Unit Types|Unit ID]] condition applies to&lt;br /&gt;
** '''u8''': [[#Numeric Comparisons|Numeric comparison]], [[#Switch States|switch state]]&lt;br /&gt;
** '''u8''': [[#Trigger Conditions List|Condition byte]]&lt;br /&gt;
** '''u8''': [[#Resource Types|Resource type]], [[#Score Types|score type]], Switch number (0-based)&lt;br /&gt;
** '''u8''': Flags&lt;br /&gt;
*** '''Bit 0''' - Unknown/unused&lt;br /&gt;
*** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled/ignored&lt;br /&gt;
*** '''Bit 2''' - Always display flag.&lt;br /&gt;
*** '''Bit 3''' - Unit properties is used. ('''Note:''' This is used in [[TRG|*.trg]] files)&lt;br /&gt;
*** '''Bit 4''' - Unit type is used. Cleared in &amp;quot;Offset + Mask&amp;quot; EUD conditions. May not be necessary otherwise?&lt;br /&gt;
*** '''Bit 5-7''' - Unknown/unused&lt;br /&gt;
** '''u16''': MaskFlag: set to &amp;quot;SC&amp;quot; (0x53, 0x43) when using the bitmask for EUDs, 0 otherwise&lt;br /&gt;
* 64 Actions (32 byte struct)&amp;lt;br&amp;gt; Immediately following the 16 conditions, there are 64 actions. There will always be 64 of the following structure, even if some of them are unused.&lt;br /&gt;
** '''u32''': Location - source location in &amp;quot;Order&amp;quot; and &amp;quot;Move Unit&amp;quot;, dest location in &amp;quot;Move Location&amp;quot; (1 based -- 0 refers to No Location), EUD Bitmask for a Death action if the MaskFlag is set to &amp;quot;SC&amp;quot;&lt;br /&gt;
** '''u32''': String number for trigger text (0 means no string)&lt;br /&gt;
** '''u32''': WAV string number (0 means no string)&lt;br /&gt;
** '''u32''': Seconds/milliseconds of time&lt;br /&gt;
** '''u32''': First (or only) [[#List of Players/Group IDs|Group/Player]] affected.&lt;br /&gt;
** '''u32''': Second group affected, secondary location (1-based), CUWP #, number, AI script (4-byte string), switch (0-based #)&lt;br /&gt;
** '''u16''': [[#Trigger Unit Types|Unit type]], [[#Score Types|score type]], [[#Resource Types|resource type]], [[#Alliance Statuses|alliance status]]&lt;br /&gt;
** '''u8''': [[#Trigger Actions List|Action byte]]&lt;br /&gt;
** '''u8''': Number of units (0 means All Units), [[#Action States|action state]], [[#Unit Orders|unit order]], [[#Number Modifiers|number modifier]]&lt;br /&gt;
** '''u8''': Flags&lt;br /&gt;
*** '''Bit 0''' - Ignore a wait/transmission once.&lt;br /&gt;
*** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled.&lt;br /&gt;
*** '''Bit 2''' - Always display flag - when not set: if the user has turned off subtitles (see sound options) the text will not display, when set: text will always display&lt;br /&gt;
*** '''Bit 3''' - Unit properties is used. Staredit uses this for *.trg files.&lt;br /&gt;
*** '''Bit 4''' - Unit type is used. Cleared in &amp;quot;Offset + Mask&amp;quot; EUD actions.&lt;br /&gt;
*** '''Bit 5-7''' - Unknown/unused&lt;br /&gt;
** '''u8''': Padding&lt;br /&gt;
** '''u16 (2 bytes)''': MaskFlag: set to &amp;quot;SC&amp;quot; (0x53, 0x43) when using the bitmask for EUDs, 0 otherwise&lt;br /&gt;
* Player Execution&amp;lt;br&amp;gt; Following the 16 conditions and 64 actions, every trigger also has this structure&lt;br /&gt;
** '''u32''': execution flags&lt;br /&gt;
*** '''Bit 0''' - All conditions are met, executing actions, cleared on the next trigger loop.&lt;br /&gt;
*** '''Bit 1''' - Ignore the following actions: Defeat, Draw.&lt;br /&gt;
*** '''Bit 2''' - Preserve trigger. (Can replace Preserve Trigger action)&lt;br /&gt;
*** '''Bit 3''' - Ignore execution.&lt;br /&gt;
*** '''Bit 4''' - Ignore all of the following actions for this trigger until the next trigger loop: Wait, PauseGame, Transmission, PlayWAV, DisplayTextMessage, CenterView, MinimapPing, TalkingPortrait, and MuteUnitSpeech.&lt;br /&gt;
*** '''Bit 5''' - This trigger has paused the game, ignoring subsequent calls to Pause Game (Unpause Game clears this flag only in the same trigger), may automatically call unpause at the end of action execution?&lt;br /&gt;
*** '''Bit 6''' - Wait skipping disabled for this trigger, cleared on next trigger loop.&lt;br /&gt;
*** '''Bit 7-31''' - Unknown/unused&lt;br /&gt;
** '''u8[27]''': 1 byte for each player in the [[#List of Players/Group IDs]]&lt;br /&gt;
*** '''00''' - Trigger is not executed for player&lt;br /&gt;
*** '''01''' - Trigger is executed for player&lt;br /&gt;
** '''u8''': Index of the current action, in StarCraft this is incremented after each action is executed, trigger execution ends when this is 64 (Max Actions) or an action is encountered with Action byte as 0&lt;br /&gt;
This section can be split. Additional TRIG sections will add more triggers.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MBRF&amp;quot; - Mission Briefings==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 2400 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all of the mission briefings shown by the players.&lt;br /&gt;
&lt;br /&gt;
See [[#&amp;quot;TRIG&amp;quot; - Triggers|&amp;quot;TRIG&amp;quot;]] section for format, as it is exactly the same except for the conditions. In this section the 16 conditions are still there, they are all null except for the very first condition, which only has a condition byte of 13. See [[#Mission Briefing Actions List]] for the action bytes for the mission briefing actions.&lt;br /&gt;
&lt;br /&gt;
This section can be split. Additional MBRF sections will add more briefing triggers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SPRP&amp;quot; - Scenario Properties==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4 bytes.''&lt;br /&gt;
&lt;br /&gt;
* '''u16''': String number of the scenario name&lt;br /&gt;
* '''u16''': String number of the scenarios description.&lt;br /&gt;
A string index of 0 for the map name will default it to its file name. A string index of 0 description will default to a predefined string.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;FORC&amp;quot; - Force Settings==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be less than or equal to 20 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the forces and the information about them.&lt;br /&gt;
* '''u8[8]''': 1 byte for each active player, specifying which of the 4 forces (0-based) that the player's on&lt;br /&gt;
* '''u16[4]''': 1 integer for each force, string number of the name of the force&lt;br /&gt;
* '''u8[4]''': 1 byte for each force specifying the properties:&lt;br /&gt;
** '''Bit 0''' - Random start location&lt;br /&gt;
** '''Bit 1''' - Allies&lt;br /&gt;
** '''Bit 2''' - Allied victory&lt;br /&gt;
** '''Bit 3''' - Shared vision&lt;br /&gt;
** '''Bit 4-7''' - Unused&lt;br /&gt;
Notes about FORC:&lt;br /&gt;
* If there is no string specified for a force name, it will default to a &amp;quot;Force #&amp;quot; string.&lt;br /&gt;
* If this section is less than 20 bytes, the remaining bytes are defaulted to 0.&lt;br /&gt;
* Players can be on a force greater than 4, however they will not appear in the game lobby.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;WAV &amp;quot; - WAV String Indexes==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
There are 512 wav entires regardless of how many are actually used.&lt;br /&gt;
* '''u32[512]''': 1 long for each WAV. Indicates a string index is used for a WAV path in the MPQ. If the entry is not used, it will be 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIS&amp;quot; - Unit Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4048 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;UNIx&amp;quot; - BW Unit Settings|&amp;quot;UNIx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains the unit settings for the level:&lt;br /&gt;
* '''u8[228]''': 1 byte for each unit, in order of Unit ID&lt;br /&gt;
** '''00''' - Unit does not use default settings&lt;br /&gt;
** '''01''' - Unit does use default settings&lt;br /&gt;
* '''u32[228]''': Hit points for unit (Note the displayed value is this value / 256, with the low byte being a fractional HP value)&lt;br /&gt;
* '''u16[228]''': Shield points, in order of Unit ID&lt;br /&gt;
* '''u8[228]''': Armor points, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Build time (1/60 seconds), in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Mineral cost, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Gas cost, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': String number, in order of Unit ID&lt;br /&gt;
* '''u16[100]''': Base weapon damage the weapon does, in weapon ID order ([[#List of Unit Weapon IDs]])&lt;br /&gt;
* '''u16[100]''': Upgrade bonus weapon damage, in weapon ID order&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGS&amp;quot; - Upgrade Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 598 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;UPGx&amp;quot; - BW Upgrade Settings|&amp;quot;UPGx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains upgrade settings:&lt;br /&gt;
* '''u8[46]''': 1 byte per each upgrade, in order of upgrade id.&lt;br /&gt;
** '''00''' - Upgrade uses custom settings&lt;br /&gt;
** '''01''' - Upgrade uses default settings&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, time factor for each upgrade, in order of upgrade id.&lt;br /&gt;
See [[#List of Upgrade IDs]] for upgrade ids.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TECS&amp;quot; - Tech Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 216 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;TECx&amp;quot; - BW Tech Settings|&amp;quot;TECx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains technology/special abilities settings:&lt;br /&gt;
* '''u8[24]''': 1 byte per each technology, specifies if the tech overrides the default settings. In order of technology id&lt;br /&gt;
** '''00''' - Technology uses custom settings&lt;br /&gt;
** '''01''' - Technology uses default settings&lt;br /&gt;
* '''u16[24]''': Mineral cost to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Gas cost to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Time required to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Energy cost to cast technology/special ability. In order of technology id.&lt;br /&gt;
See [[#List of Technology IDs]] for technology ids.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SWNM&amp;quot; - Switch Names==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section contains the strings used for each switch. There are 256 switches, and can't be any more or any less.&lt;br /&gt;
* '''u32[256]''': One long for each switch, specifies the string number for the name of each switch. Unnamed switches will have an index of 0, and have a default switch name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;COLR&amp;quot; - Player Colors==&lt;br /&gt;
''Required for Brood War only and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 8 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section indicates what color each player is, but only has effect on Brood War.&lt;br /&gt;
* '''u8[8]''': 1 byte for each player, indicates the color of the player&lt;br /&gt;
** '''00''' - Red&lt;br /&gt;
** '''01''' - Blue&lt;br /&gt;
** '''02''' - Teal&lt;br /&gt;
** '''03''' - Purple&lt;br /&gt;
** '''04''' - Orange&lt;br /&gt;
** '''05''' - Brown&lt;br /&gt;
** '''06''' - White&lt;br /&gt;
** '''07''' - Yellow&lt;br /&gt;
** '''08''' - Green&lt;br /&gt;
** '''09''' - Pale yellow&lt;br /&gt;
** '''10''' - Tan&lt;br /&gt;
** '''11''' - Azure (Neutral color)&lt;br /&gt;
Other values can be used but may have different results depending on the tileset. Any color value above 11 is an overflow. As of patch 1.18.6, values above 11 result in default player color.&lt;br /&gt;
&lt;br /&gt;
When CRGB is present, this section still defines leaderboard colors.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;CRGB&amp;quot; - Remastered Player Colors==&lt;br /&gt;
''Requirement unknown, but can be in any map type including non-remaster maps.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 32 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''u8[8][3]''': 3 bytes for each player corresponding to an RGB color value&lt;br /&gt;
** '''u8''': R&lt;br /&gt;
** '''u8''': G&lt;br /&gt;
** '''u8''': B, or color ID for type 3&lt;br /&gt;
* '''u8[8]''': Indicates how to select the color for each player&lt;br /&gt;
** '''0''' - Random Predefined&lt;br /&gt;
** '''1''' - Player's Choice&lt;br /&gt;
** '''2''' - Custom RGB Color (RGB value for the corresponding player defined above)&lt;br /&gt;
** '''3''' - Use color ID in the &amp;quot;B&amp;quot; color channel (&amp;quot;R&amp;quot; and &amp;quot;G&amp;quot; values appear to contain junk data); leaderboard color is still defined by COLR section and can be set independently&lt;br /&gt;
&lt;br /&gt;
SC:R Only color IDs:&lt;br /&gt;
Extends the [[#&amp;quot;COLR&amp;quot; - Player Colors|COLR]] section list of colors, but cannot be used in the COLR section.&lt;br /&gt;
* '''12''' - Pale Green&lt;br /&gt;
* '''13''' - Blueish Grey&lt;br /&gt;
* '''14''' - Cyan&lt;br /&gt;
* '''15''' - Pink&lt;br /&gt;
* '''16''' - Olive&lt;br /&gt;
* '''17''' - Lime&lt;br /&gt;
* '''18''' - Navy&lt;br /&gt;
* '''19''' - Magenta&lt;br /&gt;
* '''20''' - Grey&lt;br /&gt;
* '''21''' - Black&lt;br /&gt;
* '''22+''' - Random (can pick colors that have been used)&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PUPx&amp;quot; - BW Upgrade Restrictions==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2318 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UPGR&amp;quot; - Upgrade Restrictions|&amp;quot;UPGR&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is identical to UPGR section except it uses the Brood War set of 61 upgrades instead of the original 46.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PTEx&amp;quot; - BW Tech Restrictions==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1672 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;PTEC&amp;quot; - Tech Restrictions|&amp;quot;PTEC&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is identical to PTEC section except it uses the Brood War set of 44 technologies instead of the original 24.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIx&amp;quot; - BW Unit Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4168 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UNIS&amp;quot; - Unit Settings|&amp;quot;UNIS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is indentical to UNIS section except it uses the Brood War set of 130 weapons instead of the original 100.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGx&amp;quot; - BW Upgrade Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 794 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UPGS&amp;quot; - Upgrade Settings|&amp;quot;UPGS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section the same as UPGS except section except it uses the Brood War set of 61 upgrades instead of the original 46, and there is an unused byte after the first set:&lt;br /&gt;
* '''u8[61]''': 1 byte per each upgrade, in order of upgrade id.&lt;br /&gt;
** '''00''' - Upgrade uses custom settings&lt;br /&gt;
** '''01''' - Upgrade uses default settings&lt;br /&gt;
* '''u8''': Unused.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, time factor for each upgrade, in order of upgrade id.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TECx&amp;quot; - BW Tech Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 396 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;TECS&amp;quot; - Tech Settings|&amp;quot;TECS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is indentical to TECS section except it uses the Brood War set of 44 technologies instead of the original 24.&lt;br /&gt;
&lt;br /&gt;
=Appendix=&lt;br /&gt;
A set of references and IDs that should help you easier in the trigger section and the technology/player ids, etc:&lt;br /&gt;
&lt;br /&gt;
==Trigger Conditions List==&lt;br /&gt;
* 0 = No Condition&lt;br /&gt;
* 1 = Countdown Timer(Comparison, QNumber)&lt;br /&gt;
* 2 = Command(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 3 = Bring(Player, Comparison, TUnit, Loc, QNumber)&lt;br /&gt;
* 4 = Accumulate(Player, Comparison, QNumber, ResType)&lt;br /&gt;
* 5 = Kill(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 6 = Command the Most(TUnit)&lt;br /&gt;
* 7 = Commands the Most At(TUnit, Loc)&lt;br /&gt;
* 8 = Most Kills(TUnit)&lt;br /&gt;
* 9 = Highest Score(Score)&lt;br /&gt;
* 10 = Most Resources(ResType)&lt;br /&gt;
* 11 = Switch(Switch)&lt;br /&gt;
* 12 = Elapsed Time(Comparison, QNumber)&lt;br /&gt;
* 13 = Data is a Mission Briefing. Conditions are N/A (Same as Never)&lt;br /&gt;
* 14 = Opponents(Player, Comparison, QNumber)&lt;br /&gt;
* 15 = Deaths(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 16 = Command the Least(TUnit)&lt;br /&gt;
* 17 = Command the Least At(TUnit, Loc)&lt;br /&gt;
* 18 = Least Kills(TUnit)&lt;br /&gt;
* 19 = Lowest Score(Score)&lt;br /&gt;
* 20 = Least Resources(ResType)&lt;br /&gt;
* 21 = Score(Player, Comparison, Score, QNumber)&lt;br /&gt;
* 22 = Always (Same as No Condition)&lt;br /&gt;
* 23 = Never&lt;br /&gt;
&lt;br /&gt;
==Trigger Actions List==&lt;br /&gt;
* 0 = No Action&lt;br /&gt;
* 1 = Victory&lt;br /&gt;
* 2 = Defeat&lt;br /&gt;
* 3 = Preserve Trigger&lt;br /&gt;
* 4 = Wait(Time)&lt;br /&gt;
* 5 = Pause Game (Single player only)&lt;br /&gt;
* 6 = Unpause Game (Single player only)&lt;br /&gt;
* 7 = Transmission(Text, Unit, Loc, Time, Modifier, Wave, WavTime)&lt;br /&gt;
* 8 = Play WAV(Wav, WavTime)&lt;br /&gt;
* 9 = Display Text Message(Text)&lt;br /&gt;
* 10 = Center View(Loc)&lt;br /&gt;
* 11 = Create Unit with Properties(Player, Unit, Number, Loc, UnitProp)&lt;br /&gt;
* 12 = Set Mission Objectives(Text)&lt;br /&gt;
* 13 = Set Switch(Switch, SwAction)&lt;br /&gt;
* 14 = Set Countdown Timer(Time, Modifier)&lt;br /&gt;
* 15 = Run AI Script(AIScript)&lt;br /&gt;
* 16 = Run AI Script At Location(AIScript)&lt;br /&gt;
* 17 = Leader Board (Control) (Text, TUnit)&lt;br /&gt;
* 18 = Leader Board (Control At Location) (Text, TUnit, Loc)&lt;br /&gt;
* 19 = Leader Board (Resources) (Text, ResType)&lt;br /&gt;
* 20 = Leader Board (Kills) (Text, TUnit)&lt;br /&gt;
* 21 = Leader Board (Points) (Text, Score)&lt;br /&gt;
* 22 = Kill Unit (Player, TUnit)&lt;br /&gt;
* 23 = Kill Unit At Location(Player, TUnit, Number, Loc)&lt;br /&gt;
* 24 = Remove Unit(Player, TUnit)&lt;br /&gt;
* 25 = Remove Unit At Location(Player, TUnit, Number, Loc)&lt;br /&gt;
* 26 = Set Resources(Player, Number, Modifier, ResType)&lt;br /&gt;
* 27 = Set Score(Player, Number, Modifier, Score)&lt;br /&gt;
* 28 = Minimap Ping(Loc)&lt;br /&gt;
* 29 = Talking Portrait(Unit, Time)&lt;br /&gt;
* 30 = Mute Unit Speech&lt;br /&gt;
* 31 = Unmute Unit Speech&lt;br /&gt;
* 32 = Leaderboard Computer Players(State)&lt;br /&gt;
* 33 = Leaderboard Goal (Control) (Text, TUnit, Number)&lt;br /&gt;
* 34 = Leaderboard Goal (Control At Location) (Text, TUnit, Number, Loc)&lt;br /&gt;
* 35 = Leaderboard Goal (Resources) (Text, TUnit, Number, ResType)&lt;br /&gt;
* 36 = Leaderboard Goal (Kills) (Text, TUnit, Number)&lt;br /&gt;
* 37 = Leaderboard Goal (Points) (Text, Number, Score)&lt;br /&gt;
* 38 = Move Location(Player, TUnit, SLoc, DLoc)&lt;br /&gt;
* 39 = Move Unit(Player, TUnit, Number, SLoc, DLoc)&lt;br /&gt;
* 40 = Leaderboard (Greed) (Number)&lt;br /&gt;
* 41 = Set Next Scenario(Text) (Single player only)&lt;br /&gt;
* 42 = Set Doodad State(Player, TUnit, Loc, State)&lt;br /&gt;
* 43 = Set Invincibility(Player, TUnit, Loc, State)&lt;br /&gt;
* 44 = Create Unit(Player, Unit, Number, Loc)&lt;br /&gt;
* 45 = Set Deaths(Player, TUnit, Number, Modifier)&lt;br /&gt;
* 46 = Order(Player, TUnit, SLoc, DLoc, Order)&lt;br /&gt;
* 47 = Comment(Text)&lt;br /&gt;
* 48 = Give Units to Player(SPlayer, DPlayer, TUnit, Number, Loc)&lt;br /&gt;
* 49 = Modify Unit Hit Points(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 50 = Modify Unit Energy(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 51 = Modify Unit Shield Points(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 52 = Modify Unit Resource Amount(Player, Number, ModAmount, Loc)&lt;br /&gt;
* 53 = Modify Unit Hanger Count(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 54 = Pause Timer&lt;br /&gt;
* 55 = Unpause Timer&lt;br /&gt;
* 56 = Draw&lt;br /&gt;
* 57 = Set Alliance Status(Player, AllyStatus)&lt;br /&gt;
* 58 = Disable Debug Mode (Single player only)&lt;br /&gt;
* 59 = Enable Debug Mode (Single player only)&lt;br /&gt;
&lt;br /&gt;
==Mission Briefing Actions List==&lt;br /&gt;
* 0 - No Action&lt;br /&gt;
* 1 - Wait(Time)&lt;br /&gt;
* 2 - Play WAV(Wave, WavTime)&lt;br /&gt;
* 3 - Text Message(Text, Time)&lt;br /&gt;
* 4 - Mission Objectives(Text)&lt;br /&gt;
* 5 - Show Portrait(Unit, Slot)&lt;br /&gt;
* 6 - Hide Portrait(Slot)&lt;br /&gt;
* 7 - Display Speaking Portrait(Slot, Time)&lt;br /&gt;
* 8 - Transmission(Text, Slot, Time, Modifier, Wave, WavTime)&lt;br /&gt;
* 9 - Skip Tutorial Enabled&lt;br /&gt;
&lt;br /&gt;
==Switch States==&lt;br /&gt;
* 2 = Switch is set&lt;br /&gt;
* 3 = Switch is cleared&lt;br /&gt;
&lt;br /&gt;
==Numeric Comparisons==&lt;br /&gt;
* 0 = At least&lt;br /&gt;
* 1 = At most&lt;br /&gt;
* 10 = Exactly&lt;br /&gt;
&lt;br /&gt;
==Score Types==&lt;br /&gt;
* 0 = Total&lt;br /&gt;
* 1 = Units&lt;br /&gt;
* 2 = Buildings&lt;br /&gt;
* 3 = Units and Buildings&lt;br /&gt;
* 4 = Kills&lt;br /&gt;
* 5 = Razings&lt;br /&gt;
* 6 = Kills and Razings&lt;br /&gt;
* 7 = Custom&lt;br /&gt;
&lt;br /&gt;
==Resource Types==&lt;br /&gt;
* 0 = Ore&lt;br /&gt;
* 1 = Gas&lt;br /&gt;
* 2 = Ore and Gas&lt;br /&gt;
&lt;br /&gt;
==Alliance Statuses==&lt;br /&gt;
* 0 = Enemy&lt;br /&gt;
* 1 = Ally&lt;br /&gt;
* 2 = Allied Victory&lt;br /&gt;
&lt;br /&gt;
==Unit Orders==&lt;br /&gt;
* 0 = Move&lt;br /&gt;
* 1 = Patrol&lt;br /&gt;
* 2 = Attack&lt;br /&gt;
&lt;br /&gt;
==Action States==&lt;br /&gt;
* 4 = Enabled/Set switch&lt;br /&gt;
* 5  = Disabled/Clear switch&lt;br /&gt;
* 6 = Toggle/Toggle switch&lt;br /&gt;
* 11 = Randomize switch&lt;br /&gt;
&lt;br /&gt;
==Number Modifiers==&lt;br /&gt;
* 7 = Set to&lt;br /&gt;
* 8 = Add&lt;br /&gt;
* 9 = Subtract&lt;br /&gt;
&lt;br /&gt;
==Trigger Unit Types==&lt;br /&gt;
* All normal units (0-227)&lt;br /&gt;
* 228 = None&lt;br /&gt;
* 229 = Any unit&lt;br /&gt;
* 230 = Men&lt;br /&gt;
* 231 = Buildings&lt;br /&gt;
* 232 = Factories&lt;br /&gt;
&lt;br /&gt;
==List of Players/Group IDs==&lt;br /&gt;
* 0 = Player 1&lt;br /&gt;
* 1 = Player 2&lt;br /&gt;
* 2 = Player 3&lt;br /&gt;
* 3 = Player 4&lt;br /&gt;
* 4 = Player 5&lt;br /&gt;
* 5 = Player 6&lt;br /&gt;
* 6 = Player 7&lt;br /&gt;
* 7 = Player 8&lt;br /&gt;
* 8 = Player 9&lt;br /&gt;
* 9 = Player 10&lt;br /&gt;
* 10 = Player 11&lt;br /&gt;
* 11 = Player 12&lt;br /&gt;
* 12 = None (Unused, One-entry Overflow in some cases)&lt;br /&gt;
* 13 = Current Player&lt;br /&gt;
* 14 = Foes&lt;br /&gt;
* 15 = Allies&lt;br /&gt;
* 16 = Neutral Players&lt;br /&gt;
* 17 = All Players&lt;br /&gt;
* 18 = Force 1&lt;br /&gt;
* 19 = Force 2&lt;br /&gt;
* 20 = Force 3&lt;br /&gt;
* 21 = Force 4&lt;br /&gt;
* 22 = Unused 1&lt;br /&gt;
* 23 = Unused 2&lt;br /&gt;
* 24 = Unused 3&lt;br /&gt;
* 25 = Unused 4&lt;br /&gt;
* 26 = Non Allied Victory Players&lt;br /&gt;
&lt;br /&gt;
==List of Technology IDs==&lt;br /&gt;
* 0 = Stim Packs&lt;br /&gt;
* 1 = Lockdown&lt;br /&gt;
* 2 = EMP Shockwave&lt;br /&gt;
* 3 = Spider Mines&lt;br /&gt;
* 4 = Scanner Sweep&lt;br /&gt;
* 5 = Siege Mode&lt;br /&gt;
* 6 = Defensive Matrix&lt;br /&gt;
* 7 = Irradiate&lt;br /&gt;
* 8 = Yamato Gun&lt;br /&gt;
* 9 = Cloaking Field&lt;br /&gt;
* 10 = Personnel Cloaking&lt;br /&gt;
* 11 = Burrowing&lt;br /&gt;
* 12 = Infestation&lt;br /&gt;
* 13 = Spawn Broodling&lt;br /&gt;
* 14 = Dark Swarm&lt;br /&gt;
* 15 = Plague&lt;br /&gt;
* 16 = Consume&lt;br /&gt;
* 17 = Ensnare&lt;br /&gt;
* 18 = Parasite&lt;br /&gt;
* 19 = Psionic Storm&lt;br /&gt;
* 20 = Hallucination&lt;br /&gt;
* 21 = Recall&lt;br /&gt;
* 22 = Stasis Field&lt;br /&gt;
* 23 = Archon Warp&lt;br /&gt;
* 24 = Restoration&lt;br /&gt;
* 25 = Disruption Web&lt;br /&gt;
* 26 = Unused 26&lt;br /&gt;
* 27 = Mind Control&lt;br /&gt;
* 28 = Dark Archon Meld&lt;br /&gt;
* 29 = Feedback&lt;br /&gt;
* 30 = Optical Flare&lt;br /&gt;
* 31 = Maelstorm&lt;br /&gt;
* 32 = Lurker Aspect&lt;br /&gt;
* 33 = Unused 33&lt;br /&gt;
* 34 = Healing&lt;br /&gt;
* 35 = Unused 35&lt;br /&gt;
* 36 = Unused 36&lt;br /&gt;
* 37 = Unused 37&lt;br /&gt;
* 38 = Unused 38&lt;br /&gt;
* 39 = Unused 39&lt;br /&gt;
* 40 = Unused 40&lt;br /&gt;
* 41 = Unused 41&lt;br /&gt;
* 42 = Unused 42&lt;br /&gt;
* 43 = Unused 43&lt;br /&gt;
&lt;br /&gt;
==List of Upgrade IDs==&lt;br /&gt;
* 0 = Terran Infantry Armor&lt;br /&gt;
* 1 = Terran Vehicle Plating&lt;br /&gt;
* 2 = Terran Ship Plating&lt;br /&gt;
* 3 = Zerg Carapace&lt;br /&gt;
* 4 = Zerg Flyer Caparace&lt;br /&gt;
* 5 = Protoss Armor&lt;br /&gt;
* 6 = Protoss Plating&lt;br /&gt;
* 7 = Terran Infantry Weapons&lt;br /&gt;
* 8 = Terran Vehicle Weapons&lt;br /&gt;
* 9 = Terran Ship Weapons&lt;br /&gt;
* 10 = Zerg Melee Attacks&lt;br /&gt;
* 11 = Zerg Missile Attacks&lt;br /&gt;
* 12 = Zerg Flyer Attacks&lt;br /&gt;
* 13 = Protoss Ground Weapons&lt;br /&gt;
* 14 = Protoss Air Weapons&lt;br /&gt;
* 15 = Protoss Plasma Shields&lt;br /&gt;
* 16 = U-238 Shells&lt;br /&gt;
* 17 = Ion Thrusters&lt;br /&gt;
* 18 = Burst Lasers (Unused)&lt;br /&gt;
* 19 = Titan Reactor (SV +50)&lt;br /&gt;
* 20 = Ocular Implants&lt;br /&gt;
* 21 = Moebius Reactor (Ghost +50)&lt;br /&gt;
* 22 = Apollo Reactor (Wraith +50)&lt;br /&gt;
* 23 = Colossus Reactor (BC +50)&lt;br /&gt;
* 24 = Ventral Sacs&lt;br /&gt;
* 25 = Antennae&lt;br /&gt;
* 26 = Pneumatized Carapace&lt;br /&gt;
* 27 = Metabolic Boost&lt;br /&gt;
* 28 = Adrenal Glands&lt;br /&gt;
* 29 = Muscular Augments&lt;br /&gt;
* 30 = Grooved Spines&lt;br /&gt;
* 31 = Gamete Meiosis (Queen +50)&lt;br /&gt;
* 32 = Metasynaptic Node (Defiler +50)&lt;br /&gt;
* 33 = Singularity Charge&lt;br /&gt;
* 34 = Leg Enhancements&lt;br /&gt;
* 35 = Scarab Damage &lt;br /&gt;
* 36 = Reaver Capacity &lt;br /&gt;
* 37 = Gravitic Drive&lt;br /&gt;
* 38 = Sensor Array&lt;br /&gt;
* 39 = Gravitic Boosters&lt;br /&gt;
* 40 = Khaydarin Amulet (HT +50)&lt;br /&gt;
* 41 = Apial Sensors&lt;br /&gt;
* 42 = Gravitic Thrusters&lt;br /&gt;
* 43 = Carrier Capacity&lt;br /&gt;
* 44 = Khaydarin Core (Arbiter +50)&lt;br /&gt;
* 45 = Unknown Upgrade45&lt;br /&gt;
* 46 = Unknown Upgrade46&lt;br /&gt;
* 47 = Argus Jewel (Corsair +50)&lt;br /&gt;
* 48 = Unknown Upgrade48&lt;br /&gt;
* 49 = Argus Talisman (DA +50)&lt;br /&gt;
* 50 = Unknown Upgrade50&lt;br /&gt;
* 51 = Caduceus Reactor (Medic +50)&lt;br /&gt;
* 52 = Chitinous Plating&lt;br /&gt;
* 53 = Anabolic Synthesis&lt;br /&gt;
* 54 = Charon Booster&lt;br /&gt;
* 55 = Unknown Upgrade55&lt;br /&gt;
* 56 = Unknown Upgrade56&lt;br /&gt;
* 57 = Unknown Upgrade57&lt;br /&gt;
* 58 = Unknown Upgrade58&lt;br /&gt;
* 59 = Unknown Upgrade59&lt;br /&gt;
* 60 = Unknown Upgrade60&lt;br /&gt;
&lt;br /&gt;
==List of Unit Weapon IDs==&lt;br /&gt;
* 0 = Gauss Rifle (Normal)&lt;br /&gt;
* 1 = Gauss Rifle (Jim Raynor-Marine)&lt;br /&gt;
* 2 = C-10 Concussion Rifle (Normal)&lt;br /&gt;
* 3 = C-10 Concussion Rifle (Sarah Kerrigan)&lt;br /&gt;
* 4 = Fragmentation Grenade (Normal)&lt;br /&gt;
* 5 = Fragmentation Grenade (Jim Raynor-Vulture)&lt;br /&gt;
* 6 = Spider Mines&lt;br /&gt;
* 7 = Twin Autocannons (Normal)&lt;br /&gt;
* 8 = Hellfire Missile Pack (Normal)&lt;br /&gt;
* 9 = Twin Autocannons (Alan Schezar)&lt;br /&gt;
* 10 = Hellfire Missile Pack (Alan Schezar)&lt;br /&gt;
* 11 = Arclite Cannon (Normal)&lt;br /&gt;
* 12 = Arclite Cannon (Edmund Duke)&lt;br /&gt;
* 13 = Fusion Cutter&lt;br /&gt;
* 14 = Fusion Cutter (Harvest)&lt;br /&gt;
* 15 = Gemini Missiles (Normal)&lt;br /&gt;
* 16 = Burst Lasers (Normal)&lt;br /&gt;
* 17 = Gemini Missiles (Tom Kazansky)&lt;br /&gt;
* 18 = Burst Lasers (Tom Kazansky)&lt;br /&gt;
* 19 = ATS Laser Battery (Normal)&lt;br /&gt;
* 20 = ATA Laser Battery (Normal)&lt;br /&gt;
* 21 = ATS Laser Battery (Norad II+Mengsk+DuGalle)&lt;br /&gt;
* 22 = ATA Laser Battery (Norad II+Mengsk+DuGalle)&lt;br /&gt;
* 23 = ATS Laser Battery (Hyperion)&lt;br /&gt;
* 24 = ATA Laser Battery (Hyperion)&lt;br /&gt;
* 25 = Flame Thrower (Normal)&lt;br /&gt;
* 26 = Flame Thrower (Gui Montag)&lt;br /&gt;
* 27 = Arclite Shock Cannon (Normal)&lt;br /&gt;
* 28 = Arclite Shock Cannon (Edmund Duke)&lt;br /&gt;
* 29 = Longbolt Missiles&lt;br /&gt;
* 30 = Yamato Gun&lt;br /&gt;
* 31 = Nuclear Missile&lt;br /&gt;
* 32 = Lockdown&lt;br /&gt;
* 33 = EMP Shockwave&lt;br /&gt;
* 34 = Irradiate&lt;br /&gt;
* 35 = Claws (Normal)&lt;br /&gt;
* 36 = Claws (Devouring One)&lt;br /&gt;
* 37 = Claws (Infested Kerrigan)&lt;br /&gt;
* 38 = Needle Spines (Normal)&lt;br /&gt;
* 39 = Needle Spines (Hunter Killer)&lt;br /&gt;
* 40 = Kaiser Blades (Normal)&lt;br /&gt;
* 41 = Kaiser Blades (Torrasque)&lt;br /&gt;
* 42 = Toxic Spores (Broodling)&lt;br /&gt;
* 43 = Spines&lt;br /&gt;
* 44 = Spines (Harvest)&lt;br /&gt;
* 45 = Acid Spray (Unused)&lt;br /&gt;
* 46 = Acid Spore (Normal)&lt;br /&gt;
* 47 = Acid Spore (Kukulza-Guardian)&lt;br /&gt;
* 48 = Glave Wurm (Normal)&lt;br /&gt;
* 49 = Glave Wurm (Kukulza-Mutalisk)&lt;br /&gt;
* 50 = Venom (Unused-Defiler)&lt;br /&gt;
* 51 = Venom (Unused-Defiler Hero)&lt;br /&gt;
* 52 = Seeker Spores&lt;br /&gt;
* 53 = Subterranean Tentacle&lt;br /&gt;
* 54 = Suicide (Infested Terran)&lt;br /&gt;
* 55 = Suicide (Scourge)&lt;br /&gt;
* 56 = Parasite&lt;br /&gt;
* 57 = Spawn Broodlings&lt;br /&gt;
* 58 = Ensnare&lt;br /&gt;
* 59 = Dark Swarm&lt;br /&gt;
* 60 = Plague&lt;br /&gt;
* 61 = Consume&lt;br /&gt;
* 62 = Particle Beam&lt;br /&gt;
* 63 = Particle Beam (Harvest)&lt;br /&gt;
* 64 = Psi Blades (Normal)&lt;br /&gt;
* 65 = Psi Blades (Fenix-Zealot)&lt;br /&gt;
* 66 = Phase Disruptor (Normal)&lt;br /&gt;
* 67 = Phase Disruptor (Fenix-Dragoon)&lt;br /&gt;
* 68 = Psi Assault (Normal-Unused)&lt;br /&gt;
* 69 = Psi Assault (Tassadar+Aldaris)&lt;br /&gt;
* 70 = Psionic Shockwave (Normal)&lt;br /&gt;
* 71 = Psionic Shockwave (Tassadar/Zeratul Archon)&lt;br /&gt;
* 72 = Unknown72&lt;br /&gt;
* 73 = Dual Photon Blasters (Normal)&lt;br /&gt;
* 74 = Anti-matter Missiles (Normal)&lt;br /&gt;
* 75 = Dual Photon Blasters (Mojo)&lt;br /&gt;
* 76 = Anit-matter Missiles (Mojo)&lt;br /&gt;
* 77 = Phase Disruptor Cannon (Normal)&lt;br /&gt;
* 78 = Phase Disruptor Cannon (Danimoth)&lt;br /&gt;
* 79 = Pulse Cannon&lt;br /&gt;
* 80 = STS Photon Cannon&lt;br /&gt;
* 81 = STA Photon Cannon&lt;br /&gt;
* 82 = Scarab&lt;br /&gt;
* 83 = Stasis Field&lt;br /&gt;
* 84 = Psi Storm&lt;br /&gt;
* 85 = Warp Blades (Zeratul)&lt;br /&gt;
* 86 = Warp Blades (Dark Templar Hero)&lt;br /&gt;
* 87 = Missiles (Unused)&lt;br /&gt;
* 88 = Laser Battery1 (Unused)&lt;br /&gt;
* 89 = Tormentor Missiles (Unused)&lt;br /&gt;
* 90 = Bombs (Unused)&lt;br /&gt;
* 91 = Raider Gun (Unused)&lt;br /&gt;
* 92 = Laser Battery2 (Unused)&lt;br /&gt;
* 93 = Laser Battery3 (Unused)&lt;br /&gt;
* 94 = Dual Photon Blasters (Unused)&lt;br /&gt;
* 95 = Flechette Grenade (Unused)&lt;br /&gt;
* 96 = Twin Autocannons (Floor Trap)&lt;br /&gt;
* 97 = Hellfire Missile Pack (Wall Trap)&lt;br /&gt;
* 98 = Flame Thrower (Wall Trap)&lt;br /&gt;
* 99 = Hellfire Missile Pack (Floor Trap)&lt;br /&gt;
* 100 = Neutron Flare&lt;br /&gt;
* 101 = Disruption Web&lt;br /&gt;
* 102 = Restoration&lt;br /&gt;
* 103 = Halo Rockets&lt;br /&gt;
* 104 = Corrosive Acid&lt;br /&gt;
* 105 = Mind Control&lt;br /&gt;
* 106 = Feedback&lt;br /&gt;
* 107 = Optical Flare&lt;br /&gt;
* 108 = Maelstrom&lt;br /&gt;
* 109 = Subterranean Spines&lt;br /&gt;
* 110 = Gauss Rifle0 (Unused)&lt;br /&gt;
* 111 = Warp Blades (Normal)&lt;br /&gt;
* 112 = C-10 Concussion Rifle (Samir Duran)&lt;br /&gt;
* 113 = C-10 Concussion Rifle (Infested Duran)&lt;br /&gt;
* 114 = Dual Photon Blasters (Artanis)&lt;br /&gt;
* 115 = Anti-matter Missiles (Artanis)&lt;br /&gt;
* 116 = C-10 Concussion Rifle (Alexei Stukov)&lt;br /&gt;
* 117 = Gauss Rifle1 (Unused)&lt;br /&gt;
* 118 = Gauss Rifle2 (Unused)&lt;br /&gt;
* 119 = Gauss Rifle3 (Unused)&lt;br /&gt;
* 120 = Gauss Rifle4 (Unused)&lt;br /&gt;
* 121 = Gauss Rifle5 (Unused)&lt;br /&gt;
* 122 = Gauss Rifle6 (Unused)&lt;br /&gt;
* 123 = Gauss Rifle7 (Unused)&lt;br /&gt;
* 124 = Gauss Rifle8 (Unused)&lt;br /&gt;
* 125 = Gauss Rifle9 (Unused)&lt;br /&gt;
* 126 = Gauss Rifle10 (Unused)&lt;br /&gt;
* 127 = Gauss Rifle11 (Unused)&lt;br /&gt;
* 128 = Gauss Rifle12 (Unused)&lt;br /&gt;
* 129 = Gauss Rifle13 (Unused)&lt;br /&gt;
* 130 = None&lt;br /&gt;
&lt;br /&gt;
==Complete Modifier List==&lt;br /&gt;
* 0 = Condition: &amp;gt;= (greater than or equal to)&lt;br /&gt;
* 1 = Condition: &amp;lt;= (less than or equal to)&lt;br /&gt;
* 2 = Condition: == TRUE (Is True)&lt;br /&gt;
* 3 = Condition: == FALSE (Is False)&lt;br /&gt;
* 4 = Action: = TRUE (Set to True)&lt;br /&gt;
* 5 = Action: = FALSE (Set to False)&lt;br /&gt;
* 6 = Action: NOT (toggle)&lt;br /&gt;
* 7 = Action: = (Set to)&lt;br /&gt;
* 8 = Action: += (Add)&lt;br /&gt;
* 9 = Action: -= (Subtract)&lt;br /&gt;
* 10 = Condition: == (Exactly)&lt;br /&gt;
* 11 = Action: Randomize&lt;br /&gt;
&lt;br /&gt;
[[Category:StarCraft]]&lt;br /&gt;
[[Category:Reference]]&lt;/div&gt;</summary>
		<author><name>FaRTy1billion</name></author>	</entry>

	<entry>
		<id>https://staredit.net/wiki/index.php?title=Scenario.chk&amp;diff=659</id>
		<title>Scenario.chk</title>
		<link rel="alternate" type="text/html" href="https://staredit.net/wiki/index.php?title=Scenario.chk&amp;diff=659"/>
				<updated>2022-07-09T23:01:35Z</updated>
		
		<summary type="html">&lt;p&gt;FaRTy1billion: /* &amp;quot;CRGB&amp;quot; - Remastered Player Colors */ Updated CRGB type 3 definition&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The CHK file is a very dense file found inside the SCM or SCX file (as &amp;quot;staredit\scenario.chk&amp;quot;), which is just a renamed MPQ archive.&lt;br /&gt;
&lt;br /&gt;
In this article, some shorthand will be used for datatypes:&lt;br /&gt;
* '''u8''' for an unsigned byte&lt;br /&gt;
* '''u16''' for an unsigned short (2-byte integer)&lt;br /&gt;
* '''u32''' for an unsigned int (4-byte integer)&lt;br /&gt;
* '''uT[''a'']''' for an array of datatype '''T''' (8, 16, 32) with '''''a''''' number of elements&lt;br /&gt;
* '''uT[''a''][''b'']''' for a two-dimensional array of datatype '''T''', where each element of '''T[''a'']''' will be an array of size '''''b'''''&lt;br /&gt;
&lt;br /&gt;
=Sections=&lt;br /&gt;
The CHK is split into several named chunks (hence the file extension, an abbreviation of ''CHunK'').&lt;br /&gt;
&lt;br /&gt;
Each section begins with an 8-byte header:&lt;br /&gt;
* '''u32''' Name - A 4-byte string uniquely identifying that chunk's purpose.&lt;br /&gt;
* '''u32''' Size - The size, in bytes, of the chunk (not including this header)&lt;br /&gt;
Followed by as many bytes as 'Size', in a format described below.&lt;br /&gt;
&lt;br /&gt;
Some things to keep in mind about the CHK section:&lt;br /&gt;
* Invalid sections can exist and will be ignored. While Size is unsigned, it can safely be a negative value to read a chunk earlier in the file. This allows for &amp;quot;section stacking&amp;quot;, allowing smaller sections to be placed inside of larger ones or duplicate triggers or units to take less space in the file.&lt;br /&gt;
* All sections will marked &amp;quot;Not required.&amp;quot; are never read by StarCraft and can safely be omitted. However they may or may not be read by StarEdit, and may cause the map to be unreadable in an editor.&lt;br /&gt;
* Note &amp;quot;Hybrid&amp;quot;, or &amp;quot;Enhanced&amp;quot;, maps were introduced in 1.04. They are supported both by Original StarCraft and Brood War and usually contain sections for both types (e.g., UPGS and UPGx, TECS and TECx), but both sections aren't necessarily read.&lt;br /&gt;
* Duplicate sections will overwrite previously defined section data, except where noted. Note this only applies to those section that pass the specified &amp;quot;validation&amp;quot; parameters, as any section that does not successfully validate will be ignored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TYPE&amp;quot; - Map Type==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the type of scenario.&lt;br /&gt;
* '''u32''': Specifies the type of scenario:&lt;br /&gt;
** '''0x53574152''' or '''RAWS''' - 1.04 StarCraft and above (&amp;quot;hybrid&amp;quot;)&lt;br /&gt;
** '''0x42574152''' or '''RAWB''' - Brood War&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;VER &amp;quot; - Format Version==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section identifies the file format version.&lt;br /&gt;
* '''u16''': File format version:&lt;br /&gt;
** '''59''' - Starcraft 1.00 (original retail release)&lt;br /&gt;
** '''63''' - Starcraft 1.04 ''(hybrid)''&lt;br /&gt;
** '''64''' - Starcraft Remastered (1.21) ''(hybrid)''&lt;br /&gt;
** '''205''' - Brood War 1.00 ''(1.04)''&lt;br /&gt;
** '''206''' - Starcraft Remastered (1.21) ''(broodwar)''&lt;br /&gt;
This is the only version code section to actually be read by StarCraft (of TYPE, VER , IVER, and IVE2). Any other value is invalid in retail StarCraft and is usually a beta version.&lt;br /&gt;
&lt;br /&gt;
Other unsupported versions include:&lt;br /&gt;
* '''0-19''' - ''Warcraft II versions (.PUD)''&lt;br /&gt;
* '''47''' - ''Starcraft Beta''&lt;br /&gt;
* '''61''' - Brood War internal (map version 61)&lt;br /&gt;
* '''75''' - Brood War internal (map version 75)&lt;br /&gt;
* '''201''' - Brood War internal (map version 201)&lt;br /&gt;
* '''203''' - Brood War internal (map version 203)&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IVER&amp;quot; - Map Version==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section &amp;quot;additionally identifies&amp;quot; the map version.&lt;br /&gt;
* '''u16''': &amp;quot;Additional file format version:&amp;quot;&lt;br /&gt;
** '''9''' - beta/obsolete versions&lt;br /&gt;
** '''10''' - current versions&lt;br /&gt;
When saving as expansion this section gets removed entirely. Contrary to popular belief, it doesn't get &amp;quot;replaced&amp;quot; by IVE2 in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IVE2&amp;quot; - Map Version==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section &amp;quot;additionally identifies&amp;quot; the map version.&lt;br /&gt;
* '''u16''': &amp;quot;Additional file format version:&amp;quot;&lt;br /&gt;
** '''11''' - 1.04 StarCraft and above (&amp;quot;hybrid&amp;quot;) or Brood War.&lt;br /&gt;
This section does not &amp;quot;replace&amp;quot; IVER in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;VCOD&amp;quot; - Verification Code==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be equal to size of the VCOD data in the EXE resource. Must result in valid checksum.''&lt;br /&gt;
&lt;br /&gt;
This section has a verification code to make sure this is actually a CHK file.&lt;br /&gt;
&lt;br /&gt;
* '''u32[256]''': Seed values.&lt;br /&gt;
* '''u8[16]''': Operation codes to produce the resulting hash:&lt;br /&gt;
** '''00''' - XOR's the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''01''' - Adds to the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''02''' - Subtracts from the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''03''' - XOR's the current hash with the VCOD table at index OWNR, SIDE, FORC, and 0&lt;br /&gt;
** '''04''' - same as 0x03&lt;br /&gt;
** '''05''' - same as 0x03&lt;br /&gt;
** '''06''' - Complex function consisting of ORs and shifts&lt;br /&gt;
** '''07''' - Inverted version of 0x06, switching direction of all shifts&lt;br /&gt;
** '''08+''' - Do nothing&lt;br /&gt;
Opcodes and seeds do not have to match those in EXE resource, as long as the same value is produced.&amp;lt;br&amp;gt;&lt;br /&gt;
The only indexes in the seed table that are referenced are those that correspond individual values of [[#&amp;quot;OWNR&amp;quot; - StarCraft Player Types|OWNR]], [[#&amp;quot;SIDE&amp;quot; - Player Races|SIDE]], [[#&amp;quot;FORC&amp;quot; - Force Settings|FORC]] player assignments, and index 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IOWN&amp;quot; - StarEdit Player Types==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the owner of each player.&lt;br /&gt;
* '''u8[12]''': One byte for each player, specifies the owner of the player:&lt;br /&gt;
** '''00''' - Inactive&lt;br /&gt;
** ''01'' - Computer (game)&lt;br /&gt;
** ''02'' - Occupied by Human Player&lt;br /&gt;
** '''03''' - Rescue Passive&lt;br /&gt;
** '''04''' - Unused&lt;br /&gt;
** '''05''' - Computer&lt;br /&gt;
** '''06''' - Human (Open Slot)&lt;br /&gt;
** '''07''' - Neutral&lt;br /&gt;
** ''08'' - Closed slot&lt;br /&gt;
This section is separate from OWNR as a staredit value. Staredit does not display &amp;quot;inactive&amp;quot; as a valid option. Italicized settings denote invalid map options, which may involve a buffer overflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;OWNR&amp;quot; - StarCraft Player Types==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 12 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section designates the controller of a particular player. It is exactly the same as the &amp;quot;IOWN&amp;quot; section, except there is an additional value, 0x00 for Inactive.&lt;br /&gt;
* '''u8[12]''': One byte for each player, specifies the owner of the player:&lt;br /&gt;
** '''00''' - Inactive&lt;br /&gt;
** ''01'' - Computer (game)&lt;br /&gt;
** ''02'' - Occupied by Human Player&lt;br /&gt;
** '''03''' - Rescue Passive&lt;br /&gt;
** '''04''' - Unused&lt;br /&gt;
** '''05''' - Computer&lt;br /&gt;
** '''06''' - Human (Open Slot)&lt;br /&gt;
** '''07''' - Neutral&lt;br /&gt;
** ''08'' - Closed slot&lt;br /&gt;
Italicized settings denote invalid map options, which may involve a buffer overflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;ERA &amp;quot; - Tileset==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section indicates the tileset of the scenario.&lt;br /&gt;
* '''u16''': Designates tileset:&lt;br /&gt;
** '''00''' - Badlands&lt;br /&gt;
** '''01''' - Space Platform&lt;br /&gt;
** '''02''' - Installation&lt;br /&gt;
** '''03''' - Ashworld&lt;br /&gt;
** '''04''' - Jungle&lt;br /&gt;
** '''05''' - Desert&lt;br /&gt;
** '''06''' - Arctic&lt;br /&gt;
** '''07''' - Twilight&lt;br /&gt;
StarCraft masks the tileset indicator's bit value, so bits after the third place (anything after the value &amp;quot;7&amp;quot;) are removed. Thus, 9 (1001 in binary) is interpreted as 1 (0001), 10 (1010) as 2 (0010), etc.&amp;lt;br&amp;gt;&lt;br /&gt;
Desert, Arctic, and Twilight are Brood War-only tilesets.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;DIM &amp;quot; - Map Dimensions==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains the dimensions of the map.&lt;br /&gt;
* '''u16''': Width of the map&lt;br /&gt;
* '''u16''': Height of the map&lt;br /&gt;
The Width/Height of the map is measured in the number of square 32x32p tiles.&amp;lt;br&amp;gt;&lt;br /&gt;
Standard Dimensions are 64, 96, 128, 192, and 256.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SIDE&amp;quot; - Player Races==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 12 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains the species/race of each player.&lt;br /&gt;
* '''u8[12]''': 1 byte per player the species of that player:&lt;br /&gt;
** '''00''' - Zerg&lt;br /&gt;
** '''01''' - Terran&lt;br /&gt;
** '''02''' - Protoss&lt;br /&gt;
** ''03'' - Invalid (Independent), shown as &amp;quot;Unknown&amp;quot; in SC:R lobby&lt;br /&gt;
** ''04'' - Invalid (Neutral), shown as &amp;quot;Unknown&amp;quot;&lt;br /&gt;
** '''05''' - User Select&lt;br /&gt;
** '''06''' - Random (Forced; Acts as a selected race)&lt;br /&gt;
** ''07'' - Inactive, shown as locked &amp;quot;Select Race&amp;quot; option in SC:R lobby&lt;br /&gt;
Italicized settings denote invalid map options. Note Players 9-11 are defaultly Inactive and Player 12 is defaultly Neutral.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MTXM&amp;quot; - StarCraft Terrain==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be less than or equal to 131072 (0x20000) bytes (256 * 256 * 2).''&lt;br /&gt;
&lt;br /&gt;
Terrain section that contains a map of the level's appearance. StarEdit disregards this section and instead uses [[#&amp;quot;TILE&amp;quot; - StarEdit Terrain|TILE]]; it is only used in Starcraft.&lt;br /&gt;
* '''u16[map width * height]''': one integer for each tile.&lt;br /&gt;
Notes about MTXM:&lt;br /&gt;
* The Width/Height of the map is measured in the number of square 32x32p tiles.&lt;br /&gt;
* Tiles in this section are listed from left to right, top to bottom.&lt;br /&gt;
* The values for each integer are their respective &amp;quot;MegaTile&amp;quot; values in the scenario's tileset. If the size of this section is greater than width*height*2, the data following is ignored. If the size of this section is less, the resulting tiles that have not been defined will be null tiles.&lt;br /&gt;
* This section includes doodads as terrain; TILE, which is otherwise identical, doesn't. Out of the terrain sections (TILE, ISOM, and MTXM), SC only reads MTXM for the sake of not having to generate this data on-the-fly: it contains the exact representation of the level's appearance, including doodads. TILE, on the other hand, is directly tied via a tile lookup function to ISOM, and exists for the sake of not having to generate tiles from ISOM on-the-fly in StarEdit.&lt;br /&gt;
* If MTXM section is smaller than (map width*height), then the remaining tiles will be filled with null tiles or tiles specified by previous MTXM sections.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PUNI&amp;quot; - Player Unit Restrictions==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 5700 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains player unit restrictions: it indicates whether the player can or cannot build a particular unit.&lt;br /&gt;
* '''u8[228][12]''': 1 byte for each unit in order of its unit id, then each player, for player availability:&lt;br /&gt;
** '''00''' - That unit is not available for production if the player has 'override defaults' on&lt;br /&gt;
** '''01''' - That unit is available for production if the player has 'override defaults' on&lt;br /&gt;
* '''u8[228]''': 1 byte for each unit in order of it's unit id, for global availability defaults (for all players):&lt;br /&gt;
** '''00''' - That unit is not available for production&lt;br /&gt;
** '''01''' - That unit is available for production&lt;br /&gt;
* '''u8[228][12]''': 1 byte for each unit in order of its unit id, then each player, indicating whether a player uses the global availability defaults.&lt;br /&gt;
** '''00''' - Player overrides defaults for this unit&lt;br /&gt;
** '''01''' - Player uses defaults for this unit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGR&amp;quot; - Upgrade Restrictions==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1748 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;PUPx&amp;quot; - BW Upgrade Restrictions|&amp;quot;PUPx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains player upgrade restrictions: it indicates the starting/maximum levels at/to which a player can perform a particular upgrade.&lt;br /&gt;
* '''u8[46][12]''': 1 byte for the maximum level a player can upgrade to, in order of its upgrade id, then each player&lt;br /&gt;
* '''u8[46][12]''': 1 byte for the level of an upgrade a player starts off with, in order of its upgrade id, then each player&lt;br /&gt;
* '''u8[46]''': 1 byte for the global default maximum level of each upgrade, in order of its upgrade id.&lt;br /&gt;
* '''u8[46]''': 1 byte for the global default starting level of each upgrade, in order of its upgrade id.&lt;br /&gt;
* '''u8[46][12]''': 1 byte for each upgrade in order of its upgrade id, then each player, indicating whether a player uses the global upgrade defaults:&lt;br /&gt;
** '''00''' - Player does not use global upgrade defaults for this upgrade&lt;br /&gt;
** '''01''' - Player uses upgrade defaults for this upgrade&lt;br /&gt;
See [[#List of Upgrade IDs]].&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PTEC&amp;quot; - Tech Restrictions==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 912 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;PTEx&amp;quot; - BW Tech Restrictions|&amp;quot;PTEx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains player technology availability restrictions: it indicates whether a player starts off with a particular technology or can research a particular technology.&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology id, then each player, for player availability:&lt;br /&gt;
** '''00''' - Technology is not available for a player&lt;br /&gt;
** '''01''' - Technology is available for a player&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology id, then each player, for &amp;quot;already researched&amp;quot; status:&lt;br /&gt;
** '''00''' - Technology is not already researched&lt;br /&gt;
** '''01''' - Technology is already researched&lt;br /&gt;
* '''u8[24]''': 1 byte for each technology for global availability defaults:&lt;br /&gt;
** '''00''' - Technology is not available by default&lt;br /&gt;
** '''01''' - Technology is available by default&lt;br /&gt;
* '''u8[24]''': 1 byte for each technology for global &amp;quot;already researched&amp;quot; defaults:&lt;br /&gt;
** '''00''' - Technology is not already researched by default&lt;br /&gt;
** '''01''' - Technology is already researched by default&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology in order of its technology id, then each player, indicating whether a player uses the global defaults:&lt;br /&gt;
** '''00''' - Technology overrides defaults for player&lt;br /&gt;
** '''01''' - Technology uses default settings for player&lt;br /&gt;
See [[#List of Technology IDs]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIT&amp;quot; - Placed Units==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 36 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the pre-placed units on the map and their properties. Each unit on the map gets the following structure:&lt;br /&gt;
* '''u32''': The unit's class instance (sort of a &amp;quot;serial number&amp;quot;)&lt;br /&gt;
* U16''': X coordinate of unit&lt;br /&gt;
* U16''': Y coordinate of unit&lt;br /&gt;
* '''u16''': Unit ID&lt;br /&gt;
* '''u16''': Type of relation to another building (i.e. add-on, nydus link)&lt;br /&gt;
** '''Bit 9''' - Nydus Link&lt;br /&gt;
** '''Bit 10''' - Addon Link&lt;br /&gt;
* '''u16''': Flags of special properties which can be applied to the unit and are valid:&lt;br /&gt;
** '''Bit 0''' - Cloak is valid&lt;br /&gt;
** '''Bit 1''' - Burrow is valid&lt;br /&gt;
** '''Bit 2''' - In transit is valid&lt;br /&gt;
** '''Bit 3''' - Hallucinated is valid&lt;br /&gt;
** '''Bit 4''' - Invincible is valid&lt;br /&gt;
** '''Bit 5-15''' - Unused&lt;br /&gt;
* '''u16''': Out of the elements of the unit data, the properties which can be changed by the map maker:&lt;br /&gt;
** '''Bit 0''' - Owner player is valid (the unit is not a critter, start location, etc.; not a neutral unit)&lt;br /&gt;
** '''Bit 1''' - HP is valid&lt;br /&gt;
** '''Bit 2''' - Shields is valid&lt;br /&gt;
** '''Bit 3''' - Energy is valid (unit is a wraith, etc.)&lt;br /&gt;
** '''Bit 4''' - Resource amount is valid (unit is a mineral patch, vespene geyser, etc.)&lt;br /&gt;
** '''Bit 5''' - Amount in hangar is valid (unit is a reaver, carrier, etc.)&lt;br /&gt;
** '''Bit 6-15''' - Unused&lt;br /&gt;
* '''u8''': Player number of owner (0-based)&lt;br /&gt;
* '''u8''': Hit points % (1-100)&lt;br /&gt;
* '''u8''': Shield points % (1-100)&lt;br /&gt;
* '''u8''': Energy points % (1-100)&lt;br /&gt;
* '''u32''': Resource amount&lt;br /&gt;
* '''u16''': Number of units in hangar&lt;br /&gt;
* '''u16''': Unit state flags&lt;br /&gt;
** '''Bit 0''' - Unit is cloaked&lt;br /&gt;
** '''Bit 1''' - Unit is burrowed&lt;br /&gt;
** '''Bit 2''' - Building is in transit&lt;br /&gt;
** '''Bit 3''' - Unit is hallucinated&lt;br /&gt;
** '''Bit 4''' - Unit is invincible&lt;br /&gt;
** '''Bit 5-15''' - Unused&lt;br /&gt;
* '''u32''': Unused&lt;br /&gt;
* '''u32''': Class instance of the unit to which this unit is related to (i.e. via an add-on, nydus link, etc.). It is &amp;quot;0&amp;quot; if the unit is not linked to any other unit.&lt;br /&gt;
Notes about UNIT:&lt;br /&gt;
* The X/Y coordinates are the center of the sprite of the unit (in pixels).&lt;br /&gt;
* Please edit if you could confirm the bit values to be correct/if you know more bit values.&lt;br /&gt;
* Default values will apply if bit values are unchecked. Defaults: 100% HP, 100% SP, 100% EP, 0 resources, 0 hangar count.&lt;br /&gt;
* This section can be split. Additional UNIT sections will add more units.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;ISOM&amp;quot; - Isometric Terrain==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section is required to place isometric terrain on the map. It provides data about the nature of the isometrical &amp;quot;diamonds&amp;quot; (the editing mode of StarEdit).&lt;br /&gt;
* '''u16[ (width / 2 + 1) * (height + 1) * 4 ]''': 4 integers for each map rectangle tile (plus one extra tile to the right and bottom of the map), as per the RECT structure. Each rectangle border (left, top, right, bottom) is assigned an &amp;quot;ISOM value.&amp;quot; These form the &amp;quot;diamond&amp;quot; pattern of the map, and each rectangle thus gets two ISOM values associated with it. StarEdit somehow hashes these (the exact algorithm is unknown) and thus produces the tile index of the rectangle (which it stores in TILE for reasons of efficiency). The index of the rectangle's right tile is that of its left tile + 16.&lt;br /&gt;
This section is the only truly unknown section of the .chk format. If you're an ex-Blizzard employee or SI, please edit this section. If you have additional research, post on the forums about it and/or edit this section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TILE&amp;quot; - StarEdit Terrain==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section will only be different from the [[#&amp;quot;MTXM&amp;quot; - StarCraft Terrain|MTXM]] section in tiles where doodads are present.&lt;br /&gt;
* '''u16[ map width * height ]''': 1 integer for each map tile. Moves horizontally across the map.&lt;br /&gt;
The values in TILE are normally directly generated from the ISOM section (see &amp;quot;'ISOM' section&amp;quot; above), and thus do not match that of MTXM on doodad tiles.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;DD2 &amp;quot; - StarEdit Sprites (Doodads)==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section contains the doodad map of the level. There are several parts to doodads. The graphical portion is stored in the [[#&amp;quot;MTXM&amp;quot; - StarCraft Terrain|MTXM]] section. The second part of the doodad is stored in this section. This section is only used by the map editor.&lt;br /&gt;
&lt;br /&gt;
Each doodad in the map gets the following structure:&lt;br /&gt;
* '''u16''': Number of the doodad. Size of the doodad is dependent on this. Doodads are different for each tileset.&lt;br /&gt;
* '''u16''': X coordinate of the doodad unit&lt;br /&gt;
* '''u16''': Y coordinate of the doodad unit&lt;br /&gt;
* '''u8''': Player number that owns the doodad&lt;br /&gt;
* '''u8''': Enabled flag&lt;br /&gt;
** '''00''' - Doodad is enabled (trap can attack, door is closed, etc)&lt;br /&gt;
** '''01''' - Doodad is disabled&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;THG2&amp;quot; - StarCraft Sprites==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 10 bytes.''&lt;br /&gt;
&lt;br /&gt;
The map editor only writes to this section. Starcraft uses this section.&lt;br /&gt;
&lt;br /&gt;
Sprites, usually on doodads, get the following structure.&lt;br /&gt;
* '''u16''': Unit/Sprite number of the sprite&lt;br /&gt;
* '''u16''': X coordinate of the doodad unit&lt;br /&gt;
* '''u16''': Y coordinate of the doodad unit&lt;br /&gt;
* '''u8''': Player number that owns the doodad&lt;br /&gt;
* '''u8''': Unused&lt;br /&gt;
* '''u16''': Flags&lt;br /&gt;
** '''Bit 0-11''' - Unused&lt;br /&gt;
** '''Bit 12''' - Draw as sprite (Determines if it is a sprite or a unit sprite)&lt;br /&gt;
** '''Bit 13''' - Unused&lt;br /&gt;
** '''Bit 14''' - Unused&lt;br /&gt;
** '''Bit 15''' - Disabled (Only valid if Draw as sprite is unchecked, disables the unit)&lt;br /&gt;
This section can be split. Additional THG2 sections will add more sprites.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MASK&amp;quot; - Fog of War Layer==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: This section will always validate.''&lt;br /&gt;
&lt;br /&gt;
This section contains the data on fog of war for each player. This is whether at the start of the game that levels of black space that is available.&lt;br /&gt;
* '''u8[ map width * height ]''': One byte for each map tile. The bits indicate for each player the fog of war.&lt;br /&gt;
** '''Bit 0''' - Player 1's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 1''' - Player 2's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 2''' - Player 3's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 3''' - Player 4's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 4''' - Player 5's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 5''' - Player 6's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 6''' - Player 7's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 7''' - Player 8's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
Any size greater than width*height will be ignored. Any size less will default missing tiles to 0xFF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;STR &amp;quot; - String Data==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be at least 1 byte.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the strings in the map.&lt;br /&gt;
* '''u16''': Number of strings in the section (Default''': 1024)&lt;br /&gt;
* '''u16[Number of strings]''': 1 integer for each string specifying the offset (the spot where the string starts in the section from the start of it).&lt;br /&gt;
* '''Strings''': After the offsets, this is where every string in the map goes, one after another. Each one is terminated by a null character.&lt;br /&gt;
This section can contain more or less then 1024 string offsests and will work in Starcraft.&amp;lt;br&amp;gt;&lt;br /&gt;
By default the first byte in '''Strings''' is a NUL character, and all unused offsets in the STR section point to this NUL character.&lt;br /&gt;
Note that STR sections can be stacked in a smiliar fashion as MTXM. The exact mechanisms of this are uncertain.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPRP&amp;quot; - CUWP Slots==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1280 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section is used whenever the create units with properties trigger is used. Since a slot has to be assigned to the action, this is where each slot is designated.&lt;br /&gt;
&lt;br /&gt;
There are 64 of the following structures regardless of how many are used and it cannot exceed 64.&lt;br /&gt;
* '''u16''': Flag of which special properties can be applied to unit, and are valid.&lt;br /&gt;
** '''Bit 0''' - Cloak bit is valid&lt;br /&gt;
** '''Bit 1''' - Burrowed bit is valid&lt;br /&gt;
** '''Bit 2''' - In transit bit is valid&lt;br /&gt;
** '''Bit 3''' - Hallucinated bit is valid&lt;br /&gt;
** '''Bit 4''' - Invincible bit is valid&lt;br /&gt;
** '''Bit 5-15''' - Unknown/unused&lt;br /&gt;
* '''u16''': Which elements of the unit data are valid, which properties can be changed by the map maker.&lt;br /&gt;
** '''Bit 0''' - Owner player is valid (unit is not neutral)&lt;br /&gt;
** '''Bit 1''' - HP is valid&lt;br /&gt;
** '''Bit 2''' - Shields is valid&lt;br /&gt;
** '''Bit 3''' - Energy is valid&lt;br /&gt;
** '''Bit 4''' - Resource amount is valid (unit is a resource)&lt;br /&gt;
** '''Bit 5''' - Amount in hanger is valid&lt;br /&gt;
** '''Bit 6''' - Unknown/unused&lt;br /&gt;
* '''u8''': Player number that owns unit. Will always be NULL in this section (0)&lt;br /&gt;
* '''u8''': Hit point % (1-100)&lt;br /&gt;
* '''u8''': Shield point % (1-100)&lt;br /&gt;
* '''u8''': Energy point % (1-100)&lt;br /&gt;
* '''u32''': Resource amount (for resources only)&lt;br /&gt;
* '''u16''': # of units in hangar&lt;br /&gt;
* '''u16''': Flags&lt;br /&gt;
** '''Bit 0''' - Unit is cloaked&lt;br /&gt;
** '''Bit 1''' - Unit is burrowed&lt;br /&gt;
** '''Bit 2''' - Building is in transit&lt;br /&gt;
** '''Bit 3''' - Unit is hallucinated&lt;br /&gt;
** '''Bit 4''' - Unit is invincible&lt;br /&gt;
** '''Bit 5-15''' - Unknown/unused&lt;br /&gt;
* '''u32''': Unknown/unused. Padding?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPUS&amp;quot; - CUWP Slots Used==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section goes along with the &amp;quot;UPRP&amp;quot; section. This section just indicates which of the 64 unit properties slot are used.&lt;br /&gt;
* '''u8[64]''': 1 byte for each trigger unit properties slot&lt;br /&gt;
** '''00''' - Properties slot is unused&lt;br /&gt;
** '''01''' - Properties slot is used&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MRGN&amp;quot; - Locations==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: 1280 bytes for retail, 5100 bytes for Hybrid and Broodwar.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the locations that the map uses. In a vanilla map, this section contains 64 locations. In a Hybrid or Brood War map, this section will expand to contain 255 locations.&lt;br /&gt;
&lt;br /&gt;
Each location gets one of the following location entries. The 'Anywhere' location, is ALWAYS location 64.&lt;br /&gt;
* '''u32''': Left (X1) coordinate of location, in pixels (usually 32 pt grid aligned)&lt;br /&gt;
* '''u32''': Top (Y1) coordinate of location, in pixels&lt;br /&gt;
* '''u32''': Right (X2) coordinate of location, in pixels&lt;br /&gt;
* '''u32''': Bottom (Y2) coordinate of location, in pixels&lt;br /&gt;
* '''u16''': String number of the name of this location&lt;br /&gt;
* '''u16''': Location elevation flags. If an elevation is disabled in the location, it's bit will be on (1)&lt;br /&gt;
** '''Bit 0''' - Low elevation&lt;br /&gt;
** '''Bit 1''' - Medium elevation&lt;br /&gt;
** '''Bit 2''' - High elevation&lt;br /&gt;
** '''Bit 3''' - Low air&lt;br /&gt;
** '''Bit 4''' - Medium air&lt;br /&gt;
** '''Bit 5''' - High air&lt;br /&gt;
** '''Bit 6-15''' - Unused&lt;br /&gt;
Note that in typical locations Right is always larger than Left and Bottom is always larger than Top. However, you can reverse one or both of these for [[Inverted Locations]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TRIG&amp;quot; - Triggers==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 2400 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the triggers in the map. This along with [[#&amp;quot;MBRF&amp;quot; - Mission Briefings|MBRF]] is the most complicated section in the entire scenario.chk file as there is a lot of data packed into too little of a space. Refer to the appendix at the bottom of this page for more information.&lt;br /&gt;
For easy reference, since each trigger contains 2400 bytes, the amount of triggers can be gotten by taking the section length and dividing by 2400.&lt;br /&gt;
Every single trigger in the map will have the following format:&lt;br /&gt;
* 16 Conditions (20 byte struct)&amp;lt;br&amp;gt; Every trigger has 16 of the following format, even if only one condition is used. See the appendix for information on which items are used for what conditions.&lt;br /&gt;
** '''u32''': Location number for the condition (1 based -- 0 refers to No Location), EUD Bitmask for a Death condition if the MaskFlag is set to &amp;quot;SC&amp;quot;&lt;br /&gt;
** '''u32''': [[#List of Players/Group IDs|Group]] that the condition applies to&lt;br /&gt;
** '''u32''': Qualified number (how many/resource amount)&lt;br /&gt;
** '''u16''': [[#Trigger Unit Types|Unit ID]] condition applies to&lt;br /&gt;
** '''u8''': [[#Numeric Comparisons|Numeric comparison]], [[#Switch States|switch state]]&lt;br /&gt;
** '''u8''': [[#Trigger Conditions List|Condition byte]]&lt;br /&gt;
** '''u8''': [[#Resource Types|Resource type]], [[#Score Types|score type]], Switch number (0-based)&lt;br /&gt;
** '''u8''': Flags&lt;br /&gt;
*** '''Bit 0''' - Unknown/unused&lt;br /&gt;
*** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled/ignored&lt;br /&gt;
*** '''Bit 2''' - Always display flag.&lt;br /&gt;
*** '''Bit 3''' - Unit properties is used. ('''Note:''' This is used in [[TRG|*.trg]] files)&lt;br /&gt;
*** '''Bit 4''' - Unit type is used. Cleared in &amp;quot;Offset + Mask&amp;quot; EUD conditions. May not be necessary otherwise?&lt;br /&gt;
*** '''Bit 5-7''' - Unknown/unused&lt;br /&gt;
** '''u16''': MaskFlag: set to &amp;quot;SC&amp;quot; (0x53, 0x43) when using the bitmask for EUDs, 0 otherwise&lt;br /&gt;
* 64 Actions (32 byte struct)&amp;lt;br&amp;gt; Immediately following the 16 conditions, there are 64 actions. There will always be 64 of the following structure, even if some of them are unused.&lt;br /&gt;
** '''u32''': Location - source location in &amp;quot;Order&amp;quot; and &amp;quot;Move Unit&amp;quot;, dest location in &amp;quot;Move Location&amp;quot; (1 based -- 0 refers to No Location), EUD Bitmask for a Death action if the MaskFlag is set to &amp;quot;SC&amp;quot;&lt;br /&gt;
** '''u32''': String number for trigger text (0 means no string)&lt;br /&gt;
** '''u32''': WAV string number (0 means no string)&lt;br /&gt;
** '''u32''': Seconds/milliseconds of time&lt;br /&gt;
** '''u32''': First (or only) [[#List of Players/Group IDs|Group/Player]] affected.&lt;br /&gt;
** '''u32''': Second group affected, secondary location (1-based), CUWP #, number, AI script (4-byte string), switch (0-based #)&lt;br /&gt;
** '''u16''': [[#Trigger Unit Types|Unit type]], [[#Score Types|score type]], [[#Resource Types|resource type]], [[#Alliance Statuses|alliance status]]&lt;br /&gt;
** '''u8''': [[#Trigger Actions List|Action byte]]&lt;br /&gt;
** '''u8''': Number of units (0 means All Units), [[#Action States|action state]], [[#Unit Orders|unit order]], [[#Number Modifiers|number modifier]]&lt;br /&gt;
** '''u8''': Flags&lt;br /&gt;
*** '''Bit 0''' - Ignore a wait/transmission once.&lt;br /&gt;
*** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled.&lt;br /&gt;
*** '''Bit 2''' - Always display flag - when not set: if the user has turned off subtitles (see sound options) the text will not display, when set: text will always display&lt;br /&gt;
*** '''Bit 3''' - Unit properties is used. Staredit uses this for *.trg files.&lt;br /&gt;
*** '''Bit 4''' - Unit type is used. Cleared in &amp;quot;Offset + Mask&amp;quot; EUD actions.&lt;br /&gt;
*** '''Bit 5-7''' - Unknown/unused&lt;br /&gt;
** '''u8''': Padding&lt;br /&gt;
** '''u16 (2 bytes)''': MaskFlag: set to &amp;quot;SC&amp;quot; (0x53, 0x43) when using the bitmask for EUDs, 0 otherwise&lt;br /&gt;
* Player Execution&amp;lt;br&amp;gt; Following the 16 conditions and 64 actions, every trigger also has this structure&lt;br /&gt;
** '''u32''': execution flags&lt;br /&gt;
*** '''Bit 0''' - All conditions are met, executing actions, cleared on the next trigger loop.&lt;br /&gt;
*** '''Bit 1''' - Ignore the following actions: Defeat, Draw.&lt;br /&gt;
*** '''Bit 2''' - Preserve trigger. (Can replace Preserve Trigger action)&lt;br /&gt;
*** '''Bit 3''' - Ignore execution.&lt;br /&gt;
*** '''Bit 4''' - Ignore all of the following actions for this trigger until the next trigger loop: Wait, PauseGame, Transmission, PlayWAV, DisplayTextMessage, CenterView, MinimapPing, TalkingPortrait, and MuteUnitSpeech.&lt;br /&gt;
*** '''Bit 5''' - This trigger has paused the game, ignoring subsequent calls to Pause Game (Unpause Game clears this flag only in the same trigger), may automatically call unpause at the end of action execution?&lt;br /&gt;
*** '''Bit 6''' - Wait skipping disabled for this trigger, cleared on next trigger loop.&lt;br /&gt;
*** '''Bit 7-31''' - Unknown/unused&lt;br /&gt;
** '''u8[27]''': 1 byte for each player in the [[#List of Players/Group IDs]]&lt;br /&gt;
*** '''00''' - Trigger is not executed for player&lt;br /&gt;
*** '''01''' - Trigger is executed for player&lt;br /&gt;
** '''u8''': Index of the current action, in StarCraft this is incremented after each action is executed, trigger execution ends when this is 64 (Max Actions) or an action is encountered with Action byte as 0&lt;br /&gt;
This section can be split. Additional TRIG sections will add more triggers.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MBRF&amp;quot; - Mission Briefings==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 2400 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all of the mission briefings shown by the players.&lt;br /&gt;
&lt;br /&gt;
See [[#&amp;quot;TRIG&amp;quot; - Triggers|&amp;quot;TRIG&amp;quot;]] section for format, as it is exactly the same except for the conditions. In this section the 16 conditions are still there, they are all null except for the very first condition, which only has a condition byte of 13. See [[#Mission Briefing Actions List]] for the action bytes for the mission briefing actions.&lt;br /&gt;
&lt;br /&gt;
This section can be split. Additional MBRF sections will add more briefing triggers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SPRP&amp;quot; - Scenario Properties==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4 bytes.''&lt;br /&gt;
&lt;br /&gt;
* '''u16''': String number of the scenario name&lt;br /&gt;
* '''u16''': String number of the scenarios description.&lt;br /&gt;
A string index of 0 for the map name will default it to its file name. A string index of 0 description will default to a predefined string.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;FORC&amp;quot; - Force Settings==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be less than or equal to 20 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the forces and the information about them.&lt;br /&gt;
* '''u8[8]''': 1 byte for each active player, specifying which of the 4 forces (0-based) that the player's on&lt;br /&gt;
* '''u16[4]''': 1 integer for each force, string number of the name of the force&lt;br /&gt;
* '''u8[4]''': 1 byte for each force specifying the properties:&lt;br /&gt;
** '''Bit 0''' - Random start location&lt;br /&gt;
** '''Bit 1''' - Allies&lt;br /&gt;
** '''Bit 2''' - Allied victory&lt;br /&gt;
** '''Bit 3''' - Shared vision&lt;br /&gt;
** '''Bit 4-7''' - Unused&lt;br /&gt;
Notes about FORC:&lt;br /&gt;
* If there is no string specified for a force name, it will default to a &amp;quot;Force #&amp;quot; string.&lt;br /&gt;
* If this section is less than 20 bytes, the remaining bytes are defaulted to 0.&lt;br /&gt;
* Players can be on a force greater than 4, however they will not appear in the game lobby.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;WAV &amp;quot; - WAV String Indexes==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
There are 512 wav entires regardless of how many are actually used.&lt;br /&gt;
* '''u32[512]''': 1 long for each WAV. Indicates a string index is used for a WAV path in the MPQ. If the entry is not used, it will be 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIS&amp;quot; - Unit Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4048 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;UNIx&amp;quot; - BW Unit Settings|&amp;quot;UNIx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains the unit settings for the level:&lt;br /&gt;
* '''u8[228]''': 1 byte for each unit, in order of Unit ID&lt;br /&gt;
** '''00''' - Unit does not use default settings&lt;br /&gt;
** '''01''' - Unit does use default settings&lt;br /&gt;
* '''u32[228]''': Hit points for unit (Note the displayed value is this value / 256, with the low byte being a fractional HP value)&lt;br /&gt;
* '''u16[228]''': Shield points, in order of Unit ID&lt;br /&gt;
* '''u8[228]''': Armor points, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Build time (1/60 seconds), in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Mineral cost, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Gas cost, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': String number, in order of Unit ID&lt;br /&gt;
* '''u16[100]''': Base weapon damage the weapon does, in weapon ID order ([[#List of Unit Weapon IDs]])&lt;br /&gt;
* '''u16[100]''': Upgrade bonus weapon damage, in weapon ID order&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGS&amp;quot; - Upgrade Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 598 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;UPGx&amp;quot; - BW Upgrade Settings|&amp;quot;UPGx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains upgrade settings:&lt;br /&gt;
* '''u8[46]''': 1 byte per each upgrade, in order of upgrade id.&lt;br /&gt;
** '''00''' - Upgrade uses custom settings&lt;br /&gt;
** '''01''' - Upgrade uses default settings&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, time factor for each upgrade, in order of upgrade id.&lt;br /&gt;
See [[#List of Upgrade IDs]] for upgrade ids.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TECS&amp;quot; - Tech Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 216 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;TECx&amp;quot; - BW Tech Settings|&amp;quot;TECx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains technology/special abilities settings:&lt;br /&gt;
* '''u8[24]''': 1 byte per each technology, specifies if the tech overrides the default settings. In order of technology id&lt;br /&gt;
** '''00''' - Technology uses custom settings&lt;br /&gt;
** '''01''' - Technology uses default settings&lt;br /&gt;
* '''u16[24]''': Mineral cost to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Gas cost to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Time required to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Energy cost to cast technology/special ability. In order of technology id.&lt;br /&gt;
See [[#List of Technology IDs]] for technology ids.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SWNM&amp;quot; - Switch Names==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section contains the strings used for each switch. There are 256 switches, and can't be any more or any less.&lt;br /&gt;
* '''u32[256]''': One long for each switch, specifies the string number for the name of each switch. Unnamed switches will have an index of 0, and have a default switch name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;COLR&amp;quot; - Player Colors==&lt;br /&gt;
''Required for Brood War only and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 8 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section indicates what color each player is, but only has effect on Brood War.&lt;br /&gt;
* '''u8[8]''': 1 byte for each player, indicates the color of the player&lt;br /&gt;
** '''00''' - Red&lt;br /&gt;
** '''01''' - Blue&lt;br /&gt;
** '''02''' - Teal&lt;br /&gt;
** '''03''' - Purple&lt;br /&gt;
** '''04''' - Orange&lt;br /&gt;
** '''05''' - Brown&lt;br /&gt;
** '''06''' - White&lt;br /&gt;
** '''07''' - Yellow&lt;br /&gt;
** '''08''' - Green&lt;br /&gt;
** '''09''' - Pale yellow&lt;br /&gt;
** '''10''' - Tan&lt;br /&gt;
** '''11''' - Azure (Neutral color)&lt;br /&gt;
Other values can be used but may have different results depending on the tileset. Any color value above 11 is an overflow. As of patch 1.18.6, values above 11 result in default player color.&lt;br /&gt;
&lt;br /&gt;
When CRGB is present, this section still defines leaderboard colors.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;CRGB&amp;quot; - Remastered Player Colors==&lt;br /&gt;
''Requirement unknown, but can be in any map type including non-remaster maps.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 32 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''u8[8][3]''': 3 bytes for each player corresponding to an RGB color value&lt;br /&gt;
** '''u8''': R&lt;br /&gt;
** '''u8''': G&lt;br /&gt;
** '''u8''': B, or color ID&lt;br /&gt;
* '''u8[8]''': Indicates how to select the color for each player&lt;br /&gt;
** '''0''' - Random Predefined&lt;br /&gt;
** '''1''' - Player's Choice&lt;br /&gt;
** '''2''' - Custom RGB Color (RGB value for the corresponding player defined above)&lt;br /&gt;
** '''3''' - Use color ID in the &amp;quot;B&amp;quot; color channel (&amp;quot;R&amp;quot; and &amp;quot;G&amp;quot; values appear to contain junk data); leaderboard color is still defined by COLR section and can be set independently&lt;br /&gt;
&lt;br /&gt;
SC:R Only color IDs:&lt;br /&gt;
Extends the [[#&amp;quot;COLR&amp;quot; - Player Colors|COLR]] section list of colors, but cannot be used in the COLR section.&lt;br /&gt;
* '''12''' - Pale Green&lt;br /&gt;
* '''13''' - Blueish Grey&lt;br /&gt;
* '''14''' - Cyan&lt;br /&gt;
* '''15''' - Pink&lt;br /&gt;
* '''16''' - Olive&lt;br /&gt;
* '''17''' - Lime&lt;br /&gt;
* '''18''' - Navy&lt;br /&gt;
* '''19''' - Magenta&lt;br /&gt;
* '''20''' - Grey&lt;br /&gt;
* '''21''' - Black&lt;br /&gt;
* '''22+''' - Random (can pick colors that have been used)&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PUPx&amp;quot; - BW Upgrade Restrictions==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2318 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UPGR&amp;quot; - Upgrade Restrictions|&amp;quot;UPGR&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is identical to UPGR section except it uses the Brood War set of 61 upgrades instead of the original 46.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PTEx&amp;quot; - BW Tech Restrictions==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1672 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;PTEC&amp;quot; - Tech Restrictions|&amp;quot;PTEC&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is identical to PTEC section except it uses the Brood War set of 44 technologies instead of the original 24.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIx&amp;quot; - BW Unit Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4168 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UNIS&amp;quot; - Unit Settings|&amp;quot;UNIS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is indentical to UNIS section except it uses the Brood War set of 130 weapons instead of the original 100.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGx&amp;quot; - BW Upgrade Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 794 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UPGS&amp;quot; - Upgrade Settings|&amp;quot;UPGS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section the same as UPGS except section except it uses the Brood War set of 61 upgrades instead of the original 46, and there is an unused byte after the first set:&lt;br /&gt;
* '''u8[61]''': 1 byte per each upgrade, in order of upgrade id.&lt;br /&gt;
** '''00''' - Upgrade uses custom settings&lt;br /&gt;
** '''01''' - Upgrade uses default settings&lt;br /&gt;
* '''u8''': Unused.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, time factor for each upgrade, in order of upgrade id.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TECx&amp;quot; - BW Tech Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 396 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;TECS&amp;quot; - Tech Settings|&amp;quot;TECS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is indentical to TECS section except it uses the Brood War set of 44 technologies instead of the original 24.&lt;br /&gt;
&lt;br /&gt;
=Appendix=&lt;br /&gt;
A set of references and IDs that should help you easier in the trigger section and the technology/player ids, etc:&lt;br /&gt;
&lt;br /&gt;
==Trigger Conditions List==&lt;br /&gt;
* 0 = No Condition&lt;br /&gt;
* 1 = Countdown Timer(Comparison, QNumber)&lt;br /&gt;
* 2 = Command(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 3 = Bring(Player, Comparison, TUnit, Loc, QNumber)&lt;br /&gt;
* 4 = Accumulate(Player, Comparison, QNumber, ResType)&lt;br /&gt;
* 5 = Kill(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 6 = Command the Most(TUnit)&lt;br /&gt;
* 7 = Commands the Most At(TUnit, Loc)&lt;br /&gt;
* 8 = Most Kills(TUnit)&lt;br /&gt;
* 9 = Highest Score(Score)&lt;br /&gt;
* 10 = Most Resources(ResType)&lt;br /&gt;
* 11 = Switch(Switch)&lt;br /&gt;
* 12 = Elapsed Time(Comparison, QNumber)&lt;br /&gt;
* 13 = Data is a Mission Briefing. Conditions are N/A (Same as Never)&lt;br /&gt;
* 14 = Opponents(Player, Comparison, QNumber)&lt;br /&gt;
* 15 = Deaths(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 16 = Command the Least(TUnit)&lt;br /&gt;
* 17 = Command the Least At(TUnit, Loc)&lt;br /&gt;
* 18 = Least Kills(TUnit)&lt;br /&gt;
* 19 = Lowest Score(Score)&lt;br /&gt;
* 20 = Least Resources(ResType)&lt;br /&gt;
* 21 = Score(Player, Comparison, Score, QNumber)&lt;br /&gt;
* 22 = Always (Same as No Condition)&lt;br /&gt;
* 23 = Never&lt;br /&gt;
&lt;br /&gt;
==Trigger Actions List==&lt;br /&gt;
* 0 = No Action&lt;br /&gt;
* 1 = Victory&lt;br /&gt;
* 2 = Defeat&lt;br /&gt;
* 3 = Preserve Trigger&lt;br /&gt;
* 4 = Wait(Time)&lt;br /&gt;
* 5 = Pause Game (Single player only)&lt;br /&gt;
* 6 = Unpause Game (Single player only)&lt;br /&gt;
* 7 = Transmission(Text, Unit, Loc, Time, Modifier, Wave, WavTime)&lt;br /&gt;
* 8 = Play WAV(Wav, WavTime)&lt;br /&gt;
* 9 = Display Text Message(Text)&lt;br /&gt;
* 10 = Center View(Loc)&lt;br /&gt;
* 11 = Create Unit with Properties(Player, Unit, Number, Loc, UnitProp)&lt;br /&gt;
* 12 = Set Mission Objectives(Text)&lt;br /&gt;
* 13 = Set Switch(Switch, SwAction)&lt;br /&gt;
* 14 = Set Countdown Timer(Time, Modifier)&lt;br /&gt;
* 15 = Run AI Script(AIScript)&lt;br /&gt;
* 16 = Run AI Script At Location(AIScript)&lt;br /&gt;
* 17 = Leader Board (Control) (Text, TUnit)&lt;br /&gt;
* 18 = Leader Board (Control At Location) (Text, TUnit, Loc)&lt;br /&gt;
* 19 = Leader Board (Resources) (Text, ResType)&lt;br /&gt;
* 20 = Leader Board (Kills) (Text, TUnit)&lt;br /&gt;
* 21 = Leader Board (Points) (Text, Score)&lt;br /&gt;
* 22 = Kill Unit (Player, TUnit)&lt;br /&gt;
* 23 = Kill Unit At Location(Player, TUnit, Number, Loc)&lt;br /&gt;
* 24 = Remove Unit(Player, TUnit)&lt;br /&gt;
* 25 = Remove Unit At Location(Player, TUnit, Number, Loc)&lt;br /&gt;
* 26 = Set Resources(Player, Number, Modifier, ResType)&lt;br /&gt;
* 27 = Set Score(Player, Number, Modifier, Score)&lt;br /&gt;
* 28 = Minimap Ping(Loc)&lt;br /&gt;
* 29 = Talking Portrait(Unit, Time)&lt;br /&gt;
* 30 = Mute Unit Speech&lt;br /&gt;
* 31 = Unmute Unit Speech&lt;br /&gt;
* 32 = Leaderboard Computer Players(State)&lt;br /&gt;
* 33 = Leaderboard Goal (Control) (Text, TUnit, Number)&lt;br /&gt;
* 34 = Leaderboard Goal (Control At Location) (Text, TUnit, Number, Loc)&lt;br /&gt;
* 35 = Leaderboard Goal (Resources) (Text, TUnit, Number, ResType)&lt;br /&gt;
* 36 = Leaderboard Goal (Kills) (Text, TUnit, Number)&lt;br /&gt;
* 37 = Leaderboard Goal (Points) (Text, Number, Score)&lt;br /&gt;
* 38 = Move Location(Player, TUnit, SLoc, DLoc)&lt;br /&gt;
* 39 = Move Unit(Player, TUnit, Number, SLoc, DLoc)&lt;br /&gt;
* 40 = Leaderboard (Greed) (Number)&lt;br /&gt;
* 41 = Set Next Scenario(Text) (Single player only)&lt;br /&gt;
* 42 = Set Doodad State(Player, TUnit, Loc, State)&lt;br /&gt;
* 43 = Set Invincibility(Player, TUnit, Loc, State)&lt;br /&gt;
* 44 = Create Unit(Player, Unit, Number, Loc)&lt;br /&gt;
* 45 = Set Deaths(Player, TUnit, Number, Modifier)&lt;br /&gt;
* 46 = Order(Player, TUnit, SLoc, DLoc, Order)&lt;br /&gt;
* 47 = Comment(Text)&lt;br /&gt;
* 48 = Give Units to Player(SPlayer, DPlayer, TUnit, Number, Loc)&lt;br /&gt;
* 49 = Modify Unit Hit Points(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 50 = Modify Unit Energy(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 51 = Modify Unit Shield Points(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 52 = Modify Unit Resource Amount(Player, Number, ModAmount, Loc)&lt;br /&gt;
* 53 = Modify Unit Hanger Count(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 54 = Pause Timer&lt;br /&gt;
* 55 = Unpause Timer&lt;br /&gt;
* 56 = Draw&lt;br /&gt;
* 57 = Set Alliance Status(Player, AllyStatus)&lt;br /&gt;
* 58 = Disable Debug Mode (Single player only)&lt;br /&gt;
* 59 = Enable Debug Mode (Single player only)&lt;br /&gt;
&lt;br /&gt;
==Mission Briefing Actions List==&lt;br /&gt;
* 0 - No Action&lt;br /&gt;
* 1 - Wait(Time)&lt;br /&gt;
* 2 - Play WAV(Wave, WavTime)&lt;br /&gt;
* 3 - Text Message(Text, Time)&lt;br /&gt;
* 4 - Mission Objectives(Text)&lt;br /&gt;
* 5 - Show Portrait(Unit, Slot)&lt;br /&gt;
* 6 - Hide Portrait(Slot)&lt;br /&gt;
* 7 - Display Speaking Portrait(Slot, Time)&lt;br /&gt;
* 8 - Transmission(Text, Slot, Time, Modifier, Wave, WavTime)&lt;br /&gt;
* 9 - Skip Tutorial Enabled&lt;br /&gt;
&lt;br /&gt;
==Switch States==&lt;br /&gt;
* 2 = Switch is set&lt;br /&gt;
* 3 = Switch is cleared&lt;br /&gt;
&lt;br /&gt;
==Numeric Comparisons==&lt;br /&gt;
* 0 = At least&lt;br /&gt;
* 1 = At most&lt;br /&gt;
* 10 = Exactly&lt;br /&gt;
&lt;br /&gt;
==Score Types==&lt;br /&gt;
* 0 = Total&lt;br /&gt;
* 1 = Units&lt;br /&gt;
* 2 = Buildings&lt;br /&gt;
* 3 = Units and Buildings&lt;br /&gt;
* 4 = Kills&lt;br /&gt;
* 5 = Razings&lt;br /&gt;
* 6 = Kills and Razings&lt;br /&gt;
* 7 = Custom&lt;br /&gt;
&lt;br /&gt;
==Resource Types==&lt;br /&gt;
* 0 = Ore&lt;br /&gt;
* 1 = Gas&lt;br /&gt;
* 2 = Ore and Gas&lt;br /&gt;
&lt;br /&gt;
==Alliance Statuses==&lt;br /&gt;
* 0 = Enemy&lt;br /&gt;
* 1 = Ally&lt;br /&gt;
* 2 = Allied Victory&lt;br /&gt;
&lt;br /&gt;
==Unit Orders==&lt;br /&gt;
* 0 = Move&lt;br /&gt;
* 1 = Patrol&lt;br /&gt;
* 2 = Attack&lt;br /&gt;
&lt;br /&gt;
==Action States==&lt;br /&gt;
* 4 = Enabled/Set switch&lt;br /&gt;
* 5  = Disabled/Clear switch&lt;br /&gt;
* 6 = Toggle/Toggle switch&lt;br /&gt;
* 11 = Randomize switch&lt;br /&gt;
&lt;br /&gt;
==Number Modifiers==&lt;br /&gt;
* 7 = Set to&lt;br /&gt;
* 8 = Add&lt;br /&gt;
* 9 = Subtract&lt;br /&gt;
&lt;br /&gt;
==Trigger Unit Types==&lt;br /&gt;
* All normal units (0-227)&lt;br /&gt;
* 228 = None&lt;br /&gt;
* 229 = Any unit&lt;br /&gt;
* 230 = Men&lt;br /&gt;
* 231 = Buildings&lt;br /&gt;
* 232 = Factories&lt;br /&gt;
&lt;br /&gt;
==List of Players/Group IDs==&lt;br /&gt;
* 0 = Player 1&lt;br /&gt;
* 1 = Player 2&lt;br /&gt;
* 2 = Player 3&lt;br /&gt;
* 3 = Player 4&lt;br /&gt;
* 4 = Player 5&lt;br /&gt;
* 5 = Player 6&lt;br /&gt;
* 6 = Player 7&lt;br /&gt;
* 7 = Player 8&lt;br /&gt;
* 8 = Player 9&lt;br /&gt;
* 9 = Player 10&lt;br /&gt;
* 10 = Player 11&lt;br /&gt;
* 11 = Player 12&lt;br /&gt;
* 12 = None (Unused, One-entry Overflow in some cases)&lt;br /&gt;
* 13 = Current Player&lt;br /&gt;
* 14 = Foes&lt;br /&gt;
* 15 = Allies&lt;br /&gt;
* 16 = Neutral Players&lt;br /&gt;
* 17 = All Players&lt;br /&gt;
* 18 = Force 1&lt;br /&gt;
* 19 = Force 2&lt;br /&gt;
* 20 = Force 3&lt;br /&gt;
* 21 = Force 4&lt;br /&gt;
* 22 = Unused 1&lt;br /&gt;
* 23 = Unused 2&lt;br /&gt;
* 24 = Unused 3&lt;br /&gt;
* 25 = Unused 4&lt;br /&gt;
* 26 = Non Allied Victory Players&lt;br /&gt;
&lt;br /&gt;
==List of Technology IDs==&lt;br /&gt;
* 0 = Stim Packs&lt;br /&gt;
* 1 = Lockdown&lt;br /&gt;
* 2 = EMP Shockwave&lt;br /&gt;
* 3 = Spider Mines&lt;br /&gt;
* 4 = Scanner Sweep&lt;br /&gt;
* 5 = Siege Mode&lt;br /&gt;
* 6 = Defensive Matrix&lt;br /&gt;
* 7 = Irradiate&lt;br /&gt;
* 8 = Yamato Gun&lt;br /&gt;
* 9 = Cloaking Field&lt;br /&gt;
* 10 = Personnel Cloaking&lt;br /&gt;
* 11 = Burrowing&lt;br /&gt;
* 12 = Infestation&lt;br /&gt;
* 13 = Spawn Broodling&lt;br /&gt;
* 14 = Dark Swarm&lt;br /&gt;
* 15 = Plague&lt;br /&gt;
* 16 = Consume&lt;br /&gt;
* 17 = Ensnare&lt;br /&gt;
* 18 = Parasite&lt;br /&gt;
* 19 = Psionic Storm&lt;br /&gt;
* 20 = Hallucination&lt;br /&gt;
* 21 = Recall&lt;br /&gt;
* 22 = Stasis Field&lt;br /&gt;
* 23 = Archon Warp&lt;br /&gt;
* 24 = Restoration&lt;br /&gt;
* 25 = Disruption Web&lt;br /&gt;
* 26 = Unused 26&lt;br /&gt;
* 27 = Mind Control&lt;br /&gt;
* 28 = Dark Archon Meld&lt;br /&gt;
* 29 = Feedback&lt;br /&gt;
* 30 = Optical Flare&lt;br /&gt;
* 31 = Maelstorm&lt;br /&gt;
* 32 = Lurker Aspect&lt;br /&gt;
* 33 = Unused 33&lt;br /&gt;
* 34 = Healing&lt;br /&gt;
* 35 = Unused 35&lt;br /&gt;
* 36 = Unused 36&lt;br /&gt;
* 37 = Unused 37&lt;br /&gt;
* 38 = Unused 38&lt;br /&gt;
* 39 = Unused 39&lt;br /&gt;
* 40 = Unused 40&lt;br /&gt;
* 41 = Unused 41&lt;br /&gt;
* 42 = Unused 42&lt;br /&gt;
* 43 = Unused 43&lt;br /&gt;
&lt;br /&gt;
==List of Upgrade IDs==&lt;br /&gt;
* 0 = Terran Infantry Armor&lt;br /&gt;
* 1 = Terran Vehicle Plating&lt;br /&gt;
* 2 = Terran Ship Plating&lt;br /&gt;
* 3 = Zerg Carapace&lt;br /&gt;
* 4 = Zerg Flyer Caparace&lt;br /&gt;
* 5 = Protoss Armor&lt;br /&gt;
* 6 = Protoss Plating&lt;br /&gt;
* 7 = Terran Infantry Weapons&lt;br /&gt;
* 8 = Terran Vehicle Weapons&lt;br /&gt;
* 9 = Terran Ship Weapons&lt;br /&gt;
* 10 = Zerg Melee Attacks&lt;br /&gt;
* 11 = Zerg Missile Attacks&lt;br /&gt;
* 12 = Zerg Flyer Attacks&lt;br /&gt;
* 13 = Protoss Ground Weapons&lt;br /&gt;
* 14 = Protoss Air Weapons&lt;br /&gt;
* 15 = Protoss Plasma Shields&lt;br /&gt;
* 16 = U-238 Shells&lt;br /&gt;
* 17 = Ion Thrusters&lt;br /&gt;
* 18 = Burst Lasers (Unused)&lt;br /&gt;
* 19 = Titan Reactor (SV +50)&lt;br /&gt;
* 20 = Ocular Implants&lt;br /&gt;
* 21 = Moebius Reactor (Ghost +50)&lt;br /&gt;
* 22 = Apollo Reactor (Wraith +50)&lt;br /&gt;
* 23 = Colossus Reactor (BC +50)&lt;br /&gt;
* 24 = Ventral Sacs&lt;br /&gt;
* 25 = Antennae&lt;br /&gt;
* 26 = Pneumatized Carapace&lt;br /&gt;
* 27 = Metabolic Boost&lt;br /&gt;
* 28 = Adrenal Glands&lt;br /&gt;
* 29 = Muscular Augments&lt;br /&gt;
* 30 = Grooved Spines&lt;br /&gt;
* 31 = Gamete Meiosis (Queen +50)&lt;br /&gt;
* 32 = Metasynaptic Node (Defiler +50)&lt;br /&gt;
* 33 = Singularity Charge&lt;br /&gt;
* 34 = Leg Enhancements&lt;br /&gt;
* 35 = Scarab Damage &lt;br /&gt;
* 36 = Reaver Capacity &lt;br /&gt;
* 37 = Gravitic Drive&lt;br /&gt;
* 38 = Sensor Array&lt;br /&gt;
* 39 = Gravitic Boosters&lt;br /&gt;
* 40 = Khaydarin Amulet (HT +50)&lt;br /&gt;
* 41 = Apial Sensors&lt;br /&gt;
* 42 = Gravitic Thrusters&lt;br /&gt;
* 43 = Carrier Capacity&lt;br /&gt;
* 44 = Khaydarin Core (Arbiter +50)&lt;br /&gt;
* 45 = Unknown Upgrade45&lt;br /&gt;
* 46 = Unknown Upgrade46&lt;br /&gt;
* 47 = Argus Jewel (Corsair +50)&lt;br /&gt;
* 48 = Unknown Upgrade48&lt;br /&gt;
* 49 = Argus Talisman (DA +50)&lt;br /&gt;
* 50 = Unknown Upgrade50&lt;br /&gt;
* 51 = Caduceus Reactor (Medic +50)&lt;br /&gt;
* 52 = Chitinous Plating&lt;br /&gt;
* 53 = Anabolic Synthesis&lt;br /&gt;
* 54 = Charon Booster&lt;br /&gt;
* 55 = Unknown Upgrade55&lt;br /&gt;
* 56 = Unknown Upgrade56&lt;br /&gt;
* 57 = Unknown Upgrade57&lt;br /&gt;
* 58 = Unknown Upgrade58&lt;br /&gt;
* 59 = Unknown Upgrade59&lt;br /&gt;
* 60 = Unknown Upgrade60&lt;br /&gt;
&lt;br /&gt;
==List of Unit Weapon IDs==&lt;br /&gt;
* 0 = Gauss Rifle (Normal)&lt;br /&gt;
* 1 = Gauss Rifle (Jim Raynor-Marine)&lt;br /&gt;
* 2 = C-10 Concussion Rifle (Normal)&lt;br /&gt;
* 3 = C-10 Concussion Rifle (Sarah Kerrigan)&lt;br /&gt;
* 4 = Fragmentation Grenade (Normal)&lt;br /&gt;
* 5 = Fragmentation Grenade (Jim Raynor-Vulture)&lt;br /&gt;
* 6 = Spider Mines&lt;br /&gt;
* 7 = Twin Autocannons (Normal)&lt;br /&gt;
* 8 = Hellfire Missile Pack (Normal)&lt;br /&gt;
* 9 = Twin Autocannons (Alan Schezar)&lt;br /&gt;
* 10 = Hellfire Missile Pack (Alan Schezar)&lt;br /&gt;
* 11 = Arclite Cannon (Normal)&lt;br /&gt;
* 12 = Arclite Cannon (Edmund Duke)&lt;br /&gt;
* 13 = Fusion Cutter&lt;br /&gt;
* 14 = Fusion Cutter (Harvest)&lt;br /&gt;
* 15 = Gemini Missiles (Normal)&lt;br /&gt;
* 16 = Burst Lasers (Normal)&lt;br /&gt;
* 17 = Gemini Missiles (Tom Kazansky)&lt;br /&gt;
* 18 = Burst Lasers (Tom Kazansky)&lt;br /&gt;
* 19 = ATS Laser Battery (Normal)&lt;br /&gt;
* 20 = ATA Laser Battery (Normal)&lt;br /&gt;
* 21 = ATS Laser Battery (Norad II+Mengsk+DuGalle)&lt;br /&gt;
* 22 = ATA Laser Battery (Norad II+Mengsk+DuGalle)&lt;br /&gt;
* 23 = ATS Laser Battery (Hyperion)&lt;br /&gt;
* 24 = ATA Laser Battery (Hyperion)&lt;br /&gt;
* 25 = Flame Thrower (Normal)&lt;br /&gt;
* 26 = Flame Thrower (Gui Montag)&lt;br /&gt;
* 27 = Arclite Shock Cannon (Normal)&lt;br /&gt;
* 28 = Arclite Shock Cannon (Edmund Duke)&lt;br /&gt;
* 29 = Longbolt Missiles&lt;br /&gt;
* 30 = Yamato Gun&lt;br /&gt;
* 31 = Nuclear Missile&lt;br /&gt;
* 32 = Lockdown&lt;br /&gt;
* 33 = EMP Shockwave&lt;br /&gt;
* 34 = Irradiate&lt;br /&gt;
* 35 = Claws (Normal)&lt;br /&gt;
* 36 = Claws (Devouring One)&lt;br /&gt;
* 37 = Claws (Infested Kerrigan)&lt;br /&gt;
* 38 = Needle Spines (Normal)&lt;br /&gt;
* 39 = Needle Spines (Hunter Killer)&lt;br /&gt;
* 40 = Kaiser Blades (Normal)&lt;br /&gt;
* 41 = Kaiser Blades (Torrasque)&lt;br /&gt;
* 42 = Toxic Spores (Broodling)&lt;br /&gt;
* 43 = Spines&lt;br /&gt;
* 44 = Spines (Harvest)&lt;br /&gt;
* 45 = Acid Spray (Unused)&lt;br /&gt;
* 46 = Acid Spore (Normal)&lt;br /&gt;
* 47 = Acid Spore (Kukulza-Guardian)&lt;br /&gt;
* 48 = Glave Wurm (Normal)&lt;br /&gt;
* 49 = Glave Wurm (Kukulza-Mutalisk)&lt;br /&gt;
* 50 = Venom (Unused-Defiler)&lt;br /&gt;
* 51 = Venom (Unused-Defiler Hero)&lt;br /&gt;
* 52 = Seeker Spores&lt;br /&gt;
* 53 = Subterranean Tentacle&lt;br /&gt;
* 54 = Suicide (Infested Terran)&lt;br /&gt;
* 55 = Suicide (Scourge)&lt;br /&gt;
* 56 = Parasite&lt;br /&gt;
* 57 = Spawn Broodlings&lt;br /&gt;
* 58 = Ensnare&lt;br /&gt;
* 59 = Dark Swarm&lt;br /&gt;
* 60 = Plague&lt;br /&gt;
* 61 = Consume&lt;br /&gt;
* 62 = Particle Beam&lt;br /&gt;
* 63 = Particle Beam (Harvest)&lt;br /&gt;
* 64 = Psi Blades (Normal)&lt;br /&gt;
* 65 = Psi Blades (Fenix-Zealot)&lt;br /&gt;
* 66 = Phase Disruptor (Normal)&lt;br /&gt;
* 67 = Phase Disruptor (Fenix-Dragoon)&lt;br /&gt;
* 68 = Psi Assault (Normal-Unused)&lt;br /&gt;
* 69 = Psi Assault (Tassadar+Aldaris)&lt;br /&gt;
* 70 = Psionic Shockwave (Normal)&lt;br /&gt;
* 71 = Psionic Shockwave (Tassadar/Zeratul Archon)&lt;br /&gt;
* 72 = Unknown72&lt;br /&gt;
* 73 = Dual Photon Blasters (Normal)&lt;br /&gt;
* 74 = Anti-matter Missiles (Normal)&lt;br /&gt;
* 75 = Dual Photon Blasters (Mojo)&lt;br /&gt;
* 76 = Anit-matter Missiles (Mojo)&lt;br /&gt;
* 77 = Phase Disruptor Cannon (Normal)&lt;br /&gt;
* 78 = Phase Disruptor Cannon (Danimoth)&lt;br /&gt;
* 79 = Pulse Cannon&lt;br /&gt;
* 80 = STS Photon Cannon&lt;br /&gt;
* 81 = STA Photon Cannon&lt;br /&gt;
* 82 = Scarab&lt;br /&gt;
* 83 = Stasis Field&lt;br /&gt;
* 84 = Psi Storm&lt;br /&gt;
* 85 = Warp Blades (Zeratul)&lt;br /&gt;
* 86 = Warp Blades (Dark Templar Hero)&lt;br /&gt;
* 87 = Missiles (Unused)&lt;br /&gt;
* 88 = Laser Battery1 (Unused)&lt;br /&gt;
* 89 = Tormentor Missiles (Unused)&lt;br /&gt;
* 90 = Bombs (Unused)&lt;br /&gt;
* 91 = Raider Gun (Unused)&lt;br /&gt;
* 92 = Laser Battery2 (Unused)&lt;br /&gt;
* 93 = Laser Battery3 (Unused)&lt;br /&gt;
* 94 = Dual Photon Blasters (Unused)&lt;br /&gt;
* 95 = Flechette Grenade (Unused)&lt;br /&gt;
* 96 = Twin Autocannons (Floor Trap)&lt;br /&gt;
* 97 = Hellfire Missile Pack (Wall Trap)&lt;br /&gt;
* 98 = Flame Thrower (Wall Trap)&lt;br /&gt;
* 99 = Hellfire Missile Pack (Floor Trap)&lt;br /&gt;
* 100 = Neutron Flare&lt;br /&gt;
* 101 = Disruption Web&lt;br /&gt;
* 102 = Restoration&lt;br /&gt;
* 103 = Halo Rockets&lt;br /&gt;
* 104 = Corrosive Acid&lt;br /&gt;
* 105 = Mind Control&lt;br /&gt;
* 106 = Feedback&lt;br /&gt;
* 107 = Optical Flare&lt;br /&gt;
* 108 = Maelstrom&lt;br /&gt;
* 109 = Subterranean Spines&lt;br /&gt;
* 110 = Gauss Rifle0 (Unused)&lt;br /&gt;
* 111 = Warp Blades (Normal)&lt;br /&gt;
* 112 = C-10 Concussion Rifle (Samir Duran)&lt;br /&gt;
* 113 = C-10 Concussion Rifle (Infested Duran)&lt;br /&gt;
* 114 = Dual Photon Blasters (Artanis)&lt;br /&gt;
* 115 = Anti-matter Missiles (Artanis)&lt;br /&gt;
* 116 = C-10 Concussion Rifle (Alexei Stukov)&lt;br /&gt;
* 117 = Gauss Rifle1 (Unused)&lt;br /&gt;
* 118 = Gauss Rifle2 (Unused)&lt;br /&gt;
* 119 = Gauss Rifle3 (Unused)&lt;br /&gt;
* 120 = Gauss Rifle4 (Unused)&lt;br /&gt;
* 121 = Gauss Rifle5 (Unused)&lt;br /&gt;
* 122 = Gauss Rifle6 (Unused)&lt;br /&gt;
* 123 = Gauss Rifle7 (Unused)&lt;br /&gt;
* 124 = Gauss Rifle8 (Unused)&lt;br /&gt;
* 125 = Gauss Rifle9 (Unused)&lt;br /&gt;
* 126 = Gauss Rifle10 (Unused)&lt;br /&gt;
* 127 = Gauss Rifle11 (Unused)&lt;br /&gt;
* 128 = Gauss Rifle12 (Unused)&lt;br /&gt;
* 129 = Gauss Rifle13 (Unused)&lt;br /&gt;
* 130 = None&lt;br /&gt;
&lt;br /&gt;
==Complete Modifier List==&lt;br /&gt;
* 0 = Condition: &amp;gt;= (greater than or equal to)&lt;br /&gt;
* 1 = Condition: &amp;lt;= (less than or equal to)&lt;br /&gt;
* 2 = Condition: == TRUE (Is True)&lt;br /&gt;
* 3 = Condition: == FALSE (Is False)&lt;br /&gt;
* 4 = Action: = TRUE (Set to True)&lt;br /&gt;
* 5 = Action: = FALSE (Set to False)&lt;br /&gt;
* 6 = Action: NOT (toggle)&lt;br /&gt;
* 7 = Action: = (Set to)&lt;br /&gt;
* 8 = Action: += (Add)&lt;br /&gt;
* 9 = Action: -= (Subtract)&lt;br /&gt;
* 10 = Condition: == (Exactly)&lt;br /&gt;
* 11 = Action: Randomize&lt;br /&gt;
&lt;br /&gt;
[[Category:StarCraft]]&lt;br /&gt;
[[Category:Reference]]&lt;/div&gt;</summary>
		<author><name>FaRTy1billion</name></author>	</entry>

	<entry>
		<id>https://staredit.net/wiki/index.php?title=Scenario.chk&amp;diff=658</id>
		<title>Scenario.chk</title>
		<link rel="alternate" type="text/html" href="https://staredit.net/wiki/index.php?title=Scenario.chk&amp;diff=658"/>
				<updated>2022-07-09T22:53:45Z</updated>
		
		<summary type="html">&lt;p&gt;FaRTy1billion: /* &amp;quot;COLR&amp;quot; - Player Colors */ Removed SC:R values, because they are not defined in the COLR section.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The CHK file is a very dense file found inside the SCM or SCX file (as &amp;quot;staredit\scenario.chk&amp;quot;), which is just a renamed MPQ archive.&lt;br /&gt;
&lt;br /&gt;
In this article, some shorthand will be used for datatypes:&lt;br /&gt;
* '''u8''' for an unsigned byte&lt;br /&gt;
* '''u16''' for an unsigned short (2-byte integer)&lt;br /&gt;
* '''u32''' for an unsigned int (4-byte integer)&lt;br /&gt;
* '''uT[''a'']''' for an array of datatype '''T''' (8, 16, 32) with '''''a''''' number of elements&lt;br /&gt;
* '''uT[''a''][''b'']''' for a two-dimensional array of datatype '''T''', where each element of '''T[''a'']''' will be an array of size '''''b'''''&lt;br /&gt;
&lt;br /&gt;
=Sections=&lt;br /&gt;
The CHK is split into several named chunks (hence the file extension, an abbreviation of ''CHunK'').&lt;br /&gt;
&lt;br /&gt;
Each section begins with an 8-byte header:&lt;br /&gt;
* '''u32''' Name - A 4-byte string uniquely identifying that chunk's purpose.&lt;br /&gt;
* '''u32''' Size - The size, in bytes, of the chunk (not including this header)&lt;br /&gt;
Followed by as many bytes as 'Size', in a format described below.&lt;br /&gt;
&lt;br /&gt;
Some things to keep in mind about the CHK section:&lt;br /&gt;
* Invalid sections can exist and will be ignored. While Size is unsigned, it can safely be a negative value to read a chunk earlier in the file. This allows for &amp;quot;section stacking&amp;quot;, allowing smaller sections to be placed inside of larger ones or duplicate triggers or units to take less space in the file.&lt;br /&gt;
* All sections will marked &amp;quot;Not required.&amp;quot; are never read by StarCraft and can safely be omitted. However they may or may not be read by StarEdit, and may cause the map to be unreadable in an editor.&lt;br /&gt;
* Note &amp;quot;Hybrid&amp;quot;, or &amp;quot;Enhanced&amp;quot;, maps were introduced in 1.04. They are supported both by Original StarCraft and Brood War and usually contain sections for both types (e.g., UPGS and UPGx, TECS and TECx), but both sections aren't necessarily read.&lt;br /&gt;
* Duplicate sections will overwrite previously defined section data, except where noted. Note this only applies to those section that pass the specified &amp;quot;validation&amp;quot; parameters, as any section that does not successfully validate will be ignored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TYPE&amp;quot; - Map Type==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the type of scenario.&lt;br /&gt;
* '''u32''': Specifies the type of scenario:&lt;br /&gt;
** '''0x53574152''' or '''RAWS''' - 1.04 StarCraft and above (&amp;quot;hybrid&amp;quot;)&lt;br /&gt;
** '''0x42574152''' or '''RAWB''' - Brood War&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;VER &amp;quot; - Format Version==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section identifies the file format version.&lt;br /&gt;
* '''u16''': File format version:&lt;br /&gt;
** '''59''' - Starcraft 1.00 (original retail release)&lt;br /&gt;
** '''63''' - Starcraft 1.04 ''(hybrid)''&lt;br /&gt;
** '''64''' - Starcraft Remastered (1.21) ''(hybrid)''&lt;br /&gt;
** '''205''' - Brood War 1.00 ''(1.04)''&lt;br /&gt;
** '''206''' - Starcraft Remastered (1.21) ''(broodwar)''&lt;br /&gt;
This is the only version code section to actually be read by StarCraft (of TYPE, VER , IVER, and IVE2). Any other value is invalid in retail StarCraft and is usually a beta version.&lt;br /&gt;
&lt;br /&gt;
Other unsupported versions include:&lt;br /&gt;
* '''0-19''' - ''Warcraft II versions (.PUD)''&lt;br /&gt;
* '''47''' - ''Starcraft Beta''&lt;br /&gt;
* '''61''' - Brood War internal (map version 61)&lt;br /&gt;
* '''75''' - Brood War internal (map version 75)&lt;br /&gt;
* '''201''' - Brood War internal (map version 201)&lt;br /&gt;
* '''203''' - Brood War internal (map version 203)&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IVER&amp;quot; - Map Version==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section &amp;quot;additionally identifies&amp;quot; the map version.&lt;br /&gt;
* '''u16''': &amp;quot;Additional file format version:&amp;quot;&lt;br /&gt;
** '''9''' - beta/obsolete versions&lt;br /&gt;
** '''10''' - current versions&lt;br /&gt;
When saving as expansion this section gets removed entirely. Contrary to popular belief, it doesn't get &amp;quot;replaced&amp;quot; by IVE2 in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IVE2&amp;quot; - Map Version==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section &amp;quot;additionally identifies&amp;quot; the map version.&lt;br /&gt;
* '''u16''': &amp;quot;Additional file format version:&amp;quot;&lt;br /&gt;
** '''11''' - 1.04 StarCraft and above (&amp;quot;hybrid&amp;quot;) or Brood War.&lt;br /&gt;
This section does not &amp;quot;replace&amp;quot; IVER in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;VCOD&amp;quot; - Verification Code==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be equal to size of the VCOD data in the EXE resource. Must result in valid checksum.''&lt;br /&gt;
&lt;br /&gt;
This section has a verification code to make sure this is actually a CHK file.&lt;br /&gt;
&lt;br /&gt;
* '''u32[256]''': Seed values.&lt;br /&gt;
* '''u8[16]''': Operation codes to produce the resulting hash:&lt;br /&gt;
** '''00''' - XOR's the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''01''' - Adds to the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''02''' - Subtracts from the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''03''' - XOR's the current hash with the VCOD table at index OWNR, SIDE, FORC, and 0&lt;br /&gt;
** '''04''' - same as 0x03&lt;br /&gt;
** '''05''' - same as 0x03&lt;br /&gt;
** '''06''' - Complex function consisting of ORs and shifts&lt;br /&gt;
** '''07''' - Inverted version of 0x06, switching direction of all shifts&lt;br /&gt;
** '''08+''' - Do nothing&lt;br /&gt;
Opcodes and seeds do not have to match those in EXE resource, as long as the same value is produced.&amp;lt;br&amp;gt;&lt;br /&gt;
The only indexes in the seed table that are referenced are those that correspond individual values of [[#&amp;quot;OWNR&amp;quot; - StarCraft Player Types|OWNR]], [[#&amp;quot;SIDE&amp;quot; - Player Races|SIDE]], [[#&amp;quot;FORC&amp;quot; - Force Settings|FORC]] player assignments, and index 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IOWN&amp;quot; - StarEdit Player Types==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the owner of each player.&lt;br /&gt;
* '''u8[12]''': One byte for each player, specifies the owner of the player:&lt;br /&gt;
** '''00''' - Inactive&lt;br /&gt;
** ''01'' - Computer (game)&lt;br /&gt;
** ''02'' - Occupied by Human Player&lt;br /&gt;
** '''03''' - Rescue Passive&lt;br /&gt;
** '''04''' - Unused&lt;br /&gt;
** '''05''' - Computer&lt;br /&gt;
** '''06''' - Human (Open Slot)&lt;br /&gt;
** '''07''' - Neutral&lt;br /&gt;
** ''08'' - Closed slot&lt;br /&gt;
This section is separate from OWNR as a staredit value. Staredit does not display &amp;quot;inactive&amp;quot; as a valid option. Italicized settings denote invalid map options, which may involve a buffer overflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;OWNR&amp;quot; - StarCraft Player Types==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 12 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section designates the controller of a particular player. It is exactly the same as the &amp;quot;IOWN&amp;quot; section, except there is an additional value, 0x00 for Inactive.&lt;br /&gt;
* '''u8[12]''': One byte for each player, specifies the owner of the player:&lt;br /&gt;
** '''00''' - Inactive&lt;br /&gt;
** ''01'' - Computer (game)&lt;br /&gt;
** ''02'' - Occupied by Human Player&lt;br /&gt;
** '''03''' - Rescue Passive&lt;br /&gt;
** '''04''' - Unused&lt;br /&gt;
** '''05''' - Computer&lt;br /&gt;
** '''06''' - Human (Open Slot)&lt;br /&gt;
** '''07''' - Neutral&lt;br /&gt;
** ''08'' - Closed slot&lt;br /&gt;
Italicized settings denote invalid map options, which may involve a buffer overflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;ERA &amp;quot; - Tileset==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section indicates the tileset of the scenario.&lt;br /&gt;
* '''u16''': Designates tileset:&lt;br /&gt;
** '''00''' - Badlands&lt;br /&gt;
** '''01''' - Space Platform&lt;br /&gt;
** '''02''' - Installation&lt;br /&gt;
** '''03''' - Ashworld&lt;br /&gt;
** '''04''' - Jungle&lt;br /&gt;
** '''05''' - Desert&lt;br /&gt;
** '''06''' - Arctic&lt;br /&gt;
** '''07''' - Twilight&lt;br /&gt;
StarCraft masks the tileset indicator's bit value, so bits after the third place (anything after the value &amp;quot;7&amp;quot;) are removed. Thus, 9 (1001 in binary) is interpreted as 1 (0001), 10 (1010) as 2 (0010), etc.&amp;lt;br&amp;gt;&lt;br /&gt;
Desert, Arctic, and Twilight are Brood War-only tilesets.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;DIM &amp;quot; - Map Dimensions==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains the dimensions of the map.&lt;br /&gt;
* '''u16''': Width of the map&lt;br /&gt;
* '''u16''': Height of the map&lt;br /&gt;
The Width/Height of the map is measured in the number of square 32x32p tiles.&amp;lt;br&amp;gt;&lt;br /&gt;
Standard Dimensions are 64, 96, 128, 192, and 256.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SIDE&amp;quot; - Player Races==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 12 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains the species/race of each player.&lt;br /&gt;
* '''u8[12]''': 1 byte per player the species of that player:&lt;br /&gt;
** '''00''' - Zerg&lt;br /&gt;
** '''01''' - Terran&lt;br /&gt;
** '''02''' - Protoss&lt;br /&gt;
** ''03'' - Invalid (Independent), shown as &amp;quot;Unknown&amp;quot; in SC:R lobby&lt;br /&gt;
** ''04'' - Invalid (Neutral), shown as &amp;quot;Unknown&amp;quot;&lt;br /&gt;
** '''05''' - User Select&lt;br /&gt;
** '''06''' - Random (Forced; Acts as a selected race)&lt;br /&gt;
** ''07'' - Inactive, shown as locked &amp;quot;Select Race&amp;quot; option in SC:R lobby&lt;br /&gt;
Italicized settings denote invalid map options. Note Players 9-11 are defaultly Inactive and Player 12 is defaultly Neutral.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MTXM&amp;quot; - StarCraft Terrain==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be less than or equal to 131072 (0x20000) bytes (256 * 256 * 2).''&lt;br /&gt;
&lt;br /&gt;
Terrain section that contains a map of the level's appearance. StarEdit disregards this section and instead uses [[#&amp;quot;TILE&amp;quot; - StarEdit Terrain|TILE]]; it is only used in Starcraft.&lt;br /&gt;
* '''u16[map width * height]''': one integer for each tile.&lt;br /&gt;
Notes about MTXM:&lt;br /&gt;
* The Width/Height of the map is measured in the number of square 32x32p tiles.&lt;br /&gt;
* Tiles in this section are listed from left to right, top to bottom.&lt;br /&gt;
* The values for each integer are their respective &amp;quot;MegaTile&amp;quot; values in the scenario's tileset. If the size of this section is greater than width*height*2, the data following is ignored. If the size of this section is less, the resulting tiles that have not been defined will be null tiles.&lt;br /&gt;
* This section includes doodads as terrain; TILE, which is otherwise identical, doesn't. Out of the terrain sections (TILE, ISOM, and MTXM), SC only reads MTXM for the sake of not having to generate this data on-the-fly: it contains the exact representation of the level's appearance, including doodads. TILE, on the other hand, is directly tied via a tile lookup function to ISOM, and exists for the sake of not having to generate tiles from ISOM on-the-fly in StarEdit.&lt;br /&gt;
* If MTXM section is smaller than (map width*height), then the remaining tiles will be filled with null tiles or tiles specified by previous MTXM sections.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PUNI&amp;quot; - Player Unit Restrictions==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 5700 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains player unit restrictions: it indicates whether the player can or cannot build a particular unit.&lt;br /&gt;
* '''u8[228][12]''': 1 byte for each unit in order of its unit id, then each player, for player availability:&lt;br /&gt;
** '''00''' - That unit is not available for production if the player has 'override defaults' on&lt;br /&gt;
** '''01''' - That unit is available for production if the player has 'override defaults' on&lt;br /&gt;
* '''u8[228]''': 1 byte for each unit in order of it's unit id, for global availability defaults (for all players):&lt;br /&gt;
** '''00''' - That unit is not available for production&lt;br /&gt;
** '''01''' - That unit is available for production&lt;br /&gt;
* '''u8[228][12]''': 1 byte for each unit in order of its unit id, then each player, indicating whether a player uses the global availability defaults.&lt;br /&gt;
** '''00''' - Player overrides defaults for this unit&lt;br /&gt;
** '''01''' - Player uses defaults for this unit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGR&amp;quot; - Upgrade Restrictions==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1748 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;PUPx&amp;quot; - BW Upgrade Restrictions|&amp;quot;PUPx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains player upgrade restrictions: it indicates the starting/maximum levels at/to which a player can perform a particular upgrade.&lt;br /&gt;
* '''u8[46][12]''': 1 byte for the maximum level a player can upgrade to, in order of its upgrade id, then each player&lt;br /&gt;
* '''u8[46][12]''': 1 byte for the level of an upgrade a player starts off with, in order of its upgrade id, then each player&lt;br /&gt;
* '''u8[46]''': 1 byte for the global default maximum level of each upgrade, in order of its upgrade id.&lt;br /&gt;
* '''u8[46]''': 1 byte for the global default starting level of each upgrade, in order of its upgrade id.&lt;br /&gt;
* '''u8[46][12]''': 1 byte for each upgrade in order of its upgrade id, then each player, indicating whether a player uses the global upgrade defaults:&lt;br /&gt;
** '''00''' - Player does not use global upgrade defaults for this upgrade&lt;br /&gt;
** '''01''' - Player uses upgrade defaults for this upgrade&lt;br /&gt;
See [[#List of Upgrade IDs]].&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PTEC&amp;quot; - Tech Restrictions==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 912 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;PTEx&amp;quot; - BW Tech Restrictions|&amp;quot;PTEx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains player technology availability restrictions: it indicates whether a player starts off with a particular technology or can research a particular technology.&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology id, then each player, for player availability:&lt;br /&gt;
** '''00''' - Technology is not available for a player&lt;br /&gt;
** '''01''' - Technology is available for a player&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology id, then each player, for &amp;quot;already researched&amp;quot; status:&lt;br /&gt;
** '''00''' - Technology is not already researched&lt;br /&gt;
** '''01''' - Technology is already researched&lt;br /&gt;
* '''u8[24]''': 1 byte for each technology for global availability defaults:&lt;br /&gt;
** '''00''' - Technology is not available by default&lt;br /&gt;
** '''01''' - Technology is available by default&lt;br /&gt;
* '''u8[24]''': 1 byte for each technology for global &amp;quot;already researched&amp;quot; defaults:&lt;br /&gt;
** '''00''' - Technology is not already researched by default&lt;br /&gt;
** '''01''' - Technology is already researched by default&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology in order of its technology id, then each player, indicating whether a player uses the global defaults:&lt;br /&gt;
** '''00''' - Technology overrides defaults for player&lt;br /&gt;
** '''01''' - Technology uses default settings for player&lt;br /&gt;
See [[#List of Technology IDs]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIT&amp;quot; - Placed Units==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 36 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the pre-placed units on the map and their properties. Each unit on the map gets the following structure:&lt;br /&gt;
* '''u32''': The unit's class instance (sort of a &amp;quot;serial number&amp;quot;)&lt;br /&gt;
* U16''': X coordinate of unit&lt;br /&gt;
* U16''': Y coordinate of unit&lt;br /&gt;
* '''u16''': Unit ID&lt;br /&gt;
* '''u16''': Type of relation to another building (i.e. add-on, nydus link)&lt;br /&gt;
** '''Bit 9''' - Nydus Link&lt;br /&gt;
** '''Bit 10''' - Addon Link&lt;br /&gt;
* '''u16''': Flags of special properties which can be applied to the unit and are valid:&lt;br /&gt;
** '''Bit 0''' - Cloak is valid&lt;br /&gt;
** '''Bit 1''' - Burrow is valid&lt;br /&gt;
** '''Bit 2''' - In transit is valid&lt;br /&gt;
** '''Bit 3''' - Hallucinated is valid&lt;br /&gt;
** '''Bit 4''' - Invincible is valid&lt;br /&gt;
** '''Bit 5-15''' - Unused&lt;br /&gt;
* '''u16''': Out of the elements of the unit data, the properties which can be changed by the map maker:&lt;br /&gt;
** '''Bit 0''' - Owner player is valid (the unit is not a critter, start location, etc.; not a neutral unit)&lt;br /&gt;
** '''Bit 1''' - HP is valid&lt;br /&gt;
** '''Bit 2''' - Shields is valid&lt;br /&gt;
** '''Bit 3''' - Energy is valid (unit is a wraith, etc.)&lt;br /&gt;
** '''Bit 4''' - Resource amount is valid (unit is a mineral patch, vespene geyser, etc.)&lt;br /&gt;
** '''Bit 5''' - Amount in hangar is valid (unit is a reaver, carrier, etc.)&lt;br /&gt;
** '''Bit 6-15''' - Unused&lt;br /&gt;
* '''u8''': Player number of owner (0-based)&lt;br /&gt;
* '''u8''': Hit points % (1-100)&lt;br /&gt;
* '''u8''': Shield points % (1-100)&lt;br /&gt;
* '''u8''': Energy points % (1-100)&lt;br /&gt;
* '''u32''': Resource amount&lt;br /&gt;
* '''u16''': Number of units in hangar&lt;br /&gt;
* '''u16''': Unit state flags&lt;br /&gt;
** '''Bit 0''' - Unit is cloaked&lt;br /&gt;
** '''Bit 1''' - Unit is burrowed&lt;br /&gt;
** '''Bit 2''' - Building is in transit&lt;br /&gt;
** '''Bit 3''' - Unit is hallucinated&lt;br /&gt;
** '''Bit 4''' - Unit is invincible&lt;br /&gt;
** '''Bit 5-15''' - Unused&lt;br /&gt;
* '''u32''': Unused&lt;br /&gt;
* '''u32''': Class instance of the unit to which this unit is related to (i.e. via an add-on, nydus link, etc.). It is &amp;quot;0&amp;quot; if the unit is not linked to any other unit.&lt;br /&gt;
Notes about UNIT:&lt;br /&gt;
* The X/Y coordinates are the center of the sprite of the unit (in pixels).&lt;br /&gt;
* Please edit if you could confirm the bit values to be correct/if you know more bit values.&lt;br /&gt;
* Default values will apply if bit values are unchecked. Defaults: 100% HP, 100% SP, 100% EP, 0 resources, 0 hangar count.&lt;br /&gt;
* This section can be split. Additional UNIT sections will add more units.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;ISOM&amp;quot; - Isometric Terrain==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section is required to place isometric terrain on the map. It provides data about the nature of the isometrical &amp;quot;diamonds&amp;quot; (the editing mode of StarEdit).&lt;br /&gt;
* '''u16[ (width / 2 + 1) * (height + 1) * 4 ]''': 4 integers for each map rectangle tile (plus one extra tile to the right and bottom of the map), as per the RECT structure. Each rectangle border (left, top, right, bottom) is assigned an &amp;quot;ISOM value.&amp;quot; These form the &amp;quot;diamond&amp;quot; pattern of the map, and each rectangle thus gets two ISOM values associated with it. StarEdit somehow hashes these (the exact algorithm is unknown) and thus produces the tile index of the rectangle (which it stores in TILE for reasons of efficiency). The index of the rectangle's right tile is that of its left tile + 16.&lt;br /&gt;
This section is the only truly unknown section of the .chk format. If you're an ex-Blizzard employee or SI, please edit this section. If you have additional research, post on the forums about it and/or edit this section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TILE&amp;quot; - StarEdit Terrain==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section will only be different from the [[#&amp;quot;MTXM&amp;quot; - StarCraft Terrain|MTXM]] section in tiles where doodads are present.&lt;br /&gt;
* '''u16[ map width * height ]''': 1 integer for each map tile. Moves horizontally across the map.&lt;br /&gt;
The values in TILE are normally directly generated from the ISOM section (see &amp;quot;'ISOM' section&amp;quot; above), and thus do not match that of MTXM on doodad tiles.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;DD2 &amp;quot; - StarEdit Sprites (Doodads)==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section contains the doodad map of the level. There are several parts to doodads. The graphical portion is stored in the [[#&amp;quot;MTXM&amp;quot; - StarCraft Terrain|MTXM]] section. The second part of the doodad is stored in this section. This section is only used by the map editor.&lt;br /&gt;
&lt;br /&gt;
Each doodad in the map gets the following structure:&lt;br /&gt;
* '''u16''': Number of the doodad. Size of the doodad is dependent on this. Doodads are different for each tileset.&lt;br /&gt;
* '''u16''': X coordinate of the doodad unit&lt;br /&gt;
* '''u16''': Y coordinate of the doodad unit&lt;br /&gt;
* '''u8''': Player number that owns the doodad&lt;br /&gt;
* '''u8''': Enabled flag&lt;br /&gt;
** '''00''' - Doodad is enabled (trap can attack, door is closed, etc)&lt;br /&gt;
** '''01''' - Doodad is disabled&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;THG2&amp;quot; - StarCraft Sprites==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 10 bytes.''&lt;br /&gt;
&lt;br /&gt;
The map editor only writes to this section. Starcraft uses this section.&lt;br /&gt;
&lt;br /&gt;
Sprites, usually on doodads, get the following structure.&lt;br /&gt;
* '''u16''': Unit/Sprite number of the sprite&lt;br /&gt;
* '''u16''': X coordinate of the doodad unit&lt;br /&gt;
* '''u16''': Y coordinate of the doodad unit&lt;br /&gt;
* '''u8''': Player number that owns the doodad&lt;br /&gt;
* '''u8''': Unused&lt;br /&gt;
* '''u16''': Flags&lt;br /&gt;
** '''Bit 0-11''' - Unused&lt;br /&gt;
** '''Bit 12''' - Draw as sprite (Determines if it is a sprite or a unit sprite)&lt;br /&gt;
** '''Bit 13''' - Unused&lt;br /&gt;
** '''Bit 14''' - Unused&lt;br /&gt;
** '''Bit 15''' - Disabled (Only valid if Draw as sprite is unchecked, disables the unit)&lt;br /&gt;
This section can be split. Additional THG2 sections will add more sprites.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MASK&amp;quot; - Fog of War Layer==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: This section will always validate.''&lt;br /&gt;
&lt;br /&gt;
This section contains the data on fog of war for each player. This is whether at the start of the game that levels of black space that is available.&lt;br /&gt;
* '''u8[ map width * height ]''': One byte for each map tile. The bits indicate for each player the fog of war.&lt;br /&gt;
** '''Bit 0''' - Player 1's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 1''' - Player 2's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 2''' - Player 3's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 3''' - Player 4's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 4''' - Player 5's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 5''' - Player 6's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 6''' - Player 7's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 7''' - Player 8's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
Any size greater than width*height will be ignored. Any size less will default missing tiles to 0xFF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;STR &amp;quot; - String Data==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be at least 1 byte.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the strings in the map.&lt;br /&gt;
* '''u16''': Number of strings in the section (Default''': 1024)&lt;br /&gt;
* '''u16[Number of strings]''': 1 integer for each string specifying the offset (the spot where the string starts in the section from the start of it).&lt;br /&gt;
* '''Strings''': After the offsets, this is where every string in the map goes, one after another. Each one is terminated by a null character.&lt;br /&gt;
This section can contain more or less then 1024 string offsests and will work in Starcraft.&amp;lt;br&amp;gt;&lt;br /&gt;
By default the first byte in '''Strings''' is a NUL character, and all unused offsets in the STR section point to this NUL character.&lt;br /&gt;
Note that STR sections can be stacked in a smiliar fashion as MTXM. The exact mechanisms of this are uncertain.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPRP&amp;quot; - CUWP Slots==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1280 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section is used whenever the create units with properties trigger is used. Since a slot has to be assigned to the action, this is where each slot is designated.&lt;br /&gt;
&lt;br /&gt;
There are 64 of the following structures regardless of how many are used and it cannot exceed 64.&lt;br /&gt;
* '''u16''': Flag of which special properties can be applied to unit, and are valid.&lt;br /&gt;
** '''Bit 0''' - Cloak bit is valid&lt;br /&gt;
** '''Bit 1''' - Burrowed bit is valid&lt;br /&gt;
** '''Bit 2''' - In transit bit is valid&lt;br /&gt;
** '''Bit 3''' - Hallucinated bit is valid&lt;br /&gt;
** '''Bit 4''' - Invincible bit is valid&lt;br /&gt;
** '''Bit 5-15''' - Unknown/unused&lt;br /&gt;
* '''u16''': Which elements of the unit data are valid, which properties can be changed by the map maker.&lt;br /&gt;
** '''Bit 0''' - Owner player is valid (unit is not neutral)&lt;br /&gt;
** '''Bit 1''' - HP is valid&lt;br /&gt;
** '''Bit 2''' - Shields is valid&lt;br /&gt;
** '''Bit 3''' - Energy is valid&lt;br /&gt;
** '''Bit 4''' - Resource amount is valid (unit is a resource)&lt;br /&gt;
** '''Bit 5''' - Amount in hanger is valid&lt;br /&gt;
** '''Bit 6''' - Unknown/unused&lt;br /&gt;
* '''u8''': Player number that owns unit. Will always be NULL in this section (0)&lt;br /&gt;
* '''u8''': Hit point % (1-100)&lt;br /&gt;
* '''u8''': Shield point % (1-100)&lt;br /&gt;
* '''u8''': Energy point % (1-100)&lt;br /&gt;
* '''u32''': Resource amount (for resources only)&lt;br /&gt;
* '''u16''': # of units in hangar&lt;br /&gt;
* '''u16''': Flags&lt;br /&gt;
** '''Bit 0''' - Unit is cloaked&lt;br /&gt;
** '''Bit 1''' - Unit is burrowed&lt;br /&gt;
** '''Bit 2''' - Building is in transit&lt;br /&gt;
** '''Bit 3''' - Unit is hallucinated&lt;br /&gt;
** '''Bit 4''' - Unit is invincible&lt;br /&gt;
** '''Bit 5-15''' - Unknown/unused&lt;br /&gt;
* '''u32''': Unknown/unused. Padding?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPUS&amp;quot; - CUWP Slots Used==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section goes along with the &amp;quot;UPRP&amp;quot; section. This section just indicates which of the 64 unit properties slot are used.&lt;br /&gt;
* '''u8[64]''': 1 byte for each trigger unit properties slot&lt;br /&gt;
** '''00''' - Properties slot is unused&lt;br /&gt;
** '''01''' - Properties slot is used&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MRGN&amp;quot; - Locations==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: 1280 bytes for retail, 5100 bytes for Hybrid and Broodwar.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the locations that the map uses. In a vanilla map, this section contains 64 locations. In a Hybrid or Brood War map, this section will expand to contain 255 locations.&lt;br /&gt;
&lt;br /&gt;
Each location gets one of the following location entries. The 'Anywhere' location, is ALWAYS location 64.&lt;br /&gt;
* '''u32''': Left (X1) coordinate of location, in pixels (usually 32 pt grid aligned)&lt;br /&gt;
* '''u32''': Top (Y1) coordinate of location, in pixels&lt;br /&gt;
* '''u32''': Right (X2) coordinate of location, in pixels&lt;br /&gt;
* '''u32''': Bottom (Y2) coordinate of location, in pixels&lt;br /&gt;
* '''u16''': String number of the name of this location&lt;br /&gt;
* '''u16''': Location elevation flags. If an elevation is disabled in the location, it's bit will be on (1)&lt;br /&gt;
** '''Bit 0''' - Low elevation&lt;br /&gt;
** '''Bit 1''' - Medium elevation&lt;br /&gt;
** '''Bit 2''' - High elevation&lt;br /&gt;
** '''Bit 3''' - Low air&lt;br /&gt;
** '''Bit 4''' - Medium air&lt;br /&gt;
** '''Bit 5''' - High air&lt;br /&gt;
** '''Bit 6-15''' - Unused&lt;br /&gt;
Note that in typical locations Right is always larger than Left and Bottom is always larger than Top. However, you can reverse one or both of these for [[Inverted Locations]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TRIG&amp;quot; - Triggers==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 2400 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the triggers in the map. This along with [[#&amp;quot;MBRF&amp;quot; - Mission Briefings|MBRF]] is the most complicated section in the entire scenario.chk file as there is a lot of data packed into too little of a space. Refer to the appendix at the bottom of this page for more information.&lt;br /&gt;
For easy reference, since each trigger contains 2400 bytes, the amount of triggers can be gotten by taking the section length and dividing by 2400.&lt;br /&gt;
Every single trigger in the map will have the following format:&lt;br /&gt;
* 16 Conditions (20 byte struct)&amp;lt;br&amp;gt; Every trigger has 16 of the following format, even if only one condition is used. See the appendix for information on which items are used for what conditions.&lt;br /&gt;
** '''u32''': Location number for the condition (1 based -- 0 refers to No Location), EUD Bitmask for a Death condition if the MaskFlag is set to &amp;quot;SC&amp;quot;&lt;br /&gt;
** '''u32''': [[#List of Players/Group IDs|Group]] that the condition applies to&lt;br /&gt;
** '''u32''': Qualified number (how many/resource amount)&lt;br /&gt;
** '''u16''': [[#Trigger Unit Types|Unit ID]] condition applies to&lt;br /&gt;
** '''u8''': [[#Numeric Comparisons|Numeric comparison]], [[#Switch States|switch state]]&lt;br /&gt;
** '''u8''': [[#Trigger Conditions List|Condition byte]]&lt;br /&gt;
** '''u8''': [[#Resource Types|Resource type]], [[#Score Types|score type]], Switch number (0-based)&lt;br /&gt;
** '''u8''': Flags&lt;br /&gt;
*** '''Bit 0''' - Unknown/unused&lt;br /&gt;
*** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled/ignored&lt;br /&gt;
*** '''Bit 2''' - Always display flag.&lt;br /&gt;
*** '''Bit 3''' - Unit properties is used. ('''Note:''' This is used in [[TRG|*.trg]] files)&lt;br /&gt;
*** '''Bit 4''' - Unit type is used. Cleared in &amp;quot;Offset + Mask&amp;quot; EUD conditions. May not be necessary otherwise?&lt;br /&gt;
*** '''Bit 5-7''' - Unknown/unused&lt;br /&gt;
** '''u16''': MaskFlag: set to &amp;quot;SC&amp;quot; (0x53, 0x43) when using the bitmask for EUDs, 0 otherwise&lt;br /&gt;
* 64 Actions (32 byte struct)&amp;lt;br&amp;gt; Immediately following the 16 conditions, there are 64 actions. There will always be 64 of the following structure, even if some of them are unused.&lt;br /&gt;
** '''u32''': Location - source location in &amp;quot;Order&amp;quot; and &amp;quot;Move Unit&amp;quot;, dest location in &amp;quot;Move Location&amp;quot; (1 based -- 0 refers to No Location), EUD Bitmask for a Death action if the MaskFlag is set to &amp;quot;SC&amp;quot;&lt;br /&gt;
** '''u32''': String number for trigger text (0 means no string)&lt;br /&gt;
** '''u32''': WAV string number (0 means no string)&lt;br /&gt;
** '''u32''': Seconds/milliseconds of time&lt;br /&gt;
** '''u32''': First (or only) [[#List of Players/Group IDs|Group/Player]] affected.&lt;br /&gt;
** '''u32''': Second group affected, secondary location (1-based), CUWP #, number, AI script (4-byte string), switch (0-based #)&lt;br /&gt;
** '''u16''': [[#Trigger Unit Types|Unit type]], [[#Score Types|score type]], [[#Resource Types|resource type]], [[#Alliance Statuses|alliance status]]&lt;br /&gt;
** '''u8''': [[#Trigger Actions List|Action byte]]&lt;br /&gt;
** '''u8''': Number of units (0 means All Units), [[#Action States|action state]], [[#Unit Orders|unit order]], [[#Number Modifiers|number modifier]]&lt;br /&gt;
** '''u8''': Flags&lt;br /&gt;
*** '''Bit 0''' - Ignore a wait/transmission once.&lt;br /&gt;
*** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled.&lt;br /&gt;
*** '''Bit 2''' - Always display flag - when not set: if the user has turned off subtitles (see sound options) the text will not display, when set: text will always display&lt;br /&gt;
*** '''Bit 3''' - Unit properties is used. Staredit uses this for *.trg files.&lt;br /&gt;
*** '''Bit 4''' - Unit type is used. Cleared in &amp;quot;Offset + Mask&amp;quot; EUD actions.&lt;br /&gt;
*** '''Bit 5-7''' - Unknown/unused&lt;br /&gt;
** '''u8''': Padding&lt;br /&gt;
** '''u16 (2 bytes)''': MaskFlag: set to &amp;quot;SC&amp;quot; (0x53, 0x43) when using the bitmask for EUDs, 0 otherwise&lt;br /&gt;
* Player Execution&amp;lt;br&amp;gt; Following the 16 conditions and 64 actions, every trigger also has this structure&lt;br /&gt;
** '''u32''': execution flags&lt;br /&gt;
*** '''Bit 0''' - All conditions are met, executing actions, cleared on the next trigger loop.&lt;br /&gt;
*** '''Bit 1''' - Ignore the following actions: Defeat, Draw.&lt;br /&gt;
*** '''Bit 2''' - Preserve trigger. (Can replace Preserve Trigger action)&lt;br /&gt;
*** '''Bit 3''' - Ignore execution.&lt;br /&gt;
*** '''Bit 4''' - Ignore all of the following actions for this trigger until the next trigger loop: Wait, PauseGame, Transmission, PlayWAV, DisplayTextMessage, CenterView, MinimapPing, TalkingPortrait, and MuteUnitSpeech.&lt;br /&gt;
*** '''Bit 5''' - This trigger has paused the game, ignoring subsequent calls to Pause Game (Unpause Game clears this flag only in the same trigger), may automatically call unpause at the end of action execution?&lt;br /&gt;
*** '''Bit 6''' - Wait skipping disabled for this trigger, cleared on next trigger loop.&lt;br /&gt;
*** '''Bit 7-31''' - Unknown/unused&lt;br /&gt;
** '''u8[27]''': 1 byte for each player in the [[#List of Players/Group IDs]]&lt;br /&gt;
*** '''00''' - Trigger is not executed for player&lt;br /&gt;
*** '''01''' - Trigger is executed for player&lt;br /&gt;
** '''u8''': Index of the current action, in StarCraft this is incremented after each action is executed, trigger execution ends when this is 64 (Max Actions) or an action is encountered with Action byte as 0&lt;br /&gt;
This section can be split. Additional TRIG sections will add more triggers.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MBRF&amp;quot; - Mission Briefings==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 2400 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all of the mission briefings shown by the players.&lt;br /&gt;
&lt;br /&gt;
See [[#&amp;quot;TRIG&amp;quot; - Triggers|&amp;quot;TRIG&amp;quot;]] section for format, as it is exactly the same except for the conditions. In this section the 16 conditions are still there, they are all null except for the very first condition, which only has a condition byte of 13. See [[#Mission Briefing Actions List]] for the action bytes for the mission briefing actions.&lt;br /&gt;
&lt;br /&gt;
This section can be split. Additional MBRF sections will add more briefing triggers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SPRP&amp;quot; - Scenario Properties==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4 bytes.''&lt;br /&gt;
&lt;br /&gt;
* '''u16''': String number of the scenario name&lt;br /&gt;
* '''u16''': String number of the scenarios description.&lt;br /&gt;
A string index of 0 for the map name will default it to its file name. A string index of 0 description will default to a predefined string.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;FORC&amp;quot; - Force Settings==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be less than or equal to 20 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the forces and the information about them.&lt;br /&gt;
* '''u8[8]''': 1 byte for each active player, specifying which of the 4 forces (0-based) that the player's on&lt;br /&gt;
* '''u16[4]''': 1 integer for each force, string number of the name of the force&lt;br /&gt;
* '''u8[4]''': 1 byte for each force specifying the properties:&lt;br /&gt;
** '''Bit 0''' - Random start location&lt;br /&gt;
** '''Bit 1''' - Allies&lt;br /&gt;
** '''Bit 2''' - Allied victory&lt;br /&gt;
** '''Bit 3''' - Shared vision&lt;br /&gt;
** '''Bit 4-7''' - Unused&lt;br /&gt;
Notes about FORC:&lt;br /&gt;
* If there is no string specified for a force name, it will default to a &amp;quot;Force #&amp;quot; string.&lt;br /&gt;
* If this section is less than 20 bytes, the remaining bytes are defaulted to 0.&lt;br /&gt;
* Players can be on a force greater than 4, however they will not appear in the game lobby.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;WAV &amp;quot; - WAV String Indexes==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
There are 512 wav entires regardless of how many are actually used.&lt;br /&gt;
* '''u32[512]''': 1 long for each WAV. Indicates a string index is used for a WAV path in the MPQ. If the entry is not used, it will be 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIS&amp;quot; - Unit Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4048 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;UNIx&amp;quot; - BW Unit Settings|&amp;quot;UNIx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains the unit settings for the level:&lt;br /&gt;
* '''u8[228]''': 1 byte for each unit, in order of Unit ID&lt;br /&gt;
** '''00''' - Unit does not use default settings&lt;br /&gt;
** '''01''' - Unit does use default settings&lt;br /&gt;
* '''u32[228]''': Hit points for unit (Note the displayed value is this value / 256, with the low byte being a fractional HP value)&lt;br /&gt;
* '''u16[228]''': Shield points, in order of Unit ID&lt;br /&gt;
* '''u8[228]''': Armor points, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Build time (1/60 seconds), in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Mineral cost, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Gas cost, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': String number, in order of Unit ID&lt;br /&gt;
* '''u16[100]''': Base weapon damage the weapon does, in weapon ID order ([[#List of Unit Weapon IDs]])&lt;br /&gt;
* '''u16[100]''': Upgrade bonus weapon damage, in weapon ID order&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGS&amp;quot; - Upgrade Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 598 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;UPGx&amp;quot; - BW Upgrade Settings|&amp;quot;UPGx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains upgrade settings:&lt;br /&gt;
* '''u8[46]''': 1 byte per each upgrade, in order of upgrade id.&lt;br /&gt;
** '''00''' - Upgrade uses custom settings&lt;br /&gt;
** '''01''' - Upgrade uses default settings&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, time factor for each upgrade, in order of upgrade id.&lt;br /&gt;
See [[#List of Upgrade IDs]] for upgrade ids.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TECS&amp;quot; - Tech Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 216 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;TECx&amp;quot; - BW Tech Settings|&amp;quot;TECx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains technology/special abilities settings:&lt;br /&gt;
* '''u8[24]''': 1 byte per each technology, specifies if the tech overrides the default settings. In order of technology id&lt;br /&gt;
** '''00''' - Technology uses custom settings&lt;br /&gt;
** '''01''' - Technology uses default settings&lt;br /&gt;
* '''u16[24]''': Mineral cost to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Gas cost to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Time required to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Energy cost to cast technology/special ability. In order of technology id.&lt;br /&gt;
See [[#List of Technology IDs]] for technology ids.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SWNM&amp;quot; - Switch Names==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section contains the strings used for each switch. There are 256 switches, and can't be any more or any less.&lt;br /&gt;
* '''u32[256]''': One long for each switch, specifies the string number for the name of each switch. Unnamed switches will have an index of 0, and have a default switch name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;COLR&amp;quot; - Player Colors==&lt;br /&gt;
''Required for Brood War only and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 8 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section indicates what color each player is, but only has effect on Brood War.&lt;br /&gt;
* '''u8[8]''': 1 byte for each player, indicates the color of the player&lt;br /&gt;
** '''00''' - Red&lt;br /&gt;
** '''01''' - Blue&lt;br /&gt;
** '''02''' - Teal&lt;br /&gt;
** '''03''' - Purple&lt;br /&gt;
** '''04''' - Orange&lt;br /&gt;
** '''05''' - Brown&lt;br /&gt;
** '''06''' - White&lt;br /&gt;
** '''07''' - Yellow&lt;br /&gt;
** '''08''' - Green&lt;br /&gt;
** '''09''' - Pale yellow&lt;br /&gt;
** '''10''' - Tan&lt;br /&gt;
** '''11''' - Azure (Neutral color)&lt;br /&gt;
Other values can be used but may have different results depending on the tileset. Any color value above 11 is an overflow. As of patch 1.18.6, values above 11 result in default player color.&lt;br /&gt;
&lt;br /&gt;
When CRGB is present, this section still defines leaderboard colors.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;CRGB&amp;quot; - Remastered Player Colors==&lt;br /&gt;
''Requirement unknown, but can be in any map type including non-remaster maps.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 32 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''u8[8][3]''': 3 bytes for each player corresponding to an RGB color value&lt;br /&gt;
** '''u8''': R&lt;br /&gt;
** '''u8''': G&lt;br /&gt;
** '''u8''': B&lt;br /&gt;
* '''u8[8]''': Indicates how to select the color for each player&lt;br /&gt;
** '''0''' - Random Predefined&lt;br /&gt;
** '''1''' - Player's Choice&lt;br /&gt;
** '''2''' - Custom RGB Color (RGB value for the corresponding player defined above)&lt;br /&gt;
** '''3''' - Use &amp;quot;COLR&amp;quot; selection&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PUPx&amp;quot; - BW Upgrade Restrictions==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2318 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UPGR&amp;quot; - Upgrade Restrictions|&amp;quot;UPGR&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is identical to UPGR section except it uses the Brood War set of 61 upgrades instead of the original 46.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PTEx&amp;quot; - BW Tech Restrictions==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1672 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;PTEC&amp;quot; - Tech Restrictions|&amp;quot;PTEC&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is identical to PTEC section except it uses the Brood War set of 44 technologies instead of the original 24.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIx&amp;quot; - BW Unit Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4168 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UNIS&amp;quot; - Unit Settings|&amp;quot;UNIS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is indentical to UNIS section except it uses the Brood War set of 130 weapons instead of the original 100.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGx&amp;quot; - BW Upgrade Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 794 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UPGS&amp;quot; - Upgrade Settings|&amp;quot;UPGS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section the same as UPGS except section except it uses the Brood War set of 61 upgrades instead of the original 46, and there is an unused byte after the first set:&lt;br /&gt;
* '''u8[61]''': 1 byte per each upgrade, in order of upgrade id.&lt;br /&gt;
** '''00''' - Upgrade uses custom settings&lt;br /&gt;
** '''01''' - Upgrade uses default settings&lt;br /&gt;
* '''u8''': Unused.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, time factor for each upgrade, in order of upgrade id.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TECx&amp;quot; - BW Tech Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 396 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;TECS&amp;quot; - Tech Settings|&amp;quot;TECS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is indentical to TECS section except it uses the Brood War set of 44 technologies instead of the original 24.&lt;br /&gt;
&lt;br /&gt;
=Appendix=&lt;br /&gt;
A set of references and IDs that should help you easier in the trigger section and the technology/player ids, etc:&lt;br /&gt;
&lt;br /&gt;
==Trigger Conditions List==&lt;br /&gt;
* 0 = No Condition&lt;br /&gt;
* 1 = Countdown Timer(Comparison, QNumber)&lt;br /&gt;
* 2 = Command(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 3 = Bring(Player, Comparison, TUnit, Loc, QNumber)&lt;br /&gt;
* 4 = Accumulate(Player, Comparison, QNumber, ResType)&lt;br /&gt;
* 5 = Kill(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 6 = Command the Most(TUnit)&lt;br /&gt;
* 7 = Commands the Most At(TUnit, Loc)&lt;br /&gt;
* 8 = Most Kills(TUnit)&lt;br /&gt;
* 9 = Highest Score(Score)&lt;br /&gt;
* 10 = Most Resources(ResType)&lt;br /&gt;
* 11 = Switch(Switch)&lt;br /&gt;
* 12 = Elapsed Time(Comparison, QNumber)&lt;br /&gt;
* 13 = Data is a Mission Briefing. Conditions are N/A (Same as Never)&lt;br /&gt;
* 14 = Opponents(Player, Comparison, QNumber)&lt;br /&gt;
* 15 = Deaths(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 16 = Command the Least(TUnit)&lt;br /&gt;
* 17 = Command the Least At(TUnit, Loc)&lt;br /&gt;
* 18 = Least Kills(TUnit)&lt;br /&gt;
* 19 = Lowest Score(Score)&lt;br /&gt;
* 20 = Least Resources(ResType)&lt;br /&gt;
* 21 = Score(Player, Comparison, Score, QNumber)&lt;br /&gt;
* 22 = Always (Same as No Condition)&lt;br /&gt;
* 23 = Never&lt;br /&gt;
&lt;br /&gt;
==Trigger Actions List==&lt;br /&gt;
* 0 = No Action&lt;br /&gt;
* 1 = Victory&lt;br /&gt;
* 2 = Defeat&lt;br /&gt;
* 3 = Preserve Trigger&lt;br /&gt;
* 4 = Wait(Time)&lt;br /&gt;
* 5 = Pause Game (Single player only)&lt;br /&gt;
* 6 = Unpause Game (Single player only)&lt;br /&gt;
* 7 = Transmission(Text, Unit, Loc, Time, Modifier, Wave, WavTime)&lt;br /&gt;
* 8 = Play WAV(Wav, WavTime)&lt;br /&gt;
* 9 = Display Text Message(Text)&lt;br /&gt;
* 10 = Center View(Loc)&lt;br /&gt;
* 11 = Create Unit with Properties(Player, Unit, Number, Loc, UnitProp)&lt;br /&gt;
* 12 = Set Mission Objectives(Text)&lt;br /&gt;
* 13 = Set Switch(Switch, SwAction)&lt;br /&gt;
* 14 = Set Countdown Timer(Time, Modifier)&lt;br /&gt;
* 15 = Run AI Script(AIScript)&lt;br /&gt;
* 16 = Run AI Script At Location(AIScript)&lt;br /&gt;
* 17 = Leader Board (Control) (Text, TUnit)&lt;br /&gt;
* 18 = Leader Board (Control At Location) (Text, TUnit, Loc)&lt;br /&gt;
* 19 = Leader Board (Resources) (Text, ResType)&lt;br /&gt;
* 20 = Leader Board (Kills) (Text, TUnit)&lt;br /&gt;
* 21 = Leader Board (Points) (Text, Score)&lt;br /&gt;
* 22 = Kill Unit (Player, TUnit)&lt;br /&gt;
* 23 = Kill Unit At Location(Player, TUnit, Number, Loc)&lt;br /&gt;
* 24 = Remove Unit(Player, TUnit)&lt;br /&gt;
* 25 = Remove Unit At Location(Player, TUnit, Number, Loc)&lt;br /&gt;
* 26 = Set Resources(Player, Number, Modifier, ResType)&lt;br /&gt;
* 27 = Set Score(Player, Number, Modifier, Score)&lt;br /&gt;
* 28 = Minimap Ping(Loc)&lt;br /&gt;
* 29 = Talking Portrait(Unit, Time)&lt;br /&gt;
* 30 = Mute Unit Speech&lt;br /&gt;
* 31 = Unmute Unit Speech&lt;br /&gt;
* 32 = Leaderboard Computer Players(State)&lt;br /&gt;
* 33 = Leaderboard Goal (Control) (Text, TUnit, Number)&lt;br /&gt;
* 34 = Leaderboard Goal (Control At Location) (Text, TUnit, Number, Loc)&lt;br /&gt;
* 35 = Leaderboard Goal (Resources) (Text, TUnit, Number, ResType)&lt;br /&gt;
* 36 = Leaderboard Goal (Kills) (Text, TUnit, Number)&lt;br /&gt;
* 37 = Leaderboard Goal (Points) (Text, Number, Score)&lt;br /&gt;
* 38 = Move Location(Player, TUnit, SLoc, DLoc)&lt;br /&gt;
* 39 = Move Unit(Player, TUnit, Number, SLoc, DLoc)&lt;br /&gt;
* 40 = Leaderboard (Greed) (Number)&lt;br /&gt;
* 41 = Set Next Scenario(Text) (Single player only)&lt;br /&gt;
* 42 = Set Doodad State(Player, TUnit, Loc, State)&lt;br /&gt;
* 43 = Set Invincibility(Player, TUnit, Loc, State)&lt;br /&gt;
* 44 = Create Unit(Player, Unit, Number, Loc)&lt;br /&gt;
* 45 = Set Deaths(Player, TUnit, Number, Modifier)&lt;br /&gt;
* 46 = Order(Player, TUnit, SLoc, DLoc, Order)&lt;br /&gt;
* 47 = Comment(Text)&lt;br /&gt;
* 48 = Give Units to Player(SPlayer, DPlayer, TUnit, Number, Loc)&lt;br /&gt;
* 49 = Modify Unit Hit Points(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 50 = Modify Unit Energy(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 51 = Modify Unit Shield Points(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 52 = Modify Unit Resource Amount(Player, Number, ModAmount, Loc)&lt;br /&gt;
* 53 = Modify Unit Hanger Count(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 54 = Pause Timer&lt;br /&gt;
* 55 = Unpause Timer&lt;br /&gt;
* 56 = Draw&lt;br /&gt;
* 57 = Set Alliance Status(Player, AllyStatus)&lt;br /&gt;
* 58 = Disable Debug Mode (Single player only)&lt;br /&gt;
* 59 = Enable Debug Mode (Single player only)&lt;br /&gt;
&lt;br /&gt;
==Mission Briefing Actions List==&lt;br /&gt;
* 0 - No Action&lt;br /&gt;
* 1 - Wait(Time)&lt;br /&gt;
* 2 - Play WAV(Wave, WavTime)&lt;br /&gt;
* 3 - Text Message(Text, Time)&lt;br /&gt;
* 4 - Mission Objectives(Text)&lt;br /&gt;
* 5 - Show Portrait(Unit, Slot)&lt;br /&gt;
* 6 - Hide Portrait(Slot)&lt;br /&gt;
* 7 - Display Speaking Portrait(Slot, Time)&lt;br /&gt;
* 8 - Transmission(Text, Slot, Time, Modifier, Wave, WavTime)&lt;br /&gt;
* 9 - Skip Tutorial Enabled&lt;br /&gt;
&lt;br /&gt;
==Switch States==&lt;br /&gt;
* 2 = Switch is set&lt;br /&gt;
* 3 = Switch is cleared&lt;br /&gt;
&lt;br /&gt;
==Numeric Comparisons==&lt;br /&gt;
* 0 = At least&lt;br /&gt;
* 1 = At most&lt;br /&gt;
* 10 = Exactly&lt;br /&gt;
&lt;br /&gt;
==Score Types==&lt;br /&gt;
* 0 = Total&lt;br /&gt;
* 1 = Units&lt;br /&gt;
* 2 = Buildings&lt;br /&gt;
* 3 = Units and Buildings&lt;br /&gt;
* 4 = Kills&lt;br /&gt;
* 5 = Razings&lt;br /&gt;
* 6 = Kills and Razings&lt;br /&gt;
* 7 = Custom&lt;br /&gt;
&lt;br /&gt;
==Resource Types==&lt;br /&gt;
* 0 = Ore&lt;br /&gt;
* 1 = Gas&lt;br /&gt;
* 2 = Ore and Gas&lt;br /&gt;
&lt;br /&gt;
==Alliance Statuses==&lt;br /&gt;
* 0 = Enemy&lt;br /&gt;
* 1 = Ally&lt;br /&gt;
* 2 = Allied Victory&lt;br /&gt;
&lt;br /&gt;
==Unit Orders==&lt;br /&gt;
* 0 = Move&lt;br /&gt;
* 1 = Patrol&lt;br /&gt;
* 2 = Attack&lt;br /&gt;
&lt;br /&gt;
==Action States==&lt;br /&gt;
* 4 = Enabled/Set switch&lt;br /&gt;
* 5  = Disabled/Clear switch&lt;br /&gt;
* 6 = Toggle/Toggle switch&lt;br /&gt;
* 11 = Randomize switch&lt;br /&gt;
&lt;br /&gt;
==Number Modifiers==&lt;br /&gt;
* 7 = Set to&lt;br /&gt;
* 8 = Add&lt;br /&gt;
* 9 = Subtract&lt;br /&gt;
&lt;br /&gt;
==Trigger Unit Types==&lt;br /&gt;
* All normal units (0-227)&lt;br /&gt;
* 228 = None&lt;br /&gt;
* 229 = Any unit&lt;br /&gt;
* 230 = Men&lt;br /&gt;
* 231 = Buildings&lt;br /&gt;
* 232 = Factories&lt;br /&gt;
&lt;br /&gt;
==List of Players/Group IDs==&lt;br /&gt;
* 0 = Player 1&lt;br /&gt;
* 1 = Player 2&lt;br /&gt;
* 2 = Player 3&lt;br /&gt;
* 3 = Player 4&lt;br /&gt;
* 4 = Player 5&lt;br /&gt;
* 5 = Player 6&lt;br /&gt;
* 6 = Player 7&lt;br /&gt;
* 7 = Player 8&lt;br /&gt;
* 8 = Player 9&lt;br /&gt;
* 9 = Player 10&lt;br /&gt;
* 10 = Player 11&lt;br /&gt;
* 11 = Player 12&lt;br /&gt;
* 12 = None (Unused, One-entry Overflow in some cases)&lt;br /&gt;
* 13 = Current Player&lt;br /&gt;
* 14 = Foes&lt;br /&gt;
* 15 = Allies&lt;br /&gt;
* 16 = Neutral Players&lt;br /&gt;
* 17 = All Players&lt;br /&gt;
* 18 = Force 1&lt;br /&gt;
* 19 = Force 2&lt;br /&gt;
* 20 = Force 3&lt;br /&gt;
* 21 = Force 4&lt;br /&gt;
* 22 = Unused 1&lt;br /&gt;
* 23 = Unused 2&lt;br /&gt;
* 24 = Unused 3&lt;br /&gt;
* 25 = Unused 4&lt;br /&gt;
* 26 = Non Allied Victory Players&lt;br /&gt;
&lt;br /&gt;
==List of Technology IDs==&lt;br /&gt;
* 0 = Stim Packs&lt;br /&gt;
* 1 = Lockdown&lt;br /&gt;
* 2 = EMP Shockwave&lt;br /&gt;
* 3 = Spider Mines&lt;br /&gt;
* 4 = Scanner Sweep&lt;br /&gt;
* 5 = Siege Mode&lt;br /&gt;
* 6 = Defensive Matrix&lt;br /&gt;
* 7 = Irradiate&lt;br /&gt;
* 8 = Yamato Gun&lt;br /&gt;
* 9 = Cloaking Field&lt;br /&gt;
* 10 = Personnel Cloaking&lt;br /&gt;
* 11 = Burrowing&lt;br /&gt;
* 12 = Infestation&lt;br /&gt;
* 13 = Spawn Broodling&lt;br /&gt;
* 14 = Dark Swarm&lt;br /&gt;
* 15 = Plague&lt;br /&gt;
* 16 = Consume&lt;br /&gt;
* 17 = Ensnare&lt;br /&gt;
* 18 = Parasite&lt;br /&gt;
* 19 = Psionic Storm&lt;br /&gt;
* 20 = Hallucination&lt;br /&gt;
* 21 = Recall&lt;br /&gt;
* 22 = Stasis Field&lt;br /&gt;
* 23 = Archon Warp&lt;br /&gt;
* 24 = Restoration&lt;br /&gt;
* 25 = Disruption Web&lt;br /&gt;
* 26 = Unused 26&lt;br /&gt;
* 27 = Mind Control&lt;br /&gt;
* 28 = Dark Archon Meld&lt;br /&gt;
* 29 = Feedback&lt;br /&gt;
* 30 = Optical Flare&lt;br /&gt;
* 31 = Maelstorm&lt;br /&gt;
* 32 = Lurker Aspect&lt;br /&gt;
* 33 = Unused 33&lt;br /&gt;
* 34 = Healing&lt;br /&gt;
* 35 = Unused 35&lt;br /&gt;
* 36 = Unused 36&lt;br /&gt;
* 37 = Unused 37&lt;br /&gt;
* 38 = Unused 38&lt;br /&gt;
* 39 = Unused 39&lt;br /&gt;
* 40 = Unused 40&lt;br /&gt;
* 41 = Unused 41&lt;br /&gt;
* 42 = Unused 42&lt;br /&gt;
* 43 = Unused 43&lt;br /&gt;
&lt;br /&gt;
==List of Upgrade IDs==&lt;br /&gt;
* 0 = Terran Infantry Armor&lt;br /&gt;
* 1 = Terran Vehicle Plating&lt;br /&gt;
* 2 = Terran Ship Plating&lt;br /&gt;
* 3 = Zerg Carapace&lt;br /&gt;
* 4 = Zerg Flyer Caparace&lt;br /&gt;
* 5 = Protoss Armor&lt;br /&gt;
* 6 = Protoss Plating&lt;br /&gt;
* 7 = Terran Infantry Weapons&lt;br /&gt;
* 8 = Terran Vehicle Weapons&lt;br /&gt;
* 9 = Terran Ship Weapons&lt;br /&gt;
* 10 = Zerg Melee Attacks&lt;br /&gt;
* 11 = Zerg Missile Attacks&lt;br /&gt;
* 12 = Zerg Flyer Attacks&lt;br /&gt;
* 13 = Protoss Ground Weapons&lt;br /&gt;
* 14 = Protoss Air Weapons&lt;br /&gt;
* 15 = Protoss Plasma Shields&lt;br /&gt;
* 16 = U-238 Shells&lt;br /&gt;
* 17 = Ion Thrusters&lt;br /&gt;
* 18 = Burst Lasers (Unused)&lt;br /&gt;
* 19 = Titan Reactor (SV +50)&lt;br /&gt;
* 20 = Ocular Implants&lt;br /&gt;
* 21 = Moebius Reactor (Ghost +50)&lt;br /&gt;
* 22 = Apollo Reactor (Wraith +50)&lt;br /&gt;
* 23 = Colossus Reactor (BC +50)&lt;br /&gt;
* 24 = Ventral Sacs&lt;br /&gt;
* 25 = Antennae&lt;br /&gt;
* 26 = Pneumatized Carapace&lt;br /&gt;
* 27 = Metabolic Boost&lt;br /&gt;
* 28 = Adrenal Glands&lt;br /&gt;
* 29 = Muscular Augments&lt;br /&gt;
* 30 = Grooved Spines&lt;br /&gt;
* 31 = Gamete Meiosis (Queen +50)&lt;br /&gt;
* 32 = Metasynaptic Node (Defiler +50)&lt;br /&gt;
* 33 = Singularity Charge&lt;br /&gt;
* 34 = Leg Enhancements&lt;br /&gt;
* 35 = Scarab Damage &lt;br /&gt;
* 36 = Reaver Capacity &lt;br /&gt;
* 37 = Gravitic Drive&lt;br /&gt;
* 38 = Sensor Array&lt;br /&gt;
* 39 = Gravitic Boosters&lt;br /&gt;
* 40 = Khaydarin Amulet (HT +50)&lt;br /&gt;
* 41 = Apial Sensors&lt;br /&gt;
* 42 = Gravitic Thrusters&lt;br /&gt;
* 43 = Carrier Capacity&lt;br /&gt;
* 44 = Khaydarin Core (Arbiter +50)&lt;br /&gt;
* 45 = Unknown Upgrade45&lt;br /&gt;
* 46 = Unknown Upgrade46&lt;br /&gt;
* 47 = Argus Jewel (Corsair +50)&lt;br /&gt;
* 48 = Unknown Upgrade48&lt;br /&gt;
* 49 = Argus Talisman (DA +50)&lt;br /&gt;
* 50 = Unknown Upgrade50&lt;br /&gt;
* 51 = Caduceus Reactor (Medic +50)&lt;br /&gt;
* 52 = Chitinous Plating&lt;br /&gt;
* 53 = Anabolic Synthesis&lt;br /&gt;
* 54 = Charon Booster&lt;br /&gt;
* 55 = Unknown Upgrade55&lt;br /&gt;
* 56 = Unknown Upgrade56&lt;br /&gt;
* 57 = Unknown Upgrade57&lt;br /&gt;
* 58 = Unknown Upgrade58&lt;br /&gt;
* 59 = Unknown Upgrade59&lt;br /&gt;
* 60 = Unknown Upgrade60&lt;br /&gt;
&lt;br /&gt;
==List of Unit Weapon IDs==&lt;br /&gt;
* 0 = Gauss Rifle (Normal)&lt;br /&gt;
* 1 = Gauss Rifle (Jim Raynor-Marine)&lt;br /&gt;
* 2 = C-10 Concussion Rifle (Normal)&lt;br /&gt;
* 3 = C-10 Concussion Rifle (Sarah Kerrigan)&lt;br /&gt;
* 4 = Fragmentation Grenade (Normal)&lt;br /&gt;
* 5 = Fragmentation Grenade (Jim Raynor-Vulture)&lt;br /&gt;
* 6 = Spider Mines&lt;br /&gt;
* 7 = Twin Autocannons (Normal)&lt;br /&gt;
* 8 = Hellfire Missile Pack (Normal)&lt;br /&gt;
* 9 = Twin Autocannons (Alan Schezar)&lt;br /&gt;
* 10 = Hellfire Missile Pack (Alan Schezar)&lt;br /&gt;
* 11 = Arclite Cannon (Normal)&lt;br /&gt;
* 12 = Arclite Cannon (Edmund Duke)&lt;br /&gt;
* 13 = Fusion Cutter&lt;br /&gt;
* 14 = Fusion Cutter (Harvest)&lt;br /&gt;
* 15 = Gemini Missiles (Normal)&lt;br /&gt;
* 16 = Burst Lasers (Normal)&lt;br /&gt;
* 17 = Gemini Missiles (Tom Kazansky)&lt;br /&gt;
* 18 = Burst Lasers (Tom Kazansky)&lt;br /&gt;
* 19 = ATS Laser Battery (Normal)&lt;br /&gt;
* 20 = ATA Laser Battery (Normal)&lt;br /&gt;
* 21 = ATS Laser Battery (Norad II+Mengsk+DuGalle)&lt;br /&gt;
* 22 = ATA Laser Battery (Norad II+Mengsk+DuGalle)&lt;br /&gt;
* 23 = ATS Laser Battery (Hyperion)&lt;br /&gt;
* 24 = ATA Laser Battery (Hyperion)&lt;br /&gt;
* 25 = Flame Thrower (Normal)&lt;br /&gt;
* 26 = Flame Thrower (Gui Montag)&lt;br /&gt;
* 27 = Arclite Shock Cannon (Normal)&lt;br /&gt;
* 28 = Arclite Shock Cannon (Edmund Duke)&lt;br /&gt;
* 29 = Longbolt Missiles&lt;br /&gt;
* 30 = Yamato Gun&lt;br /&gt;
* 31 = Nuclear Missile&lt;br /&gt;
* 32 = Lockdown&lt;br /&gt;
* 33 = EMP Shockwave&lt;br /&gt;
* 34 = Irradiate&lt;br /&gt;
* 35 = Claws (Normal)&lt;br /&gt;
* 36 = Claws (Devouring One)&lt;br /&gt;
* 37 = Claws (Infested Kerrigan)&lt;br /&gt;
* 38 = Needle Spines (Normal)&lt;br /&gt;
* 39 = Needle Spines (Hunter Killer)&lt;br /&gt;
* 40 = Kaiser Blades (Normal)&lt;br /&gt;
* 41 = Kaiser Blades (Torrasque)&lt;br /&gt;
* 42 = Toxic Spores (Broodling)&lt;br /&gt;
* 43 = Spines&lt;br /&gt;
* 44 = Spines (Harvest)&lt;br /&gt;
* 45 = Acid Spray (Unused)&lt;br /&gt;
* 46 = Acid Spore (Normal)&lt;br /&gt;
* 47 = Acid Spore (Kukulza-Guardian)&lt;br /&gt;
* 48 = Glave Wurm (Normal)&lt;br /&gt;
* 49 = Glave Wurm (Kukulza-Mutalisk)&lt;br /&gt;
* 50 = Venom (Unused-Defiler)&lt;br /&gt;
* 51 = Venom (Unused-Defiler Hero)&lt;br /&gt;
* 52 = Seeker Spores&lt;br /&gt;
* 53 = Subterranean Tentacle&lt;br /&gt;
* 54 = Suicide (Infested Terran)&lt;br /&gt;
* 55 = Suicide (Scourge)&lt;br /&gt;
* 56 = Parasite&lt;br /&gt;
* 57 = Spawn Broodlings&lt;br /&gt;
* 58 = Ensnare&lt;br /&gt;
* 59 = Dark Swarm&lt;br /&gt;
* 60 = Plague&lt;br /&gt;
* 61 = Consume&lt;br /&gt;
* 62 = Particle Beam&lt;br /&gt;
* 63 = Particle Beam (Harvest)&lt;br /&gt;
* 64 = Psi Blades (Normal)&lt;br /&gt;
* 65 = Psi Blades (Fenix-Zealot)&lt;br /&gt;
* 66 = Phase Disruptor (Normal)&lt;br /&gt;
* 67 = Phase Disruptor (Fenix-Dragoon)&lt;br /&gt;
* 68 = Psi Assault (Normal-Unused)&lt;br /&gt;
* 69 = Psi Assault (Tassadar+Aldaris)&lt;br /&gt;
* 70 = Psionic Shockwave (Normal)&lt;br /&gt;
* 71 = Psionic Shockwave (Tassadar/Zeratul Archon)&lt;br /&gt;
* 72 = Unknown72&lt;br /&gt;
* 73 = Dual Photon Blasters (Normal)&lt;br /&gt;
* 74 = Anti-matter Missiles (Normal)&lt;br /&gt;
* 75 = Dual Photon Blasters (Mojo)&lt;br /&gt;
* 76 = Anit-matter Missiles (Mojo)&lt;br /&gt;
* 77 = Phase Disruptor Cannon (Normal)&lt;br /&gt;
* 78 = Phase Disruptor Cannon (Danimoth)&lt;br /&gt;
* 79 = Pulse Cannon&lt;br /&gt;
* 80 = STS Photon Cannon&lt;br /&gt;
* 81 = STA Photon Cannon&lt;br /&gt;
* 82 = Scarab&lt;br /&gt;
* 83 = Stasis Field&lt;br /&gt;
* 84 = Psi Storm&lt;br /&gt;
* 85 = Warp Blades (Zeratul)&lt;br /&gt;
* 86 = Warp Blades (Dark Templar Hero)&lt;br /&gt;
* 87 = Missiles (Unused)&lt;br /&gt;
* 88 = Laser Battery1 (Unused)&lt;br /&gt;
* 89 = Tormentor Missiles (Unused)&lt;br /&gt;
* 90 = Bombs (Unused)&lt;br /&gt;
* 91 = Raider Gun (Unused)&lt;br /&gt;
* 92 = Laser Battery2 (Unused)&lt;br /&gt;
* 93 = Laser Battery3 (Unused)&lt;br /&gt;
* 94 = Dual Photon Blasters (Unused)&lt;br /&gt;
* 95 = Flechette Grenade (Unused)&lt;br /&gt;
* 96 = Twin Autocannons (Floor Trap)&lt;br /&gt;
* 97 = Hellfire Missile Pack (Wall Trap)&lt;br /&gt;
* 98 = Flame Thrower (Wall Trap)&lt;br /&gt;
* 99 = Hellfire Missile Pack (Floor Trap)&lt;br /&gt;
* 100 = Neutron Flare&lt;br /&gt;
* 101 = Disruption Web&lt;br /&gt;
* 102 = Restoration&lt;br /&gt;
* 103 = Halo Rockets&lt;br /&gt;
* 104 = Corrosive Acid&lt;br /&gt;
* 105 = Mind Control&lt;br /&gt;
* 106 = Feedback&lt;br /&gt;
* 107 = Optical Flare&lt;br /&gt;
* 108 = Maelstrom&lt;br /&gt;
* 109 = Subterranean Spines&lt;br /&gt;
* 110 = Gauss Rifle0 (Unused)&lt;br /&gt;
* 111 = Warp Blades (Normal)&lt;br /&gt;
* 112 = C-10 Concussion Rifle (Samir Duran)&lt;br /&gt;
* 113 = C-10 Concussion Rifle (Infested Duran)&lt;br /&gt;
* 114 = Dual Photon Blasters (Artanis)&lt;br /&gt;
* 115 = Anti-matter Missiles (Artanis)&lt;br /&gt;
* 116 = C-10 Concussion Rifle (Alexei Stukov)&lt;br /&gt;
* 117 = Gauss Rifle1 (Unused)&lt;br /&gt;
* 118 = Gauss Rifle2 (Unused)&lt;br /&gt;
* 119 = Gauss Rifle3 (Unused)&lt;br /&gt;
* 120 = Gauss Rifle4 (Unused)&lt;br /&gt;
* 121 = Gauss Rifle5 (Unused)&lt;br /&gt;
* 122 = Gauss Rifle6 (Unused)&lt;br /&gt;
* 123 = Gauss Rifle7 (Unused)&lt;br /&gt;
* 124 = Gauss Rifle8 (Unused)&lt;br /&gt;
* 125 = Gauss Rifle9 (Unused)&lt;br /&gt;
* 126 = Gauss Rifle10 (Unused)&lt;br /&gt;
* 127 = Gauss Rifle11 (Unused)&lt;br /&gt;
* 128 = Gauss Rifle12 (Unused)&lt;br /&gt;
* 129 = Gauss Rifle13 (Unused)&lt;br /&gt;
* 130 = None&lt;br /&gt;
&lt;br /&gt;
==Complete Modifier List==&lt;br /&gt;
* 0 = Condition: &amp;gt;= (greater than or equal to)&lt;br /&gt;
* 1 = Condition: &amp;lt;= (less than or equal to)&lt;br /&gt;
* 2 = Condition: == TRUE (Is True)&lt;br /&gt;
* 3 = Condition: == FALSE (Is False)&lt;br /&gt;
* 4 = Action: = TRUE (Set to True)&lt;br /&gt;
* 5 = Action: = FALSE (Set to False)&lt;br /&gt;
* 6 = Action: NOT (toggle)&lt;br /&gt;
* 7 = Action: = (Set to)&lt;br /&gt;
* 8 = Action: += (Add)&lt;br /&gt;
* 9 = Action: -= (Subtract)&lt;br /&gt;
* 10 = Condition: == (Exactly)&lt;br /&gt;
* 11 = Action: Randomize&lt;br /&gt;
&lt;br /&gt;
[[Category:StarCraft]]&lt;br /&gt;
[[Category:Reference]]&lt;/div&gt;</summary>
		<author><name>FaRTy1billion</name></author>	</entry>

	<entry>
		<id>https://staredit.net/wiki/index.php?title=Scenario.chk&amp;diff=657</id>
		<title>Scenario.chk</title>
		<link rel="alternate" type="text/html" href="https://staredit.net/wiki/index.php?title=Scenario.chk&amp;diff=657"/>
				<updated>2022-01-23T22:14:08Z</updated>
		
		<summary type="html">&lt;p&gt;FaRTy1billion: /* &amp;quot;TECx&amp;quot; - BW Tech Settings */ replaced &amp;quot;UNIS&amp;quot; with &amp;quot;TECS&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The CHK file is a very dense file found inside the SCM or SCX file (as &amp;quot;staredit\scenario.chk&amp;quot;), which is just a renamed MPQ archive.&lt;br /&gt;
&lt;br /&gt;
In this article, some shorthand will be used for datatypes:&lt;br /&gt;
* '''u8''' for an unsigned byte&lt;br /&gt;
* '''u16''' for an unsigned short (2-byte integer)&lt;br /&gt;
* '''u32''' for an unsigned int (4-byte integer)&lt;br /&gt;
* '''uT[''a'']''' for an array of datatype '''T''' (8, 16, 32) with '''''a''''' number of elements&lt;br /&gt;
* '''uT[''a''][''b'']''' for a two-dimensional array of datatype '''T''', where each element of '''T[''a'']''' will be an array of size '''''b'''''&lt;br /&gt;
&lt;br /&gt;
=Sections=&lt;br /&gt;
The CHK is split into several named chunks (hence the file extension, an abbreviation of ''CHunK'').&lt;br /&gt;
&lt;br /&gt;
Each section begins with an 8-byte header:&lt;br /&gt;
* '''u32''' Name - A 4-byte string uniquely identifying that chunk's purpose.&lt;br /&gt;
* '''u32''' Size - The size, in bytes, of the chunk (not including this header)&lt;br /&gt;
Followed by as many bytes as 'Size', in a format described below.&lt;br /&gt;
&lt;br /&gt;
Some things to keep in mind about the CHK section:&lt;br /&gt;
* Invalid sections can exist and will be ignored. While Size is unsigned, it can safely be a negative value to read a chunk earlier in the file. This allows for &amp;quot;section stacking&amp;quot;, allowing smaller sections to be placed inside of larger ones or duplicate triggers or units to take less space in the file.&lt;br /&gt;
* All sections will marked &amp;quot;Not required.&amp;quot; are never read by StarCraft and can safely be omitted. However they may or may not be read by StarEdit, and may cause the map to be unreadable in an editor.&lt;br /&gt;
* Note &amp;quot;Hybrid&amp;quot;, or &amp;quot;Enhanced&amp;quot;, maps were introduced in 1.04. They are supported both by Original StarCraft and Brood War and usually contain sections for both types (e.g., UPGS and UPGx, TECS and TECx), but both sections aren't necessarily read.&lt;br /&gt;
* Duplicate sections will overwrite previously defined section data, except where noted. Note this only applies to those section that pass the specified &amp;quot;validation&amp;quot; parameters, as any section that does not successfully validate will be ignored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TYPE&amp;quot; - Map Type==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the type of scenario.&lt;br /&gt;
* '''u32''': Specifies the type of scenario:&lt;br /&gt;
** '''0x53574152''' or '''RAWS''' - 1.04 StarCraft and above (&amp;quot;hybrid&amp;quot;)&lt;br /&gt;
** '''0x42574152''' or '''RAWB''' - Brood War&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;VER &amp;quot; - Format Version==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section identifies the file format version.&lt;br /&gt;
* '''u16''': File format version:&lt;br /&gt;
** '''59''' - Starcraft 1.00 (original retail release)&lt;br /&gt;
** '''63''' - Starcraft 1.04 ''(hybrid)''&lt;br /&gt;
** '''64''' - Starcraft Remastered (1.21) ''(hybrid)''&lt;br /&gt;
** '''205''' - Brood War 1.00 ''(1.04)''&lt;br /&gt;
** '''206''' - Starcraft Remastered (1.21) ''(broodwar)''&lt;br /&gt;
This is the only version code section to actually be read by StarCraft (of TYPE, VER , IVER, and IVE2). Any other value is invalid in retail StarCraft and is usually a beta version.&lt;br /&gt;
&lt;br /&gt;
Other unsupported versions include:&lt;br /&gt;
* '''0-19''' - ''Warcraft II versions (.PUD)''&lt;br /&gt;
* '''47''' - ''Starcraft Beta''&lt;br /&gt;
* '''61''' - Brood War internal (map version 61)&lt;br /&gt;
* '''75''' - Brood War internal (map version 75)&lt;br /&gt;
* '''201''' - Brood War internal (map version 201)&lt;br /&gt;
* '''203''' - Brood War internal (map version 203)&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IVER&amp;quot; - Map Version==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section &amp;quot;additionally identifies&amp;quot; the map version.&lt;br /&gt;
* '''u16''': &amp;quot;Additional file format version:&amp;quot;&lt;br /&gt;
** '''9''' - beta/obsolete versions&lt;br /&gt;
** '''10''' - current versions&lt;br /&gt;
When saving as expansion this section gets removed entirely. Contrary to popular belief, it doesn't get &amp;quot;replaced&amp;quot; by IVE2 in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IVE2&amp;quot; - Map Version==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section &amp;quot;additionally identifies&amp;quot; the map version.&lt;br /&gt;
* '''u16''': &amp;quot;Additional file format version:&amp;quot;&lt;br /&gt;
** '''11''' - 1.04 StarCraft and above (&amp;quot;hybrid&amp;quot;) or Brood War.&lt;br /&gt;
This section does not &amp;quot;replace&amp;quot; IVER in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;VCOD&amp;quot; - Verification Code==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be equal to size of the VCOD data in the EXE resource. Must result in valid checksum.''&lt;br /&gt;
&lt;br /&gt;
This section has a verification code to make sure this is actually a CHK file.&lt;br /&gt;
&lt;br /&gt;
* '''u32[256]''': Seed values.&lt;br /&gt;
* '''u8[16]''': Operation codes to produce the resulting hash:&lt;br /&gt;
** '''00''' - XOR's the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''01''' - Adds to the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''02''' - Subtracts from the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''03''' - XOR's the current hash with the VCOD table at index OWNR, SIDE, FORC, and 0&lt;br /&gt;
** '''04''' - same as 0x03&lt;br /&gt;
** '''05''' - same as 0x03&lt;br /&gt;
** '''06''' - Complex function consisting of ORs and shifts&lt;br /&gt;
** '''07''' - Inverted version of 0x06, switching direction of all shifts&lt;br /&gt;
** '''08+''' - Do nothing&lt;br /&gt;
Opcodes and seeds do not have to match those in EXE resource, as long as the same value is produced.&amp;lt;br&amp;gt;&lt;br /&gt;
The only indexes in the seed table that are referenced are those that correspond individual values of [[#&amp;quot;OWNR&amp;quot; - StarCraft Player Types|OWNR]], [[#&amp;quot;SIDE&amp;quot; - Player Races|SIDE]], [[#&amp;quot;FORC&amp;quot; - Force Settings|FORC]] player assignments, and index 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IOWN&amp;quot; - StarEdit Player Types==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the owner of each player.&lt;br /&gt;
* '''u8[12]''': One byte for each player, specifies the owner of the player:&lt;br /&gt;
** '''00''' - Inactive&lt;br /&gt;
** ''01'' - Computer (game)&lt;br /&gt;
** ''02'' - Occupied by Human Player&lt;br /&gt;
** '''03''' - Rescue Passive&lt;br /&gt;
** '''04''' - Unused&lt;br /&gt;
** '''05''' - Computer&lt;br /&gt;
** '''06''' - Human (Open Slot)&lt;br /&gt;
** '''07''' - Neutral&lt;br /&gt;
** ''08'' - Closed slot&lt;br /&gt;
This section is separate from OWNR as a staredit value. Staredit does not display &amp;quot;inactive&amp;quot; as a valid option. Italicized settings denote invalid map options, which may involve a buffer overflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;OWNR&amp;quot; - StarCraft Player Types==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 12 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section designates the controller of a particular player. It is exactly the same as the &amp;quot;IOWN&amp;quot; section, except there is an additional value, 0x00 for Inactive.&lt;br /&gt;
* '''u8[12]''': One byte for each player, specifies the owner of the player:&lt;br /&gt;
** '''00''' - Inactive&lt;br /&gt;
** ''01'' - Computer (game)&lt;br /&gt;
** ''02'' - Occupied by Human Player&lt;br /&gt;
** '''03''' - Rescue Passive&lt;br /&gt;
** '''04''' - Unused&lt;br /&gt;
** '''05''' - Computer&lt;br /&gt;
** '''06''' - Human (Open Slot)&lt;br /&gt;
** '''07''' - Neutral&lt;br /&gt;
** ''08'' - Closed slot&lt;br /&gt;
Italicized settings denote invalid map options, which may involve a buffer overflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;ERA &amp;quot; - Tileset==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section indicates the tileset of the scenario.&lt;br /&gt;
* '''u16''': Designates tileset:&lt;br /&gt;
** '''00''' - Badlands&lt;br /&gt;
** '''01''' - Space Platform&lt;br /&gt;
** '''02''' - Installation&lt;br /&gt;
** '''03''' - Ashworld&lt;br /&gt;
** '''04''' - Jungle&lt;br /&gt;
** '''05''' - Desert&lt;br /&gt;
** '''06''' - Arctic&lt;br /&gt;
** '''07''' - Twilight&lt;br /&gt;
StarCraft masks the tileset indicator's bit value, so bits after the third place (anything after the value &amp;quot;7&amp;quot;) are removed. Thus, 9 (1001 in binary) is interpreted as 1 (0001), 10 (1010) as 2 (0010), etc.&amp;lt;br&amp;gt;&lt;br /&gt;
Desert, Arctic, and Twilight are Brood War-only tilesets.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;DIM &amp;quot; - Map Dimensions==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains the dimensions of the map.&lt;br /&gt;
* '''u16''': Width of the map&lt;br /&gt;
* '''u16''': Height of the map&lt;br /&gt;
The Width/Height of the map is measured in the number of square 32x32p tiles.&amp;lt;br&amp;gt;&lt;br /&gt;
Standard Dimensions are 64, 96, 128, 192, and 256.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SIDE&amp;quot; - Player Races==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 12 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains the species/race of each player.&lt;br /&gt;
* '''u8[12]''': 1 byte per player the species of that player:&lt;br /&gt;
** '''00''' - Zerg&lt;br /&gt;
** '''01''' - Terran&lt;br /&gt;
** '''02''' - Protoss&lt;br /&gt;
** ''03'' - Invalid (Independent), shown as &amp;quot;Unknown&amp;quot; in SC:R lobby&lt;br /&gt;
** ''04'' - Invalid (Neutral), shown as &amp;quot;Unknown&amp;quot;&lt;br /&gt;
** '''05''' - User Select&lt;br /&gt;
** '''06''' - Random (Forced; Acts as a selected race)&lt;br /&gt;
** ''07'' - Inactive, shown as locked &amp;quot;Select Race&amp;quot; option in SC:R lobby&lt;br /&gt;
Italicized settings denote invalid map options. Note Players 9-11 are defaultly Inactive and Player 12 is defaultly Neutral.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MTXM&amp;quot; - StarCraft Terrain==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be less than or equal to 131072 (0x20000) bytes (256 * 256 * 2).''&lt;br /&gt;
&lt;br /&gt;
Terrain section that contains a map of the level's appearance. StarEdit disregards this section and instead uses [[#&amp;quot;TILE&amp;quot; - StarEdit Terrain|TILE]]; it is only used in Starcraft.&lt;br /&gt;
* '''u16[map width * height]''': one integer for each tile.&lt;br /&gt;
Notes about MTXM:&lt;br /&gt;
* The Width/Height of the map is measured in the number of square 32x32p tiles.&lt;br /&gt;
* Tiles in this section are listed from left to right, top to bottom.&lt;br /&gt;
* The values for each integer are their respective &amp;quot;MegaTile&amp;quot; values in the scenario's tileset. If the size of this section is greater than width*height*2, the data following is ignored. If the size of this section is less, the resulting tiles that have not been defined will be null tiles.&lt;br /&gt;
* This section includes doodads as terrain; TILE, which is otherwise identical, doesn't. Out of the terrain sections (TILE, ISOM, and MTXM), SC only reads MTXM for the sake of not having to generate this data on-the-fly: it contains the exact representation of the level's appearance, including doodads. TILE, on the other hand, is directly tied via a tile lookup function to ISOM, and exists for the sake of not having to generate tiles from ISOM on-the-fly in StarEdit.&lt;br /&gt;
* If MTXM section is smaller than (map width*height), then the remaining tiles will be filled with null tiles or tiles specified by previous MTXM sections.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PUNI&amp;quot; - Player Unit Restrictions==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 5700 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains player unit restrictions: it indicates whether the player can or cannot build a particular unit.&lt;br /&gt;
* '''u8[228][12]''': 1 byte for each unit in order of its unit id, then each player, for player availability:&lt;br /&gt;
** '''00''' - That unit is not available for production if the player has 'override defaults' on&lt;br /&gt;
** '''01''' - That unit is available for production if the player has 'override defaults' on&lt;br /&gt;
* '''u8[228]''': 1 byte for each unit in order of it's unit id, for global availability defaults (for all players):&lt;br /&gt;
** '''00''' - That unit is not available for production&lt;br /&gt;
** '''01''' - That unit is available for production&lt;br /&gt;
* '''u8[228][12]''': 1 byte for each unit in order of its unit id, then each player, indicating whether a player uses the global availability defaults.&lt;br /&gt;
** '''00''' - Player overrides defaults for this unit&lt;br /&gt;
** '''01''' - Player uses defaults for this unit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGR&amp;quot; - Upgrade Restrictions==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1748 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;PUPx&amp;quot; - BW Upgrade Restrictions|&amp;quot;PUPx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains player upgrade restrictions: it indicates the starting/maximum levels at/to which a player can perform a particular upgrade.&lt;br /&gt;
* '''u8[46][12]''': 1 byte for the maximum level a player can upgrade to, in order of its upgrade id, then each player&lt;br /&gt;
* '''u8[46][12]''': 1 byte for the level of an upgrade a player starts off with, in order of its upgrade id, then each player&lt;br /&gt;
* '''u8[46]''': 1 byte for the global default maximum level of each upgrade, in order of its upgrade id.&lt;br /&gt;
* '''u8[46]''': 1 byte for the global default starting level of each upgrade, in order of its upgrade id.&lt;br /&gt;
* '''u8[46][12]''': 1 byte for each upgrade in order of its upgrade id, then each player, indicating whether a player uses the global upgrade defaults:&lt;br /&gt;
** '''00''' - Player does not use global upgrade defaults for this upgrade&lt;br /&gt;
** '''01''' - Player uses upgrade defaults for this upgrade&lt;br /&gt;
See [[#List of Upgrade IDs]].&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PTEC&amp;quot; - Tech Restrictions==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 912 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;PTEx&amp;quot; - BW Tech Restrictions|&amp;quot;PTEx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains player technology availability restrictions: it indicates whether a player starts off with a particular technology or can research a particular technology.&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology id, then each player, for player availability:&lt;br /&gt;
** '''00''' - Technology is not available for a player&lt;br /&gt;
** '''01''' - Technology is available for a player&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology id, then each player, for &amp;quot;already researched&amp;quot; status:&lt;br /&gt;
** '''00''' - Technology is not already researched&lt;br /&gt;
** '''01''' - Technology is already researched&lt;br /&gt;
* '''u8[24]''': 1 byte for each technology for global availability defaults:&lt;br /&gt;
** '''00''' - Technology is not available by default&lt;br /&gt;
** '''01''' - Technology is available by default&lt;br /&gt;
* '''u8[24]''': 1 byte for each technology for global &amp;quot;already researched&amp;quot; defaults:&lt;br /&gt;
** '''00''' - Technology is not already researched by default&lt;br /&gt;
** '''01''' - Technology is already researched by default&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology in order of its technology id, then each player, indicating whether a player uses the global defaults:&lt;br /&gt;
** '''00''' - Technology overrides defaults for player&lt;br /&gt;
** '''01''' - Technology uses default settings for player&lt;br /&gt;
See [[#List of Technology IDs]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIT&amp;quot; - Placed Units==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 36 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the pre-placed units on the map and their properties. Each unit on the map gets the following structure:&lt;br /&gt;
* '''u32''': The unit's class instance (sort of a &amp;quot;serial number&amp;quot;)&lt;br /&gt;
* U16''': X coordinate of unit&lt;br /&gt;
* U16''': Y coordinate of unit&lt;br /&gt;
* '''u16''': Unit ID&lt;br /&gt;
* '''u16''': Type of relation to another building (i.e. add-on, nydus link)&lt;br /&gt;
** '''Bit 9''' - Nydus Link&lt;br /&gt;
** '''Bit 10''' - Addon Link&lt;br /&gt;
* '''u16''': Flags of special properties which can be applied to the unit and are valid:&lt;br /&gt;
** '''Bit 0''' - Cloak is valid&lt;br /&gt;
** '''Bit 1''' - Burrow is valid&lt;br /&gt;
** '''Bit 2''' - In transit is valid&lt;br /&gt;
** '''Bit 3''' - Hallucinated is valid&lt;br /&gt;
** '''Bit 4''' - Invincible is valid&lt;br /&gt;
** '''Bit 5-15''' - Unused&lt;br /&gt;
* '''u16''': Out of the elements of the unit data, the properties which can be changed by the map maker:&lt;br /&gt;
** '''Bit 0''' - Owner player is valid (the unit is not a critter, start location, etc.; not a neutral unit)&lt;br /&gt;
** '''Bit 1''' - HP is valid&lt;br /&gt;
** '''Bit 2''' - Shields is valid&lt;br /&gt;
** '''Bit 3''' - Energy is valid (unit is a wraith, etc.)&lt;br /&gt;
** '''Bit 4''' - Resource amount is valid (unit is a mineral patch, vespene geyser, etc.)&lt;br /&gt;
** '''Bit 5''' - Amount in hangar is valid (unit is a reaver, carrier, etc.)&lt;br /&gt;
** '''Bit 6-15''' - Unused&lt;br /&gt;
* '''u8''': Player number of owner (0-based)&lt;br /&gt;
* '''u8''': Hit points % (1-100)&lt;br /&gt;
* '''u8''': Shield points % (1-100)&lt;br /&gt;
* '''u8''': Energy points % (1-100)&lt;br /&gt;
* '''u32''': Resource amount&lt;br /&gt;
* '''u16''': Number of units in hangar&lt;br /&gt;
* '''u16''': Unit state flags&lt;br /&gt;
** '''Bit 0''' - Unit is cloaked&lt;br /&gt;
** '''Bit 1''' - Unit is burrowed&lt;br /&gt;
** '''Bit 2''' - Building is in transit&lt;br /&gt;
** '''Bit 3''' - Unit is hallucinated&lt;br /&gt;
** '''Bit 4''' - Unit is invincible&lt;br /&gt;
** '''Bit 5-15''' - Unused&lt;br /&gt;
* '''u32''': Unused&lt;br /&gt;
* '''u32''': Class instance of the unit to which this unit is related to (i.e. via an add-on, nydus link, etc.). It is &amp;quot;0&amp;quot; if the unit is not linked to any other unit.&lt;br /&gt;
Notes about UNIT:&lt;br /&gt;
* The X/Y coordinates are the center of the sprite of the unit (in pixels).&lt;br /&gt;
* Please edit if you could confirm the bit values to be correct/if you know more bit values.&lt;br /&gt;
* Default values will apply if bit values are unchecked. Defaults: 100% HP, 100% SP, 100% EP, 0 resources, 0 hangar count.&lt;br /&gt;
* This section can be split. Additional UNIT sections will add more units.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;ISOM&amp;quot; - Isometric Terrain==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section is required to place isometric terrain on the map. It provides data about the nature of the isometrical &amp;quot;diamonds&amp;quot; (the editing mode of StarEdit).&lt;br /&gt;
* '''u16[ (width / 2 + 1) * (height + 1) * 4 ]''': 4 integers for each map rectangle tile (plus one extra tile to the right and bottom of the map), as per the RECT structure. Each rectangle border (left, top, right, bottom) is assigned an &amp;quot;ISOM value.&amp;quot; These form the &amp;quot;diamond&amp;quot; pattern of the map, and each rectangle thus gets two ISOM values associated with it. StarEdit somehow hashes these (the exact algorithm is unknown) and thus produces the tile index of the rectangle (which it stores in TILE for reasons of efficiency). The index of the rectangle's right tile is that of its left tile + 16.&lt;br /&gt;
This section is the only truly unknown section of the .chk format. If you're an ex-Blizzard employee or SI, please edit this section. If you have additional research, post on the forums about it and/or edit this section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TILE&amp;quot; - StarEdit Terrain==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section will only be different from the [[#&amp;quot;MTXM&amp;quot; - StarCraft Terrain|MTXM]] section in tiles where doodads are present.&lt;br /&gt;
* '''u16[ map width * height ]''': 1 integer for each map tile. Moves horizontally across the map.&lt;br /&gt;
The values in TILE are normally directly generated from the ISOM section (see &amp;quot;'ISOM' section&amp;quot; above), and thus do not match that of MTXM on doodad tiles.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;DD2 &amp;quot; - StarEdit Sprites (Doodads)==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section contains the doodad map of the level. There are several parts to doodads. The graphical portion is stored in the [[#&amp;quot;MTXM&amp;quot; - StarCraft Terrain|MTXM]] section. The second part of the doodad is stored in this section. This section is only used by the map editor.&lt;br /&gt;
&lt;br /&gt;
Each doodad in the map gets the following structure:&lt;br /&gt;
* '''u16''': Number of the doodad. Size of the doodad is dependent on this. Doodads are different for each tileset.&lt;br /&gt;
* '''u16''': X coordinate of the doodad unit&lt;br /&gt;
* '''u16''': Y coordinate of the doodad unit&lt;br /&gt;
* '''u8''': Player number that owns the doodad&lt;br /&gt;
* '''u8''': Enabled flag&lt;br /&gt;
** '''00''' - Doodad is enabled (trap can attack, door is closed, etc)&lt;br /&gt;
** '''01''' - Doodad is disabled&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;THG2&amp;quot; - StarCraft Sprites==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 10 bytes.''&lt;br /&gt;
&lt;br /&gt;
The map editor only writes to this section. Starcraft uses this section.&lt;br /&gt;
&lt;br /&gt;
Sprites, usually on doodads, get the following structure.&lt;br /&gt;
* '''u16''': Unit/Sprite number of the sprite&lt;br /&gt;
* '''u16''': X coordinate of the doodad unit&lt;br /&gt;
* '''u16''': Y coordinate of the doodad unit&lt;br /&gt;
* '''u8''': Player number that owns the doodad&lt;br /&gt;
* '''u8''': Unused&lt;br /&gt;
* '''u16''': Flags&lt;br /&gt;
** '''Bit 0-11''' - Unused&lt;br /&gt;
** '''Bit 12''' - Draw as sprite (Determines if it is a sprite or a unit sprite)&lt;br /&gt;
** '''Bit 13''' - Unused&lt;br /&gt;
** '''Bit 14''' - Unused&lt;br /&gt;
** '''Bit 15''' - Disabled (Only valid if Draw as sprite is unchecked, disables the unit)&lt;br /&gt;
This section can be split. Additional THG2 sections will add more sprites.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MASK&amp;quot; - Fog of War Layer==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: This section will always validate.''&lt;br /&gt;
&lt;br /&gt;
This section contains the data on fog of war for each player. This is whether at the start of the game that levels of black space that is available.&lt;br /&gt;
* '''u8[ map width * height ]''': One byte for each map tile. The bits indicate for each player the fog of war.&lt;br /&gt;
** '''Bit 0''' - Player 1's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 1''' - Player 2's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 2''' - Player 3's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 3''' - Player 4's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 4''' - Player 5's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 5''' - Player 6's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 6''' - Player 7's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 7''' - Player 8's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
Any size greater than width*height will be ignored. Any size less will default missing tiles to 0xFF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;STR &amp;quot; - String Data==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be at least 1 byte.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the strings in the map.&lt;br /&gt;
* '''u16''': Number of strings in the section (Default''': 1024)&lt;br /&gt;
* '''u16[Number of strings]''': 1 integer for each string specifying the offset (the spot where the string starts in the section from the start of it).&lt;br /&gt;
* '''Strings''': After the offsets, this is where every string in the map goes, one after another. Each one is terminated by a null character.&lt;br /&gt;
This section can contain more or less then 1024 string offsests and will work in Starcraft.&amp;lt;br&amp;gt;&lt;br /&gt;
By default the first byte in '''Strings''' is a NUL character, and all unused offsets in the STR section point to this NUL character.&lt;br /&gt;
Note that STR sections can be stacked in a smiliar fashion as MTXM. The exact mechanisms of this are uncertain.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPRP&amp;quot; - CUWP Slots==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1280 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section is used whenever the create units with properties trigger is used. Since a slot has to be assigned to the action, this is where each slot is designated.&lt;br /&gt;
&lt;br /&gt;
There are 64 of the following structures regardless of how many are used and it cannot exceed 64.&lt;br /&gt;
* '''u16''': Flag of which special properties can be applied to unit, and are valid.&lt;br /&gt;
** '''Bit 0''' - Cloak bit is valid&lt;br /&gt;
** '''Bit 1''' - Burrowed bit is valid&lt;br /&gt;
** '''Bit 2''' - In transit bit is valid&lt;br /&gt;
** '''Bit 3''' - Hallucinated bit is valid&lt;br /&gt;
** '''Bit 4''' - Invincible bit is valid&lt;br /&gt;
** '''Bit 5-15''' - Unknown/unused&lt;br /&gt;
* '''u16''': Which elements of the unit data are valid, which properties can be changed by the map maker.&lt;br /&gt;
** '''Bit 0''' - Owner player is valid (unit is not neutral)&lt;br /&gt;
** '''Bit 1''' - HP is valid&lt;br /&gt;
** '''Bit 2''' - Shields is valid&lt;br /&gt;
** '''Bit 3''' - Energy is valid&lt;br /&gt;
** '''Bit 4''' - Resource amount is valid (unit is a resource)&lt;br /&gt;
** '''Bit 5''' - Amount in hanger is valid&lt;br /&gt;
** '''Bit 6''' - Unknown/unused&lt;br /&gt;
* '''u8''': Player number that owns unit. Will always be NULL in this section (0)&lt;br /&gt;
* '''u8''': Hit point % (1-100)&lt;br /&gt;
* '''u8''': Shield point % (1-100)&lt;br /&gt;
* '''u8''': Energy point % (1-100)&lt;br /&gt;
* '''u32''': Resource amount (for resources only)&lt;br /&gt;
* '''u16''': # of units in hangar&lt;br /&gt;
* '''u16''': Flags&lt;br /&gt;
** '''Bit 0''' - Unit is cloaked&lt;br /&gt;
** '''Bit 1''' - Unit is burrowed&lt;br /&gt;
** '''Bit 2''' - Building is in transit&lt;br /&gt;
** '''Bit 3''' - Unit is hallucinated&lt;br /&gt;
** '''Bit 4''' - Unit is invincible&lt;br /&gt;
** '''Bit 5-15''' - Unknown/unused&lt;br /&gt;
* '''u32''': Unknown/unused. Padding?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPUS&amp;quot; - CUWP Slots Used==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section goes along with the &amp;quot;UPRP&amp;quot; section. This section just indicates which of the 64 unit properties slot are used.&lt;br /&gt;
* '''u8[64]''': 1 byte for each trigger unit properties slot&lt;br /&gt;
** '''00''' - Properties slot is unused&lt;br /&gt;
** '''01''' - Properties slot is used&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MRGN&amp;quot; - Locations==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: 1280 bytes for retail, 5100 bytes for Hybrid and Broodwar.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the locations that the map uses. In a vanilla map, this section contains 64 locations. In a Hybrid or Brood War map, this section will expand to contain 255 locations.&lt;br /&gt;
&lt;br /&gt;
Each location gets one of the following location entries. The 'Anywhere' location, is ALWAYS location 64.&lt;br /&gt;
* '''u32''': Left (X1) coordinate of location, in pixels (usually 32 pt grid aligned)&lt;br /&gt;
* '''u32''': Top (Y1) coordinate of location, in pixels&lt;br /&gt;
* '''u32''': Right (X2) coordinate of location, in pixels&lt;br /&gt;
* '''u32''': Bottom (Y2) coordinate of location, in pixels&lt;br /&gt;
* '''u16''': String number of the name of this location&lt;br /&gt;
* '''u16''': Location elevation flags. If an elevation is disabled in the location, it's bit will be on (1)&lt;br /&gt;
** '''Bit 0''' - Low elevation&lt;br /&gt;
** '''Bit 1''' - Medium elevation&lt;br /&gt;
** '''Bit 2''' - High elevation&lt;br /&gt;
** '''Bit 3''' - Low air&lt;br /&gt;
** '''Bit 4''' - Medium air&lt;br /&gt;
** '''Bit 5''' - High air&lt;br /&gt;
** '''Bit 6-15''' - Unused&lt;br /&gt;
Note that in typical locations Right is always larger than Left and Bottom is always larger than Top. However, you can reverse one or both of these for [[Inverted Locations]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TRIG&amp;quot; - Triggers==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 2400 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the triggers in the map. This along with [[#&amp;quot;MBRF&amp;quot; - Mission Briefings|MBRF]] is the most complicated section in the entire scenario.chk file as there is a lot of data packed into too little of a space. Refer to the appendix at the bottom of this page for more information.&lt;br /&gt;
For easy reference, since each trigger contains 2400 bytes, the amount of triggers can be gotten by taking the section length and dividing by 2400.&lt;br /&gt;
Every single trigger in the map will have the following format:&lt;br /&gt;
* 16 Conditions (20 byte struct)&amp;lt;br&amp;gt; Every trigger has 16 of the following format, even if only one condition is used. See the appendix for information on which items are used for what conditions.&lt;br /&gt;
** '''u32''': Location number for the condition (1 based -- 0 refers to No Location), EUD Bitmask for a Death condition if the MaskFlag is set to &amp;quot;SC&amp;quot;&lt;br /&gt;
** '''u32''': [[#List of Players/Group IDs|Group]] that the condition applies to&lt;br /&gt;
** '''u32''': Qualified number (how many/resource amount)&lt;br /&gt;
** '''u16''': [[#Trigger Unit Types|Unit ID]] condition applies to&lt;br /&gt;
** '''u8''': [[#Numeric Comparisons|Numeric comparison]], [[#Switch States|switch state]]&lt;br /&gt;
** '''u8''': [[#Trigger Conditions List|Condition byte]]&lt;br /&gt;
** '''u8''': [[#Resource Types|Resource type]], [[#Score Types|score type]], Switch number (0-based)&lt;br /&gt;
** '''u8''': Flags&lt;br /&gt;
*** '''Bit 0''' - Unknown/unused&lt;br /&gt;
*** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled/ignored&lt;br /&gt;
*** '''Bit 2''' - Always display flag.&lt;br /&gt;
*** '''Bit 3''' - Unit properties is used. ('''Note:''' This is used in [[TRG|*.trg]] files)&lt;br /&gt;
*** '''Bit 4''' - Unit type is used. Cleared in &amp;quot;Offset + Mask&amp;quot; EUD conditions. May not be necessary otherwise?&lt;br /&gt;
*** '''Bit 5-7''' - Unknown/unused&lt;br /&gt;
** '''u16''': MaskFlag: set to &amp;quot;SC&amp;quot; (0x53, 0x43) when using the bitmask for EUDs, 0 otherwise&lt;br /&gt;
* 64 Actions (32 byte struct)&amp;lt;br&amp;gt; Immediately following the 16 conditions, there are 64 actions. There will always be 64 of the following structure, even if some of them are unused.&lt;br /&gt;
** '''u32''': Location - source location in &amp;quot;Order&amp;quot; and &amp;quot;Move Unit&amp;quot;, dest location in &amp;quot;Move Location&amp;quot; (1 based -- 0 refers to No Location), EUD Bitmask for a Death action if the MaskFlag is set to &amp;quot;SC&amp;quot;&lt;br /&gt;
** '''u32''': String number for trigger text (0 means no string)&lt;br /&gt;
** '''u32''': WAV string number (0 means no string)&lt;br /&gt;
** '''u32''': Seconds/milliseconds of time&lt;br /&gt;
** '''u32''': First (or only) [[#List of Players/Group IDs|Group/Player]] affected.&lt;br /&gt;
** '''u32''': Second group affected, secondary location (1-based), CUWP #, number, AI script (4-byte string), switch (0-based #)&lt;br /&gt;
** '''u16''': [[#Trigger Unit Types|Unit type]], [[#Score Types|score type]], [[#Resource Types|resource type]], [[#Alliance Statuses|alliance status]]&lt;br /&gt;
** '''u8''': [[#Trigger Actions List|Action byte]]&lt;br /&gt;
** '''u8''': Number of units (0 means All Units), [[#Action States|action state]], [[#Unit Orders|unit order]], [[#Number Modifiers|number modifier]]&lt;br /&gt;
** '''u8''': Flags&lt;br /&gt;
*** '''Bit 0''' - Ignore a wait/transmission once.&lt;br /&gt;
*** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled.&lt;br /&gt;
*** '''Bit 2''' - Always display flag - when not set: if the user has turned off subtitles (see sound options) the text will not display, when set: text will always display&lt;br /&gt;
*** '''Bit 3''' - Unit properties is used. Staredit uses this for *.trg files.&lt;br /&gt;
*** '''Bit 4''' - Unit type is used. Cleared in &amp;quot;Offset + Mask&amp;quot; EUD actions.&lt;br /&gt;
*** '''Bit 5-7''' - Unknown/unused&lt;br /&gt;
** '''u8''': Padding&lt;br /&gt;
** '''u16 (2 bytes)''': MaskFlag: set to &amp;quot;SC&amp;quot; (0x53, 0x43) when using the bitmask for EUDs, 0 otherwise&lt;br /&gt;
* Player Execution&amp;lt;br&amp;gt; Following the 16 conditions and 64 actions, every trigger also has this structure&lt;br /&gt;
** '''u32''': execution flags&lt;br /&gt;
*** '''Bit 0''' - All conditions are met, executing actions, cleared on the next trigger loop.&lt;br /&gt;
*** '''Bit 1''' - Ignore the following actions: Defeat, Draw.&lt;br /&gt;
*** '''Bit 2''' - Preserve trigger. (Can replace Preserve Trigger action)&lt;br /&gt;
*** '''Bit 3''' - Ignore execution.&lt;br /&gt;
*** '''Bit 4''' - Ignore all of the following actions for this trigger until the next trigger loop: Wait, PauseGame, Transmission, PlayWAV, DisplayTextMessage, CenterView, MinimapPing, TalkingPortrait, and MuteUnitSpeech.&lt;br /&gt;
*** '''Bit 5''' - This trigger has paused the game, ignoring subsequent calls to Pause Game (Unpause Game clears this flag only in the same trigger), may automatically call unpause at the end of action execution?&lt;br /&gt;
*** '''Bit 6''' - Wait skipping disabled for this trigger, cleared on next trigger loop.&lt;br /&gt;
*** '''Bit 7-31''' - Unknown/unused&lt;br /&gt;
** '''u8[27]''': 1 byte for each player in the [[#List of Players/Group IDs]]&lt;br /&gt;
*** '''00''' - Trigger is not executed for player&lt;br /&gt;
*** '''01''' - Trigger is executed for player&lt;br /&gt;
** '''u8''': Index of the current action, in StarCraft this is incremented after each action is executed, trigger execution ends when this is 64 (Max Actions) or an action is encountered with Action byte as 0&lt;br /&gt;
This section can be split. Additional TRIG sections will add more triggers.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MBRF&amp;quot; - Mission Briefings==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 2400 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all of the mission briefings shown by the players.&lt;br /&gt;
&lt;br /&gt;
See [[#&amp;quot;TRIG&amp;quot; - Triggers|&amp;quot;TRIG&amp;quot;]] section for format, as it is exactly the same except for the conditions. In this section the 16 conditions are still there, they are all null except for the very first condition, which only has a condition byte of 13. See [[#Mission Briefing Actions List]] for the action bytes for the mission briefing actions.&lt;br /&gt;
&lt;br /&gt;
This section can be split. Additional MBRF sections will add more briefing triggers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SPRP&amp;quot; - Scenario Properties==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4 bytes.''&lt;br /&gt;
&lt;br /&gt;
* '''u16''': String number of the scenario name&lt;br /&gt;
* '''u16''': String number of the scenarios description.&lt;br /&gt;
A string index of 0 for the map name will default it to its file name. A string index of 0 description will default to a predefined string.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;FORC&amp;quot; - Force Settings==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be less than or equal to 20 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the forces and the information about them.&lt;br /&gt;
* '''u8[8]''': 1 byte for each active player, specifying which of the 4 forces (0-based) that the player's on&lt;br /&gt;
* '''u16[4]''': 1 integer for each force, string number of the name of the force&lt;br /&gt;
* '''u8[4]''': 1 byte for each force specifying the properties:&lt;br /&gt;
** '''Bit 0''' - Random start location&lt;br /&gt;
** '''Bit 1''' - Allies&lt;br /&gt;
** '''Bit 2''' - Allied victory&lt;br /&gt;
** '''Bit 3''' - Shared vision&lt;br /&gt;
** '''Bit 4-7''' - Unused&lt;br /&gt;
Notes about FORC:&lt;br /&gt;
* If there is no string specified for a force name, it will default to a &amp;quot;Force #&amp;quot; string.&lt;br /&gt;
* If this section is less than 20 bytes, the remaining bytes are defaulted to 0.&lt;br /&gt;
* Players can be on a force greater than 4, however they will not appear in the game lobby.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;WAV &amp;quot; - WAV String Indexes==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
There are 512 wav entires regardless of how many are actually used.&lt;br /&gt;
* '''u32[512]''': 1 long for each WAV. Indicates a string index is used for a WAV path in the MPQ. If the entry is not used, it will be 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIS&amp;quot; - Unit Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4048 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;UNIx&amp;quot; - BW Unit Settings|&amp;quot;UNIx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains the unit settings for the level:&lt;br /&gt;
* '''u8[228]''': 1 byte for each unit, in order of Unit ID&lt;br /&gt;
** '''00''' - Unit does not use default settings&lt;br /&gt;
** '''01''' - Unit does use default settings&lt;br /&gt;
* '''u32[228]''': Hit points for unit (Note the displayed value is this value / 256, with the low byte being a fractional HP value)&lt;br /&gt;
* '''u16[228]''': Shield points, in order of Unit ID&lt;br /&gt;
* '''u8[228]''': Armor points, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Build time (1/60 seconds), in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Mineral cost, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Gas cost, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': String number, in order of Unit ID&lt;br /&gt;
* '''u16[100]''': Base weapon damage the weapon does, in weapon ID order ([[#List of Unit Weapon IDs]])&lt;br /&gt;
* '''u16[100]''': Upgrade bonus weapon damage, in weapon ID order&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGS&amp;quot; - Upgrade Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 598 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;UPGx&amp;quot; - BW Upgrade Settings|&amp;quot;UPGx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains upgrade settings:&lt;br /&gt;
* '''u8[46]''': 1 byte per each upgrade, in order of upgrade id.&lt;br /&gt;
** '''00''' - Upgrade uses custom settings&lt;br /&gt;
** '''01''' - Upgrade uses default settings&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, time factor for each upgrade, in order of upgrade id.&lt;br /&gt;
See [[#List of Upgrade IDs]] for upgrade ids.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TECS&amp;quot; - Tech Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 216 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;TECx&amp;quot; - BW Tech Settings|&amp;quot;TECx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains technology/special abilities settings:&lt;br /&gt;
* '''u8[24]''': 1 byte per each technology, specifies if the tech overrides the default settings. In order of technology id&lt;br /&gt;
** '''00''' - Technology uses custom settings&lt;br /&gt;
** '''01''' - Technology uses default settings&lt;br /&gt;
* '''u16[24]''': Mineral cost to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Gas cost to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Time required to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Energy cost to cast technology/special ability. In order of technology id.&lt;br /&gt;
See [[#List of Technology IDs]] for technology ids.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SWNM&amp;quot; - Switch Names==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section contains the strings used for each switch. There are 256 switches, and can't be any more or any less.&lt;br /&gt;
* '''u32[256]''': One long for each switch, specifies the string number for the name of each switch. Unnamed switches will have an index of 0, and have a default switch name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;COLR&amp;quot; - Player Colors==&lt;br /&gt;
''Required for Brood War only and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Can be in non-Brood War maps in Remaster, if CRGB is also present.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 8 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section indicates what color each player is, but only has effect on Brood War.&lt;br /&gt;
* '''u8[8]''': 1 byte for each player, indicates the color of the player&lt;br /&gt;
** '''00''' - Red&lt;br /&gt;
** '''01''' - Blue&lt;br /&gt;
** '''02''' - Teal&lt;br /&gt;
** '''03''' - Purple&lt;br /&gt;
** '''04''' - Orange&lt;br /&gt;
** '''05''' - Brown&lt;br /&gt;
** '''06''' - White&lt;br /&gt;
** '''07''' - Yellow&lt;br /&gt;
** '''08''' - Green&lt;br /&gt;
** '''09''' - Pale yellow&lt;br /&gt;
** '''10''' - Tan&lt;br /&gt;
** '''11''' - Azure (Neutral color)&lt;br /&gt;
Other values can be used but may have different results depending on the tileset. Any color value above 11 is an overflow. As of patch 1.18.6 values above 11 result in default player color.&lt;br /&gt;
&lt;br /&gt;
SC:R Only colors:&lt;br /&gt;
Selecting these in a non-SC:R map seems to just use default colors, unless the [[#&amp;quot;CRGB&amp;quot; - Remastered Player Colors|CRGB]] section is also present regardless of version (including non-BW versions).&lt;br /&gt;
* '''12''' - Pale Green&lt;br /&gt;
* '''13''' - Blueish Grey&lt;br /&gt;
* '''14''' - Pale Yellow&lt;br /&gt;
* '''15''' - Cyan&lt;br /&gt;
* '''16''' - Pink&lt;br /&gt;
* '''17''' - Olive&lt;br /&gt;
* '''18''' - Lime&lt;br /&gt;
* '''19''' - Navy&lt;br /&gt;
* '''20''' - Magenta&lt;br /&gt;
* '''21''' - Grey&lt;br /&gt;
* '''22''' - Black&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;CRGB&amp;quot; - Remastered Player Colors==&lt;br /&gt;
''Requirement unknown, but can be in any map type including non-remaster maps.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 32 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''u8[8][3]''': 3 bytes for each player corresponding to an RGB color value&lt;br /&gt;
** '''u8''': R&lt;br /&gt;
** '''u8''': G&lt;br /&gt;
** '''u8''': B&lt;br /&gt;
* '''u8[8]''': Indicates how to select the color for each player&lt;br /&gt;
** '''0''' - Random Predefined&lt;br /&gt;
** '''1''' - Player's Choice&lt;br /&gt;
** '''2''' - Custom RGB Color (RGB value for the corresponding player defined above)&lt;br /&gt;
** '''3''' - Use &amp;quot;COLR&amp;quot; selection&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PUPx&amp;quot; - BW Upgrade Restrictions==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2318 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UPGR&amp;quot; - Upgrade Restrictions|&amp;quot;UPGR&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is identical to UPGR section except it uses the Brood War set of 61 upgrades instead of the original 46.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PTEx&amp;quot; - BW Tech Restrictions==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1672 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;PTEC&amp;quot; - Tech Restrictions|&amp;quot;PTEC&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is identical to PTEC section except it uses the Brood War set of 44 technologies instead of the original 24.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIx&amp;quot; - BW Unit Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4168 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UNIS&amp;quot; - Unit Settings|&amp;quot;UNIS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is indentical to UNIS section except it uses the Brood War set of 130 weapons instead of the original 100.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGx&amp;quot; - BW Upgrade Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 794 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UPGS&amp;quot; - Upgrade Settings|&amp;quot;UPGS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section the same as UPGS except section except it uses the Brood War set of 61 upgrades instead of the original 46, and there is an unused byte after the first set:&lt;br /&gt;
* '''u8[61]''': 1 byte per each upgrade, in order of upgrade id.&lt;br /&gt;
** '''00''' - Upgrade uses custom settings&lt;br /&gt;
** '''01''' - Upgrade uses default settings&lt;br /&gt;
* '''u8''': Unused.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, time factor for each upgrade, in order of upgrade id.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TECx&amp;quot; - BW Tech Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 396 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;TECS&amp;quot; - Tech Settings|&amp;quot;TECS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is indentical to TECS section except it uses the Brood War set of 44 technologies instead of the original 24.&lt;br /&gt;
&lt;br /&gt;
=Appendix=&lt;br /&gt;
A set of references and IDs that should help you easier in the trigger section and the technology/player ids, etc:&lt;br /&gt;
&lt;br /&gt;
==Trigger Conditions List==&lt;br /&gt;
* 0 = No Condition&lt;br /&gt;
* 1 = Countdown Timer(Comparison, QNumber)&lt;br /&gt;
* 2 = Command(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 3 = Bring(Player, Comparison, TUnit, Loc, QNumber)&lt;br /&gt;
* 4 = Accumulate(Player, Comparison, QNumber, ResType)&lt;br /&gt;
* 5 = Kill(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 6 = Command the Most(TUnit)&lt;br /&gt;
* 7 = Commands the Most At(TUnit, Loc)&lt;br /&gt;
* 8 = Most Kills(TUnit)&lt;br /&gt;
* 9 = Highest Score(Score)&lt;br /&gt;
* 10 = Most Resources(ResType)&lt;br /&gt;
* 11 = Switch(Switch)&lt;br /&gt;
* 12 = Elapsed Time(Comparison, QNumber)&lt;br /&gt;
* 13 = Data is a Mission Briefing. Conditions are N/A (Same as Never)&lt;br /&gt;
* 14 = Opponents(Player, Comparison, QNumber)&lt;br /&gt;
* 15 = Deaths(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 16 = Command the Least(TUnit)&lt;br /&gt;
* 17 = Command the Least At(TUnit, Loc)&lt;br /&gt;
* 18 = Least Kills(TUnit)&lt;br /&gt;
* 19 = Lowest Score(Score)&lt;br /&gt;
* 20 = Least Resources(ResType)&lt;br /&gt;
* 21 = Score(Player, Comparison, Score, QNumber)&lt;br /&gt;
* 22 = Always (Same as No Condition)&lt;br /&gt;
* 23 = Never&lt;br /&gt;
&lt;br /&gt;
==Trigger Actions List==&lt;br /&gt;
* 0 = No Action&lt;br /&gt;
* 1 = Victory&lt;br /&gt;
* 2 = Defeat&lt;br /&gt;
* 3 = Preserve Trigger&lt;br /&gt;
* 4 = Wait(Time)&lt;br /&gt;
* 5 = Pause Game (Single player only)&lt;br /&gt;
* 6 = Unpause Game (Single player only)&lt;br /&gt;
* 7 = Transmission(Text, Unit, Loc, Time, Modifier, Wave, WavTime)&lt;br /&gt;
* 8 = Play WAV(Wav, WavTime)&lt;br /&gt;
* 9 = Display Text Message(Text)&lt;br /&gt;
* 10 = Center View(Loc)&lt;br /&gt;
* 11 = Create Unit with Properties(Player, Unit, Number, Loc, UnitProp)&lt;br /&gt;
* 12 = Set Mission Objectives(Text)&lt;br /&gt;
* 13 = Set Switch(Switch, SwAction)&lt;br /&gt;
* 14 = Set Countdown Timer(Time, Modifier)&lt;br /&gt;
* 15 = Run AI Script(AIScript)&lt;br /&gt;
* 16 = Run AI Script At Location(AIScript)&lt;br /&gt;
* 17 = Leader Board (Control) (Text, TUnit)&lt;br /&gt;
* 18 = Leader Board (Control At Location) (Text, TUnit, Loc)&lt;br /&gt;
* 19 = Leader Board (Resources) (Text, ResType)&lt;br /&gt;
* 20 = Leader Board (Kills) (Text, TUnit)&lt;br /&gt;
* 21 = Leader Board (Points) (Text, Score)&lt;br /&gt;
* 22 = Kill Unit (Player, TUnit)&lt;br /&gt;
* 23 = Kill Unit At Location(Player, TUnit, Number, Loc)&lt;br /&gt;
* 24 = Remove Unit(Player, TUnit)&lt;br /&gt;
* 25 = Remove Unit At Location(Player, TUnit, Number, Loc)&lt;br /&gt;
* 26 = Set Resources(Player, Number, Modifier, ResType)&lt;br /&gt;
* 27 = Set Score(Player, Number, Modifier, Score)&lt;br /&gt;
* 28 = Minimap Ping(Loc)&lt;br /&gt;
* 29 = Talking Portrait(Unit, Time)&lt;br /&gt;
* 30 = Mute Unit Speech&lt;br /&gt;
* 31 = Unmute Unit Speech&lt;br /&gt;
* 32 = Leaderboard Computer Players(State)&lt;br /&gt;
* 33 = Leaderboard Goal (Control) (Text, TUnit, Number)&lt;br /&gt;
* 34 = Leaderboard Goal (Control At Location) (Text, TUnit, Number, Loc)&lt;br /&gt;
* 35 = Leaderboard Goal (Resources) (Text, TUnit, Number, ResType)&lt;br /&gt;
* 36 = Leaderboard Goal (Kills) (Text, TUnit, Number)&lt;br /&gt;
* 37 = Leaderboard Goal (Points) (Text, Number, Score)&lt;br /&gt;
* 38 = Move Location(Player, TUnit, SLoc, DLoc)&lt;br /&gt;
* 39 = Move Unit(Player, TUnit, Number, SLoc, DLoc)&lt;br /&gt;
* 40 = Leaderboard (Greed) (Number)&lt;br /&gt;
* 41 = Set Next Scenario(Text) (Single player only)&lt;br /&gt;
* 42 = Set Doodad State(Player, TUnit, Loc, State)&lt;br /&gt;
* 43 = Set Invincibility(Player, TUnit, Loc, State)&lt;br /&gt;
* 44 = Create Unit(Player, Unit, Number, Loc)&lt;br /&gt;
* 45 = Set Deaths(Player, TUnit, Number, Modifier)&lt;br /&gt;
* 46 = Order(Player, TUnit, SLoc, DLoc, Order)&lt;br /&gt;
* 47 = Comment(Text)&lt;br /&gt;
* 48 = Give Units to Player(SPlayer, DPlayer, TUnit, Number, Loc)&lt;br /&gt;
* 49 = Modify Unit Hit Points(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 50 = Modify Unit Energy(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 51 = Modify Unit Shield Points(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 52 = Modify Unit Resource Amount(Player, Number, ModAmount, Loc)&lt;br /&gt;
* 53 = Modify Unit Hanger Count(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 54 = Pause Timer&lt;br /&gt;
* 55 = Unpause Timer&lt;br /&gt;
* 56 = Draw&lt;br /&gt;
* 57 = Set Alliance Status(Player, AllyStatus)&lt;br /&gt;
* 58 = Disable Debug Mode (Single player only)&lt;br /&gt;
* 59 = Enable Debug Mode (Single player only)&lt;br /&gt;
&lt;br /&gt;
==Mission Briefing Actions List==&lt;br /&gt;
* 0 - No Action&lt;br /&gt;
* 1 - Wait(Time)&lt;br /&gt;
* 2 - Play WAV(Wave, WavTime)&lt;br /&gt;
* 3 - Text Message(Text, Time)&lt;br /&gt;
* 4 - Mission Objectives(Text)&lt;br /&gt;
* 5 - Show Portrait(Unit, Slot)&lt;br /&gt;
* 6 - Hide Portrait(Slot)&lt;br /&gt;
* 7 - Display Speaking Portrait(Slot, Time)&lt;br /&gt;
* 8 - Transmission(Text, Slot, Time, Modifier, Wave, WavTime)&lt;br /&gt;
* 9 - Skip Tutorial Enabled&lt;br /&gt;
&lt;br /&gt;
==Switch States==&lt;br /&gt;
* 2 = Switch is set&lt;br /&gt;
* 3 = Switch is cleared&lt;br /&gt;
&lt;br /&gt;
==Numeric Comparisons==&lt;br /&gt;
* 0 = At least&lt;br /&gt;
* 1 = At most&lt;br /&gt;
* 10 = Exactly&lt;br /&gt;
&lt;br /&gt;
==Score Types==&lt;br /&gt;
* 0 = Total&lt;br /&gt;
* 1 = Units&lt;br /&gt;
* 2 = Buildings&lt;br /&gt;
* 3 = Units and Buildings&lt;br /&gt;
* 4 = Kills&lt;br /&gt;
* 5 = Razings&lt;br /&gt;
* 6 = Kills and Razings&lt;br /&gt;
* 7 = Custom&lt;br /&gt;
&lt;br /&gt;
==Resource Types==&lt;br /&gt;
* 0 = Ore&lt;br /&gt;
* 1 = Gas&lt;br /&gt;
* 2 = Ore and Gas&lt;br /&gt;
&lt;br /&gt;
==Alliance Statuses==&lt;br /&gt;
* 0 = Enemy&lt;br /&gt;
* 1 = Ally&lt;br /&gt;
* 2 = Allied Victory&lt;br /&gt;
&lt;br /&gt;
==Unit Orders==&lt;br /&gt;
* 0 = Move&lt;br /&gt;
* 1 = Patrol&lt;br /&gt;
* 2 = Attack&lt;br /&gt;
&lt;br /&gt;
==Action States==&lt;br /&gt;
* 4 = Enabled/Set switch&lt;br /&gt;
* 5  = Disabled/Clear switch&lt;br /&gt;
* 6 = Toggle/Toggle switch&lt;br /&gt;
* 11 = Randomize switch&lt;br /&gt;
&lt;br /&gt;
==Number Modifiers==&lt;br /&gt;
* 7 = Set to&lt;br /&gt;
* 8 = Add&lt;br /&gt;
* 9 = Subtract&lt;br /&gt;
&lt;br /&gt;
==Trigger Unit Types==&lt;br /&gt;
* All normal units (0-227)&lt;br /&gt;
* 228 = None&lt;br /&gt;
* 229 = Any unit&lt;br /&gt;
* 230 = Men&lt;br /&gt;
* 231 = Buildings&lt;br /&gt;
* 232 = Factories&lt;br /&gt;
&lt;br /&gt;
==List of Players/Group IDs==&lt;br /&gt;
* 0 = Player 1&lt;br /&gt;
* 1 = Player 2&lt;br /&gt;
* 2 = Player 3&lt;br /&gt;
* 3 = Player 4&lt;br /&gt;
* 4 = Player 5&lt;br /&gt;
* 5 = Player 6&lt;br /&gt;
* 6 = Player 7&lt;br /&gt;
* 7 = Player 8&lt;br /&gt;
* 8 = Player 9&lt;br /&gt;
* 9 = Player 10&lt;br /&gt;
* 10 = Player 11&lt;br /&gt;
* 11 = Player 12&lt;br /&gt;
* 12 = None (Unused, One-entry Overflow in some cases)&lt;br /&gt;
* 13 = Current Player&lt;br /&gt;
* 14 = Foes&lt;br /&gt;
* 15 = Allies&lt;br /&gt;
* 16 = Neutral Players&lt;br /&gt;
* 17 = All Players&lt;br /&gt;
* 18 = Force 1&lt;br /&gt;
* 19 = Force 2&lt;br /&gt;
* 20 = Force 3&lt;br /&gt;
* 21 = Force 4&lt;br /&gt;
* 22 = Unused 1&lt;br /&gt;
* 23 = Unused 2&lt;br /&gt;
* 24 = Unused 3&lt;br /&gt;
* 25 = Unused 4&lt;br /&gt;
* 26 = Non Allied Victory Players&lt;br /&gt;
&lt;br /&gt;
==List of Technology IDs==&lt;br /&gt;
* 0 = Stim Packs&lt;br /&gt;
* 1 = Lockdown&lt;br /&gt;
* 2 = EMP Shockwave&lt;br /&gt;
* 3 = Spider Mines&lt;br /&gt;
* 4 = Scanner Sweep&lt;br /&gt;
* 5 = Siege Mode&lt;br /&gt;
* 6 = Defensive Matrix&lt;br /&gt;
* 7 = Irradiate&lt;br /&gt;
* 8 = Yamato Gun&lt;br /&gt;
* 9 = Cloaking Field&lt;br /&gt;
* 10 = Personnel Cloaking&lt;br /&gt;
* 11 = Burrowing&lt;br /&gt;
* 12 = Infestation&lt;br /&gt;
* 13 = Spawn Broodling&lt;br /&gt;
* 14 = Dark Swarm&lt;br /&gt;
* 15 = Plague&lt;br /&gt;
* 16 = Consume&lt;br /&gt;
* 17 = Ensnare&lt;br /&gt;
* 18 = Parasite&lt;br /&gt;
* 19 = Psionic Storm&lt;br /&gt;
* 20 = Hallucination&lt;br /&gt;
* 21 = Recall&lt;br /&gt;
* 22 = Stasis Field&lt;br /&gt;
* 23 = Archon Warp&lt;br /&gt;
* 24 = Restoration&lt;br /&gt;
* 25 = Disruption Web&lt;br /&gt;
* 26 = Unused 26&lt;br /&gt;
* 27 = Mind Control&lt;br /&gt;
* 28 = Dark Archon Meld&lt;br /&gt;
* 29 = Feedback&lt;br /&gt;
* 30 = Optical Flare&lt;br /&gt;
* 31 = Maelstorm&lt;br /&gt;
* 32 = Lurker Aspect&lt;br /&gt;
* 33 = Unused 33&lt;br /&gt;
* 34 = Healing&lt;br /&gt;
* 35 = Unused 35&lt;br /&gt;
* 36 = Unused 36&lt;br /&gt;
* 37 = Unused 37&lt;br /&gt;
* 38 = Unused 38&lt;br /&gt;
* 39 = Unused 39&lt;br /&gt;
* 40 = Unused 40&lt;br /&gt;
* 41 = Unused 41&lt;br /&gt;
* 42 = Unused 42&lt;br /&gt;
* 43 = Unused 43&lt;br /&gt;
&lt;br /&gt;
==List of Upgrade IDs==&lt;br /&gt;
* 0 = Terran Infantry Armor&lt;br /&gt;
* 1 = Terran Vehicle Plating&lt;br /&gt;
* 2 = Terran Ship Plating&lt;br /&gt;
* 3 = Zerg Carapace&lt;br /&gt;
* 4 = Zerg Flyer Caparace&lt;br /&gt;
* 5 = Protoss Armor&lt;br /&gt;
* 6 = Protoss Plating&lt;br /&gt;
* 7 = Terran Infantry Weapons&lt;br /&gt;
* 8 = Terran Vehicle Weapons&lt;br /&gt;
* 9 = Terran Ship Weapons&lt;br /&gt;
* 10 = Zerg Melee Attacks&lt;br /&gt;
* 11 = Zerg Missile Attacks&lt;br /&gt;
* 12 = Zerg Flyer Attacks&lt;br /&gt;
* 13 = Protoss Ground Weapons&lt;br /&gt;
* 14 = Protoss Air Weapons&lt;br /&gt;
* 15 = Protoss Plasma Shields&lt;br /&gt;
* 16 = U-238 Shells&lt;br /&gt;
* 17 = Ion Thrusters&lt;br /&gt;
* 18 = Burst Lasers (Unused)&lt;br /&gt;
* 19 = Titan Reactor (SV +50)&lt;br /&gt;
* 20 = Ocular Implants&lt;br /&gt;
* 21 = Moebius Reactor (Ghost +50)&lt;br /&gt;
* 22 = Apollo Reactor (Wraith +50)&lt;br /&gt;
* 23 = Colossus Reactor (BC +50)&lt;br /&gt;
* 24 = Ventral Sacs&lt;br /&gt;
* 25 = Antennae&lt;br /&gt;
* 26 = Pneumatized Carapace&lt;br /&gt;
* 27 = Metabolic Boost&lt;br /&gt;
* 28 = Adrenal Glands&lt;br /&gt;
* 29 = Muscular Augments&lt;br /&gt;
* 30 = Grooved Spines&lt;br /&gt;
* 31 = Gamete Meiosis (Queen +50)&lt;br /&gt;
* 32 = Metasynaptic Node (Defiler +50)&lt;br /&gt;
* 33 = Singularity Charge&lt;br /&gt;
* 34 = Leg Enhancements&lt;br /&gt;
* 35 = Scarab Damage &lt;br /&gt;
* 36 = Reaver Capacity &lt;br /&gt;
* 37 = Gravitic Drive&lt;br /&gt;
* 38 = Sensor Array&lt;br /&gt;
* 39 = Gravitic Boosters&lt;br /&gt;
* 40 = Khaydarin Amulet (HT +50)&lt;br /&gt;
* 41 = Apial Sensors&lt;br /&gt;
* 42 = Gravitic Thrusters&lt;br /&gt;
* 43 = Carrier Capacity&lt;br /&gt;
* 44 = Khaydarin Core (Arbiter +50)&lt;br /&gt;
* 45 = Unknown Upgrade45&lt;br /&gt;
* 46 = Unknown Upgrade46&lt;br /&gt;
* 47 = Argus Jewel (Corsair +50)&lt;br /&gt;
* 48 = Unknown Upgrade48&lt;br /&gt;
* 49 = Argus Talisman (DA +50)&lt;br /&gt;
* 50 = Unknown Upgrade50&lt;br /&gt;
* 51 = Caduceus Reactor (Medic +50)&lt;br /&gt;
* 52 = Chitinous Plating&lt;br /&gt;
* 53 = Anabolic Synthesis&lt;br /&gt;
* 54 = Charon Booster&lt;br /&gt;
* 55 = Unknown Upgrade55&lt;br /&gt;
* 56 = Unknown Upgrade56&lt;br /&gt;
* 57 = Unknown Upgrade57&lt;br /&gt;
* 58 = Unknown Upgrade58&lt;br /&gt;
* 59 = Unknown Upgrade59&lt;br /&gt;
* 60 = Unknown Upgrade60&lt;br /&gt;
&lt;br /&gt;
==List of Unit Weapon IDs==&lt;br /&gt;
* 0 = Gauss Rifle (Normal)&lt;br /&gt;
* 1 = Gauss Rifle (Jim Raynor-Marine)&lt;br /&gt;
* 2 = C-10 Concussion Rifle (Normal)&lt;br /&gt;
* 3 = C-10 Concussion Rifle (Sarah Kerrigan)&lt;br /&gt;
* 4 = Fragmentation Grenade (Normal)&lt;br /&gt;
* 5 = Fragmentation Grenade (Jim Raynor-Vulture)&lt;br /&gt;
* 6 = Spider Mines&lt;br /&gt;
* 7 = Twin Autocannons (Normal)&lt;br /&gt;
* 8 = Hellfire Missile Pack (Normal)&lt;br /&gt;
* 9 = Twin Autocannons (Alan Schezar)&lt;br /&gt;
* 10 = Hellfire Missile Pack (Alan Schezar)&lt;br /&gt;
* 11 = Arclite Cannon (Normal)&lt;br /&gt;
* 12 = Arclite Cannon (Edmund Duke)&lt;br /&gt;
* 13 = Fusion Cutter&lt;br /&gt;
* 14 = Fusion Cutter (Harvest)&lt;br /&gt;
* 15 = Gemini Missiles (Normal)&lt;br /&gt;
* 16 = Burst Lasers (Normal)&lt;br /&gt;
* 17 = Gemini Missiles (Tom Kazansky)&lt;br /&gt;
* 18 = Burst Lasers (Tom Kazansky)&lt;br /&gt;
* 19 = ATS Laser Battery (Normal)&lt;br /&gt;
* 20 = ATA Laser Battery (Normal)&lt;br /&gt;
* 21 = ATS Laser Battery (Norad II+Mengsk+DuGalle)&lt;br /&gt;
* 22 = ATA Laser Battery (Norad II+Mengsk+DuGalle)&lt;br /&gt;
* 23 = ATS Laser Battery (Hyperion)&lt;br /&gt;
* 24 = ATA Laser Battery (Hyperion)&lt;br /&gt;
* 25 = Flame Thrower (Normal)&lt;br /&gt;
* 26 = Flame Thrower (Gui Montag)&lt;br /&gt;
* 27 = Arclite Shock Cannon (Normal)&lt;br /&gt;
* 28 = Arclite Shock Cannon (Edmund Duke)&lt;br /&gt;
* 29 = Longbolt Missiles&lt;br /&gt;
* 30 = Yamato Gun&lt;br /&gt;
* 31 = Nuclear Missile&lt;br /&gt;
* 32 = Lockdown&lt;br /&gt;
* 33 = EMP Shockwave&lt;br /&gt;
* 34 = Irradiate&lt;br /&gt;
* 35 = Claws (Normal)&lt;br /&gt;
* 36 = Claws (Devouring One)&lt;br /&gt;
* 37 = Claws (Infested Kerrigan)&lt;br /&gt;
* 38 = Needle Spines (Normal)&lt;br /&gt;
* 39 = Needle Spines (Hunter Killer)&lt;br /&gt;
* 40 = Kaiser Blades (Normal)&lt;br /&gt;
* 41 = Kaiser Blades (Torrasque)&lt;br /&gt;
* 42 = Toxic Spores (Broodling)&lt;br /&gt;
* 43 = Spines&lt;br /&gt;
* 44 = Spines (Harvest)&lt;br /&gt;
* 45 = Acid Spray (Unused)&lt;br /&gt;
* 46 = Acid Spore (Normal)&lt;br /&gt;
* 47 = Acid Spore (Kukulza-Guardian)&lt;br /&gt;
* 48 = Glave Wurm (Normal)&lt;br /&gt;
* 49 = Glave Wurm (Kukulza-Mutalisk)&lt;br /&gt;
* 50 = Venom (Unused-Defiler)&lt;br /&gt;
* 51 = Venom (Unused-Defiler Hero)&lt;br /&gt;
* 52 = Seeker Spores&lt;br /&gt;
* 53 = Subterranean Tentacle&lt;br /&gt;
* 54 = Suicide (Infested Terran)&lt;br /&gt;
* 55 = Suicide (Scourge)&lt;br /&gt;
* 56 = Parasite&lt;br /&gt;
* 57 = Spawn Broodlings&lt;br /&gt;
* 58 = Ensnare&lt;br /&gt;
* 59 = Dark Swarm&lt;br /&gt;
* 60 = Plague&lt;br /&gt;
* 61 = Consume&lt;br /&gt;
* 62 = Particle Beam&lt;br /&gt;
* 63 = Particle Beam (Harvest)&lt;br /&gt;
* 64 = Psi Blades (Normal)&lt;br /&gt;
* 65 = Psi Blades (Fenix-Zealot)&lt;br /&gt;
* 66 = Phase Disruptor (Normal)&lt;br /&gt;
* 67 = Phase Disruptor (Fenix-Dragoon)&lt;br /&gt;
* 68 = Psi Assault (Normal-Unused)&lt;br /&gt;
* 69 = Psi Assault (Tassadar+Aldaris)&lt;br /&gt;
* 70 = Psionic Shockwave (Normal)&lt;br /&gt;
* 71 = Psionic Shockwave (Tassadar/Zeratul Archon)&lt;br /&gt;
* 72 = Unknown72&lt;br /&gt;
* 73 = Dual Photon Blasters (Normal)&lt;br /&gt;
* 74 = Anti-matter Missiles (Normal)&lt;br /&gt;
* 75 = Dual Photon Blasters (Mojo)&lt;br /&gt;
* 76 = Anit-matter Missiles (Mojo)&lt;br /&gt;
* 77 = Phase Disruptor Cannon (Normal)&lt;br /&gt;
* 78 = Phase Disruptor Cannon (Danimoth)&lt;br /&gt;
* 79 = Pulse Cannon&lt;br /&gt;
* 80 = STS Photon Cannon&lt;br /&gt;
* 81 = STA Photon Cannon&lt;br /&gt;
* 82 = Scarab&lt;br /&gt;
* 83 = Stasis Field&lt;br /&gt;
* 84 = Psi Storm&lt;br /&gt;
* 85 = Warp Blades (Zeratul)&lt;br /&gt;
* 86 = Warp Blades (Dark Templar Hero)&lt;br /&gt;
* 87 = Missiles (Unused)&lt;br /&gt;
* 88 = Laser Battery1 (Unused)&lt;br /&gt;
* 89 = Tormentor Missiles (Unused)&lt;br /&gt;
* 90 = Bombs (Unused)&lt;br /&gt;
* 91 = Raider Gun (Unused)&lt;br /&gt;
* 92 = Laser Battery2 (Unused)&lt;br /&gt;
* 93 = Laser Battery3 (Unused)&lt;br /&gt;
* 94 = Dual Photon Blasters (Unused)&lt;br /&gt;
* 95 = Flechette Grenade (Unused)&lt;br /&gt;
* 96 = Twin Autocannons (Floor Trap)&lt;br /&gt;
* 97 = Hellfire Missile Pack (Wall Trap)&lt;br /&gt;
* 98 = Flame Thrower (Wall Trap)&lt;br /&gt;
* 99 = Hellfire Missile Pack (Floor Trap)&lt;br /&gt;
* 100 = Neutron Flare&lt;br /&gt;
* 101 = Disruption Web&lt;br /&gt;
* 102 = Restoration&lt;br /&gt;
* 103 = Halo Rockets&lt;br /&gt;
* 104 = Corrosive Acid&lt;br /&gt;
* 105 = Mind Control&lt;br /&gt;
* 106 = Feedback&lt;br /&gt;
* 107 = Optical Flare&lt;br /&gt;
* 108 = Maelstrom&lt;br /&gt;
* 109 = Subterranean Spines&lt;br /&gt;
* 110 = Gauss Rifle0 (Unused)&lt;br /&gt;
* 111 = Warp Blades (Normal)&lt;br /&gt;
* 112 = C-10 Concussion Rifle (Samir Duran)&lt;br /&gt;
* 113 = C-10 Concussion Rifle (Infested Duran)&lt;br /&gt;
* 114 = Dual Photon Blasters (Artanis)&lt;br /&gt;
* 115 = Anti-matter Missiles (Artanis)&lt;br /&gt;
* 116 = C-10 Concussion Rifle (Alexei Stukov)&lt;br /&gt;
* 117 = Gauss Rifle1 (Unused)&lt;br /&gt;
* 118 = Gauss Rifle2 (Unused)&lt;br /&gt;
* 119 = Gauss Rifle3 (Unused)&lt;br /&gt;
* 120 = Gauss Rifle4 (Unused)&lt;br /&gt;
* 121 = Gauss Rifle5 (Unused)&lt;br /&gt;
* 122 = Gauss Rifle6 (Unused)&lt;br /&gt;
* 123 = Gauss Rifle7 (Unused)&lt;br /&gt;
* 124 = Gauss Rifle8 (Unused)&lt;br /&gt;
* 125 = Gauss Rifle9 (Unused)&lt;br /&gt;
* 126 = Gauss Rifle10 (Unused)&lt;br /&gt;
* 127 = Gauss Rifle11 (Unused)&lt;br /&gt;
* 128 = Gauss Rifle12 (Unused)&lt;br /&gt;
* 129 = Gauss Rifle13 (Unused)&lt;br /&gt;
* 130 = None&lt;br /&gt;
&lt;br /&gt;
==Complete Modifier List==&lt;br /&gt;
* 0 = Condition: &amp;gt;= (greater than or equal to)&lt;br /&gt;
* 1 = Condition: &amp;lt;= (less than or equal to)&lt;br /&gt;
* 2 = Condition: == TRUE (Is True)&lt;br /&gt;
* 3 = Condition: == FALSE (Is False)&lt;br /&gt;
* 4 = Action: = TRUE (Set to True)&lt;br /&gt;
* 5 = Action: = FALSE (Set to False)&lt;br /&gt;
* 6 = Action: NOT (toggle)&lt;br /&gt;
* 7 = Action: = (Set to)&lt;br /&gt;
* 8 = Action: += (Add)&lt;br /&gt;
* 9 = Action: -= (Subtract)&lt;br /&gt;
* 10 = Condition: == (Exactly)&lt;br /&gt;
* 11 = Action: Randomize&lt;br /&gt;
&lt;br /&gt;
[[Category:StarCraft]]&lt;br /&gt;
[[Category:Reference]]&lt;/div&gt;</summary>
		<author><name>FaRTy1billion</name></author>	</entry>

	<entry>
		<id>https://staredit.net/wiki/index.php?title=Scenario.chk&amp;diff=656</id>
		<title>Scenario.chk</title>
		<link rel="alternate" type="text/html" href="https://staredit.net/wiki/index.php?title=Scenario.chk&amp;diff=656"/>
				<updated>2022-01-23T21:49:26Z</updated>
		
		<summary type="html">&lt;p&gt;FaRTy1billion: /* &amp;quot;UPGS&amp;quot; - Upgrade Settings */ fixed &amp;quot;gas time factor&amp;quot; error&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The CHK file is a very dense file found inside the SCM or SCX file (as &amp;quot;staredit\scenario.chk&amp;quot;), which is just a renamed MPQ archive.&lt;br /&gt;
&lt;br /&gt;
In this article, some shorthand will be used for datatypes:&lt;br /&gt;
* '''u8''' for an unsigned byte&lt;br /&gt;
* '''u16''' for an unsigned short (2-byte integer)&lt;br /&gt;
* '''u32''' for an unsigned int (4-byte integer)&lt;br /&gt;
* '''uT[''a'']''' for an array of datatype '''T''' (8, 16, 32) with '''''a''''' number of elements&lt;br /&gt;
* '''uT[''a''][''b'']''' for a two-dimensional array of datatype '''T''', where each element of '''T[''a'']''' will be an array of size '''''b'''''&lt;br /&gt;
&lt;br /&gt;
=Sections=&lt;br /&gt;
The CHK is split into several named chunks (hence the file extension, an abbreviation of ''CHunK'').&lt;br /&gt;
&lt;br /&gt;
Each section begins with an 8-byte header:&lt;br /&gt;
* '''u32''' Name - A 4-byte string uniquely identifying that chunk's purpose.&lt;br /&gt;
* '''u32''' Size - The size, in bytes, of the chunk (not including this header)&lt;br /&gt;
Followed by as many bytes as 'Size', in a format described below.&lt;br /&gt;
&lt;br /&gt;
Some things to keep in mind about the CHK section:&lt;br /&gt;
* Invalid sections can exist and will be ignored. While Size is unsigned, it can safely be a negative value to read a chunk earlier in the file. This allows for &amp;quot;section stacking&amp;quot;, allowing smaller sections to be placed inside of larger ones or duplicate triggers or units to take less space in the file.&lt;br /&gt;
* All sections will marked &amp;quot;Not required.&amp;quot; are never read by StarCraft and can safely be omitted. However they may or may not be read by StarEdit, and may cause the map to be unreadable in an editor.&lt;br /&gt;
* Note &amp;quot;Hybrid&amp;quot;, or &amp;quot;Enhanced&amp;quot;, maps were introduced in 1.04. They are supported both by Original StarCraft and Brood War and usually contain sections for both types (e.g., UPGS and UPGx, TECS and TECx), but both sections aren't necessarily read.&lt;br /&gt;
* Duplicate sections will overwrite previously defined section data, except where noted. Note this only applies to those section that pass the specified &amp;quot;validation&amp;quot; parameters, as any section that does not successfully validate will be ignored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TYPE&amp;quot; - Map Type==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the type of scenario.&lt;br /&gt;
* '''u32''': Specifies the type of scenario:&lt;br /&gt;
** '''0x53574152''' or '''RAWS''' - 1.04 StarCraft and above (&amp;quot;hybrid&amp;quot;)&lt;br /&gt;
** '''0x42574152''' or '''RAWB''' - Brood War&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;VER &amp;quot; - Format Version==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section identifies the file format version.&lt;br /&gt;
* '''u16''': File format version:&lt;br /&gt;
** '''59''' - Starcraft 1.00 (original retail release)&lt;br /&gt;
** '''63''' - Starcraft 1.04 ''(hybrid)''&lt;br /&gt;
** '''64''' - Starcraft Remastered (1.21) ''(hybrid)''&lt;br /&gt;
** '''205''' - Brood War 1.00 ''(1.04)''&lt;br /&gt;
** '''206''' - Starcraft Remastered (1.21) ''(broodwar)''&lt;br /&gt;
This is the only version code section to actually be read by StarCraft (of TYPE, VER , IVER, and IVE2). Any other value is invalid in retail StarCraft and is usually a beta version.&lt;br /&gt;
&lt;br /&gt;
Other unsupported versions include:&lt;br /&gt;
* '''0-19''' - ''Warcraft II versions (.PUD)''&lt;br /&gt;
* '''47''' - ''Starcraft Beta''&lt;br /&gt;
* '''61''' - Brood War internal (map version 61)&lt;br /&gt;
* '''75''' - Brood War internal (map version 75)&lt;br /&gt;
* '''201''' - Brood War internal (map version 201)&lt;br /&gt;
* '''203''' - Brood War internal (map version 203)&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IVER&amp;quot; - Map Version==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section &amp;quot;additionally identifies&amp;quot; the map version.&lt;br /&gt;
* '''u16''': &amp;quot;Additional file format version:&amp;quot;&lt;br /&gt;
** '''9''' - beta/obsolete versions&lt;br /&gt;
** '''10''' - current versions&lt;br /&gt;
When saving as expansion this section gets removed entirely. Contrary to popular belief, it doesn't get &amp;quot;replaced&amp;quot; by IVE2 in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IVE2&amp;quot; - Map Version==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section &amp;quot;additionally identifies&amp;quot; the map version.&lt;br /&gt;
* '''u16''': &amp;quot;Additional file format version:&amp;quot;&lt;br /&gt;
** '''11''' - 1.04 StarCraft and above (&amp;quot;hybrid&amp;quot;) or Brood War.&lt;br /&gt;
This section does not &amp;quot;replace&amp;quot; IVER in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;VCOD&amp;quot; - Verification Code==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be equal to size of the VCOD data in the EXE resource. Must result in valid checksum.''&lt;br /&gt;
&lt;br /&gt;
This section has a verification code to make sure this is actually a CHK file.&lt;br /&gt;
&lt;br /&gt;
* '''u32[256]''': Seed values.&lt;br /&gt;
* '''u8[16]''': Operation codes to produce the resulting hash:&lt;br /&gt;
** '''00''' - XOR's the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''01''' - Adds to the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''02''' - Subtracts from the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''03''' - XOR's the current hash with the VCOD table at index OWNR, SIDE, FORC, and 0&lt;br /&gt;
** '''04''' - same as 0x03&lt;br /&gt;
** '''05''' - same as 0x03&lt;br /&gt;
** '''06''' - Complex function consisting of ORs and shifts&lt;br /&gt;
** '''07''' - Inverted version of 0x06, switching direction of all shifts&lt;br /&gt;
** '''08+''' - Do nothing&lt;br /&gt;
Opcodes and seeds do not have to match those in EXE resource, as long as the same value is produced.&amp;lt;br&amp;gt;&lt;br /&gt;
The only indexes in the seed table that are referenced are those that correspond individual values of [[#&amp;quot;OWNR&amp;quot; - StarCraft Player Types|OWNR]], [[#&amp;quot;SIDE&amp;quot; - Player Races|SIDE]], [[#&amp;quot;FORC&amp;quot; - Force Settings|FORC]] player assignments, and index 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IOWN&amp;quot; - StarEdit Player Types==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the owner of each player.&lt;br /&gt;
* '''u8[12]''': One byte for each player, specifies the owner of the player:&lt;br /&gt;
** '''00''' - Inactive&lt;br /&gt;
** ''01'' - Computer (game)&lt;br /&gt;
** ''02'' - Occupied by Human Player&lt;br /&gt;
** '''03''' - Rescue Passive&lt;br /&gt;
** '''04''' - Unused&lt;br /&gt;
** '''05''' - Computer&lt;br /&gt;
** '''06''' - Human (Open Slot)&lt;br /&gt;
** '''07''' - Neutral&lt;br /&gt;
** ''08'' - Closed slot&lt;br /&gt;
This section is separate from OWNR as a staredit value. Staredit does not display &amp;quot;inactive&amp;quot; as a valid option. Italicized settings denote invalid map options, which may involve a buffer overflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;OWNR&amp;quot; - StarCraft Player Types==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 12 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section designates the controller of a particular player. It is exactly the same as the &amp;quot;IOWN&amp;quot; section, except there is an additional value, 0x00 for Inactive.&lt;br /&gt;
* '''u8[12]''': One byte for each player, specifies the owner of the player:&lt;br /&gt;
** '''00''' - Inactive&lt;br /&gt;
** ''01'' - Computer (game)&lt;br /&gt;
** ''02'' - Occupied by Human Player&lt;br /&gt;
** '''03''' - Rescue Passive&lt;br /&gt;
** '''04''' - Unused&lt;br /&gt;
** '''05''' - Computer&lt;br /&gt;
** '''06''' - Human (Open Slot)&lt;br /&gt;
** '''07''' - Neutral&lt;br /&gt;
** ''08'' - Closed slot&lt;br /&gt;
Italicized settings denote invalid map options, which may involve a buffer overflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;ERA &amp;quot; - Tileset==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section indicates the tileset of the scenario.&lt;br /&gt;
* '''u16''': Designates tileset:&lt;br /&gt;
** '''00''' - Badlands&lt;br /&gt;
** '''01''' - Space Platform&lt;br /&gt;
** '''02''' - Installation&lt;br /&gt;
** '''03''' - Ashworld&lt;br /&gt;
** '''04''' - Jungle&lt;br /&gt;
** '''05''' - Desert&lt;br /&gt;
** '''06''' - Arctic&lt;br /&gt;
** '''07''' - Twilight&lt;br /&gt;
StarCraft masks the tileset indicator's bit value, so bits after the third place (anything after the value &amp;quot;7&amp;quot;) are removed. Thus, 9 (1001 in binary) is interpreted as 1 (0001), 10 (1010) as 2 (0010), etc.&amp;lt;br&amp;gt;&lt;br /&gt;
Desert, Arctic, and Twilight are Brood War-only tilesets.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;DIM &amp;quot; - Map Dimensions==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains the dimensions of the map.&lt;br /&gt;
* '''u16''': Width of the map&lt;br /&gt;
* '''u16''': Height of the map&lt;br /&gt;
The Width/Height of the map is measured in the number of square 32x32p tiles.&amp;lt;br&amp;gt;&lt;br /&gt;
Standard Dimensions are 64, 96, 128, 192, and 256.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SIDE&amp;quot; - Player Races==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 12 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains the species/race of each player.&lt;br /&gt;
* '''u8[12]''': 1 byte per player the species of that player:&lt;br /&gt;
** '''00''' - Zerg&lt;br /&gt;
** '''01''' - Terran&lt;br /&gt;
** '''02''' - Protoss&lt;br /&gt;
** ''03'' - Invalid (Independent), shown as &amp;quot;Unknown&amp;quot; in SC:R lobby&lt;br /&gt;
** ''04'' - Invalid (Neutral), shown as &amp;quot;Unknown&amp;quot;&lt;br /&gt;
** '''05''' - User Select&lt;br /&gt;
** '''06''' - Random (Forced; Acts as a selected race)&lt;br /&gt;
** ''07'' - Inactive, shown as locked &amp;quot;Select Race&amp;quot; option in SC:R lobby&lt;br /&gt;
Italicized settings denote invalid map options. Note Players 9-11 are defaultly Inactive and Player 12 is defaultly Neutral.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MTXM&amp;quot; - StarCraft Terrain==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be less than or equal to 131072 (0x20000) bytes (256 * 256 * 2).''&lt;br /&gt;
&lt;br /&gt;
Terrain section that contains a map of the level's appearance. StarEdit disregards this section and instead uses [[#&amp;quot;TILE&amp;quot; - StarEdit Terrain|TILE]]; it is only used in Starcraft.&lt;br /&gt;
* '''u16[map width * height]''': one integer for each tile.&lt;br /&gt;
Notes about MTXM:&lt;br /&gt;
* The Width/Height of the map is measured in the number of square 32x32p tiles.&lt;br /&gt;
* Tiles in this section are listed from left to right, top to bottom.&lt;br /&gt;
* The values for each integer are their respective &amp;quot;MegaTile&amp;quot; values in the scenario's tileset. If the size of this section is greater than width*height*2, the data following is ignored. If the size of this section is less, the resulting tiles that have not been defined will be null tiles.&lt;br /&gt;
* This section includes doodads as terrain; TILE, which is otherwise identical, doesn't. Out of the terrain sections (TILE, ISOM, and MTXM), SC only reads MTXM for the sake of not having to generate this data on-the-fly: it contains the exact representation of the level's appearance, including doodads. TILE, on the other hand, is directly tied via a tile lookup function to ISOM, and exists for the sake of not having to generate tiles from ISOM on-the-fly in StarEdit.&lt;br /&gt;
* If MTXM section is smaller than (map width*height), then the remaining tiles will be filled with null tiles or tiles specified by previous MTXM sections.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PUNI&amp;quot; - Player Unit Restrictions==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 5700 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains player unit restrictions: it indicates whether the player can or cannot build a particular unit.&lt;br /&gt;
* '''u8[228][12]''': 1 byte for each unit in order of its unit id, then each player, for player availability:&lt;br /&gt;
** '''00''' - That unit is not available for production if the player has 'override defaults' on&lt;br /&gt;
** '''01''' - That unit is available for production if the player has 'override defaults' on&lt;br /&gt;
* '''u8[228]''': 1 byte for each unit in order of it's unit id, for global availability defaults (for all players):&lt;br /&gt;
** '''00''' - That unit is not available for production&lt;br /&gt;
** '''01''' - That unit is available for production&lt;br /&gt;
* '''u8[228][12]''': 1 byte for each unit in order of its unit id, then each player, indicating whether a player uses the global availability defaults.&lt;br /&gt;
** '''00''' - Player overrides defaults for this unit&lt;br /&gt;
** '''01''' - Player uses defaults for this unit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGR&amp;quot; - Upgrade Restrictions==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1748 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;PUPx&amp;quot; - BW Upgrade Restrictions|&amp;quot;PUPx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains player upgrade restrictions: it indicates the starting/maximum levels at/to which a player can perform a particular upgrade.&lt;br /&gt;
* '''u8[46][12]''': 1 byte for the maximum level a player can upgrade to, in order of its upgrade id, then each player&lt;br /&gt;
* '''u8[46][12]''': 1 byte for the level of an upgrade a player starts off with, in order of its upgrade id, then each player&lt;br /&gt;
* '''u8[46]''': 1 byte for the global default maximum level of each upgrade, in order of its upgrade id.&lt;br /&gt;
* '''u8[46]''': 1 byte for the global default starting level of each upgrade, in order of its upgrade id.&lt;br /&gt;
* '''u8[46][12]''': 1 byte for each upgrade in order of its upgrade id, then each player, indicating whether a player uses the global upgrade defaults:&lt;br /&gt;
** '''00''' - Player does not use global upgrade defaults for this upgrade&lt;br /&gt;
** '''01''' - Player uses upgrade defaults for this upgrade&lt;br /&gt;
See [[#List of Upgrade IDs]].&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PTEC&amp;quot; - Tech Restrictions==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 912 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;PTEx&amp;quot; - BW Tech Restrictions|&amp;quot;PTEx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains player technology availability restrictions: it indicates whether a player starts off with a particular technology or can research a particular technology.&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology id, then each player, for player availability:&lt;br /&gt;
** '''00''' - Technology is not available for a player&lt;br /&gt;
** '''01''' - Technology is available for a player&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology id, then each player, for &amp;quot;already researched&amp;quot; status:&lt;br /&gt;
** '''00''' - Technology is not already researched&lt;br /&gt;
** '''01''' - Technology is already researched&lt;br /&gt;
* '''u8[24]''': 1 byte for each technology for global availability defaults:&lt;br /&gt;
** '''00''' - Technology is not available by default&lt;br /&gt;
** '''01''' - Technology is available by default&lt;br /&gt;
* '''u8[24]''': 1 byte for each technology for global &amp;quot;already researched&amp;quot; defaults:&lt;br /&gt;
** '''00''' - Technology is not already researched by default&lt;br /&gt;
** '''01''' - Technology is already researched by default&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology in order of its technology id, then each player, indicating whether a player uses the global defaults:&lt;br /&gt;
** '''00''' - Technology overrides defaults for player&lt;br /&gt;
** '''01''' - Technology uses default settings for player&lt;br /&gt;
See [[#List of Technology IDs]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIT&amp;quot; - Placed Units==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 36 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the pre-placed units on the map and their properties. Each unit on the map gets the following structure:&lt;br /&gt;
* '''u32''': The unit's class instance (sort of a &amp;quot;serial number&amp;quot;)&lt;br /&gt;
* U16''': X coordinate of unit&lt;br /&gt;
* U16''': Y coordinate of unit&lt;br /&gt;
* '''u16''': Unit ID&lt;br /&gt;
* '''u16''': Type of relation to another building (i.e. add-on, nydus link)&lt;br /&gt;
** '''Bit 9''' - Nydus Link&lt;br /&gt;
** '''Bit 10''' - Addon Link&lt;br /&gt;
* '''u16''': Flags of special properties which can be applied to the unit and are valid:&lt;br /&gt;
** '''Bit 0''' - Cloak is valid&lt;br /&gt;
** '''Bit 1''' - Burrow is valid&lt;br /&gt;
** '''Bit 2''' - In transit is valid&lt;br /&gt;
** '''Bit 3''' - Hallucinated is valid&lt;br /&gt;
** '''Bit 4''' - Invincible is valid&lt;br /&gt;
** '''Bit 5-15''' - Unused&lt;br /&gt;
* '''u16''': Out of the elements of the unit data, the properties which can be changed by the map maker:&lt;br /&gt;
** '''Bit 0''' - Owner player is valid (the unit is not a critter, start location, etc.; not a neutral unit)&lt;br /&gt;
** '''Bit 1''' - HP is valid&lt;br /&gt;
** '''Bit 2''' - Shields is valid&lt;br /&gt;
** '''Bit 3''' - Energy is valid (unit is a wraith, etc.)&lt;br /&gt;
** '''Bit 4''' - Resource amount is valid (unit is a mineral patch, vespene geyser, etc.)&lt;br /&gt;
** '''Bit 5''' - Amount in hangar is valid (unit is a reaver, carrier, etc.)&lt;br /&gt;
** '''Bit 6-15''' - Unused&lt;br /&gt;
* '''u8''': Player number of owner (0-based)&lt;br /&gt;
* '''u8''': Hit points % (1-100)&lt;br /&gt;
* '''u8''': Shield points % (1-100)&lt;br /&gt;
* '''u8''': Energy points % (1-100)&lt;br /&gt;
* '''u32''': Resource amount&lt;br /&gt;
* '''u16''': Number of units in hangar&lt;br /&gt;
* '''u16''': Unit state flags&lt;br /&gt;
** '''Bit 0''' - Unit is cloaked&lt;br /&gt;
** '''Bit 1''' - Unit is burrowed&lt;br /&gt;
** '''Bit 2''' - Building is in transit&lt;br /&gt;
** '''Bit 3''' - Unit is hallucinated&lt;br /&gt;
** '''Bit 4''' - Unit is invincible&lt;br /&gt;
** '''Bit 5-15''' - Unused&lt;br /&gt;
* '''u32''': Unused&lt;br /&gt;
* '''u32''': Class instance of the unit to which this unit is related to (i.e. via an add-on, nydus link, etc.). It is &amp;quot;0&amp;quot; if the unit is not linked to any other unit.&lt;br /&gt;
Notes about UNIT:&lt;br /&gt;
* The X/Y coordinates are the center of the sprite of the unit (in pixels).&lt;br /&gt;
* Please edit if you could confirm the bit values to be correct/if you know more bit values.&lt;br /&gt;
* Default values will apply if bit values are unchecked. Defaults: 100% HP, 100% SP, 100% EP, 0 resources, 0 hangar count.&lt;br /&gt;
* This section can be split. Additional UNIT sections will add more units.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;ISOM&amp;quot; - Isometric Terrain==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section is required to place isometric terrain on the map. It provides data about the nature of the isometrical &amp;quot;diamonds&amp;quot; (the editing mode of StarEdit).&lt;br /&gt;
* '''u16[ (width / 2 + 1) * (height + 1) * 4 ]''': 4 integers for each map rectangle tile (plus one extra tile to the right and bottom of the map), as per the RECT structure. Each rectangle border (left, top, right, bottom) is assigned an &amp;quot;ISOM value.&amp;quot; These form the &amp;quot;diamond&amp;quot; pattern of the map, and each rectangle thus gets two ISOM values associated with it. StarEdit somehow hashes these (the exact algorithm is unknown) and thus produces the tile index of the rectangle (which it stores in TILE for reasons of efficiency). The index of the rectangle's right tile is that of its left tile + 16.&lt;br /&gt;
This section is the only truly unknown section of the .chk format. If you're an ex-Blizzard employee or SI, please edit this section. If you have additional research, post on the forums about it and/or edit this section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TILE&amp;quot; - StarEdit Terrain==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section will only be different from the [[#&amp;quot;MTXM&amp;quot; - StarCraft Terrain|MTXM]] section in tiles where doodads are present.&lt;br /&gt;
* '''u16[ map width * height ]''': 1 integer for each map tile. Moves horizontally across the map.&lt;br /&gt;
The values in TILE are normally directly generated from the ISOM section (see &amp;quot;'ISOM' section&amp;quot; above), and thus do not match that of MTXM on doodad tiles.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;DD2 &amp;quot; - StarEdit Sprites (Doodads)==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section contains the doodad map of the level. There are several parts to doodads. The graphical portion is stored in the [[#&amp;quot;MTXM&amp;quot; - StarCraft Terrain|MTXM]] section. The second part of the doodad is stored in this section. This section is only used by the map editor.&lt;br /&gt;
&lt;br /&gt;
Each doodad in the map gets the following structure:&lt;br /&gt;
* '''u16''': Number of the doodad. Size of the doodad is dependent on this. Doodads are different for each tileset.&lt;br /&gt;
* '''u16''': X coordinate of the doodad unit&lt;br /&gt;
* '''u16''': Y coordinate of the doodad unit&lt;br /&gt;
* '''u8''': Player number that owns the doodad&lt;br /&gt;
* '''u8''': Enabled flag&lt;br /&gt;
** '''00''' - Doodad is enabled (trap can attack, door is closed, etc)&lt;br /&gt;
** '''01''' - Doodad is disabled&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;THG2&amp;quot; - StarCraft Sprites==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 10 bytes.''&lt;br /&gt;
&lt;br /&gt;
The map editor only writes to this section. Starcraft uses this section.&lt;br /&gt;
&lt;br /&gt;
Sprites, usually on doodads, get the following structure.&lt;br /&gt;
* '''u16''': Unit/Sprite number of the sprite&lt;br /&gt;
* '''u16''': X coordinate of the doodad unit&lt;br /&gt;
* '''u16''': Y coordinate of the doodad unit&lt;br /&gt;
* '''u8''': Player number that owns the doodad&lt;br /&gt;
* '''u8''': Unused&lt;br /&gt;
* '''u16''': Flags&lt;br /&gt;
** '''Bit 0-11''' - Unused&lt;br /&gt;
** '''Bit 12''' - Draw as sprite (Determines if it is a sprite or a unit sprite)&lt;br /&gt;
** '''Bit 13''' - Unused&lt;br /&gt;
** '''Bit 14''' - Unused&lt;br /&gt;
** '''Bit 15''' - Disabled (Only valid if Draw as sprite is unchecked, disables the unit)&lt;br /&gt;
This section can be split. Additional THG2 sections will add more sprites.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MASK&amp;quot; - Fog of War Layer==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: This section will always validate.''&lt;br /&gt;
&lt;br /&gt;
This section contains the data on fog of war for each player. This is whether at the start of the game that levels of black space that is available.&lt;br /&gt;
* '''u8[ map width * height ]''': One byte for each map tile. The bits indicate for each player the fog of war.&lt;br /&gt;
** '''Bit 0''' - Player 1's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 1''' - Player 2's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 2''' - Player 3's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 3''' - Player 4's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 4''' - Player 5's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 5''' - Player 6's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 6''' - Player 7's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 7''' - Player 8's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
Any size greater than width*height will be ignored. Any size less will default missing tiles to 0xFF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;STR &amp;quot; - String Data==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be at least 1 byte.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the strings in the map.&lt;br /&gt;
* '''u16''': Number of strings in the section (Default''': 1024)&lt;br /&gt;
* '''u16[Number of strings]''': 1 integer for each string specifying the offset (the spot where the string starts in the section from the start of it).&lt;br /&gt;
* '''Strings''': After the offsets, this is where every string in the map goes, one after another. Each one is terminated by a null character.&lt;br /&gt;
This section can contain more or less then 1024 string offsests and will work in Starcraft.&amp;lt;br&amp;gt;&lt;br /&gt;
By default the first byte in '''Strings''' is a NUL character, and all unused offsets in the STR section point to this NUL character.&lt;br /&gt;
Note that STR sections can be stacked in a smiliar fashion as MTXM. The exact mechanisms of this are uncertain.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPRP&amp;quot; - CUWP Slots==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1280 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section is used whenever the create units with properties trigger is used. Since a slot has to be assigned to the action, this is where each slot is designated.&lt;br /&gt;
&lt;br /&gt;
There are 64 of the following structures regardless of how many are used and it cannot exceed 64.&lt;br /&gt;
* '''u16''': Flag of which special properties can be applied to unit, and are valid.&lt;br /&gt;
** '''Bit 0''' - Cloak bit is valid&lt;br /&gt;
** '''Bit 1''' - Burrowed bit is valid&lt;br /&gt;
** '''Bit 2''' - In transit bit is valid&lt;br /&gt;
** '''Bit 3''' - Hallucinated bit is valid&lt;br /&gt;
** '''Bit 4''' - Invincible bit is valid&lt;br /&gt;
** '''Bit 5-15''' - Unknown/unused&lt;br /&gt;
* '''u16''': Which elements of the unit data are valid, which properties can be changed by the map maker.&lt;br /&gt;
** '''Bit 0''' - Owner player is valid (unit is not neutral)&lt;br /&gt;
** '''Bit 1''' - HP is valid&lt;br /&gt;
** '''Bit 2''' - Shields is valid&lt;br /&gt;
** '''Bit 3''' - Energy is valid&lt;br /&gt;
** '''Bit 4''' - Resource amount is valid (unit is a resource)&lt;br /&gt;
** '''Bit 5''' - Amount in hanger is valid&lt;br /&gt;
** '''Bit 6''' - Unknown/unused&lt;br /&gt;
* '''u8''': Player number that owns unit. Will always be NULL in this section (0)&lt;br /&gt;
* '''u8''': Hit point % (1-100)&lt;br /&gt;
* '''u8''': Shield point % (1-100)&lt;br /&gt;
* '''u8''': Energy point % (1-100)&lt;br /&gt;
* '''u32''': Resource amount (for resources only)&lt;br /&gt;
* '''u16''': # of units in hangar&lt;br /&gt;
* '''u16''': Flags&lt;br /&gt;
** '''Bit 0''' - Unit is cloaked&lt;br /&gt;
** '''Bit 1''' - Unit is burrowed&lt;br /&gt;
** '''Bit 2''' - Building is in transit&lt;br /&gt;
** '''Bit 3''' - Unit is hallucinated&lt;br /&gt;
** '''Bit 4''' - Unit is invincible&lt;br /&gt;
** '''Bit 5-15''' - Unknown/unused&lt;br /&gt;
* '''u32''': Unknown/unused. Padding?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPUS&amp;quot; - CUWP Slots Used==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section goes along with the &amp;quot;UPRP&amp;quot; section. This section just indicates which of the 64 unit properties slot are used.&lt;br /&gt;
* '''u8[64]''': 1 byte for each trigger unit properties slot&lt;br /&gt;
** '''00''' - Properties slot is unused&lt;br /&gt;
** '''01''' - Properties slot is used&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MRGN&amp;quot; - Locations==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: 1280 bytes for retail, 5100 bytes for Hybrid and Broodwar.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the locations that the map uses. In a vanilla map, this section contains 64 locations. In a Hybrid or Brood War map, this section will expand to contain 255 locations.&lt;br /&gt;
&lt;br /&gt;
Each location gets one of the following location entries. The 'Anywhere' location, is ALWAYS location 64.&lt;br /&gt;
* '''u32''': Left (X1) coordinate of location, in pixels (usually 32 pt grid aligned)&lt;br /&gt;
* '''u32''': Top (Y1) coordinate of location, in pixels&lt;br /&gt;
* '''u32''': Right (X2) coordinate of location, in pixels&lt;br /&gt;
* '''u32''': Bottom (Y2) coordinate of location, in pixels&lt;br /&gt;
* '''u16''': String number of the name of this location&lt;br /&gt;
* '''u16''': Location elevation flags. If an elevation is disabled in the location, it's bit will be on (1)&lt;br /&gt;
** '''Bit 0''' - Low elevation&lt;br /&gt;
** '''Bit 1''' - Medium elevation&lt;br /&gt;
** '''Bit 2''' - High elevation&lt;br /&gt;
** '''Bit 3''' - Low air&lt;br /&gt;
** '''Bit 4''' - Medium air&lt;br /&gt;
** '''Bit 5''' - High air&lt;br /&gt;
** '''Bit 6-15''' - Unused&lt;br /&gt;
Note that in typical locations Right is always larger than Left and Bottom is always larger than Top. However, you can reverse one or both of these for [[Inverted Locations]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TRIG&amp;quot; - Triggers==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 2400 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the triggers in the map. This along with [[#&amp;quot;MBRF&amp;quot; - Mission Briefings|MBRF]] is the most complicated section in the entire scenario.chk file as there is a lot of data packed into too little of a space. Refer to the appendix at the bottom of this page for more information.&lt;br /&gt;
For easy reference, since each trigger contains 2400 bytes, the amount of triggers can be gotten by taking the section length and dividing by 2400.&lt;br /&gt;
Every single trigger in the map will have the following format:&lt;br /&gt;
* 16 Conditions (20 byte struct)&amp;lt;br&amp;gt; Every trigger has 16 of the following format, even if only one condition is used. See the appendix for information on which items are used for what conditions.&lt;br /&gt;
** '''u32''': Location number for the condition (1 based -- 0 refers to No Location), EUD Bitmask for a Death condition if the MaskFlag is set to &amp;quot;SC&amp;quot;&lt;br /&gt;
** '''u32''': [[#List of Players/Group IDs|Group]] that the condition applies to&lt;br /&gt;
** '''u32''': Qualified number (how many/resource amount)&lt;br /&gt;
** '''u16''': [[#Trigger Unit Types|Unit ID]] condition applies to&lt;br /&gt;
** '''u8''': [[#Numeric Comparisons|Numeric comparison]], [[#Switch States|switch state]]&lt;br /&gt;
** '''u8''': [[#Trigger Conditions List|Condition byte]]&lt;br /&gt;
** '''u8''': [[#Resource Types|Resource type]], [[#Score Types|score type]], Switch number (0-based)&lt;br /&gt;
** '''u8''': Flags&lt;br /&gt;
*** '''Bit 0''' - Unknown/unused&lt;br /&gt;
*** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled/ignored&lt;br /&gt;
*** '''Bit 2''' - Always display flag.&lt;br /&gt;
*** '''Bit 3''' - Unit properties is used. ('''Note:''' This is used in [[TRG|*.trg]] files)&lt;br /&gt;
*** '''Bit 4''' - Unit type is used. Cleared in &amp;quot;Offset + Mask&amp;quot; EUD conditions. May not be necessary otherwise?&lt;br /&gt;
*** '''Bit 5-7''' - Unknown/unused&lt;br /&gt;
** '''u16''': MaskFlag: set to &amp;quot;SC&amp;quot; (0x53, 0x43) when using the bitmask for EUDs, 0 otherwise&lt;br /&gt;
* 64 Actions (32 byte struct)&amp;lt;br&amp;gt; Immediately following the 16 conditions, there are 64 actions. There will always be 64 of the following structure, even if some of them are unused.&lt;br /&gt;
** '''u32''': Location - source location in &amp;quot;Order&amp;quot; and &amp;quot;Move Unit&amp;quot;, dest location in &amp;quot;Move Location&amp;quot; (1 based -- 0 refers to No Location), EUD Bitmask for a Death action if the MaskFlag is set to &amp;quot;SC&amp;quot;&lt;br /&gt;
** '''u32''': String number for trigger text (0 means no string)&lt;br /&gt;
** '''u32''': WAV string number (0 means no string)&lt;br /&gt;
** '''u32''': Seconds/milliseconds of time&lt;br /&gt;
** '''u32''': First (or only) [[#List of Players/Group IDs|Group/Player]] affected.&lt;br /&gt;
** '''u32''': Second group affected, secondary location (1-based), CUWP #, number, AI script (4-byte string), switch (0-based #)&lt;br /&gt;
** '''u16''': [[#Trigger Unit Types|Unit type]], [[#Score Types|score type]], [[#Resource Types|resource type]], [[#Alliance Statuses|alliance status]]&lt;br /&gt;
** '''u8''': [[#Trigger Actions List|Action byte]]&lt;br /&gt;
** '''u8''': Number of units (0 means All Units), [[#Action States|action state]], [[#Unit Orders|unit order]], [[#Number Modifiers|number modifier]]&lt;br /&gt;
** '''u8''': Flags&lt;br /&gt;
*** '''Bit 0''' - Ignore a wait/transmission once.&lt;br /&gt;
*** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled.&lt;br /&gt;
*** '''Bit 2''' - Always display flag - when not set: if the user has turned off subtitles (see sound options) the text will not display, when set: text will always display&lt;br /&gt;
*** '''Bit 3''' - Unit properties is used. Staredit uses this for *.trg files.&lt;br /&gt;
*** '''Bit 4''' - Unit type is used. Cleared in &amp;quot;Offset + Mask&amp;quot; EUD actions.&lt;br /&gt;
*** '''Bit 5-7''' - Unknown/unused&lt;br /&gt;
** '''u8''': Padding&lt;br /&gt;
** '''u16 (2 bytes)''': MaskFlag: set to &amp;quot;SC&amp;quot; (0x53, 0x43) when using the bitmask for EUDs, 0 otherwise&lt;br /&gt;
* Player Execution&amp;lt;br&amp;gt; Following the 16 conditions and 64 actions, every trigger also has this structure&lt;br /&gt;
** '''u32''': execution flags&lt;br /&gt;
*** '''Bit 0''' - All conditions are met, executing actions, cleared on the next trigger loop.&lt;br /&gt;
*** '''Bit 1''' - Ignore the following actions: Defeat, Draw.&lt;br /&gt;
*** '''Bit 2''' - Preserve trigger. (Can replace Preserve Trigger action)&lt;br /&gt;
*** '''Bit 3''' - Ignore execution.&lt;br /&gt;
*** '''Bit 4''' - Ignore all of the following actions for this trigger until the next trigger loop: Wait, PauseGame, Transmission, PlayWAV, DisplayTextMessage, CenterView, MinimapPing, TalkingPortrait, and MuteUnitSpeech.&lt;br /&gt;
*** '''Bit 5''' - This trigger has paused the game, ignoring subsequent calls to Pause Game (Unpause Game clears this flag only in the same trigger), may automatically call unpause at the end of action execution?&lt;br /&gt;
*** '''Bit 6''' - Wait skipping disabled for this trigger, cleared on next trigger loop.&lt;br /&gt;
*** '''Bit 7-31''' - Unknown/unused&lt;br /&gt;
** '''u8[27]''': 1 byte for each player in the [[#List of Players/Group IDs]]&lt;br /&gt;
*** '''00''' - Trigger is not executed for player&lt;br /&gt;
*** '''01''' - Trigger is executed for player&lt;br /&gt;
** '''u8''': Index of the current action, in StarCraft this is incremented after each action is executed, trigger execution ends when this is 64 (Max Actions) or an action is encountered with Action byte as 0&lt;br /&gt;
This section can be split. Additional TRIG sections will add more triggers.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MBRF&amp;quot; - Mission Briefings==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 2400 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all of the mission briefings shown by the players.&lt;br /&gt;
&lt;br /&gt;
See [[#&amp;quot;TRIG&amp;quot; - Triggers|&amp;quot;TRIG&amp;quot;]] section for format, as it is exactly the same except for the conditions. In this section the 16 conditions are still there, they are all null except for the very first condition, which only has a condition byte of 13. See [[#Mission Briefing Actions List]] for the action bytes for the mission briefing actions.&lt;br /&gt;
&lt;br /&gt;
This section can be split. Additional MBRF sections will add more briefing triggers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SPRP&amp;quot; - Scenario Properties==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4 bytes.''&lt;br /&gt;
&lt;br /&gt;
* '''u16''': String number of the scenario name&lt;br /&gt;
* '''u16''': String number of the scenarios description.&lt;br /&gt;
A string index of 0 for the map name will default it to its file name. A string index of 0 description will default to a predefined string.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;FORC&amp;quot; - Force Settings==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be less than or equal to 20 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the forces and the information about them.&lt;br /&gt;
* '''u8[8]''': 1 byte for each active player, specifying which of the 4 forces (0-based) that the player's on&lt;br /&gt;
* '''u16[4]''': 1 integer for each force, string number of the name of the force&lt;br /&gt;
* '''u8[4]''': 1 byte for each force specifying the properties:&lt;br /&gt;
** '''Bit 0''' - Random start location&lt;br /&gt;
** '''Bit 1''' - Allies&lt;br /&gt;
** '''Bit 2''' - Allied victory&lt;br /&gt;
** '''Bit 3''' - Shared vision&lt;br /&gt;
** '''Bit 4-7''' - Unused&lt;br /&gt;
Notes about FORC:&lt;br /&gt;
* If there is no string specified for a force name, it will default to a &amp;quot;Force #&amp;quot; string.&lt;br /&gt;
* If this section is less than 20 bytes, the remaining bytes are defaulted to 0.&lt;br /&gt;
* Players can be on a force greater than 4, however they will not appear in the game lobby.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;WAV &amp;quot; - WAV String Indexes==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
There are 512 wav entires regardless of how many are actually used.&lt;br /&gt;
* '''u32[512]''': 1 long for each WAV. Indicates a string index is used for a WAV path in the MPQ. If the entry is not used, it will be 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIS&amp;quot; - Unit Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4048 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;UNIx&amp;quot; - BW Unit Settings|&amp;quot;UNIx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains the unit settings for the level:&lt;br /&gt;
* '''u8[228]''': 1 byte for each unit, in order of Unit ID&lt;br /&gt;
** '''00''' - Unit does not use default settings&lt;br /&gt;
** '''01''' - Unit does use default settings&lt;br /&gt;
* '''u32[228]''': Hit points for unit (Note the displayed value is this value / 256, with the low byte being a fractional HP value)&lt;br /&gt;
* '''u16[228]''': Shield points, in order of Unit ID&lt;br /&gt;
* '''u8[228]''': Armor points, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Build time (1/60 seconds), in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Mineral cost, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Gas cost, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': String number, in order of Unit ID&lt;br /&gt;
* '''u16[100]''': Base weapon damage the weapon does, in weapon ID order ([[#List of Unit Weapon IDs]])&lt;br /&gt;
* '''u16[100]''': Upgrade bonus weapon damage, in weapon ID order&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGS&amp;quot; - Upgrade Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 598 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;UPGx&amp;quot; - BW Upgrade Settings|&amp;quot;UPGx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains upgrade settings:&lt;br /&gt;
* '''u8[46]''': 1 byte per each upgrade, in order of upgrade id.&lt;br /&gt;
** '''00''' - Upgrade uses custom settings&lt;br /&gt;
** '''01''' - Upgrade uses default settings&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, time factor for each upgrade, in order of upgrade id.&lt;br /&gt;
See [[#List of Upgrade IDs]] for upgrade ids.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TECS&amp;quot; - Tech Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 216 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;TECx&amp;quot; - BW Tech Settings|&amp;quot;TECx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains technology/special abilities settings:&lt;br /&gt;
* '''u8[24]''': 1 byte per each technology, specifies if the tech overrides the default settings. In order of technology id&lt;br /&gt;
** '''00''' - Technology uses custom settings&lt;br /&gt;
** '''01''' - Technology uses default settings&lt;br /&gt;
* '''u16[24]''': Mineral cost to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Gas cost to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Time required to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Energy cost to cast technology/special ability. In order of technology id.&lt;br /&gt;
See [[#List of Technology IDs]] for technology ids.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SWNM&amp;quot; - Switch Names==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section contains the strings used for each switch. There are 256 switches, and can't be any more or any less.&lt;br /&gt;
* '''u32[256]''': One long for each switch, specifies the string number for the name of each switch. Unnamed switches will have an index of 0, and have a default switch name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;COLR&amp;quot; - Player Colors==&lt;br /&gt;
''Required for Brood War only and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Can be in non-Brood War maps in Remaster, if CRGB is also present.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 8 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section indicates what color each player is, but only has effect on Brood War.&lt;br /&gt;
* '''u8[8]''': 1 byte for each player, indicates the color of the player&lt;br /&gt;
** '''00''' - Red&lt;br /&gt;
** '''01''' - Blue&lt;br /&gt;
** '''02''' - Teal&lt;br /&gt;
** '''03''' - Purple&lt;br /&gt;
** '''04''' - Orange&lt;br /&gt;
** '''05''' - Brown&lt;br /&gt;
** '''06''' - White&lt;br /&gt;
** '''07''' - Yellow&lt;br /&gt;
** '''08''' - Green&lt;br /&gt;
** '''09''' - Pale yellow&lt;br /&gt;
** '''10''' - Tan&lt;br /&gt;
** '''11''' - Azure (Neutral color)&lt;br /&gt;
Other values can be used but may have different results depending on the tileset. Any color value above 11 is an overflow. As of patch 1.18.6 values above 11 result in default player color.&lt;br /&gt;
&lt;br /&gt;
SC:R Only colors:&lt;br /&gt;
Selecting these in a non-SC:R map seems to just use default colors, unless the [[#&amp;quot;CRGB&amp;quot; - Remastered Player Colors|CRGB]] section is also present regardless of version (including non-BW versions).&lt;br /&gt;
* '''12''' - Pale Green&lt;br /&gt;
* '''13''' - Blueish Grey&lt;br /&gt;
* '''14''' - Pale Yellow&lt;br /&gt;
* '''15''' - Cyan&lt;br /&gt;
* '''16''' - Pink&lt;br /&gt;
* '''17''' - Olive&lt;br /&gt;
* '''18''' - Lime&lt;br /&gt;
* '''19''' - Navy&lt;br /&gt;
* '''20''' - Magenta&lt;br /&gt;
* '''21''' - Grey&lt;br /&gt;
* '''22''' - Black&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;CRGB&amp;quot; - Remastered Player Colors==&lt;br /&gt;
''Requirement unknown, but can be in any map type including non-remaster maps.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 32 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''u8[8][3]''': 3 bytes for each player corresponding to an RGB color value&lt;br /&gt;
** '''u8''': R&lt;br /&gt;
** '''u8''': G&lt;br /&gt;
** '''u8''': B&lt;br /&gt;
* '''u8[8]''': Indicates how to select the color for each player&lt;br /&gt;
** '''0''' - Random Predefined&lt;br /&gt;
** '''1''' - Player's Choice&lt;br /&gt;
** '''2''' - Custom RGB Color (RGB value for the corresponding player defined above)&lt;br /&gt;
** '''3''' - Use &amp;quot;COLR&amp;quot; selection&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PUPx&amp;quot; - BW Upgrade Restrictions==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2318 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UPGR&amp;quot; - Upgrade Restrictions|&amp;quot;UPGR&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is identical to UPGR section except it uses the Brood War set of 61 upgrades instead of the original 46.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PTEx&amp;quot; - BW Tech Restrictions==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1672 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;PTEC&amp;quot; - Tech Restrictions|&amp;quot;PTEC&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is identical to PTEC section except it uses the Brood War set of 44 technologies instead of the original 24.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIx&amp;quot; - BW Unit Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4168 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UNIS&amp;quot; - Unit Settings|&amp;quot;UNIS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is indentical to UNIS section except it uses the Brood War set of 130 weapons instead of the original 100.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGx&amp;quot; - BW Upgrade Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 794 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UPGS&amp;quot; - Upgrade Settings|&amp;quot;UPGS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section the same as UPGS except section except it uses the Brood War set of 61 upgrades instead of the original 46, and there is an unused byte after the first set:&lt;br /&gt;
* '''u8[61]''': 1 byte per each upgrade, in order of upgrade id.&lt;br /&gt;
** '''00''' - Upgrade uses custom settings&lt;br /&gt;
** '''01''' - Upgrade uses default settings&lt;br /&gt;
* '''u8''': Unused.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, time factor for each upgrade, in order of upgrade id.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TECx&amp;quot; - BW Tech Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 396 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;TECS&amp;quot; - Tech Settings|&amp;quot;TECS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is indentical to UNIS section except it uses the Brood War set of 44 technologies instead of the original 24.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Appendix=&lt;br /&gt;
A set of references and IDs that should help you easier in the trigger section and the technology/player ids, etc:&lt;br /&gt;
&lt;br /&gt;
==Trigger Conditions List==&lt;br /&gt;
* 0 = No Condition&lt;br /&gt;
* 1 = Countdown Timer(Comparison, QNumber)&lt;br /&gt;
* 2 = Command(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 3 = Bring(Player, Comparison, TUnit, Loc, QNumber)&lt;br /&gt;
* 4 = Accumulate(Player, Comparison, QNumber, ResType)&lt;br /&gt;
* 5 = Kill(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 6 = Command the Most(TUnit)&lt;br /&gt;
* 7 = Commands the Most At(TUnit, Loc)&lt;br /&gt;
* 8 = Most Kills(TUnit)&lt;br /&gt;
* 9 = Highest Score(Score)&lt;br /&gt;
* 10 = Most Resources(ResType)&lt;br /&gt;
* 11 = Switch(Switch)&lt;br /&gt;
* 12 = Elapsed Time(Comparison, QNumber)&lt;br /&gt;
* 13 = Data is a Mission Briefing. Conditions are N/A (Same as Never)&lt;br /&gt;
* 14 = Opponents(Player, Comparison, QNumber)&lt;br /&gt;
* 15 = Deaths(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 16 = Command the Least(TUnit)&lt;br /&gt;
* 17 = Command the Least At(TUnit, Loc)&lt;br /&gt;
* 18 = Least Kills(TUnit)&lt;br /&gt;
* 19 = Lowest Score(Score)&lt;br /&gt;
* 20 = Least Resources(ResType)&lt;br /&gt;
* 21 = Score(Player, Comparison, Score, QNumber)&lt;br /&gt;
* 22 = Always (Same as No Condition)&lt;br /&gt;
* 23 = Never&lt;br /&gt;
&lt;br /&gt;
==Trigger Actions List==&lt;br /&gt;
* 0 = No Action&lt;br /&gt;
* 1 = Victory&lt;br /&gt;
* 2 = Defeat&lt;br /&gt;
* 3 = Preserve Trigger&lt;br /&gt;
* 4 = Wait(Time)&lt;br /&gt;
* 5 = Pause Game (Single player only)&lt;br /&gt;
* 6 = Unpause Game (Single player only)&lt;br /&gt;
* 7 = Transmission(Text, Unit, Loc, Time, Modifier, Wave, WavTime)&lt;br /&gt;
* 8 = Play WAV(Wav, WavTime)&lt;br /&gt;
* 9 = Display Text Message(Text)&lt;br /&gt;
* 10 = Center View(Loc)&lt;br /&gt;
* 11 = Create Unit with Properties(Player, Unit, Number, Loc, UnitProp)&lt;br /&gt;
* 12 = Set Mission Objectives(Text)&lt;br /&gt;
* 13 = Set Switch(Switch, SwAction)&lt;br /&gt;
* 14 = Set Countdown Timer(Time, Modifier)&lt;br /&gt;
* 15 = Run AI Script(AIScript)&lt;br /&gt;
* 16 = Run AI Script At Location(AIScript)&lt;br /&gt;
* 17 = Leader Board (Control) (Text, TUnit)&lt;br /&gt;
* 18 = Leader Board (Control At Location) (Text, TUnit, Loc)&lt;br /&gt;
* 19 = Leader Board (Resources) (Text, ResType)&lt;br /&gt;
* 20 = Leader Board (Kills) (Text, TUnit)&lt;br /&gt;
* 21 = Leader Board (Points) (Text, Score)&lt;br /&gt;
* 22 = Kill Unit (Player, TUnit)&lt;br /&gt;
* 23 = Kill Unit At Location(Player, TUnit, Number, Loc)&lt;br /&gt;
* 24 = Remove Unit(Player, TUnit)&lt;br /&gt;
* 25 = Remove Unit At Location(Player, TUnit, Number, Loc)&lt;br /&gt;
* 26 = Set Resources(Player, Number, Modifier, ResType)&lt;br /&gt;
* 27 = Set Score(Player, Number, Modifier, Score)&lt;br /&gt;
* 28 = Minimap Ping(Loc)&lt;br /&gt;
* 29 = Talking Portrait(Unit, Time)&lt;br /&gt;
* 30 = Mute Unit Speech&lt;br /&gt;
* 31 = Unmute Unit Speech&lt;br /&gt;
* 32 = Leaderboard Computer Players(State)&lt;br /&gt;
* 33 = Leaderboard Goal (Control) (Text, TUnit, Number)&lt;br /&gt;
* 34 = Leaderboard Goal (Control At Location) (Text, TUnit, Number, Loc)&lt;br /&gt;
* 35 = Leaderboard Goal (Resources) (Text, TUnit, Number, ResType)&lt;br /&gt;
* 36 = Leaderboard Goal (Kills) (Text, TUnit, Number)&lt;br /&gt;
* 37 = Leaderboard Goal (Points) (Text, Number, Score)&lt;br /&gt;
* 38 = Move Location(Player, TUnit, SLoc, DLoc)&lt;br /&gt;
* 39 = Move Unit(Player, TUnit, Number, SLoc, DLoc)&lt;br /&gt;
* 40 = Leaderboard (Greed) (Number)&lt;br /&gt;
* 41 = Set Next Scenario(Text) (Single player only)&lt;br /&gt;
* 42 = Set Doodad State(Player, TUnit, Loc, State)&lt;br /&gt;
* 43 = Set Invincibility(Player, TUnit, Loc, State)&lt;br /&gt;
* 44 = Create Unit(Player, Unit, Number, Loc)&lt;br /&gt;
* 45 = Set Deaths(Player, TUnit, Number, Modifier)&lt;br /&gt;
* 46 = Order(Player, TUnit, SLoc, DLoc, Order)&lt;br /&gt;
* 47 = Comment(Text)&lt;br /&gt;
* 48 = Give Units to Player(SPlayer, DPlayer, TUnit, Number, Loc)&lt;br /&gt;
* 49 = Modify Unit Hit Points(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 50 = Modify Unit Energy(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 51 = Modify Unit Shield Points(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 52 = Modify Unit Resource Amount(Player, Number, ModAmount, Loc)&lt;br /&gt;
* 53 = Modify Unit Hanger Count(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 54 = Pause Timer&lt;br /&gt;
* 55 = Unpause Timer&lt;br /&gt;
* 56 = Draw&lt;br /&gt;
* 57 = Set Alliance Status(Player, AllyStatus)&lt;br /&gt;
* 58 = Disable Debug Mode (Single player only)&lt;br /&gt;
* 59 = Enable Debug Mode (Single player only)&lt;br /&gt;
&lt;br /&gt;
==Mission Briefing Actions List==&lt;br /&gt;
* 0 - No Action&lt;br /&gt;
* 1 - Wait(Time)&lt;br /&gt;
* 2 - Play WAV(Wave, WavTime)&lt;br /&gt;
* 3 - Text Message(Text, Time)&lt;br /&gt;
* 4 - Mission Objectives(Text)&lt;br /&gt;
* 5 - Show Portrait(Unit, Slot)&lt;br /&gt;
* 6 - Hide Portrait(Slot)&lt;br /&gt;
* 7 - Display Speaking Portrait(Slot, Time)&lt;br /&gt;
* 8 - Transmission(Text, Slot, Time, Modifier, Wave, WavTime)&lt;br /&gt;
* 9 - Skip Tutorial Enabled&lt;br /&gt;
&lt;br /&gt;
==Switch States==&lt;br /&gt;
* 2 = Switch is set&lt;br /&gt;
* 3 = Switch is cleared&lt;br /&gt;
&lt;br /&gt;
==Numeric Comparisons==&lt;br /&gt;
* 0 = At least&lt;br /&gt;
* 1 = At most&lt;br /&gt;
* 10 = Exactly&lt;br /&gt;
&lt;br /&gt;
==Score Types==&lt;br /&gt;
* 0 = Total&lt;br /&gt;
* 1 = Units&lt;br /&gt;
* 2 = Buildings&lt;br /&gt;
* 3 = Units and Buildings&lt;br /&gt;
* 4 = Kills&lt;br /&gt;
* 5 = Razings&lt;br /&gt;
* 6 = Kills and Razings&lt;br /&gt;
* 7 = Custom&lt;br /&gt;
&lt;br /&gt;
==Resource Types==&lt;br /&gt;
* 0 = Ore&lt;br /&gt;
* 1 = Gas&lt;br /&gt;
* 2 = Ore and Gas&lt;br /&gt;
&lt;br /&gt;
==Alliance Statuses==&lt;br /&gt;
* 0 = Enemy&lt;br /&gt;
* 1 = Ally&lt;br /&gt;
* 2 = Allied Victory&lt;br /&gt;
&lt;br /&gt;
==Unit Orders==&lt;br /&gt;
* 0 = Move&lt;br /&gt;
* 1 = Patrol&lt;br /&gt;
* 2 = Attack&lt;br /&gt;
&lt;br /&gt;
==Action States==&lt;br /&gt;
* 4 = Enabled/Set switch&lt;br /&gt;
* 5  = Disabled/Clear switch&lt;br /&gt;
* 6 = Toggle/Toggle switch&lt;br /&gt;
* 11 = Randomize switch&lt;br /&gt;
&lt;br /&gt;
==Number Modifiers==&lt;br /&gt;
* 7 = Set to&lt;br /&gt;
* 8 = Add&lt;br /&gt;
* 9 = Subtract&lt;br /&gt;
&lt;br /&gt;
==Trigger Unit Types==&lt;br /&gt;
* All normal units (0-227)&lt;br /&gt;
* 228 = None&lt;br /&gt;
* 229 = Any unit&lt;br /&gt;
* 230 = Men&lt;br /&gt;
* 231 = Buildings&lt;br /&gt;
* 232 = Factories&lt;br /&gt;
&lt;br /&gt;
==List of Players/Group IDs==&lt;br /&gt;
* 0 = Player 1&lt;br /&gt;
* 1 = Player 2&lt;br /&gt;
* 2 = Player 3&lt;br /&gt;
* 3 = Player 4&lt;br /&gt;
* 4 = Player 5&lt;br /&gt;
* 5 = Player 6&lt;br /&gt;
* 6 = Player 7&lt;br /&gt;
* 7 = Player 8&lt;br /&gt;
* 8 = Player 9&lt;br /&gt;
* 9 = Player 10&lt;br /&gt;
* 10 = Player 11&lt;br /&gt;
* 11 = Player 12&lt;br /&gt;
* 12 = None (Unused, One-entry Overflow in some cases)&lt;br /&gt;
* 13 = Current Player&lt;br /&gt;
* 14 = Foes&lt;br /&gt;
* 15 = Allies&lt;br /&gt;
* 16 = Neutral Players&lt;br /&gt;
* 17 = All Players&lt;br /&gt;
* 18 = Force 1&lt;br /&gt;
* 19 = Force 2&lt;br /&gt;
* 20 = Force 3&lt;br /&gt;
* 21 = Force 4&lt;br /&gt;
* 22 = Unused 1&lt;br /&gt;
* 23 = Unused 2&lt;br /&gt;
* 24 = Unused 3&lt;br /&gt;
* 25 = Unused 4&lt;br /&gt;
* 26 = Non Allied Victory Players&lt;br /&gt;
&lt;br /&gt;
==List of Technology IDs==&lt;br /&gt;
* 0 = Stim Packs&lt;br /&gt;
* 1 = Lockdown&lt;br /&gt;
* 2 = EMP Shockwave&lt;br /&gt;
* 3 = Spider Mines&lt;br /&gt;
* 4 = Scanner Sweep&lt;br /&gt;
* 5 = Siege Mode&lt;br /&gt;
* 6 = Defensive Matrix&lt;br /&gt;
* 7 = Irradiate&lt;br /&gt;
* 8 = Yamato Gun&lt;br /&gt;
* 9 = Cloaking Field&lt;br /&gt;
* 10 = Personnel Cloaking&lt;br /&gt;
* 11 = Burrowing&lt;br /&gt;
* 12 = Infestation&lt;br /&gt;
* 13 = Spawn Broodling&lt;br /&gt;
* 14 = Dark Swarm&lt;br /&gt;
* 15 = Plague&lt;br /&gt;
* 16 = Consume&lt;br /&gt;
* 17 = Ensnare&lt;br /&gt;
* 18 = Parasite&lt;br /&gt;
* 19 = Psionic Storm&lt;br /&gt;
* 20 = Hallucination&lt;br /&gt;
* 21 = Recall&lt;br /&gt;
* 22 = Stasis Field&lt;br /&gt;
* 23 = Archon Warp&lt;br /&gt;
* 24 = Restoration&lt;br /&gt;
* 25 = Disruption Web&lt;br /&gt;
* 26 = Unused 26&lt;br /&gt;
* 27 = Mind Control&lt;br /&gt;
* 28 = Dark Archon Meld&lt;br /&gt;
* 29 = Feedback&lt;br /&gt;
* 30 = Optical Flare&lt;br /&gt;
* 31 = Maelstorm&lt;br /&gt;
* 32 = Lurker Aspect&lt;br /&gt;
* 33 = Unused 33&lt;br /&gt;
* 34 = Healing&lt;br /&gt;
* 35 = Unused 35&lt;br /&gt;
* 36 = Unused 36&lt;br /&gt;
* 37 = Unused 37&lt;br /&gt;
* 38 = Unused 38&lt;br /&gt;
* 39 = Unused 39&lt;br /&gt;
* 40 = Unused 40&lt;br /&gt;
* 41 = Unused 41&lt;br /&gt;
* 42 = Unused 42&lt;br /&gt;
* 43 = Unused 43&lt;br /&gt;
&lt;br /&gt;
==List of Upgrade IDs==&lt;br /&gt;
* 0 = Terran Infantry Armor&lt;br /&gt;
* 1 = Terran Vehicle Plating&lt;br /&gt;
* 2 = Terran Ship Plating&lt;br /&gt;
* 3 = Zerg Carapace&lt;br /&gt;
* 4 = Zerg Flyer Caparace&lt;br /&gt;
* 5 = Protoss Armor&lt;br /&gt;
* 6 = Protoss Plating&lt;br /&gt;
* 7 = Terran Infantry Weapons&lt;br /&gt;
* 8 = Terran Vehicle Weapons&lt;br /&gt;
* 9 = Terran Ship Weapons&lt;br /&gt;
* 10 = Zerg Melee Attacks&lt;br /&gt;
* 11 = Zerg Missile Attacks&lt;br /&gt;
* 12 = Zerg Flyer Attacks&lt;br /&gt;
* 13 = Protoss Ground Weapons&lt;br /&gt;
* 14 = Protoss Air Weapons&lt;br /&gt;
* 15 = Protoss Plasma Shields&lt;br /&gt;
* 16 = U-238 Shells&lt;br /&gt;
* 17 = Ion Thrusters&lt;br /&gt;
* 18 = Burst Lasers (Unused)&lt;br /&gt;
* 19 = Titan Reactor (SV +50)&lt;br /&gt;
* 20 = Ocular Implants&lt;br /&gt;
* 21 = Moebius Reactor (Ghost +50)&lt;br /&gt;
* 22 = Apollo Reactor (Wraith +50)&lt;br /&gt;
* 23 = Colossus Reactor (BC +50)&lt;br /&gt;
* 24 = Ventral Sacs&lt;br /&gt;
* 25 = Antennae&lt;br /&gt;
* 26 = Pneumatized Carapace&lt;br /&gt;
* 27 = Metabolic Boost&lt;br /&gt;
* 28 = Adrenal Glands&lt;br /&gt;
* 29 = Muscular Augments&lt;br /&gt;
* 30 = Grooved Spines&lt;br /&gt;
* 31 = Gamete Meiosis (Queen +50)&lt;br /&gt;
* 32 = Metasynaptic Node (Defiler +50)&lt;br /&gt;
* 33 = Singularity Charge&lt;br /&gt;
* 34 = Leg Enhancements&lt;br /&gt;
* 35 = Scarab Damage &lt;br /&gt;
* 36 = Reaver Capacity &lt;br /&gt;
* 37 = Gravitic Drive&lt;br /&gt;
* 38 = Sensor Array&lt;br /&gt;
* 39 = Gravitic Boosters&lt;br /&gt;
* 40 = Khaydarin Amulet (HT +50)&lt;br /&gt;
* 41 = Apial Sensors&lt;br /&gt;
* 42 = Gravitic Thrusters&lt;br /&gt;
* 43 = Carrier Capacity&lt;br /&gt;
* 44 = Khaydarin Core (Arbiter +50)&lt;br /&gt;
* 45 = Unknown Upgrade45&lt;br /&gt;
* 46 = Unknown Upgrade46&lt;br /&gt;
* 47 = Argus Jewel (Corsair +50)&lt;br /&gt;
* 48 = Unknown Upgrade48&lt;br /&gt;
* 49 = Argus Talisman (DA +50)&lt;br /&gt;
* 50 = Unknown Upgrade50&lt;br /&gt;
* 51 = Caduceus Reactor (Medic +50)&lt;br /&gt;
* 52 = Chitinous Plating&lt;br /&gt;
* 53 = Anabolic Synthesis&lt;br /&gt;
* 54 = Charon Booster&lt;br /&gt;
* 55 = Unknown Upgrade55&lt;br /&gt;
* 56 = Unknown Upgrade56&lt;br /&gt;
* 57 = Unknown Upgrade57&lt;br /&gt;
* 58 = Unknown Upgrade58&lt;br /&gt;
* 59 = Unknown Upgrade59&lt;br /&gt;
* 60 = Unknown Upgrade60&lt;br /&gt;
&lt;br /&gt;
==List of Unit Weapon IDs==&lt;br /&gt;
* 0 = Gauss Rifle (Normal)&lt;br /&gt;
* 1 = Gauss Rifle (Jim Raynor-Marine)&lt;br /&gt;
* 2 = C-10 Concussion Rifle (Normal)&lt;br /&gt;
* 3 = C-10 Concussion Rifle (Sarah Kerrigan)&lt;br /&gt;
* 4 = Fragmentation Grenade (Normal)&lt;br /&gt;
* 5 = Fragmentation Grenade (Jim Raynor-Vulture)&lt;br /&gt;
* 6 = Spider Mines&lt;br /&gt;
* 7 = Twin Autocannons (Normal)&lt;br /&gt;
* 8 = Hellfire Missile Pack (Normal)&lt;br /&gt;
* 9 = Twin Autocannons (Alan Schezar)&lt;br /&gt;
* 10 = Hellfire Missile Pack (Alan Schezar)&lt;br /&gt;
* 11 = Arclite Cannon (Normal)&lt;br /&gt;
* 12 = Arclite Cannon (Edmund Duke)&lt;br /&gt;
* 13 = Fusion Cutter&lt;br /&gt;
* 14 = Fusion Cutter (Harvest)&lt;br /&gt;
* 15 = Gemini Missiles (Normal)&lt;br /&gt;
* 16 = Burst Lasers (Normal)&lt;br /&gt;
* 17 = Gemini Missiles (Tom Kazansky)&lt;br /&gt;
* 18 = Burst Lasers (Tom Kazansky)&lt;br /&gt;
* 19 = ATS Laser Battery (Normal)&lt;br /&gt;
* 20 = ATA Laser Battery (Normal)&lt;br /&gt;
* 21 = ATS Laser Battery (Norad II+Mengsk+DuGalle)&lt;br /&gt;
* 22 = ATA Laser Battery (Norad II+Mengsk+DuGalle)&lt;br /&gt;
* 23 = ATS Laser Battery (Hyperion)&lt;br /&gt;
* 24 = ATA Laser Battery (Hyperion)&lt;br /&gt;
* 25 = Flame Thrower (Normal)&lt;br /&gt;
* 26 = Flame Thrower (Gui Montag)&lt;br /&gt;
* 27 = Arclite Shock Cannon (Normal)&lt;br /&gt;
* 28 = Arclite Shock Cannon (Edmund Duke)&lt;br /&gt;
* 29 = Longbolt Missiles&lt;br /&gt;
* 30 = Yamato Gun&lt;br /&gt;
* 31 = Nuclear Missile&lt;br /&gt;
* 32 = Lockdown&lt;br /&gt;
* 33 = EMP Shockwave&lt;br /&gt;
* 34 = Irradiate&lt;br /&gt;
* 35 = Claws (Normal)&lt;br /&gt;
* 36 = Claws (Devouring One)&lt;br /&gt;
* 37 = Claws (Infested Kerrigan)&lt;br /&gt;
* 38 = Needle Spines (Normal)&lt;br /&gt;
* 39 = Needle Spines (Hunter Killer)&lt;br /&gt;
* 40 = Kaiser Blades (Normal)&lt;br /&gt;
* 41 = Kaiser Blades (Torrasque)&lt;br /&gt;
* 42 = Toxic Spores (Broodling)&lt;br /&gt;
* 43 = Spines&lt;br /&gt;
* 44 = Spines (Harvest)&lt;br /&gt;
* 45 = Acid Spray (Unused)&lt;br /&gt;
* 46 = Acid Spore (Normal)&lt;br /&gt;
* 47 = Acid Spore (Kukulza-Guardian)&lt;br /&gt;
* 48 = Glave Wurm (Normal)&lt;br /&gt;
* 49 = Glave Wurm (Kukulza-Mutalisk)&lt;br /&gt;
* 50 = Venom (Unused-Defiler)&lt;br /&gt;
* 51 = Venom (Unused-Defiler Hero)&lt;br /&gt;
* 52 = Seeker Spores&lt;br /&gt;
* 53 = Subterranean Tentacle&lt;br /&gt;
* 54 = Suicide (Infested Terran)&lt;br /&gt;
* 55 = Suicide (Scourge)&lt;br /&gt;
* 56 = Parasite&lt;br /&gt;
* 57 = Spawn Broodlings&lt;br /&gt;
* 58 = Ensnare&lt;br /&gt;
* 59 = Dark Swarm&lt;br /&gt;
* 60 = Plague&lt;br /&gt;
* 61 = Consume&lt;br /&gt;
* 62 = Particle Beam&lt;br /&gt;
* 63 = Particle Beam (Harvest)&lt;br /&gt;
* 64 = Psi Blades (Normal)&lt;br /&gt;
* 65 = Psi Blades (Fenix-Zealot)&lt;br /&gt;
* 66 = Phase Disruptor (Normal)&lt;br /&gt;
* 67 = Phase Disruptor (Fenix-Dragoon)&lt;br /&gt;
* 68 = Psi Assault (Normal-Unused)&lt;br /&gt;
* 69 = Psi Assault (Tassadar+Aldaris)&lt;br /&gt;
* 70 = Psionic Shockwave (Normal)&lt;br /&gt;
* 71 = Psionic Shockwave (Tassadar/Zeratul Archon)&lt;br /&gt;
* 72 = Unknown72&lt;br /&gt;
* 73 = Dual Photon Blasters (Normal)&lt;br /&gt;
* 74 = Anti-matter Missiles (Normal)&lt;br /&gt;
* 75 = Dual Photon Blasters (Mojo)&lt;br /&gt;
* 76 = Anit-matter Missiles (Mojo)&lt;br /&gt;
* 77 = Phase Disruptor Cannon (Normal)&lt;br /&gt;
* 78 = Phase Disruptor Cannon (Danimoth)&lt;br /&gt;
* 79 = Pulse Cannon&lt;br /&gt;
* 80 = STS Photon Cannon&lt;br /&gt;
* 81 = STA Photon Cannon&lt;br /&gt;
* 82 = Scarab&lt;br /&gt;
* 83 = Stasis Field&lt;br /&gt;
* 84 = Psi Storm&lt;br /&gt;
* 85 = Warp Blades (Zeratul)&lt;br /&gt;
* 86 = Warp Blades (Dark Templar Hero)&lt;br /&gt;
* 87 = Missiles (Unused)&lt;br /&gt;
* 88 = Laser Battery1 (Unused)&lt;br /&gt;
* 89 = Tormentor Missiles (Unused)&lt;br /&gt;
* 90 = Bombs (Unused)&lt;br /&gt;
* 91 = Raider Gun (Unused)&lt;br /&gt;
* 92 = Laser Battery2 (Unused)&lt;br /&gt;
* 93 = Laser Battery3 (Unused)&lt;br /&gt;
* 94 = Dual Photon Blasters (Unused)&lt;br /&gt;
* 95 = Flechette Grenade (Unused)&lt;br /&gt;
* 96 = Twin Autocannons (Floor Trap)&lt;br /&gt;
* 97 = Hellfire Missile Pack (Wall Trap)&lt;br /&gt;
* 98 = Flame Thrower (Wall Trap)&lt;br /&gt;
* 99 = Hellfire Missile Pack (Floor Trap)&lt;br /&gt;
* 100 = Neutron Flare&lt;br /&gt;
* 101 = Disruption Web&lt;br /&gt;
* 102 = Restoration&lt;br /&gt;
* 103 = Halo Rockets&lt;br /&gt;
* 104 = Corrosive Acid&lt;br /&gt;
* 105 = Mind Control&lt;br /&gt;
* 106 = Feedback&lt;br /&gt;
* 107 = Optical Flare&lt;br /&gt;
* 108 = Maelstrom&lt;br /&gt;
* 109 = Subterranean Spines&lt;br /&gt;
* 110 = Gauss Rifle0 (Unused)&lt;br /&gt;
* 111 = Warp Blades (Normal)&lt;br /&gt;
* 112 = C-10 Concussion Rifle (Samir Duran)&lt;br /&gt;
* 113 = C-10 Concussion Rifle (Infested Duran)&lt;br /&gt;
* 114 = Dual Photon Blasters (Artanis)&lt;br /&gt;
* 115 = Anti-matter Missiles (Artanis)&lt;br /&gt;
* 116 = C-10 Concussion Rifle (Alexei Stukov)&lt;br /&gt;
* 117 = Gauss Rifle1 (Unused)&lt;br /&gt;
* 118 = Gauss Rifle2 (Unused)&lt;br /&gt;
* 119 = Gauss Rifle3 (Unused)&lt;br /&gt;
* 120 = Gauss Rifle4 (Unused)&lt;br /&gt;
* 121 = Gauss Rifle5 (Unused)&lt;br /&gt;
* 122 = Gauss Rifle6 (Unused)&lt;br /&gt;
* 123 = Gauss Rifle7 (Unused)&lt;br /&gt;
* 124 = Gauss Rifle8 (Unused)&lt;br /&gt;
* 125 = Gauss Rifle9 (Unused)&lt;br /&gt;
* 126 = Gauss Rifle10 (Unused)&lt;br /&gt;
* 127 = Gauss Rifle11 (Unused)&lt;br /&gt;
* 128 = Gauss Rifle12 (Unused)&lt;br /&gt;
* 129 = Gauss Rifle13 (Unused)&lt;br /&gt;
* 130 = None&lt;br /&gt;
&lt;br /&gt;
==Complete Modifier List==&lt;br /&gt;
* 0 = Condition: &amp;gt;= (greater than or equal to)&lt;br /&gt;
* 1 = Condition: &amp;lt;= (less than or equal to)&lt;br /&gt;
* 2 = Condition: == TRUE (Is True)&lt;br /&gt;
* 3 = Condition: == FALSE (Is False)&lt;br /&gt;
* 4 = Action: = TRUE (Set to True)&lt;br /&gt;
* 5 = Action: = FALSE (Set to False)&lt;br /&gt;
* 6 = Action: NOT (toggle)&lt;br /&gt;
* 7 = Action: = (Set to)&lt;br /&gt;
* 8 = Action: += (Add)&lt;br /&gt;
* 9 = Action: -= (Subtract)&lt;br /&gt;
* 10 = Condition: == (Exactly)&lt;br /&gt;
* 11 = Action: Randomize&lt;br /&gt;
&lt;br /&gt;
[[Category:StarCraft]]&lt;br /&gt;
[[Category:Reference]]&lt;/div&gt;</summary>
		<author><name>FaRTy1billion</name></author>	</entry>

	<entry>
		<id>https://staredit.net/wiki/index.php?title=Scenario.chk&amp;diff=655</id>
		<title>Scenario.chk</title>
		<link rel="alternate" type="text/html" href="https://staredit.net/wiki/index.php?title=Scenario.chk&amp;diff=655"/>
				<updated>2022-01-23T21:49:03Z</updated>
		
		<summary type="html">&lt;p&gt;FaRTy1billion: /* &amp;quot;UPGx&amp;quot; - BW Upgrade Settings */ fixed &amp;quot;gas time factor&amp;quot; error&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The CHK file is a very dense file found inside the SCM or SCX file (as &amp;quot;staredit\scenario.chk&amp;quot;), which is just a renamed MPQ archive.&lt;br /&gt;
&lt;br /&gt;
In this article, some shorthand will be used for datatypes:&lt;br /&gt;
* '''u8''' for an unsigned byte&lt;br /&gt;
* '''u16''' for an unsigned short (2-byte integer)&lt;br /&gt;
* '''u32''' for an unsigned int (4-byte integer)&lt;br /&gt;
* '''uT[''a'']''' for an array of datatype '''T''' (8, 16, 32) with '''''a''''' number of elements&lt;br /&gt;
* '''uT[''a''][''b'']''' for a two-dimensional array of datatype '''T''', where each element of '''T[''a'']''' will be an array of size '''''b'''''&lt;br /&gt;
&lt;br /&gt;
=Sections=&lt;br /&gt;
The CHK is split into several named chunks (hence the file extension, an abbreviation of ''CHunK'').&lt;br /&gt;
&lt;br /&gt;
Each section begins with an 8-byte header:&lt;br /&gt;
* '''u32''' Name - A 4-byte string uniquely identifying that chunk's purpose.&lt;br /&gt;
* '''u32''' Size - The size, in bytes, of the chunk (not including this header)&lt;br /&gt;
Followed by as many bytes as 'Size', in a format described below.&lt;br /&gt;
&lt;br /&gt;
Some things to keep in mind about the CHK section:&lt;br /&gt;
* Invalid sections can exist and will be ignored. While Size is unsigned, it can safely be a negative value to read a chunk earlier in the file. This allows for &amp;quot;section stacking&amp;quot;, allowing smaller sections to be placed inside of larger ones or duplicate triggers or units to take less space in the file.&lt;br /&gt;
* All sections will marked &amp;quot;Not required.&amp;quot; are never read by StarCraft and can safely be omitted. However they may or may not be read by StarEdit, and may cause the map to be unreadable in an editor.&lt;br /&gt;
* Note &amp;quot;Hybrid&amp;quot;, or &amp;quot;Enhanced&amp;quot;, maps were introduced in 1.04. They are supported both by Original StarCraft and Brood War and usually contain sections for both types (e.g., UPGS and UPGx, TECS and TECx), but both sections aren't necessarily read.&lt;br /&gt;
* Duplicate sections will overwrite previously defined section data, except where noted. Note this only applies to those section that pass the specified &amp;quot;validation&amp;quot; parameters, as any section that does not successfully validate will be ignored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TYPE&amp;quot; - Map Type==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the type of scenario.&lt;br /&gt;
* '''u32''': Specifies the type of scenario:&lt;br /&gt;
** '''0x53574152''' or '''RAWS''' - 1.04 StarCraft and above (&amp;quot;hybrid&amp;quot;)&lt;br /&gt;
** '''0x42574152''' or '''RAWB''' - Brood War&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;VER &amp;quot; - Format Version==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section identifies the file format version.&lt;br /&gt;
* '''u16''': File format version:&lt;br /&gt;
** '''59''' - Starcraft 1.00 (original retail release)&lt;br /&gt;
** '''63''' - Starcraft 1.04 ''(hybrid)''&lt;br /&gt;
** '''64''' - Starcraft Remastered (1.21) ''(hybrid)''&lt;br /&gt;
** '''205''' - Brood War 1.00 ''(1.04)''&lt;br /&gt;
** '''206''' - Starcraft Remastered (1.21) ''(broodwar)''&lt;br /&gt;
This is the only version code section to actually be read by StarCraft (of TYPE, VER , IVER, and IVE2). Any other value is invalid in retail StarCraft and is usually a beta version.&lt;br /&gt;
&lt;br /&gt;
Other unsupported versions include:&lt;br /&gt;
* '''0-19''' - ''Warcraft II versions (.PUD)''&lt;br /&gt;
* '''47''' - ''Starcraft Beta''&lt;br /&gt;
* '''61''' - Brood War internal (map version 61)&lt;br /&gt;
* '''75''' - Brood War internal (map version 75)&lt;br /&gt;
* '''201''' - Brood War internal (map version 201)&lt;br /&gt;
* '''203''' - Brood War internal (map version 203)&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IVER&amp;quot; - Map Version==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section &amp;quot;additionally identifies&amp;quot; the map version.&lt;br /&gt;
* '''u16''': &amp;quot;Additional file format version:&amp;quot;&lt;br /&gt;
** '''9''' - beta/obsolete versions&lt;br /&gt;
** '''10''' - current versions&lt;br /&gt;
When saving as expansion this section gets removed entirely. Contrary to popular belief, it doesn't get &amp;quot;replaced&amp;quot; by IVE2 in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IVE2&amp;quot; - Map Version==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section &amp;quot;additionally identifies&amp;quot; the map version.&lt;br /&gt;
* '''u16''': &amp;quot;Additional file format version:&amp;quot;&lt;br /&gt;
** '''11''' - 1.04 StarCraft and above (&amp;quot;hybrid&amp;quot;) or Brood War.&lt;br /&gt;
This section does not &amp;quot;replace&amp;quot; IVER in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;VCOD&amp;quot; - Verification Code==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be equal to size of the VCOD data in the EXE resource. Must result in valid checksum.''&lt;br /&gt;
&lt;br /&gt;
This section has a verification code to make sure this is actually a CHK file.&lt;br /&gt;
&lt;br /&gt;
* '''u32[256]''': Seed values.&lt;br /&gt;
* '''u8[16]''': Operation codes to produce the resulting hash:&lt;br /&gt;
** '''00''' - XOR's the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''01''' - Adds to the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''02''' - Subtracts from the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''03''' - XOR's the current hash with the VCOD table at index OWNR, SIDE, FORC, and 0&lt;br /&gt;
** '''04''' - same as 0x03&lt;br /&gt;
** '''05''' - same as 0x03&lt;br /&gt;
** '''06''' - Complex function consisting of ORs and shifts&lt;br /&gt;
** '''07''' - Inverted version of 0x06, switching direction of all shifts&lt;br /&gt;
** '''08+''' - Do nothing&lt;br /&gt;
Opcodes and seeds do not have to match those in EXE resource, as long as the same value is produced.&amp;lt;br&amp;gt;&lt;br /&gt;
The only indexes in the seed table that are referenced are those that correspond individual values of [[#&amp;quot;OWNR&amp;quot; - StarCraft Player Types|OWNR]], [[#&amp;quot;SIDE&amp;quot; - Player Races|SIDE]], [[#&amp;quot;FORC&amp;quot; - Force Settings|FORC]] player assignments, and index 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IOWN&amp;quot; - StarEdit Player Types==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the owner of each player.&lt;br /&gt;
* '''u8[12]''': One byte for each player, specifies the owner of the player:&lt;br /&gt;
** '''00''' - Inactive&lt;br /&gt;
** ''01'' - Computer (game)&lt;br /&gt;
** ''02'' - Occupied by Human Player&lt;br /&gt;
** '''03''' - Rescue Passive&lt;br /&gt;
** '''04''' - Unused&lt;br /&gt;
** '''05''' - Computer&lt;br /&gt;
** '''06''' - Human (Open Slot)&lt;br /&gt;
** '''07''' - Neutral&lt;br /&gt;
** ''08'' - Closed slot&lt;br /&gt;
This section is separate from OWNR as a staredit value. Staredit does not display &amp;quot;inactive&amp;quot; as a valid option. Italicized settings denote invalid map options, which may involve a buffer overflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;OWNR&amp;quot; - StarCraft Player Types==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 12 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section designates the controller of a particular player. It is exactly the same as the &amp;quot;IOWN&amp;quot; section, except there is an additional value, 0x00 for Inactive.&lt;br /&gt;
* '''u8[12]''': One byte for each player, specifies the owner of the player:&lt;br /&gt;
** '''00''' - Inactive&lt;br /&gt;
** ''01'' - Computer (game)&lt;br /&gt;
** ''02'' - Occupied by Human Player&lt;br /&gt;
** '''03''' - Rescue Passive&lt;br /&gt;
** '''04''' - Unused&lt;br /&gt;
** '''05''' - Computer&lt;br /&gt;
** '''06''' - Human (Open Slot)&lt;br /&gt;
** '''07''' - Neutral&lt;br /&gt;
** ''08'' - Closed slot&lt;br /&gt;
Italicized settings denote invalid map options, which may involve a buffer overflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;ERA &amp;quot; - Tileset==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section indicates the tileset of the scenario.&lt;br /&gt;
* '''u16''': Designates tileset:&lt;br /&gt;
** '''00''' - Badlands&lt;br /&gt;
** '''01''' - Space Platform&lt;br /&gt;
** '''02''' - Installation&lt;br /&gt;
** '''03''' - Ashworld&lt;br /&gt;
** '''04''' - Jungle&lt;br /&gt;
** '''05''' - Desert&lt;br /&gt;
** '''06''' - Arctic&lt;br /&gt;
** '''07''' - Twilight&lt;br /&gt;
StarCraft masks the tileset indicator's bit value, so bits after the third place (anything after the value &amp;quot;7&amp;quot;) are removed. Thus, 9 (1001 in binary) is interpreted as 1 (0001), 10 (1010) as 2 (0010), etc.&amp;lt;br&amp;gt;&lt;br /&gt;
Desert, Arctic, and Twilight are Brood War-only tilesets.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;DIM &amp;quot; - Map Dimensions==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains the dimensions of the map.&lt;br /&gt;
* '''u16''': Width of the map&lt;br /&gt;
* '''u16''': Height of the map&lt;br /&gt;
The Width/Height of the map is measured in the number of square 32x32p tiles.&amp;lt;br&amp;gt;&lt;br /&gt;
Standard Dimensions are 64, 96, 128, 192, and 256.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SIDE&amp;quot; - Player Races==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 12 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains the species/race of each player.&lt;br /&gt;
* '''u8[12]''': 1 byte per player the species of that player:&lt;br /&gt;
** '''00''' - Zerg&lt;br /&gt;
** '''01''' - Terran&lt;br /&gt;
** '''02''' - Protoss&lt;br /&gt;
** ''03'' - Invalid (Independent), shown as &amp;quot;Unknown&amp;quot; in SC:R lobby&lt;br /&gt;
** ''04'' - Invalid (Neutral), shown as &amp;quot;Unknown&amp;quot;&lt;br /&gt;
** '''05''' - User Select&lt;br /&gt;
** '''06''' - Random (Forced; Acts as a selected race)&lt;br /&gt;
** ''07'' - Inactive, shown as locked &amp;quot;Select Race&amp;quot; option in SC:R lobby&lt;br /&gt;
Italicized settings denote invalid map options. Note Players 9-11 are defaultly Inactive and Player 12 is defaultly Neutral.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MTXM&amp;quot; - StarCraft Terrain==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be less than or equal to 131072 (0x20000) bytes (256 * 256 * 2).''&lt;br /&gt;
&lt;br /&gt;
Terrain section that contains a map of the level's appearance. StarEdit disregards this section and instead uses [[#&amp;quot;TILE&amp;quot; - StarEdit Terrain|TILE]]; it is only used in Starcraft.&lt;br /&gt;
* '''u16[map width * height]''': one integer for each tile.&lt;br /&gt;
Notes about MTXM:&lt;br /&gt;
* The Width/Height of the map is measured in the number of square 32x32p tiles.&lt;br /&gt;
* Tiles in this section are listed from left to right, top to bottom.&lt;br /&gt;
* The values for each integer are their respective &amp;quot;MegaTile&amp;quot; values in the scenario's tileset. If the size of this section is greater than width*height*2, the data following is ignored. If the size of this section is less, the resulting tiles that have not been defined will be null tiles.&lt;br /&gt;
* This section includes doodads as terrain; TILE, which is otherwise identical, doesn't. Out of the terrain sections (TILE, ISOM, and MTXM), SC only reads MTXM for the sake of not having to generate this data on-the-fly: it contains the exact representation of the level's appearance, including doodads. TILE, on the other hand, is directly tied via a tile lookup function to ISOM, and exists for the sake of not having to generate tiles from ISOM on-the-fly in StarEdit.&lt;br /&gt;
* If MTXM section is smaller than (map width*height), then the remaining tiles will be filled with null tiles or tiles specified by previous MTXM sections.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PUNI&amp;quot; - Player Unit Restrictions==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 5700 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains player unit restrictions: it indicates whether the player can or cannot build a particular unit.&lt;br /&gt;
* '''u8[228][12]''': 1 byte for each unit in order of its unit id, then each player, for player availability:&lt;br /&gt;
** '''00''' - That unit is not available for production if the player has 'override defaults' on&lt;br /&gt;
** '''01''' - That unit is available for production if the player has 'override defaults' on&lt;br /&gt;
* '''u8[228]''': 1 byte for each unit in order of it's unit id, for global availability defaults (for all players):&lt;br /&gt;
** '''00''' - That unit is not available for production&lt;br /&gt;
** '''01''' - That unit is available for production&lt;br /&gt;
* '''u8[228][12]''': 1 byte for each unit in order of its unit id, then each player, indicating whether a player uses the global availability defaults.&lt;br /&gt;
** '''00''' - Player overrides defaults for this unit&lt;br /&gt;
** '''01''' - Player uses defaults for this unit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGR&amp;quot; - Upgrade Restrictions==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1748 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;PUPx&amp;quot; - BW Upgrade Restrictions|&amp;quot;PUPx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains player upgrade restrictions: it indicates the starting/maximum levels at/to which a player can perform a particular upgrade.&lt;br /&gt;
* '''u8[46][12]''': 1 byte for the maximum level a player can upgrade to, in order of its upgrade id, then each player&lt;br /&gt;
* '''u8[46][12]''': 1 byte for the level of an upgrade a player starts off with, in order of its upgrade id, then each player&lt;br /&gt;
* '''u8[46]''': 1 byte for the global default maximum level of each upgrade, in order of its upgrade id.&lt;br /&gt;
* '''u8[46]''': 1 byte for the global default starting level of each upgrade, in order of its upgrade id.&lt;br /&gt;
* '''u8[46][12]''': 1 byte for each upgrade in order of its upgrade id, then each player, indicating whether a player uses the global upgrade defaults:&lt;br /&gt;
** '''00''' - Player does not use global upgrade defaults for this upgrade&lt;br /&gt;
** '''01''' - Player uses upgrade defaults for this upgrade&lt;br /&gt;
See [[#List of Upgrade IDs]].&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PTEC&amp;quot; - Tech Restrictions==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 912 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;PTEx&amp;quot; - BW Tech Restrictions|&amp;quot;PTEx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains player technology availability restrictions: it indicates whether a player starts off with a particular technology or can research a particular technology.&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology id, then each player, for player availability:&lt;br /&gt;
** '''00''' - Technology is not available for a player&lt;br /&gt;
** '''01''' - Technology is available for a player&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology id, then each player, for &amp;quot;already researched&amp;quot; status:&lt;br /&gt;
** '''00''' - Technology is not already researched&lt;br /&gt;
** '''01''' - Technology is already researched&lt;br /&gt;
* '''u8[24]''': 1 byte for each technology for global availability defaults:&lt;br /&gt;
** '''00''' - Technology is not available by default&lt;br /&gt;
** '''01''' - Technology is available by default&lt;br /&gt;
* '''u8[24]''': 1 byte for each technology for global &amp;quot;already researched&amp;quot; defaults:&lt;br /&gt;
** '''00''' - Technology is not already researched by default&lt;br /&gt;
** '''01''' - Technology is already researched by default&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology in order of its technology id, then each player, indicating whether a player uses the global defaults:&lt;br /&gt;
** '''00''' - Technology overrides defaults for player&lt;br /&gt;
** '''01''' - Technology uses default settings for player&lt;br /&gt;
See [[#List of Technology IDs]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIT&amp;quot; - Placed Units==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 36 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the pre-placed units on the map and their properties. Each unit on the map gets the following structure:&lt;br /&gt;
* '''u32''': The unit's class instance (sort of a &amp;quot;serial number&amp;quot;)&lt;br /&gt;
* U16''': X coordinate of unit&lt;br /&gt;
* U16''': Y coordinate of unit&lt;br /&gt;
* '''u16''': Unit ID&lt;br /&gt;
* '''u16''': Type of relation to another building (i.e. add-on, nydus link)&lt;br /&gt;
** '''Bit 9''' - Nydus Link&lt;br /&gt;
** '''Bit 10''' - Addon Link&lt;br /&gt;
* '''u16''': Flags of special properties which can be applied to the unit and are valid:&lt;br /&gt;
** '''Bit 0''' - Cloak is valid&lt;br /&gt;
** '''Bit 1''' - Burrow is valid&lt;br /&gt;
** '''Bit 2''' - In transit is valid&lt;br /&gt;
** '''Bit 3''' - Hallucinated is valid&lt;br /&gt;
** '''Bit 4''' - Invincible is valid&lt;br /&gt;
** '''Bit 5-15''' - Unused&lt;br /&gt;
* '''u16''': Out of the elements of the unit data, the properties which can be changed by the map maker:&lt;br /&gt;
** '''Bit 0''' - Owner player is valid (the unit is not a critter, start location, etc.; not a neutral unit)&lt;br /&gt;
** '''Bit 1''' - HP is valid&lt;br /&gt;
** '''Bit 2''' - Shields is valid&lt;br /&gt;
** '''Bit 3''' - Energy is valid (unit is a wraith, etc.)&lt;br /&gt;
** '''Bit 4''' - Resource amount is valid (unit is a mineral patch, vespene geyser, etc.)&lt;br /&gt;
** '''Bit 5''' - Amount in hangar is valid (unit is a reaver, carrier, etc.)&lt;br /&gt;
** '''Bit 6-15''' - Unused&lt;br /&gt;
* '''u8''': Player number of owner (0-based)&lt;br /&gt;
* '''u8''': Hit points % (1-100)&lt;br /&gt;
* '''u8''': Shield points % (1-100)&lt;br /&gt;
* '''u8''': Energy points % (1-100)&lt;br /&gt;
* '''u32''': Resource amount&lt;br /&gt;
* '''u16''': Number of units in hangar&lt;br /&gt;
* '''u16''': Unit state flags&lt;br /&gt;
** '''Bit 0''' - Unit is cloaked&lt;br /&gt;
** '''Bit 1''' - Unit is burrowed&lt;br /&gt;
** '''Bit 2''' - Building is in transit&lt;br /&gt;
** '''Bit 3''' - Unit is hallucinated&lt;br /&gt;
** '''Bit 4''' - Unit is invincible&lt;br /&gt;
** '''Bit 5-15''' - Unused&lt;br /&gt;
* '''u32''': Unused&lt;br /&gt;
* '''u32''': Class instance of the unit to which this unit is related to (i.e. via an add-on, nydus link, etc.). It is &amp;quot;0&amp;quot; if the unit is not linked to any other unit.&lt;br /&gt;
Notes about UNIT:&lt;br /&gt;
* The X/Y coordinates are the center of the sprite of the unit (in pixels).&lt;br /&gt;
* Please edit if you could confirm the bit values to be correct/if you know more bit values.&lt;br /&gt;
* Default values will apply if bit values are unchecked. Defaults: 100% HP, 100% SP, 100% EP, 0 resources, 0 hangar count.&lt;br /&gt;
* This section can be split. Additional UNIT sections will add more units.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;ISOM&amp;quot; - Isometric Terrain==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section is required to place isometric terrain on the map. It provides data about the nature of the isometrical &amp;quot;diamonds&amp;quot; (the editing mode of StarEdit).&lt;br /&gt;
* '''u16[ (width / 2 + 1) * (height + 1) * 4 ]''': 4 integers for each map rectangle tile (plus one extra tile to the right and bottom of the map), as per the RECT structure. Each rectangle border (left, top, right, bottom) is assigned an &amp;quot;ISOM value.&amp;quot; These form the &amp;quot;diamond&amp;quot; pattern of the map, and each rectangle thus gets two ISOM values associated with it. StarEdit somehow hashes these (the exact algorithm is unknown) and thus produces the tile index of the rectangle (which it stores in TILE for reasons of efficiency). The index of the rectangle's right tile is that of its left tile + 16.&lt;br /&gt;
This section is the only truly unknown section of the .chk format. If you're an ex-Blizzard employee or SI, please edit this section. If you have additional research, post on the forums about it and/or edit this section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TILE&amp;quot; - StarEdit Terrain==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section will only be different from the [[#&amp;quot;MTXM&amp;quot; - StarCraft Terrain|MTXM]] section in tiles where doodads are present.&lt;br /&gt;
* '''u16[ map width * height ]''': 1 integer for each map tile. Moves horizontally across the map.&lt;br /&gt;
The values in TILE are normally directly generated from the ISOM section (see &amp;quot;'ISOM' section&amp;quot; above), and thus do not match that of MTXM on doodad tiles.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;DD2 &amp;quot; - StarEdit Sprites (Doodads)==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section contains the doodad map of the level. There are several parts to doodads. The graphical portion is stored in the [[#&amp;quot;MTXM&amp;quot; - StarCraft Terrain|MTXM]] section. The second part of the doodad is stored in this section. This section is only used by the map editor.&lt;br /&gt;
&lt;br /&gt;
Each doodad in the map gets the following structure:&lt;br /&gt;
* '''u16''': Number of the doodad. Size of the doodad is dependent on this. Doodads are different for each tileset.&lt;br /&gt;
* '''u16''': X coordinate of the doodad unit&lt;br /&gt;
* '''u16''': Y coordinate of the doodad unit&lt;br /&gt;
* '''u8''': Player number that owns the doodad&lt;br /&gt;
* '''u8''': Enabled flag&lt;br /&gt;
** '''00''' - Doodad is enabled (trap can attack, door is closed, etc)&lt;br /&gt;
** '''01''' - Doodad is disabled&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;THG2&amp;quot; - StarCraft Sprites==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 10 bytes.''&lt;br /&gt;
&lt;br /&gt;
The map editor only writes to this section. Starcraft uses this section.&lt;br /&gt;
&lt;br /&gt;
Sprites, usually on doodads, get the following structure.&lt;br /&gt;
* '''u16''': Unit/Sprite number of the sprite&lt;br /&gt;
* '''u16''': X coordinate of the doodad unit&lt;br /&gt;
* '''u16''': Y coordinate of the doodad unit&lt;br /&gt;
* '''u8''': Player number that owns the doodad&lt;br /&gt;
* '''u8''': Unused&lt;br /&gt;
* '''u16''': Flags&lt;br /&gt;
** '''Bit 0-11''' - Unused&lt;br /&gt;
** '''Bit 12''' - Draw as sprite (Determines if it is a sprite or a unit sprite)&lt;br /&gt;
** '''Bit 13''' - Unused&lt;br /&gt;
** '''Bit 14''' - Unused&lt;br /&gt;
** '''Bit 15''' - Disabled (Only valid if Draw as sprite is unchecked, disables the unit)&lt;br /&gt;
This section can be split. Additional THG2 sections will add more sprites.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MASK&amp;quot; - Fog of War Layer==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: This section will always validate.''&lt;br /&gt;
&lt;br /&gt;
This section contains the data on fog of war for each player. This is whether at the start of the game that levels of black space that is available.&lt;br /&gt;
* '''u8[ map width * height ]''': One byte for each map tile. The bits indicate for each player the fog of war.&lt;br /&gt;
** '''Bit 0''' - Player 1's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 1''' - Player 2's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 2''' - Player 3's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 3''' - Player 4's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 4''' - Player 5's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 5''' - Player 6's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 6''' - Player 7's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 7''' - Player 8's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
Any size greater than width*height will be ignored. Any size less will default missing tiles to 0xFF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;STR &amp;quot; - String Data==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be at least 1 byte.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the strings in the map.&lt;br /&gt;
* '''u16''': Number of strings in the section (Default''': 1024)&lt;br /&gt;
* '''u16[Number of strings]''': 1 integer for each string specifying the offset (the spot where the string starts in the section from the start of it).&lt;br /&gt;
* '''Strings''': After the offsets, this is where every string in the map goes, one after another. Each one is terminated by a null character.&lt;br /&gt;
This section can contain more or less then 1024 string offsests and will work in Starcraft.&amp;lt;br&amp;gt;&lt;br /&gt;
By default the first byte in '''Strings''' is a NUL character, and all unused offsets in the STR section point to this NUL character.&lt;br /&gt;
Note that STR sections can be stacked in a smiliar fashion as MTXM. The exact mechanisms of this are uncertain.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPRP&amp;quot; - CUWP Slots==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1280 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section is used whenever the create units with properties trigger is used. Since a slot has to be assigned to the action, this is where each slot is designated.&lt;br /&gt;
&lt;br /&gt;
There are 64 of the following structures regardless of how many are used and it cannot exceed 64.&lt;br /&gt;
* '''u16''': Flag of which special properties can be applied to unit, and are valid.&lt;br /&gt;
** '''Bit 0''' - Cloak bit is valid&lt;br /&gt;
** '''Bit 1''' - Burrowed bit is valid&lt;br /&gt;
** '''Bit 2''' - In transit bit is valid&lt;br /&gt;
** '''Bit 3''' - Hallucinated bit is valid&lt;br /&gt;
** '''Bit 4''' - Invincible bit is valid&lt;br /&gt;
** '''Bit 5-15''' - Unknown/unused&lt;br /&gt;
* '''u16''': Which elements of the unit data are valid, which properties can be changed by the map maker.&lt;br /&gt;
** '''Bit 0''' - Owner player is valid (unit is not neutral)&lt;br /&gt;
** '''Bit 1''' - HP is valid&lt;br /&gt;
** '''Bit 2''' - Shields is valid&lt;br /&gt;
** '''Bit 3''' - Energy is valid&lt;br /&gt;
** '''Bit 4''' - Resource amount is valid (unit is a resource)&lt;br /&gt;
** '''Bit 5''' - Amount in hanger is valid&lt;br /&gt;
** '''Bit 6''' - Unknown/unused&lt;br /&gt;
* '''u8''': Player number that owns unit. Will always be NULL in this section (0)&lt;br /&gt;
* '''u8''': Hit point % (1-100)&lt;br /&gt;
* '''u8''': Shield point % (1-100)&lt;br /&gt;
* '''u8''': Energy point % (1-100)&lt;br /&gt;
* '''u32''': Resource amount (for resources only)&lt;br /&gt;
* '''u16''': # of units in hangar&lt;br /&gt;
* '''u16''': Flags&lt;br /&gt;
** '''Bit 0''' - Unit is cloaked&lt;br /&gt;
** '''Bit 1''' - Unit is burrowed&lt;br /&gt;
** '''Bit 2''' - Building is in transit&lt;br /&gt;
** '''Bit 3''' - Unit is hallucinated&lt;br /&gt;
** '''Bit 4''' - Unit is invincible&lt;br /&gt;
** '''Bit 5-15''' - Unknown/unused&lt;br /&gt;
* '''u32''': Unknown/unused. Padding?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPUS&amp;quot; - CUWP Slots Used==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section goes along with the &amp;quot;UPRP&amp;quot; section. This section just indicates which of the 64 unit properties slot are used.&lt;br /&gt;
* '''u8[64]''': 1 byte for each trigger unit properties slot&lt;br /&gt;
** '''00''' - Properties slot is unused&lt;br /&gt;
** '''01''' - Properties slot is used&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MRGN&amp;quot; - Locations==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: 1280 bytes for retail, 5100 bytes for Hybrid and Broodwar.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the locations that the map uses. In a vanilla map, this section contains 64 locations. In a Hybrid or Brood War map, this section will expand to contain 255 locations.&lt;br /&gt;
&lt;br /&gt;
Each location gets one of the following location entries. The 'Anywhere' location, is ALWAYS location 64.&lt;br /&gt;
* '''u32''': Left (X1) coordinate of location, in pixels (usually 32 pt grid aligned)&lt;br /&gt;
* '''u32''': Top (Y1) coordinate of location, in pixels&lt;br /&gt;
* '''u32''': Right (X2) coordinate of location, in pixels&lt;br /&gt;
* '''u32''': Bottom (Y2) coordinate of location, in pixels&lt;br /&gt;
* '''u16''': String number of the name of this location&lt;br /&gt;
* '''u16''': Location elevation flags. If an elevation is disabled in the location, it's bit will be on (1)&lt;br /&gt;
** '''Bit 0''' - Low elevation&lt;br /&gt;
** '''Bit 1''' - Medium elevation&lt;br /&gt;
** '''Bit 2''' - High elevation&lt;br /&gt;
** '''Bit 3''' - Low air&lt;br /&gt;
** '''Bit 4''' - Medium air&lt;br /&gt;
** '''Bit 5''' - High air&lt;br /&gt;
** '''Bit 6-15''' - Unused&lt;br /&gt;
Note that in typical locations Right is always larger than Left and Bottom is always larger than Top. However, you can reverse one or both of these for [[Inverted Locations]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TRIG&amp;quot; - Triggers==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 2400 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the triggers in the map. This along with [[#&amp;quot;MBRF&amp;quot; - Mission Briefings|MBRF]] is the most complicated section in the entire scenario.chk file as there is a lot of data packed into too little of a space. Refer to the appendix at the bottom of this page for more information.&lt;br /&gt;
For easy reference, since each trigger contains 2400 bytes, the amount of triggers can be gotten by taking the section length and dividing by 2400.&lt;br /&gt;
Every single trigger in the map will have the following format:&lt;br /&gt;
* 16 Conditions (20 byte struct)&amp;lt;br&amp;gt; Every trigger has 16 of the following format, even if only one condition is used. See the appendix for information on which items are used for what conditions.&lt;br /&gt;
** '''u32''': Location number for the condition (1 based -- 0 refers to No Location), EUD Bitmask for a Death condition if the MaskFlag is set to &amp;quot;SC&amp;quot;&lt;br /&gt;
** '''u32''': [[#List of Players/Group IDs|Group]] that the condition applies to&lt;br /&gt;
** '''u32''': Qualified number (how many/resource amount)&lt;br /&gt;
** '''u16''': [[#Trigger Unit Types|Unit ID]] condition applies to&lt;br /&gt;
** '''u8''': [[#Numeric Comparisons|Numeric comparison]], [[#Switch States|switch state]]&lt;br /&gt;
** '''u8''': [[#Trigger Conditions List|Condition byte]]&lt;br /&gt;
** '''u8''': [[#Resource Types|Resource type]], [[#Score Types|score type]], Switch number (0-based)&lt;br /&gt;
** '''u8''': Flags&lt;br /&gt;
*** '''Bit 0''' - Unknown/unused&lt;br /&gt;
*** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled/ignored&lt;br /&gt;
*** '''Bit 2''' - Always display flag.&lt;br /&gt;
*** '''Bit 3''' - Unit properties is used. ('''Note:''' This is used in [[TRG|*.trg]] files)&lt;br /&gt;
*** '''Bit 4''' - Unit type is used. Cleared in &amp;quot;Offset + Mask&amp;quot; EUD conditions. May not be necessary otherwise?&lt;br /&gt;
*** '''Bit 5-7''' - Unknown/unused&lt;br /&gt;
** '''u16''': MaskFlag: set to &amp;quot;SC&amp;quot; (0x53, 0x43) when using the bitmask for EUDs, 0 otherwise&lt;br /&gt;
* 64 Actions (32 byte struct)&amp;lt;br&amp;gt; Immediately following the 16 conditions, there are 64 actions. There will always be 64 of the following structure, even if some of them are unused.&lt;br /&gt;
** '''u32''': Location - source location in &amp;quot;Order&amp;quot; and &amp;quot;Move Unit&amp;quot;, dest location in &amp;quot;Move Location&amp;quot; (1 based -- 0 refers to No Location), EUD Bitmask for a Death action if the MaskFlag is set to &amp;quot;SC&amp;quot;&lt;br /&gt;
** '''u32''': String number for trigger text (0 means no string)&lt;br /&gt;
** '''u32''': WAV string number (0 means no string)&lt;br /&gt;
** '''u32''': Seconds/milliseconds of time&lt;br /&gt;
** '''u32''': First (or only) [[#List of Players/Group IDs|Group/Player]] affected.&lt;br /&gt;
** '''u32''': Second group affected, secondary location (1-based), CUWP #, number, AI script (4-byte string), switch (0-based #)&lt;br /&gt;
** '''u16''': [[#Trigger Unit Types|Unit type]], [[#Score Types|score type]], [[#Resource Types|resource type]], [[#Alliance Statuses|alliance status]]&lt;br /&gt;
** '''u8''': [[#Trigger Actions List|Action byte]]&lt;br /&gt;
** '''u8''': Number of units (0 means All Units), [[#Action States|action state]], [[#Unit Orders|unit order]], [[#Number Modifiers|number modifier]]&lt;br /&gt;
** '''u8''': Flags&lt;br /&gt;
*** '''Bit 0''' - Ignore a wait/transmission once.&lt;br /&gt;
*** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled.&lt;br /&gt;
*** '''Bit 2''' - Always display flag - when not set: if the user has turned off subtitles (see sound options) the text will not display, when set: text will always display&lt;br /&gt;
*** '''Bit 3''' - Unit properties is used. Staredit uses this for *.trg files.&lt;br /&gt;
*** '''Bit 4''' - Unit type is used. Cleared in &amp;quot;Offset + Mask&amp;quot; EUD actions.&lt;br /&gt;
*** '''Bit 5-7''' - Unknown/unused&lt;br /&gt;
** '''u8''': Padding&lt;br /&gt;
** '''u16 (2 bytes)''': MaskFlag: set to &amp;quot;SC&amp;quot; (0x53, 0x43) when using the bitmask for EUDs, 0 otherwise&lt;br /&gt;
* Player Execution&amp;lt;br&amp;gt; Following the 16 conditions and 64 actions, every trigger also has this structure&lt;br /&gt;
** '''u32''': execution flags&lt;br /&gt;
*** '''Bit 0''' - All conditions are met, executing actions, cleared on the next trigger loop.&lt;br /&gt;
*** '''Bit 1''' - Ignore the following actions: Defeat, Draw.&lt;br /&gt;
*** '''Bit 2''' - Preserve trigger. (Can replace Preserve Trigger action)&lt;br /&gt;
*** '''Bit 3''' - Ignore execution.&lt;br /&gt;
*** '''Bit 4''' - Ignore all of the following actions for this trigger until the next trigger loop: Wait, PauseGame, Transmission, PlayWAV, DisplayTextMessage, CenterView, MinimapPing, TalkingPortrait, and MuteUnitSpeech.&lt;br /&gt;
*** '''Bit 5''' - This trigger has paused the game, ignoring subsequent calls to Pause Game (Unpause Game clears this flag only in the same trigger), may automatically call unpause at the end of action execution?&lt;br /&gt;
*** '''Bit 6''' - Wait skipping disabled for this trigger, cleared on next trigger loop.&lt;br /&gt;
*** '''Bit 7-31''' - Unknown/unused&lt;br /&gt;
** '''u8[27]''': 1 byte for each player in the [[#List of Players/Group IDs]]&lt;br /&gt;
*** '''00''' - Trigger is not executed for player&lt;br /&gt;
*** '''01''' - Trigger is executed for player&lt;br /&gt;
** '''u8''': Index of the current action, in StarCraft this is incremented after each action is executed, trigger execution ends when this is 64 (Max Actions) or an action is encountered with Action byte as 0&lt;br /&gt;
This section can be split. Additional TRIG sections will add more triggers.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MBRF&amp;quot; - Mission Briefings==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 2400 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all of the mission briefings shown by the players.&lt;br /&gt;
&lt;br /&gt;
See [[#&amp;quot;TRIG&amp;quot; - Triggers|&amp;quot;TRIG&amp;quot;]] section for format, as it is exactly the same except for the conditions. In this section the 16 conditions are still there, they are all null except for the very first condition, which only has a condition byte of 13. See [[#Mission Briefing Actions List]] for the action bytes for the mission briefing actions.&lt;br /&gt;
&lt;br /&gt;
This section can be split. Additional MBRF sections will add more briefing triggers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SPRP&amp;quot; - Scenario Properties==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4 bytes.''&lt;br /&gt;
&lt;br /&gt;
* '''u16''': String number of the scenario name&lt;br /&gt;
* '''u16''': String number of the scenarios description.&lt;br /&gt;
A string index of 0 for the map name will default it to its file name. A string index of 0 description will default to a predefined string.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;FORC&amp;quot; - Force Settings==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be less than or equal to 20 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the forces and the information about them.&lt;br /&gt;
* '''u8[8]''': 1 byte for each active player, specifying which of the 4 forces (0-based) that the player's on&lt;br /&gt;
* '''u16[4]''': 1 integer for each force, string number of the name of the force&lt;br /&gt;
* '''u8[4]''': 1 byte for each force specifying the properties:&lt;br /&gt;
** '''Bit 0''' - Random start location&lt;br /&gt;
** '''Bit 1''' - Allies&lt;br /&gt;
** '''Bit 2''' - Allied victory&lt;br /&gt;
** '''Bit 3''' - Shared vision&lt;br /&gt;
** '''Bit 4-7''' - Unused&lt;br /&gt;
Notes about FORC:&lt;br /&gt;
* If there is no string specified for a force name, it will default to a &amp;quot;Force #&amp;quot; string.&lt;br /&gt;
* If this section is less than 20 bytes, the remaining bytes are defaulted to 0.&lt;br /&gt;
* Players can be on a force greater than 4, however they will not appear in the game lobby.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;WAV &amp;quot; - WAV String Indexes==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
There are 512 wav entires regardless of how many are actually used.&lt;br /&gt;
* '''u32[512]''': 1 long for each WAV. Indicates a string index is used for a WAV path in the MPQ. If the entry is not used, it will be 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIS&amp;quot; - Unit Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4048 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;UNIx&amp;quot; - BW Unit Settings|&amp;quot;UNIx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains the unit settings for the level:&lt;br /&gt;
* '''u8[228]''': 1 byte for each unit, in order of Unit ID&lt;br /&gt;
** '''00''' - Unit does not use default settings&lt;br /&gt;
** '''01''' - Unit does use default settings&lt;br /&gt;
* '''u32[228]''': Hit points for unit (Note the displayed value is this value / 256, with the low byte being a fractional HP value)&lt;br /&gt;
* '''u16[228]''': Shield points, in order of Unit ID&lt;br /&gt;
* '''u8[228]''': Armor points, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Build time (1/60 seconds), in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Mineral cost, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Gas cost, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': String number, in order of Unit ID&lt;br /&gt;
* '''u16[100]''': Base weapon damage the weapon does, in weapon ID order ([[#List of Unit Weapon IDs]])&lt;br /&gt;
* '''u16[100]''': Upgrade bonus weapon damage, in weapon ID order&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGS&amp;quot; - Upgrade Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 598 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;UPGx&amp;quot; - BW Upgrade Settings|&amp;quot;UPGx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains upgrade settings:&lt;br /&gt;
* '''u8[46]''': 1 byte per each upgrade, in order of upgrade id.&lt;br /&gt;
** '''00''' - Upgrade uses custom settings&lt;br /&gt;
** '''01''' - Upgrade uses default settings&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, gas time factor for each upgrade, in order of upgrade id.&lt;br /&gt;
See [[#List of Upgrade IDs]] for upgrade ids.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TECS&amp;quot; - Tech Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 216 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;TECx&amp;quot; - BW Tech Settings|&amp;quot;TECx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains technology/special abilities settings:&lt;br /&gt;
* '''u8[24]''': 1 byte per each technology, specifies if the tech overrides the default settings. In order of technology id&lt;br /&gt;
** '''00''' - Technology uses custom settings&lt;br /&gt;
** '''01''' - Technology uses default settings&lt;br /&gt;
* '''u16[24]''': Mineral cost to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Gas cost to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Time required to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Energy cost to cast technology/special ability. In order of technology id.&lt;br /&gt;
See [[#List of Technology IDs]] for technology ids.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SWNM&amp;quot; - Switch Names==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section contains the strings used for each switch. There are 256 switches, and can't be any more or any less.&lt;br /&gt;
* '''u32[256]''': One long for each switch, specifies the string number for the name of each switch. Unnamed switches will have an index of 0, and have a default switch name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;COLR&amp;quot; - Player Colors==&lt;br /&gt;
''Required for Brood War only and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Can be in non-Brood War maps in Remaster, if CRGB is also present.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 8 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section indicates what color each player is, but only has effect on Brood War.&lt;br /&gt;
* '''u8[8]''': 1 byte for each player, indicates the color of the player&lt;br /&gt;
** '''00''' - Red&lt;br /&gt;
** '''01''' - Blue&lt;br /&gt;
** '''02''' - Teal&lt;br /&gt;
** '''03''' - Purple&lt;br /&gt;
** '''04''' - Orange&lt;br /&gt;
** '''05''' - Brown&lt;br /&gt;
** '''06''' - White&lt;br /&gt;
** '''07''' - Yellow&lt;br /&gt;
** '''08''' - Green&lt;br /&gt;
** '''09''' - Pale yellow&lt;br /&gt;
** '''10''' - Tan&lt;br /&gt;
** '''11''' - Azure (Neutral color)&lt;br /&gt;
Other values can be used but may have different results depending on the tileset. Any color value above 11 is an overflow. As of patch 1.18.6 values above 11 result in default player color.&lt;br /&gt;
&lt;br /&gt;
SC:R Only colors:&lt;br /&gt;
Selecting these in a non-SC:R map seems to just use default colors, unless the [[#&amp;quot;CRGB&amp;quot; - Remastered Player Colors|CRGB]] section is also present regardless of version (including non-BW versions).&lt;br /&gt;
* '''12''' - Pale Green&lt;br /&gt;
* '''13''' - Blueish Grey&lt;br /&gt;
* '''14''' - Pale Yellow&lt;br /&gt;
* '''15''' - Cyan&lt;br /&gt;
* '''16''' - Pink&lt;br /&gt;
* '''17''' - Olive&lt;br /&gt;
* '''18''' - Lime&lt;br /&gt;
* '''19''' - Navy&lt;br /&gt;
* '''20''' - Magenta&lt;br /&gt;
* '''21''' - Grey&lt;br /&gt;
* '''22''' - Black&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;CRGB&amp;quot; - Remastered Player Colors==&lt;br /&gt;
''Requirement unknown, but can be in any map type including non-remaster maps.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 32 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''u8[8][3]''': 3 bytes for each player corresponding to an RGB color value&lt;br /&gt;
** '''u8''': R&lt;br /&gt;
** '''u8''': G&lt;br /&gt;
** '''u8''': B&lt;br /&gt;
* '''u8[8]''': Indicates how to select the color for each player&lt;br /&gt;
** '''0''' - Random Predefined&lt;br /&gt;
** '''1''' - Player's Choice&lt;br /&gt;
** '''2''' - Custom RGB Color (RGB value for the corresponding player defined above)&lt;br /&gt;
** '''3''' - Use &amp;quot;COLR&amp;quot; selection&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PUPx&amp;quot; - BW Upgrade Restrictions==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2318 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UPGR&amp;quot; - Upgrade Restrictions|&amp;quot;UPGR&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is identical to UPGR section except it uses the Brood War set of 61 upgrades instead of the original 46.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PTEx&amp;quot; - BW Tech Restrictions==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1672 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;PTEC&amp;quot; - Tech Restrictions|&amp;quot;PTEC&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is identical to PTEC section except it uses the Brood War set of 44 technologies instead of the original 24.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIx&amp;quot; - BW Unit Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4168 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UNIS&amp;quot; - Unit Settings|&amp;quot;UNIS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is indentical to UNIS section except it uses the Brood War set of 130 weapons instead of the original 100.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGx&amp;quot; - BW Upgrade Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 794 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UPGS&amp;quot; - Upgrade Settings|&amp;quot;UPGS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section the same as UPGS except section except it uses the Brood War set of 61 upgrades instead of the original 46, and there is an unused byte after the first set:&lt;br /&gt;
* '''u8[61]''': 1 byte per each upgrade, in order of upgrade id.&lt;br /&gt;
** '''00''' - Upgrade uses custom settings&lt;br /&gt;
** '''01''' - Upgrade uses default settings&lt;br /&gt;
* '''u8''': Unused.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, time factor for each upgrade, in order of upgrade id.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TECx&amp;quot; - BW Tech Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 396 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;TECS&amp;quot; - Tech Settings|&amp;quot;TECS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is indentical to UNIS section except it uses the Brood War set of 44 technologies instead of the original 24.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Appendix=&lt;br /&gt;
A set of references and IDs that should help you easier in the trigger section and the technology/player ids, etc:&lt;br /&gt;
&lt;br /&gt;
==Trigger Conditions List==&lt;br /&gt;
* 0 = No Condition&lt;br /&gt;
* 1 = Countdown Timer(Comparison, QNumber)&lt;br /&gt;
* 2 = Command(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 3 = Bring(Player, Comparison, TUnit, Loc, QNumber)&lt;br /&gt;
* 4 = Accumulate(Player, Comparison, QNumber, ResType)&lt;br /&gt;
* 5 = Kill(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 6 = Command the Most(TUnit)&lt;br /&gt;
* 7 = Commands the Most At(TUnit, Loc)&lt;br /&gt;
* 8 = Most Kills(TUnit)&lt;br /&gt;
* 9 = Highest Score(Score)&lt;br /&gt;
* 10 = Most Resources(ResType)&lt;br /&gt;
* 11 = Switch(Switch)&lt;br /&gt;
* 12 = Elapsed Time(Comparison, QNumber)&lt;br /&gt;
* 13 = Data is a Mission Briefing. Conditions are N/A (Same as Never)&lt;br /&gt;
* 14 = Opponents(Player, Comparison, QNumber)&lt;br /&gt;
* 15 = Deaths(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 16 = Command the Least(TUnit)&lt;br /&gt;
* 17 = Command the Least At(TUnit, Loc)&lt;br /&gt;
* 18 = Least Kills(TUnit)&lt;br /&gt;
* 19 = Lowest Score(Score)&lt;br /&gt;
* 20 = Least Resources(ResType)&lt;br /&gt;
* 21 = Score(Player, Comparison, Score, QNumber)&lt;br /&gt;
* 22 = Always (Same as No Condition)&lt;br /&gt;
* 23 = Never&lt;br /&gt;
&lt;br /&gt;
==Trigger Actions List==&lt;br /&gt;
* 0 = No Action&lt;br /&gt;
* 1 = Victory&lt;br /&gt;
* 2 = Defeat&lt;br /&gt;
* 3 = Preserve Trigger&lt;br /&gt;
* 4 = Wait(Time)&lt;br /&gt;
* 5 = Pause Game (Single player only)&lt;br /&gt;
* 6 = Unpause Game (Single player only)&lt;br /&gt;
* 7 = Transmission(Text, Unit, Loc, Time, Modifier, Wave, WavTime)&lt;br /&gt;
* 8 = Play WAV(Wav, WavTime)&lt;br /&gt;
* 9 = Display Text Message(Text)&lt;br /&gt;
* 10 = Center View(Loc)&lt;br /&gt;
* 11 = Create Unit with Properties(Player, Unit, Number, Loc, UnitProp)&lt;br /&gt;
* 12 = Set Mission Objectives(Text)&lt;br /&gt;
* 13 = Set Switch(Switch, SwAction)&lt;br /&gt;
* 14 = Set Countdown Timer(Time, Modifier)&lt;br /&gt;
* 15 = Run AI Script(AIScript)&lt;br /&gt;
* 16 = Run AI Script At Location(AIScript)&lt;br /&gt;
* 17 = Leader Board (Control) (Text, TUnit)&lt;br /&gt;
* 18 = Leader Board (Control At Location) (Text, TUnit, Loc)&lt;br /&gt;
* 19 = Leader Board (Resources) (Text, ResType)&lt;br /&gt;
* 20 = Leader Board (Kills) (Text, TUnit)&lt;br /&gt;
* 21 = Leader Board (Points) (Text, Score)&lt;br /&gt;
* 22 = Kill Unit (Player, TUnit)&lt;br /&gt;
* 23 = Kill Unit At Location(Player, TUnit, Number, Loc)&lt;br /&gt;
* 24 = Remove Unit(Player, TUnit)&lt;br /&gt;
* 25 = Remove Unit At Location(Player, TUnit, Number, Loc)&lt;br /&gt;
* 26 = Set Resources(Player, Number, Modifier, ResType)&lt;br /&gt;
* 27 = Set Score(Player, Number, Modifier, Score)&lt;br /&gt;
* 28 = Minimap Ping(Loc)&lt;br /&gt;
* 29 = Talking Portrait(Unit, Time)&lt;br /&gt;
* 30 = Mute Unit Speech&lt;br /&gt;
* 31 = Unmute Unit Speech&lt;br /&gt;
* 32 = Leaderboard Computer Players(State)&lt;br /&gt;
* 33 = Leaderboard Goal (Control) (Text, TUnit, Number)&lt;br /&gt;
* 34 = Leaderboard Goal (Control At Location) (Text, TUnit, Number, Loc)&lt;br /&gt;
* 35 = Leaderboard Goal (Resources) (Text, TUnit, Number, ResType)&lt;br /&gt;
* 36 = Leaderboard Goal (Kills) (Text, TUnit, Number)&lt;br /&gt;
* 37 = Leaderboard Goal (Points) (Text, Number, Score)&lt;br /&gt;
* 38 = Move Location(Player, TUnit, SLoc, DLoc)&lt;br /&gt;
* 39 = Move Unit(Player, TUnit, Number, SLoc, DLoc)&lt;br /&gt;
* 40 = Leaderboard (Greed) (Number)&lt;br /&gt;
* 41 = Set Next Scenario(Text) (Single player only)&lt;br /&gt;
* 42 = Set Doodad State(Player, TUnit, Loc, State)&lt;br /&gt;
* 43 = Set Invincibility(Player, TUnit, Loc, State)&lt;br /&gt;
* 44 = Create Unit(Player, Unit, Number, Loc)&lt;br /&gt;
* 45 = Set Deaths(Player, TUnit, Number, Modifier)&lt;br /&gt;
* 46 = Order(Player, TUnit, SLoc, DLoc, Order)&lt;br /&gt;
* 47 = Comment(Text)&lt;br /&gt;
* 48 = Give Units to Player(SPlayer, DPlayer, TUnit, Number, Loc)&lt;br /&gt;
* 49 = Modify Unit Hit Points(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 50 = Modify Unit Energy(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 51 = Modify Unit Shield Points(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 52 = Modify Unit Resource Amount(Player, Number, ModAmount, Loc)&lt;br /&gt;
* 53 = Modify Unit Hanger Count(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 54 = Pause Timer&lt;br /&gt;
* 55 = Unpause Timer&lt;br /&gt;
* 56 = Draw&lt;br /&gt;
* 57 = Set Alliance Status(Player, AllyStatus)&lt;br /&gt;
* 58 = Disable Debug Mode (Single player only)&lt;br /&gt;
* 59 = Enable Debug Mode (Single player only)&lt;br /&gt;
&lt;br /&gt;
==Mission Briefing Actions List==&lt;br /&gt;
* 0 - No Action&lt;br /&gt;
* 1 - Wait(Time)&lt;br /&gt;
* 2 - Play WAV(Wave, WavTime)&lt;br /&gt;
* 3 - Text Message(Text, Time)&lt;br /&gt;
* 4 - Mission Objectives(Text)&lt;br /&gt;
* 5 - Show Portrait(Unit, Slot)&lt;br /&gt;
* 6 - Hide Portrait(Slot)&lt;br /&gt;
* 7 - Display Speaking Portrait(Slot, Time)&lt;br /&gt;
* 8 - Transmission(Text, Slot, Time, Modifier, Wave, WavTime)&lt;br /&gt;
* 9 - Skip Tutorial Enabled&lt;br /&gt;
&lt;br /&gt;
==Switch States==&lt;br /&gt;
* 2 = Switch is set&lt;br /&gt;
* 3 = Switch is cleared&lt;br /&gt;
&lt;br /&gt;
==Numeric Comparisons==&lt;br /&gt;
* 0 = At least&lt;br /&gt;
* 1 = At most&lt;br /&gt;
* 10 = Exactly&lt;br /&gt;
&lt;br /&gt;
==Score Types==&lt;br /&gt;
* 0 = Total&lt;br /&gt;
* 1 = Units&lt;br /&gt;
* 2 = Buildings&lt;br /&gt;
* 3 = Units and Buildings&lt;br /&gt;
* 4 = Kills&lt;br /&gt;
* 5 = Razings&lt;br /&gt;
* 6 = Kills and Razings&lt;br /&gt;
* 7 = Custom&lt;br /&gt;
&lt;br /&gt;
==Resource Types==&lt;br /&gt;
* 0 = Ore&lt;br /&gt;
* 1 = Gas&lt;br /&gt;
* 2 = Ore and Gas&lt;br /&gt;
&lt;br /&gt;
==Alliance Statuses==&lt;br /&gt;
* 0 = Enemy&lt;br /&gt;
* 1 = Ally&lt;br /&gt;
* 2 = Allied Victory&lt;br /&gt;
&lt;br /&gt;
==Unit Orders==&lt;br /&gt;
* 0 = Move&lt;br /&gt;
* 1 = Patrol&lt;br /&gt;
* 2 = Attack&lt;br /&gt;
&lt;br /&gt;
==Action States==&lt;br /&gt;
* 4 = Enabled/Set switch&lt;br /&gt;
* 5  = Disabled/Clear switch&lt;br /&gt;
* 6 = Toggle/Toggle switch&lt;br /&gt;
* 11 = Randomize switch&lt;br /&gt;
&lt;br /&gt;
==Number Modifiers==&lt;br /&gt;
* 7 = Set to&lt;br /&gt;
* 8 = Add&lt;br /&gt;
* 9 = Subtract&lt;br /&gt;
&lt;br /&gt;
==Trigger Unit Types==&lt;br /&gt;
* All normal units (0-227)&lt;br /&gt;
* 228 = None&lt;br /&gt;
* 229 = Any unit&lt;br /&gt;
* 230 = Men&lt;br /&gt;
* 231 = Buildings&lt;br /&gt;
* 232 = Factories&lt;br /&gt;
&lt;br /&gt;
==List of Players/Group IDs==&lt;br /&gt;
* 0 = Player 1&lt;br /&gt;
* 1 = Player 2&lt;br /&gt;
* 2 = Player 3&lt;br /&gt;
* 3 = Player 4&lt;br /&gt;
* 4 = Player 5&lt;br /&gt;
* 5 = Player 6&lt;br /&gt;
* 6 = Player 7&lt;br /&gt;
* 7 = Player 8&lt;br /&gt;
* 8 = Player 9&lt;br /&gt;
* 9 = Player 10&lt;br /&gt;
* 10 = Player 11&lt;br /&gt;
* 11 = Player 12&lt;br /&gt;
* 12 = None (Unused, One-entry Overflow in some cases)&lt;br /&gt;
* 13 = Current Player&lt;br /&gt;
* 14 = Foes&lt;br /&gt;
* 15 = Allies&lt;br /&gt;
* 16 = Neutral Players&lt;br /&gt;
* 17 = All Players&lt;br /&gt;
* 18 = Force 1&lt;br /&gt;
* 19 = Force 2&lt;br /&gt;
* 20 = Force 3&lt;br /&gt;
* 21 = Force 4&lt;br /&gt;
* 22 = Unused 1&lt;br /&gt;
* 23 = Unused 2&lt;br /&gt;
* 24 = Unused 3&lt;br /&gt;
* 25 = Unused 4&lt;br /&gt;
* 26 = Non Allied Victory Players&lt;br /&gt;
&lt;br /&gt;
==List of Technology IDs==&lt;br /&gt;
* 0 = Stim Packs&lt;br /&gt;
* 1 = Lockdown&lt;br /&gt;
* 2 = EMP Shockwave&lt;br /&gt;
* 3 = Spider Mines&lt;br /&gt;
* 4 = Scanner Sweep&lt;br /&gt;
* 5 = Siege Mode&lt;br /&gt;
* 6 = Defensive Matrix&lt;br /&gt;
* 7 = Irradiate&lt;br /&gt;
* 8 = Yamato Gun&lt;br /&gt;
* 9 = Cloaking Field&lt;br /&gt;
* 10 = Personnel Cloaking&lt;br /&gt;
* 11 = Burrowing&lt;br /&gt;
* 12 = Infestation&lt;br /&gt;
* 13 = Spawn Broodling&lt;br /&gt;
* 14 = Dark Swarm&lt;br /&gt;
* 15 = Plague&lt;br /&gt;
* 16 = Consume&lt;br /&gt;
* 17 = Ensnare&lt;br /&gt;
* 18 = Parasite&lt;br /&gt;
* 19 = Psionic Storm&lt;br /&gt;
* 20 = Hallucination&lt;br /&gt;
* 21 = Recall&lt;br /&gt;
* 22 = Stasis Field&lt;br /&gt;
* 23 = Archon Warp&lt;br /&gt;
* 24 = Restoration&lt;br /&gt;
* 25 = Disruption Web&lt;br /&gt;
* 26 = Unused 26&lt;br /&gt;
* 27 = Mind Control&lt;br /&gt;
* 28 = Dark Archon Meld&lt;br /&gt;
* 29 = Feedback&lt;br /&gt;
* 30 = Optical Flare&lt;br /&gt;
* 31 = Maelstorm&lt;br /&gt;
* 32 = Lurker Aspect&lt;br /&gt;
* 33 = Unused 33&lt;br /&gt;
* 34 = Healing&lt;br /&gt;
* 35 = Unused 35&lt;br /&gt;
* 36 = Unused 36&lt;br /&gt;
* 37 = Unused 37&lt;br /&gt;
* 38 = Unused 38&lt;br /&gt;
* 39 = Unused 39&lt;br /&gt;
* 40 = Unused 40&lt;br /&gt;
* 41 = Unused 41&lt;br /&gt;
* 42 = Unused 42&lt;br /&gt;
* 43 = Unused 43&lt;br /&gt;
&lt;br /&gt;
==List of Upgrade IDs==&lt;br /&gt;
* 0 = Terran Infantry Armor&lt;br /&gt;
* 1 = Terran Vehicle Plating&lt;br /&gt;
* 2 = Terran Ship Plating&lt;br /&gt;
* 3 = Zerg Carapace&lt;br /&gt;
* 4 = Zerg Flyer Caparace&lt;br /&gt;
* 5 = Protoss Armor&lt;br /&gt;
* 6 = Protoss Plating&lt;br /&gt;
* 7 = Terran Infantry Weapons&lt;br /&gt;
* 8 = Terran Vehicle Weapons&lt;br /&gt;
* 9 = Terran Ship Weapons&lt;br /&gt;
* 10 = Zerg Melee Attacks&lt;br /&gt;
* 11 = Zerg Missile Attacks&lt;br /&gt;
* 12 = Zerg Flyer Attacks&lt;br /&gt;
* 13 = Protoss Ground Weapons&lt;br /&gt;
* 14 = Protoss Air Weapons&lt;br /&gt;
* 15 = Protoss Plasma Shields&lt;br /&gt;
* 16 = U-238 Shells&lt;br /&gt;
* 17 = Ion Thrusters&lt;br /&gt;
* 18 = Burst Lasers (Unused)&lt;br /&gt;
* 19 = Titan Reactor (SV +50)&lt;br /&gt;
* 20 = Ocular Implants&lt;br /&gt;
* 21 = Moebius Reactor (Ghost +50)&lt;br /&gt;
* 22 = Apollo Reactor (Wraith +50)&lt;br /&gt;
* 23 = Colossus Reactor (BC +50)&lt;br /&gt;
* 24 = Ventral Sacs&lt;br /&gt;
* 25 = Antennae&lt;br /&gt;
* 26 = Pneumatized Carapace&lt;br /&gt;
* 27 = Metabolic Boost&lt;br /&gt;
* 28 = Adrenal Glands&lt;br /&gt;
* 29 = Muscular Augments&lt;br /&gt;
* 30 = Grooved Spines&lt;br /&gt;
* 31 = Gamete Meiosis (Queen +50)&lt;br /&gt;
* 32 = Metasynaptic Node (Defiler +50)&lt;br /&gt;
* 33 = Singularity Charge&lt;br /&gt;
* 34 = Leg Enhancements&lt;br /&gt;
* 35 = Scarab Damage &lt;br /&gt;
* 36 = Reaver Capacity &lt;br /&gt;
* 37 = Gravitic Drive&lt;br /&gt;
* 38 = Sensor Array&lt;br /&gt;
* 39 = Gravitic Boosters&lt;br /&gt;
* 40 = Khaydarin Amulet (HT +50)&lt;br /&gt;
* 41 = Apial Sensors&lt;br /&gt;
* 42 = Gravitic Thrusters&lt;br /&gt;
* 43 = Carrier Capacity&lt;br /&gt;
* 44 = Khaydarin Core (Arbiter +50)&lt;br /&gt;
* 45 = Unknown Upgrade45&lt;br /&gt;
* 46 = Unknown Upgrade46&lt;br /&gt;
* 47 = Argus Jewel (Corsair +50)&lt;br /&gt;
* 48 = Unknown Upgrade48&lt;br /&gt;
* 49 = Argus Talisman (DA +50)&lt;br /&gt;
* 50 = Unknown Upgrade50&lt;br /&gt;
* 51 = Caduceus Reactor (Medic +50)&lt;br /&gt;
* 52 = Chitinous Plating&lt;br /&gt;
* 53 = Anabolic Synthesis&lt;br /&gt;
* 54 = Charon Booster&lt;br /&gt;
* 55 = Unknown Upgrade55&lt;br /&gt;
* 56 = Unknown Upgrade56&lt;br /&gt;
* 57 = Unknown Upgrade57&lt;br /&gt;
* 58 = Unknown Upgrade58&lt;br /&gt;
* 59 = Unknown Upgrade59&lt;br /&gt;
* 60 = Unknown Upgrade60&lt;br /&gt;
&lt;br /&gt;
==List of Unit Weapon IDs==&lt;br /&gt;
* 0 = Gauss Rifle (Normal)&lt;br /&gt;
* 1 = Gauss Rifle (Jim Raynor-Marine)&lt;br /&gt;
* 2 = C-10 Concussion Rifle (Normal)&lt;br /&gt;
* 3 = C-10 Concussion Rifle (Sarah Kerrigan)&lt;br /&gt;
* 4 = Fragmentation Grenade (Normal)&lt;br /&gt;
* 5 = Fragmentation Grenade (Jim Raynor-Vulture)&lt;br /&gt;
* 6 = Spider Mines&lt;br /&gt;
* 7 = Twin Autocannons (Normal)&lt;br /&gt;
* 8 = Hellfire Missile Pack (Normal)&lt;br /&gt;
* 9 = Twin Autocannons (Alan Schezar)&lt;br /&gt;
* 10 = Hellfire Missile Pack (Alan Schezar)&lt;br /&gt;
* 11 = Arclite Cannon (Normal)&lt;br /&gt;
* 12 = Arclite Cannon (Edmund Duke)&lt;br /&gt;
* 13 = Fusion Cutter&lt;br /&gt;
* 14 = Fusion Cutter (Harvest)&lt;br /&gt;
* 15 = Gemini Missiles (Normal)&lt;br /&gt;
* 16 = Burst Lasers (Normal)&lt;br /&gt;
* 17 = Gemini Missiles (Tom Kazansky)&lt;br /&gt;
* 18 = Burst Lasers (Tom Kazansky)&lt;br /&gt;
* 19 = ATS Laser Battery (Normal)&lt;br /&gt;
* 20 = ATA Laser Battery (Normal)&lt;br /&gt;
* 21 = ATS Laser Battery (Norad II+Mengsk+DuGalle)&lt;br /&gt;
* 22 = ATA Laser Battery (Norad II+Mengsk+DuGalle)&lt;br /&gt;
* 23 = ATS Laser Battery (Hyperion)&lt;br /&gt;
* 24 = ATA Laser Battery (Hyperion)&lt;br /&gt;
* 25 = Flame Thrower (Normal)&lt;br /&gt;
* 26 = Flame Thrower (Gui Montag)&lt;br /&gt;
* 27 = Arclite Shock Cannon (Normal)&lt;br /&gt;
* 28 = Arclite Shock Cannon (Edmund Duke)&lt;br /&gt;
* 29 = Longbolt Missiles&lt;br /&gt;
* 30 = Yamato Gun&lt;br /&gt;
* 31 = Nuclear Missile&lt;br /&gt;
* 32 = Lockdown&lt;br /&gt;
* 33 = EMP Shockwave&lt;br /&gt;
* 34 = Irradiate&lt;br /&gt;
* 35 = Claws (Normal)&lt;br /&gt;
* 36 = Claws (Devouring One)&lt;br /&gt;
* 37 = Claws (Infested Kerrigan)&lt;br /&gt;
* 38 = Needle Spines (Normal)&lt;br /&gt;
* 39 = Needle Spines (Hunter Killer)&lt;br /&gt;
* 40 = Kaiser Blades (Normal)&lt;br /&gt;
* 41 = Kaiser Blades (Torrasque)&lt;br /&gt;
* 42 = Toxic Spores (Broodling)&lt;br /&gt;
* 43 = Spines&lt;br /&gt;
* 44 = Spines (Harvest)&lt;br /&gt;
* 45 = Acid Spray (Unused)&lt;br /&gt;
* 46 = Acid Spore (Normal)&lt;br /&gt;
* 47 = Acid Spore (Kukulza-Guardian)&lt;br /&gt;
* 48 = Glave Wurm (Normal)&lt;br /&gt;
* 49 = Glave Wurm (Kukulza-Mutalisk)&lt;br /&gt;
* 50 = Venom (Unused-Defiler)&lt;br /&gt;
* 51 = Venom (Unused-Defiler Hero)&lt;br /&gt;
* 52 = Seeker Spores&lt;br /&gt;
* 53 = Subterranean Tentacle&lt;br /&gt;
* 54 = Suicide (Infested Terran)&lt;br /&gt;
* 55 = Suicide (Scourge)&lt;br /&gt;
* 56 = Parasite&lt;br /&gt;
* 57 = Spawn Broodlings&lt;br /&gt;
* 58 = Ensnare&lt;br /&gt;
* 59 = Dark Swarm&lt;br /&gt;
* 60 = Plague&lt;br /&gt;
* 61 = Consume&lt;br /&gt;
* 62 = Particle Beam&lt;br /&gt;
* 63 = Particle Beam (Harvest)&lt;br /&gt;
* 64 = Psi Blades (Normal)&lt;br /&gt;
* 65 = Psi Blades (Fenix-Zealot)&lt;br /&gt;
* 66 = Phase Disruptor (Normal)&lt;br /&gt;
* 67 = Phase Disruptor (Fenix-Dragoon)&lt;br /&gt;
* 68 = Psi Assault (Normal-Unused)&lt;br /&gt;
* 69 = Psi Assault (Tassadar+Aldaris)&lt;br /&gt;
* 70 = Psionic Shockwave (Normal)&lt;br /&gt;
* 71 = Psionic Shockwave (Tassadar/Zeratul Archon)&lt;br /&gt;
* 72 = Unknown72&lt;br /&gt;
* 73 = Dual Photon Blasters (Normal)&lt;br /&gt;
* 74 = Anti-matter Missiles (Normal)&lt;br /&gt;
* 75 = Dual Photon Blasters (Mojo)&lt;br /&gt;
* 76 = Anit-matter Missiles (Mojo)&lt;br /&gt;
* 77 = Phase Disruptor Cannon (Normal)&lt;br /&gt;
* 78 = Phase Disruptor Cannon (Danimoth)&lt;br /&gt;
* 79 = Pulse Cannon&lt;br /&gt;
* 80 = STS Photon Cannon&lt;br /&gt;
* 81 = STA Photon Cannon&lt;br /&gt;
* 82 = Scarab&lt;br /&gt;
* 83 = Stasis Field&lt;br /&gt;
* 84 = Psi Storm&lt;br /&gt;
* 85 = Warp Blades (Zeratul)&lt;br /&gt;
* 86 = Warp Blades (Dark Templar Hero)&lt;br /&gt;
* 87 = Missiles (Unused)&lt;br /&gt;
* 88 = Laser Battery1 (Unused)&lt;br /&gt;
* 89 = Tormentor Missiles (Unused)&lt;br /&gt;
* 90 = Bombs (Unused)&lt;br /&gt;
* 91 = Raider Gun (Unused)&lt;br /&gt;
* 92 = Laser Battery2 (Unused)&lt;br /&gt;
* 93 = Laser Battery3 (Unused)&lt;br /&gt;
* 94 = Dual Photon Blasters (Unused)&lt;br /&gt;
* 95 = Flechette Grenade (Unused)&lt;br /&gt;
* 96 = Twin Autocannons (Floor Trap)&lt;br /&gt;
* 97 = Hellfire Missile Pack (Wall Trap)&lt;br /&gt;
* 98 = Flame Thrower (Wall Trap)&lt;br /&gt;
* 99 = Hellfire Missile Pack (Floor Trap)&lt;br /&gt;
* 100 = Neutron Flare&lt;br /&gt;
* 101 = Disruption Web&lt;br /&gt;
* 102 = Restoration&lt;br /&gt;
* 103 = Halo Rockets&lt;br /&gt;
* 104 = Corrosive Acid&lt;br /&gt;
* 105 = Mind Control&lt;br /&gt;
* 106 = Feedback&lt;br /&gt;
* 107 = Optical Flare&lt;br /&gt;
* 108 = Maelstrom&lt;br /&gt;
* 109 = Subterranean Spines&lt;br /&gt;
* 110 = Gauss Rifle0 (Unused)&lt;br /&gt;
* 111 = Warp Blades (Normal)&lt;br /&gt;
* 112 = C-10 Concussion Rifle (Samir Duran)&lt;br /&gt;
* 113 = C-10 Concussion Rifle (Infested Duran)&lt;br /&gt;
* 114 = Dual Photon Blasters (Artanis)&lt;br /&gt;
* 115 = Anti-matter Missiles (Artanis)&lt;br /&gt;
* 116 = C-10 Concussion Rifle (Alexei Stukov)&lt;br /&gt;
* 117 = Gauss Rifle1 (Unused)&lt;br /&gt;
* 118 = Gauss Rifle2 (Unused)&lt;br /&gt;
* 119 = Gauss Rifle3 (Unused)&lt;br /&gt;
* 120 = Gauss Rifle4 (Unused)&lt;br /&gt;
* 121 = Gauss Rifle5 (Unused)&lt;br /&gt;
* 122 = Gauss Rifle6 (Unused)&lt;br /&gt;
* 123 = Gauss Rifle7 (Unused)&lt;br /&gt;
* 124 = Gauss Rifle8 (Unused)&lt;br /&gt;
* 125 = Gauss Rifle9 (Unused)&lt;br /&gt;
* 126 = Gauss Rifle10 (Unused)&lt;br /&gt;
* 127 = Gauss Rifle11 (Unused)&lt;br /&gt;
* 128 = Gauss Rifle12 (Unused)&lt;br /&gt;
* 129 = Gauss Rifle13 (Unused)&lt;br /&gt;
* 130 = None&lt;br /&gt;
&lt;br /&gt;
==Complete Modifier List==&lt;br /&gt;
* 0 = Condition: &amp;gt;= (greater than or equal to)&lt;br /&gt;
* 1 = Condition: &amp;lt;= (less than or equal to)&lt;br /&gt;
* 2 = Condition: == TRUE (Is True)&lt;br /&gt;
* 3 = Condition: == FALSE (Is False)&lt;br /&gt;
* 4 = Action: = TRUE (Set to True)&lt;br /&gt;
* 5 = Action: = FALSE (Set to False)&lt;br /&gt;
* 6 = Action: NOT (toggle)&lt;br /&gt;
* 7 = Action: = (Set to)&lt;br /&gt;
* 8 = Action: += (Add)&lt;br /&gt;
* 9 = Action: -= (Subtract)&lt;br /&gt;
* 10 = Condition: == (Exactly)&lt;br /&gt;
* 11 = Action: Randomize&lt;br /&gt;
&lt;br /&gt;
[[Category:StarCraft]]&lt;br /&gt;
[[Category:Reference]]&lt;/div&gt;</summary>
		<author><name>FaRTy1billion</name></author>	</entry>

	<entry>
		<id>https://staredit.net/wiki/index.php?title=Scenario.chk&amp;diff=644</id>
		<title>Scenario.chk</title>
		<link rel="alternate" type="text/html" href="https://staredit.net/wiki/index.php?title=Scenario.chk&amp;diff=644"/>
				<updated>2020-10-22T06:04:52Z</updated>
		
		<summary type="html">&lt;p&gt;FaRTy1billion: /* &amp;quot;TRIG&amp;quot; - Triggers */ Clarified bit 4 flag for &amp;quot;Offset + Mask&amp;quot; EUDs.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The CHK file is a very dense file found inside the SCM or SCX file (as &amp;quot;staredit\scenario.chk&amp;quot;), which is just a renamed MPQ archive.&lt;br /&gt;
&lt;br /&gt;
In this article, some shorthand will be used for datatypes:&lt;br /&gt;
* '''u8''' for an unsigned byte&lt;br /&gt;
* '''u16''' for an unsigned short (2-byte integer)&lt;br /&gt;
* '''u32''' for an unsigned int (4-byte integer)&lt;br /&gt;
* '''uT[''a'']''' for an array of datatype '''T''' (8, 16, 32) with '''''a''''' number of elements&lt;br /&gt;
* '''uT[''a''][''b'']''' for a two-dimensional array of datatype '''T''', where each element of '''T[''a'']''' will be an array of size '''''b'''''&lt;br /&gt;
&lt;br /&gt;
=Sections=&lt;br /&gt;
The CHK is split into several named chunks (hence the file extension, an abbreviation of ''CHunK'').&lt;br /&gt;
&lt;br /&gt;
Each section begins with an 8-byte header:&lt;br /&gt;
* '''u32''' Name - A 4-byte string uniquely identifying that chunk's purpose.&lt;br /&gt;
* '''u32''' Size - The size, in bytes, of the chunk (not including this header)&lt;br /&gt;
Followed by as many bytes as 'Size', in a format described below.&lt;br /&gt;
&lt;br /&gt;
Some things to keep in mind about the CHK section:&lt;br /&gt;
* Invalid sections can exist and will be ignored. While Size is unsigned, it can safely be a negative value to read a chunk earlier in the file. This allows for &amp;quot;section stacking&amp;quot;, allowing smaller sections to be placed inside of larger ones or duplicate triggers or units to take less space in the file.&lt;br /&gt;
* All sections will marked &amp;quot;Not required.&amp;quot; are never read by StarCraft and can safely be omitted. However they may or may not be read by StarEdit, and may cause the map to be unreadable in an editor.&lt;br /&gt;
* Note &amp;quot;Hybrid&amp;quot;, or &amp;quot;Enhanced&amp;quot;, maps were introduced in 1.04. They are supported both by Original StarCraft and Brood War and usually contain sections for both types (e.g., UPGS and UPGx, TECS and TECx), but both sections aren't necessarily read.&lt;br /&gt;
* Duplicate sections will overwrite previously defined section data, except where noted. Note this only applies to those section that pass the specified &amp;quot;validation&amp;quot; parameters, as any section that does not successfully validate will be ignored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TYPE&amp;quot; - Map Type==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the type of scenario.&lt;br /&gt;
* '''u32''': Specifies the type of scenario:&lt;br /&gt;
** '''0x53574152''' or '''RAWS''' - 1.04 StarCraft and above (&amp;quot;hybrid&amp;quot;)&lt;br /&gt;
** '''0x42574152''' or '''RAWB''' - Brood War&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;VER &amp;quot; - Format Version==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section identifies the file format version.&lt;br /&gt;
* '''u16''': File format version:&lt;br /&gt;
** '''59''' - 1.00 Starcraft&lt;br /&gt;
** '''63''' - 1.04 Starcraft and above (&amp;quot;hybrid&amp;quot;)&lt;br /&gt;
** '''64''' - Starcraft Remastered&lt;br /&gt;
** '''205''' - Brood War&lt;br /&gt;
** '''206''' - Brood War Remastered&lt;br /&gt;
This is the only version code section to actually be read by StarCraft (of TYPE, VER , IVER, and IVE2). Any other value is invalid in retail StarCraft and is usually a beta version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IVER&amp;quot; - Map Version==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section &amp;quot;additionally identifies&amp;quot; the map version.&lt;br /&gt;
* '''u16''': &amp;quot;Additional file format version:&amp;quot;&lt;br /&gt;
** '''9''' - beta/obsolete versions&lt;br /&gt;
** '''10''' - current versions&lt;br /&gt;
When saving as expansion this section gets removed entirely. Contrary to popular belief, it doesn't get &amp;quot;replaced&amp;quot; by IVE2 in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IVE2&amp;quot; - Map Version==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section &amp;quot;additionally identifies&amp;quot; the map version.&lt;br /&gt;
* '''u16''': &amp;quot;Additional file format version:&amp;quot;&lt;br /&gt;
** '''11''' - 1.04 StarCraft and above (&amp;quot;hybrid&amp;quot;) or Brood War.&lt;br /&gt;
This section does not &amp;quot;replace&amp;quot; IVER in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;VCOD&amp;quot; - Verification Code==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be equal to size of the VCOD data in the EXE resource. Must result in valid checksum.''&lt;br /&gt;
&lt;br /&gt;
This section has a verification code to make sure this is actually a CHK file.&lt;br /&gt;
&lt;br /&gt;
* '''u32[256]''': Seed values.&lt;br /&gt;
* '''u8[16]''': Operation codes to produce the resulting hash:&lt;br /&gt;
** '''00''' - XOR's the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''01''' - Adds to the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''02''' - Subtracts from the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''03''' - XOR's the current hash with the VCOD table at index OWNR, SIDE, FORC, and 0&lt;br /&gt;
** '''04''' - same as 0x03&lt;br /&gt;
** '''05''' - same as 0x03&lt;br /&gt;
** '''06''' - Complex function consisting of ORs and shifts&lt;br /&gt;
** '''07''' - Inverted version of 0x06, switching direction of all shifts&lt;br /&gt;
** '''08+''' - Do nothing&lt;br /&gt;
Opcodes and seeds do not have to match those in EXE resource, as long as the same value is produced.&amp;lt;br&amp;gt;&lt;br /&gt;
The only indexes in the seed table that are referenced are those that correspond individual values of [[#&amp;quot;OWNR&amp;quot; - StarCraft Player Types|OWNR]], [[#&amp;quot;SIDE&amp;quot; - Player Races|SIDE]], [[#&amp;quot;FORC&amp;quot; - Force Settings|FORC]] player assignments, and index 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IOWN&amp;quot; - StarEdit Player Types==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the owner of each player.&lt;br /&gt;
* '''u8[12]''': One byte for each player, specifies the owner of the player:&lt;br /&gt;
** '''00''' - Inactive&lt;br /&gt;
** ''01'' - Computer (game)&lt;br /&gt;
** ''02'' - Occupied by Human Player&lt;br /&gt;
** '''03''' - Rescue Passive&lt;br /&gt;
** '''04''' - Unused&lt;br /&gt;
** '''05''' - Computer&lt;br /&gt;
** '''06''' - Human (Open Slot)&lt;br /&gt;
** '''07''' - Neutral&lt;br /&gt;
** ''08'' - Closed slot&lt;br /&gt;
This section is separate from OWNR as a staredit value. Staredit does not display &amp;quot;inactive&amp;quot; as a valid option. Italicized settings denote invalid map options, which may involve a buffer overflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;OWNR&amp;quot; - StarCraft Player Types==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 12 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section designates the controller of a particular player. It is exactly the same as the &amp;quot;IOWN&amp;quot; section, except there is an additional value, 0x00 for Inactive.&lt;br /&gt;
* '''u8[12]''': One byte for each player, specifies the owner of the player:&lt;br /&gt;
** '''00''' - Inactive&lt;br /&gt;
** ''01'' - Computer (game)&lt;br /&gt;
** ''02'' - Occupied by Human Player&lt;br /&gt;
** '''03''' - Rescue Passive&lt;br /&gt;
** '''04''' - Unused&lt;br /&gt;
** '''05''' - Computer&lt;br /&gt;
** '''06''' - Human (Open Slot)&lt;br /&gt;
** '''07''' - Neutral&lt;br /&gt;
** ''08'' - Closed slot&lt;br /&gt;
Italicized settings denote invalid map options, which may involve a buffer overflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;ERA &amp;quot; - Tileset==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section indicates the tileset of the scenario.&lt;br /&gt;
* '''u16''': Designates tileset:&lt;br /&gt;
** '''00''' - Badlands&lt;br /&gt;
** '''01''' - Space Platform&lt;br /&gt;
** '''02''' - Installation&lt;br /&gt;
** '''03''' - Ashworld&lt;br /&gt;
** '''04''' - Jungle&lt;br /&gt;
** '''05''' - Desert&lt;br /&gt;
** '''06''' - Arctic&lt;br /&gt;
** '''07''' - Twilight&lt;br /&gt;
StarCraft masks the tileset indicator's bit value, so bits after the third place (anything after the value &amp;quot;7&amp;quot;) are removed. Thus, 9 (1001 in binary) is interpreted as 1 (0001), 10 (1010) as 2 (0010), etc.&amp;lt;br&amp;gt;&lt;br /&gt;
Desert, Arctic, and Twilight are Brood War-only tilesets.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;DIM &amp;quot; - Map Dimensions==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains the dimensions of the map.&lt;br /&gt;
* '''u16''': Width of the map&lt;br /&gt;
* '''u16''': Height of the map&lt;br /&gt;
The Width/Height of the map is measured in the number of square 32x32p tiles.&amp;lt;br&amp;gt;&lt;br /&gt;
Standard Dimensions are 64, 96, 128, 192, and 256.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SIDE&amp;quot; - Player Races==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 12 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains the species/race of each player.&lt;br /&gt;
* '''u8[12]''': 1 byte per player the species of that player:&lt;br /&gt;
** '''00''' - Zerg&lt;br /&gt;
** '''01''' - Terran&lt;br /&gt;
** '''02''' - Protoss&lt;br /&gt;
** ''03'' - Invalid (Independent)&lt;br /&gt;
** ''04'' - Invalid (Neutral)&lt;br /&gt;
** '''05''' - User Selectable&lt;br /&gt;
** '''06''' - Random (Forced; Acts as a selected race)&lt;br /&gt;
** ''07'' - Inactive&lt;br /&gt;
Italicized settings denote invalid map options. Note Players 9-11 are defaultly Inactive and Player 12 is defaultly Neutral.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MTXM&amp;quot; - StarCraft Terrain==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be less than or equal to 131072 (0x20000) bytes (256 * 256 * 2).''&lt;br /&gt;
&lt;br /&gt;
Terrain section that contains a map of the level's appearance. StarEdit disregards this section and instead uses [[#&amp;quot;TILE&amp;quot; - StarEdit Terrain|TILE]]; it is only used in Starcraft.&lt;br /&gt;
* '''u16[map width * height]''': one integer for each tile.&lt;br /&gt;
Notes about MTXM:&lt;br /&gt;
* The Width/Height of the map is measured in the number of square 32x32p tiles.&lt;br /&gt;
* Tiles in this section are listed from left to right, top to bottom.&lt;br /&gt;
* The values for each integer are their respective &amp;quot;MegaTile&amp;quot; values in the scenario's tileset. If the size of this section is greater than width*height*2, the data following is ignored. If the size of this section is less, the resulting tiles that have not been defined will be null tiles.&lt;br /&gt;
* This section includes doodads as terrain; TILE, which is otherwise identical, doesn't. Out of the terrain sections (TILE, ISOM, and MTXM), SC only reads MTXM for the sake of not having to generate this data on-the-fly: it contains the exact representation of the level's appearance, including doodads. TILE, on the other hand, is directly tied via a tile lookup function to ISOM, and exists for the sake of not having to generate tiles from ISOM on-the-fly in StarEdit.&lt;br /&gt;
* If MTXM section is smaller than (map width*height), then the remaining tiles will be filled with null tiles or tiles specified by previous MTXM sections.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PUNI&amp;quot; - Player Unit Restrictions==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 5700 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains player unit restrictions: it indicates whether the player can or cannot build a particular unit.&lt;br /&gt;
* '''u8[228][12]''': 1 byte for each unit in order of its unit id, then each player, for player availability:&lt;br /&gt;
** '''00''' - That unit is not available for production if the player has 'override defaults' on&lt;br /&gt;
** '''01''' - That unit is available for production if the player has 'override defaults' on&lt;br /&gt;
* '''u8[228]''': 1 byte for each unit in order of it's unit id, for global availability defaults (for all players):&lt;br /&gt;
** '''00''' - That unit is not available for production&lt;br /&gt;
** '''01''' - That unit is available for production&lt;br /&gt;
* '''u8[228][12]''': 1 byte for each unit in order of its unit id, then each player, indicating whether a player uses the global availability defaults.&lt;br /&gt;
** '''00''' - Player overrides defaults for this unit&lt;br /&gt;
** '''01''' - Player uses defaults for this unit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGR&amp;quot; - Upgrade Restrictions==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1748 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;PUPx&amp;quot; - BW Upgrade Restrictions|&amp;quot;PUPx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains player upgrade restrictions: it indicates the starting/maximum levels at/to which a player can perform a particular upgrade.&lt;br /&gt;
* '''u8[46][12]''': 1 byte for the maximum level a player can upgrade to, in order of its upgrade id, then each player&lt;br /&gt;
* '''u8[46][12]''': 1 byte for the level of an upgrade a player starts off with, in order of its upgrade id, then each player&lt;br /&gt;
* '''u8[46]''': 1 byte for the global default maximum level of each upgrade, in order of its upgrade id.&lt;br /&gt;
* '''u8[46]''': 1 byte for the global default starting level of each upgrade, in order of its upgrade id.&lt;br /&gt;
* '''u8[46][12]''': 1 byte for each upgrade in order of its upgrade id, then each player, indicating whether a player uses the global upgrade defaults:&lt;br /&gt;
** '''00''' - Player does not use global upgrade defaults for this upgrade&lt;br /&gt;
** '''01''' - Player uses upgrade defaults for this upgrade&lt;br /&gt;
See [[#List of Upgrade IDs]].&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PTEC&amp;quot; - Tech Restrictions==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 912 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;PTEx&amp;quot; - BW Tech Restrictions|&amp;quot;PTEx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains player technology availability restrictions: it indicates whether a player starts off with a particular technology or can research a particular technology.&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology id, then each player, for player availability:&lt;br /&gt;
** '''00''' - Technology is not available for a player&lt;br /&gt;
** '''01''' - Technology is available for a player&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology id, then each player, for &amp;quot;already researched&amp;quot; status:&lt;br /&gt;
** '''00''' - Technology is not already researched&lt;br /&gt;
** '''01''' - Technology is already researched&lt;br /&gt;
* '''u8[24]''': 1 byte for each technology for global availability defaults:&lt;br /&gt;
** '''00''' - Technology is not available by default&lt;br /&gt;
** '''01''' - Technology is available by default&lt;br /&gt;
* '''u8[24]''': 1 byte for each technology for global &amp;quot;already researched&amp;quot; defaults:&lt;br /&gt;
** '''00''' - Technology is not already researched by default&lt;br /&gt;
** '''01''' - Technology is already researched by default&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology in order of its technology id, then each player, indicating whether a player uses the global defaults:&lt;br /&gt;
** '''00''' - Technology overrides defaults for player&lt;br /&gt;
** '''01''' - Technology uses default settings for player&lt;br /&gt;
See [[#List of Technology IDs]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIT&amp;quot; - Placed Units==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 36 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the pre-placed units on the map and their properties. Each unit on the map gets the following structure:&lt;br /&gt;
* '''u32''': The unit's class instance (sort of a &amp;quot;serial number&amp;quot;)&lt;br /&gt;
* U16''': X coordinate of unit&lt;br /&gt;
* U16''': Y coordinate of unit&lt;br /&gt;
* '''u16''': Unit ID&lt;br /&gt;
* '''u16''': Type of relation to another building (i.e. add-on, nydus link)&lt;br /&gt;
** '''Bit 9''' - Nydus Link&lt;br /&gt;
** '''Bit 10''' - Addon Link&lt;br /&gt;
* '''u16''': Flags of special properties which can be applied to the unit and are valid:&lt;br /&gt;
** '''Bit 0''' - Cloak is valid&lt;br /&gt;
** '''Bit 1''' - Burrow is valid&lt;br /&gt;
** '''Bit 2''' - In transit is valid&lt;br /&gt;
** '''Bit 3''' - Hallucinated is valid&lt;br /&gt;
** '''Bit 4''' - Invincible is valid&lt;br /&gt;
** '''Bit 5-15''' - Unused&lt;br /&gt;
* '''u16''': Out of the elements of the unit data, the properties which can be changed by the map maker:&lt;br /&gt;
** '''Bit 0''' - Owner player is valid (the unit is not a critter, start location, etc.; not a neutral unit)&lt;br /&gt;
** '''Bit 1''' - HP is valid&lt;br /&gt;
** '''Bit 2''' - Shields is valid&lt;br /&gt;
** '''Bit 3''' - Energy is valid (unit is a wraith, etc.)&lt;br /&gt;
** '''Bit 4''' - Resource amount is valid (unit is a mineral patch, vespene geyser, etc.)&lt;br /&gt;
** '''Bit 5''' - Amount in hangar is valid (unit is a reaver, carrier, etc.)&lt;br /&gt;
** '''Bit 6-15''' - Unused&lt;br /&gt;
* '''u8''': Player number of owner (0-based)&lt;br /&gt;
* '''u8''': Hit points % (1-100)&lt;br /&gt;
* '''u8''': Shield points % (1-100)&lt;br /&gt;
* '''u8''': Energy points % (1-100)&lt;br /&gt;
* '''u32''': Resource amount&lt;br /&gt;
* '''u16''': Number of units in hangar&lt;br /&gt;
* '''u16''': Unit state flags&lt;br /&gt;
** '''Bit 0''' - Unit is cloaked&lt;br /&gt;
** '''Bit 1''' - Unit is burrowed&lt;br /&gt;
** '''Bit 2''' - Building is in transit&lt;br /&gt;
** '''Bit 3''' - Unit is hallucinated&lt;br /&gt;
** '''Bit 4''' - Unit is invincible&lt;br /&gt;
** '''Bit 5-15''' - Unused&lt;br /&gt;
* '''u32''': Unused&lt;br /&gt;
* '''u32''': Class instance of the unit to which this unit is related to (i.e. via an add-on, nydus link, etc.). It is &amp;quot;0&amp;quot; if the unit is not linked to any other unit.&lt;br /&gt;
Notes about UNIT:&lt;br /&gt;
* The X/Y coordinates are the center of the sprite of the unit (in pixels).&lt;br /&gt;
* Please edit if you could confirm the bit values to be correct/if you know more bit values.&lt;br /&gt;
* Default values will apply if bit values are unchecked. Defaults: 100% HP, 100% SP, 100% EP, 0 resources, 0 hangar count.&lt;br /&gt;
* This section can be split. Additional UNIT sections will add more units.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;ISOM&amp;quot; - Isometric Terrain==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section is required to place isometric terrain on the map. It provides data about the nature of the isometrical &amp;quot;diamonds&amp;quot; (the editing mode of StarEdit).&lt;br /&gt;
* '''u16[ (width / 2 + 1) * (height + 1) * 4 ]''': 4 integers for each map rectangle tile (plus one extra tile to the right and bottom of the map), as per the RECT structure. Each rectangle border (left, top, right, bottom) is assigned an &amp;quot;ISOM value.&amp;quot; These form the &amp;quot;diamond&amp;quot; pattern of the map, and each rectangle thus gets two ISOM values associated with it. StarEdit somehow hashes these (the exact algorithm is unknown) and thus produces the tile index of the rectangle (which it stores in TILE for reasons of efficiency). The index of the rectangle's right tile is that of its left tile + 16.&lt;br /&gt;
This section is the only truly unknown section of the .chk format. If you're an ex-Blizzard employee or SI, please edit this section. If you have additional research, post on the forums about it and/or edit this section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TILE&amp;quot; - StarEdit Terrain==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section will only be different from the [[#&amp;quot;MTXM&amp;quot; - StarCraft Terrain|MTXM]] section in tiles where doodads are present.&lt;br /&gt;
* '''u16[ map width * height ]''': 1 integer for each map tile. Moves horizontally across the map.&lt;br /&gt;
The values in TILE are normally directly generated from the ISOM section (see &amp;quot;'ISOM' section&amp;quot; above), and thus do not match that of MTXM on doodad tiles.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;DD2 &amp;quot; - StarEdit Sprites (Doodads)==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section contains the doodad map of the level. There are several parts to doodads. The graphical portion is stored in the [[#&amp;quot;MTXM&amp;quot; - StarCraft Terrain|MTXM]] section. The second part of the doodad is stored in this section. This section is only used by the map editor.&lt;br /&gt;
&lt;br /&gt;
Each doodad in the map gets the following structure:&lt;br /&gt;
* '''u16''': Number of the doodad. Size of the doodad is dependent on this. Doodads are different for each tileset.&lt;br /&gt;
* '''u16''': X coordinate of the doodad unit&lt;br /&gt;
* '''u16''': Y coordinate of the doodad unit&lt;br /&gt;
* '''u8''': Player number that owns the doodad&lt;br /&gt;
* '''u8''': Enabled flag&lt;br /&gt;
** '''00''' - Doodad is enabled (trap can attack, door is closed, etc)&lt;br /&gt;
** '''01''' - Doodad is disabled&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;THG2&amp;quot; - StarCraft Sprites==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 10 bytes.''&lt;br /&gt;
&lt;br /&gt;
The map editor only writes to this section. Starcraft uses this section.&lt;br /&gt;
&lt;br /&gt;
Sprites, usually on doodads, get the following structure.&lt;br /&gt;
* '''u16''': Unit/Sprite number of the sprite&lt;br /&gt;
* '''u16''': X coordinate of the doodad unit&lt;br /&gt;
* '''u16''': Y coordinate of the doodad unit&lt;br /&gt;
* '''u8''': Player number that owns the doodad&lt;br /&gt;
* '''u8''': Unused&lt;br /&gt;
* '''u16''': Flags&lt;br /&gt;
** '''Bit 0-11''' - Unused&lt;br /&gt;
** '''Bit 12''' - Draw as sprite (Determines if it is a sprite or a unit sprite)&lt;br /&gt;
** '''Bit 13''' - Unused&lt;br /&gt;
** '''Bit 14''' - Unused&lt;br /&gt;
** '''Bit 15''' - Disabled (Only valid if Draw as sprite is unchecked, disables the unit)&lt;br /&gt;
This section can be split. Additional THG2 sections will add more sprites.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MASK&amp;quot; - Fog of War Layer==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: This section will always validate.''&lt;br /&gt;
&lt;br /&gt;
This section contains the data on fog of war for each player. This is whether at the start of the game that levels of black space that is available.&lt;br /&gt;
* '''u8[ map width * height ]''': One byte for each map tile. The bits indicate for each player the fog of war.&lt;br /&gt;
** '''Bit 0''' - Player 1's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 1''' - Player 2's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 2''' - Player 3's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 3''' - Player 4's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 4''' - Player 5's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 5''' - Player 6's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 6''' - Player 7's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 7''' - Player 8's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
Any size greater than width*height will be ignored. Any size less will default missing tiles to 0xFF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;STR &amp;quot; - String Data==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be at least 1 byte.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the strings in the map.&lt;br /&gt;
* '''u16''': Number of strings in the section (Default''': 1024)&lt;br /&gt;
* '''u16[Number of strings]''': 1 integer for each string specifying the offset (the spot where the string starts in the section from the start of it).&lt;br /&gt;
* '''Strings''': After the offsets, this is where every string in the map goes, one after another. Each one is terminated by a null character.&lt;br /&gt;
This section can contain more or less then 1024 string offsests and will work in Starcraft.&amp;lt;br&amp;gt;&lt;br /&gt;
By default the first byte in '''Strings''' is a NUL character, and all unused offsets in the STR section point to this NUL character.&lt;br /&gt;
Note that STR sections can be stacked in a smiliar fashion as MTXM. The exact mechanisms of this are uncertain.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPRP&amp;quot; - CUWP Slots==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1280 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section is used whenever the create units with properties trigger is used. Since a slot has to be assigned to the action, this is where each slot is designated.&lt;br /&gt;
&lt;br /&gt;
There are 64 of the following structures regardless of how many are used and it cannot exceed 64.&lt;br /&gt;
* '''u16''': Flag of which special properties can be applied to unit, and are valid.&lt;br /&gt;
** '''Bit 0''' - Cloak bit is valid&lt;br /&gt;
** '''Bit 1''' - Burrowed bit is valid&lt;br /&gt;
** '''Bit 2''' - In transit bit is valid&lt;br /&gt;
** '''Bit 3''' - Hallucinated bit is valid&lt;br /&gt;
** '''Bit 4''' - Invincible bit is valid&lt;br /&gt;
** '''Bit 5-15''' - Unknown/unused&lt;br /&gt;
* '''u16''': Which elements of the unit data are valid, which properties can be changed by the map maker.&lt;br /&gt;
** '''Bit 0''' - Owner player is valid (unit is not neutral)&lt;br /&gt;
** '''Bit 1''' - HP is valid&lt;br /&gt;
** '''Bit 2''' - Shields is valid&lt;br /&gt;
** '''Bit 3''' - Energy is valid&lt;br /&gt;
** '''Bit 4''' - Resource amount is valid (unit is a resource)&lt;br /&gt;
** '''Bit 5''' - Amount in hanger is valid&lt;br /&gt;
** '''Bit 6''' - Unknown/unused&lt;br /&gt;
* '''u8''': Player number that owns unit. Will always be NULL in this section (0)&lt;br /&gt;
* '''u8''': Hit point % (1-100)&lt;br /&gt;
* '''u8''': Shield point % (1-100)&lt;br /&gt;
* '''u8''': Energy point % (1-100)&lt;br /&gt;
* '''u32''': Resource amount (for resources only)&lt;br /&gt;
* '''u16''': # of units in hangar&lt;br /&gt;
* '''u16''': Flags&lt;br /&gt;
** '''Bit 0''' - Unit is cloaked&lt;br /&gt;
** '''Bit 1''' - Unit is burrowed&lt;br /&gt;
** '''Bit 2''' - Building is in transit&lt;br /&gt;
** '''Bit 3''' - Unit is hallucinated&lt;br /&gt;
** '''Bit 4''' - Unit is invincible&lt;br /&gt;
** '''Bit 5-15''' - Unknown/unused&lt;br /&gt;
* '''u32''': Unknown/unused. Padding?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPUS&amp;quot; - CUWP Slots Used==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section goes along with the &amp;quot;UPRP&amp;quot; section. This section just indicates which of the 64 unit properties slot are used.&lt;br /&gt;
* '''u8[64]''': 1 byte for each trigger unit properties slot&lt;br /&gt;
** '''00''' - Properties slot is unused&lt;br /&gt;
** '''01''' - Properties slot is used&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MRGN&amp;quot; - Locations==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: 1280 bytes for retail, 5100 bytes for Hybrid and Broodwar.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the locations that the map uses. In a vanilla map, this section contains 64 locations. In a Hybrid or Brood War map, this section will expand to contain 255 locations.&lt;br /&gt;
&lt;br /&gt;
Each location gets one of the following location entries. The 'Anywhere' location, is ALWAYS location 64.&lt;br /&gt;
* '''u32''': Left (X1) coordinate of location, in pixels (usually 32 pt grid aligned)&lt;br /&gt;
* '''u32''': Top (Y1) coordinate of location, in pixels&lt;br /&gt;
* '''u32''': Right (X2) coordinate of location, in pixels&lt;br /&gt;
* '''u32''': Bottom (Y2) coordinate of location, in pixels&lt;br /&gt;
* '''u16''': String number of the name of this location&lt;br /&gt;
* '''u16''': Location elevation flags. If an elevation is disabled in the location, it's bit will be on (1)&lt;br /&gt;
** '''Bit 0''' - Low elevation&lt;br /&gt;
** '''Bit 1''' - Medium elevation&lt;br /&gt;
** '''Bit 2''' - High elevation&lt;br /&gt;
** '''Bit 3''' - Low air&lt;br /&gt;
** '''Bit 4''' - Medium air&lt;br /&gt;
** '''Bit 5''' - High air&lt;br /&gt;
** '''Bit 6-15''' - Unused&lt;br /&gt;
Note that in typical locations Right is always larger than Left and Bottom is always larger than Top. However, you can reverse one or both of these for [[Inverted Locations]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TRIG&amp;quot; - Triggers==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 2400 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the triggers in the map. This along with [[#&amp;quot;MBRF&amp;quot; - Mission Briefings|MBRF]] is the most complicated section in the entire scenario.chk file as there is a lot of data packed into too little of a space. Refer to the appendix at the bottom of this page for more information.&lt;br /&gt;
For easy reference, since each trigger contains 2400 bytes, the amount of triggers can be gotten by taking the section length and dividing by 2400.&lt;br /&gt;
Every single trigger in the map will have the following format:&lt;br /&gt;
* 16 Conditions (20 byte struct)&amp;lt;br&amp;gt; Every trigger has 16 of the following format, even if only one condition is used. See the appendix for information on which items are used for what conditions.&lt;br /&gt;
** '''u32''': Location number for the condition (1 based -- 0 refers to No Location), EUD Bitmask for a Death condition if the MaskFlag is set to &amp;quot;SC&amp;quot;&lt;br /&gt;
** '''u32''': [[#List of Players/Group IDs|Group]] that the condition applies to&lt;br /&gt;
** '''u32''': Qualified number (how many/resource amount)&lt;br /&gt;
** '''u16''': [[#Trigger Unit Types|Unit ID]] condition applies to&lt;br /&gt;
** '''u8''': [[#Numeric Comparisons|Numeric comparison]], [[#Switch States|switch state]]&lt;br /&gt;
** '''u8''': [[#Trigger Conditions List|Condition byte]]&lt;br /&gt;
** '''u8''': [[#Resource Types|Resource type]], [[#Score Types|score type]], Switch number (0-based)&lt;br /&gt;
** '''u8''': Flags&lt;br /&gt;
*** '''Bit 0''' - Unknown/unused&lt;br /&gt;
*** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled/ignored&lt;br /&gt;
*** '''Bit 2''' - Always display flag.&lt;br /&gt;
*** '''Bit 3''' - Unit properties is used. ('''Note:''' This is used in [[TRG|*.trg]] files)&lt;br /&gt;
*** '''Bit 4''' - Unit type is used. Cleared in &amp;quot;Offset + Mask&amp;quot; EUD conditions. May not be necessary otherwise?&lt;br /&gt;
*** '''Bit 5-7''' - Unknown/unused&lt;br /&gt;
** '''u16''': MaskFlag: set to &amp;quot;SC&amp;quot; (0x53, 0x43) when using the bitmask for EUDs, 0 otherwise&lt;br /&gt;
* 64 Actions (32 byte struct)&amp;lt;br&amp;gt; Immediately following the 16 conditions, there are 64 actions. There will always be 64 of the following structure, even if some of them are unused.&lt;br /&gt;
** '''u32''': Location - source location in &amp;quot;Order&amp;quot; and &amp;quot;Move Unit&amp;quot;, dest location in &amp;quot;Move Location&amp;quot; (1 based -- 0 refers to No Location), EUD Bitmask for a Death action if the MaskFlag is set to &amp;quot;SC&amp;quot;&lt;br /&gt;
** '''u32''': String number for trigger text (0 means no string)&lt;br /&gt;
** '''u32''': WAV string number (0 means no string)&lt;br /&gt;
** '''u32''': Seconds/milliseconds of time&lt;br /&gt;
** '''u32''': First (or only) [[#List of Players/Group IDs|Group/Player]] affected.&lt;br /&gt;
** '''u32''': Second group affected, secondary location (1-based), CUWP #, number, AI script (4-byte string), switch (0-based #)&lt;br /&gt;
** '''u16''': [[#Trigger Unit Types|Unit type]], [[#Score Types|score type]], [[#Resource Types|resource type]], [[#Alliance Statuses|alliance status]]&lt;br /&gt;
** '''u8''': [[#Trigger Actions List|Action byte]]&lt;br /&gt;
** '''u8''': Number of units (0 means All Units), [[#Action States|action state]], [[#Unit Orders|unit order]], [[#Number Modifiers|number modifier]]&lt;br /&gt;
** '''u8''': Flags&lt;br /&gt;
*** '''Bit 0''' - Ignore a wait/transmission once.&lt;br /&gt;
*** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled.&lt;br /&gt;
*** '''Bit 2''' - Always display flag - when not set: if the user has turned off subtitles (see sound options) the text will not display, when set: text will always display&lt;br /&gt;
*** '''Bit 3''' - Unit properties is used. Staredit uses this for *.trg files.&lt;br /&gt;
*** '''Bit 4''' - Unit type is used. Cleared in &amp;quot;Offset + Mask&amp;quot; EUD actions.&lt;br /&gt;
*** '''Bit 5-7''' - Unknown/unused&lt;br /&gt;
** '''u8''': Padding&lt;br /&gt;
** '''u16 (2 bytes)''': MaskFlag: set to &amp;quot;SC&amp;quot; (0x53, 0x43) when using the bitmask for EUDs, 0 otherwise&lt;br /&gt;
* Player Execution&amp;lt;br&amp;gt; Following the 16 conditions and 64 actions, every trigger also has this structure&lt;br /&gt;
** '''u32''': execution flags&lt;br /&gt;
*** '''Bit 0''' - All conditions are met, executing actions, cleared on the next trigger loop.&lt;br /&gt;
*** '''Bit 1''' - Ignore the following actions: Defeat, Draw.&lt;br /&gt;
*** '''Bit 2''' - Preserve trigger. (Can replace Preserve Trigger action)&lt;br /&gt;
*** '''Bit 3''' - Ignore execution.&lt;br /&gt;
*** '''Bit 4''' - Ignore all of the following actions for this trigger until the next trigger loop: Wait, PauseGame, Transmission, PlayWAV, DisplayTextMessage, CenterView, MinimapPing, TalkingPortrait, and MuteUnitSpeech.&lt;br /&gt;
*** '''Bit 5''' - This trigger has paused the game, ignoring subsequent calls to Pause Game (Unpause Game clears this flag only in the same trigger), may automatically call unpause at the end of action execution?&lt;br /&gt;
*** '''Bit 6''' - Wait skipping disabled for this trigger, cleared on next trigger loop.&lt;br /&gt;
*** '''Bit 7-31''' - Unknown/unused&lt;br /&gt;
** '''u8[27]''': 1 byte for each player in the [[#List of Players/Group IDs]]&lt;br /&gt;
*** '''00''' - Trigger is not executed for player&lt;br /&gt;
*** '''01''' - Trigger is executed for player&lt;br /&gt;
** '''u8''': Index of the current action, in StarCraft this is incremented after each action is executed, trigger execution ends when this is 64 (Max Actions) or an action is encountered with Action byte as 0&lt;br /&gt;
This section can be split. Additional TRIG sections will add more triggers.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MBRF&amp;quot; - Mission Briefings==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 2400 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all of the mission briefings shown by the players.&lt;br /&gt;
&lt;br /&gt;
See [[#&amp;quot;TRIG&amp;quot; - Triggers|&amp;quot;TRIG&amp;quot;]] section for format, as it is exactly the same except for the conditions. In this section the 16 conditions are still there, they are all null except for the very first condition, which only has a condition byte of 13. See [[#Mission Briefing Actions List]] for the action bytes for the mission briefing actions.&lt;br /&gt;
&lt;br /&gt;
This section can be split. Additional MBRF sections will add more briefing triggers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SPRP&amp;quot; - Scenario Properties==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4 bytes.''&lt;br /&gt;
&lt;br /&gt;
* '''u16''': String number of the scenario name&lt;br /&gt;
* '''u16''': String number of the scenarios description.&lt;br /&gt;
A string index of 0 for the map name will default it to its file name. A string index of 0 description will default to a predefined string.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;FORC&amp;quot; - Force Settings==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be less than or equal to 20 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the forces and the information about them.&lt;br /&gt;
* '''u8[8]''': 1 byte for each active player, specifying which of the 4 forces (0-based) that the player's on&lt;br /&gt;
* '''u16[4]''': 1 integer for each force, string number of the name of the force&lt;br /&gt;
* '''u8[4]''': 1 byte for each force specifying the properties:&lt;br /&gt;
** '''Bit 0''' - Random start location&lt;br /&gt;
** '''Bit 1''' - Allies&lt;br /&gt;
** '''Bit 2''' - Allied victory&lt;br /&gt;
** '''Bit 3''' - Shared vision&lt;br /&gt;
** '''Bit 4-7''' - Unused&lt;br /&gt;
Notes about FORC:&lt;br /&gt;
* If there is no string specified for a force name, it will default to a &amp;quot;Force #&amp;quot; string.&lt;br /&gt;
* If this section is less than 20 bytes, the remaining bytes are defaulted to 0.&lt;br /&gt;
* Players can be on a force greater than 4, however they will not appear in the game lobby.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;WAV &amp;quot; - WAV String Indexes==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
There are 512 wav entires regardless of how many are actually used.&lt;br /&gt;
* '''u32[512]''': 1 long for each WAV. Indicates a string index is used for a WAV path in the MPQ. If the entry is not used, it will be 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIS&amp;quot; - Unit Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4048 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;UNIx&amp;quot; - BW Unit Settings|&amp;quot;UNIx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains the unit settings for the level:&lt;br /&gt;
* '''u8[228]''': 1 byte for each unit, in order of Unit ID&lt;br /&gt;
** '''00''' - Unit does not use default settings&lt;br /&gt;
** '''01''' - Unit does use default settings&lt;br /&gt;
* '''u32[228]''': Hit points for unit (Note the displayed value is this value / 256, with the low byte being a fractional HP value)&lt;br /&gt;
* '''u16[228]''': Shield points, in order of Unit ID&lt;br /&gt;
* '''u8[228]''': Armor points, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Build time (1/60 seconds), in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Mineral cost, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Gas cost, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': String number, in order of Unit ID&lt;br /&gt;
* '''u16[100]''': Base weapon damage the weapon does, in weapon ID order ([[#List of Unit Weapon IDs]])&lt;br /&gt;
* '''u16[100]''': Upgrade bonus weapon damage, in weapon ID order&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGS&amp;quot; - Upgrade Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 598 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;UPGx&amp;quot; - BW Upgrade Settings|&amp;quot;UPGx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains upgrade settings:&lt;br /&gt;
* '''u8[46]''': 1 byte per each upgrade, in order of upgrade id.&lt;br /&gt;
** '''00''' - Upgrade uses custom settings&lt;br /&gt;
** '''01''' - Upgrade uses default settings&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, gas time factor for each upgrade, in order of upgrade id.&lt;br /&gt;
See [[#List of Upgrade IDs]] for upgrade ids.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TECS&amp;quot; - Tech Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 216 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;TECx&amp;quot; - BW Tech Settings|&amp;quot;TECx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains technology/special abilities settings:&lt;br /&gt;
* '''u8[24]''': 1 byte per each technology, specifies if the tech overrides the default settings. In order of technology id&lt;br /&gt;
** '''00''' - Technology uses custom settings&lt;br /&gt;
** '''01''' - Technology uses default settings&lt;br /&gt;
* '''u16[24]''': Mineral cost to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Gas cost to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Time required to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Energy cost to cast technology/special ability. In order of technology id.&lt;br /&gt;
See [[#List of Technology IDs]] for technology ids.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SWNM&amp;quot; - Switch Names==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section contains the strings used for each switch. There are 256 switches, and can't be any more or any less.&lt;br /&gt;
* '''u32[256]''': One long for each switch, specifies the string number for the name of each switch. Unnamed switches will have an index of 0, and have a default switch name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;COLR&amp;quot; - Player Colors==&lt;br /&gt;
''Required for Brood War only and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Can be in non-Brood War maps in Remaster, if CRGB is also present.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 8 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section indicates what color each player is, but only has effect on Brood War.&lt;br /&gt;
* '''u8[8]''': 1 byte for each player, indicates the color of the player&lt;br /&gt;
** '''00''' - Red&lt;br /&gt;
** '''01''' - Blue&lt;br /&gt;
** '''02''' - Teal&lt;br /&gt;
** '''03''' - Purple&lt;br /&gt;
** '''04''' - Orange&lt;br /&gt;
** '''05''' - Brown&lt;br /&gt;
** '''06''' - White&lt;br /&gt;
** '''07''' - Yellow&lt;br /&gt;
** '''08''' - Green&lt;br /&gt;
** '''09''' - Pale yellow&lt;br /&gt;
** '''10''' - Tan&lt;br /&gt;
** '''11''' - Azure (Neutral color)&lt;br /&gt;
Other values can be used but may have different results depending on the tileset. Any color value above 11 is an overflow. As of patch 1.18.6 values above 11 result in default player color.&lt;br /&gt;
&lt;br /&gt;
SC:R Only colors:&lt;br /&gt;
Selecting these in a non-SC:R map seems to just use default colors, unless the [[#&amp;quot;CRGB&amp;quot; - Remastered Player Colors|CRGB]] section is also present regardless of version (including non-BW versions).&lt;br /&gt;
* '''12''' - Pale Green&lt;br /&gt;
* '''13''' - Blueish Grey&lt;br /&gt;
* '''14''' - Pale Yellow&lt;br /&gt;
* '''15''' - Cyan&lt;br /&gt;
* '''16''' - Pink&lt;br /&gt;
* '''17''' - Olive&lt;br /&gt;
* '''18''' - Lime&lt;br /&gt;
* '''19''' - Navy&lt;br /&gt;
* '''20''' - Magenta&lt;br /&gt;
* '''21''' - Grey&lt;br /&gt;
* '''22''' - Black&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;CRGB&amp;quot; - Remastered Player Colors==&lt;br /&gt;
''Requirement unknown, but can be in any map type including non-remaster maps.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 32 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''u8[8][3]''': 3 bytes for each player corresponding to an RGB color value&lt;br /&gt;
** '''u8''': R&lt;br /&gt;
** '''u8''': G&lt;br /&gt;
** '''u8''': B&lt;br /&gt;
* '''u8[8]''': Indicates how to select the color for each player&lt;br /&gt;
** '''0''' - Random Predefined&lt;br /&gt;
** '''1''' - Player's Choice&lt;br /&gt;
** '''2''' - Custom RGB Color (RGB value for the corresponding player defined above)&lt;br /&gt;
** '''3''' - Use &amp;quot;COLR&amp;quot; selection&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PUPx&amp;quot; - BW Upgrade Restrictions==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2318 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UPGR&amp;quot; - Upgrade Restrictions|&amp;quot;UPGR&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is identical to UPGR section except it uses the Brood War set of 61 upgrades instead of the original 46.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PTEx&amp;quot; - BW Tech Restrictions==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1672 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;PTEC&amp;quot; - Tech Restrictions|&amp;quot;PTEC&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is identical to PTEC section except it uses the Brood War set of 44 technologies instead of the original 24.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIx&amp;quot; - BW Unit Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4168 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UNIS&amp;quot; - Unit Settings|&amp;quot;UNIS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is indentical to UNIS section except it uses the Brood War set of 130 weapons instead of the original 100.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGx&amp;quot; - BW Upgrade Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 794 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UPGS&amp;quot; - Upgrade Settings|&amp;quot;UPGS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section the same as UPGS except section except it uses the Brood War set of 61 upgrades instead of the original 46, and there is an unused byte after the first set:&lt;br /&gt;
* '''u8[61]''': 1 byte per each upgrade, in order of upgrade id.&lt;br /&gt;
** '''00''' - Upgrade uses custom settings&lt;br /&gt;
** '''01''' - Upgrade uses default settings&lt;br /&gt;
* '''u8''': Unused.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, gas time factor for each upgrade, in order of upgrade id.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TECx&amp;quot; - BW Tech Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 396 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;TECS&amp;quot; - Tech Settings|&amp;quot;TECS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is indentical to UNIS section except it uses the Brood War set of 44 technologies instead of the original 24.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Appendix=&lt;br /&gt;
A set of references and IDs that should help you easier in the trigger section and the technology/player ids, etc:&lt;br /&gt;
&lt;br /&gt;
==Trigger Conditions List==&lt;br /&gt;
* 0 = No Condition&lt;br /&gt;
* 1 = Countdown Timer(Comparison, QNumber)&lt;br /&gt;
* 2 = Command(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 3 = Bring(Player, Comparison, TUnit, Loc, QNumber)&lt;br /&gt;
* 4 = Accumulate(Player, Comparison, QNumber, ResType)&lt;br /&gt;
* 5 = Kill(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 6 = Command the Most(TUnit)&lt;br /&gt;
* 7 = Commands the Most At(TUnit, Loc)&lt;br /&gt;
* 8 = Most Kills(TUnit)&lt;br /&gt;
* 9 = Highest Score(Score)&lt;br /&gt;
* 10 = Most Resources(ResType)&lt;br /&gt;
* 11 = Switch(Switch)&lt;br /&gt;
* 12 = Elapsed Time(Comparison, QNumber)&lt;br /&gt;
* 13 = Data is a Mission Briefing. Conditions are N/A (Same as Never)&lt;br /&gt;
* 14 = Opponents(Player, Comparison, QNumber)&lt;br /&gt;
* 15 = Deaths(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 16 = Command the Least(TUnit)&lt;br /&gt;
* 17 = Command the Least At(TUnit, Loc)&lt;br /&gt;
* 18 = Least Kills(TUnit)&lt;br /&gt;
* 19 = Lowest Score(Score)&lt;br /&gt;
* 20 = Least Resources(ResType)&lt;br /&gt;
* 21 = Score(Player, Comparison, Score, QNumber)&lt;br /&gt;
* 22 = Always (Same as No Condition)&lt;br /&gt;
* 23 = Never&lt;br /&gt;
&lt;br /&gt;
==Trigger Actions List==&lt;br /&gt;
* 0 = No Action&lt;br /&gt;
* 1 = Victory&lt;br /&gt;
* 2 = Defeat&lt;br /&gt;
* 3 = Preserve Trigger&lt;br /&gt;
* 4 = Wait(Time)&lt;br /&gt;
* 5 = Pause Game (Single player only)&lt;br /&gt;
* 6 = Unpause Game (Single player only)&lt;br /&gt;
* 7 = Transmission(Text, Unit, Loc, Time, Modifier, Wave, WavTime)&lt;br /&gt;
* 8 = Play WAV(Wav, WavTime)&lt;br /&gt;
* 9 = Display Text Message(Text)&lt;br /&gt;
* 10 = Center View(Loc)&lt;br /&gt;
* 11 = Create Unit with Properties(Player, Unit, Number, Loc, UnitProp)&lt;br /&gt;
* 12 = Set Mission Objectives(Text)&lt;br /&gt;
* 13 = Set Switch(Switch, SwAction)&lt;br /&gt;
* 14 = Set Countdown Timer(Time, Modifier)&lt;br /&gt;
* 15 = Run AI Script(AIScript)&lt;br /&gt;
* 16 = Run AI Script At Location(AIScript)&lt;br /&gt;
* 17 = Leader Board (Control) (Text, TUnit)&lt;br /&gt;
* 18 = Leader Board (Control At Location) (Text, TUnit, Loc)&lt;br /&gt;
* 19 = Leader Board (Resources) (Text, ResType)&lt;br /&gt;
* 20 = Leader Board (Kills) (Text, TUnit)&lt;br /&gt;
* 21 = Leader Board (Points) (Text, Score)&lt;br /&gt;
* 22 = Kill Unit (Player, TUnit)&lt;br /&gt;
* 23 = Kill Unit At Location(Player, TUnit, Number, Loc)&lt;br /&gt;
* 24 = Remove Unit(Player, TUnit)&lt;br /&gt;
* 25 = Remove Unit At Location(Player, TUnit, Number, Loc)&lt;br /&gt;
* 26 = Set Resources(Player, Number, Modifier, ResType)&lt;br /&gt;
* 27 = Set Score(Player, Number, Modifier, Score)&lt;br /&gt;
* 28 = Minimap Ping(Loc)&lt;br /&gt;
* 29 = Talking Portrait(Unit, Time)&lt;br /&gt;
* 30 = Mute Unit Speech&lt;br /&gt;
* 31 = Unmute Unit Speech&lt;br /&gt;
* 32 = Leaderboard Computer Players(State)&lt;br /&gt;
* 33 = Leaderboard Goal (Control) (Text, TUnit, Number)&lt;br /&gt;
* 34 = Leaderboard Goal (Control At Location) (Text, TUnit, Number, Loc)&lt;br /&gt;
* 35 = Leaderboard Goal (Resources) (Text, TUnit, Number, ResType)&lt;br /&gt;
* 36 = Leaderboard Goal (Kills) (Text, TUnit, Number)&lt;br /&gt;
* 37 = Leaderboard Goal (Points) (Text, Number, Score)&lt;br /&gt;
* 38 = Move Location(Player, TUnit, SLoc, DLoc)&lt;br /&gt;
* 39 = Move Unit(Player, TUnit, Number, SLoc, DLoc)&lt;br /&gt;
* 40 = Leaderboard (Greed) (Number)&lt;br /&gt;
* 41 = Set Next Scenario(Text) (Single player only)&lt;br /&gt;
* 42 = Set Doodad State(Player, TUnit, Loc, State)&lt;br /&gt;
* 43 = Set Invincibility(Player, TUnit, Loc, State)&lt;br /&gt;
* 44 = Create Unit(Player, Unit, Number, Loc)&lt;br /&gt;
* 45 = Set Deaths(Player, TUnit, Number, Modifier)&lt;br /&gt;
* 46 = Order(Player, TUnit, SLoc, DLoc, Order)&lt;br /&gt;
* 47 = Comment(Text)&lt;br /&gt;
* 48 = Give Units to Player(SPlayer, DPlayer, TUnit, Number, Loc)&lt;br /&gt;
* 49 = Modify Unit Hit Points(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 50 = Modify Unit Energy(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 51 = Modify Unit Shield Points(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 52 = Modify Unit Resource Amount(Player, Number, ModAmount, Loc)&lt;br /&gt;
* 53 = Modify Unit Hanger Count(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 54 = Pause Timer&lt;br /&gt;
* 55 = Unpause Timer&lt;br /&gt;
* 56 = Draw&lt;br /&gt;
* 57 = Set Alliance Status(Player, AllyStatus)&lt;br /&gt;
* 58 = Disable Debug Mode (Single player only)&lt;br /&gt;
* 59 = Enable Debug Mode (Single player only)&lt;br /&gt;
&lt;br /&gt;
==Mission Briefing Actions List==&lt;br /&gt;
* 0 - No Action&lt;br /&gt;
* 1 - Wait(Time)&lt;br /&gt;
* 2 - Play WAV(Wave, WavTime)&lt;br /&gt;
* 3 - Text Message(Text, Time)&lt;br /&gt;
* 4 - Mission Objectives(Text)&lt;br /&gt;
* 5 - Show Portrait(Unit, Slot)&lt;br /&gt;
* 6 - Hide Portrait(Slot)&lt;br /&gt;
* 7 - Display Speaking Portrait(Slot, Time)&lt;br /&gt;
* 8 - Transmission(Text, Slot, Time, Modifier, Wave, WavTime)&lt;br /&gt;
* 9 - Skip Tutorial Enabled&lt;br /&gt;
&lt;br /&gt;
==Switch States==&lt;br /&gt;
* 2 = Switch is set&lt;br /&gt;
* 3 = Switch is cleared&lt;br /&gt;
&lt;br /&gt;
==Numeric Comparisons==&lt;br /&gt;
* 0 = At least&lt;br /&gt;
* 1 = At most&lt;br /&gt;
* 10 = Exactly&lt;br /&gt;
&lt;br /&gt;
==Score Types==&lt;br /&gt;
* 0 = Total&lt;br /&gt;
* 1 = Units&lt;br /&gt;
* 2 = Buildings&lt;br /&gt;
* 3 = Units and Buildings&lt;br /&gt;
* 4 = Kills&lt;br /&gt;
* 5 = Razings&lt;br /&gt;
* 6 = Kills and Razings&lt;br /&gt;
* 7 = Custom&lt;br /&gt;
&lt;br /&gt;
==Resource Types==&lt;br /&gt;
* 0 = Ore&lt;br /&gt;
* 1 = Gas&lt;br /&gt;
* 2 = Ore and Gas&lt;br /&gt;
&lt;br /&gt;
==Alliance Statuses==&lt;br /&gt;
* 0 = Enemy&lt;br /&gt;
* 1 = Ally&lt;br /&gt;
* 2 = Allied Victory&lt;br /&gt;
&lt;br /&gt;
==Unit Orders==&lt;br /&gt;
* 0 = Move&lt;br /&gt;
* 1 = Patrol&lt;br /&gt;
* 2 = Attack&lt;br /&gt;
&lt;br /&gt;
==Action States==&lt;br /&gt;
* 4 = Enabled/Set switch&lt;br /&gt;
* 5  = Disabled/Clear switch&lt;br /&gt;
* 6 = Toggle/Toggle switch&lt;br /&gt;
* 11 = Randomize switch&lt;br /&gt;
&lt;br /&gt;
==Number Modifiers==&lt;br /&gt;
* 7 = Set to&lt;br /&gt;
* 8 = Add&lt;br /&gt;
* 9 = Subtract&lt;br /&gt;
&lt;br /&gt;
==Trigger Unit Types==&lt;br /&gt;
* All normal units (0-227)&lt;br /&gt;
* 228 = None&lt;br /&gt;
* 229 = Any unit&lt;br /&gt;
* 230 = Men&lt;br /&gt;
* 231 = Buildings&lt;br /&gt;
* 232 = Factories&lt;br /&gt;
&lt;br /&gt;
==List of Players/Group IDs==&lt;br /&gt;
* 0 = Player 1&lt;br /&gt;
* 1 = Player 2&lt;br /&gt;
* 2 = Player 3&lt;br /&gt;
* 3 = Player 4&lt;br /&gt;
* 4 = Player 5&lt;br /&gt;
* 5 = Player 6&lt;br /&gt;
* 6 = Player 7&lt;br /&gt;
* 7 = Player 8&lt;br /&gt;
* 8 = Player 9&lt;br /&gt;
* 9 = Player 10&lt;br /&gt;
* 10 = Player 11&lt;br /&gt;
* 11 = Player 12&lt;br /&gt;
* 12 = None (Unused, One-entry Overflow in some cases)&lt;br /&gt;
* 13 = Current Player&lt;br /&gt;
* 14 = Foes&lt;br /&gt;
* 15 = Allies&lt;br /&gt;
* 16 = Neutral Players&lt;br /&gt;
* 17 = All Players&lt;br /&gt;
* 18 = Force 1&lt;br /&gt;
* 19 = Force 2&lt;br /&gt;
* 20 = Force 3&lt;br /&gt;
* 21 = Force 4&lt;br /&gt;
* 22 = Unused 1&lt;br /&gt;
* 23 = Unused 2&lt;br /&gt;
* 24 = Unused 3&lt;br /&gt;
* 25 = Unused 4&lt;br /&gt;
* 26 = Non Allied Victory Players&lt;br /&gt;
&lt;br /&gt;
==List of Technology IDs==&lt;br /&gt;
* 0 = Stim Packs&lt;br /&gt;
* 1 = Lockdown&lt;br /&gt;
* 2 = EMP Shockwave&lt;br /&gt;
* 3 = Spider Mines&lt;br /&gt;
* 4 = Scanner Sweep&lt;br /&gt;
* 5 = Siege Mode&lt;br /&gt;
* 6 = Defensive Matrix&lt;br /&gt;
* 7 = Irradiate&lt;br /&gt;
* 8 = Yamato Gun&lt;br /&gt;
* 9 = Cloaking Field&lt;br /&gt;
* 10 = Personnel Cloaking&lt;br /&gt;
* 11 = Burrowing&lt;br /&gt;
* 12 = Infestation&lt;br /&gt;
* 13 = Spawn Broodling&lt;br /&gt;
* 14 = Dark Swarm&lt;br /&gt;
* 15 = Plague&lt;br /&gt;
* 16 = Consume&lt;br /&gt;
* 17 = Ensnare&lt;br /&gt;
* 18 = Parasite&lt;br /&gt;
* 19 = Psionic Storm&lt;br /&gt;
* 20 = Hallucination&lt;br /&gt;
* 21 = Recall&lt;br /&gt;
* 22 = Stasis Field&lt;br /&gt;
* 23 = Archon Warp&lt;br /&gt;
* 24 = Restoration&lt;br /&gt;
* 25 = Disruption Web&lt;br /&gt;
* 26 = Unused 26&lt;br /&gt;
* 27 = Mind Control&lt;br /&gt;
* 28 = Dark Archon Meld&lt;br /&gt;
* 29 = Feedback&lt;br /&gt;
* 30 = Optical Flare&lt;br /&gt;
* 31 = Maelstorm&lt;br /&gt;
* 32 = Lurker Aspect&lt;br /&gt;
* 33 = Unused 33&lt;br /&gt;
* 34 = Healing&lt;br /&gt;
* 35 = Unused 35&lt;br /&gt;
* 36 = Unused 36&lt;br /&gt;
* 37 = Unused 37&lt;br /&gt;
* 38 = Unused 38&lt;br /&gt;
* 39 = Unused 39&lt;br /&gt;
* 40 = Unused 40&lt;br /&gt;
* 41 = Unused 41&lt;br /&gt;
* 42 = Unused 42&lt;br /&gt;
* 43 = Unused 43&lt;br /&gt;
&lt;br /&gt;
==List of Upgrade IDs==&lt;br /&gt;
* 0 = Terran Infantry Armor&lt;br /&gt;
* 1 = Terran Vehicle Plating&lt;br /&gt;
* 2 = Terran Ship Plating&lt;br /&gt;
* 3 = Zerg Carapace&lt;br /&gt;
* 4 = Zerg Flyer Caparace&lt;br /&gt;
* 5 = Protoss Armor&lt;br /&gt;
* 6 = Protoss Plating&lt;br /&gt;
* 7 = Terran Infantry Weapons&lt;br /&gt;
* 8 = Terran Vehicle Weapons&lt;br /&gt;
* 9 = Terran Ship Weapons&lt;br /&gt;
* 10 = Zerg Melee Attacks&lt;br /&gt;
* 11 = Zerg Missile Attacks&lt;br /&gt;
* 12 = Zerg Flyer Attacks&lt;br /&gt;
* 13 = Protoss Ground Weapons&lt;br /&gt;
* 14 = Protoss Air Weapons&lt;br /&gt;
* 15 = Protoss Plasma Shields&lt;br /&gt;
* 16 = U-238 Shells&lt;br /&gt;
* 17 = Ion Thrusters&lt;br /&gt;
* 18 = Burst Lasers (Unused)&lt;br /&gt;
* 19 = Titan Reactor (SV +50)&lt;br /&gt;
* 20 = Ocular Implants&lt;br /&gt;
* 21 = Moebius Reactor (Ghost +50)&lt;br /&gt;
* 22 = Apollo Reactor (Wraith +50)&lt;br /&gt;
* 23 = Colossus Reactor (BC +50)&lt;br /&gt;
* 24 = Ventral Sacs&lt;br /&gt;
* 25 = Antennae&lt;br /&gt;
* 26 = Pneumatized Carapace&lt;br /&gt;
* 27 = Metabolic Boost&lt;br /&gt;
* 28 = Adrenal Glands&lt;br /&gt;
* 29 = Muscular Augments&lt;br /&gt;
* 30 = Grooved Spines&lt;br /&gt;
* 31 = Gamete Meiosis (Queen +50)&lt;br /&gt;
* 32 = Metasynaptic Node (Defiler +50)&lt;br /&gt;
* 33 = Singularity Charge&lt;br /&gt;
* 34 = Leg Enhancements&lt;br /&gt;
* 35 = Scarab Damage &lt;br /&gt;
* 36 = Reaver Capacity &lt;br /&gt;
* 37 = Gravitic Drive&lt;br /&gt;
* 38 = Sensor Array&lt;br /&gt;
* 39 = Gravitic Boosters&lt;br /&gt;
* 40 = Khaydarin Amulet (HT +50)&lt;br /&gt;
* 41 = Apial Sensors&lt;br /&gt;
* 42 = Gravitic Thrusters&lt;br /&gt;
* 43 = Carrier Capacity&lt;br /&gt;
* 44 = Khaydarin Core (Arbiter +50)&lt;br /&gt;
* 45 = Unknown Upgrade45&lt;br /&gt;
* 46 = Unknown Upgrade46&lt;br /&gt;
* 47 = Argus Jewel (Corsair +50)&lt;br /&gt;
* 48 = Unknown Upgrade48&lt;br /&gt;
* 49 = Argus Talisman (DA +50)&lt;br /&gt;
* 50 = Unknown Upgrade50&lt;br /&gt;
* 51 = Caduceus Reactor (Medic +50)&lt;br /&gt;
* 52 = Chitinous Plating&lt;br /&gt;
* 53 = Anabolic Synthesis&lt;br /&gt;
* 54 = Charon Booster&lt;br /&gt;
* 55 = Unknown Upgrade55&lt;br /&gt;
* 56 = Unknown Upgrade56&lt;br /&gt;
* 57 = Unknown Upgrade57&lt;br /&gt;
* 58 = Unknown Upgrade58&lt;br /&gt;
* 59 = Unknown Upgrade59&lt;br /&gt;
* 60 = Unknown Upgrade60&lt;br /&gt;
&lt;br /&gt;
==List of Unit Weapon IDs==&lt;br /&gt;
* 0 = Gauss Rifle (Normal)&lt;br /&gt;
* 1 = Gauss Rifle (Jim Raynor-Marine)&lt;br /&gt;
* 2 = C-10 Concussion Rifle (Normal)&lt;br /&gt;
* 3 = C-10 Concussion Rifle (Sarah Kerrigan)&lt;br /&gt;
* 4 = Fragmentation Grenade (Normal)&lt;br /&gt;
* 5 = Fragmentation Grenade (Jim Raynor-Vulture)&lt;br /&gt;
* 6 = Spider Mines&lt;br /&gt;
* 7 = Twin Autocannons (Normal)&lt;br /&gt;
* 8 = Hellfire Missile Pack (Normal)&lt;br /&gt;
* 9 = Twin Autocannons (Alan Schezar)&lt;br /&gt;
* 10 = Hellfire Missile Pack (Alan Schezar)&lt;br /&gt;
* 11 = Arclite Cannon (Normal)&lt;br /&gt;
* 12 = Arclite Cannon (Edmund Duke)&lt;br /&gt;
* 13 = Fusion Cutter&lt;br /&gt;
* 14 = Fusion Cutter (Harvest)&lt;br /&gt;
* 15 = Gemini Missiles (Normal)&lt;br /&gt;
* 16 = Burst Lasers (Normal)&lt;br /&gt;
* 17 = Gemini Missiles (Tom Kazansky)&lt;br /&gt;
* 18 = Burst Lasers (Tom Kazansky)&lt;br /&gt;
* 19 = ATS Laser Battery (Normal)&lt;br /&gt;
* 20 = ATA Laser Battery (Normal)&lt;br /&gt;
* 21 = ATS Laser Battery (Norad II+Mengsk+DuGalle)&lt;br /&gt;
* 22 = ATA Laser Battery (Norad II+Mengsk+DuGalle)&lt;br /&gt;
* 23 = ATS Laser Battery (Hyperion)&lt;br /&gt;
* 24 = ATA Laser Battery (Hyperion)&lt;br /&gt;
* 25 = Flame Thrower (Normal)&lt;br /&gt;
* 26 = Flame Thrower (Gui Montag)&lt;br /&gt;
* 27 = Arclite Shock Cannon (Normal)&lt;br /&gt;
* 28 = Arclite Shock Cannon (Edmund Duke)&lt;br /&gt;
* 29 = Longbolt Missiles&lt;br /&gt;
* 30 = Yamato Gun&lt;br /&gt;
* 31 = Nuclear Missile&lt;br /&gt;
* 32 = Lockdown&lt;br /&gt;
* 33 = EMP Shockwave&lt;br /&gt;
* 34 = Irradiate&lt;br /&gt;
* 35 = Claws (Normal)&lt;br /&gt;
* 36 = Claws (Devouring One)&lt;br /&gt;
* 37 = Claws (Infested Kerrigan)&lt;br /&gt;
* 38 = Needle Spines (Normal)&lt;br /&gt;
* 39 = Needle Spines (Hunter Killer)&lt;br /&gt;
* 40 = Kaiser Blades (Normal)&lt;br /&gt;
* 41 = Kaiser Blades (Torrasque)&lt;br /&gt;
* 42 = Toxic Spores (Broodling)&lt;br /&gt;
* 43 = Spines&lt;br /&gt;
* 44 = Spines (Harvest)&lt;br /&gt;
* 45 = Acid Spray (Unused)&lt;br /&gt;
* 46 = Acid Spore (Normal)&lt;br /&gt;
* 47 = Acid Spore (Kukulza-Guardian)&lt;br /&gt;
* 48 = Glave Wurm (Normal)&lt;br /&gt;
* 49 = Glave Wurm (Kukulza-Mutalisk)&lt;br /&gt;
* 50 = Venom (Unused-Defiler)&lt;br /&gt;
* 51 = Venom (Unused-Defiler Hero)&lt;br /&gt;
* 52 = Seeker Spores&lt;br /&gt;
* 53 = Subterranean Tentacle&lt;br /&gt;
* 54 = Suicide (Infested Terran)&lt;br /&gt;
* 55 = Suicide (Scourge)&lt;br /&gt;
* 56 = Parasite&lt;br /&gt;
* 57 = Spawn Broodlings&lt;br /&gt;
* 58 = Ensnare&lt;br /&gt;
* 59 = Dark Swarm&lt;br /&gt;
* 60 = Plague&lt;br /&gt;
* 61 = Consume&lt;br /&gt;
* 62 = Particle Beam&lt;br /&gt;
* 63 = Particle Beam (Harvest)&lt;br /&gt;
* 64 = Psi Blades (Normal)&lt;br /&gt;
* 65 = Psi Blades (Fenix-Zealot)&lt;br /&gt;
* 66 = Phase Disruptor (Normal)&lt;br /&gt;
* 67 = Phase Disruptor (Fenix-Dragoon)&lt;br /&gt;
* 68 = Psi Assault (Normal-Unused)&lt;br /&gt;
* 69 = Psi Assault (Tassadar+Aldaris)&lt;br /&gt;
* 70 = Psionic Shockwave (Normal)&lt;br /&gt;
* 71 = Psionic Shockwave (Tassadar/Zeratul Archon)&lt;br /&gt;
* 72 = Unknown72&lt;br /&gt;
* 73 = Dual Photon Blasters (Normal)&lt;br /&gt;
* 74 = Anti-matter Missiles (Normal)&lt;br /&gt;
* 75 = Dual Photon Blasters (Mojo)&lt;br /&gt;
* 76 = Anit-matter Missiles (Mojo)&lt;br /&gt;
* 77 = Phase Disruptor Cannon (Normal)&lt;br /&gt;
* 78 = Phase Disruptor Cannon (Danimoth)&lt;br /&gt;
* 79 = Pulse Cannon&lt;br /&gt;
* 80 = STS Photon Cannon&lt;br /&gt;
* 81 = STA Photon Cannon&lt;br /&gt;
* 82 = Scarab&lt;br /&gt;
* 83 = Stasis Field&lt;br /&gt;
* 84 = Psi Storm&lt;br /&gt;
* 85 = Warp Blades (Zeratul)&lt;br /&gt;
* 86 = Warp Blades (Dark Templar Hero)&lt;br /&gt;
* 87 = Missiles (Unused)&lt;br /&gt;
* 88 = Laser Battery1 (Unused)&lt;br /&gt;
* 89 = Tormentor Missiles (Unused)&lt;br /&gt;
* 90 = Bombs (Unused)&lt;br /&gt;
* 91 = Raider Gun (Unused)&lt;br /&gt;
* 92 = Laser Battery2 (Unused)&lt;br /&gt;
* 93 = Laser Battery3 (Unused)&lt;br /&gt;
* 94 = Dual Photon Blasters (Unused)&lt;br /&gt;
* 95 = Flechette Grenade (Unused)&lt;br /&gt;
* 96 = Twin Autocannons (Floor Trap)&lt;br /&gt;
* 97 = Hellfire Missile Pack (Wall Trap)&lt;br /&gt;
* 98 = Flame Thrower (Wall Trap)&lt;br /&gt;
* 99 = Hellfire Missile Pack (Floor Trap)&lt;br /&gt;
* 100 = Neutron Flare&lt;br /&gt;
* 101 = Disruption Web&lt;br /&gt;
* 102 = Restoration&lt;br /&gt;
* 103 = Halo Rockets&lt;br /&gt;
* 104 = Corrosive Acid&lt;br /&gt;
* 105 = Mind Control&lt;br /&gt;
* 106 = Feedback&lt;br /&gt;
* 107 = Optical Flare&lt;br /&gt;
* 108 = Maelstrom&lt;br /&gt;
* 109 = Subterranean Spines&lt;br /&gt;
* 110 = Gauss Rifle0 (Unused)&lt;br /&gt;
* 111 = Warp Blades (Normal)&lt;br /&gt;
* 112 = C-10 Concussion Rifle (Samir Duran)&lt;br /&gt;
* 113 = C-10 Concussion Rifle (Infested Duran)&lt;br /&gt;
* 114 = Dual Photon Blasters (Artanis)&lt;br /&gt;
* 115 = Anti-matter Missiles (Artanis)&lt;br /&gt;
* 116 = C-10 Concussion Rifle (Alexei Stukov)&lt;br /&gt;
* 117 = Gauss Rifle1 (Unused)&lt;br /&gt;
* 118 = Gauss Rifle2 (Unused)&lt;br /&gt;
* 119 = Gauss Rifle3 (Unused)&lt;br /&gt;
* 120 = Gauss Rifle4 (Unused)&lt;br /&gt;
* 121 = Gauss Rifle5 (Unused)&lt;br /&gt;
* 122 = Gauss Rifle6 (Unused)&lt;br /&gt;
* 123 = Gauss Rifle7 (Unused)&lt;br /&gt;
* 124 = Gauss Rifle8 (Unused)&lt;br /&gt;
* 125 = Gauss Rifle9 (Unused)&lt;br /&gt;
* 126 = Gauss Rifle10 (Unused)&lt;br /&gt;
* 127 = Gauss Rifle11 (Unused)&lt;br /&gt;
* 128 = Gauss Rifle12 (Unused)&lt;br /&gt;
* 129 = Gauss Rifle13 (Unused)&lt;br /&gt;
* 130 = None&lt;br /&gt;
&lt;br /&gt;
==Complete Modifier List==&lt;br /&gt;
* 0 = Condition: &amp;gt;= (greater than or equal to)&lt;br /&gt;
* 1 = Condition: &amp;lt;= (less than or equal to)&lt;br /&gt;
* 2 = Condition: == TRUE (Is True)&lt;br /&gt;
* 3 = Condition: == FALSE (Is False)&lt;br /&gt;
* 4 = Action: = TRUE (Set to True)&lt;br /&gt;
* 5 = Action: = FALSE (Set to False)&lt;br /&gt;
* 6 = Action: NOT (toggle)&lt;br /&gt;
* 7 = Action: = (Set to)&lt;br /&gt;
* 8 = Action: += (Add)&lt;br /&gt;
* 9 = Action: -= (Subtract)&lt;br /&gt;
* 10 = Condition: == (Exactly)&lt;br /&gt;
* 11 = Action: Randomize&lt;br /&gt;
&lt;br /&gt;
[[Category:StarCraft]]&lt;br /&gt;
[[Category:Reference]]&lt;/div&gt;</summary>
		<author><name>FaRTy1billion</name></author>	</entry>

	<entry>
		<id>https://staredit.net/wiki/index.php?title=Scenario.chk&amp;diff=643</id>
		<title>Scenario.chk</title>
		<link rel="alternate" type="text/html" href="https://staredit.net/wiki/index.php?title=Scenario.chk&amp;diff=643"/>
				<updated>2020-10-02T07:15:41Z</updated>
		
		<summary type="html">&lt;p&gt;FaRTy1billion: /* &amp;quot;CRGB&amp;quot; - Remastered Player Colors */ another typo fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The CHK file is a very dense file found inside the SCM or SCX file (as &amp;quot;staredit\scenario.chk&amp;quot;), which is just a renamed MPQ archive.&lt;br /&gt;
&lt;br /&gt;
In this article, some shorthand will be used for datatypes:&lt;br /&gt;
* '''u8''' for an unsigned byte&lt;br /&gt;
* '''u16''' for an unsigned short (2-byte integer)&lt;br /&gt;
* '''u32''' for an unsigned int (4-byte integer)&lt;br /&gt;
* '''uT[''a'']''' for an array of datatype '''T''' (8, 16, 32) with '''''a''''' number of elements&lt;br /&gt;
* '''uT[''a''][''b'']''' for a two-dimensional array of datatype '''T''', where each element of '''T[''a'']''' will be an array of size '''''b'''''&lt;br /&gt;
&lt;br /&gt;
=Sections=&lt;br /&gt;
The CHK is split into several named chunks (hence the file extension, an abbreviation of ''CHunK'').&lt;br /&gt;
&lt;br /&gt;
Each section begins with an 8-byte header:&lt;br /&gt;
* '''u32''' Name - A 4-byte string uniquely identifying that chunk's purpose.&lt;br /&gt;
* '''u32''' Size - The size, in bytes, of the chunk (not including this header)&lt;br /&gt;
Followed by as many bytes as 'Size', in a format described below.&lt;br /&gt;
&lt;br /&gt;
Some things to keep in mind about the CHK section:&lt;br /&gt;
* Invalid sections can exist and will be ignored. While Size is unsigned, it can safely be a negative value to read a chunk earlier in the file. This allows for &amp;quot;section stacking&amp;quot;, allowing smaller sections to be placed inside of larger ones or duplicate triggers or units to take less space in the file.&lt;br /&gt;
* All sections will marked &amp;quot;Not required.&amp;quot; are never read by StarCraft and can safely be omitted. However they may or may not be read by StarEdit, and may cause the map to be unreadable in an editor.&lt;br /&gt;
* Note &amp;quot;Hybrid&amp;quot;, or &amp;quot;Enhanced&amp;quot;, maps were introduced in 1.04. They are supported both by Original StarCraft and Brood War and usually contain sections for both types (e.g., UPGS and UPGx, TECS and TECx), but both sections aren't necessarily read.&lt;br /&gt;
* Duplicate sections will overwrite previously defined section data, except where noted. Note this only applies to those section that pass the specified &amp;quot;validation&amp;quot; parameters, as any section that does not successfully validate will be ignored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TYPE&amp;quot; - Map Type==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the type of scenario.&lt;br /&gt;
* '''u32''': Specifies the type of scenario:&lt;br /&gt;
** '''0x53574152''' or '''RAWS''' - 1.04 StarCraft and above (&amp;quot;hybrid&amp;quot;)&lt;br /&gt;
** '''0x42574152''' or '''RAWB''' - Brood War&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;VER &amp;quot; - Format Version==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section identifies the file format version.&lt;br /&gt;
* '''u16''': File format version:&lt;br /&gt;
** '''59''' - 1.00 Starcraft&lt;br /&gt;
** '''63''' - 1.04 Starcraft and above (&amp;quot;hybrid&amp;quot;)&lt;br /&gt;
** '''64''' - Starcraft Remastered&lt;br /&gt;
** '''205''' - Brood War&lt;br /&gt;
** '''206''' - Brood War Remastered&lt;br /&gt;
This is the only version code section to actually be read by StarCraft (of TYPE, VER , IVER, and IVE2). Any other value is invalid in retail StarCraft and is usually a beta version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IVER&amp;quot; - Map Version==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section &amp;quot;additionally identifies&amp;quot; the map version.&lt;br /&gt;
* '''u16''': &amp;quot;Additional file format version:&amp;quot;&lt;br /&gt;
** '''9''' - beta/obsolete versions&lt;br /&gt;
** '''10''' - current versions&lt;br /&gt;
When saving as expansion this section gets removed entirely. Contrary to popular belief, it doesn't get &amp;quot;replaced&amp;quot; by IVE2 in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IVE2&amp;quot; - Map Version==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section &amp;quot;additionally identifies&amp;quot; the map version.&lt;br /&gt;
* '''u16''': &amp;quot;Additional file format version:&amp;quot;&lt;br /&gt;
** '''11''' - 1.04 StarCraft and above (&amp;quot;hybrid&amp;quot;) or Brood War.&lt;br /&gt;
This section does not &amp;quot;replace&amp;quot; IVER in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;VCOD&amp;quot; - Verification Code==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be equal to size of the VCOD data in the EXE resource. Must result in valid checksum.''&lt;br /&gt;
&lt;br /&gt;
This section has a verification code to make sure this is actually a CHK file.&lt;br /&gt;
&lt;br /&gt;
* '''u32[256]''': Seed values.&lt;br /&gt;
* '''u8[16]''': Operation codes to produce the resulting hash:&lt;br /&gt;
** '''00''' - XOR's the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''01''' - Adds to the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''02''' - Subtracts from the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''03''' - XOR's the current hash with the VCOD table at index OWNR, SIDE, FORC, and 0&lt;br /&gt;
** '''04''' - same as 0x03&lt;br /&gt;
** '''05''' - same as 0x03&lt;br /&gt;
** '''06''' - Complex function consisting of ORs and shifts&lt;br /&gt;
** '''07''' - Inverted version of 0x06, switching direction of all shifts&lt;br /&gt;
** '''08+''' - Do nothing&lt;br /&gt;
Opcodes and seeds do not have to match those in EXE resource, as long as the same value is produced.&amp;lt;br&amp;gt;&lt;br /&gt;
The only indexes in the seed table that are referenced are those that correspond individual values of [[#&amp;quot;OWNR&amp;quot; - StarCraft Player Types|OWNR]], [[#&amp;quot;SIDE&amp;quot; - Player Races|SIDE]], [[#&amp;quot;FORC&amp;quot; - Force Settings|FORC]] player assignments, and index 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IOWN&amp;quot; - StarEdit Player Types==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the owner of each player.&lt;br /&gt;
* '''u8[12]''': One byte for each player, specifies the owner of the player:&lt;br /&gt;
** '''00''' - Inactive&lt;br /&gt;
** ''01'' - Computer (game)&lt;br /&gt;
** ''02'' - Occupied by Human Player&lt;br /&gt;
** '''03''' - Rescue Passive&lt;br /&gt;
** '''04''' - Unused&lt;br /&gt;
** '''05''' - Computer&lt;br /&gt;
** '''06''' - Human (Open Slot)&lt;br /&gt;
** '''07''' - Neutral&lt;br /&gt;
** ''08'' - Closed slot&lt;br /&gt;
This section is separate from OWNR as a staredit value. Staredit does not display &amp;quot;inactive&amp;quot; as a valid option. Italicized settings denote invalid map options, which may involve a buffer overflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;OWNR&amp;quot; - StarCraft Player Types==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 12 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section designates the controller of a particular player. It is exactly the same as the &amp;quot;IOWN&amp;quot; section, except there is an additional value, 0x00 for Inactive.&lt;br /&gt;
* '''u8[12]''': One byte for each player, specifies the owner of the player:&lt;br /&gt;
** '''00''' - Inactive&lt;br /&gt;
** ''01'' - Computer (game)&lt;br /&gt;
** ''02'' - Occupied by Human Player&lt;br /&gt;
** '''03''' - Rescue Passive&lt;br /&gt;
** '''04''' - Unused&lt;br /&gt;
** '''05''' - Computer&lt;br /&gt;
** '''06''' - Human (Open Slot)&lt;br /&gt;
** '''07''' - Neutral&lt;br /&gt;
** ''08'' - Closed slot&lt;br /&gt;
Italicized settings denote invalid map options, which may involve a buffer overflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;ERA &amp;quot; - Tileset==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section indicates the tileset of the scenario.&lt;br /&gt;
* '''u16''': Designates tileset:&lt;br /&gt;
** '''00''' - Badlands&lt;br /&gt;
** '''01''' - Space Platform&lt;br /&gt;
** '''02''' - Installation&lt;br /&gt;
** '''03''' - Ashworld&lt;br /&gt;
** '''04''' - Jungle&lt;br /&gt;
** '''05''' - Desert&lt;br /&gt;
** '''06''' - Arctic&lt;br /&gt;
** '''07''' - Twilight&lt;br /&gt;
StarCraft masks the tileset indicator's bit value, so bits after the third place (anything after the value &amp;quot;7&amp;quot;) are removed. Thus, 9 (1001 in binary) is interpreted as 1 (0001), 10 (1010) as 2 (0010), etc.&amp;lt;br&amp;gt;&lt;br /&gt;
Desert, Arctic, and Twilight are Brood War-only tilesets.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;DIM &amp;quot; - Map Dimensions==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains the dimensions of the map.&lt;br /&gt;
* '''u16''': Width of the map&lt;br /&gt;
* '''u16''': Height of the map&lt;br /&gt;
The Width/Height of the map is measured in the number of square 32x32p tiles.&amp;lt;br&amp;gt;&lt;br /&gt;
Standard Dimensions are 64, 96, 128, 192, and 256.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SIDE&amp;quot; - Player Races==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 12 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains the species/race of each player.&lt;br /&gt;
* '''u8[12]''': 1 byte per player the species of that player:&lt;br /&gt;
** '''00''' - Zerg&lt;br /&gt;
** '''01''' - Terran&lt;br /&gt;
** '''02''' - Protoss&lt;br /&gt;
** ''03'' - Invalid (Independent)&lt;br /&gt;
** ''04'' - Invalid (Neutral)&lt;br /&gt;
** '''05''' - User Selectable&lt;br /&gt;
** '''06''' - Random (Forced; Acts as a selected race)&lt;br /&gt;
** ''07'' - Inactive&lt;br /&gt;
Italicized settings denote invalid map options. Note Players 9-11 are defaultly Inactive and Player 12 is defaultly Neutral.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MTXM&amp;quot; - StarCraft Terrain==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be less than or equal to 131072 (0x20000) bytes (256 * 256 * 2).''&lt;br /&gt;
&lt;br /&gt;
Terrain section that contains a map of the level's appearance. StarEdit disregards this section and instead uses [[#&amp;quot;TILE&amp;quot; - StarEdit Terrain|TILE]]; it is only used in Starcraft.&lt;br /&gt;
* '''u16[map width * height]''': one integer for each tile.&lt;br /&gt;
Notes about MTXM:&lt;br /&gt;
* The Width/Height of the map is measured in the number of square 32x32p tiles.&lt;br /&gt;
* Tiles in this section are listed from left to right, top to bottom.&lt;br /&gt;
* The values for each integer are their respective &amp;quot;MegaTile&amp;quot; values in the scenario's tileset. If the size of this section is greater than width*height*2, the data following is ignored. If the size of this section is less, the resulting tiles that have not been defined will be null tiles.&lt;br /&gt;
* This section includes doodads as terrain; TILE, which is otherwise identical, doesn't. Out of the terrain sections (TILE, ISOM, and MTXM), SC only reads MTXM for the sake of not having to generate this data on-the-fly: it contains the exact representation of the level's appearance, including doodads. TILE, on the other hand, is directly tied via a tile lookup function to ISOM, and exists for the sake of not having to generate tiles from ISOM on-the-fly in StarEdit.&lt;br /&gt;
* If MTXM section is smaller than (map width*height), then the remaining tiles will be filled with null tiles or tiles specified by previous MTXM sections.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PUNI&amp;quot; - Player Unit Restrictions==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 5700 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains player unit restrictions: it indicates whether the player can or cannot build a particular unit.&lt;br /&gt;
* '''u8[228][12]''': 1 byte for each unit in order of its unit id, then each player, for player availability:&lt;br /&gt;
** '''00''' - That unit is not available for production if the player has 'override defaults' on&lt;br /&gt;
** '''01''' - That unit is available for production if the player has 'override defaults' on&lt;br /&gt;
* '''u8[228]''': 1 byte for each unit in order of it's unit id, for global availability defaults (for all players):&lt;br /&gt;
** '''00''' - That unit is not available for production&lt;br /&gt;
** '''01''' - That unit is available for production&lt;br /&gt;
* '''u8[228][12]''': 1 byte for each unit in order of its unit id, then each player, indicating whether a player uses the global availability defaults.&lt;br /&gt;
** '''00''' - Player overrides defaults for this unit&lt;br /&gt;
** '''01''' - Player uses defaults for this unit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGR&amp;quot; - Upgrade Restrictions==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1748 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;PUPx&amp;quot; - BW Upgrade Restrictions|&amp;quot;PUPx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains player upgrade restrictions: it indicates the starting/maximum levels at/to which a player can perform a particular upgrade.&lt;br /&gt;
* '''u8[46][12]''': 1 byte for the maximum level a player can upgrade to, in order of its upgrade id, then each player&lt;br /&gt;
* '''u8[46][12]''': 1 byte for the level of an upgrade a player starts off with, in order of its upgrade id, then each player&lt;br /&gt;
* '''u8[46]''': 1 byte for the global default maximum level of each upgrade, in order of its upgrade id.&lt;br /&gt;
* '''u8[46]''': 1 byte for the global default starting level of each upgrade, in order of its upgrade id.&lt;br /&gt;
* '''u8[46][12]''': 1 byte for each upgrade in order of its upgrade id, then each player, indicating whether a player uses the global upgrade defaults:&lt;br /&gt;
** '''00''' - Player does not use global upgrade defaults for this upgrade&lt;br /&gt;
** '''01''' - Player uses upgrade defaults for this upgrade&lt;br /&gt;
See [[#List of Upgrade IDs]].&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PTEC&amp;quot; - Tech Restrictions==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 912 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;PTEx&amp;quot; - BW Tech Restrictions|&amp;quot;PTEx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains player technology availability restrictions: it indicates whether a player starts off with a particular technology or can research a particular technology.&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology id, then each player, for player availability:&lt;br /&gt;
** '''00''' - Technology is not available for a player&lt;br /&gt;
** '''01''' - Technology is available for a player&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology id, then each player, for &amp;quot;already researched&amp;quot; status:&lt;br /&gt;
** '''00''' - Technology is not already researched&lt;br /&gt;
** '''01''' - Technology is already researched&lt;br /&gt;
* '''u8[24]''': 1 byte for each technology for global availability defaults:&lt;br /&gt;
** '''00''' - Technology is not available by default&lt;br /&gt;
** '''01''' - Technology is available by default&lt;br /&gt;
* '''u8[24]''': 1 byte for each technology for global &amp;quot;already researched&amp;quot; defaults:&lt;br /&gt;
** '''00''' - Technology is not already researched by default&lt;br /&gt;
** '''01''' - Technology is already researched by default&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology in order of its technology id, then each player, indicating whether a player uses the global defaults:&lt;br /&gt;
** '''00''' - Technology overrides defaults for player&lt;br /&gt;
** '''01''' - Technology uses default settings for player&lt;br /&gt;
See [[#List of Technology IDs]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIT&amp;quot; - Placed Units==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 36 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the pre-placed units on the map and their properties. Each unit on the map gets the following structure:&lt;br /&gt;
* '''u32''': The unit's class instance (sort of a &amp;quot;serial number&amp;quot;)&lt;br /&gt;
* U16''': X coordinate of unit&lt;br /&gt;
* U16''': Y coordinate of unit&lt;br /&gt;
* '''u16''': Unit ID&lt;br /&gt;
* '''u16''': Type of relation to another building (i.e. add-on, nydus link)&lt;br /&gt;
** '''Bit 9''' - Nydus Link&lt;br /&gt;
** '''Bit 10''' - Addon Link&lt;br /&gt;
* '''u16''': Flags of special properties which can be applied to the unit and are valid:&lt;br /&gt;
** '''Bit 0''' - Cloak is valid&lt;br /&gt;
** '''Bit 1''' - Burrow is valid&lt;br /&gt;
** '''Bit 2''' - In transit is valid&lt;br /&gt;
** '''Bit 3''' - Hallucinated is valid&lt;br /&gt;
** '''Bit 4''' - Invincible is valid&lt;br /&gt;
** '''Bit 5-15''' - Unused&lt;br /&gt;
* '''u16''': Out of the elements of the unit data, the properties which can be changed by the map maker:&lt;br /&gt;
** '''Bit 0''' - Owner player is valid (the unit is not a critter, start location, etc.; not a neutral unit)&lt;br /&gt;
** '''Bit 1''' - HP is valid&lt;br /&gt;
** '''Bit 2''' - Shields is valid&lt;br /&gt;
** '''Bit 3''' - Energy is valid (unit is a wraith, etc.)&lt;br /&gt;
** '''Bit 4''' - Resource amount is valid (unit is a mineral patch, vespene geyser, etc.)&lt;br /&gt;
** '''Bit 5''' - Amount in hangar is valid (unit is a reaver, carrier, etc.)&lt;br /&gt;
** '''Bit 6-15''' - Unused&lt;br /&gt;
* '''u8''': Player number of owner (0-based)&lt;br /&gt;
* '''u8''': Hit points % (1-100)&lt;br /&gt;
* '''u8''': Shield points % (1-100)&lt;br /&gt;
* '''u8''': Energy points % (1-100)&lt;br /&gt;
* '''u32''': Resource amount&lt;br /&gt;
* '''u16''': Number of units in hangar&lt;br /&gt;
* '''u16''': Unit state flags&lt;br /&gt;
** '''Bit 0''' - Unit is cloaked&lt;br /&gt;
** '''Bit 1''' - Unit is burrowed&lt;br /&gt;
** '''Bit 2''' - Building is in transit&lt;br /&gt;
** '''Bit 3''' - Unit is hallucinated&lt;br /&gt;
** '''Bit 4''' - Unit is invincible&lt;br /&gt;
** '''Bit 5-15''' - Unused&lt;br /&gt;
* '''u32''': Unused&lt;br /&gt;
* '''u32''': Class instance of the unit to which this unit is related to (i.e. via an add-on, nydus link, etc.). It is &amp;quot;0&amp;quot; if the unit is not linked to any other unit.&lt;br /&gt;
Notes about UNIT:&lt;br /&gt;
* The X/Y coordinates are the center of the sprite of the unit (in pixels).&lt;br /&gt;
* Please edit if you could confirm the bit values to be correct/if you know more bit values.&lt;br /&gt;
* Default values will apply if bit values are unchecked. Defaults: 100% HP, 100% SP, 100% EP, 0 resources, 0 hangar count.&lt;br /&gt;
* This section can be split. Additional UNIT sections will add more units.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;ISOM&amp;quot; - Isometric Terrain==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section is required to place isometric terrain on the map. It provides data about the nature of the isometrical &amp;quot;diamonds&amp;quot; (the editing mode of StarEdit).&lt;br /&gt;
* '''u16[ (width / 2 + 1) * (height + 1) * 4 ]''': 4 integers for each map rectangle tile (plus one extra tile to the right and bottom of the map), as per the RECT structure. Each rectangle border (left, top, right, bottom) is assigned an &amp;quot;ISOM value.&amp;quot; These form the &amp;quot;diamond&amp;quot; pattern of the map, and each rectangle thus gets two ISOM values associated with it. StarEdit somehow hashes these (the exact algorithm is unknown) and thus produces the tile index of the rectangle (which it stores in TILE for reasons of efficiency). The index of the rectangle's right tile is that of its left tile + 16.&lt;br /&gt;
This section is the only truly unknown section of the .chk format. If you're an ex-Blizzard employee or SI, please edit this section. If you have additional research, post on the forums about it and/or edit this section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TILE&amp;quot; - StarEdit Terrain==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section will only be different from the [[#&amp;quot;MTXM&amp;quot; - StarCraft Terrain|MTXM]] section in tiles where doodads are present.&lt;br /&gt;
* '''u16[ map width * height ]''': 1 integer for each map tile. Moves horizontally across the map.&lt;br /&gt;
The values in TILE are normally directly generated from the ISOM section (see &amp;quot;'ISOM' section&amp;quot; above), and thus do not match that of MTXM on doodad tiles.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;DD2 &amp;quot; - StarEdit Sprites (Doodads)==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section contains the doodad map of the level. There are several parts to doodads. The graphical portion is stored in the [[#&amp;quot;MTXM&amp;quot; - StarCraft Terrain|MTXM]] section. The second part of the doodad is stored in this section. This section is only used by the map editor.&lt;br /&gt;
&lt;br /&gt;
Each doodad in the map gets the following structure:&lt;br /&gt;
* '''u16''': Number of the doodad. Size of the doodad is dependent on this. Doodads are different for each tileset.&lt;br /&gt;
* '''u16''': X coordinate of the doodad unit&lt;br /&gt;
* '''u16''': Y coordinate of the doodad unit&lt;br /&gt;
* '''u8''': Player number that owns the doodad&lt;br /&gt;
* '''u8''': Enabled flag&lt;br /&gt;
** '''00''' - Doodad is enabled (trap can attack, door is closed, etc)&lt;br /&gt;
** '''01''' - Doodad is disabled&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;THG2&amp;quot; - StarCraft Sprites==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 10 bytes.''&lt;br /&gt;
&lt;br /&gt;
The map editor only writes to this section. Starcraft uses this section.&lt;br /&gt;
&lt;br /&gt;
Sprites, usually on doodads, get the following structure.&lt;br /&gt;
* '''u16''': Unit/Sprite number of the sprite&lt;br /&gt;
* '''u16''': X coordinate of the doodad unit&lt;br /&gt;
* '''u16''': Y coordinate of the doodad unit&lt;br /&gt;
* '''u8''': Player number that owns the doodad&lt;br /&gt;
* '''u8''': Unused&lt;br /&gt;
* '''u16''': Flags&lt;br /&gt;
** '''Bit 0-11''' - Unused&lt;br /&gt;
** '''Bit 12''' - Draw as sprite (Determines if it is a sprite or a unit sprite)&lt;br /&gt;
** '''Bit 13''' - Unused&lt;br /&gt;
** '''Bit 14''' - Unused&lt;br /&gt;
** '''Bit 15''' - Disabled (Only valid if Draw as sprite is unchecked, disables the unit)&lt;br /&gt;
This section can be split. Additional THG2 sections will add more sprites.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MASK&amp;quot; - Fog of War Layer==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: This section will always validate.''&lt;br /&gt;
&lt;br /&gt;
This section contains the data on fog of war for each player. This is whether at the start of the game that levels of black space that is available.&lt;br /&gt;
* '''u8[ map width * height ]''': One byte for each map tile. The bits indicate for each player the fog of war.&lt;br /&gt;
** '''Bit 0''' - Player 1's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 1''' - Player 2's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 2''' - Player 3's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 3''' - Player 4's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 4''' - Player 5's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 5''' - Player 6's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 6''' - Player 7's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 7''' - Player 8's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
Any size greater than width*height will be ignored. Any size less will default missing tiles to 0xFF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;STR &amp;quot; - String Data==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be at least 1 byte.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the strings in the map.&lt;br /&gt;
* '''u16''': Number of strings in the section (Default''': 1024)&lt;br /&gt;
* '''u16[Number of strings]''': 1 integer for each string specifying the offset (the spot where the string starts in the section from the start of it).&lt;br /&gt;
* '''Strings''': After the offsets, this is where every string in the map goes, one after another. Each one is terminated by a null character.&lt;br /&gt;
This section can contain more or less then 1024 string offsests and will work in Starcraft.&amp;lt;br&amp;gt;&lt;br /&gt;
By default the first byte in '''Strings''' is a NUL character, and all unused offsets in the STR section point to this NUL character.&lt;br /&gt;
Note that STR sections can be stacked in a smiliar fashion as MTXM. The exact mechanisms of this are uncertain.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPRP&amp;quot; - CUWP Slots==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1280 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section is used whenever the create units with properties trigger is used. Since a slot has to be assigned to the action, this is where each slot is designated.&lt;br /&gt;
&lt;br /&gt;
There are 64 of the following structures regardless of how many are used and it cannot exceed 64.&lt;br /&gt;
* '''u16''': Flag of which special properties can be applied to unit, and are valid.&lt;br /&gt;
** '''Bit 0''' - Cloak bit is valid&lt;br /&gt;
** '''Bit 1''' - Burrowed bit is valid&lt;br /&gt;
** '''Bit 2''' - In transit bit is valid&lt;br /&gt;
** '''Bit 3''' - Hallucinated bit is valid&lt;br /&gt;
** '''Bit 4''' - Invincible bit is valid&lt;br /&gt;
** '''Bit 5-15''' - Unknown/unused&lt;br /&gt;
* '''u16''': Which elements of the unit data are valid, which properties can be changed by the map maker.&lt;br /&gt;
** '''Bit 0''' - Owner player is valid (unit is not neutral)&lt;br /&gt;
** '''Bit 1''' - HP is valid&lt;br /&gt;
** '''Bit 2''' - Shields is valid&lt;br /&gt;
** '''Bit 3''' - Energy is valid&lt;br /&gt;
** '''Bit 4''' - Resource amount is valid (unit is a resource)&lt;br /&gt;
** '''Bit 5''' - Amount in hanger is valid&lt;br /&gt;
** '''Bit 6''' - Unknown/unused&lt;br /&gt;
* '''u8''': Player number that owns unit. Will always be NULL in this section (0)&lt;br /&gt;
* '''u8''': Hit point % (1-100)&lt;br /&gt;
* '''u8''': Shield point % (1-100)&lt;br /&gt;
* '''u8''': Energy point % (1-100)&lt;br /&gt;
* '''u32''': Resource amount (for resources only)&lt;br /&gt;
* '''u16''': # of units in hangar&lt;br /&gt;
* '''u16''': Flags&lt;br /&gt;
** '''Bit 0''' - Unit is cloaked&lt;br /&gt;
** '''Bit 1''' - Unit is burrowed&lt;br /&gt;
** '''Bit 2''' - Building is in transit&lt;br /&gt;
** '''Bit 3''' - Unit is hallucinated&lt;br /&gt;
** '''Bit 4''' - Unit is invincible&lt;br /&gt;
** '''Bit 5-15''' - Unknown/unused&lt;br /&gt;
* '''u32''': Unknown/unused. Padding?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPUS&amp;quot; - CUWP Slots Used==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section goes along with the &amp;quot;UPRP&amp;quot; section. This section just indicates which of the 64 unit properties slot are used.&lt;br /&gt;
* '''u8[64]''': 1 byte for each trigger unit properties slot&lt;br /&gt;
** '''00''' - Properties slot is unused&lt;br /&gt;
** '''01''' - Properties slot is used&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MRGN&amp;quot; - Locations==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: 1280 bytes for retail, 5100 bytes for Hybrid and Broodwar.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the locations that the map uses. In a vanilla map, this section contains 64 locations. In a Hybrid or Brood War map, this section will expand to contain 255 locations.&lt;br /&gt;
&lt;br /&gt;
Each location gets one of the following location entries. The 'Anywhere' location, is ALWAYS location 64.&lt;br /&gt;
* '''u32''': Left (X1) coordinate of location, in pixels (usually 32 pt grid aligned)&lt;br /&gt;
* '''u32''': Top (Y1) coordinate of location, in pixels&lt;br /&gt;
* '''u32''': Right (X2) coordinate of location, in pixels&lt;br /&gt;
* '''u32''': Bottom (Y2) coordinate of location, in pixels&lt;br /&gt;
* '''u16''': String number of the name of this location&lt;br /&gt;
* '''u16''': Location elevation flags. If an elevation is disabled in the location, it's bit will be on (1)&lt;br /&gt;
** '''Bit 0''' - Low elevation&lt;br /&gt;
** '''Bit 1''' - Medium elevation&lt;br /&gt;
** '''Bit 2''' - High elevation&lt;br /&gt;
** '''Bit 3''' - Low air&lt;br /&gt;
** '''Bit 4''' - Medium air&lt;br /&gt;
** '''Bit 5''' - High air&lt;br /&gt;
** '''Bit 6-15''' - Unused&lt;br /&gt;
Note that in typical locations Right is always larger than Left and Bottom is always larger than Top. However, you can reverse one or both of these for [[Inverted Locations]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TRIG&amp;quot; - Triggers==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 2400 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the triggers in the map. This along with [[#&amp;quot;MBRF&amp;quot; - Mission Briefings|MBRF]] is the most complicated section in the entire scenario.chk file as there is a lot of data packed into too little of a space. Refer to the appendix at the bottom of this page for more information.&lt;br /&gt;
For easy reference, since each trigger contains 2400 bytes, the amount of triggers can be gotten by taking the section length and dividing by 2400.&lt;br /&gt;
Every single trigger in the map will have the following format:&lt;br /&gt;
* 16 Conditions (20 byte struct)&amp;lt;br&amp;gt; Every trigger has 16 of the following format, even if only one condition is used. See the appendix for information on which items are used for what conditions.&lt;br /&gt;
** '''u32''': Location number for the condition (1 based -- 0 refers to No Location), EUD Bitmask for a Death condition if the MaskFlag is set to &amp;quot;SC&amp;quot;&lt;br /&gt;
** '''u32''': [[#List of Players/Group IDs|Group]] that the condition applies to&lt;br /&gt;
** '''u32''': Qualified number (how many/resource amount)&lt;br /&gt;
** '''u16''': [[#Trigger Unit Types|Unit ID]] condition applies to&lt;br /&gt;
** '''u8''': [[#Numeric Comparisons|Numeric comparison]], [[#Switch States|switch state]]&lt;br /&gt;
** '''u8''': [[#Trigger Conditions List|Condition byte]]&lt;br /&gt;
** '''u8''': [[#Resource Types|Resource type]], [[#Score Types|score type]], Switch number (0-based)&lt;br /&gt;
** '''u8''': Flags&lt;br /&gt;
*** '''Bit 0''' - Unknown/unused&lt;br /&gt;
*** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled/ignored&lt;br /&gt;
*** '''Bit 2''' - Always display flag.&lt;br /&gt;
*** '''Bit 3''' - Unit properties is used. ('''Note:''' This is used in [[TRG|*.trg]] files)&lt;br /&gt;
*** '''Bit 4''' - Unit type is used. May not be necessary?&lt;br /&gt;
*** '''Bit 5-7''' - Unknown/unused&lt;br /&gt;
** '''u16''': MaskFlag: set to &amp;quot;SC&amp;quot; (0x53, 0x43) when using the bitmask for EUDs, 0 otherwise&lt;br /&gt;
* 64 Actions (32 byte struct)&amp;lt;br&amp;gt; Immediately following the 16 conditions, there are 64 actions. There will always be 64 of the following structure, even if some of them are unused.&lt;br /&gt;
** '''u32''': Location - source location in &amp;quot;Order&amp;quot; and &amp;quot;Move Unit&amp;quot;, dest location in &amp;quot;Move Location&amp;quot; (1 based -- 0 refers to No Location), EUD Bitmask for a Death action if the MaskFlag is set to &amp;quot;SC&amp;quot;&lt;br /&gt;
** '''u32''': String number for trigger text (0 means no string)&lt;br /&gt;
** '''u32''': WAV string number (0 means no string)&lt;br /&gt;
** '''u32''': Seconds/milliseconds of time&lt;br /&gt;
** '''u32''': First (or only) [[#List of Players/Group IDs|Group/Player]] affected.&lt;br /&gt;
** '''u32''': Second group affected, secondary location (1-based), CUWP #, number, AI script (4-byte string), switch (0-based #)&lt;br /&gt;
** '''u16''': [[#Trigger Unit Types|Unit type]], [[#Score Types|score type]], [[#Resource Types|resource type]], [[#Alliance Statuses|alliance status]]&lt;br /&gt;
** '''u8''': [[#Trigger Actions List|Action byte]]&lt;br /&gt;
** '''u8''': Number of units (0 means All Units), [[#Action States|action state]], [[#Unit Orders|unit order]], [[#Number Modifiers|number modifier]]&lt;br /&gt;
** '''u8''': Flags&lt;br /&gt;
*** '''Bit 0''' - Ignore a wait/transmission once.&lt;br /&gt;
*** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled.&lt;br /&gt;
*** '''Bit 2''' - Always display flag - when not set: if the user has turned off subtitles (see sound options) the text will not display, when set: text will always display&lt;br /&gt;
*** '''Bit 3''' - Unit properties is used. Staredit uses this for *.trg files.&lt;br /&gt;
*** '''Bit 4''' - Unit type is used.&lt;br /&gt;
*** '''Bit 5-7''' - Unknown/unused&lt;br /&gt;
** '''u8''': Padding&lt;br /&gt;
** '''u16 (2 bytes)''': MaskFlag: set to &amp;quot;SC&amp;quot; (0x53, 0x43) when using the bitmask for EUDs, 0 otherwise&lt;br /&gt;
* Player Execution&amp;lt;br&amp;gt; Following the 16 conditions and 64 actions, every trigger also has this structure&lt;br /&gt;
** '''u32''': execution flags&lt;br /&gt;
*** '''Bit 0''' - All conditions are met, executing actions, cleared on the next trigger loop.&lt;br /&gt;
*** '''Bit 1''' - Ignore the following actions: Defeat, Draw.&lt;br /&gt;
*** '''Bit 2''' - Preserve trigger. (Can replace Preserve Trigger action)&lt;br /&gt;
*** '''Bit 3''' - Ignore execution.&lt;br /&gt;
*** '''Bit 4''' - Ignore all of the following actions for this trigger until the next trigger loop: Wait, PauseGame, Transmission, PlayWAV, DisplayTextMessage, CenterView, MinimapPing, TalkingPortrait, and MuteUnitSpeech.&lt;br /&gt;
*** '''Bit 5''' - This trigger has paused the game, ignoring subsequent calls to Pause Game (Unpause Game clears this flag only in the same trigger), may automatically call unpause at the end of action execution?&lt;br /&gt;
*** '''Bit 6''' - Wait skipping disabled for this trigger, cleared on next trigger loop.&lt;br /&gt;
*** '''Bit 7-31''' - Unknown/unused&lt;br /&gt;
** '''u8[27]''': 1 byte for each player in the [[#List of Players/Group IDs]]&lt;br /&gt;
*** '''00''' - Trigger is not executed for player&lt;br /&gt;
*** '''01''' - Trigger is executed for player&lt;br /&gt;
** '''u8''': Index of the current action, in StarCraft this is incremented after each action is executed, trigger execution ends when this is 64 (Max Actions) or an action is encountered with Action byte as 0&lt;br /&gt;
This section can be split. Additional TRIG sections will add more triggers.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MBRF&amp;quot; - Mission Briefings==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 2400 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all of the mission briefings shown by the players.&lt;br /&gt;
&lt;br /&gt;
See [[#&amp;quot;TRIG&amp;quot; - Triggers|&amp;quot;TRIG&amp;quot;]] section for format, as it is exactly the same except for the conditions. In this section the 16 conditions are still there, they are all null except for the very first condition, which only has a condition byte of 13. See [[#Mission Briefing Actions List]] for the action bytes for the mission briefing actions.&lt;br /&gt;
&lt;br /&gt;
This section can be split. Additional MBRF sections will add more briefing triggers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SPRP&amp;quot; - Scenario Properties==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4 bytes.''&lt;br /&gt;
&lt;br /&gt;
* '''u16''': String number of the scenario name&lt;br /&gt;
* '''u16''': String number of the scenarios description.&lt;br /&gt;
A string index of 0 for the map name will default it to its file name. A string index of 0 description will default to a predefined string.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;FORC&amp;quot; - Force Settings==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be less than or equal to 20 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the forces and the information about them.&lt;br /&gt;
* '''u8[8]''': 1 byte for each active player, specifying which of the 4 forces (0-based) that the player's on&lt;br /&gt;
* '''u16[4]''': 1 integer for each force, string number of the name of the force&lt;br /&gt;
* '''u8[4]''': 1 byte for each force specifying the properties:&lt;br /&gt;
** '''Bit 0''' - Random start location&lt;br /&gt;
** '''Bit 1''' - Allies&lt;br /&gt;
** '''Bit 2''' - Allied victory&lt;br /&gt;
** '''Bit 3''' - Shared vision&lt;br /&gt;
** '''Bit 4-7''' - Unused&lt;br /&gt;
Notes about FORC:&lt;br /&gt;
* If there is no string specified for a force name, it will default to a &amp;quot;Force #&amp;quot; string.&lt;br /&gt;
* If this section is less than 20 bytes, the remaining bytes are defaulted to 0.&lt;br /&gt;
* Players can be on a force greater than 4, however they will not appear in the game lobby.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;WAV &amp;quot; - WAV String Indexes==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
There are 512 wav entires regardless of how many are actually used.&lt;br /&gt;
* '''u32[512]''': 1 long for each WAV. Indicates a string index is used for a WAV path in the MPQ. If the entry is not used, it will be 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIS&amp;quot; - Unit Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4048 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;UNIx&amp;quot; - BW Unit Settings|&amp;quot;UNIx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains the unit settings for the level:&lt;br /&gt;
* '''u8[228]''': 1 byte for each unit, in order of Unit ID&lt;br /&gt;
** '''00''' - Unit does not use default settings&lt;br /&gt;
** '''01''' - Unit does use default settings&lt;br /&gt;
* '''u32[228]''': Hit points for unit (Note the displayed value is this value / 256, with the low byte being a fractional HP value)&lt;br /&gt;
* '''u16[228]''': Shield points, in order of Unit ID&lt;br /&gt;
* '''u8[228]''': Armor points, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Build time (1/60 seconds), in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Mineral cost, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Gas cost, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': String number, in order of Unit ID&lt;br /&gt;
* '''u16[100]''': Base weapon damage the weapon does, in weapon ID order ([[#List of Unit Weapon IDs]])&lt;br /&gt;
* '''u16[100]''': Upgrade bonus weapon damage, in weapon ID order&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGS&amp;quot; - Upgrade Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 598 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;UPGx&amp;quot; - BW Upgrade Settings|&amp;quot;UPGx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains upgrade settings:&lt;br /&gt;
* '''u8[46]''': 1 byte per each upgrade, in order of upgrade id.&lt;br /&gt;
** '''00''' - Upgrade uses custom settings&lt;br /&gt;
** '''01''' - Upgrade uses default settings&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, gas time factor for each upgrade, in order of upgrade id.&lt;br /&gt;
See [[#List of Upgrade IDs]] for upgrade ids.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TECS&amp;quot; - Tech Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 216 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;TECx&amp;quot; - BW Tech Settings|&amp;quot;TECx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains technology/special abilities settings:&lt;br /&gt;
* '''u8[24]''': 1 byte per each technology, specifies if the tech overrides the default settings. In order of technology id&lt;br /&gt;
** '''00''' - Technology uses custom settings&lt;br /&gt;
** '''01''' - Technology uses default settings&lt;br /&gt;
* '''u16[24]''': Mineral cost to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Gas cost to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Time required to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Energy cost to cast technology/special ability. In order of technology id.&lt;br /&gt;
See [[#List of Technology IDs]] for technology ids.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SWNM&amp;quot; - Switch Names==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section contains the strings used for each switch. There are 256 switches, and can't be any more or any less.&lt;br /&gt;
* '''u32[256]''': One long for each switch, specifies the string number for the name of each switch. Unnamed switches will have an index of 0, and have a default switch name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;COLR&amp;quot; - Player Colors==&lt;br /&gt;
''Required for Brood War only and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Can be in non-Brood War maps in Remaster, if CRGB is also present.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 8 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section indicates what color each player is, but only has effect on Brood War.&lt;br /&gt;
* '''u8[8]''': 1 byte for each player, indicates the color of the player&lt;br /&gt;
** '''00''' - Red&lt;br /&gt;
** '''01''' - Blue&lt;br /&gt;
** '''02''' - Teal&lt;br /&gt;
** '''03''' - Purple&lt;br /&gt;
** '''04''' - Orange&lt;br /&gt;
** '''05''' - Brown&lt;br /&gt;
** '''06''' - White&lt;br /&gt;
** '''07''' - Yellow&lt;br /&gt;
** '''08''' - Green&lt;br /&gt;
** '''09''' - Pale yellow&lt;br /&gt;
** '''10''' - Tan&lt;br /&gt;
** '''11''' - Azure (Neutral color)&lt;br /&gt;
Other values can be used but may have different results depending on the tileset. Any color value above 11 is an overflow. As of patch 1.18.6 values above 11 result in default player color.&lt;br /&gt;
&lt;br /&gt;
SC:R Only colors:&lt;br /&gt;
Selecting these in a non-SC:R map seems to just use default colors, unless the [[#&amp;quot;CRGB&amp;quot; - Remastered Player Colors|CRGB]] section is also present regardless of version (including non-BW versions).&lt;br /&gt;
* '''12''' - Pale Green&lt;br /&gt;
* '''13''' - Blueish Grey&lt;br /&gt;
* '''14''' - Pale Yellow&lt;br /&gt;
* '''15''' - Cyan&lt;br /&gt;
* '''16''' - Pink&lt;br /&gt;
* '''17''' - Olive&lt;br /&gt;
* '''18''' - Lime&lt;br /&gt;
* '''19''' - Navy&lt;br /&gt;
* '''20''' - Magenta&lt;br /&gt;
* '''21''' - Grey&lt;br /&gt;
* '''22''' - Black&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;CRGB&amp;quot; - Remastered Player Colors==&lt;br /&gt;
''Requirement unknown, but can be in any map type including non-remaster maps.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 32 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''u8[8][3]''': 3 bytes for each player corresponding to an RGB color value&lt;br /&gt;
** '''u8''': R&lt;br /&gt;
** '''u8''': G&lt;br /&gt;
** '''u8''': B&lt;br /&gt;
* '''u8[8]''': Indicates how to select the color for each player&lt;br /&gt;
** '''0''' - Random Predefined&lt;br /&gt;
** '''1''' - Player's Choice&lt;br /&gt;
** '''2''' - Custom RGB Color (RGB value for the corresponding player defined above)&lt;br /&gt;
** '''3''' - Use &amp;quot;COLR&amp;quot; selection&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PUPx&amp;quot; - BW Upgrade Restrictions==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2318 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UPGR&amp;quot; - Upgrade Restrictions|&amp;quot;UPGR&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is identical to UPGR section except it uses the Brood War set of 61 upgrades instead of the original 46.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PTEx&amp;quot; - BW Tech Restrictions==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1672 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;PTEC&amp;quot; - Tech Restrictions|&amp;quot;PTEC&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is identical to PTEC section except it uses the Brood War set of 44 technologies instead of the original 24.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIx&amp;quot; - BW Unit Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4168 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UNIS&amp;quot; - Unit Settings|&amp;quot;UNIS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is indentical to UNIS section except it uses the Brood War set of 130 weapons instead of the original 100.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGx&amp;quot; - BW Upgrade Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 794 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UPGS&amp;quot; - Upgrade Settings|&amp;quot;UPGS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section the same as UPGS except section except it uses the Brood War set of 61 upgrades instead of the original 46, and there is an unused byte after the first set:&lt;br /&gt;
* '''u8[61]''': 1 byte per each upgrade, in order of upgrade id.&lt;br /&gt;
** '''00''' - Upgrade uses custom settings&lt;br /&gt;
** '''01''' - Upgrade uses default settings&lt;br /&gt;
* '''u8''': Unused.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, gas time factor for each upgrade, in order of upgrade id.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TECx&amp;quot; - BW Tech Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 396 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;TECS&amp;quot; - Tech Settings|&amp;quot;TECS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is indentical to UNIS section except it uses the Brood War set of 44 technologies instead of the original 24.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Appendix=&lt;br /&gt;
A set of references and IDs that should help you easier in the trigger section and the technology/player ids, etc:&lt;br /&gt;
&lt;br /&gt;
==Trigger Conditions List==&lt;br /&gt;
* 0 = No Condition&lt;br /&gt;
* 1 = Countdown Timer(Comparison, QNumber)&lt;br /&gt;
* 2 = Command(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 3 = Bring(Player, Comparison, TUnit, Loc, QNumber)&lt;br /&gt;
* 4 = Accumulate(Player, Comparison, QNumber, ResType)&lt;br /&gt;
* 5 = Kill(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 6 = Command the Most(TUnit)&lt;br /&gt;
* 7 = Commands the Most At(TUnit, Loc)&lt;br /&gt;
* 8 = Most Kills(TUnit)&lt;br /&gt;
* 9 = Highest Score(Score)&lt;br /&gt;
* 10 = Most Resources(ResType)&lt;br /&gt;
* 11 = Switch(Switch)&lt;br /&gt;
* 12 = Elapsed Time(Comparison, QNumber)&lt;br /&gt;
* 13 = Data is a Mission Briefing. Conditions are N/A (Same as Never)&lt;br /&gt;
* 14 = Opponents(Player, Comparison, QNumber)&lt;br /&gt;
* 15 = Deaths(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 16 = Command the Least(TUnit)&lt;br /&gt;
* 17 = Command the Least At(TUnit, Loc)&lt;br /&gt;
* 18 = Least Kills(TUnit)&lt;br /&gt;
* 19 = Lowest Score(Score)&lt;br /&gt;
* 20 = Least Resources(ResType)&lt;br /&gt;
* 21 = Score(Player, Comparison, Score, QNumber)&lt;br /&gt;
* 22 = Always (Same as No Condition)&lt;br /&gt;
* 23 = Never&lt;br /&gt;
&lt;br /&gt;
==Trigger Actions List==&lt;br /&gt;
* 0 = No Action&lt;br /&gt;
* 1 = Victory&lt;br /&gt;
* 2 = Defeat&lt;br /&gt;
* 3 = Preserve Trigger&lt;br /&gt;
* 4 = Wait(Time)&lt;br /&gt;
* 5 = Pause Game (Single player only)&lt;br /&gt;
* 6 = Unpause Game (Single player only)&lt;br /&gt;
* 7 = Transmission(Text, Unit, Loc, Time, Modifier, Wave, WavTime)&lt;br /&gt;
* 8 = Play WAV(Wav, WavTime)&lt;br /&gt;
* 9 = Display Text Message(Text)&lt;br /&gt;
* 10 = Center View(Loc)&lt;br /&gt;
* 11 = Create Unit with Properties(Player, Unit, Number, Loc, UnitProp)&lt;br /&gt;
* 12 = Set Mission Objectives(Text)&lt;br /&gt;
* 13 = Set Switch(Switch, SwAction)&lt;br /&gt;
* 14 = Set Countdown Timer(Time, Modifier)&lt;br /&gt;
* 15 = Run AI Script(AIScript)&lt;br /&gt;
* 16 = Run AI Script At Location(AIScript)&lt;br /&gt;
* 17 = Leader Board (Control) (Text, TUnit)&lt;br /&gt;
* 18 = Leader Board (Control At Location) (Text, TUnit, Loc)&lt;br /&gt;
* 19 = Leader Board (Resources) (Text, ResType)&lt;br /&gt;
* 20 = Leader Board (Kills) (Text, TUnit)&lt;br /&gt;
* 21 = Leader Board (Points) (Text, Score)&lt;br /&gt;
* 22 = Kill Unit (Player, TUnit)&lt;br /&gt;
* 23 = Kill Unit At Location(Player, TUnit, Number, Loc)&lt;br /&gt;
* 24 = Remove Unit(Player, TUnit)&lt;br /&gt;
* 25 = Remove Unit At Location(Player, TUnit, Number, Loc)&lt;br /&gt;
* 26 = Set Resources(Player, Number, Modifier, ResType)&lt;br /&gt;
* 27 = Set Score(Player, Number, Modifier, Score)&lt;br /&gt;
* 28 = Minimap Ping(Loc)&lt;br /&gt;
* 29 = Talking Portrait(Unit, Time)&lt;br /&gt;
* 30 = Mute Unit Speech&lt;br /&gt;
* 31 = Unmute Unit Speech&lt;br /&gt;
* 32 = Leaderboard Computer Players(State)&lt;br /&gt;
* 33 = Leaderboard Goal (Control) (Text, TUnit, Number)&lt;br /&gt;
* 34 = Leaderboard Goal (Control At Location) (Text, TUnit, Number, Loc)&lt;br /&gt;
* 35 = Leaderboard Goal (Resources) (Text, TUnit, Number, ResType)&lt;br /&gt;
* 36 = Leaderboard Goal (Kills) (Text, TUnit, Number)&lt;br /&gt;
* 37 = Leaderboard Goal (Points) (Text, Number, Score)&lt;br /&gt;
* 38 = Move Location(Player, TUnit, SLoc, DLoc)&lt;br /&gt;
* 39 = Move Unit(Player, TUnit, Number, SLoc, DLoc)&lt;br /&gt;
* 40 = Leaderboard (Greed) (Number)&lt;br /&gt;
* 41 = Set Next Scenario(Text) (Single player only)&lt;br /&gt;
* 42 = Set Doodad State(Player, TUnit, Loc, State)&lt;br /&gt;
* 43 = Set Invincibility(Player, TUnit, Loc, State)&lt;br /&gt;
* 44 = Create Unit(Player, Unit, Number, Loc)&lt;br /&gt;
* 45 = Set Deaths(Player, TUnit, Number, Modifier)&lt;br /&gt;
* 46 = Order(Player, TUnit, SLoc, DLoc, Order)&lt;br /&gt;
* 47 = Comment(Text)&lt;br /&gt;
* 48 = Give Units to Player(SPlayer, DPlayer, TUnit, Number, Loc)&lt;br /&gt;
* 49 = Modify Unit Hit Points(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 50 = Modify Unit Energy(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 51 = Modify Unit Shield Points(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 52 = Modify Unit Resource Amount(Player, Number, ModAmount, Loc)&lt;br /&gt;
* 53 = Modify Unit Hanger Count(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 54 = Pause Timer&lt;br /&gt;
* 55 = Unpause Timer&lt;br /&gt;
* 56 = Draw&lt;br /&gt;
* 57 = Set Alliance Status(Player, AllyStatus)&lt;br /&gt;
* 58 = Disable Debug Mode (Single player only)&lt;br /&gt;
* 59 = Enable Debug Mode (Single player only)&lt;br /&gt;
&lt;br /&gt;
==Mission Briefing Actions List==&lt;br /&gt;
* 0 - No Action&lt;br /&gt;
* 1 - Wait(Time)&lt;br /&gt;
* 2 - Play WAV(Wave, WavTime)&lt;br /&gt;
* 3 - Text Message(Text, Time)&lt;br /&gt;
* 4 - Mission Objectives(Text)&lt;br /&gt;
* 5 - Show Portrait(Unit, Slot)&lt;br /&gt;
* 6 - Hide Portrait(Slot)&lt;br /&gt;
* 7 - Display Speaking Portrait(Slot, Time)&lt;br /&gt;
* 8 - Transmission(Text, Slot, Time, Modifier, Wave, WavTime)&lt;br /&gt;
* 9 - Skip Tutorial Enabled&lt;br /&gt;
&lt;br /&gt;
==Switch States==&lt;br /&gt;
* 2 = Switch is set&lt;br /&gt;
* 3 = Switch is cleared&lt;br /&gt;
&lt;br /&gt;
==Numeric Comparisons==&lt;br /&gt;
* 0 = At least&lt;br /&gt;
* 1 = At most&lt;br /&gt;
* 10 = Exactly&lt;br /&gt;
&lt;br /&gt;
==Score Types==&lt;br /&gt;
* 0 = Total&lt;br /&gt;
* 1 = Units&lt;br /&gt;
* 2 = Buildings&lt;br /&gt;
* 3 = Units and Buildings&lt;br /&gt;
* 4 = Kills&lt;br /&gt;
* 5 = Razings&lt;br /&gt;
* 6 = Kills and Razings&lt;br /&gt;
* 7 = Custom&lt;br /&gt;
&lt;br /&gt;
==Resource Types==&lt;br /&gt;
* 0 = Ore&lt;br /&gt;
* 1 = Gas&lt;br /&gt;
* 2 = Ore and Gas&lt;br /&gt;
&lt;br /&gt;
==Alliance Statuses==&lt;br /&gt;
* 0 = Enemy&lt;br /&gt;
* 1 = Ally&lt;br /&gt;
* 2 = Allied Victory&lt;br /&gt;
&lt;br /&gt;
==Unit Orders==&lt;br /&gt;
* 0 = Move&lt;br /&gt;
* 1 = Patrol&lt;br /&gt;
* 2 = Attack&lt;br /&gt;
&lt;br /&gt;
==Action States==&lt;br /&gt;
* 4 = Enabled/Set switch&lt;br /&gt;
* 5  = Disabled/Clear switch&lt;br /&gt;
* 6 = Toggle/Toggle switch&lt;br /&gt;
* 11 = Randomize switch&lt;br /&gt;
&lt;br /&gt;
==Number Modifiers==&lt;br /&gt;
* 7 = Set to&lt;br /&gt;
* 8 = Add&lt;br /&gt;
* 9 = Subtract&lt;br /&gt;
&lt;br /&gt;
==Trigger Unit Types==&lt;br /&gt;
* All normal units (0-227)&lt;br /&gt;
* 228 = None&lt;br /&gt;
* 229 = Any unit&lt;br /&gt;
* 230 = Men&lt;br /&gt;
* 231 = Buildings&lt;br /&gt;
* 232 = Factories&lt;br /&gt;
&lt;br /&gt;
==List of Players/Group IDs==&lt;br /&gt;
* 0 = Player 1&lt;br /&gt;
* 1 = Player 2&lt;br /&gt;
* 2 = Player 3&lt;br /&gt;
* 3 = Player 4&lt;br /&gt;
* 4 = Player 5&lt;br /&gt;
* 5 = Player 6&lt;br /&gt;
* 6 = Player 7&lt;br /&gt;
* 7 = Player 8&lt;br /&gt;
* 8 = Player 9&lt;br /&gt;
* 9 = Player 10&lt;br /&gt;
* 10 = Player 11&lt;br /&gt;
* 11 = Player 12&lt;br /&gt;
* 12 = None (Unused, One-entry Overflow in some cases)&lt;br /&gt;
* 13 = Current Player&lt;br /&gt;
* 14 = Foes&lt;br /&gt;
* 15 = Allies&lt;br /&gt;
* 16 = Neutral Players&lt;br /&gt;
* 17 = All Players&lt;br /&gt;
* 18 = Force 1&lt;br /&gt;
* 19 = Force 2&lt;br /&gt;
* 20 = Force 3&lt;br /&gt;
* 21 = Force 4&lt;br /&gt;
* 22 = Unused 1&lt;br /&gt;
* 23 = Unused 2&lt;br /&gt;
* 24 = Unused 3&lt;br /&gt;
* 25 = Unused 4&lt;br /&gt;
* 26 = Non Allied Victory Players&lt;br /&gt;
&lt;br /&gt;
==List of Technology IDs==&lt;br /&gt;
* 0 = Stim Packs&lt;br /&gt;
* 1 = Lockdown&lt;br /&gt;
* 2 = EMP Shockwave&lt;br /&gt;
* 3 = Spider Mines&lt;br /&gt;
* 4 = Scanner Sweep&lt;br /&gt;
* 5 = Siege Mode&lt;br /&gt;
* 6 = Defensive Matrix&lt;br /&gt;
* 7 = Irradiate&lt;br /&gt;
* 8 = Yamato Gun&lt;br /&gt;
* 9 = Cloaking Field&lt;br /&gt;
* 10 = Personnel Cloaking&lt;br /&gt;
* 11 = Burrowing&lt;br /&gt;
* 12 = Infestation&lt;br /&gt;
* 13 = Spawn Broodling&lt;br /&gt;
* 14 = Dark Swarm&lt;br /&gt;
* 15 = Plague&lt;br /&gt;
* 16 = Consume&lt;br /&gt;
* 17 = Ensnare&lt;br /&gt;
* 18 = Parasite&lt;br /&gt;
* 19 = Psionic Storm&lt;br /&gt;
* 20 = Hallucination&lt;br /&gt;
* 21 = Recall&lt;br /&gt;
* 22 = Stasis Field&lt;br /&gt;
* 23 = Archon Warp&lt;br /&gt;
* 24 = Restoration&lt;br /&gt;
* 25 = Disruption Web&lt;br /&gt;
* 26 = Unused 26&lt;br /&gt;
* 27 = Mind Control&lt;br /&gt;
* 28 = Dark Archon Meld&lt;br /&gt;
* 29 = Feedback&lt;br /&gt;
* 30 = Optical Flare&lt;br /&gt;
* 31 = Maelstorm&lt;br /&gt;
* 32 = Lurker Aspect&lt;br /&gt;
* 33 = Unused 33&lt;br /&gt;
* 34 = Healing&lt;br /&gt;
* 35 = Unused 35&lt;br /&gt;
* 36 = Unused 36&lt;br /&gt;
* 37 = Unused 37&lt;br /&gt;
* 38 = Unused 38&lt;br /&gt;
* 39 = Unused 39&lt;br /&gt;
* 40 = Unused 40&lt;br /&gt;
* 41 = Unused 41&lt;br /&gt;
* 42 = Unused 42&lt;br /&gt;
* 43 = Unused 43&lt;br /&gt;
&lt;br /&gt;
==List of Upgrade IDs==&lt;br /&gt;
* 0 = Terran Infantry Armor&lt;br /&gt;
* 1 = Terran Vehicle Plating&lt;br /&gt;
* 2 = Terran Ship Plating&lt;br /&gt;
* 3 = Zerg Carapace&lt;br /&gt;
* 4 = Zerg Flyer Caparace&lt;br /&gt;
* 5 = Protoss Armor&lt;br /&gt;
* 6 = Protoss Plating&lt;br /&gt;
* 7 = Terran Infantry Weapons&lt;br /&gt;
* 8 = Terran Vehicle Weapons&lt;br /&gt;
* 9 = Terran Ship Weapons&lt;br /&gt;
* 10 = Zerg Melee Attacks&lt;br /&gt;
* 11 = Zerg Missile Attacks&lt;br /&gt;
* 12 = Zerg Flyer Attacks&lt;br /&gt;
* 13 = Protoss Ground Weapons&lt;br /&gt;
* 14 = Protoss Air Weapons&lt;br /&gt;
* 15 = Protoss Plasma Shields&lt;br /&gt;
* 16 = U-238 Shells&lt;br /&gt;
* 17 = Ion Thrusters&lt;br /&gt;
* 18 = Burst Lasers (Unused)&lt;br /&gt;
* 19 = Titan Reactor (SV +50)&lt;br /&gt;
* 20 = Ocular Implants&lt;br /&gt;
* 21 = Moebius Reactor (Ghost +50)&lt;br /&gt;
* 22 = Apollo Reactor (Wraith +50)&lt;br /&gt;
* 23 = Colossus Reactor (BC +50)&lt;br /&gt;
* 24 = Ventral Sacs&lt;br /&gt;
* 25 = Antennae&lt;br /&gt;
* 26 = Pneumatized Carapace&lt;br /&gt;
* 27 = Metabolic Boost&lt;br /&gt;
* 28 = Adrenal Glands&lt;br /&gt;
* 29 = Muscular Augments&lt;br /&gt;
* 30 = Grooved Spines&lt;br /&gt;
* 31 = Gamete Meiosis (Queen +50)&lt;br /&gt;
* 32 = Metasynaptic Node (Defiler +50)&lt;br /&gt;
* 33 = Singularity Charge&lt;br /&gt;
* 34 = Leg Enhancements&lt;br /&gt;
* 35 = Scarab Damage &lt;br /&gt;
* 36 = Reaver Capacity &lt;br /&gt;
* 37 = Gravitic Drive&lt;br /&gt;
* 38 = Sensor Array&lt;br /&gt;
* 39 = Gravitic Boosters&lt;br /&gt;
* 40 = Khaydarin Amulet (HT +50)&lt;br /&gt;
* 41 = Apial Sensors&lt;br /&gt;
* 42 = Gravitic Thrusters&lt;br /&gt;
* 43 = Carrier Capacity&lt;br /&gt;
* 44 = Khaydarin Core (Arbiter +50)&lt;br /&gt;
* 45 = Unknown Upgrade45&lt;br /&gt;
* 46 = Unknown Upgrade46&lt;br /&gt;
* 47 = Argus Jewel (Corsair +50)&lt;br /&gt;
* 48 = Unknown Upgrade48&lt;br /&gt;
* 49 = Argus Talisman (DA +50)&lt;br /&gt;
* 50 = Unknown Upgrade50&lt;br /&gt;
* 51 = Caduceus Reactor (Medic +50)&lt;br /&gt;
* 52 = Chitinous Plating&lt;br /&gt;
* 53 = Anabolic Synthesis&lt;br /&gt;
* 54 = Charon Booster&lt;br /&gt;
* 55 = Unknown Upgrade55&lt;br /&gt;
* 56 = Unknown Upgrade56&lt;br /&gt;
* 57 = Unknown Upgrade57&lt;br /&gt;
* 58 = Unknown Upgrade58&lt;br /&gt;
* 59 = Unknown Upgrade59&lt;br /&gt;
* 60 = Unknown Upgrade60&lt;br /&gt;
&lt;br /&gt;
==List of Unit Weapon IDs==&lt;br /&gt;
* 0 = Gauss Rifle (Normal)&lt;br /&gt;
* 1 = Gauss Rifle (Jim Raynor-Marine)&lt;br /&gt;
* 2 = C-10 Concussion Rifle (Normal)&lt;br /&gt;
* 3 = C-10 Concussion Rifle (Sarah Kerrigan)&lt;br /&gt;
* 4 = Fragmentation Grenade (Normal)&lt;br /&gt;
* 5 = Fragmentation Grenade (Jim Raynor-Vulture)&lt;br /&gt;
* 6 = Spider Mines&lt;br /&gt;
* 7 = Twin Autocannons (Normal)&lt;br /&gt;
* 8 = Hellfire Missile Pack (Normal)&lt;br /&gt;
* 9 = Twin Autocannons (Alan Schezar)&lt;br /&gt;
* 10 = Hellfire Missile Pack (Alan Schezar)&lt;br /&gt;
* 11 = Arclite Cannon (Normal)&lt;br /&gt;
* 12 = Arclite Cannon (Edmund Duke)&lt;br /&gt;
* 13 = Fusion Cutter&lt;br /&gt;
* 14 = Fusion Cutter (Harvest)&lt;br /&gt;
* 15 = Gemini Missiles (Normal)&lt;br /&gt;
* 16 = Burst Lasers (Normal)&lt;br /&gt;
* 17 = Gemini Missiles (Tom Kazansky)&lt;br /&gt;
* 18 = Burst Lasers (Tom Kazansky)&lt;br /&gt;
* 19 = ATS Laser Battery (Normal)&lt;br /&gt;
* 20 = ATA Laser Battery (Normal)&lt;br /&gt;
* 21 = ATS Laser Battery (Norad II+Mengsk+DuGalle)&lt;br /&gt;
* 22 = ATA Laser Battery (Norad II+Mengsk+DuGalle)&lt;br /&gt;
* 23 = ATS Laser Battery (Hyperion)&lt;br /&gt;
* 24 = ATA Laser Battery (Hyperion)&lt;br /&gt;
* 25 = Flame Thrower (Normal)&lt;br /&gt;
* 26 = Flame Thrower (Gui Montag)&lt;br /&gt;
* 27 = Arclite Shock Cannon (Normal)&lt;br /&gt;
* 28 = Arclite Shock Cannon (Edmund Duke)&lt;br /&gt;
* 29 = Longbolt Missiles&lt;br /&gt;
* 30 = Yamato Gun&lt;br /&gt;
* 31 = Nuclear Missile&lt;br /&gt;
* 32 = Lockdown&lt;br /&gt;
* 33 = EMP Shockwave&lt;br /&gt;
* 34 = Irradiate&lt;br /&gt;
* 35 = Claws (Normal)&lt;br /&gt;
* 36 = Claws (Devouring One)&lt;br /&gt;
* 37 = Claws (Infested Kerrigan)&lt;br /&gt;
* 38 = Needle Spines (Normal)&lt;br /&gt;
* 39 = Needle Spines (Hunter Killer)&lt;br /&gt;
* 40 = Kaiser Blades (Normal)&lt;br /&gt;
* 41 = Kaiser Blades (Torrasque)&lt;br /&gt;
* 42 = Toxic Spores (Broodling)&lt;br /&gt;
* 43 = Spines&lt;br /&gt;
* 44 = Spines (Harvest)&lt;br /&gt;
* 45 = Acid Spray (Unused)&lt;br /&gt;
* 46 = Acid Spore (Normal)&lt;br /&gt;
* 47 = Acid Spore (Kukulza-Guardian)&lt;br /&gt;
* 48 = Glave Wurm (Normal)&lt;br /&gt;
* 49 = Glave Wurm (Kukulza-Mutalisk)&lt;br /&gt;
* 50 = Venom (Unused-Defiler)&lt;br /&gt;
* 51 = Venom (Unused-Defiler Hero)&lt;br /&gt;
* 52 = Seeker Spores&lt;br /&gt;
* 53 = Subterranean Tentacle&lt;br /&gt;
* 54 = Suicide (Infested Terran)&lt;br /&gt;
* 55 = Suicide (Scourge)&lt;br /&gt;
* 56 = Parasite&lt;br /&gt;
* 57 = Spawn Broodlings&lt;br /&gt;
* 58 = Ensnare&lt;br /&gt;
* 59 = Dark Swarm&lt;br /&gt;
* 60 = Plague&lt;br /&gt;
* 61 = Consume&lt;br /&gt;
* 62 = Particle Beam&lt;br /&gt;
* 63 = Particle Beam (Harvest)&lt;br /&gt;
* 64 = Psi Blades (Normal)&lt;br /&gt;
* 65 = Psi Blades (Fenix-Zealot)&lt;br /&gt;
* 66 = Phase Disruptor (Normal)&lt;br /&gt;
* 67 = Phase Disruptor (Fenix-Dragoon)&lt;br /&gt;
* 68 = Psi Assault (Normal-Unused)&lt;br /&gt;
* 69 = Psi Assault (Tassadar+Aldaris)&lt;br /&gt;
* 70 = Psionic Shockwave (Normal)&lt;br /&gt;
* 71 = Psionic Shockwave (Tassadar/Zeratul Archon)&lt;br /&gt;
* 72 = Unknown72&lt;br /&gt;
* 73 = Dual Photon Blasters (Normal)&lt;br /&gt;
* 74 = Anti-matter Missiles (Normal)&lt;br /&gt;
* 75 = Dual Photon Blasters (Mojo)&lt;br /&gt;
* 76 = Anit-matter Missiles (Mojo)&lt;br /&gt;
* 77 = Phase Disruptor Cannon (Normal)&lt;br /&gt;
* 78 = Phase Disruptor Cannon (Danimoth)&lt;br /&gt;
* 79 = Pulse Cannon&lt;br /&gt;
* 80 = STS Photon Cannon&lt;br /&gt;
* 81 = STA Photon Cannon&lt;br /&gt;
* 82 = Scarab&lt;br /&gt;
* 83 = Stasis Field&lt;br /&gt;
* 84 = Psi Storm&lt;br /&gt;
* 85 = Warp Blades (Zeratul)&lt;br /&gt;
* 86 = Warp Blades (Dark Templar Hero)&lt;br /&gt;
* 87 = Missiles (Unused)&lt;br /&gt;
* 88 = Laser Battery1 (Unused)&lt;br /&gt;
* 89 = Tormentor Missiles (Unused)&lt;br /&gt;
* 90 = Bombs (Unused)&lt;br /&gt;
* 91 = Raider Gun (Unused)&lt;br /&gt;
* 92 = Laser Battery2 (Unused)&lt;br /&gt;
* 93 = Laser Battery3 (Unused)&lt;br /&gt;
* 94 = Dual Photon Blasters (Unused)&lt;br /&gt;
* 95 = Flechette Grenade (Unused)&lt;br /&gt;
* 96 = Twin Autocannons (Floor Trap)&lt;br /&gt;
* 97 = Hellfire Missile Pack (Wall Trap)&lt;br /&gt;
* 98 = Flame Thrower (Wall Trap)&lt;br /&gt;
* 99 = Hellfire Missile Pack (Floor Trap)&lt;br /&gt;
* 100 = Neutron Flare&lt;br /&gt;
* 101 = Disruption Web&lt;br /&gt;
* 102 = Restoration&lt;br /&gt;
* 103 = Halo Rockets&lt;br /&gt;
* 104 = Corrosive Acid&lt;br /&gt;
* 105 = Mind Control&lt;br /&gt;
* 106 = Feedback&lt;br /&gt;
* 107 = Optical Flare&lt;br /&gt;
* 108 = Maelstrom&lt;br /&gt;
* 109 = Subterranean Spines&lt;br /&gt;
* 110 = Gauss Rifle0 (Unused)&lt;br /&gt;
* 111 = Warp Blades (Normal)&lt;br /&gt;
* 112 = C-10 Concussion Rifle (Samir Duran)&lt;br /&gt;
* 113 = C-10 Concussion Rifle (Infested Duran)&lt;br /&gt;
* 114 = Dual Photon Blasters (Artanis)&lt;br /&gt;
* 115 = Anti-matter Missiles (Artanis)&lt;br /&gt;
* 116 = C-10 Concussion Rifle (Alexei Stukov)&lt;br /&gt;
* 117 = Gauss Rifle1 (Unused)&lt;br /&gt;
* 118 = Gauss Rifle2 (Unused)&lt;br /&gt;
* 119 = Gauss Rifle3 (Unused)&lt;br /&gt;
* 120 = Gauss Rifle4 (Unused)&lt;br /&gt;
* 121 = Gauss Rifle5 (Unused)&lt;br /&gt;
* 122 = Gauss Rifle6 (Unused)&lt;br /&gt;
* 123 = Gauss Rifle7 (Unused)&lt;br /&gt;
* 124 = Gauss Rifle8 (Unused)&lt;br /&gt;
* 125 = Gauss Rifle9 (Unused)&lt;br /&gt;
* 126 = Gauss Rifle10 (Unused)&lt;br /&gt;
* 127 = Gauss Rifle11 (Unused)&lt;br /&gt;
* 128 = Gauss Rifle12 (Unused)&lt;br /&gt;
* 129 = Gauss Rifle13 (Unused)&lt;br /&gt;
* 130 = None&lt;br /&gt;
&lt;br /&gt;
==Complete Modifier List==&lt;br /&gt;
* 0 = Condition: &amp;gt;= (greater than or equal to)&lt;br /&gt;
* 1 = Condition: &amp;lt;= (less than or equal to)&lt;br /&gt;
* 2 = Condition: == TRUE (Is True)&lt;br /&gt;
* 3 = Condition: == FALSE (Is False)&lt;br /&gt;
* 4 = Action: = TRUE (Set to True)&lt;br /&gt;
* 5 = Action: = FALSE (Set to False)&lt;br /&gt;
* 6 = Action: NOT (toggle)&lt;br /&gt;
* 7 = Action: = (Set to)&lt;br /&gt;
* 8 = Action: += (Add)&lt;br /&gt;
* 9 = Action: -= (Subtract)&lt;br /&gt;
* 10 = Condition: == (Exactly)&lt;br /&gt;
* 11 = Action: Randomize&lt;br /&gt;
&lt;br /&gt;
[[Category:StarCraft]]&lt;br /&gt;
[[Category:Reference]]&lt;/div&gt;</summary>
		<author><name>FaRTy1billion</name></author>	</entry>

	<entry>
		<id>https://staredit.net/wiki/index.php?title=Scenario.chk&amp;diff=642</id>
		<title>Scenario.chk</title>
		<link rel="alternate" type="text/html" href="https://staredit.net/wiki/index.php?title=Scenario.chk&amp;diff=642"/>
				<updated>2020-10-02T07:14:41Z</updated>
		
		<summary type="html">&lt;p&gt;FaRTy1billion: /* &amp;quot;CRGB&amp;quot; - Remastered Player Colors */ small formatting/typo fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The CHK file is a very dense file found inside the SCM or SCX file (as &amp;quot;staredit\scenario.chk&amp;quot;), which is just a renamed MPQ archive.&lt;br /&gt;
&lt;br /&gt;
In this article, some shorthand will be used for datatypes:&lt;br /&gt;
* '''u8''' for an unsigned byte&lt;br /&gt;
* '''u16''' for an unsigned short (2-byte integer)&lt;br /&gt;
* '''u32''' for an unsigned int (4-byte integer)&lt;br /&gt;
* '''uT[''a'']''' for an array of datatype '''T''' (8, 16, 32) with '''''a''''' number of elements&lt;br /&gt;
* '''uT[''a''][''b'']''' for a two-dimensional array of datatype '''T''', where each element of '''T[''a'']''' will be an array of size '''''b'''''&lt;br /&gt;
&lt;br /&gt;
=Sections=&lt;br /&gt;
The CHK is split into several named chunks (hence the file extension, an abbreviation of ''CHunK'').&lt;br /&gt;
&lt;br /&gt;
Each section begins with an 8-byte header:&lt;br /&gt;
* '''u32''' Name - A 4-byte string uniquely identifying that chunk's purpose.&lt;br /&gt;
* '''u32''' Size - The size, in bytes, of the chunk (not including this header)&lt;br /&gt;
Followed by as many bytes as 'Size', in a format described below.&lt;br /&gt;
&lt;br /&gt;
Some things to keep in mind about the CHK section:&lt;br /&gt;
* Invalid sections can exist and will be ignored. While Size is unsigned, it can safely be a negative value to read a chunk earlier in the file. This allows for &amp;quot;section stacking&amp;quot;, allowing smaller sections to be placed inside of larger ones or duplicate triggers or units to take less space in the file.&lt;br /&gt;
* All sections will marked &amp;quot;Not required.&amp;quot; are never read by StarCraft and can safely be omitted. However they may or may not be read by StarEdit, and may cause the map to be unreadable in an editor.&lt;br /&gt;
* Note &amp;quot;Hybrid&amp;quot;, or &amp;quot;Enhanced&amp;quot;, maps were introduced in 1.04. They are supported both by Original StarCraft and Brood War and usually contain sections for both types (e.g., UPGS and UPGx, TECS and TECx), but both sections aren't necessarily read.&lt;br /&gt;
* Duplicate sections will overwrite previously defined section data, except where noted. Note this only applies to those section that pass the specified &amp;quot;validation&amp;quot; parameters, as any section that does not successfully validate will be ignored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TYPE&amp;quot; - Map Type==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the type of scenario.&lt;br /&gt;
* '''u32''': Specifies the type of scenario:&lt;br /&gt;
** '''0x53574152''' or '''RAWS''' - 1.04 StarCraft and above (&amp;quot;hybrid&amp;quot;)&lt;br /&gt;
** '''0x42574152''' or '''RAWB''' - Brood War&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;VER &amp;quot; - Format Version==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section identifies the file format version.&lt;br /&gt;
* '''u16''': File format version:&lt;br /&gt;
** '''59''' - 1.00 Starcraft&lt;br /&gt;
** '''63''' - 1.04 Starcraft and above (&amp;quot;hybrid&amp;quot;)&lt;br /&gt;
** '''64''' - Starcraft Remastered&lt;br /&gt;
** '''205''' - Brood War&lt;br /&gt;
** '''206''' - Brood War Remastered&lt;br /&gt;
This is the only version code section to actually be read by StarCraft (of TYPE, VER , IVER, and IVE2). Any other value is invalid in retail StarCraft and is usually a beta version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IVER&amp;quot; - Map Version==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section &amp;quot;additionally identifies&amp;quot; the map version.&lt;br /&gt;
* '''u16''': &amp;quot;Additional file format version:&amp;quot;&lt;br /&gt;
** '''9''' - beta/obsolete versions&lt;br /&gt;
** '''10''' - current versions&lt;br /&gt;
When saving as expansion this section gets removed entirely. Contrary to popular belief, it doesn't get &amp;quot;replaced&amp;quot; by IVE2 in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IVE2&amp;quot; - Map Version==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section &amp;quot;additionally identifies&amp;quot; the map version.&lt;br /&gt;
* '''u16''': &amp;quot;Additional file format version:&amp;quot;&lt;br /&gt;
** '''11''' - 1.04 StarCraft and above (&amp;quot;hybrid&amp;quot;) or Brood War.&lt;br /&gt;
This section does not &amp;quot;replace&amp;quot; IVER in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;VCOD&amp;quot; - Verification Code==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be equal to size of the VCOD data in the EXE resource. Must result in valid checksum.''&lt;br /&gt;
&lt;br /&gt;
This section has a verification code to make sure this is actually a CHK file.&lt;br /&gt;
&lt;br /&gt;
* '''u32[256]''': Seed values.&lt;br /&gt;
* '''u8[16]''': Operation codes to produce the resulting hash:&lt;br /&gt;
** '''00''' - XOR's the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''01''' - Adds to the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''02''' - Subtracts from the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''03''' - XOR's the current hash with the VCOD table at index OWNR, SIDE, FORC, and 0&lt;br /&gt;
** '''04''' - same as 0x03&lt;br /&gt;
** '''05''' - same as 0x03&lt;br /&gt;
** '''06''' - Complex function consisting of ORs and shifts&lt;br /&gt;
** '''07''' - Inverted version of 0x06, switching direction of all shifts&lt;br /&gt;
** '''08+''' - Do nothing&lt;br /&gt;
Opcodes and seeds do not have to match those in EXE resource, as long as the same value is produced.&amp;lt;br&amp;gt;&lt;br /&gt;
The only indexes in the seed table that are referenced are those that correspond individual values of [[#&amp;quot;OWNR&amp;quot; - StarCraft Player Types|OWNR]], [[#&amp;quot;SIDE&amp;quot; - Player Races|SIDE]], [[#&amp;quot;FORC&amp;quot; - Force Settings|FORC]] player assignments, and index 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IOWN&amp;quot; - StarEdit Player Types==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the owner of each player.&lt;br /&gt;
* '''u8[12]''': One byte for each player, specifies the owner of the player:&lt;br /&gt;
** '''00''' - Inactive&lt;br /&gt;
** ''01'' - Computer (game)&lt;br /&gt;
** ''02'' - Occupied by Human Player&lt;br /&gt;
** '''03''' - Rescue Passive&lt;br /&gt;
** '''04''' - Unused&lt;br /&gt;
** '''05''' - Computer&lt;br /&gt;
** '''06''' - Human (Open Slot)&lt;br /&gt;
** '''07''' - Neutral&lt;br /&gt;
** ''08'' - Closed slot&lt;br /&gt;
This section is separate from OWNR as a staredit value. Staredit does not display &amp;quot;inactive&amp;quot; as a valid option. Italicized settings denote invalid map options, which may involve a buffer overflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;OWNR&amp;quot; - StarCraft Player Types==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 12 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section designates the controller of a particular player. It is exactly the same as the &amp;quot;IOWN&amp;quot; section, except there is an additional value, 0x00 for Inactive.&lt;br /&gt;
* '''u8[12]''': One byte for each player, specifies the owner of the player:&lt;br /&gt;
** '''00''' - Inactive&lt;br /&gt;
** ''01'' - Computer (game)&lt;br /&gt;
** ''02'' - Occupied by Human Player&lt;br /&gt;
** '''03''' - Rescue Passive&lt;br /&gt;
** '''04''' - Unused&lt;br /&gt;
** '''05''' - Computer&lt;br /&gt;
** '''06''' - Human (Open Slot)&lt;br /&gt;
** '''07''' - Neutral&lt;br /&gt;
** ''08'' - Closed slot&lt;br /&gt;
Italicized settings denote invalid map options, which may involve a buffer overflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;ERA &amp;quot; - Tileset==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section indicates the tileset of the scenario.&lt;br /&gt;
* '''u16''': Designates tileset:&lt;br /&gt;
** '''00''' - Badlands&lt;br /&gt;
** '''01''' - Space Platform&lt;br /&gt;
** '''02''' - Installation&lt;br /&gt;
** '''03''' - Ashworld&lt;br /&gt;
** '''04''' - Jungle&lt;br /&gt;
** '''05''' - Desert&lt;br /&gt;
** '''06''' - Arctic&lt;br /&gt;
** '''07''' - Twilight&lt;br /&gt;
StarCraft masks the tileset indicator's bit value, so bits after the third place (anything after the value &amp;quot;7&amp;quot;) are removed. Thus, 9 (1001 in binary) is interpreted as 1 (0001), 10 (1010) as 2 (0010), etc.&amp;lt;br&amp;gt;&lt;br /&gt;
Desert, Arctic, and Twilight are Brood War-only tilesets.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;DIM &amp;quot; - Map Dimensions==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains the dimensions of the map.&lt;br /&gt;
* '''u16''': Width of the map&lt;br /&gt;
* '''u16''': Height of the map&lt;br /&gt;
The Width/Height of the map is measured in the number of square 32x32p tiles.&amp;lt;br&amp;gt;&lt;br /&gt;
Standard Dimensions are 64, 96, 128, 192, and 256.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SIDE&amp;quot; - Player Races==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 12 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains the species/race of each player.&lt;br /&gt;
* '''u8[12]''': 1 byte per player the species of that player:&lt;br /&gt;
** '''00''' - Zerg&lt;br /&gt;
** '''01''' - Terran&lt;br /&gt;
** '''02''' - Protoss&lt;br /&gt;
** ''03'' - Invalid (Independent)&lt;br /&gt;
** ''04'' - Invalid (Neutral)&lt;br /&gt;
** '''05''' - User Selectable&lt;br /&gt;
** '''06''' - Random (Forced; Acts as a selected race)&lt;br /&gt;
** ''07'' - Inactive&lt;br /&gt;
Italicized settings denote invalid map options. Note Players 9-11 are defaultly Inactive and Player 12 is defaultly Neutral.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MTXM&amp;quot; - StarCraft Terrain==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be less than or equal to 131072 (0x20000) bytes (256 * 256 * 2).''&lt;br /&gt;
&lt;br /&gt;
Terrain section that contains a map of the level's appearance. StarEdit disregards this section and instead uses [[#&amp;quot;TILE&amp;quot; - StarEdit Terrain|TILE]]; it is only used in Starcraft.&lt;br /&gt;
* '''u16[map width * height]''': one integer for each tile.&lt;br /&gt;
Notes about MTXM:&lt;br /&gt;
* The Width/Height of the map is measured in the number of square 32x32p tiles.&lt;br /&gt;
* Tiles in this section are listed from left to right, top to bottom.&lt;br /&gt;
* The values for each integer are their respective &amp;quot;MegaTile&amp;quot; values in the scenario's tileset. If the size of this section is greater than width*height*2, the data following is ignored. If the size of this section is less, the resulting tiles that have not been defined will be null tiles.&lt;br /&gt;
* This section includes doodads as terrain; TILE, which is otherwise identical, doesn't. Out of the terrain sections (TILE, ISOM, and MTXM), SC only reads MTXM for the sake of not having to generate this data on-the-fly: it contains the exact representation of the level's appearance, including doodads. TILE, on the other hand, is directly tied via a tile lookup function to ISOM, and exists for the sake of not having to generate tiles from ISOM on-the-fly in StarEdit.&lt;br /&gt;
* If MTXM section is smaller than (map width*height), then the remaining tiles will be filled with null tiles or tiles specified by previous MTXM sections.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PUNI&amp;quot; - Player Unit Restrictions==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 5700 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains player unit restrictions: it indicates whether the player can or cannot build a particular unit.&lt;br /&gt;
* '''u8[228][12]''': 1 byte for each unit in order of its unit id, then each player, for player availability:&lt;br /&gt;
** '''00''' - That unit is not available for production if the player has 'override defaults' on&lt;br /&gt;
** '''01''' - That unit is available for production if the player has 'override defaults' on&lt;br /&gt;
* '''u8[228]''': 1 byte for each unit in order of it's unit id, for global availability defaults (for all players):&lt;br /&gt;
** '''00''' - That unit is not available for production&lt;br /&gt;
** '''01''' - That unit is available for production&lt;br /&gt;
* '''u8[228][12]''': 1 byte for each unit in order of its unit id, then each player, indicating whether a player uses the global availability defaults.&lt;br /&gt;
** '''00''' - Player overrides defaults for this unit&lt;br /&gt;
** '''01''' - Player uses defaults for this unit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGR&amp;quot; - Upgrade Restrictions==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1748 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;PUPx&amp;quot; - BW Upgrade Restrictions|&amp;quot;PUPx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains player upgrade restrictions: it indicates the starting/maximum levels at/to which a player can perform a particular upgrade.&lt;br /&gt;
* '''u8[46][12]''': 1 byte for the maximum level a player can upgrade to, in order of its upgrade id, then each player&lt;br /&gt;
* '''u8[46][12]''': 1 byte for the level of an upgrade a player starts off with, in order of its upgrade id, then each player&lt;br /&gt;
* '''u8[46]''': 1 byte for the global default maximum level of each upgrade, in order of its upgrade id.&lt;br /&gt;
* '''u8[46]''': 1 byte for the global default starting level of each upgrade, in order of its upgrade id.&lt;br /&gt;
* '''u8[46][12]''': 1 byte for each upgrade in order of its upgrade id, then each player, indicating whether a player uses the global upgrade defaults:&lt;br /&gt;
** '''00''' - Player does not use global upgrade defaults for this upgrade&lt;br /&gt;
** '''01''' - Player uses upgrade defaults for this upgrade&lt;br /&gt;
See [[#List of Upgrade IDs]].&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PTEC&amp;quot; - Tech Restrictions==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 912 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;PTEx&amp;quot; - BW Tech Restrictions|&amp;quot;PTEx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains player technology availability restrictions: it indicates whether a player starts off with a particular technology or can research a particular technology.&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology id, then each player, for player availability:&lt;br /&gt;
** '''00''' - Technology is not available for a player&lt;br /&gt;
** '''01''' - Technology is available for a player&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology id, then each player, for &amp;quot;already researched&amp;quot; status:&lt;br /&gt;
** '''00''' - Technology is not already researched&lt;br /&gt;
** '''01''' - Technology is already researched&lt;br /&gt;
* '''u8[24]''': 1 byte for each technology for global availability defaults:&lt;br /&gt;
** '''00''' - Technology is not available by default&lt;br /&gt;
** '''01''' - Technology is available by default&lt;br /&gt;
* '''u8[24]''': 1 byte for each technology for global &amp;quot;already researched&amp;quot; defaults:&lt;br /&gt;
** '''00''' - Technology is not already researched by default&lt;br /&gt;
** '''01''' - Technology is already researched by default&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology in order of its technology id, then each player, indicating whether a player uses the global defaults:&lt;br /&gt;
** '''00''' - Technology overrides defaults for player&lt;br /&gt;
** '''01''' - Technology uses default settings for player&lt;br /&gt;
See [[#List of Technology IDs]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIT&amp;quot; - Placed Units==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 36 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the pre-placed units on the map and their properties. Each unit on the map gets the following structure:&lt;br /&gt;
* '''u32''': The unit's class instance (sort of a &amp;quot;serial number&amp;quot;)&lt;br /&gt;
* U16''': X coordinate of unit&lt;br /&gt;
* U16''': Y coordinate of unit&lt;br /&gt;
* '''u16''': Unit ID&lt;br /&gt;
* '''u16''': Type of relation to another building (i.e. add-on, nydus link)&lt;br /&gt;
** '''Bit 9''' - Nydus Link&lt;br /&gt;
** '''Bit 10''' - Addon Link&lt;br /&gt;
* '''u16''': Flags of special properties which can be applied to the unit and are valid:&lt;br /&gt;
** '''Bit 0''' - Cloak is valid&lt;br /&gt;
** '''Bit 1''' - Burrow is valid&lt;br /&gt;
** '''Bit 2''' - In transit is valid&lt;br /&gt;
** '''Bit 3''' - Hallucinated is valid&lt;br /&gt;
** '''Bit 4''' - Invincible is valid&lt;br /&gt;
** '''Bit 5-15''' - Unused&lt;br /&gt;
* '''u16''': Out of the elements of the unit data, the properties which can be changed by the map maker:&lt;br /&gt;
** '''Bit 0''' - Owner player is valid (the unit is not a critter, start location, etc.; not a neutral unit)&lt;br /&gt;
** '''Bit 1''' - HP is valid&lt;br /&gt;
** '''Bit 2''' - Shields is valid&lt;br /&gt;
** '''Bit 3''' - Energy is valid (unit is a wraith, etc.)&lt;br /&gt;
** '''Bit 4''' - Resource amount is valid (unit is a mineral patch, vespene geyser, etc.)&lt;br /&gt;
** '''Bit 5''' - Amount in hangar is valid (unit is a reaver, carrier, etc.)&lt;br /&gt;
** '''Bit 6-15''' - Unused&lt;br /&gt;
* '''u8''': Player number of owner (0-based)&lt;br /&gt;
* '''u8''': Hit points % (1-100)&lt;br /&gt;
* '''u8''': Shield points % (1-100)&lt;br /&gt;
* '''u8''': Energy points % (1-100)&lt;br /&gt;
* '''u32''': Resource amount&lt;br /&gt;
* '''u16''': Number of units in hangar&lt;br /&gt;
* '''u16''': Unit state flags&lt;br /&gt;
** '''Bit 0''' - Unit is cloaked&lt;br /&gt;
** '''Bit 1''' - Unit is burrowed&lt;br /&gt;
** '''Bit 2''' - Building is in transit&lt;br /&gt;
** '''Bit 3''' - Unit is hallucinated&lt;br /&gt;
** '''Bit 4''' - Unit is invincible&lt;br /&gt;
** '''Bit 5-15''' - Unused&lt;br /&gt;
* '''u32''': Unused&lt;br /&gt;
* '''u32''': Class instance of the unit to which this unit is related to (i.e. via an add-on, nydus link, etc.). It is &amp;quot;0&amp;quot; if the unit is not linked to any other unit.&lt;br /&gt;
Notes about UNIT:&lt;br /&gt;
* The X/Y coordinates are the center of the sprite of the unit (in pixels).&lt;br /&gt;
* Please edit if you could confirm the bit values to be correct/if you know more bit values.&lt;br /&gt;
* Default values will apply if bit values are unchecked. Defaults: 100% HP, 100% SP, 100% EP, 0 resources, 0 hangar count.&lt;br /&gt;
* This section can be split. Additional UNIT sections will add more units.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;ISOM&amp;quot; - Isometric Terrain==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section is required to place isometric terrain on the map. It provides data about the nature of the isometrical &amp;quot;diamonds&amp;quot; (the editing mode of StarEdit).&lt;br /&gt;
* '''u16[ (width / 2 + 1) * (height + 1) * 4 ]''': 4 integers for each map rectangle tile (plus one extra tile to the right and bottom of the map), as per the RECT structure. Each rectangle border (left, top, right, bottom) is assigned an &amp;quot;ISOM value.&amp;quot; These form the &amp;quot;diamond&amp;quot; pattern of the map, and each rectangle thus gets two ISOM values associated with it. StarEdit somehow hashes these (the exact algorithm is unknown) and thus produces the tile index of the rectangle (which it stores in TILE for reasons of efficiency). The index of the rectangle's right tile is that of its left tile + 16.&lt;br /&gt;
This section is the only truly unknown section of the .chk format. If you're an ex-Blizzard employee or SI, please edit this section. If you have additional research, post on the forums about it and/or edit this section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TILE&amp;quot; - StarEdit Terrain==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section will only be different from the [[#&amp;quot;MTXM&amp;quot; - StarCraft Terrain|MTXM]] section in tiles where doodads are present.&lt;br /&gt;
* '''u16[ map width * height ]''': 1 integer for each map tile. Moves horizontally across the map.&lt;br /&gt;
The values in TILE are normally directly generated from the ISOM section (see &amp;quot;'ISOM' section&amp;quot; above), and thus do not match that of MTXM on doodad tiles.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;DD2 &amp;quot; - StarEdit Sprites (Doodads)==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section contains the doodad map of the level. There are several parts to doodads. The graphical portion is stored in the [[#&amp;quot;MTXM&amp;quot; - StarCraft Terrain|MTXM]] section. The second part of the doodad is stored in this section. This section is only used by the map editor.&lt;br /&gt;
&lt;br /&gt;
Each doodad in the map gets the following structure:&lt;br /&gt;
* '''u16''': Number of the doodad. Size of the doodad is dependent on this. Doodads are different for each tileset.&lt;br /&gt;
* '''u16''': X coordinate of the doodad unit&lt;br /&gt;
* '''u16''': Y coordinate of the doodad unit&lt;br /&gt;
* '''u8''': Player number that owns the doodad&lt;br /&gt;
* '''u8''': Enabled flag&lt;br /&gt;
** '''00''' - Doodad is enabled (trap can attack, door is closed, etc)&lt;br /&gt;
** '''01''' - Doodad is disabled&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;THG2&amp;quot; - StarCraft Sprites==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 10 bytes.''&lt;br /&gt;
&lt;br /&gt;
The map editor only writes to this section. Starcraft uses this section.&lt;br /&gt;
&lt;br /&gt;
Sprites, usually on doodads, get the following structure.&lt;br /&gt;
* '''u16''': Unit/Sprite number of the sprite&lt;br /&gt;
* '''u16''': X coordinate of the doodad unit&lt;br /&gt;
* '''u16''': Y coordinate of the doodad unit&lt;br /&gt;
* '''u8''': Player number that owns the doodad&lt;br /&gt;
* '''u8''': Unused&lt;br /&gt;
* '''u16''': Flags&lt;br /&gt;
** '''Bit 0-11''' - Unused&lt;br /&gt;
** '''Bit 12''' - Draw as sprite (Determines if it is a sprite or a unit sprite)&lt;br /&gt;
** '''Bit 13''' - Unused&lt;br /&gt;
** '''Bit 14''' - Unused&lt;br /&gt;
** '''Bit 15''' - Disabled (Only valid if Draw as sprite is unchecked, disables the unit)&lt;br /&gt;
This section can be split. Additional THG2 sections will add more sprites.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MASK&amp;quot; - Fog of War Layer==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: This section will always validate.''&lt;br /&gt;
&lt;br /&gt;
This section contains the data on fog of war for each player. This is whether at the start of the game that levels of black space that is available.&lt;br /&gt;
* '''u8[ map width * height ]''': One byte for each map tile. The bits indicate for each player the fog of war.&lt;br /&gt;
** '''Bit 0''' - Player 1's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 1''' - Player 2's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 2''' - Player 3's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 3''' - Player 4's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 4''' - Player 5's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 5''' - Player 6's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 6''' - Player 7's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 7''' - Player 8's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
Any size greater than width*height will be ignored. Any size less will default missing tiles to 0xFF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;STR &amp;quot; - String Data==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be at least 1 byte.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the strings in the map.&lt;br /&gt;
* '''u16''': Number of strings in the section (Default''': 1024)&lt;br /&gt;
* '''u16[Number of strings]''': 1 integer for each string specifying the offset (the spot where the string starts in the section from the start of it).&lt;br /&gt;
* '''Strings''': After the offsets, this is where every string in the map goes, one after another. Each one is terminated by a null character.&lt;br /&gt;
This section can contain more or less then 1024 string offsests and will work in Starcraft.&amp;lt;br&amp;gt;&lt;br /&gt;
By default the first byte in '''Strings''' is a NUL character, and all unused offsets in the STR section point to this NUL character.&lt;br /&gt;
Note that STR sections can be stacked in a smiliar fashion as MTXM. The exact mechanisms of this are uncertain.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPRP&amp;quot; - CUWP Slots==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1280 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section is used whenever the create units with properties trigger is used. Since a slot has to be assigned to the action, this is where each slot is designated.&lt;br /&gt;
&lt;br /&gt;
There are 64 of the following structures regardless of how many are used and it cannot exceed 64.&lt;br /&gt;
* '''u16''': Flag of which special properties can be applied to unit, and are valid.&lt;br /&gt;
** '''Bit 0''' - Cloak bit is valid&lt;br /&gt;
** '''Bit 1''' - Burrowed bit is valid&lt;br /&gt;
** '''Bit 2''' - In transit bit is valid&lt;br /&gt;
** '''Bit 3''' - Hallucinated bit is valid&lt;br /&gt;
** '''Bit 4''' - Invincible bit is valid&lt;br /&gt;
** '''Bit 5-15''' - Unknown/unused&lt;br /&gt;
* '''u16''': Which elements of the unit data are valid, which properties can be changed by the map maker.&lt;br /&gt;
** '''Bit 0''' - Owner player is valid (unit is not neutral)&lt;br /&gt;
** '''Bit 1''' - HP is valid&lt;br /&gt;
** '''Bit 2''' - Shields is valid&lt;br /&gt;
** '''Bit 3''' - Energy is valid&lt;br /&gt;
** '''Bit 4''' - Resource amount is valid (unit is a resource)&lt;br /&gt;
** '''Bit 5''' - Amount in hanger is valid&lt;br /&gt;
** '''Bit 6''' - Unknown/unused&lt;br /&gt;
* '''u8''': Player number that owns unit. Will always be NULL in this section (0)&lt;br /&gt;
* '''u8''': Hit point % (1-100)&lt;br /&gt;
* '''u8''': Shield point % (1-100)&lt;br /&gt;
* '''u8''': Energy point % (1-100)&lt;br /&gt;
* '''u32''': Resource amount (for resources only)&lt;br /&gt;
* '''u16''': # of units in hangar&lt;br /&gt;
* '''u16''': Flags&lt;br /&gt;
** '''Bit 0''' - Unit is cloaked&lt;br /&gt;
** '''Bit 1''' - Unit is burrowed&lt;br /&gt;
** '''Bit 2''' - Building is in transit&lt;br /&gt;
** '''Bit 3''' - Unit is hallucinated&lt;br /&gt;
** '''Bit 4''' - Unit is invincible&lt;br /&gt;
** '''Bit 5-15''' - Unknown/unused&lt;br /&gt;
* '''u32''': Unknown/unused. Padding?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPUS&amp;quot; - CUWP Slots Used==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section goes along with the &amp;quot;UPRP&amp;quot; section. This section just indicates which of the 64 unit properties slot are used.&lt;br /&gt;
* '''u8[64]''': 1 byte for each trigger unit properties slot&lt;br /&gt;
** '''00''' - Properties slot is unused&lt;br /&gt;
** '''01''' - Properties slot is used&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MRGN&amp;quot; - Locations==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: 1280 bytes for retail, 5100 bytes for Hybrid and Broodwar.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the locations that the map uses. In a vanilla map, this section contains 64 locations. In a Hybrid or Brood War map, this section will expand to contain 255 locations.&lt;br /&gt;
&lt;br /&gt;
Each location gets one of the following location entries. The 'Anywhere' location, is ALWAYS location 64.&lt;br /&gt;
* '''u32''': Left (X1) coordinate of location, in pixels (usually 32 pt grid aligned)&lt;br /&gt;
* '''u32''': Top (Y1) coordinate of location, in pixels&lt;br /&gt;
* '''u32''': Right (X2) coordinate of location, in pixels&lt;br /&gt;
* '''u32''': Bottom (Y2) coordinate of location, in pixels&lt;br /&gt;
* '''u16''': String number of the name of this location&lt;br /&gt;
* '''u16''': Location elevation flags. If an elevation is disabled in the location, it's bit will be on (1)&lt;br /&gt;
** '''Bit 0''' - Low elevation&lt;br /&gt;
** '''Bit 1''' - Medium elevation&lt;br /&gt;
** '''Bit 2''' - High elevation&lt;br /&gt;
** '''Bit 3''' - Low air&lt;br /&gt;
** '''Bit 4''' - Medium air&lt;br /&gt;
** '''Bit 5''' - High air&lt;br /&gt;
** '''Bit 6-15''' - Unused&lt;br /&gt;
Note that in typical locations Right is always larger than Left and Bottom is always larger than Top. However, you can reverse one or both of these for [[Inverted Locations]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TRIG&amp;quot; - Triggers==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 2400 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the triggers in the map. This along with [[#&amp;quot;MBRF&amp;quot; - Mission Briefings|MBRF]] is the most complicated section in the entire scenario.chk file as there is a lot of data packed into too little of a space. Refer to the appendix at the bottom of this page for more information.&lt;br /&gt;
For easy reference, since each trigger contains 2400 bytes, the amount of triggers can be gotten by taking the section length and dividing by 2400.&lt;br /&gt;
Every single trigger in the map will have the following format:&lt;br /&gt;
* 16 Conditions (20 byte struct)&amp;lt;br&amp;gt; Every trigger has 16 of the following format, even if only one condition is used. See the appendix for information on which items are used for what conditions.&lt;br /&gt;
** '''u32''': Location number for the condition (1 based -- 0 refers to No Location), EUD Bitmask for a Death condition if the MaskFlag is set to &amp;quot;SC&amp;quot;&lt;br /&gt;
** '''u32''': [[#List of Players/Group IDs|Group]] that the condition applies to&lt;br /&gt;
** '''u32''': Qualified number (how many/resource amount)&lt;br /&gt;
** '''u16''': [[#Trigger Unit Types|Unit ID]] condition applies to&lt;br /&gt;
** '''u8''': [[#Numeric Comparisons|Numeric comparison]], [[#Switch States|switch state]]&lt;br /&gt;
** '''u8''': [[#Trigger Conditions List|Condition byte]]&lt;br /&gt;
** '''u8''': [[#Resource Types|Resource type]], [[#Score Types|score type]], Switch number (0-based)&lt;br /&gt;
** '''u8''': Flags&lt;br /&gt;
*** '''Bit 0''' - Unknown/unused&lt;br /&gt;
*** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled/ignored&lt;br /&gt;
*** '''Bit 2''' - Always display flag.&lt;br /&gt;
*** '''Bit 3''' - Unit properties is used. ('''Note:''' This is used in [[TRG|*.trg]] files)&lt;br /&gt;
*** '''Bit 4''' - Unit type is used. May not be necessary?&lt;br /&gt;
*** '''Bit 5-7''' - Unknown/unused&lt;br /&gt;
** '''u16''': MaskFlag: set to &amp;quot;SC&amp;quot; (0x53, 0x43) when using the bitmask for EUDs, 0 otherwise&lt;br /&gt;
* 64 Actions (32 byte struct)&amp;lt;br&amp;gt; Immediately following the 16 conditions, there are 64 actions. There will always be 64 of the following structure, even if some of them are unused.&lt;br /&gt;
** '''u32''': Location - source location in &amp;quot;Order&amp;quot; and &amp;quot;Move Unit&amp;quot;, dest location in &amp;quot;Move Location&amp;quot; (1 based -- 0 refers to No Location), EUD Bitmask for a Death action if the MaskFlag is set to &amp;quot;SC&amp;quot;&lt;br /&gt;
** '''u32''': String number for trigger text (0 means no string)&lt;br /&gt;
** '''u32''': WAV string number (0 means no string)&lt;br /&gt;
** '''u32''': Seconds/milliseconds of time&lt;br /&gt;
** '''u32''': First (or only) [[#List of Players/Group IDs|Group/Player]] affected.&lt;br /&gt;
** '''u32''': Second group affected, secondary location (1-based), CUWP #, number, AI script (4-byte string), switch (0-based #)&lt;br /&gt;
** '''u16''': [[#Trigger Unit Types|Unit type]], [[#Score Types|score type]], [[#Resource Types|resource type]], [[#Alliance Statuses|alliance status]]&lt;br /&gt;
** '''u8''': [[#Trigger Actions List|Action byte]]&lt;br /&gt;
** '''u8''': Number of units (0 means All Units), [[#Action States|action state]], [[#Unit Orders|unit order]], [[#Number Modifiers|number modifier]]&lt;br /&gt;
** '''u8''': Flags&lt;br /&gt;
*** '''Bit 0''' - Ignore a wait/transmission once.&lt;br /&gt;
*** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled.&lt;br /&gt;
*** '''Bit 2''' - Always display flag - when not set: if the user has turned off subtitles (see sound options) the text will not display, when set: text will always display&lt;br /&gt;
*** '''Bit 3''' - Unit properties is used. Staredit uses this for *.trg files.&lt;br /&gt;
*** '''Bit 4''' - Unit type is used.&lt;br /&gt;
*** '''Bit 5-7''' - Unknown/unused&lt;br /&gt;
** '''u8''': Padding&lt;br /&gt;
** '''u16 (2 bytes)''': MaskFlag: set to &amp;quot;SC&amp;quot; (0x53, 0x43) when using the bitmask for EUDs, 0 otherwise&lt;br /&gt;
* Player Execution&amp;lt;br&amp;gt; Following the 16 conditions and 64 actions, every trigger also has this structure&lt;br /&gt;
** '''u32''': execution flags&lt;br /&gt;
*** '''Bit 0''' - All conditions are met, executing actions, cleared on the next trigger loop.&lt;br /&gt;
*** '''Bit 1''' - Ignore the following actions: Defeat, Draw.&lt;br /&gt;
*** '''Bit 2''' - Preserve trigger. (Can replace Preserve Trigger action)&lt;br /&gt;
*** '''Bit 3''' - Ignore execution.&lt;br /&gt;
*** '''Bit 4''' - Ignore all of the following actions for this trigger until the next trigger loop: Wait, PauseGame, Transmission, PlayWAV, DisplayTextMessage, CenterView, MinimapPing, TalkingPortrait, and MuteUnitSpeech.&lt;br /&gt;
*** '''Bit 5''' - This trigger has paused the game, ignoring subsequent calls to Pause Game (Unpause Game clears this flag only in the same trigger), may automatically call unpause at the end of action execution?&lt;br /&gt;
*** '''Bit 6''' - Wait skipping disabled for this trigger, cleared on next trigger loop.&lt;br /&gt;
*** '''Bit 7-31''' - Unknown/unused&lt;br /&gt;
** '''u8[27]''': 1 byte for each player in the [[#List of Players/Group IDs]]&lt;br /&gt;
*** '''00''' - Trigger is not executed for player&lt;br /&gt;
*** '''01''' - Trigger is executed for player&lt;br /&gt;
** '''u8''': Index of the current action, in StarCraft this is incremented after each action is executed, trigger execution ends when this is 64 (Max Actions) or an action is encountered with Action byte as 0&lt;br /&gt;
This section can be split. Additional TRIG sections will add more triggers.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MBRF&amp;quot; - Mission Briefings==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 2400 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all of the mission briefings shown by the players.&lt;br /&gt;
&lt;br /&gt;
See [[#&amp;quot;TRIG&amp;quot; - Triggers|&amp;quot;TRIG&amp;quot;]] section for format, as it is exactly the same except for the conditions. In this section the 16 conditions are still there, they are all null except for the very first condition, which only has a condition byte of 13. See [[#Mission Briefing Actions List]] for the action bytes for the mission briefing actions.&lt;br /&gt;
&lt;br /&gt;
This section can be split. Additional MBRF sections will add more briefing triggers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SPRP&amp;quot; - Scenario Properties==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4 bytes.''&lt;br /&gt;
&lt;br /&gt;
* '''u16''': String number of the scenario name&lt;br /&gt;
* '''u16''': String number of the scenarios description.&lt;br /&gt;
A string index of 0 for the map name will default it to its file name. A string index of 0 description will default to a predefined string.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;FORC&amp;quot; - Force Settings==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be less than or equal to 20 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the forces and the information about them.&lt;br /&gt;
* '''u8[8]''': 1 byte for each active player, specifying which of the 4 forces (0-based) that the player's on&lt;br /&gt;
* '''u16[4]''': 1 integer for each force, string number of the name of the force&lt;br /&gt;
* '''u8[4]''': 1 byte for each force specifying the properties:&lt;br /&gt;
** '''Bit 0''' - Random start location&lt;br /&gt;
** '''Bit 1''' - Allies&lt;br /&gt;
** '''Bit 2''' - Allied victory&lt;br /&gt;
** '''Bit 3''' - Shared vision&lt;br /&gt;
** '''Bit 4-7''' - Unused&lt;br /&gt;
Notes about FORC:&lt;br /&gt;
* If there is no string specified for a force name, it will default to a &amp;quot;Force #&amp;quot; string.&lt;br /&gt;
* If this section is less than 20 bytes, the remaining bytes are defaulted to 0.&lt;br /&gt;
* Players can be on a force greater than 4, however they will not appear in the game lobby.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;WAV &amp;quot; - WAV String Indexes==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
There are 512 wav entires regardless of how many are actually used.&lt;br /&gt;
* '''u32[512]''': 1 long for each WAV. Indicates a string index is used for a WAV path in the MPQ. If the entry is not used, it will be 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIS&amp;quot; - Unit Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4048 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;UNIx&amp;quot; - BW Unit Settings|&amp;quot;UNIx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains the unit settings for the level:&lt;br /&gt;
* '''u8[228]''': 1 byte for each unit, in order of Unit ID&lt;br /&gt;
** '''00''' - Unit does not use default settings&lt;br /&gt;
** '''01''' - Unit does use default settings&lt;br /&gt;
* '''u32[228]''': Hit points for unit (Note the displayed value is this value / 256, with the low byte being a fractional HP value)&lt;br /&gt;
* '''u16[228]''': Shield points, in order of Unit ID&lt;br /&gt;
* '''u8[228]''': Armor points, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Build time (1/60 seconds), in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Mineral cost, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Gas cost, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': String number, in order of Unit ID&lt;br /&gt;
* '''u16[100]''': Base weapon damage the weapon does, in weapon ID order ([[#List of Unit Weapon IDs]])&lt;br /&gt;
* '''u16[100]''': Upgrade bonus weapon damage, in weapon ID order&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGS&amp;quot; - Upgrade Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 598 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;UPGx&amp;quot; - BW Upgrade Settings|&amp;quot;UPGx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains upgrade settings:&lt;br /&gt;
* '''u8[46]''': 1 byte per each upgrade, in order of upgrade id.&lt;br /&gt;
** '''00''' - Upgrade uses custom settings&lt;br /&gt;
** '''01''' - Upgrade uses default settings&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, gas time factor for each upgrade, in order of upgrade id.&lt;br /&gt;
See [[#List of Upgrade IDs]] for upgrade ids.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TECS&amp;quot; - Tech Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 216 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;TECx&amp;quot; - BW Tech Settings|&amp;quot;TECx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains technology/special abilities settings:&lt;br /&gt;
* '''u8[24]''': 1 byte per each technology, specifies if the tech overrides the default settings. In order of technology id&lt;br /&gt;
** '''00''' - Technology uses custom settings&lt;br /&gt;
** '''01''' - Technology uses default settings&lt;br /&gt;
* '''u16[24]''': Mineral cost to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Gas cost to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Time required to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Energy cost to cast technology/special ability. In order of technology id.&lt;br /&gt;
See [[#List of Technology IDs]] for technology ids.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SWNM&amp;quot; - Switch Names==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section contains the strings used for each switch. There are 256 switches, and can't be any more or any less.&lt;br /&gt;
* '''u32[256]''': One long for each switch, specifies the string number for the name of each switch. Unnamed switches will have an index of 0, and have a default switch name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;COLR&amp;quot; - Player Colors==&lt;br /&gt;
''Required for Brood War only and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Can be in non-Brood War maps in Remaster, if CRGB is also present.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 8 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section indicates what color each player is, but only has effect on Brood War.&lt;br /&gt;
* '''u8[8]''': 1 byte for each player, indicates the color of the player&lt;br /&gt;
** '''00''' - Red&lt;br /&gt;
** '''01''' - Blue&lt;br /&gt;
** '''02''' - Teal&lt;br /&gt;
** '''03''' - Purple&lt;br /&gt;
** '''04''' - Orange&lt;br /&gt;
** '''05''' - Brown&lt;br /&gt;
** '''06''' - White&lt;br /&gt;
** '''07''' - Yellow&lt;br /&gt;
** '''08''' - Green&lt;br /&gt;
** '''09''' - Pale yellow&lt;br /&gt;
** '''10''' - Tan&lt;br /&gt;
** '''11''' - Azure (Neutral color)&lt;br /&gt;
Other values can be used but may have different results depending on the tileset. Any color value above 11 is an overflow. As of patch 1.18.6 values above 11 result in default player color.&lt;br /&gt;
&lt;br /&gt;
SC:R Only colors:&lt;br /&gt;
Selecting these in a non-SC:R map seems to just use default colors, unless the [[#&amp;quot;CRGB&amp;quot; - Remastered Player Colors|CRGB]] section is also present regardless of version (including non-BW versions).&lt;br /&gt;
* '''12''' - Pale Green&lt;br /&gt;
* '''13''' - Blueish Grey&lt;br /&gt;
* '''14''' - Pale Yellow&lt;br /&gt;
* '''15''' - Cyan&lt;br /&gt;
* '''16''' - Pink&lt;br /&gt;
* '''17''' - Olive&lt;br /&gt;
* '''18''' - Lime&lt;br /&gt;
* '''19''' - Navy&lt;br /&gt;
* '''20''' - Magenta&lt;br /&gt;
* '''21''' - Grey&lt;br /&gt;
* '''22''' - Black&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;CRGB&amp;quot; - Remastered Player Colors==&lt;br /&gt;
''Requirement unknown, but can be in any map type including non-remaster maps.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 32 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''u8[8][3]''': 3 bytes for each player corresponding to an RGB color value&lt;br /&gt;
** '''u8''': R&lt;br /&gt;
** '''u8''': G&lt;br /&gt;
** '''u8''': B&lt;br /&gt;
* '''u8[8]''': Indicates how to select the color for each player&lt;br /&gt;
** '''0''' - Random Predefined&lt;br /&gt;
** '''1''' - Player's Choice&lt;br /&gt;
** '''2''' - Custom TGB Color (RGB value for the corresponding player defined above)&lt;br /&gt;
** '''3''' - Use &amp;quot;COLR&amp;quot; selection&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PUPx&amp;quot; - BW Upgrade Restrictions==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2318 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UPGR&amp;quot; - Upgrade Restrictions|&amp;quot;UPGR&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is identical to UPGR section except it uses the Brood War set of 61 upgrades instead of the original 46.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PTEx&amp;quot; - BW Tech Restrictions==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1672 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;PTEC&amp;quot; - Tech Restrictions|&amp;quot;PTEC&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is identical to PTEC section except it uses the Brood War set of 44 technologies instead of the original 24.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIx&amp;quot; - BW Unit Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4168 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UNIS&amp;quot; - Unit Settings|&amp;quot;UNIS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is indentical to UNIS section except it uses the Brood War set of 130 weapons instead of the original 100.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGx&amp;quot; - BW Upgrade Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 794 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UPGS&amp;quot; - Upgrade Settings|&amp;quot;UPGS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section the same as UPGS except section except it uses the Brood War set of 61 upgrades instead of the original 46, and there is an unused byte after the first set:&lt;br /&gt;
* '''u8[61]''': 1 byte per each upgrade, in order of upgrade id.&lt;br /&gt;
** '''00''' - Upgrade uses custom settings&lt;br /&gt;
** '''01''' - Upgrade uses default settings&lt;br /&gt;
* '''u8''': Unused.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, gas time factor for each upgrade, in order of upgrade id.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TECx&amp;quot; - BW Tech Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 396 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;TECS&amp;quot; - Tech Settings|&amp;quot;TECS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is indentical to UNIS section except it uses the Brood War set of 44 technologies instead of the original 24.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Appendix=&lt;br /&gt;
A set of references and IDs that should help you easier in the trigger section and the technology/player ids, etc:&lt;br /&gt;
&lt;br /&gt;
==Trigger Conditions List==&lt;br /&gt;
* 0 = No Condition&lt;br /&gt;
* 1 = Countdown Timer(Comparison, QNumber)&lt;br /&gt;
* 2 = Command(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 3 = Bring(Player, Comparison, TUnit, Loc, QNumber)&lt;br /&gt;
* 4 = Accumulate(Player, Comparison, QNumber, ResType)&lt;br /&gt;
* 5 = Kill(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 6 = Command the Most(TUnit)&lt;br /&gt;
* 7 = Commands the Most At(TUnit, Loc)&lt;br /&gt;
* 8 = Most Kills(TUnit)&lt;br /&gt;
* 9 = Highest Score(Score)&lt;br /&gt;
* 10 = Most Resources(ResType)&lt;br /&gt;
* 11 = Switch(Switch)&lt;br /&gt;
* 12 = Elapsed Time(Comparison, QNumber)&lt;br /&gt;
* 13 = Data is a Mission Briefing. Conditions are N/A (Same as Never)&lt;br /&gt;
* 14 = Opponents(Player, Comparison, QNumber)&lt;br /&gt;
* 15 = Deaths(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 16 = Command the Least(TUnit)&lt;br /&gt;
* 17 = Command the Least At(TUnit, Loc)&lt;br /&gt;
* 18 = Least Kills(TUnit)&lt;br /&gt;
* 19 = Lowest Score(Score)&lt;br /&gt;
* 20 = Least Resources(ResType)&lt;br /&gt;
* 21 = Score(Player, Comparison, Score, QNumber)&lt;br /&gt;
* 22 = Always (Same as No Condition)&lt;br /&gt;
* 23 = Never&lt;br /&gt;
&lt;br /&gt;
==Trigger Actions List==&lt;br /&gt;
* 0 = No Action&lt;br /&gt;
* 1 = Victory&lt;br /&gt;
* 2 = Defeat&lt;br /&gt;
* 3 = Preserve Trigger&lt;br /&gt;
* 4 = Wait(Time)&lt;br /&gt;
* 5 = Pause Game (Single player only)&lt;br /&gt;
* 6 = Unpause Game (Single player only)&lt;br /&gt;
* 7 = Transmission(Text, Unit, Loc, Time, Modifier, Wave, WavTime)&lt;br /&gt;
* 8 = Play WAV(Wav, WavTime)&lt;br /&gt;
* 9 = Display Text Message(Text)&lt;br /&gt;
* 10 = Center View(Loc)&lt;br /&gt;
* 11 = Create Unit with Properties(Player, Unit, Number, Loc, UnitProp)&lt;br /&gt;
* 12 = Set Mission Objectives(Text)&lt;br /&gt;
* 13 = Set Switch(Switch, SwAction)&lt;br /&gt;
* 14 = Set Countdown Timer(Time, Modifier)&lt;br /&gt;
* 15 = Run AI Script(AIScript)&lt;br /&gt;
* 16 = Run AI Script At Location(AIScript)&lt;br /&gt;
* 17 = Leader Board (Control) (Text, TUnit)&lt;br /&gt;
* 18 = Leader Board (Control At Location) (Text, TUnit, Loc)&lt;br /&gt;
* 19 = Leader Board (Resources) (Text, ResType)&lt;br /&gt;
* 20 = Leader Board (Kills) (Text, TUnit)&lt;br /&gt;
* 21 = Leader Board (Points) (Text, Score)&lt;br /&gt;
* 22 = Kill Unit (Player, TUnit)&lt;br /&gt;
* 23 = Kill Unit At Location(Player, TUnit, Number, Loc)&lt;br /&gt;
* 24 = Remove Unit(Player, TUnit)&lt;br /&gt;
* 25 = Remove Unit At Location(Player, TUnit, Number, Loc)&lt;br /&gt;
* 26 = Set Resources(Player, Number, Modifier, ResType)&lt;br /&gt;
* 27 = Set Score(Player, Number, Modifier, Score)&lt;br /&gt;
* 28 = Minimap Ping(Loc)&lt;br /&gt;
* 29 = Talking Portrait(Unit, Time)&lt;br /&gt;
* 30 = Mute Unit Speech&lt;br /&gt;
* 31 = Unmute Unit Speech&lt;br /&gt;
* 32 = Leaderboard Computer Players(State)&lt;br /&gt;
* 33 = Leaderboard Goal (Control) (Text, TUnit, Number)&lt;br /&gt;
* 34 = Leaderboard Goal (Control At Location) (Text, TUnit, Number, Loc)&lt;br /&gt;
* 35 = Leaderboard Goal (Resources) (Text, TUnit, Number, ResType)&lt;br /&gt;
* 36 = Leaderboard Goal (Kills) (Text, TUnit, Number)&lt;br /&gt;
* 37 = Leaderboard Goal (Points) (Text, Number, Score)&lt;br /&gt;
* 38 = Move Location(Player, TUnit, SLoc, DLoc)&lt;br /&gt;
* 39 = Move Unit(Player, TUnit, Number, SLoc, DLoc)&lt;br /&gt;
* 40 = Leaderboard (Greed) (Number)&lt;br /&gt;
* 41 = Set Next Scenario(Text) (Single player only)&lt;br /&gt;
* 42 = Set Doodad State(Player, TUnit, Loc, State)&lt;br /&gt;
* 43 = Set Invincibility(Player, TUnit, Loc, State)&lt;br /&gt;
* 44 = Create Unit(Player, Unit, Number, Loc)&lt;br /&gt;
* 45 = Set Deaths(Player, TUnit, Number, Modifier)&lt;br /&gt;
* 46 = Order(Player, TUnit, SLoc, DLoc, Order)&lt;br /&gt;
* 47 = Comment(Text)&lt;br /&gt;
* 48 = Give Units to Player(SPlayer, DPlayer, TUnit, Number, Loc)&lt;br /&gt;
* 49 = Modify Unit Hit Points(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 50 = Modify Unit Energy(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 51 = Modify Unit Shield Points(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 52 = Modify Unit Resource Amount(Player, Number, ModAmount, Loc)&lt;br /&gt;
* 53 = Modify Unit Hanger Count(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 54 = Pause Timer&lt;br /&gt;
* 55 = Unpause Timer&lt;br /&gt;
* 56 = Draw&lt;br /&gt;
* 57 = Set Alliance Status(Player, AllyStatus)&lt;br /&gt;
* 58 = Disable Debug Mode (Single player only)&lt;br /&gt;
* 59 = Enable Debug Mode (Single player only)&lt;br /&gt;
&lt;br /&gt;
==Mission Briefing Actions List==&lt;br /&gt;
* 0 - No Action&lt;br /&gt;
* 1 - Wait(Time)&lt;br /&gt;
* 2 - Play WAV(Wave, WavTime)&lt;br /&gt;
* 3 - Text Message(Text, Time)&lt;br /&gt;
* 4 - Mission Objectives(Text)&lt;br /&gt;
* 5 - Show Portrait(Unit, Slot)&lt;br /&gt;
* 6 - Hide Portrait(Slot)&lt;br /&gt;
* 7 - Display Speaking Portrait(Slot, Time)&lt;br /&gt;
* 8 - Transmission(Text, Slot, Time, Modifier, Wave, WavTime)&lt;br /&gt;
* 9 - Skip Tutorial Enabled&lt;br /&gt;
&lt;br /&gt;
==Switch States==&lt;br /&gt;
* 2 = Switch is set&lt;br /&gt;
* 3 = Switch is cleared&lt;br /&gt;
&lt;br /&gt;
==Numeric Comparisons==&lt;br /&gt;
* 0 = At least&lt;br /&gt;
* 1 = At most&lt;br /&gt;
* 10 = Exactly&lt;br /&gt;
&lt;br /&gt;
==Score Types==&lt;br /&gt;
* 0 = Total&lt;br /&gt;
* 1 = Units&lt;br /&gt;
* 2 = Buildings&lt;br /&gt;
* 3 = Units and Buildings&lt;br /&gt;
* 4 = Kills&lt;br /&gt;
* 5 = Razings&lt;br /&gt;
* 6 = Kills and Razings&lt;br /&gt;
* 7 = Custom&lt;br /&gt;
&lt;br /&gt;
==Resource Types==&lt;br /&gt;
* 0 = Ore&lt;br /&gt;
* 1 = Gas&lt;br /&gt;
* 2 = Ore and Gas&lt;br /&gt;
&lt;br /&gt;
==Alliance Statuses==&lt;br /&gt;
* 0 = Enemy&lt;br /&gt;
* 1 = Ally&lt;br /&gt;
* 2 = Allied Victory&lt;br /&gt;
&lt;br /&gt;
==Unit Orders==&lt;br /&gt;
* 0 = Move&lt;br /&gt;
* 1 = Patrol&lt;br /&gt;
* 2 = Attack&lt;br /&gt;
&lt;br /&gt;
==Action States==&lt;br /&gt;
* 4 = Enabled/Set switch&lt;br /&gt;
* 5  = Disabled/Clear switch&lt;br /&gt;
* 6 = Toggle/Toggle switch&lt;br /&gt;
* 11 = Randomize switch&lt;br /&gt;
&lt;br /&gt;
==Number Modifiers==&lt;br /&gt;
* 7 = Set to&lt;br /&gt;
* 8 = Add&lt;br /&gt;
* 9 = Subtract&lt;br /&gt;
&lt;br /&gt;
==Trigger Unit Types==&lt;br /&gt;
* All normal units (0-227)&lt;br /&gt;
* 228 = None&lt;br /&gt;
* 229 = Any unit&lt;br /&gt;
* 230 = Men&lt;br /&gt;
* 231 = Buildings&lt;br /&gt;
* 232 = Factories&lt;br /&gt;
&lt;br /&gt;
==List of Players/Group IDs==&lt;br /&gt;
* 0 = Player 1&lt;br /&gt;
* 1 = Player 2&lt;br /&gt;
* 2 = Player 3&lt;br /&gt;
* 3 = Player 4&lt;br /&gt;
* 4 = Player 5&lt;br /&gt;
* 5 = Player 6&lt;br /&gt;
* 6 = Player 7&lt;br /&gt;
* 7 = Player 8&lt;br /&gt;
* 8 = Player 9&lt;br /&gt;
* 9 = Player 10&lt;br /&gt;
* 10 = Player 11&lt;br /&gt;
* 11 = Player 12&lt;br /&gt;
* 12 = None (Unused, One-entry Overflow in some cases)&lt;br /&gt;
* 13 = Current Player&lt;br /&gt;
* 14 = Foes&lt;br /&gt;
* 15 = Allies&lt;br /&gt;
* 16 = Neutral Players&lt;br /&gt;
* 17 = All Players&lt;br /&gt;
* 18 = Force 1&lt;br /&gt;
* 19 = Force 2&lt;br /&gt;
* 20 = Force 3&lt;br /&gt;
* 21 = Force 4&lt;br /&gt;
* 22 = Unused 1&lt;br /&gt;
* 23 = Unused 2&lt;br /&gt;
* 24 = Unused 3&lt;br /&gt;
* 25 = Unused 4&lt;br /&gt;
* 26 = Non Allied Victory Players&lt;br /&gt;
&lt;br /&gt;
==List of Technology IDs==&lt;br /&gt;
* 0 = Stim Packs&lt;br /&gt;
* 1 = Lockdown&lt;br /&gt;
* 2 = EMP Shockwave&lt;br /&gt;
* 3 = Spider Mines&lt;br /&gt;
* 4 = Scanner Sweep&lt;br /&gt;
* 5 = Siege Mode&lt;br /&gt;
* 6 = Defensive Matrix&lt;br /&gt;
* 7 = Irradiate&lt;br /&gt;
* 8 = Yamato Gun&lt;br /&gt;
* 9 = Cloaking Field&lt;br /&gt;
* 10 = Personnel Cloaking&lt;br /&gt;
* 11 = Burrowing&lt;br /&gt;
* 12 = Infestation&lt;br /&gt;
* 13 = Spawn Broodling&lt;br /&gt;
* 14 = Dark Swarm&lt;br /&gt;
* 15 = Plague&lt;br /&gt;
* 16 = Consume&lt;br /&gt;
* 17 = Ensnare&lt;br /&gt;
* 18 = Parasite&lt;br /&gt;
* 19 = Psionic Storm&lt;br /&gt;
* 20 = Hallucination&lt;br /&gt;
* 21 = Recall&lt;br /&gt;
* 22 = Stasis Field&lt;br /&gt;
* 23 = Archon Warp&lt;br /&gt;
* 24 = Restoration&lt;br /&gt;
* 25 = Disruption Web&lt;br /&gt;
* 26 = Unused 26&lt;br /&gt;
* 27 = Mind Control&lt;br /&gt;
* 28 = Dark Archon Meld&lt;br /&gt;
* 29 = Feedback&lt;br /&gt;
* 30 = Optical Flare&lt;br /&gt;
* 31 = Maelstorm&lt;br /&gt;
* 32 = Lurker Aspect&lt;br /&gt;
* 33 = Unused 33&lt;br /&gt;
* 34 = Healing&lt;br /&gt;
* 35 = Unused 35&lt;br /&gt;
* 36 = Unused 36&lt;br /&gt;
* 37 = Unused 37&lt;br /&gt;
* 38 = Unused 38&lt;br /&gt;
* 39 = Unused 39&lt;br /&gt;
* 40 = Unused 40&lt;br /&gt;
* 41 = Unused 41&lt;br /&gt;
* 42 = Unused 42&lt;br /&gt;
* 43 = Unused 43&lt;br /&gt;
&lt;br /&gt;
==List of Upgrade IDs==&lt;br /&gt;
* 0 = Terran Infantry Armor&lt;br /&gt;
* 1 = Terran Vehicle Plating&lt;br /&gt;
* 2 = Terran Ship Plating&lt;br /&gt;
* 3 = Zerg Carapace&lt;br /&gt;
* 4 = Zerg Flyer Caparace&lt;br /&gt;
* 5 = Protoss Armor&lt;br /&gt;
* 6 = Protoss Plating&lt;br /&gt;
* 7 = Terran Infantry Weapons&lt;br /&gt;
* 8 = Terran Vehicle Weapons&lt;br /&gt;
* 9 = Terran Ship Weapons&lt;br /&gt;
* 10 = Zerg Melee Attacks&lt;br /&gt;
* 11 = Zerg Missile Attacks&lt;br /&gt;
* 12 = Zerg Flyer Attacks&lt;br /&gt;
* 13 = Protoss Ground Weapons&lt;br /&gt;
* 14 = Protoss Air Weapons&lt;br /&gt;
* 15 = Protoss Plasma Shields&lt;br /&gt;
* 16 = U-238 Shells&lt;br /&gt;
* 17 = Ion Thrusters&lt;br /&gt;
* 18 = Burst Lasers (Unused)&lt;br /&gt;
* 19 = Titan Reactor (SV +50)&lt;br /&gt;
* 20 = Ocular Implants&lt;br /&gt;
* 21 = Moebius Reactor (Ghost +50)&lt;br /&gt;
* 22 = Apollo Reactor (Wraith +50)&lt;br /&gt;
* 23 = Colossus Reactor (BC +50)&lt;br /&gt;
* 24 = Ventral Sacs&lt;br /&gt;
* 25 = Antennae&lt;br /&gt;
* 26 = Pneumatized Carapace&lt;br /&gt;
* 27 = Metabolic Boost&lt;br /&gt;
* 28 = Adrenal Glands&lt;br /&gt;
* 29 = Muscular Augments&lt;br /&gt;
* 30 = Grooved Spines&lt;br /&gt;
* 31 = Gamete Meiosis (Queen +50)&lt;br /&gt;
* 32 = Metasynaptic Node (Defiler +50)&lt;br /&gt;
* 33 = Singularity Charge&lt;br /&gt;
* 34 = Leg Enhancements&lt;br /&gt;
* 35 = Scarab Damage &lt;br /&gt;
* 36 = Reaver Capacity &lt;br /&gt;
* 37 = Gravitic Drive&lt;br /&gt;
* 38 = Sensor Array&lt;br /&gt;
* 39 = Gravitic Boosters&lt;br /&gt;
* 40 = Khaydarin Amulet (HT +50)&lt;br /&gt;
* 41 = Apial Sensors&lt;br /&gt;
* 42 = Gravitic Thrusters&lt;br /&gt;
* 43 = Carrier Capacity&lt;br /&gt;
* 44 = Khaydarin Core (Arbiter +50)&lt;br /&gt;
* 45 = Unknown Upgrade45&lt;br /&gt;
* 46 = Unknown Upgrade46&lt;br /&gt;
* 47 = Argus Jewel (Corsair +50)&lt;br /&gt;
* 48 = Unknown Upgrade48&lt;br /&gt;
* 49 = Argus Talisman (DA +50)&lt;br /&gt;
* 50 = Unknown Upgrade50&lt;br /&gt;
* 51 = Caduceus Reactor (Medic +50)&lt;br /&gt;
* 52 = Chitinous Plating&lt;br /&gt;
* 53 = Anabolic Synthesis&lt;br /&gt;
* 54 = Charon Booster&lt;br /&gt;
* 55 = Unknown Upgrade55&lt;br /&gt;
* 56 = Unknown Upgrade56&lt;br /&gt;
* 57 = Unknown Upgrade57&lt;br /&gt;
* 58 = Unknown Upgrade58&lt;br /&gt;
* 59 = Unknown Upgrade59&lt;br /&gt;
* 60 = Unknown Upgrade60&lt;br /&gt;
&lt;br /&gt;
==List of Unit Weapon IDs==&lt;br /&gt;
* 0 = Gauss Rifle (Normal)&lt;br /&gt;
* 1 = Gauss Rifle (Jim Raynor-Marine)&lt;br /&gt;
* 2 = C-10 Concussion Rifle (Normal)&lt;br /&gt;
* 3 = C-10 Concussion Rifle (Sarah Kerrigan)&lt;br /&gt;
* 4 = Fragmentation Grenade (Normal)&lt;br /&gt;
* 5 = Fragmentation Grenade (Jim Raynor-Vulture)&lt;br /&gt;
* 6 = Spider Mines&lt;br /&gt;
* 7 = Twin Autocannons (Normal)&lt;br /&gt;
* 8 = Hellfire Missile Pack (Normal)&lt;br /&gt;
* 9 = Twin Autocannons (Alan Schezar)&lt;br /&gt;
* 10 = Hellfire Missile Pack (Alan Schezar)&lt;br /&gt;
* 11 = Arclite Cannon (Normal)&lt;br /&gt;
* 12 = Arclite Cannon (Edmund Duke)&lt;br /&gt;
* 13 = Fusion Cutter&lt;br /&gt;
* 14 = Fusion Cutter (Harvest)&lt;br /&gt;
* 15 = Gemini Missiles (Normal)&lt;br /&gt;
* 16 = Burst Lasers (Normal)&lt;br /&gt;
* 17 = Gemini Missiles (Tom Kazansky)&lt;br /&gt;
* 18 = Burst Lasers (Tom Kazansky)&lt;br /&gt;
* 19 = ATS Laser Battery (Normal)&lt;br /&gt;
* 20 = ATA Laser Battery (Normal)&lt;br /&gt;
* 21 = ATS Laser Battery (Norad II+Mengsk+DuGalle)&lt;br /&gt;
* 22 = ATA Laser Battery (Norad II+Mengsk+DuGalle)&lt;br /&gt;
* 23 = ATS Laser Battery (Hyperion)&lt;br /&gt;
* 24 = ATA Laser Battery (Hyperion)&lt;br /&gt;
* 25 = Flame Thrower (Normal)&lt;br /&gt;
* 26 = Flame Thrower (Gui Montag)&lt;br /&gt;
* 27 = Arclite Shock Cannon (Normal)&lt;br /&gt;
* 28 = Arclite Shock Cannon (Edmund Duke)&lt;br /&gt;
* 29 = Longbolt Missiles&lt;br /&gt;
* 30 = Yamato Gun&lt;br /&gt;
* 31 = Nuclear Missile&lt;br /&gt;
* 32 = Lockdown&lt;br /&gt;
* 33 = EMP Shockwave&lt;br /&gt;
* 34 = Irradiate&lt;br /&gt;
* 35 = Claws (Normal)&lt;br /&gt;
* 36 = Claws (Devouring One)&lt;br /&gt;
* 37 = Claws (Infested Kerrigan)&lt;br /&gt;
* 38 = Needle Spines (Normal)&lt;br /&gt;
* 39 = Needle Spines (Hunter Killer)&lt;br /&gt;
* 40 = Kaiser Blades (Normal)&lt;br /&gt;
* 41 = Kaiser Blades (Torrasque)&lt;br /&gt;
* 42 = Toxic Spores (Broodling)&lt;br /&gt;
* 43 = Spines&lt;br /&gt;
* 44 = Spines (Harvest)&lt;br /&gt;
* 45 = Acid Spray (Unused)&lt;br /&gt;
* 46 = Acid Spore (Normal)&lt;br /&gt;
* 47 = Acid Spore (Kukulza-Guardian)&lt;br /&gt;
* 48 = Glave Wurm (Normal)&lt;br /&gt;
* 49 = Glave Wurm (Kukulza-Mutalisk)&lt;br /&gt;
* 50 = Venom (Unused-Defiler)&lt;br /&gt;
* 51 = Venom (Unused-Defiler Hero)&lt;br /&gt;
* 52 = Seeker Spores&lt;br /&gt;
* 53 = Subterranean Tentacle&lt;br /&gt;
* 54 = Suicide (Infested Terran)&lt;br /&gt;
* 55 = Suicide (Scourge)&lt;br /&gt;
* 56 = Parasite&lt;br /&gt;
* 57 = Spawn Broodlings&lt;br /&gt;
* 58 = Ensnare&lt;br /&gt;
* 59 = Dark Swarm&lt;br /&gt;
* 60 = Plague&lt;br /&gt;
* 61 = Consume&lt;br /&gt;
* 62 = Particle Beam&lt;br /&gt;
* 63 = Particle Beam (Harvest)&lt;br /&gt;
* 64 = Psi Blades (Normal)&lt;br /&gt;
* 65 = Psi Blades (Fenix-Zealot)&lt;br /&gt;
* 66 = Phase Disruptor (Normal)&lt;br /&gt;
* 67 = Phase Disruptor (Fenix-Dragoon)&lt;br /&gt;
* 68 = Psi Assault (Normal-Unused)&lt;br /&gt;
* 69 = Psi Assault (Tassadar+Aldaris)&lt;br /&gt;
* 70 = Psionic Shockwave (Normal)&lt;br /&gt;
* 71 = Psionic Shockwave (Tassadar/Zeratul Archon)&lt;br /&gt;
* 72 = Unknown72&lt;br /&gt;
* 73 = Dual Photon Blasters (Normal)&lt;br /&gt;
* 74 = Anti-matter Missiles (Normal)&lt;br /&gt;
* 75 = Dual Photon Blasters (Mojo)&lt;br /&gt;
* 76 = Anit-matter Missiles (Mojo)&lt;br /&gt;
* 77 = Phase Disruptor Cannon (Normal)&lt;br /&gt;
* 78 = Phase Disruptor Cannon (Danimoth)&lt;br /&gt;
* 79 = Pulse Cannon&lt;br /&gt;
* 80 = STS Photon Cannon&lt;br /&gt;
* 81 = STA Photon Cannon&lt;br /&gt;
* 82 = Scarab&lt;br /&gt;
* 83 = Stasis Field&lt;br /&gt;
* 84 = Psi Storm&lt;br /&gt;
* 85 = Warp Blades (Zeratul)&lt;br /&gt;
* 86 = Warp Blades (Dark Templar Hero)&lt;br /&gt;
* 87 = Missiles (Unused)&lt;br /&gt;
* 88 = Laser Battery1 (Unused)&lt;br /&gt;
* 89 = Tormentor Missiles (Unused)&lt;br /&gt;
* 90 = Bombs (Unused)&lt;br /&gt;
* 91 = Raider Gun (Unused)&lt;br /&gt;
* 92 = Laser Battery2 (Unused)&lt;br /&gt;
* 93 = Laser Battery3 (Unused)&lt;br /&gt;
* 94 = Dual Photon Blasters (Unused)&lt;br /&gt;
* 95 = Flechette Grenade (Unused)&lt;br /&gt;
* 96 = Twin Autocannons (Floor Trap)&lt;br /&gt;
* 97 = Hellfire Missile Pack (Wall Trap)&lt;br /&gt;
* 98 = Flame Thrower (Wall Trap)&lt;br /&gt;
* 99 = Hellfire Missile Pack (Floor Trap)&lt;br /&gt;
* 100 = Neutron Flare&lt;br /&gt;
* 101 = Disruption Web&lt;br /&gt;
* 102 = Restoration&lt;br /&gt;
* 103 = Halo Rockets&lt;br /&gt;
* 104 = Corrosive Acid&lt;br /&gt;
* 105 = Mind Control&lt;br /&gt;
* 106 = Feedback&lt;br /&gt;
* 107 = Optical Flare&lt;br /&gt;
* 108 = Maelstrom&lt;br /&gt;
* 109 = Subterranean Spines&lt;br /&gt;
* 110 = Gauss Rifle0 (Unused)&lt;br /&gt;
* 111 = Warp Blades (Normal)&lt;br /&gt;
* 112 = C-10 Concussion Rifle (Samir Duran)&lt;br /&gt;
* 113 = C-10 Concussion Rifle (Infested Duran)&lt;br /&gt;
* 114 = Dual Photon Blasters (Artanis)&lt;br /&gt;
* 115 = Anti-matter Missiles (Artanis)&lt;br /&gt;
* 116 = C-10 Concussion Rifle (Alexei Stukov)&lt;br /&gt;
* 117 = Gauss Rifle1 (Unused)&lt;br /&gt;
* 118 = Gauss Rifle2 (Unused)&lt;br /&gt;
* 119 = Gauss Rifle3 (Unused)&lt;br /&gt;
* 120 = Gauss Rifle4 (Unused)&lt;br /&gt;
* 121 = Gauss Rifle5 (Unused)&lt;br /&gt;
* 122 = Gauss Rifle6 (Unused)&lt;br /&gt;
* 123 = Gauss Rifle7 (Unused)&lt;br /&gt;
* 124 = Gauss Rifle8 (Unused)&lt;br /&gt;
* 125 = Gauss Rifle9 (Unused)&lt;br /&gt;
* 126 = Gauss Rifle10 (Unused)&lt;br /&gt;
* 127 = Gauss Rifle11 (Unused)&lt;br /&gt;
* 128 = Gauss Rifle12 (Unused)&lt;br /&gt;
* 129 = Gauss Rifle13 (Unused)&lt;br /&gt;
* 130 = None&lt;br /&gt;
&lt;br /&gt;
==Complete Modifier List==&lt;br /&gt;
* 0 = Condition: &amp;gt;= (greater than or equal to)&lt;br /&gt;
* 1 = Condition: &amp;lt;= (less than or equal to)&lt;br /&gt;
* 2 = Condition: == TRUE (Is True)&lt;br /&gt;
* 3 = Condition: == FALSE (Is False)&lt;br /&gt;
* 4 = Action: = TRUE (Set to True)&lt;br /&gt;
* 5 = Action: = FALSE (Set to False)&lt;br /&gt;
* 6 = Action: NOT (toggle)&lt;br /&gt;
* 7 = Action: = (Set to)&lt;br /&gt;
* 8 = Action: += (Add)&lt;br /&gt;
* 9 = Action: -= (Subtract)&lt;br /&gt;
* 10 = Condition: == (Exactly)&lt;br /&gt;
* 11 = Action: Randomize&lt;br /&gt;
&lt;br /&gt;
[[Category:StarCraft]]&lt;br /&gt;
[[Category:Reference]]&lt;/div&gt;</summary>
		<author><name>FaRTy1billion</name></author>	</entry>

	<entry>
		<id>https://staredit.net/wiki/index.php?title=Scenario.chk&amp;diff=641</id>
		<title>Scenario.chk</title>
		<link rel="alternate" type="text/html" href="https://staredit.net/wiki/index.php?title=Scenario.chk&amp;diff=641"/>
				<updated>2020-10-02T07:09:57Z</updated>
		
		<summary type="html">&lt;p&gt;FaRTy1billion: Updated COLR, added CRGB, minor edit to TRIG&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The CHK file is a very dense file found inside the SCM or SCX file (as &amp;quot;staredit\scenario.chk&amp;quot;), which is just a renamed MPQ archive.&lt;br /&gt;
&lt;br /&gt;
In this article, some shorthand will be used for datatypes:&lt;br /&gt;
* '''u8''' for an unsigned byte&lt;br /&gt;
* '''u16''' for an unsigned short (2-byte integer)&lt;br /&gt;
* '''u32''' for an unsigned int (4-byte integer)&lt;br /&gt;
* '''uT[''a'']''' for an array of datatype '''T''' (8, 16, 32) with '''''a''''' number of elements&lt;br /&gt;
* '''uT[''a''][''b'']''' for a two-dimensional array of datatype '''T''', where each element of '''T[''a'']''' will be an array of size '''''b'''''&lt;br /&gt;
&lt;br /&gt;
=Sections=&lt;br /&gt;
The CHK is split into several named chunks (hence the file extension, an abbreviation of ''CHunK'').&lt;br /&gt;
&lt;br /&gt;
Each section begins with an 8-byte header:&lt;br /&gt;
* '''u32''' Name - A 4-byte string uniquely identifying that chunk's purpose.&lt;br /&gt;
* '''u32''' Size - The size, in bytes, of the chunk (not including this header)&lt;br /&gt;
Followed by as many bytes as 'Size', in a format described below.&lt;br /&gt;
&lt;br /&gt;
Some things to keep in mind about the CHK section:&lt;br /&gt;
* Invalid sections can exist and will be ignored. While Size is unsigned, it can safely be a negative value to read a chunk earlier in the file. This allows for &amp;quot;section stacking&amp;quot;, allowing smaller sections to be placed inside of larger ones or duplicate triggers or units to take less space in the file.&lt;br /&gt;
* All sections will marked &amp;quot;Not required.&amp;quot; are never read by StarCraft and can safely be omitted. However they may or may not be read by StarEdit, and may cause the map to be unreadable in an editor.&lt;br /&gt;
* Note &amp;quot;Hybrid&amp;quot;, or &amp;quot;Enhanced&amp;quot;, maps were introduced in 1.04. They are supported both by Original StarCraft and Brood War and usually contain sections for both types (e.g., UPGS and UPGx, TECS and TECx), but both sections aren't necessarily read.&lt;br /&gt;
* Duplicate sections will overwrite previously defined section data, except where noted. Note this only applies to those section that pass the specified &amp;quot;validation&amp;quot; parameters, as any section that does not successfully validate will be ignored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TYPE&amp;quot; - Map Type==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the type of scenario.&lt;br /&gt;
* '''u32''': Specifies the type of scenario:&lt;br /&gt;
** '''0x53574152''' or '''RAWS''' - 1.04 StarCraft and above (&amp;quot;hybrid&amp;quot;)&lt;br /&gt;
** '''0x42574152''' or '''RAWB''' - Brood War&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;VER &amp;quot; - Format Version==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section identifies the file format version.&lt;br /&gt;
* '''u16''': File format version:&lt;br /&gt;
** '''59''' - 1.00 Starcraft&lt;br /&gt;
** '''63''' - 1.04 Starcraft and above (&amp;quot;hybrid&amp;quot;)&lt;br /&gt;
** '''64''' - Starcraft Remastered&lt;br /&gt;
** '''205''' - Brood War&lt;br /&gt;
** '''206''' - Brood War Remastered&lt;br /&gt;
This is the only version code section to actually be read by StarCraft (of TYPE, VER , IVER, and IVE2). Any other value is invalid in retail StarCraft and is usually a beta version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IVER&amp;quot; - Map Version==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section &amp;quot;additionally identifies&amp;quot; the map version.&lt;br /&gt;
* '''u16''': &amp;quot;Additional file format version:&amp;quot;&lt;br /&gt;
** '''9''' - beta/obsolete versions&lt;br /&gt;
** '''10''' - current versions&lt;br /&gt;
When saving as expansion this section gets removed entirely. Contrary to popular belief, it doesn't get &amp;quot;replaced&amp;quot; by IVE2 in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IVE2&amp;quot; - Map Version==&lt;br /&gt;
''Not required.''&lt;br /&gt;
&lt;br /&gt;
This section &amp;quot;additionally identifies&amp;quot; the map version.&lt;br /&gt;
* '''u16''': &amp;quot;Additional file format version:&amp;quot;&lt;br /&gt;
** '''11''' - 1.04 StarCraft and above (&amp;quot;hybrid&amp;quot;) or Brood War.&lt;br /&gt;
This section does not &amp;quot;replace&amp;quot; IVER in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;VCOD&amp;quot; - Verification Code==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be equal to size of the VCOD data in the EXE resource. Must result in valid checksum.''&lt;br /&gt;
&lt;br /&gt;
This section has a verification code to make sure this is actually a CHK file.&lt;br /&gt;
&lt;br /&gt;
* '''u32[256]''': Seed values.&lt;br /&gt;
* '''u8[16]''': Operation codes to produce the resulting hash:&lt;br /&gt;
** '''00''' - XOR's the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''01''' - Adds to the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''02''' - Subtracts from the current hash with the total values of OWNR, SIDE * 256, FORC * 65536&lt;br /&gt;
** '''03''' - XOR's the current hash with the VCOD table at index OWNR, SIDE, FORC, and 0&lt;br /&gt;
** '''04''' - same as 0x03&lt;br /&gt;
** '''05''' - same as 0x03&lt;br /&gt;
** '''06''' - Complex function consisting of ORs and shifts&lt;br /&gt;
** '''07''' - Inverted version of 0x06, switching direction of all shifts&lt;br /&gt;
** '''08+''' - Do nothing&lt;br /&gt;
Opcodes and seeds do not have to match those in EXE resource, as long as the same value is produced.&amp;lt;br&amp;gt;&lt;br /&gt;
The only indexes in the seed table that are referenced are those that correspond individual values of [[#&amp;quot;OWNR&amp;quot; - StarCraft Player Types|OWNR]], [[#&amp;quot;SIDE&amp;quot; - Player Races|SIDE]], [[#&amp;quot;FORC&amp;quot; - Force Settings|FORC]] player assignments, and index 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;IOWN&amp;quot; - StarEdit Player Types==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the owner of each player.&lt;br /&gt;
* '''u8[12]''': One byte for each player, specifies the owner of the player:&lt;br /&gt;
** '''00''' - Inactive&lt;br /&gt;
** ''01'' - Computer (game)&lt;br /&gt;
** ''02'' - Occupied by Human Player&lt;br /&gt;
** '''03''' - Rescue Passive&lt;br /&gt;
** '''04''' - Unused&lt;br /&gt;
** '''05''' - Computer&lt;br /&gt;
** '''06''' - Human (Open Slot)&lt;br /&gt;
** '''07''' - Neutral&lt;br /&gt;
** ''08'' - Closed slot&lt;br /&gt;
This section is separate from OWNR as a staredit value. Staredit does not display &amp;quot;inactive&amp;quot; as a valid option. Italicized settings denote invalid map options, which may involve a buffer overflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;OWNR&amp;quot; - StarCraft Player Types==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 12 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section designates the controller of a particular player. It is exactly the same as the &amp;quot;IOWN&amp;quot; section, except there is an additional value, 0x00 for Inactive.&lt;br /&gt;
* '''u8[12]''': One byte for each player, specifies the owner of the player:&lt;br /&gt;
** '''00''' - Inactive&lt;br /&gt;
** ''01'' - Computer (game)&lt;br /&gt;
** ''02'' - Occupied by Human Player&lt;br /&gt;
** '''03''' - Rescue Passive&lt;br /&gt;
** '''04''' - Unused&lt;br /&gt;
** '''05''' - Computer&lt;br /&gt;
** '''06''' - Human (Open Slot)&lt;br /&gt;
** '''07''' - Neutral&lt;br /&gt;
** ''08'' - Closed slot&lt;br /&gt;
Italicized settings denote invalid map options, which may involve a buffer overflow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;ERA &amp;quot; - Tileset==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section indicates the tileset of the scenario.&lt;br /&gt;
* '''u16''': Designates tileset:&lt;br /&gt;
** '''00''' - Badlands&lt;br /&gt;
** '''01''' - Space Platform&lt;br /&gt;
** '''02''' - Installation&lt;br /&gt;
** '''03''' - Ashworld&lt;br /&gt;
** '''04''' - Jungle&lt;br /&gt;
** '''05''' - Desert&lt;br /&gt;
** '''06''' - Arctic&lt;br /&gt;
** '''07''' - Twilight&lt;br /&gt;
StarCraft masks the tileset indicator's bit value, so bits after the third place (anything after the value &amp;quot;7&amp;quot;) are removed. Thus, 9 (1001 in binary) is interpreted as 1 (0001), 10 (1010) as 2 (0010), etc.&amp;lt;br&amp;gt;&lt;br /&gt;
Desert, Arctic, and Twilight are Brood War-only tilesets.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;DIM &amp;quot; - Map Dimensions==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains the dimensions of the map.&lt;br /&gt;
* '''u16''': Width of the map&lt;br /&gt;
* '''u16''': Height of the map&lt;br /&gt;
The Width/Height of the map is measured in the number of square 32x32p tiles.&amp;lt;br&amp;gt;&lt;br /&gt;
Standard Dimensions are 64, 96, 128, 192, and 256.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SIDE&amp;quot; - Player Races==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 12 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains the species/race of each player.&lt;br /&gt;
* '''u8[12]''': 1 byte per player the species of that player:&lt;br /&gt;
** '''00''' - Zerg&lt;br /&gt;
** '''01''' - Terran&lt;br /&gt;
** '''02''' - Protoss&lt;br /&gt;
** ''03'' - Invalid (Independent)&lt;br /&gt;
** ''04'' - Invalid (Neutral)&lt;br /&gt;
** '''05''' - User Selectable&lt;br /&gt;
** '''06''' - Random (Forced; Acts as a selected race)&lt;br /&gt;
** ''07'' - Inactive&lt;br /&gt;
Italicized settings denote invalid map options. Note Players 9-11 are defaultly Inactive and Player 12 is defaultly Neutral.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MTXM&amp;quot; - StarCraft Terrain==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be less than or equal to 131072 (0x20000) bytes (256 * 256 * 2).''&lt;br /&gt;
&lt;br /&gt;
Terrain section that contains a map of the level's appearance. StarEdit disregards this section and instead uses [[#&amp;quot;TILE&amp;quot; - StarEdit Terrain|TILE]]; it is only used in Starcraft.&lt;br /&gt;
* '''u16[map width * height]''': one integer for each tile.&lt;br /&gt;
Notes about MTXM:&lt;br /&gt;
* The Width/Height of the map is measured in the number of square 32x32p tiles.&lt;br /&gt;
* Tiles in this section are listed from left to right, top to bottom.&lt;br /&gt;
* The values for each integer are their respective &amp;quot;MegaTile&amp;quot; values in the scenario's tileset. If the size of this section is greater than width*height*2, the data following is ignored. If the size of this section is less, the resulting tiles that have not been defined will be null tiles.&lt;br /&gt;
* This section includes doodads as terrain; TILE, which is otherwise identical, doesn't. Out of the terrain sections (TILE, ISOM, and MTXM), SC only reads MTXM for the sake of not having to generate this data on-the-fly: it contains the exact representation of the level's appearance, including doodads. TILE, on the other hand, is directly tied via a tile lookup function to ISOM, and exists for the sake of not having to generate tiles from ISOM on-the-fly in StarEdit.&lt;br /&gt;
* If MTXM section is smaller than (map width*height), then the remaining tiles will be filled with null tiles or tiles specified by previous MTXM sections.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PUNI&amp;quot; - Player Unit Restrictions==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 5700 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains player unit restrictions: it indicates whether the player can or cannot build a particular unit.&lt;br /&gt;
* '''u8[228][12]''': 1 byte for each unit in order of its unit id, then each player, for player availability:&lt;br /&gt;
** '''00''' - That unit is not available for production if the player has 'override defaults' on&lt;br /&gt;
** '''01''' - That unit is available for production if the player has 'override defaults' on&lt;br /&gt;
* '''u8[228]''': 1 byte for each unit in order of it's unit id, for global availability defaults (for all players):&lt;br /&gt;
** '''00''' - That unit is not available for production&lt;br /&gt;
** '''01''' - That unit is available for production&lt;br /&gt;
* '''u8[228][12]''': 1 byte for each unit in order of its unit id, then each player, indicating whether a player uses the global availability defaults.&lt;br /&gt;
** '''00''' - Player overrides defaults for this unit&lt;br /&gt;
** '''01''' - Player uses defaults for this unit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGR&amp;quot; - Upgrade Restrictions==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1748 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;PUPx&amp;quot; - BW Upgrade Restrictions|&amp;quot;PUPx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains player upgrade restrictions: it indicates the starting/maximum levels at/to which a player can perform a particular upgrade.&lt;br /&gt;
* '''u8[46][12]''': 1 byte for the maximum level a player can upgrade to, in order of its upgrade id, then each player&lt;br /&gt;
* '''u8[46][12]''': 1 byte for the level of an upgrade a player starts off with, in order of its upgrade id, then each player&lt;br /&gt;
* '''u8[46]''': 1 byte for the global default maximum level of each upgrade, in order of its upgrade id.&lt;br /&gt;
* '''u8[46]''': 1 byte for the global default starting level of each upgrade, in order of its upgrade id.&lt;br /&gt;
* '''u8[46][12]''': 1 byte for each upgrade in order of its upgrade id, then each player, indicating whether a player uses the global upgrade defaults:&lt;br /&gt;
** '''00''' - Player does not use global upgrade defaults for this upgrade&lt;br /&gt;
** '''01''' - Player uses upgrade defaults for this upgrade&lt;br /&gt;
See [[#List of Upgrade IDs]].&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PTEC&amp;quot; - Tech Restrictions==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 912 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;PTEx&amp;quot; - BW Tech Restrictions|&amp;quot;PTEx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains player technology availability restrictions: it indicates whether a player starts off with a particular technology or can research a particular technology.&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology id, then each player, for player availability:&lt;br /&gt;
** '''00''' - Technology is not available for a player&lt;br /&gt;
** '''01''' - Technology is available for a player&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology id, then each player, for &amp;quot;already researched&amp;quot; status:&lt;br /&gt;
** '''00''' - Technology is not already researched&lt;br /&gt;
** '''01''' - Technology is already researched&lt;br /&gt;
* '''u8[24]''': 1 byte for each technology for global availability defaults:&lt;br /&gt;
** '''00''' - Technology is not available by default&lt;br /&gt;
** '''01''' - Technology is available by default&lt;br /&gt;
* '''u8[24]''': 1 byte for each technology for global &amp;quot;already researched&amp;quot; defaults:&lt;br /&gt;
** '''00''' - Technology is not already researched by default&lt;br /&gt;
** '''01''' - Technology is already researched by default&lt;br /&gt;
* '''u8[24][12]''': 1 byte for each technology in order of its technology id, then each player, indicating whether a player uses the global defaults:&lt;br /&gt;
** '''00''' - Technology overrides defaults for player&lt;br /&gt;
** '''01''' - Technology uses default settings for player&lt;br /&gt;
See [[#List of Technology IDs]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIT&amp;quot; - Placed Units==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 36 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the pre-placed units on the map and their properties. Each unit on the map gets the following structure:&lt;br /&gt;
* '''u32''': The unit's class instance (sort of a &amp;quot;serial number&amp;quot;)&lt;br /&gt;
* U16''': X coordinate of unit&lt;br /&gt;
* U16''': Y coordinate of unit&lt;br /&gt;
* '''u16''': Unit ID&lt;br /&gt;
* '''u16''': Type of relation to another building (i.e. add-on, nydus link)&lt;br /&gt;
** '''Bit 9''' - Nydus Link&lt;br /&gt;
** '''Bit 10''' - Addon Link&lt;br /&gt;
* '''u16''': Flags of special properties which can be applied to the unit and are valid:&lt;br /&gt;
** '''Bit 0''' - Cloak is valid&lt;br /&gt;
** '''Bit 1''' - Burrow is valid&lt;br /&gt;
** '''Bit 2''' - In transit is valid&lt;br /&gt;
** '''Bit 3''' - Hallucinated is valid&lt;br /&gt;
** '''Bit 4''' - Invincible is valid&lt;br /&gt;
** '''Bit 5-15''' - Unused&lt;br /&gt;
* '''u16''': Out of the elements of the unit data, the properties which can be changed by the map maker:&lt;br /&gt;
** '''Bit 0''' - Owner player is valid (the unit is not a critter, start location, etc.; not a neutral unit)&lt;br /&gt;
** '''Bit 1''' - HP is valid&lt;br /&gt;
** '''Bit 2''' - Shields is valid&lt;br /&gt;
** '''Bit 3''' - Energy is valid (unit is a wraith, etc.)&lt;br /&gt;
** '''Bit 4''' - Resource amount is valid (unit is a mineral patch, vespene geyser, etc.)&lt;br /&gt;
** '''Bit 5''' - Amount in hangar is valid (unit is a reaver, carrier, etc.)&lt;br /&gt;
** '''Bit 6-15''' - Unused&lt;br /&gt;
* '''u8''': Player number of owner (0-based)&lt;br /&gt;
* '''u8''': Hit points % (1-100)&lt;br /&gt;
* '''u8''': Shield points % (1-100)&lt;br /&gt;
* '''u8''': Energy points % (1-100)&lt;br /&gt;
* '''u32''': Resource amount&lt;br /&gt;
* '''u16''': Number of units in hangar&lt;br /&gt;
* '''u16''': Unit state flags&lt;br /&gt;
** '''Bit 0''' - Unit is cloaked&lt;br /&gt;
** '''Bit 1''' - Unit is burrowed&lt;br /&gt;
** '''Bit 2''' - Building is in transit&lt;br /&gt;
** '''Bit 3''' - Unit is hallucinated&lt;br /&gt;
** '''Bit 4''' - Unit is invincible&lt;br /&gt;
** '''Bit 5-15''' - Unused&lt;br /&gt;
* '''u32''': Unused&lt;br /&gt;
* '''u32''': Class instance of the unit to which this unit is related to (i.e. via an add-on, nydus link, etc.). It is &amp;quot;0&amp;quot; if the unit is not linked to any other unit.&lt;br /&gt;
Notes about UNIT:&lt;br /&gt;
* The X/Y coordinates are the center of the sprite of the unit (in pixels).&lt;br /&gt;
* Please edit if you could confirm the bit values to be correct/if you know more bit values.&lt;br /&gt;
* Default values will apply if bit values are unchecked. Defaults: 100% HP, 100% SP, 100% EP, 0 resources, 0 hangar count.&lt;br /&gt;
* This section can be split. Additional UNIT sections will add more units.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;ISOM&amp;quot; - Isometric Terrain==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section is required to place isometric terrain on the map. It provides data about the nature of the isometrical &amp;quot;diamonds&amp;quot; (the editing mode of StarEdit).&lt;br /&gt;
* '''u16[ (width / 2 + 1) * (height + 1) * 4 ]''': 4 integers for each map rectangle tile (plus one extra tile to the right and bottom of the map), as per the RECT structure. Each rectangle border (left, top, right, bottom) is assigned an &amp;quot;ISOM value.&amp;quot; These form the &amp;quot;diamond&amp;quot; pattern of the map, and each rectangle thus gets two ISOM values associated with it. StarEdit somehow hashes these (the exact algorithm is unknown) and thus produces the tile index of the rectangle (which it stores in TILE for reasons of efficiency). The index of the rectangle's right tile is that of its left tile + 16.&lt;br /&gt;
This section is the only truly unknown section of the .chk format. If you're an ex-Blizzard employee or SI, please edit this section. If you have additional research, post on the forums about it and/or edit this section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TILE&amp;quot; - StarEdit Terrain==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section will only be different from the [[#&amp;quot;MTXM&amp;quot; - StarCraft Terrain|MTXM]] section in tiles where doodads are present.&lt;br /&gt;
* '''u16[ map width * height ]''': 1 integer for each map tile. Moves horizontally across the map.&lt;br /&gt;
The values in TILE are normally directly generated from the ISOM section (see &amp;quot;'ISOM' section&amp;quot; above), and thus do not match that of MTXM on doodad tiles.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;DD2 &amp;quot; - StarEdit Sprites (Doodads)==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section contains the doodad map of the level. There are several parts to doodads. The graphical portion is stored in the [[#&amp;quot;MTXM&amp;quot; - StarCraft Terrain|MTXM]] section. The second part of the doodad is stored in this section. This section is only used by the map editor.&lt;br /&gt;
&lt;br /&gt;
Each doodad in the map gets the following structure:&lt;br /&gt;
* '''u16''': Number of the doodad. Size of the doodad is dependent on this. Doodads are different for each tileset.&lt;br /&gt;
* '''u16''': X coordinate of the doodad unit&lt;br /&gt;
* '''u16''': Y coordinate of the doodad unit&lt;br /&gt;
* '''u8''': Player number that owns the doodad&lt;br /&gt;
* '''u8''': Enabled flag&lt;br /&gt;
** '''00''' - Doodad is enabled (trap can attack, door is closed, etc)&lt;br /&gt;
** '''01''' - Doodad is disabled&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;THG2&amp;quot; - StarCraft Sprites==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 10 bytes.''&lt;br /&gt;
&lt;br /&gt;
The map editor only writes to this section. Starcraft uses this section.&lt;br /&gt;
&lt;br /&gt;
Sprites, usually on doodads, get the following structure.&lt;br /&gt;
* '''u16''': Unit/Sprite number of the sprite&lt;br /&gt;
* '''u16''': X coordinate of the doodad unit&lt;br /&gt;
* '''u16''': Y coordinate of the doodad unit&lt;br /&gt;
* '''u8''': Player number that owns the doodad&lt;br /&gt;
* '''u8''': Unused&lt;br /&gt;
* '''u16''': Flags&lt;br /&gt;
** '''Bit 0-11''' - Unused&lt;br /&gt;
** '''Bit 12''' - Draw as sprite (Determines if it is a sprite or a unit sprite)&lt;br /&gt;
** '''Bit 13''' - Unused&lt;br /&gt;
** '''Bit 14''' - Unused&lt;br /&gt;
** '''Bit 15''' - Disabled (Only valid if Draw as sprite is unchecked, disables the unit)&lt;br /&gt;
This section can be split. Additional THG2 sections will add more sprites.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MASK&amp;quot; - Fog of War Layer==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: This section will always validate.''&lt;br /&gt;
&lt;br /&gt;
This section contains the data on fog of war for each player. This is whether at the start of the game that levels of black space that is available.&lt;br /&gt;
* '''u8[ map width * height ]''': One byte for each map tile. The bits indicate for each player the fog of war.&lt;br /&gt;
** '''Bit 0''' - Player 1's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 1''' - Player 2's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 2''' - Player 3's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 3''' - Player 4's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 4''' - Player 5's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 5''' - Player 6's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 6''' - Player 7's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
** '''Bit 7''' - Player 8's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.&lt;br /&gt;
Any size greater than width*height will be ignored. Any size less will default missing tiles to 0xFF&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;STR &amp;quot; - String Data==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be at least 1 byte.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the strings in the map.&lt;br /&gt;
* '''u16''': Number of strings in the section (Default''': 1024)&lt;br /&gt;
* '''u16[Number of strings]''': 1 integer for each string specifying the offset (the spot where the string starts in the section from the start of it).&lt;br /&gt;
* '''Strings''': After the offsets, this is where every string in the map goes, one after another. Each one is terminated by a null character.&lt;br /&gt;
This section can contain more or less then 1024 string offsests and will work in Starcraft.&amp;lt;br&amp;gt;&lt;br /&gt;
By default the first byte in '''Strings''' is a NUL character, and all unused offsets in the STR section point to this NUL character.&lt;br /&gt;
Note that STR sections can be stacked in a smiliar fashion as MTXM. The exact mechanisms of this are uncertain.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPRP&amp;quot; - CUWP Slots==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1280 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section is used whenever the create units with properties trigger is used. Since a slot has to be assigned to the action, this is where each slot is designated.&lt;br /&gt;
&lt;br /&gt;
There are 64 of the following structures regardless of how many are used and it cannot exceed 64.&lt;br /&gt;
* '''u16''': Flag of which special properties can be applied to unit, and are valid.&lt;br /&gt;
** '''Bit 0''' - Cloak bit is valid&lt;br /&gt;
** '''Bit 1''' - Burrowed bit is valid&lt;br /&gt;
** '''Bit 2''' - In transit bit is valid&lt;br /&gt;
** '''Bit 3''' - Hallucinated bit is valid&lt;br /&gt;
** '''Bit 4''' - Invincible bit is valid&lt;br /&gt;
** '''Bit 5-15''' - Unknown/unused&lt;br /&gt;
* '''u16''': Which elements of the unit data are valid, which properties can be changed by the map maker.&lt;br /&gt;
** '''Bit 0''' - Owner player is valid (unit is not neutral)&lt;br /&gt;
** '''Bit 1''' - HP is valid&lt;br /&gt;
** '''Bit 2''' - Shields is valid&lt;br /&gt;
** '''Bit 3''' - Energy is valid&lt;br /&gt;
** '''Bit 4''' - Resource amount is valid (unit is a resource)&lt;br /&gt;
** '''Bit 5''' - Amount in hanger is valid&lt;br /&gt;
** '''Bit 6''' - Unknown/unused&lt;br /&gt;
* '''u8''': Player number that owns unit. Will always be NULL in this section (0)&lt;br /&gt;
* '''u8''': Hit point % (1-100)&lt;br /&gt;
* '''u8''': Shield point % (1-100)&lt;br /&gt;
* '''u8''': Energy point % (1-100)&lt;br /&gt;
* '''u32''': Resource amount (for resources only)&lt;br /&gt;
* '''u16''': # of units in hangar&lt;br /&gt;
* '''u16''': Flags&lt;br /&gt;
** '''Bit 0''' - Unit is cloaked&lt;br /&gt;
** '''Bit 1''' - Unit is burrowed&lt;br /&gt;
** '''Bit 2''' - Building is in transit&lt;br /&gt;
** '''Bit 3''' - Unit is hallucinated&lt;br /&gt;
** '''Bit 4''' - Unit is invincible&lt;br /&gt;
** '''Bit 5-15''' - Unknown/unused&lt;br /&gt;
* '''u32''': Unknown/unused. Padding?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPUS&amp;quot; - CUWP Slots Used==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section goes along with the &amp;quot;UPRP&amp;quot; section. This section just indicates which of the 64 unit properties slot are used.&lt;br /&gt;
* '''u8[64]''': 1 byte for each trigger unit properties slot&lt;br /&gt;
** '''00''' - Properties slot is unused&lt;br /&gt;
** '''01''' - Properties slot is used&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MRGN&amp;quot; - Locations==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: 1280 bytes for retail, 5100 bytes for Hybrid and Broodwar.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the locations that the map uses. In a vanilla map, this section contains 64 locations. In a Hybrid or Brood War map, this section will expand to contain 255 locations.&lt;br /&gt;
&lt;br /&gt;
Each location gets one of the following location entries. The 'Anywhere' location, is ALWAYS location 64.&lt;br /&gt;
* '''u32''': Left (X1) coordinate of location, in pixels (usually 32 pt grid aligned)&lt;br /&gt;
* '''u32''': Top (Y1) coordinate of location, in pixels&lt;br /&gt;
* '''u32''': Right (X2) coordinate of location, in pixels&lt;br /&gt;
* '''u32''': Bottom (Y2) coordinate of location, in pixels&lt;br /&gt;
* '''u16''': String number of the name of this location&lt;br /&gt;
* '''u16''': Location elevation flags. If an elevation is disabled in the location, it's bit will be on (1)&lt;br /&gt;
** '''Bit 0''' - Low elevation&lt;br /&gt;
** '''Bit 1''' - Medium elevation&lt;br /&gt;
** '''Bit 2''' - High elevation&lt;br /&gt;
** '''Bit 3''' - Low air&lt;br /&gt;
** '''Bit 4''' - Medium air&lt;br /&gt;
** '''Bit 5''' - High air&lt;br /&gt;
** '''Bit 6-15''' - Unused&lt;br /&gt;
Note that in typical locations Right is always larger than Left and Bottom is always larger than Top. However, you can reverse one or both of these for [[Inverted Locations]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TRIG&amp;quot; - Triggers==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 2400 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all the triggers in the map. This along with [[#&amp;quot;MBRF&amp;quot; - Mission Briefings|MBRF]] is the most complicated section in the entire scenario.chk file as there is a lot of data packed into too little of a space. Refer to the appendix at the bottom of this page for more information.&lt;br /&gt;
For easy reference, since each trigger contains 2400 bytes, the amount of triggers can be gotten by taking the section length and dividing by 2400.&lt;br /&gt;
Every single trigger in the map will have the following format:&lt;br /&gt;
* 16 Conditions (20 byte struct)&amp;lt;br&amp;gt; Every trigger has 16 of the following format, even if only one condition is used. See the appendix for information on which items are used for what conditions.&lt;br /&gt;
** '''u32''': Location number for the condition (1 based -- 0 refers to No Location), EUD Bitmask for a Death condition if the MaskFlag is set to &amp;quot;SC&amp;quot;&lt;br /&gt;
** '''u32''': [[#List of Players/Group IDs|Group]] that the condition applies to&lt;br /&gt;
** '''u32''': Qualified number (how many/resource amount)&lt;br /&gt;
** '''u16''': [[#Trigger Unit Types|Unit ID]] condition applies to&lt;br /&gt;
** '''u8''': [[#Numeric Comparisons|Numeric comparison]], [[#Switch States|switch state]]&lt;br /&gt;
** '''u8''': [[#Trigger Conditions List|Condition byte]]&lt;br /&gt;
** '''u8''': [[#Resource Types|Resource type]], [[#Score Types|score type]], Switch number (0-based)&lt;br /&gt;
** '''u8''': Flags&lt;br /&gt;
*** '''Bit 0''' - Unknown/unused&lt;br /&gt;
*** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled/ignored&lt;br /&gt;
*** '''Bit 2''' - Always display flag.&lt;br /&gt;
*** '''Bit 3''' - Unit properties is used. ('''Note:''' This is used in [[TRG|*.trg]] files)&lt;br /&gt;
*** '''Bit 4''' - Unit type is used. May not be necessary?&lt;br /&gt;
*** '''Bit 5-7''' - Unknown/unused&lt;br /&gt;
** '''u16''': MaskFlag: set to &amp;quot;SC&amp;quot; (0x53, 0x43) when using the bitmask for EUDs, 0 otherwise&lt;br /&gt;
* 64 Actions (32 byte struct)&amp;lt;br&amp;gt; Immediately following the 16 conditions, there are 64 actions. There will always be 64 of the following structure, even if some of them are unused.&lt;br /&gt;
** '''u32''': Location - source location in &amp;quot;Order&amp;quot; and &amp;quot;Move Unit&amp;quot;, dest location in &amp;quot;Move Location&amp;quot; (1 based -- 0 refers to No Location), EUD Bitmask for a Death action if the MaskFlag is set to &amp;quot;SC&amp;quot;&lt;br /&gt;
** '''u32''': String number for trigger text (0 means no string)&lt;br /&gt;
** '''u32''': WAV string number (0 means no string)&lt;br /&gt;
** '''u32''': Seconds/milliseconds of time&lt;br /&gt;
** '''u32''': First (or only) [[#List of Players/Group IDs|Group/Player]] affected.&lt;br /&gt;
** '''u32''': Second group affected, secondary location (1-based), CUWP #, number, AI script (4-byte string), switch (0-based #)&lt;br /&gt;
** '''u16''': [[#Trigger Unit Types|Unit type]], [[#Score Types|score type]], [[#Resource Types|resource type]], [[#Alliance Statuses|alliance status]]&lt;br /&gt;
** '''u8''': [[#Trigger Actions List|Action byte]]&lt;br /&gt;
** '''u8''': Number of units (0 means All Units), [[#Action States|action state]], [[#Unit Orders|unit order]], [[#Number Modifiers|number modifier]]&lt;br /&gt;
** '''u8''': Flags&lt;br /&gt;
*** '''Bit 0''' - Ignore a wait/transmission once.&lt;br /&gt;
*** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled.&lt;br /&gt;
*** '''Bit 2''' - Always display flag - when not set: if the user has turned off subtitles (see sound options) the text will not display, when set: text will always display&lt;br /&gt;
*** '''Bit 3''' - Unit properties is used. Staredit uses this for *.trg files.&lt;br /&gt;
*** '''Bit 4''' - Unit type is used.&lt;br /&gt;
*** '''Bit 5-7''' - Unknown/unused&lt;br /&gt;
** '''u8''': Padding&lt;br /&gt;
** '''u16 (2 bytes)''': MaskFlag: set to &amp;quot;SC&amp;quot; (0x53, 0x43) when using the bitmask for EUDs, 0 otherwise&lt;br /&gt;
* Player Execution&amp;lt;br&amp;gt; Following the 16 conditions and 64 actions, every trigger also has this structure&lt;br /&gt;
** '''u32''': execution flags&lt;br /&gt;
*** '''Bit 0''' - All conditions are met, executing actions, cleared on the next trigger loop.&lt;br /&gt;
*** '''Bit 1''' - Ignore the following actions: Defeat, Draw.&lt;br /&gt;
*** '''Bit 2''' - Preserve trigger. (Can replace Preserve Trigger action)&lt;br /&gt;
*** '''Bit 3''' - Ignore execution.&lt;br /&gt;
*** '''Bit 4''' - Ignore all of the following actions for this trigger until the next trigger loop: Wait, PauseGame, Transmission, PlayWAV, DisplayTextMessage, CenterView, MinimapPing, TalkingPortrait, and MuteUnitSpeech.&lt;br /&gt;
*** '''Bit 5''' - This trigger has paused the game, ignoring subsequent calls to Pause Game (Unpause Game clears this flag only in the same trigger), may automatically call unpause at the end of action execution?&lt;br /&gt;
*** '''Bit 6''' - Wait skipping disabled for this trigger, cleared on next trigger loop.&lt;br /&gt;
*** '''Bit 7-31''' - Unknown/unused&lt;br /&gt;
** '''u8[27]''': 1 byte for each player in the [[#List of Players/Group IDs]]&lt;br /&gt;
*** '''00''' - Trigger is not executed for player&lt;br /&gt;
*** '''01''' - Trigger is executed for player&lt;br /&gt;
** '''u8''': Index of the current action, in StarCraft this is incremented after each action is executed, trigger execution ends when this is 64 (Max Actions) or an action is encountered with Action byte as 0&lt;br /&gt;
This section can be split. Additional TRIG sections will add more triggers.&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;MBRF&amp;quot; - Mission Briefings==&lt;br /&gt;
''Required for all versions. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be a multiple of 2400 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section contains all of the mission briefings shown by the players.&lt;br /&gt;
&lt;br /&gt;
See [[#&amp;quot;TRIG&amp;quot; - Triggers|&amp;quot;TRIG&amp;quot;]] section for format, as it is exactly the same except for the conditions. In this section the 16 conditions are still there, they are all null except for the very first condition, which only has a condition byte of 13. See [[#Mission Briefing Actions List]] for the action bytes for the mission briefing actions.&lt;br /&gt;
&lt;br /&gt;
This section can be split. Additional MBRF sections will add more briefing triggers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SPRP&amp;quot; - Scenario Properties==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4 bytes.''&lt;br /&gt;
&lt;br /&gt;
* '''u16''': String number of the scenario name&lt;br /&gt;
* '''u16''': String number of the scenarios description.&lt;br /&gt;
A string index of 0 for the map name will default it to its file name. A string index of 0 description will default to a predefined string.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;FORC&amp;quot; - Force Settings==&lt;br /&gt;
''Required for all versions and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be less than or equal to 20 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section specifies the forces and the information about them.&lt;br /&gt;
* '''u8[8]''': 1 byte for each active player, specifying which of the 4 forces (0-based) that the player's on&lt;br /&gt;
* '''u16[4]''': 1 integer for each force, string number of the name of the force&lt;br /&gt;
* '''u8[4]''': 1 byte for each force specifying the properties:&lt;br /&gt;
** '''Bit 0''' - Random start location&lt;br /&gt;
** '''Bit 1''' - Allies&lt;br /&gt;
** '''Bit 2''' - Allied victory&lt;br /&gt;
** '''Bit 3''' - Shared vision&lt;br /&gt;
** '''Bit 4-7''' - Unused&lt;br /&gt;
Notes about FORC:&lt;br /&gt;
* If there is no string specified for a force name, it will default to a &amp;quot;Force #&amp;quot; string.&lt;br /&gt;
* If this section is less than 20 bytes, the remaining bytes are defaulted to 0.&lt;br /&gt;
* Players can be on a force greater than 4, however they will not appear in the game lobby.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;WAV &amp;quot; - WAV String Indexes==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
There are 512 wav entires regardless of how many are actually used.&lt;br /&gt;
* '''u32[512]''': 1 long for each WAV. Indicates a string index is used for a WAV path in the MPQ. If the entry is not used, it will be 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIS&amp;quot; - Unit Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4048 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;UNIx&amp;quot; - BW Unit Settings|&amp;quot;UNIx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains the unit settings for the level:&lt;br /&gt;
* '''u8[228]''': 1 byte for each unit, in order of Unit ID&lt;br /&gt;
** '''00''' - Unit does not use default settings&lt;br /&gt;
** '''01''' - Unit does use default settings&lt;br /&gt;
* '''u32[228]''': Hit points for unit (Note the displayed value is this value / 256, with the low byte being a fractional HP value)&lt;br /&gt;
* '''u16[228]''': Shield points, in order of Unit ID&lt;br /&gt;
* '''u8[228]''': Armor points, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Build time (1/60 seconds), in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Mineral cost, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': Gas cost, in order of Unit ID&lt;br /&gt;
* '''u16[228]''': String number, in order of Unit ID&lt;br /&gt;
* '''u16[100]''': Base weapon damage the weapon does, in weapon ID order ([[#List of Unit Weapon IDs]])&lt;br /&gt;
* '''u16[100]''': Upgrade bonus weapon damage, in weapon ID order&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGS&amp;quot; - Upgrade Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 598 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;UPGx&amp;quot; - BW Upgrade Settings|&amp;quot;UPGx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains upgrade settings:&lt;br /&gt;
* '''u8[46]''': 1 byte per each upgrade, in order of upgrade id.&lt;br /&gt;
** '''00''' - Upgrade uses custom settings&lt;br /&gt;
** '''01''' - Upgrade uses default settings&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[46]''': 1 integer per upgrade, gas time factor for each upgrade, in order of upgrade id.&lt;br /&gt;
See [[#List of Upgrade IDs]] for upgrade ids.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TECS&amp;quot; - Tech Settings==&lt;br /&gt;
''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 216 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios, this section is replaced by [[#&amp;quot;TECx&amp;quot; - BW Tech Settings|&amp;quot;TECx&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section contains technology/special abilities settings:&lt;br /&gt;
* '''u8[24]''': 1 byte per each technology, specifies if the tech overrides the default settings. In order of technology id&lt;br /&gt;
** '''00''' - Technology uses custom settings&lt;br /&gt;
** '''01''' - Technology uses default settings&lt;br /&gt;
* '''u16[24]''': Mineral cost to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Gas cost to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Time required to develop technology. In order of technology id.&lt;br /&gt;
* '''u16[24]''': Energy cost to cast technology/special ability. In order of technology id.&lt;br /&gt;
See [[#List of Technology IDs]] for technology ids.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;SWNM&amp;quot; - Switch Names==&lt;br /&gt;
''Not Required.''&lt;br /&gt;
&lt;br /&gt;
This section contains the strings used for each switch. There are 256 switches, and can't be any more or any less.&lt;br /&gt;
* '''u32[256]''': One long for each switch, specifies the string number for the name of each switch. Unnamed switches will have an index of 0, and have a default switch name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;COLR&amp;quot; - Player Colors==&lt;br /&gt;
''Required for Brood War only and all game types.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Can be in non-Brood War maps in Remaster, if CRGB is also present.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 8 bytes.''&lt;br /&gt;
&lt;br /&gt;
This section indicates what color each player is, but only has effect on Brood War.&lt;br /&gt;
* '''u8[8]''': 1 byte for each player, indicates the color of the player&lt;br /&gt;
** '''00''' - Red&lt;br /&gt;
** '''01''' - Blue&lt;br /&gt;
** '''02''' - Teal&lt;br /&gt;
** '''03''' - Purple&lt;br /&gt;
** '''04''' - Orange&lt;br /&gt;
** '''05''' - Brown&lt;br /&gt;
** '''06''' - White&lt;br /&gt;
** '''07''' - Yellow&lt;br /&gt;
** '''08''' - Green&lt;br /&gt;
** '''09''' - Pale yellow&lt;br /&gt;
** '''10''' - Tan&lt;br /&gt;
** '''11''' - Azure (Neutral color)&lt;br /&gt;
Other values can be used but may have different results depending on the tileset. Any color value above 11 is an overflow. As of patch 1.18.6 values above 11 result in default player color.&lt;br /&gt;
&lt;br /&gt;
SC:R Only colors:&lt;br /&gt;
Selecting these in a non-SC:R map seems to just use default colors, unless the [[#&amp;quot;CRGB&amp;quot; - Remastered Player Colors|CRGB]] section is also present regardless of version (including non-BW versions).&lt;br /&gt;
* '''12''' - Pale Green&lt;br /&gt;
* '''13''' - Blueish Grey&lt;br /&gt;
* '''14''' - Pale Yellow&lt;br /&gt;
* '''15''' - Cyan&lt;br /&gt;
* '''16''' - Pink&lt;br /&gt;
* '''17''' - Olive&lt;br /&gt;
* '''18''' - Lime&lt;br /&gt;
* '''19''' - Navy&lt;br /&gt;
* '''20''' - Magenta&lt;br /&gt;
* '''21''' - Grey&lt;br /&gt;
* '''22''' - Black&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;CRGB&amp;quot; - Remastered Player Colors==&lt;br /&gt;
''Requirement unknown, but can be in any map type including non-remaster maps.''&amp;lt;b&amp;gt;&lt;br /&gt;
''Validation: Must be size of 32 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''u8[8][3]''': 3 bytes for each player corresponding to an RGB color value&lt;br /&gt;
** '''u8''': R&lt;br /&gt;
** '''u8''': G&lt;br /&gt;
** '''u8''': B&lt;br /&gt;
* '''u8[8]''': Indicates how to select the color for each player&lt;br /&gt;
** '''0''' - Random Predefined&lt;br /&gt;
** '''1''' - Player's Choice&lt;br /&gt;
** '''2''' - Custom TGB Color (RGB value for the corresponding player defined above)&lt;br /&gt;
** '''3''' - Use &amp;quot;COLR&amp;quot; selection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PUPx&amp;quot; - BW Upgrade Restrictions==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 2318 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UPGR&amp;quot; - Upgrade Restrictions|&amp;quot;UPGR&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is identical to UPGR section except it uses the Brood War set of 61 upgrades instead of the original 46.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;PTEx&amp;quot; - BW Tech Restrictions==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 1672 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;PTEC&amp;quot; - Tech Restrictions|&amp;quot;PTEC&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is identical to PTEC section except it uses the Brood War set of 44 technologies instead of the original 24.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UNIx&amp;quot; - BW Unit Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 4168 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UNIS&amp;quot; - Unit Settings|&amp;quot;UNIS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is indentical to UNIS section except it uses the Brood War set of 130 weapons instead of the original 100.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;UPGx&amp;quot; - BW Upgrade Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 794 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;UPGS&amp;quot; - Upgrade Settings|&amp;quot;UPGS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section the same as UPGS except section except it uses the Brood War set of 61 upgrades instead of the original 46, and there is an unused byte after the first set:&lt;br /&gt;
* '''u8[61]''': 1 byte per each upgrade, in order of upgrade id.&lt;br /&gt;
** '''00''' - Upgrade uses custom settings&lt;br /&gt;
** '''01''' - Upgrade uses default settings&lt;br /&gt;
* '''u8''': Unused.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.&lt;br /&gt;
* '''u16[61]''': 1 integer per upgrade, gas time factor for each upgrade, in order of upgrade id.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;quot;TECx&amp;quot; - BW Tech Settings==&lt;br /&gt;
''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''&amp;lt;br&amp;gt;&lt;br /&gt;
''Validation: Must be size of 396 bytes.''&amp;lt;br&amp;gt;&lt;br /&gt;
''In Brood War scenarios this section replaces [[#&amp;quot;TECS&amp;quot; - Tech Settings|&amp;quot;TECS&amp;quot;]].''&lt;br /&gt;
&lt;br /&gt;
This section is indentical to UNIS section except it uses the Brood War set of 44 technologies instead of the original 24.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Appendix=&lt;br /&gt;
A set of references and IDs that should help you easier in the trigger section and the technology/player ids, etc:&lt;br /&gt;
&lt;br /&gt;
==Trigger Conditions List==&lt;br /&gt;
* 0 = No Condition&lt;br /&gt;
* 1 = Countdown Timer(Comparison, QNumber)&lt;br /&gt;
* 2 = Command(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 3 = Bring(Player, Comparison, TUnit, Loc, QNumber)&lt;br /&gt;
* 4 = Accumulate(Player, Comparison, QNumber, ResType)&lt;br /&gt;
* 5 = Kill(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 6 = Command the Most(TUnit)&lt;br /&gt;
* 7 = Commands the Most At(TUnit, Loc)&lt;br /&gt;
* 8 = Most Kills(TUnit)&lt;br /&gt;
* 9 = Highest Score(Score)&lt;br /&gt;
* 10 = Most Resources(ResType)&lt;br /&gt;
* 11 = Switch(Switch)&lt;br /&gt;
* 12 = Elapsed Time(Comparison, QNumber)&lt;br /&gt;
* 13 = Data is a Mission Briefing. Conditions are N/A (Same as Never)&lt;br /&gt;
* 14 = Opponents(Player, Comparison, QNumber)&lt;br /&gt;
* 15 = Deaths(Player, Comparison, TUnit, QNumber)&lt;br /&gt;
* 16 = Command the Least(TUnit)&lt;br /&gt;
* 17 = Command the Least At(TUnit, Loc)&lt;br /&gt;
* 18 = Least Kills(TUnit)&lt;br /&gt;
* 19 = Lowest Score(Score)&lt;br /&gt;
* 20 = Least Resources(ResType)&lt;br /&gt;
* 21 = Score(Player, Comparison, Score, QNumber)&lt;br /&gt;
* 22 = Always (Same as No Condition)&lt;br /&gt;
* 23 = Never&lt;br /&gt;
&lt;br /&gt;
==Trigger Actions List==&lt;br /&gt;
* 0 = No Action&lt;br /&gt;
* 1 = Victory&lt;br /&gt;
* 2 = Defeat&lt;br /&gt;
* 3 = Preserve Trigger&lt;br /&gt;
* 4 = Wait(Time)&lt;br /&gt;
* 5 = Pause Game (Single player only)&lt;br /&gt;
* 6 = Unpause Game (Single player only)&lt;br /&gt;
* 7 = Transmission(Text, Unit, Loc, Time, Modifier, Wave, WavTime)&lt;br /&gt;
* 8 = Play WAV(Wav, WavTime)&lt;br /&gt;
* 9 = Display Text Message(Text)&lt;br /&gt;
* 10 = Center View(Loc)&lt;br /&gt;
* 11 = Create Unit with Properties(Player, Unit, Number, Loc, UnitProp)&lt;br /&gt;
* 12 = Set Mission Objectives(Text)&lt;br /&gt;
* 13 = Set Switch(Switch, SwAction)&lt;br /&gt;
* 14 = Set Countdown Timer(Time, Modifier)&lt;br /&gt;
* 15 = Run AI Script(AIScript)&lt;br /&gt;
* 16 = Run AI Script At Location(AIScript)&lt;br /&gt;
* 17 = Leader Board (Control) (Text, TUnit)&lt;br /&gt;
* 18 = Leader Board (Control At Location) (Text, TUnit, Loc)&lt;br /&gt;
* 19 = Leader Board (Resources) (Text, ResType)&lt;br /&gt;
* 20 = Leader Board (Kills) (Text, TUnit)&lt;br /&gt;
* 21 = Leader Board (Points) (Text, Score)&lt;br /&gt;
* 22 = Kill Unit (Player, TUnit)&lt;br /&gt;
* 23 = Kill Unit At Location(Player, TUnit, Number, Loc)&lt;br /&gt;
* 24 = Remove Unit(Player, TUnit)&lt;br /&gt;
* 25 = Remove Unit At Location(Player, TUnit, Number, Loc)&lt;br /&gt;
* 26 = Set Resources(Player, Number, Modifier, ResType)&lt;br /&gt;
* 27 = Set Score(Player, Number, Modifier, Score)&lt;br /&gt;
* 28 = Minimap Ping(Loc)&lt;br /&gt;
* 29 = Talking Portrait(Unit, Time)&lt;br /&gt;
* 30 = Mute Unit Speech&lt;br /&gt;
* 31 = Unmute Unit Speech&lt;br /&gt;
* 32 = Leaderboard Computer Players(State)&lt;br /&gt;
* 33 = Leaderboard Goal (Control) (Text, TUnit, Number)&lt;br /&gt;
* 34 = Leaderboard Goal (Control At Location) (Text, TUnit, Number, Loc)&lt;br /&gt;
* 35 = Leaderboard Goal (Resources) (Text, TUnit, Number, ResType)&lt;br /&gt;
* 36 = Leaderboard Goal (Kills) (Text, TUnit, Number)&lt;br /&gt;
* 37 = Leaderboard Goal (Points) (Text, Number, Score)&lt;br /&gt;
* 38 = Move Location(Player, TUnit, SLoc, DLoc)&lt;br /&gt;
* 39 = Move Unit(Player, TUnit, Number, SLoc, DLoc)&lt;br /&gt;
* 40 = Leaderboard (Greed) (Number)&lt;br /&gt;
* 41 = Set Next Scenario(Text) (Single player only)&lt;br /&gt;
* 42 = Set Doodad State(Player, TUnit, Loc, State)&lt;br /&gt;
* 43 = Set Invincibility(Player, TUnit, Loc, State)&lt;br /&gt;
* 44 = Create Unit(Player, Unit, Number, Loc)&lt;br /&gt;
* 45 = Set Deaths(Player, TUnit, Number, Modifier)&lt;br /&gt;
* 46 = Order(Player, TUnit, SLoc, DLoc, Order)&lt;br /&gt;
* 47 = Comment(Text)&lt;br /&gt;
* 48 = Give Units to Player(SPlayer, DPlayer, TUnit, Number, Loc)&lt;br /&gt;
* 49 = Modify Unit Hit Points(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 50 = Modify Unit Energy(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 51 = Modify Unit Shield Points(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 52 = Modify Unit Resource Amount(Player, Number, ModAmount, Loc)&lt;br /&gt;
* 53 = Modify Unit Hanger Count(Player, TUnit, Number, ModAmount, Loc)&lt;br /&gt;
* 54 = Pause Timer&lt;br /&gt;
* 55 = Unpause Timer&lt;br /&gt;
* 56 = Draw&lt;br /&gt;
* 57 = Set Alliance Status(Player, AllyStatus)&lt;br /&gt;
* 58 = Disable Debug Mode (Single player only)&lt;br /&gt;
* 59 = Enable Debug Mode (Single player only)&lt;br /&gt;
&lt;br /&gt;
==Mission Briefing Actions List==&lt;br /&gt;
* 0 - No Action&lt;br /&gt;
* 1 - Wait(Time)&lt;br /&gt;
* 2 - Play WAV(Wave, WavTime)&lt;br /&gt;
* 3 - Text Message(Text, Time)&lt;br /&gt;
* 4 - Mission Objectives(Text)&lt;br /&gt;
* 5 - Show Portrait(Unit, Slot)&lt;br /&gt;
* 6 - Hide Portrait(Slot)&lt;br /&gt;
* 7 - Display Speaking Portrait(Slot, Time)&lt;br /&gt;
* 8 - Transmission(Text, Slot, Time, Modifier, Wave, WavTime)&lt;br /&gt;
* 9 - Skip Tutorial Enabled&lt;br /&gt;
&lt;br /&gt;
==Switch States==&lt;br /&gt;
* 2 = Switch is set&lt;br /&gt;
* 3 = Switch is cleared&lt;br /&gt;
&lt;br /&gt;
==Numeric Comparisons==&lt;br /&gt;
* 0 = At least&lt;br /&gt;
* 1 = At most&lt;br /&gt;
* 10 = Exactly&lt;br /&gt;
&lt;br /&gt;
==Score Types==&lt;br /&gt;
* 0 = Total&lt;br /&gt;
* 1 = Units&lt;br /&gt;
* 2 = Buildings&lt;br /&gt;
* 3 = Units and Buildings&lt;br /&gt;
* 4 = Kills&lt;br /&gt;
* 5 = Razings&lt;br /&gt;
* 6 = Kills and Razings&lt;br /&gt;
* 7 = Custom&lt;br /&gt;
&lt;br /&gt;
==Resource Types==&lt;br /&gt;
* 0 = Ore&lt;br /&gt;
* 1 = Gas&lt;br /&gt;
* 2 = Ore and Gas&lt;br /&gt;
&lt;br /&gt;
==Alliance Statuses==&lt;br /&gt;
* 0 = Enemy&lt;br /&gt;
* 1 = Ally&lt;br /&gt;
* 2 = Allied Victory&lt;br /&gt;
&lt;br /&gt;
==Unit Orders==&lt;br /&gt;
* 0 = Move&lt;br /&gt;
* 1 = Patrol&lt;br /&gt;
* 2 = Attack&lt;br /&gt;
&lt;br /&gt;
==Action States==&lt;br /&gt;
* 4 = Enabled/Set switch&lt;br /&gt;
* 5  = Disabled/Clear switch&lt;br /&gt;
* 6 = Toggle/Toggle switch&lt;br /&gt;
* 11 = Randomize switch&lt;br /&gt;
&lt;br /&gt;
==Number Modifiers==&lt;br /&gt;
* 7 = Set to&lt;br /&gt;
* 8 = Add&lt;br /&gt;
* 9 = Subtract&lt;br /&gt;
&lt;br /&gt;
==Trigger Unit Types==&lt;br /&gt;
* All normal units (0-227)&lt;br /&gt;
* 228 = None&lt;br /&gt;
* 229 = Any unit&lt;br /&gt;
* 230 = Men&lt;br /&gt;
* 231 = Buildings&lt;br /&gt;
* 232 = Factories&lt;br /&gt;
&lt;br /&gt;
==List of Players/Group IDs==&lt;br /&gt;
* 0 = Player 1&lt;br /&gt;
* 1 = Player 2&lt;br /&gt;
* 2 = Player 3&lt;br /&gt;
* 3 = Player 4&lt;br /&gt;
* 4 = Player 5&lt;br /&gt;
* 5 = Player 6&lt;br /&gt;
* 6 = Player 7&lt;br /&gt;
* 7 = Player 8&lt;br /&gt;
* 8 = Player 9&lt;br /&gt;
* 9 = Player 10&lt;br /&gt;
* 10 = Player 11&lt;br /&gt;
* 11 = Player 12&lt;br /&gt;
* 12 = None (Unused, One-entry Overflow in some cases)&lt;br /&gt;
* 13 = Current Player&lt;br /&gt;
* 14 = Foes&lt;br /&gt;
* 15 = Allies&lt;br /&gt;
* 16 = Neutral Players&lt;br /&gt;
* 17 = All Players&lt;br /&gt;
* 18 = Force 1&lt;br /&gt;
* 19 = Force 2&lt;br /&gt;
* 20 = Force 3&lt;br /&gt;
* 21 = Force 4&lt;br /&gt;
* 22 = Unused 1&lt;br /&gt;
* 23 = Unused 2&lt;br /&gt;
* 24 = Unused 3&lt;br /&gt;
* 25 = Unused 4&lt;br /&gt;
* 26 = Non Allied Victory Players&lt;br /&gt;
&lt;br /&gt;
==List of Technology IDs==&lt;br /&gt;
* 0 = Stim Packs&lt;br /&gt;
* 1 = Lockdown&lt;br /&gt;
* 2 = EMP Shockwave&lt;br /&gt;
* 3 = Spider Mines&lt;br /&gt;
* 4 = Scanner Sweep&lt;br /&gt;
* 5 = Siege Mode&lt;br /&gt;
* 6 = Defensive Matrix&lt;br /&gt;
* 7 = Irradiate&lt;br /&gt;
* 8 = Yamato Gun&lt;br /&gt;
* 9 = Cloaking Field&lt;br /&gt;
* 10 = Personnel Cloaking&lt;br /&gt;
* 11 = Burrowing&lt;br /&gt;
* 12 = Infestation&lt;br /&gt;
* 13 = Spawn Broodling&lt;br /&gt;
* 14 = Dark Swarm&lt;br /&gt;
* 15 = Plague&lt;br /&gt;
* 16 = Consume&lt;br /&gt;
* 17 = Ensnare&lt;br /&gt;
* 18 = Parasite&lt;br /&gt;
* 19 = Psionic Storm&lt;br /&gt;
* 20 = Hallucination&lt;br /&gt;
* 21 = Recall&lt;br /&gt;
* 22 = Stasis Field&lt;br /&gt;
* 23 = Archon Warp&lt;br /&gt;
* 24 = Restoration&lt;br /&gt;
* 25 = Disruption Web&lt;br /&gt;
* 26 = Unused 26&lt;br /&gt;
* 27 = Mind Control&lt;br /&gt;
* 28 = Dark Archon Meld&lt;br /&gt;
* 29 = Feedback&lt;br /&gt;
* 30 = Optical Flare&lt;br /&gt;
* 31 = Maelstorm&lt;br /&gt;
* 32 = Lurker Aspect&lt;br /&gt;
* 33 = Unused 33&lt;br /&gt;
* 34 = Healing&lt;br /&gt;
* 35 = Unused 35&lt;br /&gt;
* 36 = Unused 36&lt;br /&gt;
* 37 = Unused 37&lt;br /&gt;
* 38 = Unused 38&lt;br /&gt;
* 39 = Unused 39&lt;br /&gt;
* 40 = Unused 40&lt;br /&gt;
* 41 = Unused 41&lt;br /&gt;
* 42 = Unused 42&lt;br /&gt;
* 43 = Unused 43&lt;br /&gt;
&lt;br /&gt;
==List of Upgrade IDs==&lt;br /&gt;
* 0 = Terran Infantry Armor&lt;br /&gt;
* 1 = Terran Vehicle Plating&lt;br /&gt;
* 2 = Terran Ship Plating&lt;br /&gt;
* 3 = Zerg Carapace&lt;br /&gt;
* 4 = Zerg Flyer Caparace&lt;br /&gt;
* 5 = Protoss Armor&lt;br /&gt;
* 6 = Protoss Plating&lt;br /&gt;
* 7 = Terran Infantry Weapons&lt;br /&gt;
* 8 = Terran Vehicle Weapons&lt;br /&gt;
* 9 = Terran Ship Weapons&lt;br /&gt;
* 10 = Zerg Melee Attacks&lt;br /&gt;
* 11 = Zerg Missile Attacks&lt;br /&gt;
* 12 = Zerg Flyer Attacks&lt;br /&gt;
* 13 = Protoss Ground Weapons&lt;br /&gt;
* 14 = Protoss Air Weapons&lt;br /&gt;
* 15 = Protoss Plasma Shields&lt;br /&gt;
* 16 = U-238 Shells&lt;br /&gt;
* 17 = Ion Thrusters&lt;br /&gt;
* 18 = Burst Lasers (Unused)&lt;br /&gt;
* 19 = Titan Reactor (SV +50)&lt;br /&gt;
* 20 = Ocular Implants&lt;br /&gt;
* 21 = Moebius Reactor (Ghost +50)&lt;br /&gt;
* 22 = Apollo Reactor (Wraith +50)&lt;br /&gt;
* 23 = Colossus Reactor (BC +50)&lt;br /&gt;
* 24 = Ventral Sacs&lt;br /&gt;
* 25 = Antennae&lt;br /&gt;
* 26 = Pneumatized Carapace&lt;br /&gt;
* 27 = Metabolic Boost&lt;br /&gt;
* 28 = Adrenal Glands&lt;br /&gt;
* 29 = Muscular Augments&lt;br /&gt;
* 30 = Grooved Spines&lt;br /&gt;
* 31 = Gamete Meiosis (Queen +50)&lt;br /&gt;
* 32 = Metasynaptic Node (Defiler +50)&lt;br /&gt;
* 33 = Singularity Charge&lt;br /&gt;
* 34 = Leg Enhancements&lt;br /&gt;
* 35 = Scarab Damage &lt;br /&gt;
* 36 = Reaver Capacity &lt;br /&gt;
* 37 = Gravitic Drive&lt;br /&gt;
* 38 = Sensor Array&lt;br /&gt;
* 39 = Gravitic Boosters&lt;br /&gt;
* 40 = Khaydarin Amulet (HT +50)&lt;br /&gt;
* 41 = Apial Sensors&lt;br /&gt;
* 42 = Gravitic Thrusters&lt;br /&gt;
* 43 = Carrier Capacity&lt;br /&gt;
* 44 = Khaydarin Core (Arbiter +50)&lt;br /&gt;
* 45 = Unknown Upgrade45&lt;br /&gt;
* 46 = Unknown Upgrade46&lt;br /&gt;
* 47 = Argus Jewel (Corsair +50)&lt;br /&gt;
* 48 = Unknown Upgrade48&lt;br /&gt;
* 49 = Argus Talisman (DA +50)&lt;br /&gt;
* 50 = Unknown Upgrade50&lt;br /&gt;
* 51 = Caduceus Reactor (Medic +50)&lt;br /&gt;
* 52 = Chitinous Plating&lt;br /&gt;
* 53 = Anabolic Synthesis&lt;br /&gt;
* 54 = Charon Booster&lt;br /&gt;
* 55 = Unknown Upgrade55&lt;br /&gt;
* 56 = Unknown Upgrade56&lt;br /&gt;
* 57 = Unknown Upgrade57&lt;br /&gt;
* 58 = Unknown Upgrade58&lt;br /&gt;
* 59 = Unknown Upgrade59&lt;br /&gt;
* 60 = Unknown Upgrade60&lt;br /&gt;
&lt;br /&gt;
==List of Unit Weapon IDs==&lt;br /&gt;
* 0 = Gauss Rifle (Normal)&lt;br /&gt;
* 1 = Gauss Rifle (Jim Raynor-Marine)&lt;br /&gt;
* 2 = C-10 Concussion Rifle (Normal)&lt;br /&gt;
* 3 = C-10 Concussion Rifle (Sarah Kerrigan)&lt;br /&gt;
* 4 = Fragmentation Grenade (Normal)&lt;br /&gt;
* 5 = Fragmentation Grenade (Jim Raynor-Vulture)&lt;br /&gt;
* 6 = Spider Mines&lt;br /&gt;
* 7 = Twin Autocannons (Normal)&lt;br /&gt;
* 8 = Hellfire Missile Pack (Normal)&lt;br /&gt;
* 9 = Twin Autocannons (Alan Schezar)&lt;br /&gt;
* 10 = Hellfire Missile Pack (Alan Schezar)&lt;br /&gt;
* 11 = Arclite Cannon (Normal)&lt;br /&gt;
* 12 = Arclite Cannon (Edmund Duke)&lt;br /&gt;
* 13 = Fusion Cutter&lt;br /&gt;
* 14 = Fusion Cutter (Harvest)&lt;br /&gt;
* 15 = Gemini Missiles (Normal)&lt;br /&gt;
* 16 = Burst Lasers (Normal)&lt;br /&gt;
* 17 = Gemini Missiles (Tom Kazansky)&lt;br /&gt;
* 18 = Burst Lasers (Tom Kazansky)&lt;br /&gt;
* 19 = ATS Laser Battery (Normal)&lt;br /&gt;
* 20 = ATA Laser Battery (Normal)&lt;br /&gt;
* 21 = ATS Laser Battery (Norad II+Mengsk+DuGalle)&lt;br /&gt;
* 22 = ATA Laser Battery (Norad II+Mengsk+DuGalle)&lt;br /&gt;
* 23 = ATS Laser Battery (Hyperion)&lt;br /&gt;
* 24 = ATA Laser Battery (Hyperion)&lt;br /&gt;
* 25 = Flame Thrower (Normal)&lt;br /&gt;
* 26 = Flame Thrower (Gui Montag)&lt;br /&gt;
* 27 = Arclite Shock Cannon (Normal)&lt;br /&gt;
* 28 = Arclite Shock Cannon (Edmund Duke)&lt;br /&gt;
* 29 = Longbolt Missiles&lt;br /&gt;
* 30 = Yamato Gun&lt;br /&gt;
* 31 = Nuclear Missile&lt;br /&gt;
* 32 = Lockdown&lt;br /&gt;
* 33 = EMP Shockwave&lt;br /&gt;
* 34 = Irradiate&lt;br /&gt;
* 35 = Claws (Normal)&lt;br /&gt;
* 36 = Claws (Devouring One)&lt;br /&gt;
* 37 = Claws (Infested Kerrigan)&lt;br /&gt;
* 38 = Needle Spines (Normal)&lt;br /&gt;
* 39 = Needle Spines (Hunter Killer)&lt;br /&gt;
* 40 = Kaiser Blades (Normal)&lt;br /&gt;
* 41 = Kaiser Blades (Torrasque)&lt;br /&gt;
* 42 = Toxic Spores (Broodling)&lt;br /&gt;
* 43 = Spines&lt;br /&gt;
* 44 = Spines (Harvest)&lt;br /&gt;
* 45 = Acid Spray (Unused)&lt;br /&gt;
* 46 = Acid Spore (Normal)&lt;br /&gt;
* 47 = Acid Spore (Kukulza-Guardian)&lt;br /&gt;
* 48 = Glave Wurm (Normal)&lt;br /&gt;
* 49 = Glave Wurm (Kukulza-Mutalisk)&lt;br /&gt;
* 50 = Venom (Unused-Defiler)&lt;br /&gt;
* 51 = Venom (Unused-Defiler Hero)&lt;br /&gt;
* 52 = Seeker Spores&lt;br /&gt;
* 53 = Subterranean Tentacle&lt;br /&gt;
* 54 = Suicide (Infested Terran)&lt;br /&gt;
* 55 = Suicide (Scourge)&lt;br /&gt;
* 56 = Parasite&lt;br /&gt;
* 57 = Spawn Broodlings&lt;br /&gt;
* 58 = Ensnare&lt;br /&gt;
* 59 = Dark Swarm&lt;br /&gt;
* 60 = Plague&lt;br /&gt;
* 61 = Consume&lt;br /&gt;
* 62 = Particle Beam&lt;br /&gt;
* 63 = Particle Beam (Harvest)&lt;br /&gt;
* 64 = Psi Blades (Normal)&lt;br /&gt;
* 65 = Psi Blades (Fenix-Zealot)&lt;br /&gt;
* 66 = Phase Disruptor (Normal)&lt;br /&gt;
* 67 = Phase Disruptor (Fenix-Dragoon)&lt;br /&gt;
* 68 = Psi Assault (Normal-Unused)&lt;br /&gt;
* 69 = Psi Assault (Tassadar+Aldaris)&lt;br /&gt;
* 70 = Psionic Shockwave (Normal)&lt;br /&gt;
* 71 = Psionic Shockwave (Tassadar/Zeratul Archon)&lt;br /&gt;
* 72 = Unknown72&lt;br /&gt;
* 73 = Dual Photon Blasters (Normal)&lt;br /&gt;
* 74 = Anti-matter Missiles (Normal)&lt;br /&gt;
* 75 = Dual Photon Blasters (Mojo)&lt;br /&gt;
* 76 = Anit-matter Missiles (Mojo)&lt;br /&gt;
* 77 = Phase Disruptor Cannon (Normal)&lt;br /&gt;
* 78 = Phase Disruptor Cannon (Danimoth)&lt;br /&gt;
* 79 = Pulse Cannon&lt;br /&gt;
* 80 = STS Photon Cannon&lt;br /&gt;
* 81 = STA Photon Cannon&lt;br /&gt;
* 82 = Scarab&lt;br /&gt;
* 83 = Stasis Field&lt;br /&gt;
* 84 = Psi Storm&lt;br /&gt;
* 85 = Warp Blades (Zeratul)&lt;br /&gt;
* 86 = Warp Blades (Dark Templar Hero)&lt;br /&gt;
* 87 = Missiles (Unused)&lt;br /&gt;
* 88 = Laser Battery1 (Unused)&lt;br /&gt;
* 89 = Tormentor Missiles (Unused)&lt;br /&gt;
* 90 = Bombs (Unused)&lt;br /&gt;
* 91 = Raider Gun (Unused)&lt;br /&gt;
* 92 = Laser Battery2 (Unused)&lt;br /&gt;
* 93 = Laser Battery3 (Unused)&lt;br /&gt;
* 94 = Dual Photon Blasters (Unused)&lt;br /&gt;
* 95 = Flechette Grenade (Unused)&lt;br /&gt;
* 96 = Twin Autocannons (Floor Trap)&lt;br /&gt;
* 97 = Hellfire Missile Pack (Wall Trap)&lt;br /&gt;
* 98 = Flame Thrower (Wall Trap)&lt;br /&gt;
* 99 = Hellfire Missile Pack (Floor Trap)&lt;br /&gt;
* 100 = Neutron Flare&lt;br /&gt;
* 101 = Disruption Web&lt;br /&gt;
* 102 = Restoration&lt;br /&gt;
* 103 = Halo Rockets&lt;br /&gt;
* 104 = Corrosive Acid&lt;br /&gt;
* 105 = Mind Control&lt;br /&gt;
* 106 = Feedback&lt;br /&gt;
* 107 = Optical Flare&lt;br /&gt;
* 108 = Maelstrom&lt;br /&gt;
* 109 = Subterranean Spines&lt;br /&gt;
* 110 = Gauss Rifle0 (Unused)&lt;br /&gt;
* 111 = Warp Blades (Normal)&lt;br /&gt;
* 112 = C-10 Concussion Rifle (Samir Duran)&lt;br /&gt;
* 113 = C-10 Concussion Rifle (Infested Duran)&lt;br /&gt;
* 114 = Dual Photon Blasters (Artanis)&lt;br /&gt;
* 115 = Anti-matter Missiles (Artanis)&lt;br /&gt;
* 116 = C-10 Concussion Rifle (Alexei Stukov)&lt;br /&gt;
* 117 = Gauss Rifle1 (Unused)&lt;br /&gt;
* 118 = Gauss Rifle2 (Unused)&lt;br /&gt;
* 119 = Gauss Rifle3 (Unused)&lt;br /&gt;
* 120 = Gauss Rifle4 (Unused)&lt;br /&gt;
* 121 = Gauss Rifle5 (Unused)&lt;br /&gt;
* 122 = Gauss Rifle6 (Unused)&lt;br /&gt;
* 123 = Gauss Rifle7 (Unused)&lt;br /&gt;
* 124 = Gauss Rifle8 (Unused)&lt;br /&gt;
* 125 = Gauss Rifle9 (Unused)&lt;br /&gt;
* 126 = Gauss Rifle10 (Unused)&lt;br /&gt;
* 127 = Gauss Rifle11 (Unused)&lt;br /&gt;
* 128 = Gauss Rifle12 (Unused)&lt;br /&gt;
* 129 = Gauss Rifle13 (Unused)&lt;br /&gt;
* 130 = None&lt;br /&gt;
&lt;br /&gt;
==Complete Modifier List==&lt;br /&gt;
* 0 = Condition: &amp;gt;= (greater than or equal to)&lt;br /&gt;
* 1 = Condition: &amp;lt;= (less than or equal to)&lt;br /&gt;
* 2 = Condition: == TRUE (Is True)&lt;br /&gt;
* 3 = Condition: == FALSE (Is False)&lt;br /&gt;
* 4 = Action: = TRUE (Set to True)&lt;br /&gt;
* 5 = Action: = FALSE (Set to False)&lt;br /&gt;
* 6 = Action: NOT (toggle)&lt;br /&gt;
* 7 = Action: = (Set to)&lt;br /&gt;
* 8 = Action: += (Add)&lt;br /&gt;
* 9 = Action: -= (Subtract)&lt;br /&gt;
* 10 = Condition: == (Exactly)&lt;br /&gt;
* 11 = Action: Randomize&lt;br /&gt;
&lt;br /&gt;
[[Category:StarCraft]]&lt;br /&gt;
[[Category:Reference]]&lt;/div&gt;</summary>
		<author><name>FaRTy1billion</name></author>	</entry>

	</feed>