RFC - Ship Design and Items

Ralf "Prolator" Laue
Last modified: Thu Dec 13 01:17:55 CET 2001

Ship Design

A ship design only describes the type of a ship, not an actual ship. The actual ship is represented in TSubFleet, which knows of which type (saved as pointer to a object of type TShipDesign) the ships are and how many (amount saved as integer) ships of this type it contains. Therefore the damage a ship has taken is only saved in the TSubFleet and not in TShipDesign. TShipDesign knows only the nominal values.

A ship design consists of

The UI (or which other class wants to) can access the basic values of the ship design (i.e. the total mass) directly through Get???? functions (i.e. GetTotalMass()). The items which are installed on the ship design are accessible through GetItemList as a list of type TItemList. For detailed information of the interfaces, see the API description. The items are represented as structs of the type tItemPack, which contains a pointer to the item object and the amount of items in the pack. It's impossible for the list to contain two packs with the same item type (pointer to a TItem object), but all items of the same type are saved in the same pack (and the amount adjusted accordingly). The class TShipDesign has a flag which determines whether the design is alterable or not. This flag should be set, if no actual ship of this design exists (then the design in changeable) and it should be unset, if at least on ship of this design exists (then the design is not changeable). If the design is not changeable, the methods which normally alter the design have no effect.
Furthermore the class TShipDesign has a flag which dteremies whether ships of this design can land on planets and fly through atmospheres. This flag can be set with the method AbleToLand and can be read with the method IsAtmospheric. The flag influences the cost of the emmpty hull. If the flag is set/true the hull cost is increased by an factor. This factor can be set with the method SetAtmosphericFactor and can be read with the method GetAtmosphericFactor. The factor is a double and its part of the cost is added. That means if you want to have the design 125% of the usual cost, the factor has to be 0.25.

Until now there are no methods like GetMaxAcceleration which make the "advanced" values accessible.

A remark to fighters and SP weapons: They are build with special fuselage versions of normal ships and use the same items normal ships use. For example a fighter could consist of a fighter fuselage (cheaper, less mass, more volume and surface area because of smaller life support systems) and some items like an STL engine, a weapon, armor and finally some scanners and jammers. A SP weapon could consist of a special SP weapon fuselage (even cheaper, because no life support at all), an STL engine and a scanner for targeting.

Items

As already mentioned in section "Ship Design" an item has the basic values cost, teh level, mass, volume and surface area. These basic values (i.e. mass) can be accessed through the Get???? functions (i.e. GetMass()). Furthermore it has a property depending on the item type (i.e. an engine item has a certain power). Actual items have never the type TItem, but have the type of the corresponding derived class. (i.e. an engine item is of the type TEngine).

  1. STL Engines (class TSTLEngine)
  2. FTL Engines (class TFTLEngine)
  3. Fuel Tank (class TFuelTank)
  4. Fuel Scoop (class TFuelScoop)
  5. Cargo Bay (class TCargoBay)
  6. Colonizer Module (class TColonizer)
  7. Repair Module/Bot (class TRepairBot)
  8. Armor (classes TArmor and TDefenseType)
  9. Shields (classes TShield and TDefenseType)
    Until now the regeneration speed is not implemented, if we need it, TDefenseType will get ancestor for TArmorType and TShieldType.
  10. Kinetic energy weapons (class TKWeapon)
  11. Standard energy weapons (class TEWeapon)
  12. Targeting Computer (class TTargetingComputer)
  13. Scanner (class TScanner and sub types)
    There are four different kinds of scanners: All scanner types are available in an active and a passive version. The active version is usually more efficient, but can be noticed by the enemy. Furthermore every scanner has two ranges in which it is effective. One range for the short range scan abilities (battle field) and one for the long range scan abilities (star map). If you use more scanners of the same type, the range and efficiency of the scanners will add somehow according followin: formulars: Perhaps the distance between the ships could also affect the efficiency of the scanners. But this could also be ignored, because then the efficiency of the Jammers would also increase with shorter distance and nullifiy the increased scanner efficiency. Now, these are the sub classes:
  14. Jammer (TJammer and sub types)
    There are - as for the scanners - four different kinds of jammers: The efficiencies of the jammers add the same way, as the efficiencies of scanners add. Now, the sub classes of TJammer:
  15. Minelayers (class TMinelayer)
  16. Miningbots (class TMiningbot)
  17. Fighter bay/launcher (TFighterLauncher)
  18. SP weapon launcher (TSPWeaponLauncher)

Some stuff that didn't fit somewhere yet