Scenario.chk
The scenario.chk file contains all the map data. This includes strings, units, triggers, doodads, mission briefings, terrain, fog of war, etc.; anything except the physical .wav files. It is stored inside an MPQ file with the .scx or .scm file extension, along with any .wav files included in the scenario.
Format
The scenario.chk file consists of "chunks," or "sections." Each section contains a particular group of data describing the scenario. For example, there is a separate section for strings, mission briefings, triggers, units, unit settings, etc.
Section headers
Each section starts off with a 4 byte string, and a 4 byte unsigned long. The string indicates which section it is. For instance, the mission briefing section has "MBRF", the trigger section has "TRIG", etc.
The 4 byte unsigned long indicates how many bytes the section contains, not including the header itself.
After this 8 byte header, the rest of the section follows. Section order does not matter. The sections are only listed the way they are written by the original Campaign Editor.
"TYPE" section
Required for all game types (hybrid, broodwar) Not required for StarCraft This section specifies the type of scenario.
- 4 byte string: Specifies the type of scenario: RAWS for 1.04 StarCraft and above ("hybrid"), RAWB for Brood War.
"VER" section
Required for all game types (vanilla, hybrid, broodwar) This section identifies the file format version.
- 2 byte integer: File format version. 57 for early beta, 59 for 1.00 Starcraft, 63 for 1.04 Starcraft and above ("hybrid"), and 205 for Brood War. This appears to be the only version code section, besides TYPE, to actually be read by StarCraft (of TYPE, VER , IVER, and IVE2).
"IVER" section
Not required (vanilla, hybrid, broodwar) This section "additionally identifies" the map version.
- 2 byte integer: "Additional file format version:" 9 for beta/obsolete versions, 10 for current versions
Contrary to popular belief, it doesn't get "replaced" by IVE2 in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.
"IVE2" section
Not required (hybrid, broodwar) This section "additionally identifies" the map version.
- 2 byte integer: "Additional file format version:" 11 for 1.04 StarCraft and above ("hybrid") or Brood War.
Contrary to popular belief, it doesn't "replace" IVER in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.
"VCOD" section
Required for all game types. (vanilla, hybrid, broodwar) This section has a verification code to make sure this is actually a CHK file.
- 1024 bytes: Verification code.
- 16 bytes: Operation codes to produce the resulting hash.
There are some protections out there which only slightly alter the code: it seems to still work in StarCraft while failing in StarEdit. Please edit this part if you know more. SC probably calculates the CRC of the VCOD sections and compares it with a hardcoded CRC (?). Thus if two VCOD sequences output the same CRC SC won't notice it.
"IOWN" section
Not required (vanilla, hybrid, broodwar) This section specifies the owner of each player.
- 12 bytes: One byte for each player, specifies the owner of the player:
- 00 - Inactive
- 01 - Computer(game)
- 02 - Occupied by Human Player
- 03 - Rescue Passive
- 04 - Unused
- 05 - Computer
- 06 - Human (Open Slot)
- 07 - Neutral
- 08 - Closed slot
This section is seperate from ownr as a staredit value. Staredit does not display "inactive" as a valid option.
"OWNR" section
Required for all game types (vanilla, hybrid, broodwar) This section designates the controller of a particular player. It is exactly the same as the "IOWN" section, except there is an additional value (0x00 for Unused).
- 12 bytes: One byte for each player, specifies the owner of the player:
- 00 - Inactive
- 01 - Computer(game)
- 02 - Occupied by Human Player
- 03 - Rescue Passive
- 04 - Unused
- 05 - Computer
- 06 - Human (Open Slot)
- 07 - Neutral
- 08 - Closed slot
"ERA" section
Required for all game types (vanilla, hybrid, broodwar) This section indicates the tileset of the scenario.
- 2 byte integer: Designates tileset:
- 00 - Badlands
- 01 - Space Platform
- 02 - Installation
- 03 - Ashworld
- 04 - Jungle
- 05 - Desert
- 06 - Arctic
- 07 - Twilight
- 08+ - Loop
StarCraft masks the tileset indicator's bit value, so bits after the third place (anything after the value "7") are removed. Thus, 9 (1001 in binary) is interpreted as 1 (0001), 10 (1010) as 2 (0010), etc. Desert, Arctic, and Twilight are Brood War-only tilesets.
"DIM " section
Required for all game types (vanilla, hybrid, broodwar) This section contains the dimensions of the map.
- 2 byte integer: Width of the map
- 2 byte integer: Height of the map
The Width/Height of the map is measured in the number of square 32x32p tiles. Standard Dimensions are 64, 96, 128, 192, 256
"SIDE" section
Required for all game types (vanilla, hybrid, broodwar) This section contains the species/race of each player.
- 12 bytes: 1 byte/player for species of player:
- 00 - Zerg
- 01 - Terran
- 02 - Protoss
- 03 - Unused (Independent)
- 04 - Unused (Neutral)
- 05 - User Selectable
- 06 - Random (Forced; Acts as a selected race; Does not randomize race like user select;)
- 07 - Inactive
"MTXM" section
Required for all game types (vanilla, hybrid, broodwar) Note: Required for all game types, all versions. Terrain section that contains a map of the level's appearance. StarEdit disregards this section; it is only used in Starcraft.
- (variable size) 2 byte integers: one integer for each tile.
The Width/Height of the map is measured in the number of square 32x32p tiles. Tiles in this section are listed from left to right, top to bottom.
The values for each integer are their respective "MegaTile" 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.
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.
"PUNI" section
Required for Use Map Settings game type (vanilla, hybrid, broodwar) This section contains player unit restrictions: it indicates whether the player can or cannot build a particular unit.
- (228 * 12) bytes: 1 byte for each unit in order of its unit id, then each player, for player availability:
- 00 - That unit is not available for production if the player has 'override defaults' on
- 01 - That unit is available for production if the player has 'override defaults' on
- 228 bytes: 1 byte for each unit in order of it's unit id, for global availability defaults (for all players):
- 00 - That unit is not available for production
- 01 - That unit is available for production
- (228 * 12) bytes: 1 byte for each unit in order of its unit id, then each player, indicating whether a player uses the global availability defaults.
- 00 - Player overrides defaults for this unit
- 01 - Player uses defaults for this unit
"UPGR" section
Required for the Use Map Settings game type in vanilla maps or hybrid maps when run in vanilla mode (vanilla, hybrid) This section contains player upgrade restrictions: it indicates the starting/maximum levels at/to which a player can perform a particular upgrade.
- (46 * 12) bytes: 1 byte for the maximum level a player can upgrade to, in order of its upgrade id, then each player
- (46 * 12) bytes: 1 byte for the level of an upgrade a player starts off with, in order of its upgrade id, then each player
- 46 bytes: 1 byte for the global default maximum level of each upgrade, in order of its upgrade id.
- 46 bytes: 1 byte for the global default starting level of each upgrade, in order of its upgrade id.
- (46 * 12) bytes: 1 byte for each upgrade in order of its upgrade id, then each player, indicating whether a player uses the global upgrade defaults:
- 00 - Player does not use global upgrade defaults for this upgrade
- 01 - Player uses upgrade defaults for this upgrade
This section is overridden with "PUPx" when the scenario is Brood War or hybrid run in Brood War mode.
"PTEC" section
Required for the Use Map Settings game type in vanilla maps or hybrid maps when run in vanilla mode (vanilla, hybrid) This section contains player technology availability restrictions: it indicates whether a player starts off with a particular technology or can research a particular technology.
- (24 * 12) bytes: 1 byte for each technology id, then each player, for player availability:
- 00 - Technology is not available for a player
- 01 - Technology is available for a player
- (24 * 12) bytes: 1 byte for each technology id, then each player, for "already researched" status:
- 00 - Technology is not already researched
- 01 - Technology is already researched
- 24 bytes: 1 byte for each technology for global availability defaults:
- 00 - Technology is not available by default
- 01 - Technology is available by default
- 24 bytes: 1 byte for each technology for global "already researched" defaults:
- 00 - Technology is not already researched by default
- 01 - Technology is already researched by default
- (24 * 12) bytes: 1 byte for each technology in order of its technology id, then each player, indicating whether a player uses the global defaults:
- 00 - Technology overrides defaults for player
- 01 - Technology uses default settings for player
This section is overridden with "PTEx" when the scenario is Brood War or hybrid run in Brood War mode.
"UNIT" section
Required for all game types (vanilla, hybrid, broodwar) This section contains all the pre-placed units on the map and their properties. Each unit on the map gets the following structure:
- 4 byte long: The unit's class instance (sort of a "serial number")
- 2 byte integer: X coordinate of unit
- 2 byte integer: Y coordinate of unit
- 2 byte integer: Unit ID
- 2 byte integer: Type of relation to another building (i.e. add-on, nydus link, etc.)
- 2 bytes: Flags of special properties which can be applied to the unit and are valid:
- Bit 0 - Cloak is valid
- Bit 1 - Burrow is valid
- Bit 2 - In transit is valid
- Bit 3 - Hallucinated is valid
- Bit 4 - Invincible is valid
- Bit 5-15 - Unused
- 2 bytes: Out of the elements of the unit data, the properties which can be changed by the map maker:
- Bit 0 - Owner player is valid (the unit is not a critter, start location, etc.; not a neutral unit)
- Bit 1 - HP is valid
- Bit 2 - SP is valid
- Bit 3 - Energy is valid (unit is a wraith, etc.)
- Bit 4 - Resource amount is valid (unit is a mineral patch, vespene geyser, etc.)
- Bit 5 - Amount in hangar is valid (unit is a reaver, carrier, etc.)
- Bit 6-15 - Unused
- 1 byte: Player number of owner (0-based)
- 1 byte: Hit points % (1-100)
- 1 byte: Shield points % (1-100)
- 1 byte: Energy points % (1-100)
- 4 byte long: Resource amount
- 2 byte integer: Number of units in hangar
- 2 bytes: Unit state flags
- Bit 0 - Unit is cloaked
- Bit 1 - Unit is burrowed
- Bit 2 - Building is in transit
- Bit 3 - Unit is hallucinated
- Bit 4 - Unit is invincible
- Bit 5-15 - Unused
- 4 bytes: Unused
- 4 byte long: Class instance of the unit to which this unit is related to (i.e. via an add-on, nydus link, etc.). It is "0" if the unit is not linked to any other unit.
The X/Y coordinates are the center of the sprite of the unit (in pixels). The "type of relation to another building" field is not fully discovered yet: please edit if you know more information. Also, please edit if you could confirm the bit values to be correct/if you know more bit values. Default values will apply if bit values are unchecked. Defaults: 100% HP, 100% SP, 100% EP, 0 resources, 0 hangar count.
"ISOM" section
Not required (vanilla, hybrid, broodwar) This section is required to place isometric terrain on the map. It provides data about the nature of the isometrical "diamonds" (the editing mode of StarEdit).
- [ (width / 2 + 1) * (height + 1) * 4 ] 2 byte integers: 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 "ISOM value." These form the "diamond" 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.
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.
"TILE" section
Not required (vanilla, hybrid, broodwar) This section will only be different from the MTXM section in tiles where doodads are present.
- (width * height) 2 byte integers: 1 integer for each map tile. Moves horizontally across the map.
The values in TILE are normally directly generated from the ISOM section (see "'ISOM' section" above), and thus do not match that of MTXM on doodad tiles.
"DD2 " section
Not required by StarCraft This section contains the doodad map of the level. There are several parts to doodads. The graphical portion is stored in the ?MTXM? section. The second part of the doodad is stored in this section. This section seems to be only used by the map editor.
Each doodad in the map gets the following structure
- 2 byte integer: Number of the doodad. Size of the doodad is dependent on this. Doodads are different for each tileset.
- 2 byte integer: X coordinate of the doodad unit
- 2 byte integer: Y coordinate of the doodad unit
- 1 byte: Player number that owns the doodad
- 1 byte: Enabled flag
- 00 - Doodad is enabled (trap can attack, door is closed, etc)
- 01 - Doodad is disabled
"THG2" section
Note: Required for All game types, all versions The map editor only writes to this section. Starcraft uses this section. Certain doodads with sprites get the following structure.
- 2 byte integer: Unit number of the doodad
- 2 byte integer: X coordinate of the doodad unit
- 2 byte integer: Y coordinate of the doodad unit
- 1 byte: Player number that owns the doodad
- 1 byte: Unused
- 2 bytes: Flags
- Bit 0-11 - Unused
- Bit 12 - Draw as sprite (Determines if it is a sprite or a unit)
- Bit 13 - Unused
- Bit 14 - Unused
- Bit 15 - Disabled (Only valid if Draw as sprite is unchecked, disables the unit)
"MASK" section
Note: Not required for Melee game type. 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.
- (Variable) bytes: One byte for each map tile. The bits indicate for each player the fog of war.
- Bit 0 - Player 1's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.
- Bit 1 - Player 2's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.
- Bit 2 - Player 3's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.
- Bit 3 - Player 4's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.
- Bit 4 - Player 5's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.
- Bit 5 - Player 6's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.
- Bit 6 - Player 7's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.
- Bit 7 - Player 8's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.
Note: Any size greator than width*height will be ignored. Any size less will default missing tiles to 0xFF
"STR " section
Note: Required for Melee game type This section contains all the strings in the map. Note: This section can contain more then 1024 strings and will work in Starcraft
- 2 byte integer: Number of strings in the section
- (# of strings) 2 byte integers: 1 integer for each string specifying the offset (the spot where the string starts in the section from the start of it).
- Strings: After the offsets, this is where every string in the map goes, one after another. Each one is terminated by a null character.
"UPRP" section
Note: This section is not required for melee. 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.
There are 64 of the following structures regardless of how many are used and it cannot exceed 64.
- 2 bytes: Flag of which special properties can be applied to unit, and are valid.
- Bit 0 - Cloak bit is valid
- Bit 1 - Burrowed bit is valid
- Bit 2 - In transit bit is valid
- Bit 3 - Hallucinated bit is valid
- Bit 4 - Invincible bit is valid
- Bit 5-15 - Unknown/unused
- 2 bytes: Which elements of the unit data are valid, which properties can be changed by the map maker.
- Bit 0 - Owner player is valid (unit is not neutral)
- Bit 1 - HP is valid
- Bit 2 - SP is valid
- Bit 3 - Energy is valid
- Bit 4 - Resource amount is valid (unit is a resource)
- Bit 5 - Amount in hanger is valid
- Bit 6 - Unknown/unused
- 1 byte: Player number that owns unit. Will always be NULL in this section (0)
- 1 byte: Hit point % (1-100)
- 1 byte: Shield point % (1-100)
- 1 byte: Energy point % (1-100)
- 4 byte long: Resource amount (for resources only)
- 2 byte integer: # of units in hangar
- 2 bytes: Flags
- Bit 0 - Unit is cloaked
- Bit 1 - Unit is burrowed
- Bit 2 - Building is in transit
- Bit 3 - Unit is hallucinated
- Bit 4 - Unit is invincible
- Bit 5-15 - Unknown/unused
- 4 bytes: Unknown/unused. Padding?
"UPUS" section
Note: This section is not required for melee. This section goes along with the "UPRP" section. This section just indicates which of the 64 unit properties slot is used.
- 64 bytes: 1 byte for each trigger unit properties slot
- 00 - Properties slot is unused
- 01 - Properties slot is used
"MRGN" section
Note: This section is required for all game types, all versions. This section contains all the locations that the map uses. In a scenario that is not Brood War, this section contains 64 locations. In a Brood War map, this section will expand to contain 255 locations. This section can be a size of 0 in melee.
Each location gets one of the following location entries. The 'Anywhere' location, is ALWAYS location 64.
- 4 byte long: Starting X coordinate of location (32 pt grid)
- 4 byte long: Starting Y coordinate of location (32 pt grid)
- 4 byte long: Ending X coordinate of location (32 pt grid)
- 4 byte long: Ending Y coordinate of location (32 pt grid)
- 2 byte integer: String number of the name of this location
- 2 bytes: Location elevation flags. If an elevation is disabled in the location, it's bit will be on (1)
- Bit 0 - Low elevation
- Bit 1 - Medium elevation
- Bit 2 - High elevation
- Bit 3 - Low air
- Bit 4 - Medium air
- Bit 5 - High air
- Bit 6-15 - Unused
"TRIG" section
NOTE: This section is required for the UMS game type. This section may be split. This section contains all the triggers in the map. This along with MBRF is the most complicated section in the entire scenario.chk file. There is too much data packed into too little of a space. Refer to the appendix at the bottom of this page for more information.
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.Every single trigger in the map will have the following format:
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.
- 4 byte long: Location number for the condition (1 based)
- 4 byte long: Group (0 based) that the condition applies to
- 4 byte long: Qualified number (how many/resource amount)
- 2 byte integer: Unit ID condition applies to
- 1 byte: Comparison type/switch state
- 1 byte: Condition byte (see the appendix)
- 1 byte: Resource type/score type/switch number
- 1 byte: Flags
- Bit 0 - Unknown/unused
- Bit 1 - Enabled flag. If on, the trigger action/condition is disabled/ignored
- Bit 2 - Always display flag.
- Bit 3 - Unit properties is used. Unnecessary (Note: This is uses in *.trg files).
- Bit 4 - Unit type is used. May not be necessary?
- Bit 5 - If on, the unit ID is used. Unnecessary.
- Bit 6-7 - Unknown/unused
- 2 bytes: Used internally by starcraft (number of which condition to process next, and maybe more?)
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.
- 4 byte long: 'Source' or only location (#1 based)
- 4 byte long: String number for trigger text
- 4 byte long: String number of. WAV file
- 4 byte long: Seconds/milliseconds of time
- 4 byte long: First, or only group/player affected.
- 4 byte long: Second group affected, destination location (1-based), CUWP #, number, AI script, switch
- 2 byte integer: Unit/score/resource type/alliance status
- 1 byte: Action byte. See appendix.
- 1 byte: Number of units/switch action/unit order/modify type. 0 specifies all units.
- 1 byte: Flags
- Bit 0 - Unknown/unused
- Bit 1 - Enabled flag. If on, the trigger action/condition is disabled
- Bit 2 - Always display flag.
- Bit 3 - Unit properties is used. Staredit uses this for *.trg files.
- Bit 4 - Unit type is used
- Bit 5 - If on, the unit ID is used. Unnecessary.
- Bit 6-7 - Unknown/unused
- 3 bytes: Used internally by starcraft (number of which action to process next, and maybe more?)
Following the 16 conditions and 64 actions, every trigger also has this structure
- 4 bytes: Used internally by starcraft (unknown usage. may be used to check if the trigger is "finished", ie no preserve trigger and the trigger has already run)
- 28 bytes: 1 byte for each player in the players/groups list (except for the last one) (see appendix).
- 00 - Trigger is not executed for player
- 01 - Trigger is executed for player
"MBRF" section
This section contains all of the mission briefings shown by the players.
This section has the exact same format as the "TRIG" section, 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 appendix for the action bytes for the mission briefings.
"SPRP" section
This section decides which strings are the scenario properties.
- 2 byte integer: String number of the scenario name
- 2 byte integer: String number of the scenarios description.
Note: A string index of 0 for the map name will default it to its file name.
"FORC" section
Note: Required for Melee game type (size may be 0), full size required for UMS maps This section specifies the forces and the information about them.
- 8 bytes: 1 byte for each active player, specifying which of the 4 forces (0-based) that the player's on.
- (4) 2 byte integers: 1 integer for each force, string number of the name of the force
- 4 bytes: 1 byte for each force specifying the properties:
- Bit 0 - Random start location
- Bit 1 - Allies
- Bit 2 - Allied victory
- Bit 3 - Shared vision
- Bit 4-7 - Unknown/unused
"WAV " section
Not required by StarCraft There are 1024 wav entires regardless of how many are actually used. Note: This section is not required and is often left out.
- 512 longs: 1 long for each WAV. Indicates the string number of the path to the wav file in the MPQ. If the entry is not used, it will be 0.
"UNIS" section
Note: This section is overridden with "UNIx" when the scenario is Brood War. Not required for melee. This section contains the unit settings for the level.
- 228 bytes: 1 byte for each unit, in order of Unit ID
- 00 - Unit does not use default settings
- 01 - Unit does use default settings
- (228) 4 byte integers: Hit points for unit*256
- (228) 2 byte integers: Shield points, in order of Unit ID
- 228 bytes: Armor points, in order of Unit ID
- (228) 2 byte integers: Build time (1/60 seconds), in order of Unit ID
- (228) 2 byte integers: Mineral cost, in order of Unit ID
- (228) 2 byte integers: Gas cost, in order of Unit ID
- (228) 2 byte integers: String number, in order of Unit ID
- (100) 2 byte integers: Base weapon damage the weapon does, in weapon ID order (appendix)
- (100) 2 byte integers: Upgrade bonus weapon damage, in weapon ID order (appendix)
"UPGS" section
Note: This section is overridden with "UPGx" when the scenario is Brood War. Not required for melee. This section contains upgrade settings.
- 46 bytes: 1 byte per each upgrade, in order of upgrade id.
- 00 - Upgrade uses custom settings
- 01 - Upgrade uses default settings
- (46) 2 byte integers: 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.
- (46) 2 byte integers: 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.
- (46) 2 byte integers: 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.
- (46) 2 byte integers: 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.
- (46) 2 byte integers: 1 integer per upgrade, base time for each upgrade, in order of upgrade id.
- (46) 2 byte integers: 1 integer per upgrade, gas time factor for each upgrade, in order of upgrade id.
"TECS" section
Note: This section is overridden with "TECx" when the scenario is Brood War. Not required for melee. This section contains technology/special abilities settings
- 24 bytes: 1 byte per each technology, specifies if the tech overrides the default settings. In order of technology id (appendix)
- 00 - Technology uses custom settings
- 01 - Technology uses default settings
- (24) 2 byte integers: Mineral cost to develop technology. In order of technology id (appendix).
- (24) 2 byte integers: Gas cost to develop technology. In order of technology id (appendix).
- (24) 2 byte integers: Time required to develop technology. In order of technology id (appendix).
- (24) 2 byte integers: Energy cost to cast technology/special ability. In order of technology id (appendix).
"SWNM" Section
Not required by StarCraft This section contains the strings used for each switch. There are 256 switches, and can't be any more or any less.
- (256) 4 byte longs: One long for each switch, specifies the string number for the name of each switch.
"COLR" section
Note: Required for Melee game type (only on Brood War) Note: This section only has effect on Brood War This section indicates what color each player is.
- 8 bytes: 1 byte for each player, indicates the color of the player
- 00 - Red
- 01 - Blue
- 02 - Teal
- 03 - Purple
- 04 - Orange
- 05 - Brown
- 06 - White
- 07 - Yellow
- 08 - Green
- 09 - Pale yellow
- 10 - Tan
- 11 - Neutral color
- 12 - Pale green
- 13 - Blueish gray
- 14 - Pale yellow
- 15 - Cyan
- 17 - Black
Note: Other values can be used but may have different results depending on the tileset. Any color value above 11 is an overflow.
"PUPx" section
Note: This section overrides the "UPGR" when the scenario is Brood War. This section is identical to UPGR section except it uses the Brood War set of 61 upgrades instead of the original 46
"PTEx" section
Note: This section overrides the "PTEC" when the scenario is Brood War. This section is identical to PTEC section except it uses the Brood War set of 44 technologies instead of the original 24
"UNIx" section
Note: This section overrides the "UNIS" when the scenario is Brood War. This section is indentical to UNIS section except it uses the Brood War set of 130 weapons instead of the original 100
"UPGx" section
Note: This section overrides the "UPGS" when the scenario is Brood War. This section is pretty much the same as UPGS except for two differences:
- This section uses the Brood War set of 61 upgrades instead of the original 46
- After the first 61 bytes, there is a single 0 before the next set. May not matter?
"TECx" section
Note: This section overrides the "TECS" when the scenario is Brood War. This section is indentical to UNIS section except it uses the Brood War set of 44 technologies instead of the original 24
Appendix
A set of references and IDs that should help you easier in the trigger section and the technology/player ids, etc.
Trigger conditions list
0 = No Condition 1 = Countdown Timer(Comparison, QNumber) 2 = Command(Player, Comparison, TUnit, QNumber) 3 = Bring(Player, Comparison, TUnit, Loc, QNumber) 4 = Accumulate(Player, Comparison, QNumber, ResType) 5 = Kill(Player, Comparison, TUnit, QNumber) 6 = Command the Most(TUnit) 7 = Commands the Most At(TUnit, Loc) 8 = Most Kills(TUnit) 9 = Highest Score(Score) 10 = Most Resources(ResType) 11 = Switch(Switch) 12 = Elapsed Time(Comparison, QNumber) 13 = Data is a Mission Briefing. Conditions are N/A (Same as Never) 14 = Opponents(Player, Comparison, QNumber) 15 = Deaths(Player, Comparison, TUnit, QNumber) 16 = Command the Least(TUnit) 17 = Command the Least At(TUnit, Loc) 18 = Least Kills(TUnit) 19 = Lowest Score(Score) 20 = Least Resources(ResType) 21 = Score(Player, Comparison, Score, QNumber) 22 = Always (Same as No Condition) 23 = Never
Trigger actions list
0 = No Action 1 = Victory 2 = Defeat 3 = Preserve Trigger 4 = Wait(Time) 5 = Pause Game (Single player only) 6 = Unpause Game (Single player only) 7 = Transmission(Text, Unit, Loc, Time, Modifier, Wave, WavTime) 8 = Play WAV(Wav, WavTime) 9 = Display Text Message(Text) 10 = Center View(Loc) 11 = Create Unit with Properties(Player, Unit, Number, Loc, UnitProp) 12 = Set Mission Objectives(Text) 13 = Set Switch(Switch, SwAction) 14 = Set Countdown Timer(Time, Modifier) 15 = Run AI Script(AIScript) 16 = Run AI Script At Location(AIScript) 17 = Leader Board (Control) (Text, TUnit) 18 = Leader Board (Control At Location) (Text, TUnit, Loc) 19 = Leader Board (Resources) (Text, ResType) 20 = Leader Board (Kills) (Text, TUnit) 21 = Leader Board (Points) (Text, Score) 22 = Kill Unit (Player, TUnit) 23 = Kill Unit At Location(Player, TUnit, Number, Loc) 24 = Remove Unit(Player, TUnit) 25 = Remove Unit At Location(Player, TUnit, Number, Loc) 26 = Set Resources(Player, Number, Modifier, ResType) 27 = Set Score(Player, Number, Modifier, Score) 28 = Minimap Ping(Loc) 29 = Talking Portrait(Unit, Time) 30 = Mute Unit Speech 31 = Unmute Unit Speech 32 = Leaderboard Computer Players(State) 33 = Leaderboard Goal (Control) (Text, TUnit, Number) 34 = Leaderboard Goal (Control At Location) (Text, TUnit, Number, Loc) 35 = Leaderboard Goal (Resources) (Text, TUnit, Number, ResType) 36 = Leaderboard Goal (Kills) (Text, TUnit, Number) 37 = Leaderboard Goal (Points) (Text, Number, Score) 38 = Move Location(Player, TUnit, SLoc, DLoc) 39 = Move Unit(Player, TUnit, Number, SLoc, DLoc) 40 = Leaderboard (Greed) (Number) 41 = Set Next Scenario(Text) (Single player only) 42 = Set Doodad State(Player, TUnit, Loc, State) 43 = Set Invincibility(Player, TUnit, Loc, State) 44 = Create Unit(Player, Unit, Number, Loc) 45 = Set Deaths(Player, TUnit, Number, Modifier) 46 = Order(Player, TUnit, SLoc, DLoc, Order) 47 = Comment(Text) 48 = Give Units to Player(SPlayer, DPlayer, TUnit, Number, Loc) 49 = Modify Unit Hit Points(Player, TUnit, Number, ModAmount, Loc) 50 = Modify Unit Energy(Player, TUnit, Number, ModAmount, Loc) 51 = Modify Unit Shield Points(Player, TUnit, Number, ModAmount, Loc) 52 = Modify Unit Resource Amount(Player, Number, ModAmount, Loc) 53 = Modify Unit Hanger Count(Player, TUnit, Number, ModAmount, Loc) 54 = Pause Timer 55 = Unpause Timer 56 = Draw 57 = Set Alliance Status(Player, AllyStatus) 58 = Disable Debug Mode (Single player only) 59 = Enable Debug Mode (Single player only)
Mission briefing action list
0 - No Action 1 - Wait(Time) 2 - Play WAV(Wave, WavTime) 3 - Text Message(Text, Time) 4 - Mission Objectives(Text) 5 - Show Portrait(Unit, Slot) 6 - Hide Portrait(Slot) 7 - Display Speaking Portrait(Slot, Time) 8 - Transmission(Text, Slot, Time, Modifier, Wave, WavTime) 9 - Skip Tutorial Enabled
Switch states
2 = Switch is set 3 = Switch is cleared
Numeric Comparisons
0 = At least 1 = At most 10 = Exactly
Score types
0 = Total 1 = Units 2 = Buildings 3 = Units and Buildings 4 = Kills 5 = Razings 6 = Kills and Razings 7 = Custom
Resource types
0 = Ore 1 = Gas 2 = Ore and Gas
Alliance status
0 = Enemy 1 = Ally 2 = Allied Victory
Unit orders
0 = Move 1 = Patrol 2 = Attack
Action states
4 = Enabled/Set switch 5 = Disabled/Clear switch 6 = Toggle/Toggle switch 11 = Randomize switch
Number modifiers
7 = Set to 8 = Add 9 = Subtract
Trigger unit types
All normal units (0-227) 228 = None 229 = Any unit 230 = Men 231 = Buildings 232 = Factories
List of players/group IDs
0 = Player 1 1 = Player 2 2 = Player 3 3 = Player 4 4 = Player 5 5 = Player 6 6 = Player 7 7 = Player 8 8 = Player 9 9 = Player 10 10 = Player 11 11 = Player 12 12 = None (Unused, One-entry Overflow in some cases) 13 = Current Player 14 = Foes 15 = Allies 16 = Neutral Players 17 = All Players 18 = Force 1 19 = Force 2 20 = Force 3 21 = Force 4 22 = Unused 1 23 = Unused 2 24 = Unused 3 25 = Unused 4 26 = Non Allied Victory Players
List of technology IDs
0 = Stim Packs 1 = Lockdown 2 = EMP Shockwave 3 = Spider Mines 4 = Scanner Sweep 5 = Siege Mode 6 = Defensive Matrix 7 = Irradiate 8 = Yamato Gun 9 = Cloaking Field 10 = Personnel Cloaking 11 = Burrowing 12 = Infestation 13 = Spawn Broodling 14 = Dark Swarm 15 = Plague 16 = Consume 17 = Ensnare 18 = Parasite 19 = Psionic Storm 20 = Hallucination 21 = Recall 22 = Stasis Field 23 = Archon Warp 24 = Restoration 25 = Disruption Web 26 = Unused 26 27 = Mind Control 28 = Dark Archon Meld 29 = Feedback 30 = Optical Flare 31 = Maelstorm 32 = Lurker Aspect 33 = Unused 33 34 = Healing 35 = Unused 35 36 = Unused 36 37 = Unused 37 38 = Unused 38 39 = Unused 39 40 = Unused 40 41 = Unused 41 42 = Unused 42 43 = Unused 43
List of unit weapon IDs
0 = Gauss Rifle (Normal) 1 = Gauss Rifle (Jim Raynor-Marine) 2 = C-10 Concussion Rifle (Normal) 3 = C-10 Concussion Rifle (Sarah Kerrigan) 4 = Fragmentation Grenade (Normal) 5 = Fragmentation Grenade (Jim Raynor-Vulture) 6 = Spider Mines 7 = Twin Autocannons (Normal) 8 = Hellfire Missile Pack (Normal) 9 = Twin Autocannons (Alan Schezar) 10 = Hellfire Missile Pack (Alan Schezar) 11 = Arclite Cannon (Normal) 12 = Arclite Cannon (Edmund Duke) 13 = Fusion Cutter 14 = Fusion Cutter (Harvest) 15 = Gemini Missiles (Normal) 16 = Burst Lasers (Normal) 17 = Gemini Missiles (Tom Kazansky) 18 = Burst Lasers (Tom Kazansky) 19 = ATS Laser Battery (Normal) 20 = ATA Laser Battery (Normal) 21 = ATS Laser Battery (Norad II+Mengsk+DuGalle) 22 = ATA Laser Battery (Norad II+Mengsk+DuGalle) 23 = ATS Laser Battery (Hyperion) 24 = ATA Laser Battery (Hyperion) 25 = Flame Thrower (Normal) 26 = Flame Thrower (Gui Montag) 27 = Arclite Shock Cannon (Normal) 28 = Arclite Shock Cannon (Edmund Duke) 29 = Longbolt Missiles 30 = Yamato Gun 31 = Nuclear Missile 32 = Lockdown 33 = EMP Shockwave 34 = Irradiate 35 = Claws (Normal) 36 = Claws (Devouring One) 37 = Claws (Infested Kerrigan) 38 = Needle Spines (Normal) 39 = Needle Spines (Hunter Killer) 40 = Kaiser Blades (Normal) 41 = Kaiser Blades (Torrasque) 42 = Toxic Spores (Broodling) 43 = Spines 44 = Spines (Harvest) 45 = Acid Spray (Unused) 46 = Acid Spore (Normal) 47 = Acid Spore (Kukulza-Guardian) 48 = Glave Wurm (Normal) 49 = Glave Wurm (Kukulza-Mutalisk) 50 = Venom (Unused-Defiler) 51 = Venom (Unused-Defiler Hero) 52 = Seeker Spores 53 = Subterranean Tentacle 54 = Suicide (Infested Terran) 55 = Suicide (Scourge) 56 = Parasite 57 = Spawn Broodlings 58 = Ensnare 59 = Dark Swarm 60 = Plague 61 = Consume 62 = Particle Beam 63 = Particle Beam (Harvest) 64 = Psi Blades (Normal) 65 = Psi Blades (Fenix-Zealot) 66 = Phase Disruptor (Normal) 67 = Phase Disruptor (Fenix-Dragoon) 68 = Psi Assault (Normal-Unused) 69 = Psi Assault (Tassadar+Aldaris) 70 = Psionic Shockwave (Normal) 71 = Psionic Shockwave (Tassadar/Zeratul Archon) 72 = Unknown72 73 = Dual Photon Blasters (Normal) 74 = Anti-matter Missiles (Normal) 75 = Dual Photon Blasters (Mojo) 76 = Anit-matter Missiles (Mojo) 77 = Phase Disruptor Cannon (Normal) 78 = Phase Disruptor Cannon (Danimoth) 79 = Pulse Cannon 80 = STS Photon Cannon 81 = STA Photon Cannon 82 = Scarab 83 = Stasis Field 84 = Psi Storm 85 = Warp Blades (Zeratul) 86 = Warp Blades (Dark Templar Hero) 87 = Missiles (Unused) 88 = Laser Battery1 (Unused) 89 = Tormentor Missiles (Unused) 90 = Bombs (Unused) 91 = Raider Gun (Unused) 92 = Laser Battery2 (Unused) 93 = Laser Battery3 (Unused) 94 = Dual Photon Blasters (Unused) 95 = Flechette Grenade (Unused) 96 = Twin Autocannons (Floor Trap) 97 = Hellfire Missile Pack (Wall Trap) 98 = Flame Thrower (Wall Trap) 99 = Hellfire Missile Pack (Floor Trap) 100 = Neutron Flare 101 = Disruption Web 102 = Restoration 103 = Halo Rockets 104 = Corrosive Acid 105 = Mind Control 106 = Feedback 107 = Optical Flare 108 = Maelstrom 109 = Subterranean Spines 110 = Gauss Rifle0 (Unused) 111 = Warp Blades (Normal) 112 = C-10 Concussion Rifle (Samir Duran) 113 = C-10 Concussion Rifle (Infested Duran) 114 = Dual Photon Blasters (Artanis) 115 = Anti-matter Missiles (Artanis) 116 = C-10 Concussion Rifle (Alexei Stukov) 117 = Gauss Rifle1 (Unused) 118 = Gauss Rifle2 (Unused) 119 = Gauss Rifle3 (Unused) 120 = Gauss Rifle4 (Unused) 121 = Gauss Rifle5 (Unused) 122 = Gauss Rifle6 (Unused) 123 = Gauss Rifle7 (Unused) 124 = Gauss Rifle8 (Unused) 125 = Gauss Rifle9 (Unused) 126 = Gauss Rifle10 (Unused) 127 = Gauss Rifle11 (Unused) 128 = Gauss Rifle12 (Unused) 129 = Gauss Rifle13 (Unused) 130 = None
Complete modifier list
0 = Condition: >= (greater than or equal to) 1 = Condition: <= (less than or equal to) 2 = Condition: == TRUE (Is True) 3 = Condition: == FALSE (Is False) 4 = Action: = TRUE (Set to True) 5 = Action: = FALSE (Set to False) 6 = Action: NOT (toggle) 7 = Action: = (Set to) 8 = Action: += (Add) 9 = Action: -= (Subtract) 10 = Condition: == (Exactly) 11 = Action: Randomize