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
- an empty hull which has
- a mass
- a free volume usable for equipment
- a free surface area usable for equipment
- a cost (in TSubstanceSet)
- a amount of hit points (hp) which the hull can take before being destroyed
- a life support system (already included, so no extra costs)
- an amount of equipment (all derived form TItem, i.e. TSTLEngine) which each
- has a cost (in TSubstanceSet)
- has a tech level
- has a mass
- needs an amount of volume
- needs an amount of surface area
- gives or improves a new (like engines, weapons, fuel tank, cargo bay)
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).
- STL Engines (class TSTLEngine)
- Power (newtonian, as STL means slower than light)
- FTL Engines (class TFTLEngine)
- power (some value for hyperlight travel, as FTL means faster than light; perhaps a multiplicator)
- Fuel Tank (class TFuelTank)
- storage capacity (in mg, increases with tech level)
- Fuel Scoop (class TFuelScoop)
- Cargo Bay (class TCargoBay)
- one cargo bay item provides exact 1 m³ cargo space; if 1 m³ cargo space takes more than 1 m³ volume in a actual ship, the TCargoBay item gets just a higher volume value (with this approach there is no cargo space volume field needed)
[settlers are not special, they only take 5 m^3 per settler (stasis container)]
- Colonizer Module (class TColonizer)
- simply the basic colonization pod
- Repair Module/Bot (class TRepairBot)
- value for repair rate (repairs equipment for n resource units per time unit)
- Armor (classes TArmor and TDefenseType)
- class TArmor
- armor type (as link to a TDefenseType object)
- hit points (hp)
- class TArmorType
- efficiency vs known every weapons (known to the TArmorType object)
- standard efficiency vs unknown weapons (unknown to the TArmorType object)
- 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.
- class TShield
- shield type (as pointer to a TShieldType object)
- hit points (hp)
- class TShieldType
- efficiency vs known every weapons (known to the TShieldType object)
- standard efficiency vs unknown weapons (unknown to the TShieldType object)
- regeneration rate of the shield
- Kinetic energy weapons (class TKWeapon)
- damage points (dp)
- RoF
- type (until know integer)
- velocity
- ammunition size
- Standard energy weapons (class TEWeapon)
- damage points (dp)
- RoF
- type (until know integer)
- efficient range
- Targeting Computer (class TTargetingComputer)
- aiming effectiveness value (perhaps splitted for KE weapons and E weapons, but I wouldn't split it)
- Scanner (class TScanner and sub types)
There are four different kinds of scanners:
- the normal scanner: tries to locate the exact position of the enemy ship
- the anti disguise scanner: tries to indentify the true type/shape of the enemy ship, to prevent that a small ship is perceived as a huge battleship (or vice versa)
- the anti cloak scanner: tries to find cloaked ships
- the penetration scanner: tries to "see" inside the enemy ship
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:
- added range = squareroot( sqr(range 1) + sqr(range 2) + ... + sqr(range n) ) (or to make it tighter use higher exponents)
- added efficiency = ???? I don't know yet, perhaps something similar to above)
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:
- TScannerNormalActive
- efficiency value
- short range
- long range
- TScannerNormalPassive
- efficiency value
- short range
- long range
- TScannerAntiDisguiseActive
- efficiency value
- short range
- long range
- TScannerAntiDisguisePassive
- efficiency value
- short range
- long range
- TScannerAntiCloakActive
- efficiency value
- short range
- long range
- TScannerAntiCloakPassive
- efficiency value
- short range
- long range
- TScannerPenetrateActive
- efficiency value
- short range
- long range
- TScannerPenetratePassive
- efficiency value
- short range
- long range
- Jammer (TJammer and sub types)
There are - as for the scanners - four different kinds of jammers:
- the normal jammer: tries to prevent the real ship location from being detected
- the disguise jammer: tries to disguise the real type/shape of the ship, so that a small ship is perceived as a huge battleship (or vice versa)
- the cloak scanner: tries to cloak the ship
- the anti penetration scanner: tries to prevent the enemy from "seeing" inside the ship
The efficiencies of the jammers add the same way, as the efficiencies of scanners add. Now, the sub classes of TJammer:
- TJammerNormal
- TJammerDisguise
- TJammerCloak
- TJammerAntiPenetrate
- Minelayers (class TMinelayer)
- rate of minelaying
- (covered area/volume)
- (mine type, the mine layer can lay, if it is constrained; I wouldn't constrain it)
- Miningbots (class TMiningbot)
- mining rate
- mining efficiency with different materials?
- Fighter bay/launcher (TFighterLauncher)
- rate of launching
- rate of landing
- fighter repair rate (I would put this ability here and not into TRepairBot)
- (- fighter type that can be launched, if it's constrained; I wouldn't constrain it)
- SP weapon launcher (TSPWeaponLauncher)
Some stuff that didn't fit somewhere yet
- Ships/ship crews could get experience
- Ships should be refitable, perhaps with refund for old components
- Autoupgrade to better design and Autoretire for designs out of date (at next dock yard)
- Prototype costs to keep down number of different designs
- What about component constraints (i.e. small ship can't get the big gun, although there is enough space
- Ability to land on Planets (+25% costs or -25% volume/surface)?
- Sliding hull size system (TL = Tech Level):
- 10 * 1.2^(TL+10) for ships, 10 * 1.4^(TL+10) for starbases
- Fibonachi(TL)
- 2^TL (too much, I think)
- How does component volume, surface, cost and mass sink wth Tech Level
- FTL: Hyperspace Jump or Warp Flight (or both?) (Formular?)
- Fuel Consumption?
- bio weapons, bio ships and the related values in armor and shields
- Has the hull (fuselage) of a ship different efficiencies against energy or kinetic energy weapons? Or has it just a hit point value and is equal vulnarable against all weapons (besides zapper an similar stuff).