Once PHost has determined what units will fight at a particular place, it will sort the list according to battle order values. You can choose battle order values for your units by using (numeric) friendly codes.

  1. If your friendly code consists of only digits, that's the battle order value. This can be used to enter values between 000 and 999.
  2. The friendly code can also start with a minus sign, yielding values between -99 and -00.
  3. A planet with ATT or NUK will have a battle order value of zero.
  4. Planets with other non-numeric friendly codes have a value of 1001 if they have defense posts, 1003 if they have none.
  5. Ships with non-numeric friendly codes have a value of 1000 if they have weapons, 1002 if they don't.

When two units have the same battle order value, the one with the lower Id number fights first. When a ship and a planet with the same Id number and the same battle order value fight, the ship fights first.

Examples:

Friendly CodeNumeric ValueRules
0011(rule 1)
01010(rule 1)
01a1000(rule 5)
10b1000(rule 5)
a101000(rule 5)
oof1000(rule 5)
5ia1000(rule 5)
5o91000(rule 5, this is a lower-case letter "o" not the digit "zero")
-13-13(rule 2)
-09-9(rule 2)
-a51000(rule 5)
-3*1000(rule 5)
3333(rule 1, since PHost 4.0h; earlier PHost versions handle only friendly codes consisting of exactly three characters and would use rule 5 here)