Advertisement
Guest User

Untitled

a guest
Apr 18th, 2015
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 49.52 KB | None | 0 0
  1. The CHK file is a very dense file found inside the SCM or SCX file (as "staredit\scenario.chk"), which is just a renamed MPQ archive.
  2.  
  3. In this article, some shorthand will be used for datatypes:
  4. * '''u8''' for an unsigned byte
  5. * '''u16''' for an unsigned short (2-byte integer)
  6. * '''u32''' for an unsigned int (4-byte integer)
  7. * '''uT[''a'']''' for an array of datatype '''T''' (8, 16, 32) with '''''a''''' number of elements
  8. * '''uT[''a''][''b'']''' for a two-dimensional array of datatype '''T''', where each element of '''T[''a'']''' will be an array of size '''''b'''''
  9.  
  10. =Sections=
  11. The CHK is split into several named chunks (hence the file extension, an abbreviation of ''CHunK'').
  12.  
  13. Each section begins with an 8-byte header:
  14. * '''u32''' Name - A 4-byte string uniquely identifying that chunk's purpose.
  15. * '''u32''' Size - The size, in bytes, of the chunk (not including this header)
  16. Followed by as many bytes as 'Size', in a format described below.
  17.  
  18. Some things to keep in mind about the CHK section:
  19. * 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 "section stacking", allowing smaller sections to be placed inside of larger ones or duplicate triggers or units to take less space in the file.
  20. * All sections will marked "Not required." 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.
  21. * Note "Hybrid", or "Enhanced", 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.
  22. * Duplicate sections will overwrite previously defined section data, except where noted. Note this only applies to those section that pass the specified "validation" parameters, as any section that does not successfully validate will be ignored.
  23.  
  24.  
  25. =="TYPE" - Map Type==
  26. ''Not required.''
  27.  
  28. This section specifies the type of scenario.
  29. * '''u32''': Specifies the type of scenario:
  30. ** '''0x53574152''' or '''RAWS''' - 1.04 StarCraft and above ("hybrid")
  31. ** '''0x42574152''' or '''RAWB''' - Brood War
  32.  
  33.  
  34. =="VER " - Format Version==
  35. ''Required for all versions and all game types.''<br>
  36. ''Validation: Must be size of 2 bytes.''
  37.  
  38. This section identifies the file format version.
  39. * '''u16''': File format version:
  40. ** '''59''' - 1.00 Starcraft
  41. ** '''63''' - 1.04 Starcraft and above ("hybrid")
  42. ** '''205''' - Brood War
  43. 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.
  44.  
  45.  
  46. =="IVER" - Map Version==
  47. ''Not required.''
  48.  
  49. This section "additionally identifies" the map version.
  50. * '''u16''': "Additional file format version:"
  51. ** '''9''' - beta/obsolete versions
  52. ** '''10''' - current versions
  53. 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.
  54.  
  55.  
  56. =="IVE2" - Map Version==
  57. ''Not required.''
  58.  
  59. This section "additionally identifies" the map version.
  60. * '''u16''': "Additional file format version:"
  61. ** '''11''' - 1.04 StarCraft and above ("hybrid") or Brood War.
  62. This section does not "replace" IVER in hybrid/Brood War scenarios: both seem to be written by StarEdit but not read by StarCraft.
  63.  
  64.  
  65. =="VCOD" - Verification Code==
  66. ''Required for all versions and all game types.''<br>
  67. ''Validation: Must be equal to size of the VCOD data in the EXE resource. Must result in valid checksum.''
  68.  
  69. This section has a verification code to make sure this is actually a CHK file.
  70.  
  71. * '''u32[256]''': Seed values.
  72. * '''u8[16]''': Operation codes to produce the resulting hash:
  73. ** '''00''' - XOR's the current hash with the total values of OWNR, SIDE * 256, FORC * 65536
  74. ** '''01''' - Adds to the current hash with the total values of OWNR, SIDE * 256, FORC * 65536
  75. ** '''02''' - Subtracts from the current hash with the total values of OWNR, SIDE * 256, FORC * 65536
  76. ** '''03''' - XOR's the current hash with the VCOD table at index OWNR, SIDE, FORC, and 0
  77. ** '''04''' - same as 0x03
  78. ** '''05''' - same as 0x03
  79. ** '''06''' - Complex function consisting of ORs and shifts
  80. ** '''07''' - Inverted version of 0x06, switching direction of all shifts
  81. ** '''08+''' - Do nothing
  82. Opcodes and seeds do not have to match those in EXE resource, as long as the same value is produced.<br>
  83. The only indexes in the seed table that are referenced are those that correspond individual values of [[#"OWNR" - StarCraft Player Types|OWNR]], [[#"SIDE" - Player Races|SIDE]], [[#"FORC" - Force Settings|FORC]] player assignments, and index 0.
  84.  
  85.  
  86. =="IOWN" - StarEdit Player Types==
  87. ''Not Required.''
  88.  
  89. This section specifies the owner of each player.
  90. * '''u8[12]''': One byte for each player, specifies the owner of the player:
  91. ** '''00''' - Inactive
  92. ** ''01'' - Computer (game)
  93. ** ''02'' - Occupied by Human Player
  94. ** '''03''' - Rescue Passive
  95. ** '''04''' - Unused
  96. ** '''05''' - Computer
  97. ** '''06''' - Human (Open Slot)
  98. ** '''07''' - Neutral
  99. ** ''08'' - Closed slot
  100. This section is separate from OWNR as a staredit value. Staredit does not display "inactive" as a valid option. Italicized settings denote invalid map options, which may involve a buffer overflow.
  101.  
  102.  
  103. =="OWNR" - StarCraft Player Types==
  104. ''Required for all versions and all game types.''<br>
  105. ''Validation: Must be size of 12 bytes.''
  106.  
  107. 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 Inactive.
  108. * '''u8[12]''': One byte for each player, specifies the owner of the player:
  109. ** '''00''' - Inactive
  110. ** ''01'' - Computer (game)
  111. ** ''02'' - Occupied by Human Player
  112. ** '''03''' - Rescue Passive
  113. ** '''04''' - Unused
  114. ** '''05''' - Computer
  115. ** '''06''' - Human (Open Slot)
  116. ** '''07''' - Neutral
  117. ** ''08'' - Closed slot
  118. Italicized settings denote invalid map options, which may involve a buffer overflow.
  119.  
  120.  
  121. =="ERA " - Tileset==
  122. ''Required for all versions and all game types.''<br>
  123. ''Validation: Must be size of 2 bytes.''
  124.  
  125. This section indicates the tileset of the scenario.
  126. * '''u16''': Designates tileset:
  127. ** '''00''' - Badlands
  128. ** '''01''' - Space Platform
  129. ** '''02''' - Installation
  130. ** '''03''' - Ashworld
  131. ** '''04''' - Jungle
  132. ** '''05''' - Desert
  133. ** '''06''' - Arctic
  134. ** '''07''' - Twilight
  135. 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.<br>
  136. Desert, Arctic, and Twilight are Brood War-only tilesets.
  137.  
  138.  
  139. =="DIM " - Map Dimensions==
  140. ''Required for all versions and all game types.''<br>
  141. ''Validation: Must be size of 4 bytes.''
  142.  
  143. This section contains the dimensions of the map.
  144. * '''u16''': Width of the map
  145. * '''u16''': Height of the map
  146. The Width/Height of the map is measured in the number of square 32x32p tiles.<br>
  147. Standard Dimensions are 64, 96, 128, 192, and 256.
  148.  
  149.  
  150. =="SIDE" - Player Races==
  151. ''Required for all versions and all game types.''<br>
  152. ''Validation: Must be size of 12 bytes.''
  153.  
  154. This section contains the species/race of each player.
  155. * '''u8[12]''': 1 byte per player the species of that player:
  156. ** '''00''' - Zerg
  157. ** '''01''' - Terran
  158. ** '''02''' - Protoss
  159. ** ''03'' - Invalid (Independent)
  160. ** ''04'' - Invalid (Neutral)
  161. ** '''05''' - User Selectable
  162. ** '''06''' - Random (Forced; Acts as a selected race)
  163. ** ''07'' - Inactive
  164. Italicized settings denote invalid map options. Note Players 9-11 are defaultly Inactive and Player 12 is defaultly Neutral.
  165.  
  166.  
  167. =="MTXM" - StarCraft Terrain==
  168. ''Required for all versions and all game types.''<br>
  169. ''Validation: Must be less than or equal to 131072 (0x20000) bytes (256 * 256 * 2).''
  170.  
  171. Terrain section that contains a map of the level's appearance. StarEdit disregards this section and instead uses [[#"TILE" - StarEdit Terrain|TILE]]; it is only used in Starcraft.
  172. * '''u16[map width * height]''': one integer for each tile.
  173. Notes about MTXM:
  174. * The Width/Height of the map is measured in the number of square 32x32p tiles.
  175. * Tiles in this section are listed from left to right, top to bottom.
  176. * 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.
  177. * 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.
  178. * 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.
  179.  
  180.  
  181. =="PUNI" - Player Unit Restrictions==
  182. ''Required for all versions. Not required for Melee.''<br>
  183. ''Validation: Must be size of 5700 bytes.''
  184.  
  185. This section contains player unit restrictions: it indicates whether the player can or cannot build a particular unit.
  186. * '''u8[228][12]''': 1 byte for each unit in order of its unit id, then each player, for player availability:
  187. ** '''00''' - That unit is not available for production if the player has 'override defaults' on
  188. ** '''01''' - That unit is available for production if the player has 'override defaults' on
  189. * '''u8[228]''': 1 byte for each unit in order of it's unit id, for global availability defaults (for all players):
  190. ** '''00''' - That unit is not available for production
  191. ** '''01''' - That unit is available for production
  192. * '''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.
  193. ** '''00''' - Player overrides defaults for this unit
  194. ** '''01''' - Player uses defaults for this unit
  195.  
  196.  
  197. =="UPGR" - Upgrade Restrictions==
  198. ''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''<br>
  199. ''Validation: Must be size of 1748 bytes.''<br>
  200. ''In Brood War scenarios, this section is replaced by [[#"UPGx" - BW Upgrade Restrictions|"UPGx"]].''
  201.  
  202. This section contains player upgrade restrictions: it indicates the starting/maximum levels at/to which a player can perform a particular upgrade.
  203. * '''u8[46][12]''': 1 byte for the maximum level a player can upgrade to, in order of its upgrade id, then each player
  204. * '''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
  205. * '''u8[46]''': 1 byte for the global default maximum level of each upgrade, in order of its upgrade id.
  206. * '''u8[46]''': 1 byte for the global default starting level of each upgrade, in order of its upgrade id.
  207. * '''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:
  208. ** '''00''' - Player does not use global upgrade defaults for this upgrade
  209. ** '''01''' - Player uses upgrade defaults for this upgrade
  210. See [[#List of Upgrade IDs]].
  211.  
  212.  
  213. =="PTEC" - Tech Restrictions==
  214. ''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''<br>
  215. ''Validation: Must be size of 912 bytes.''<br>
  216. ''In Brood War scenarios, this section is replaced by [[#"PTEx" - BW Tech Restrictions|"PTEx"]].''
  217.  
  218. This section contains player technology availability restrictions: it indicates whether a player starts off with a particular technology or can research a particular technology.
  219. * '''u8[24][12]''': 1 byte for each technology id, then each player, for player availability:
  220. ** '''00''' - Technology is not available for a player
  221. ** '''01''' - Technology is available for a player
  222. * '''u8[24][12]''': 1 byte for each technology id, then each player, for "already researched" status:
  223. ** '''00''' - Technology is not already researched
  224. ** '''01''' - Technology is already researched
  225. * '''u8[24]''': 1 byte for each technology for global availability defaults:
  226. ** '''00''' - Technology is not available by default
  227. ** '''01''' - Technology is available by default
  228. * '''u8[24]''': 1 byte for each technology for global "already researched" defaults:
  229. ** '''00''' - Technology is not already researched by default
  230. ** '''01''' - Technology is already researched by default
  231. * '''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:
  232. ** '''00''' - Technology overrides defaults for player
  233. ** '''01''' - Technology uses default settings for player
  234. See [[#List of Technology IDs]].
  235.  
  236.  
  237. =="UNIT" - Placed Units==
  238. ''Required for all versions and all game types.''<br>
  239. ''Validation: Must be a multiple of 36 bytes.''
  240.  
  241. This section contains all the pre-placed units on the map and their properties. Each unit on the map gets the following structure:
  242. * '''u32''': The unit's class instance (sort of a "serial number")
  243. * U16''': X coordinate of unit
  244. * U16''': Y coordinate of unit
  245. * '''u16''': Unit ID
  246. * '''u16''': Type of relation to another building (i.e. add-on, nydus link)
  247. ** '''Bit 9''' - Nydus Link
  248. ** '''Bit 10''' - Addon Link
  249. * '''u16''': Flags of special properties which can be applied to the unit and are valid:
  250. ** '''Bit 0''' - Cloak is valid
  251. ** '''Bit 1''' - Burrow is valid
  252. ** '''Bit 2''' - In transit is valid
  253. ** '''Bit 3''' - Hallucinated is valid
  254. ** '''Bit 4''' - Invincible is valid
  255. ** '''Bit 5-15''' - Unused
  256. * '''u16''': Out of the elements of the unit data, the properties which can be changed by the map maker:
  257. ** '''Bit 0''' - Owner player is valid (the unit is not a critter, start location, etc.; not a neutral unit)
  258. ** '''Bit 1''' - HP is valid
  259. ** '''Bit 2''' - Shields is valid
  260. ** '''Bit 3''' - Energy is valid (unit is a wraith, etc.)
  261. ** '''Bit 4''' - Resource amount is valid (unit is a mineral patch, vespene geyser, etc.)
  262. ** '''Bit 5''' - Amount in hangar is valid (unit is a reaver, carrier, etc.)
  263. ** '''Bit 6-15''' - Unused
  264. * '''u8''': Player number of owner (0-based)
  265. * '''u8''': Hit points % (1-100)
  266. * '''u8''': Shield points % (1-100)
  267. * '''u8''': Energy points % (1-100)
  268. * '''u32''': Resource amount
  269. * '''u16''': Number of units in hangar
  270. * '''u16''': Unit state flags
  271. ** '''Bit 0''' - Unit is cloaked
  272. ** '''Bit 1''' - Unit is burrowed
  273. ** '''Bit 2''' - Building is in transit
  274. ** '''Bit 3''' - Unit is hallucinated
  275. ** '''Bit 4''' - Unit is invincible
  276. ** '''Bit 5-15''' - Unused
  277. * '''u32''': Unused
  278. * '''u32''': 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.
  279. Notes about UNIT:
  280. * The X/Y coordinates are the center of the sprite of the unit (in pixels).
  281. * Please edit if you could confirm the bit values to be correct/if you know more bit values.
  282. * Default values will apply if bit values are unchecked. Defaults: 100% HP, 100% SP, 100% EP, 0 resources, 0 hangar count.
  283. * This section can be split. Additional UNIT sections will add more units.
  284.  
  285.  
  286. =="ISOM" - Isometric Terrain==
  287. ''Not Required.''
  288.  
  289. 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).
  290. * '''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 "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.
  291. 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.
  292.  
  293.  
  294. =="TILE" - StarEdit Terrain==
  295. ''Not Required.''
  296.  
  297. This section will only be different from the [[#"MTXM" - StarCraft Terrain|MTXM]] section in tiles where doodads are present.
  298. * '''u16[ map width * height ]''': 1 integer for each map tile. Moves horizontally across the map.
  299. 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.
  300.  
  301.  
  302. =="DD2 " - StarEdit Sprites (Doodads)==
  303. ''Not Required.''
  304.  
  305. This section contains the doodad map of the level. There are several parts to doodads. The graphical portion is stored in the [[#"MTXM" - StarCraft Terrain|MTXM]] section. The second part of the doodad is stored in this section. This section is only used by the map editor.
  306.  
  307. Each doodad in the map gets the following structure:
  308. * '''u16''': Number of the doodad. Size of the doodad is dependent on this. Doodads are different for each tileset.
  309. * '''u16''': X coordinate of the doodad unit
  310. * '''u16''': Y coordinate of the doodad unit
  311. * '''u8''': Player number that owns the doodad
  312. * '''u8''': Enabled flag
  313. ** '''00''' - Doodad is enabled (trap can attack, door is closed, etc)
  314. ** '''01''' - Doodad is disabled
  315.  
  316.  
  317. =="THG2" - StarCraft Sprites==
  318. ''Required for all versions and all game types.''<br>
  319. ''Validation: Must be a multiple of 10 bytes.''
  320.  
  321. The map editor only writes to this section. Starcraft uses this section.
  322.  
  323. Sprites, usually on doodads, get the following structure.
  324. * '''u16''': Unit/Sprite number of the sprite
  325. * '''u16''': X coordinate of the doodad unit
  326. * '''u16''': Y coordinate of the doodad unit
  327. * '''u8''': Player number that owns the doodad
  328. * '''u8''': Unused
  329. * '''u16''': Flags
  330. ** '''Bit 0-11''' - Unused
  331. ** '''Bit 12''' - Draw as sprite (Determines if it is a sprite or a unit sprite)
  332. ** '''Bit 13''' - Unused
  333. ** '''Bit 14''' - Unused
  334. ** '''Bit 15''' - Disabled (Only valid if Draw as sprite is unchecked, disables the unit)
  335. This section can be split. Additional THG2 sections will add more sprites.
  336.  
  337.  
  338. =="MASK" - Fog of War Layer==
  339. ''Required for all versions. Not required for Melee.''<br>
  340. ''Validation: This section will always validate.''
  341.  
  342. 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.
  343. * '''u8[ map width * height ]''': One byte for each map tile. The bits indicate for each player the fog of war.
  344. ** '''Bit 0''' - Player 1's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.
  345. ** '''Bit 1''' - Player 2's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.
  346. ** '''Bit 2''' - Player 3's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.
  347. ** '''Bit 3''' - Player 4's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.
  348. ** '''Bit 4''' - Player 5's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.
  349. ** '''Bit 5''' - Player 6's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.
  350. ** '''Bit 6''' - Player 7's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.
  351. ** '''Bit 7''' - Player 8's Fog of War. If on, the tile is covered with fog. if off, the tile is visible.
  352. Any size greater than width*height will be ignored. Any size less will default missing tiles to 0xFF
  353.  
  354.  
  355. =="STR " - String Data==
  356. ''Required for all versions and all game types.''<br>
  357. ''Validation: Must be at least 1 byte.''
  358.  
  359. This section contains all the strings in the map.
  360. * '''u16''': Number of strings in the section (Default''': 1024)
  361. * '''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).
  362. * '''Strings''': After the offsets, this is where every string in the map goes, one after another. Each one is terminated by a null character.
  363. This section can contain more or less then 1024 string offsests and will work in Starcraft.<br>
  364. Note that STR sections can be stacked in a smiliar fashion as MTXM. The exact mechanisms of this are uncertain.
  365.  
  366.  
  367. =="UPRP" - CUWP Slots==
  368. ''Required for all versions. Not required for Melee.''<br>
  369. ''Validation: Must be size of 1280 bytes.''
  370.  
  371. 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.
  372.  
  373. There are 64 of the following structures regardless of how many are used and it cannot exceed 64.
  374. * '''u16''': Flag of which special properties can be applied to unit, and are valid.
  375. ** '''Bit 0''' - Cloak bit is valid
  376. ** '''Bit 1''' - Burrowed bit is valid
  377. ** '''Bit 2''' - In transit bit is valid
  378. ** '''Bit 3''' - Hallucinated bit is valid
  379. ** '''Bit 4''' - Invincible bit is valid
  380. ** '''Bit 5-15''' - Unknown/unused
  381. * '''u16''': Which elements of the unit data are valid, which properties can be changed by the map maker.
  382. ** '''Bit 0''' - Owner player is valid (unit is not neutral)
  383. ** '''Bit 1''' - HP is valid
  384. ** '''Bit 2''' - Shields is valid
  385. ** '''Bit 3''' - Energy is valid
  386. ** '''Bit 4''' - Resource amount is valid (unit is a resource)
  387. ** '''Bit 5''' - Amount in hanger is valid
  388. ** '''Bit 6''' - Unknown/unused
  389. * '''u8''': Player number that owns unit. Will always be NULL in this section (0)
  390. * '''u8''': Hit point % (1-100)
  391. * '''u8''': Shield point % (1-100)
  392. * '''u8''': Energy point % (1-100)
  393. * '''u32''': Resource amount (for resources only)
  394. * '''u16''': # of units in hangar
  395. * '''u16''': Flags
  396. ** '''Bit 0''' - Unit is cloaked
  397. ** '''Bit 1''' - Unit is burrowed
  398. ** '''Bit 2''' - Building is in transit
  399. ** '''Bit 3''' - Unit is hallucinated
  400. ** '''Bit 4''' - Unit is invincible
  401. ** '''Bit 5-15''' - Unknown/unused
  402. * '''u32''': Unknown/unused. Padding?
  403.  
  404.  
  405. =="UPUS" - CUWP Slots Used==
  406. ''Not Required.''
  407.  
  408. This section goes along with the "UPRP" section. This section just indicates which of the 64 unit properties slot are used.
  409. * '''u8[64]''': 1 byte for each trigger unit properties slot
  410. ** '''00''' - Properties slot is unused
  411. ** '''01''' - Properties slot is used
  412.  
  413.  
  414. =="MRGN" - Locations==
  415. ''Required for all versions. Not required for Melee.''<br>
  416. ''Validation: 1280 bytes for retail, 5100 bytes for Hybrid and Broodwar.''
  417.  
  418. 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.
  419.  
  420. Each location gets one of the following location entries. The 'Anywhere' location, is ALWAYS location 64.
  421. * '''u32''': Left (X1) coordinate of location, in pixels (usually 32 pt grid aligned)
  422. * '''u32''': Top (Y1) coordinate of location, in pixels
  423. * '''u32''': Right (X2) coordinate of location, in pixels
  424. * '''u32''': Bottom (Y2) coordinate of location, in pixels
  425. * '''u16''': String number of the name of this location
  426. * '''u16''': Location elevation flags. If an elevation is disabled in the location, it's bit will be on (1)
  427. ** '''Bit 0''' - Low elevation
  428. ** '''Bit 1''' - Medium elevation
  429. ** '''Bit 2''' - High elevation
  430. ** '''Bit 3''' - Low air
  431. ** '''Bit 4''' - Medium air
  432. ** '''Bit 5''' - High air
  433. ** '''Bit 6-15''' - Unused
  434. 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]].
  435.  
  436.  
  437. =="TRIG" - Triggers==
  438. ''Required for all versions. Not required for Melee.''<br>
  439. ''Validation: Must be a multiple of 2400 bytes.''
  440.  
  441. This section contains all the triggers in the map. This along with [[#"MBRF" - Mission Briefings|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.
  442. 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.
  443. Every single trigger in the map will have the following format:
  444. * 16 Conditions<br> 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.
  445. ** '''u32''': Location number for the condition (1 based -- 0 refers to No Location)
  446. ** '''u32''': [[#List of Players/Group IDs|Group]] that the condition applies to
  447. ** '''u32''': Qualified number (how many/resource amount)
  448. ** '''u16''': [[#Trigger Unit Types|Unit ID]] condition applies to
  449. ** '''u8''': [[#Numeric Comparisons|Numeric comparison]], [[#Switch States|switch state]]
  450. ** '''u8''': [[#Trigger Conditions List|Condition byte]]
  451. ** '''u8''': [[#Resource Types|Resource type]], [[#Score Types|score type]], Switch number (0-based)
  452. ** '''u8''': Flags
  453. *** '''Bit 0''' - Unknown/unused
  454. *** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled/ignored
  455. *** '''Bit 2''' - Always display flag.
  456. *** '''Bit 3''' - Unit properties is used. ('''Note:''' This is used in [[TRG|*.trg]] files)
  457. *** '''Bit 4''' - Unit type is used. May not be necessary?
  458. *** '''Bit 5''' - If on, the unit ID is used. Unnecessary.
  459. *** '''Bit 6-7''' - Unknown/unused
  460. ** '''u16''': Used internally by starcraft (number of which condition to process next, and maybe more?)
  461. * 64 Actions<br> 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.
  462. ** '''u32''': 'Source' or only location (1 based -- 0 refers to No Location)
  463. ** '''u32''': String number for trigger text (0 means no string)
  464. ** '''u32''': WAV string number (0 means no string)
  465. ** '''u32''': Seconds/milliseconds of time
  466. ** '''u32''': First (or only) [[#List of Players/Group IDs|Group/Player]] affected.
  467. ** '''u32''': Second group affected, destination location (1-based), CUWP #, number, AI script (4-byte string), switch (0-based #)
  468. ** '''u16''': [[#Trigger Unit Types|Unit type]], [[#Score Types|score type]], [[#Resource Types|resource type]], [[#Alliance Statuses|alliance status]]
  469. ** '''u8''': [[#Trigger Actions List|Action byte]]
  470. ** '''u8''': Number of units (0 means All Units), [[#Action States|action state]], [[#Unit Orders|unit order]], [[#Number Modifiers|number modifier]]
  471. ** '''u8''': Flags
  472. *** '''Bit 0''' - Ignore a wait/transmission once.
  473. *** '''Bit 1''' - Enabled flag. If on, the trigger action/condition is disabled.
  474. *** '''Bit 2''' - Always display flag.
  475. *** '''Bit 3''' - Unit properties is used. Staredit uses this for *.trg files.
  476. *** '''Bit 4''' - Unit type is used.
  477. *** '''Bit 5''' - If on, the unit ID is used. Unnecessary.
  478. *** '''Bit 6-7''' - Unknown/unused
  479. ** '''u24 (3 bytes)''': Used internally by starcraft (number of which action to process next, and maybe more?)
  480. * Player Execution<br> Following the 16 conditions and 64 actions, every trigger also has this structure
  481. ** '''u32''': execution flags
  482. *** '''Bit 0''' - All conditions are met, executing actions, cleared on the next trigger loop.
  483. *** '''Bit 1''' - Ignore the following actions: Defeat, Draw.
  484. *** '''Bit 2''' - Preserve trigger. (Can replace Preserve Trigger action)
  485. *** '''Bit 3''' - Ignore execution.
  486. *** '''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.
  487. *** '''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?
  488. *** '''Bit 6''' - Wait skipping disabled for this trigger, cleared on next trigger loop.
  489. *** '''Bit 7-31''' - Unknown/unused
  490. ** '''u8[28]''': 1 byte for each player in the [[#List of Players/Group IDs]]
  491. *** '''00''' - Trigger is not executed for player
  492. *** '''01''' - Trigger is executed for player
  493. This section can be split. Additional TRIG sections will add more triggers.
  494.  
  495.  
  496. =="MBRF" - Mission Briefings==
  497. ''Required for all versions. Not required for Melee.''<br>
  498. ''Validation: Must be a multiple of 2400 bytes.''
  499.  
  500. This section contains all of the mission briefings shown by the players.
  501.  
  502. See [[#"TRIG" - Triggers|"TRIG"]] 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.
  503.  
  504. This section can be split. Additional MBRF sections will add more briefing triggers.
  505.  
  506.  
  507. =="SPRP" - Scenario Properties==
  508. ''Required for all versions and all game types.''<br>
  509. ''Validation: Must be size of 4 bytes.''
  510.  
  511. * '''u16''': String number of the scenario name
  512. * '''u16''': String number of the scenarios description.
  513. 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.
  514.  
  515.  
  516. =="FORC" - Force Settings==
  517. ''Required for all versions and all game types.''<br>
  518. ''Validation: Must be less than or equal to 20 bytes.''
  519.  
  520. This section specifies the forces and the information about them.
  521. * '''u8[8]''': 1 byte for each active player, specifying which of the 4 forces (0-based) that the player's on
  522. * '''u16[4]''': 1 integer for each force, string number of the name of the force
  523. * '''u8[4]''': 1 byte for each force specifying the properties:
  524. ** '''Bit 0''' - Random start location
  525. ** '''Bit 1''' - Allies
  526. ** '''Bit 2''' - Allied victory
  527. ** '''Bit 3''' - Shared vision
  528. ** '''Bit 4-7''' - Unused
  529. Notes about FORC:
  530. * If there is no string specified for a force name, it will default to a "Force #" string.
  531. * If this section is less than 20 bytes, the remaining bytes are defaulted to 0.
  532. * Players can be on a force greater than 4, however they will not appear in the game lobby.
  533.  
  534.  
  535. =="WAV " - WAV String Indexes==
  536. ''Not Required.''
  537.  
  538. There are 512 wav entires regardless of how many are actually used.
  539. * '''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.
  540.  
  541.  
  542. =="UNIS" - Unit Settings==
  543. ''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''<br>
  544. ''Validation: Must be size of 4048 bytes.''<br>
  545. ''In Brood War scenarios, this section is replaced by [[#"UNIx" - BW Unit Settings|"UNIx"]].''
  546.  
  547. This section contains the unit settings for the level:
  548. * '''u8[228]''': 1 byte for each unit, in order of Unit ID
  549. ** '''00''' - Unit does not use default settings
  550. ** '''01''' - Unit does use default settings
  551. * '''u32[228]''': Hit points for unit (Note the displayed value is this value / 256, with the low byte being a fractional HP value)
  552. * '''u16[228]''': Shield points, in order of Unit ID
  553. * '''u8[228]''': Armor points, in order of Unit ID
  554. * '''u16[228]''': Build time (1/60 seconds), in order of Unit ID
  555. * '''u16[228]''': Mineral cost, in order of Unit ID
  556. * '''u16[228]''': Gas cost, in order of Unit ID
  557. * '''u16[228]''': String number, in order of Unit ID
  558. * '''u16[228]''': Base weapon damage the weapon does, in weapon ID order ([[#List of Unit Weapon IDs]])
  559. * '''u16[228]''': Upgrade bonus weapon damage, in weapon ID order
  560.  
  561.  
  562. =="UPGS" - Upgrade Settings==
  563. ''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''<br>
  564. ''Validation: Must be size of 598 bytes.''<br>
  565. ''In Brood War scenarios, this section is replaced by [[#"UPGx" - BW Upgrade Settings|"UPGx"]].''
  566.  
  567. This section contains upgrade settings:
  568. * '''u8[46]''': 1 byte per each upgrade, in order of upgrade id.
  569. ** '''00''' - Upgrade uses custom settings
  570. ** '''01''' - Upgrade uses default settings
  571. * '''u16[46]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.
  572. * '''u16[46]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.
  573. * '''u16[46]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.
  574. * '''u16[46]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.
  575. * '''u16[46]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.
  576. * '''u16[46]''': 1 integer per upgrade, gas time factor for each upgrade, in order of upgrade id.
  577. See [[#List of Upgrade IDs]] for upgrade ids.
  578.  
  579.  
  580. =="TECS" - Tech Settings==
  581. ''Required for Vanilla and Hybrid (in Original mode). Not required for Melee.''<br>
  582. ''Validation: Must be size of 216 bytes.''<br>
  583. ''In Brood War scenarios, this section is replaced by [[#"TECx" - BW Tech Settings|"TECx"]].''
  584.  
  585. This section contains technology/special abilities settings:
  586. * '''u8[24]''': 1 byte per each technology, specifies if the tech overrides the default settings. In order of technology id
  587. ** '''00''' - Technology uses custom settings
  588. ** '''01''' - Technology uses default settings
  589. * '''u16[24]''': Mineral cost to develop technology. In order of technology id.
  590. * '''u16[24]''': Gas cost to develop technology. In order of technology id.
  591. * '''u16[24]''': Time required to develop technology. In order of technology id.
  592. * '''u16[24]''': Energy cost to cast technology/special ability. In order of technology id.
  593. See [[#List of Technology IDs]] for technology ids.
  594.  
  595.  
  596. =="SWNM" - Switch Names==
  597. ''Not Required.''
  598.  
  599. This section contains the strings used for each switch. There are 256 switches, and can't be any more or any less.
  600. * '''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.
  601.  
  602.  
  603. =="COLR" - Player Colors==
  604. ''Required for Brood War only and all game types.''<br>
  605. ''Validation: Must be size of 8 bytes.''
  606.  
  607. This section indicates what color each player is, but only has effect on Brood War.
  608. * '''u8[8]''': 1 byte for each player, indicates the color of the player
  609. ** '''00''' - Red
  610. ** '''01''' - Blue
  611. ** '''02''' - Teal
  612. ** '''03''' - Purple
  613. ** '''04''' - Orange
  614. ** '''05''' - Brown
  615. ** '''06''' - White
  616. ** '''07''' - Yellow
  617. ** '''08''' - Green
  618. ** '''09''' - Pale yellow
  619. ** '''10''' - Tan
  620. ** '''11''' - Azure (Neutral color)
  621. Other values can be used but may have different results depending on the tileset. Any color value above 11 is an overflow.
  622.  
  623.  
  624. =="PUPx" - BW Upgrade Restrictions==
  625. ''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''<br>
  626. ''Validation: Must be size of 2318 bytes.''<br>
  627. ''In Brood War scenarios this section replaces [[#"UPGR" - Upgrade Restrictions|"UPGR"]].''
  628.  
  629. This section is identical to UPGR section except it uses the Brood War set of 61 upgrades instead of the original 46.
  630.  
  631.  
  632. =="PTEx" - BW Tech Restrictions==
  633. ''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''<br>
  634. ''Validation: Must be size of 1672 bytes.''<br>
  635. ''In Brood War scenarios this section replaces [[#"PTEC" - Tech Restrictions|"PTEC"]].''
  636.  
  637. This section is identical to PTEC section except it uses the Brood War set of 44 technologies instead of the original 24.
  638.  
  639.  
  640. =="UNIx" - BW Unit Settings==
  641. ''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''<br>
  642. ''Validation: Must be size of 4168 bytes.''<br>
  643. ''In Brood War scenarios this section replaces [[#"UNIS" - Unit Settings|"UNIS"]].''
  644.  
  645. This section is indentical to UNIS section except it uses the Brood War set of 130 weapons instead of the original 100.
  646.  
  647.  
  648. =="UPGx" - BW Upgrade Settings==
  649. ''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''<br>
  650. ''Validation: Must be size of 794 bytes.''<br>
  651. ''In Brood War scenarios this section replaces [[#"UPGS" - Upgrade Settings|"UPGS"]].''
  652.  
  653. 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:
  654. * '''u8[61]''': 1 byte per each upgrade, in order of upgrade id.
  655. ** '''00''' - Upgrade uses custom settings
  656. ** '''01''' - Upgrade uses default settings
  657. * '''u8''': Unused.
  658. * '''u16[61]''': 1 integer per upgrade, base mineral cost for each upgrade, in order of upgrade id.
  659. * '''u16[61]''': 1 integer per upgrade, mineral cost factor for each upgrade, in order of upgrade id.
  660. * '''u16[61]''': 1 integer per upgrade, base gas cost for each upgrade, in order of upgrade id.
  661. * '''u16[61]''': 1 integer per upgrade, gas cost factor for each upgrade, in order of upgrade id.
  662. * '''u16[61]''': 1 integer per upgrade, base time for each upgrade, in order of upgrade id.
  663. * '''u16[61]''': 1 integer per upgrade, gas time factor for each upgrade, in order of upgrade id.
  664.  
  665.  
  666. =="TECx" - BW Tech Settings==
  667. ''Required for Hybrid (in Expansion mode) and Brood War. Not required for Melee.''<br>
  668. ''Validation: Must be size of 396 bytes.''<br>
  669. ''In Brood War scenarios this section replaces [[#"TECS" - Tech Settings|"TECS"]].''
  670.  
  671. This section is indentical to UNIS section except it uses the Brood War set of 44 technologies instead of the original 24.
  672.  
  673.  
  674.  
  675.  
  676. =Appendix=
  677. A set of references and IDs that should help you easier in the trigger section and the technology/player ids, etc:
  678.  
  679. ==Trigger Conditions List==
  680. * 0 = No Condition
  681. * 1 = Countdown Timer(Comparison, QNumber)
  682. * 2 = Command(Player, Comparison, TUnit, QNumber)
  683. * 3 = Bring(Player, Comparison, TUnit, Loc, QNumber)
  684. * 4 = Accumulate(Player, Comparison, QNumber, ResType)
  685. * 5 = Kill(Player, Comparison, TUnit, QNumber)
  686. * 6 = Command the Most(TUnit)
  687. * 7 = Commands the Most At(TUnit, Loc)
  688. * 8 = Most Kills(TUnit)
  689. * 9 = Highest Score(Score)
  690. * 10 = Most Resources(ResType)
  691. * 11 = Switch(Switch)
  692. * 12 = Elapsed Time(Comparison, QNumber)
  693. * 13 = Data is a Mission Briefing. Conditions are N/A (Same as Never)
  694. * 14 = Opponents(Player, Comparison, QNumber)
  695. * 15 = Deaths(Player, Comparison, TUnit, QNumber)
  696. * 16 = Command the Least(TUnit)
  697. * 17 = Command the Least At(TUnit, Loc)
  698. * 18 = Least Kills(TUnit)
  699. * 19 = Lowest Score(Score)
  700. * 20 = Least Resources(ResType)
  701. * 21 = Score(Player, Comparison, Score, QNumber)
  702. * 22 = Always (Same as No Condition)
  703. * 23 = Never
  704.  
  705. ==Trigger Actions List==
  706. * 0 = No Action
  707. * 1 = Victory
  708. * 2 = Defeat
  709. * 3 = Preserve Trigger
  710. * 4 = Wait(Time)
  711. * 5 = Pause Game (Single player only)
  712. * 6 = Unpause Game (Single player only)
  713. * 7 = Transmission(Text, Unit, Loc, Time, Modifier, Wave, WavTime)
  714. * 8 = Play WAV(Wav, WavTime)
  715. * 9 = Display Text Message(Text)
  716. * 10 = Center View(Loc)
  717. * 11 = Create Unit with Properties(Player, Unit, Number, Loc, UnitProp)
  718. * 12 = Set Mission Objectives(Text)
  719. * 13 = Set Switch(Switch, SwAction)
  720. * 14 = Set Countdown Timer(Time, Modifier)
  721. * 15 = Run AI Script(AIScript)
  722. * 16 = Run AI Script At Location(AIScript)
  723. * 17 = Leader Board (Control) (Text, TUnit)
  724. * 18 = Leader Board (Control At Location) (Text, TUnit, Loc)
  725. * 19 = Leader Board (Resources) (Text, ResType)
  726. * 20 = Leader Board (Kills) (Text, TUnit)
  727. * 21 = Leader Board (Points) (Text, Score)
  728. * 22 = Kill Unit (Player, TUnit)
  729. * 23 = Kill Unit At Location(Player, TUnit, Number, Loc)
  730. * 24 = Remove Unit(Player, TUnit)
  731. * 25 = Remove Unit At Location(Player, TUnit, Number, Loc)
  732. * 26 = Set Resources(Player, Number, Modifier, ResType)
  733. * 27 = Set Score(Player, Number, Modifier, Score)
  734. * 28 = Minimap Ping(Loc)
  735. * 29 = Talking Portrait(Unit, Time)
  736. * 30 = Mute Unit Speech
  737. * 31 = Unmute Unit Speech
  738. * 32 = Leaderboard Computer Players(State)
  739. * 33 = Leaderboard Goal (Control) (Text, TUnit, Number)
  740. * 34 = Leaderboard Goal (Control At Location) (Text, TUnit, Number, Loc)
  741. * 35 = Leaderboard Goal (Resources) (Text, TUnit, Number, ResType)
  742. * 36 = Leaderboard Goal (Kills) (Text, TUnit, Number)
  743. * 37 = Leaderboard Goal (Points) (Text, Number, Score)
  744. * 38 = Move Location(Player, TUnit, SLoc, DLoc)
  745. * 39 = Move Unit(Player, TUnit, Number, SLoc, DLoc)
  746. * 40 = Leaderboard (Greed) (Number)
  747. * 41 = Set Next Scenario(Text) (Single player only)
  748. * 42 = Set Doodad State(Player, TUnit, Loc, State)
  749. * 43 = Set Invincibility(Player, TUnit, Loc, State)
  750. * 44 = Create Unit(Player, Unit, Number, Loc)
  751. * 45 = Set Deaths(Player, TUnit, Number, Modifier)
  752. * 46 = Order(Player, TUnit, SLoc, DLoc, Order)
  753. * 47 = Comment(Text)
  754. * 48 = Give Units to Player(SPlayer, DPlayer, TUnit, Number, Loc)
  755. * 49 = Modify Unit Hit Points(Player, TUnit, Number, ModAmount, Loc)
  756. * 50 = Modify Unit Energy(Player, TUnit, Number, ModAmount, Loc)
  757. * 51 = Modify Unit Shield Points(Player, TUnit, Number, ModAmount, Loc)
  758. * 52 = Modify Unit Resource Amount(Player, Number, ModAmount, Loc)
  759. * 53 = Modify Unit Hanger Count(Player, TUnit, Number, ModAmount, Loc)
  760. * 54 = Pause Timer
  761. * 55 = Unpause Timer
  762. * 56 = Draw
  763. * 57 = Set Alliance Status(Player, AllyStatus)
  764. * 58 = Disable Debug Mode (Single player only)
  765. * 59 = Enable Debug Mode (Single player only)
  766.  
  767. ==Mission Briefing Actions List==
  768. * 0 - No Action
  769. * 1 - Wait(Time)
  770. * 2 - Play WAV(Wave, WavTime)
  771. * 3 - Text Message(Text, Time)
  772. * 4 - Mission Objectives(Text)
  773. * 5 - Show Portrait(Unit, Slot)
  774. * 6 - Hide Portrait(Slot)
  775. * 7 - Display Speaking Portrait(Slot, Time)
  776. * 8 - Transmission(Text, Slot, Time, Modifier, Wave, WavTime)
  777. * 9 - Skip Tutorial Enabled
  778.  
  779. ==Switch States==
  780. * 2 = Switch is set
  781. * 3 = Switch is cleared
  782.  
  783. ==Numeric Comparisons==
  784. * 0 = At least
  785. * 1 = At most
  786. * 10 = Exactly
  787.  
  788. ==Score Types==
  789. * 0 = Total
  790. * 1 = Units
  791. * 2 = Buildings
  792. * 3 = Units and Buildings
  793. * 4 = Kills
  794. * 5 = Razings
  795. * 6 = Kills and Razings
  796. * 7 = Custom
  797.  
  798. ==Resource Types==
  799. * 0 = Ore
  800. * 1 = Gas
  801. * 2 = Ore and Gas
  802.  
  803. ==Alliance Statuses==
  804. * 0 = Enemy
  805. * 1 = Ally
  806. * 2 = Allied Victory
  807.  
  808. ==Unit Orders==
  809. * 0 = Move
  810. * 1 = Patrol
  811. * 2 = Attack
  812.  
  813. ==Action States==
  814. * 4 = Enabled/Set switch
  815. * 5 = Disabled/Clear switch
  816. * 6 = Toggle/Toggle switch
  817. * 11 = Randomize switch
  818.  
  819. ==Number Modifiers==
  820. * 7 = Set to
  821. * 8 = Add
  822. * 9 = Subtract
  823.  
  824. ==Trigger Unit Types==
  825. * All normal units (0-227)
  826. * 228 = None
  827. * 229 = Any unit
  828. * 230 = Men
  829. * 231 = Buildings
  830. * 232 = Factories
  831.  
  832. ==List of Players/Group IDs==
  833. * 0 = Player 1
  834. * 1 = Player 2
  835. * 2 = Player 3
  836. * 3 = Player 4
  837. * 4 = Player 5
  838. * 5 = Player 6
  839. * 6 = Player 7
  840. * 7 = Player 8
  841. * 8 = Player 9
  842. * 9 = Player 10
  843. * 10 = Player 11
  844. * 11 = Player 12
  845. * 12 = None (Unused, One-entry Overflow in some cases)
  846. * 13 = Current Player
  847. * 14 = Foes
  848. * 15 = Allies
  849. * 16 = Neutral Players
  850. * 17 = All Players
  851. * 18 = Force 1
  852. * 19 = Force 2
  853. * 20 = Force 3
  854. * 21 = Force 4
  855. * 22 = Unused 1
  856. * 23 = Unused 2
  857. * 24 = Unused 3
  858. * 25 = Unused 4
  859. * 26 = Non Allied Victory Players
  860.  
  861. ==List of Technology IDs==
  862. * 0 = Stim Packs
  863. * 1 = Lockdown
  864. * 2 = EMP Shockwave
  865. * 3 = Spider Mines
  866. * 4 = Scanner Sweep
  867. * 5 = Siege Mode
  868. * 6 = Defensive Matrix
  869. * 7 = Irradiate
  870. * 8 = Yamato Gun
  871. * 9 = Cloaking Field
  872. * 10 = Personnel Cloaking
  873. * 11 = Burrowing
  874. * 12 = Infestation
  875. * 13 = Spawn Broodling
  876. * 14 = Dark Swarm
  877. * 15 = Plague
  878. * 16 = Consume
  879. * 17 = Ensnare
  880. * 18 = Parasite
  881. * 19 = Psionic Storm
  882. * 20 = Hallucination
  883. * 21 = Recall
  884. * 22 = Stasis Field
  885. * 23 = Archon Warp
  886. * 24 = Restoration
  887. * 25 = Disruption Web
  888. * 26 = Unused 26
  889. * 27 = Mind Control
  890. * 28 = Dark Archon Meld
  891. * 29 = Feedback
  892. * 30 = Optical Flare
  893. * 31 = Maelstorm
  894. * 32 = Lurker Aspect
  895. * 33 = Unused 33
  896. * 34 = Healing
  897. * 35 = Unused 35
  898. * 36 = Unused 36
  899. * 37 = Unused 37
  900. * 38 = Unused 38
  901. * 39 = Unused 39
  902. * 40 = Unused 40
  903. * 41 = Unused 41
  904. * 42 = Unused 42
  905. * 43 = Unused 43
  906.  
  907. ==List of Upgrade IDs==
  908. * 0 = Terran Infantry Armor
  909. * 1 = Terran Vehicle Plating
  910. * 2 = Terran Ship Plating
  911. * 3 = Zerg Carapace
  912. * 4 = Zerg Flyer Caparace
  913. * 5 = Protoss Armor
  914. * 6 = Protoss Plating
  915. * 7 = Terran Infantry Weapons
  916. * 8 = Terran Vehicle Weapons
  917. * 9 = Terran Ship Weapons
  918. * 10 = Zerg Melee Attacks
  919. * 11 = Zerg Missile Attacks
  920. * 12 = Zerg Flyer Attacks
  921. * 13 = Protoss Ground Weapons
  922. * 14 = Protoss Air Weapons
  923. * 15 = Protoss Plasma Shields
  924. * 16 = U-238 Shells
  925. * 17 = Ion Thrusters
  926. * 18 = Burst Lasers (Unused)
  927. * 19 = Titan Reactor (SV +50)
  928. * 20 = Ocular Implants
  929. * 21 = Moebius Reactor (Ghost +50)
  930. * 22 = Apollo Reactor (Wraith +50)
  931. * 23 = Colossus Reactor (BC +50)
  932. * 24 = Ventral Sacs
  933. * 25 = Antennae
  934. * 26 = Pneumatized Carapace
  935. * 27 = Metabolic Boost
  936. * 28 = Adrenal Glands
  937. * 29 = Muscular Augments
  938. * 30 = Grooved Spines
  939. * 31 = Gamete Meiosis (Queen +50)
  940. * 32 = Metasynaptic Node (Defiler +50)
  941. * 33 = Singularity Charge
  942. * 34 = Leg Enhancements
  943. * 35 = Scarab Damage
  944. * 36 = Reaver Capacity
  945. * 37 = Gravitic Drive
  946. * 38 = Sensor Array
  947. * 39 = Gravitic Boosters
  948. * 40 = Khaydarin Amulet (HT +50)
  949. * 41 = Apial Sensors
  950. * 42 = Gravitic Thrusters
  951. * 43 = Carrier Capacity
  952. * 44 = Khaydarin Core (Arbiter +50)
  953. * 45 = Unknown Upgrade45
  954. * 46 = Unknown Upgrade46
  955. * 47 = Argus Jewel (Corsair +50)
  956. * 48 = Unknown Upgrade48
  957. * 49 = Argus Talisman (DA +50)
  958. * 50 = Unknown Upgrade50
  959. * 51 = Caduceus Reactor (Medic +50)
  960. * 52 = Chitinous Plating
  961. * 53 = Anabolic Synthesis
  962. * 54 = Charon Booster
  963. * 55 = Unknown Upgrade55
  964. * 56 = Unknown Upgrade56
  965. * 57 = Unknown Upgrade57
  966. * 58 = Unknown Upgrade58
  967. * 59 = Unknown Upgrade59
  968. * 60 = Unknown Upgrade60
  969.  
  970. ==List of Unit Weapon IDs==
  971. * 0 = Gauss Rifle (Normal)
  972. * 1 = Gauss Rifle (Jim Raynor-Marine)
  973. * 2 = C-10 Concussion Rifle (Normal)
  974. * 3 = C-10 Concussion Rifle (Sarah Kerrigan)
  975. * 4 = Fragmentation Grenade (Normal)
  976. * 5 = Fragmentation Grenade (Jim Raynor-Vulture)
  977. * 6 = Spider Mines
  978. * 7 = Twin Autocannons (Normal)
  979. * 8 = Hellfire Missile Pack (Normal)
  980. * 9 = Twin Autocannons (Alan Schezar)
  981. * 10 = Hellfire Missile Pack (Alan Schezar)
  982. * 11 = Arclite Cannon (Normal)
  983. * 12 = Arclite Cannon (Edmund Duke)
  984. * 13 = Fusion Cutter
  985. * 14 = Fusion Cutter (Harvest)
  986. * 15 = Gemini Missiles (Normal)
  987. * 16 = Burst Lasers (Normal)
  988. * 17 = Gemini Missiles (Tom Kazansky)
  989. * 18 = Burst Lasers (Tom Kazansky)
  990. * 19 = ATS Laser Battery (Normal)
  991. * 20 = ATA Laser Battery (Normal)
  992. * 21 = ATS Laser Battery (Norad II+Mengsk+DuGalle)
  993. * 22 = ATA Laser Battery (Norad II+Mengsk+DuGalle)
  994. * 23 = ATS Laser Battery (Hyperion)
  995. * 24 = ATA Laser Battery (Hyperion)
  996. * 25 = Flame Thrower (Normal)
  997. * 26 = Flame Thrower (Gui Montag)
  998. * 27 = Arclite Shock Cannon (Normal)
  999. * 28 = Arclite Shock Cannon (Edmund Duke)
  1000. * 29 = Longbolt Missiles
  1001. * 30 = Yamato Gun
  1002. * 31 = Nuclear Missile
  1003. * 32 = Lockdown
  1004. * 33 = EMP Shockwave
  1005. * 34 = Irradiate
  1006. * 35 = Claws (Normal)
  1007. * 36 = Claws (Devouring One)
  1008. * 37 = Claws (Infested Kerrigan)
  1009. * 38 = Needle Spines (Normal)
  1010. * 39 = Needle Spines (Hunter Killer)
  1011. * 40 = Kaiser Blades (Normal)
  1012. * 41 = Kaiser Blades (Torrasque)
  1013. * 42 = Toxic Spores (Broodling)
  1014. * 43 = Spines
  1015. * 44 = Spines (Harvest)
  1016. * 45 = Acid Spray (Unused)
  1017. * 46 = Acid Spore (Normal)
  1018. * 47 = Acid Spore (Kukulza-Guardian)
  1019. * 48 = Glave Wurm (Normal)
  1020. * 49 = Glave Wurm (Kukulza-Mutalisk)
  1021. * 50 = Venom (Unused-Defiler)
  1022. * 51 = Venom (Unused-Defiler Hero)
  1023. * 52 = Seeker Spores
  1024. * 53 = Subterranean Tentacle
  1025. * 54 = Suicide (Infested Terran)
  1026. * 55 = Suicide (Scourge)
  1027. * 56 = Parasite
  1028. * 57 = Spawn Broodlings
  1029. * 58 = Ensnare
  1030. * 59 = Dark Swarm
  1031. * 60 = Plague
  1032. * 61 = Consume
  1033. * 62 = Particle Beam
  1034. * 63 = Particle Beam (Harvest)
  1035. * 64 = Psi Blades (Normal)
  1036. * 65 = Psi Blades (Fenix-Zealot)
  1037. * 66 = Phase Disruptor (Normal)
  1038. * 67 = Phase Disruptor (Fenix-Dragoon)
  1039. * 68 = Psi Assault (Normal-Unused)
  1040. * 69 = Psi Assault (Tassadar+Aldaris)
  1041. * 70 = Psionic Shockwave (Normal)
  1042. * 71 = Psionic Shockwave (Tassadar/Zeratul Archon)
  1043. * 72 = Unknown72
  1044. * 73 = Dual Photon Blasters (Normal)
  1045. * 74 = Anti-matter Missiles (Normal)
  1046. * 75 = Dual Photon Blasters (Mojo)
  1047. * 76 = Anit-matter Missiles (Mojo)
  1048. * 77 = Phase Disruptor Cannon (Normal)
  1049. * 78 = Phase Disruptor Cannon (Danimoth)
  1050. * 79 = Pulse Cannon
  1051. * 80 = STS Photon Cannon
  1052. * 81 = STA Photon Cannon
  1053. * 82 = Scarab
  1054. * 83 = Stasis Field
  1055. * 84 = Psi Storm
  1056. * 85 = Warp Blades (Zeratul)
  1057. * 86 = Warp Blades (Dark Templar Hero)
  1058. * 87 = Missiles (Unused)
  1059. * 88 = Laser Battery1 (Unused)
  1060. * 89 = Tormentor Missiles (Unused)
  1061. * 90 = Bombs (Unused)
  1062. * 91 = Raider Gun (Unused)
  1063. * 92 = Laser Battery2 (Unused)
  1064. * 93 = Laser Battery3 (Unused)
  1065. * 94 = Dual Photon Blasters (Unused)
  1066. * 95 = Flechette Grenade (Unused)
  1067. * 96 = Twin Autocannons (Floor Trap)
  1068. * 97 = Hellfire Missile Pack (Wall Trap)
  1069. * 98 = Flame Thrower (Wall Trap)
  1070. * 99 = Hellfire Missile Pack (Floor Trap)
  1071. * 100 = Neutron Flare
  1072. * 101 = Disruption Web
  1073. * 102 = Restoration
  1074. * 103 = Halo Rockets
  1075. * 104 = Corrosive Acid
  1076. * 105 = Mind Control
  1077. * 106 = Feedback
  1078. * 107 = Optical Flare
  1079. * 108 = Maelstrom
  1080. * 109 = Subterranean Spines
  1081. * 110 = Gauss Rifle0 (Unused)
  1082. * 111 = Warp Blades (Normal)
  1083. * 112 = C-10 Concussion Rifle (Samir Duran)
  1084. * 113 = C-10 Concussion Rifle (Infested Duran)
  1085. * 114 = Dual Photon Blasters (Artanis)
  1086. * 115 = Anti-matter Missiles (Artanis)
  1087. * 116 = C-10 Concussion Rifle (Alexei Stukov)
  1088. * 117 = Gauss Rifle1 (Unused)
  1089. * 118 = Gauss Rifle2 (Unused)
  1090. * 119 = Gauss Rifle3 (Unused)
  1091. * 120 = Gauss Rifle4 (Unused)
  1092. * 121 = Gauss Rifle5 (Unused)
  1093. * 122 = Gauss Rifle6 (Unused)
  1094. * 123 = Gauss Rifle7 (Unused)
  1095. * 124 = Gauss Rifle8 (Unused)
  1096. * 125 = Gauss Rifle9 (Unused)
  1097. * 126 = Gauss Rifle10 (Unused)
  1098. * 127 = Gauss Rifle11 (Unused)
  1099. * 128 = Gauss Rifle12 (Unused)
  1100. * 129 = Gauss Rifle13 (Unused)
  1101. * 130 = None
  1102.  
  1103. ==Complete Modifier List==
  1104. * 0 = Condition: >= (greater than or equal to)
  1105. * 1 = Condition: <= (less than or equal to)
  1106. * 2 = Condition: == TRUE (Is True)
  1107. * 3 = Condition: == FALSE (Is False)
  1108. * 4 = Action: = TRUE (Set to True)
  1109. * 5 = Action: = FALSE (Set to False)
  1110. * 6 = Action: NOT (toggle)
  1111. * 7 = Action: = (Set to)
  1112. * 8 = Action: += (Add)
  1113. * 9 = Action: -= (Subtract)
  1114. * 10 = Condition: == (Exactly)
  1115. * 11 = Action: Randomize
  1116.  
  1117. [[Category:StarCraft]]
  1118. [[Category:Reference]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement