[PHost Logo]© 

Order of Battle
The Portable Host
Version 3.2.3.5g
 

INDEX

Introduction

This page describes the order-of-battle (OOB) as implemented in PHOST. The OOB is based upon the documented OOB in HOST 3.2 along with some invention where the original documentation is not complete.

After the movement phase is complete, sets of ships that all occupy the same point in space can engage in combat. For a ship to engage in combat, it must not be cloaked (unless AllowCloakedShipsAttack is enabled and it has a primary enemy set) and it must have fuel (unless the AllowPlanetAttacks configuration option is enabled). If a planet occupies the same position in space, it too will participate in combat.

Combat proceeds in two phases. The first phase is known as the Intercept Attack (XA) phase, and the second phase is known as the Aggressor/Opponent phase.

Back to the index 


The Intercept Attack (XA) Phase

The Intercept Attack phase is enabled by the AllowInterceptAttack config option. ==> If this option is not enabled, then this phase is skipped completely.

In the Intercept Attack (XA) phase, ships on an intercept mission fight the ships that they are intercepting. In order for a ship to be considered for an XA, it must meet the following criteria:

  1. The ship's mission must be set to Intercept
  2. The ship must have cloaking capability (==> NOTE: only cloaking capability is required, the ship need not, in fact, cannot be cloaked for an XA)
  3. The ship must have fuel
  4. The ship must have a primary enemy setting
  5. The intercept target must exist and must be of the same race as the intercepting ship's primary enemy. The intercept target must, of course, also be at the same position as the intercepting ship.
If these criteria are met then the intercept target is checked for meeting the following criteria:
  1. The ship must be fueled
  2. The ship must not be cloaked
  3. The ship owner is not an ally to whom the XA ship owner has granted the combat level of alliance
  4. The friendly codes of the two ships do not match (remember that in PHOST, special friendly codes never match)
If all these criteria are met, then the two ships fight.

==> If there are two or more ships performing an XA mission at the same location, they will fight in the order indicated by their friendly code battle order (see below). In PHOST 3.4a and below, and in HOST, the ship with the highest ID number fights first, and combat then proceeds in decreasing order of ship ID numbers.

Back to the index 


The Aggressor/Opponent Phase

Once the XA phase is complete, the Aggressor/Opponent phase begins. In this phase, combat proceeds by repeatedly following the steps below until no more battles can be performed. The order in which ships fight in this phase is determined by an ordering process that is described below.
  1. Find an aggressor
  2. Find an opponent for this aggressor
  3. Perform the battle between aggressor and opponent 

  4. Return to step 2 if aggressor survives
  5. Repeat from step 1
To find an aggressor, the next (or the first) ship/planet in the battle order list is considered. For ships, if the ship is fuelless, or has no Kill mission and no primary enemy, then the ship is ignored and the next entry in the battle order list is considered. For planets, the planet must have an ATT or NUK code (and AllowPlanetAttacks must be enabled) for it to be an aggressor.

Finding an opponent for an aggressor simply involves going through the battle order list from the beginning and choosing the first ship/planet that may fight the aggressor (i.e., it does not match friendly codes, the two ships are not allies, etc.) An aggressor will fight all possible opponents in the ship list until the aggressor is destroyed, is captured, or runs out of ammo.

Back to the index 


Battle Ordering

Once a list of all participating ships (and possibly a planet) is compiled for a particular location in space, the list is sorted according to the following criteria (in decreasing order of importance):
  1. The ship or planet's friendly code numeric interpretation. Ships/planets with lower numeric friendly code values will fight first.
  2. The ship or planet's ID number (if two or more ships/planets have the same friendly code numeric interpretation)
  3. The ship precedes the planet (if both ship and planet have the same FC numeric interpretation and the same ID number)
This sorted list containing ships and possibly a planet is known as the battle order list. It represents all possible combatants at the same point in space, sorted in increasing battle order (as determined by friendly code and ship/planet ID).

The friendly code (FC) ordering is based upon a numeric interpretation of the FC. The rules for numeric interpretation are:

  1. FC's containing only digits (0 through 9) are interpreted simply as the number itself.
  2. FC's that begin with the character '-' (minus sign) and are followed by 2 digits (0 through 9) are interpreted as the negative of the number represented by the 2 digits.
  3. FC's that do not fall into one of the above two categories have a numeric interpretation of 1000.
For example:
 
FC  Numeric
Interpretation 
001  1        (rule 1) 
010  10      (rule 1) 
01a  1000  (rule 3) 
10b  1000  (rule 3) 
a10  1000  (rule 3) 
oof  1000  (rule 3) 
5ia  1000  (rule 3) 
5o9  1000  (rule 3) 
-13  -13    (rule 2) 
-09  -9      (rule 2) 
-a5  1000  (rule 3) 
-3*  1000  (rule 3) 
If a friendly code has an equivalent numeric value of 1000 (non-numeric characters in the code), then the actual code used for combat ordering is determined by the following rules:
  1. For a planet, if the planet's friendly code is NUK or ATT and the AllowPlanetAttacks config option is enabled, then the planet is assigned a numeric code of 0.
  2. Otherwise, if the planet has at least 1 defense post, it gets a numeric code of 1001. If the planet has no defense posts, it is assigned a numeric code of 1003.
  3. For ships, if the ship has any weapons and is aggressive by using Mission Kill or a Primary Enemy, it is assigned a numeric code of 1000. Armed ships that are not aggressive are assigned a numeric code of 1002. Unarmed ships (freighters) will get 1004. ==> This is a change in version 3.2.3.5e. Previously, all armed ships got code 1000, independent from their aggressiveness, freighters got 1002.
In summary then, here are the various numeric values used in combat ordering:
 
Numeric Range  Possible Sources 
-99 to -1 
Ships and planets with a numeric friendly code of -99 through -1 
000 
Planets with NUK/ATT code and AllowPlanetAttacks enabled
Ships and planets with a numeric friendly code of 0 
001 to 999 
Ships and planets with a numeric friendly code of 1 to 999 
1000 
Ships with non-numeric friendly codes, mission kill or primary enemy, and with at least 1 weapon 
1001 
Planets with non-numeric friendly codes and at least 1 defense post 
1002 
Ships with non-numeric friendly codes, not aggressive, and with at least 1 weapon 
1003 
Planets with non-numeric friendly codes and no defense posts 
1004 
Ships with non-numeric friendly codes and with no weapons 
Back to the index 

Notes on Combat

There are some points of interest to note with respect to combat: Back to the index 
This document is maintained by The Portable Host Project[Remote] (support@phost.de).

Last updated 9 January, 2010