Alliances are controlled using command messages; in particular, the allies command.
Forming an alliance is a two-step process in PHost:
- You offer the alliance to somebody. Your partner has to offer back. Only when two players agree, the alliance will be active.
- You can now offer the partner some privileges (alliance levels). Privileges can be offered conditionally or unconditionally.
You can perform both steps at once. You can offer privileges without waiting for your partner to confirm it. If you do that, your partner will see what you offer, and will benefit from it as soon as he offers back.
Alliance levels can be offered conditional or unconditional. If you offer an alliance conditionally, the ally can only use it when he also offers you the same level back, conditional or unconditional. If you offer it unconditionally, he can benefit from it even if he doesn't offer back. Once it has been determined that an alliance level is effective, there is no longer difference between a conditional and an unconditional offer. A bidirectional conditional ship-level alliance is perfectly identical to a bidirectional unconditional ship-level alliance.
Depending on the DelayAllianceCommands option, alliances take effect at the beginning or end of the host run. Normally, alliance changes take effect immediately. If you decide to drop an alliance and invade your ex-ally's territory, you can do that. With DelayAllianceCommands=Yes, alliance commands are processed at the end of the turn. Your ex-ally will have one turn to react on your withdrawal of the alliance.