byte[11]  Offered to...
byte[11]  Offers from...
--- PHost 2.6: ---
byte[11]  Conditional offers to...
byte[11]  Conditional offers from...

Sent to: all players that are somewhat involved in an alliance

The four components of this record are arrays indexed by player number.

The first array indicates the alliance levels that the player offers to other players. The second array indicates the alliance levels that other players have offered to the player receiving this record. For example, the fifth element of Offered To indicates the alliance levels that this player has offered to the Privateers; the fifth element of Offers From indicates the alliance levels that the Privs have offered to this player.

Each element is a bitfield which may be decoded as follows:

BitMeaning
0 (value 1)Ship Level
1 (value 2)Planet Level
2 (value 4)Minefield Level
3 (value 8)Combat Level
4 (value 16)Vision Level
5 (value 32)Active bit

Look first at bit 5 (value 32): this bit determines whether the offer is valid (i.e. the player has used the allies add command). If that's the case, the five low-order bits contain the offered levels (see allies config).

The two high-order bits are reserved and set to zero by PHost.

For example, if player number 3's alliance status record indicates that his fifth Offered To is 00101010 (binary) then this means that player 3 has offered an alliance to player 5 and has enabled the Planet Level and Combat Level of alliance.

Note that for player N, Offered To[N] and Offers From[N] should always be zero (you can't make an alliance with yourself).

The last two arrays in this record indicate which levels of alliance have been offered on a conditional basis. Like the Offered To and Offers From arrays, they are indexed by race. If a bit is set in one of the array's entries, then it indicates that the corresponding alliance level is a conditional one, and will not take effect unless the other player also offers (perhaps conditionally) this alliance level to the first player.

The encoding is the same as for the first two arrays, but the Active bit is always zero. Note that if an alliance level is not enabled, then the conditional bit will always be 0.

This is a testing version.
It may be incomplete, and have more bugs (or features) than the public live version at planetscentral.com.