UPRP
The 64 unit properties slots used by the Create Unit with
Properties action. A slot is laid out as a
UNIT record's properties are, and each field or state is only applied when its
bit is set, so a slot can set the hit points alone.
The game copies the section as it is and checks nothing until a unit is made from a slot. Then it keeps only the low 16 bits of the resources and the low byte of the hangar count, and makes a unit cloaked or burrowed only if its owner has the ability that allows it. A plain Create Unit uses a slot too, when its action holds a slot number from 1 to 64 where Create Unit with Properties keeps it. Any other number, in either action, means no slot. (Checked against 1.16.1.)
| Name | UPRP (55 50 52 50) |
|---|---|
| Size | 1280 bytes: 64 slots of 20. |
| Read by | The game, at the start of a Use Map Settings game. Melee and the other game types never read it. |
| Required | For Use Map Settings. Without it a Use Map Settings game stops at the start with Error loading scenario file. Melee and the other game types play without it. |
| The game accepts | Exactly 1280 bytes. Any other length refuses the map. |
| More than one copy | The last copy replaces the others. Every copy must still be the right size, or the map is refused. |
| In scmJS | Read, and written again when you change what it holds. |
Each slot:
| Offset | Type | Holds |
|---|---|---|
| 0 | u16 | Which special states the slot sets (below) |
| 2 | u16 | Which fields the slot sets (below) |
| 4 | u8 | Owner; unused |
| 5 | u8 | Hit points, per cent |
| 6 | u8 | Shields, per cent |
| 7 | u8 | Energy, per cent |
| 8 | u32 | Resources |
| 12 | u16 | Units in the hangar |
| 14 | u16 | The special states themselves |
| 16 | u32 | Unused |
Special states:
| Bit | Meaning |
|---|---|
| 0x01 | Cloaked |
| 0x02 | Burrowed |
| 0x04 | In transit |
| 0x08 | Hallucinated |
| 0x10 | Invincible |
Fields set:
| Bit | Meaning |
|---|---|
| 0x01 | Owner |
| 0x02 | Hit points |
| 0x04 | Shields |
| 0x08 | Energy |
| 0x10 | Resources |
| 0x20 | Hangar |