scmJS docs

UNIx

UNIS for Brood War: the same tables, with 130 weapons.

Name UNIx (55 4E 49 78)
Size 4168 bytes.
Read by The game.
Required In a hybrid or Brood War file (VER 63 and up).
More than one copy Only the last copy counts.
In scmJS Read, and written again when you change what it holds.

Layout:

Offset Type Holds
0 u8 × 228 Per unit type: 1 to use the game's own values and ignore the rest of this section
228 u32 × 228 Hit points × 256
1140 u16 × 228 Shields
1596 u8 × 228 Armour
1824 u16 × 228 Build time, in game frames
2280 u16 × 228 Mineral cost
2736 u16 × 228 Gas cost
3192 u16 × 228 Name, a string number; 0 for the default name
3648 u16 × 130 Per weapon: base damage
3908 u16 × 130 Per weapon: damage added by each upgrade level

Example#

Each column is one value per unit type, so a unit type's values are spread across the section: its entry in each column is at the column's offset plus the unit type times the column's width. A Carrier (unit type 72) given 400 hit points and a new cost:

  72  00           does not use the game's own values
 516  00 90 01 00  hit points 102400 = 400 × 256
1284  96 00        shields 150
1668  04           armour 4
1968  34 08        build time 2100 frames
2424  2C 01        300 minerals
2880  C8 00        200 gas
3336  00 00        the game's own name

The first byte is what makes the rest count: while it is 1, the game uses its own values for the unit type and ignores the other columns. UNIS is laid out the same way with 100 weapons instead of 130, so every column is at the same offset except the last, the damage each upgrade adds.