Skip to content
 

Milestone 2 – Database contents – Ships

This eighth post in the Milestone 2 database structure series describes the elements used to store ship designs – whether they are provided by the game as “defaults” or customised by players – and ships, as well as fleets and their current state (which, since there is no Hyperspace stand-by for now, is limited to either “orbiting a planet” or “moving”).

Ship design definition

The definition of a ship design is the list of ship parts which are needed for the construction of a specific type of ship. Such a definition includes a hull, at least one engine, and it may include an arbitrary amount of other ship parts (generators, weapons, defences and any other kind of stuff).

Three constraints on valid ship designs exist:

  • the total energy consumed by the various parts must be lower than or equal to the amount of energy generated by included generators,
  • the total space consumed by the various parts multiplied by a “miniaturisation factor” (and empire-wide production) must be lower than or equal to the space provided by the ship’s hull,
  • the ship must have a non-zero normal space thrust.

Predefined ship designs

The game includes a set of predefined ship designs. A predefined ship design is a ship design definition associated with a name and description from the internationalisation system. Since all predefined ship designs are considered to be valid, the minimal miniaturisation factor for a predefined ship design can be computed directly from the list of parts.

Empire ship designs

An empire ship design is a ship design definition identified by a name and associated with an empire. It includes a free text description, as well as a flag that indicates whether the design has been declared as being obsolete. Empire ship designs may only be deleted if no ship is actually using the design. Their names or descriptions may be changed at any time, however the design definition itself may not be modified if there are ships using the design.

Ships

A ship is identified by an arbitrary sequence number. It is based on an empire ship design. It may be given a name for identification purposes. In addition, a ship possesses hit points which must be lower than or equal to the amount of maximal hit points defined by its design, and experience points, acquired when the ship participates in battles. Ships also include a status information which indicates whether they are available, being deployed after construction, being redeployed after movements or mode switches, being redirected, undergoing repairs, being refitted or decommissioned, and a penalty which indicates the time required for a ship in any non-available status to be available again.

Fleets

A fleet is identified by an arbitrary sequence number. It consists of at least one ship (all ships in a fleet must use designs belonging to the same empire, as this determines the fleet’s ownership). It may have a name for identification purposes. A fleet has an attack strategy and a defence strategy, as well as tactics settings (target selection criterion and target selection mode). The game update identifier at which each strategy was last changed as well as the game update identifier corresponding to the latest tactics adjustment are stored, to prevent players from constantly switching these values.

A fleet may be orbiting a planet. In this case, all fleets belonging to the same empire have a mode, which is either attack or defence. The game update identifier at which the last mode change occurred is stored, to prevent players from switching from attack to defence and vice-versa too rapidly.

Fleets that are not orbiting planets are moving fleets. Such a fleet has a planet of origin; however, this information is insufficient, as fleets may be redirected at any time. A fleet’s actual origin is either an in-system location (which consists in a planet and a distance indication, that last part being positive if the origin was in the direction of the star, negative if it was in the direction of outer space, or zero if the fleet’s movement originated from the planet itself) or an outer space location (a set of x and y coordinates expressed as real numbers, since the redirection may occur at any point when moving in outer space). The time elapsed since the last movement order is required to estimate the fleet’s current actual location. Finally, the requested fleet mode on arrival is included.

Leave a Reply