scmJS docs

PUNI

Which unit types each player may build. For every player and unit type there is an answer of its own and a flag saying whether to use the default answer instead, and one default answer per unit type.

Name PUNI (50 55 4E 49)
Size 5700 bytes.
Read by The game.
Required Yes. The game does not load a map without it.
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 × 2736 Per player, per unit type: 1 if the player can build it. Player 1's 228 bytes first
2736 u8 × 228 Per unit type: 1 if it can be built, for every player that uses the default
2964 u8 × 2736 Per player, per unit type: 1 if the player uses the default

Example#

The answer for a player and a unit type is the player's own byte, unless the player's uses the default byte is 1, in which case it is the unit type's default. The byte for Player p and unit type u is at p × 228 + u in each of the two per-player tables. The same three tables, in the same order, make up UPGR, PTEC, PUPx and PTEx.

Here Carriers (unit type 72) are allowed by default, every player takes the default except Player 3, and Player 3's own byte says no:

  72  00  Player 1, Carrier: may not build it, but see below
 528  00  Player 3, Carrier: may not build it
2808  01  the default for Carriers: may build them
3036  01  Player 1 uses the default, so may build them
3492  00  Player 3 does not, so may not

Player 1's own byte also says no, but it is never read, because Player 1 takes the default.