Parts#

class Part#

A part of a vehicle. Obtained from Vehicle.Parts.

Note

A part keeps its object when the vehicle it belongs to changes, for example when a decoupler separates it. Throws an exception once the part no longer exists.

string Name { get; }#

The id of the part’s template.

Game Scenes:

All

string Title { get; }#

The name of the part, as shown in the game.

Game Scenes:

All

Vehicle Vehicle { get; }#

The vehicle the part belongs to.

Game Scenes:

All

Part Parent { get; }#

The part this part is attached to, or null for the root part.

Game Scenes:

All

IList<Part> Children { get; }#

The parts attached to this part.

Game Scenes:

All

int Sequence { get; }#

The number of the sequence that activates the part, or -1 if no sequence does.

Game Scenes:

All

float Mass { get; }#

The mass of the part, including its propellant, in kilograms.

Game Scenes:

All

float DryMass { get; }#

The mass of the part without its propellant, in kilograms.

Game Scenes:

All

IList<Resource> Resources { get; }#

The resources the part holds, one for each substance.

Game Scenes:

All

IList<Tank> Tanks { get; }#

The part’s propellant tanks. Empty if it has none.

Game Scenes:

All

IList<Battery> Batteries { get; }#

The part’s batteries.

Game Scenes:

All

IList<SolarPanel> SolarPanels { get; }#

The part’s solar panels.

Game Scenes:

All

IList<Generator> Generators { get; }#

The part’s generators.

Game Scenes:

All

IList<PowerConsumer> PowerConsumers { get; }#

The part’s power consumers.

Game Scenes:

All

IList<Light> Lights { get; }#

The part’s lights.

Game Scenes:

All

IList<Deployable> Deployables { get; }#

The part’s deployable sections. A part can have several, such as the doors of a service module.

Game Scenes:

All

IList<MagneticScoop> MagneticScoops { get; }#

The part’s magnetic scoops. Empty if it has none.

Game Scenes:

All

Tuple<double, double, double> Position (ReferenceFrame referenceFrame)#

The position of the part’s origin, in meters.

Parameters:
  • referenceFrame – The reference frame of the position.

Game Scenes:

All

Tuple<double, double, double> Velocity (ReferenceFrame referenceFrame)#

The velocity of the part’s origin, in meters per second.

Parameters:
  • referenceFrame – The reference frame of the velocity.

Game Scenes:

All

Tuple<double, double, double, double> Rotation (ReferenceFrame referenceFrame)#

The rotation of the part’s axes, relative to the given frame.

Parameters:
  • referenceFrame – The reference frame of the rotation.

Game Scenes:

All

Engine Engine { get; }#

The part’s engine, or null if it has none.

Game Scenes:

All

IList<Gimbal> Gimbals { get; }#

The part’s gimbals. An engine part can have several, each steering one nozzle.

Game Scenes:

All

RCS RCS { get; }#

The part’s RCS thrusters, or null if it has none.

Game Scenes:

All

Decoupler Decoupler { get; }#

The part’s decoupler, or null if it has none.

Game Scenes:

All

Parachute Parachute { get; }#

The part’s parachute, or null if it has none.

Game Scenes:

All

DockingPort DockingPort { get; }#

The part’s docking port, or null if it has none.

Game Scenes:

All

IList<Seat> Seats { get; }#

The part’s crew seats.

Game Scenes:

All

IList<Kitten> Crew { get; }#

The kittens in the part’s seats.

Game Scenes:

All

class Engine#

An engine. Obtained from Part.Engine.

Note

An active engine fires when the vehicle’s engines are on, at the vehicle’s throttle. See Control.EngineOn and Control.Throttle.

Part Part { get; }#

The part the engine is in.

Game Scenes:

All

IList<Gimbal> Gimbals { get; }#

The gimbals that steer the engine’s nozzles. Empty if the engine has none.

Game Scenes:

All

bool Active { get; set; }#

Whether the engine is active, as when its sequence is activated. Setting it returns once the change has applied.

Game Scenes:

All

bool HasPropellant { get; }#

Whether the engine has propellant to burn.

Game Scenes:

All

float MinimumThrottle { get; }#

The lowest throttle the engine runs at, between 0 and 1.

Game Scenes:

All

IList<string> Propellants { get; }#

The names of the substances the engine burns. See Resource.Name.

Game Scenes:

All

float Thrust { get; }#

The thrust of the engine at its current throttle and the current atmospheric pressure, in Newtons. Zero when it is not firing.

Game Scenes:

All

float AvailableThrust { get; }#

The thrust of the engine at full throttle and the current atmospheric pressure, in Newtons. Zero when it is inactive or has no propellant.

Game Scenes:

All

float SpecificImpulse { get; }#

The specific impulse of the engine at the current atmospheric pressure, in seconds. Zero when it is inactive or has no propellant.

Game Scenes:

All

class Gimbal#

A gimbal that steers an engine nozzle. Obtained from Part.Gimbals or Engine.Gimbals.

Note

A gimbal turns about the y and z axes of its mount, which Gimbal.Rotation gives. The flight computer steers it while an engine it belongs to is Gimbal.Active.

Part Part { get; }#

The part the gimbal is in.

Game Scenes:

All

float AngleY { get; }#

The angle of the gimbal about its y axis, in degrees.

Game Scenes:

All

float AngleZ { get; }#

The angle of the gimbal about its z axis, in degrees.

Game Scenes:

All

float MaxAngleY { get; }#

The largest angle of the gimbal about its y axis, in degrees. Zero if it does not turn about that axis.

Game Scenes:

All

float MaxAngleZ { get; }#

The largest angle of the gimbal about its z axis, in degrees. Zero if it does not turn about that axis.

Game Scenes:

All

bool Active { get; }#

Whether an engine the gimbal steers is active.

Game Scenes:

All

Tuple<double, double, double, double> Rotation (ReferenceFrame referenceFrame)#

The rotation of the gimbal’s mount, whose y and z axes the gimbal turns about.

Parameters:
  • referenceFrame – The reference frame of the rotation.

Game Scenes:

All

class RCS#

The RCS thrusters of a part. Obtained from Part.RCS.

Note

Active thrusters fire when the vehicle’s RCS is on. See Control.RCS.

Part Part { get; }#

The part the thrusters are in.

Game Scenes:

All

bool Active { get; set; }#

Whether the thrusters are active. Setting it returns once the change has applied.

Game Scenes:

All

class Decoupler#

A decoupler. Obtained from Part.Decoupler.

Part Part { get; }#

The part the decoupler is in.

Game Scenes:

All

bool Enabled { get; }#

Whether the decoupler can fire.

Game Scenes:

All

bool Decoupled { get; }#

Whether the decoupler has fired, or is attached to nothing.

Game Scenes:

All

IList<Vehicle> Decouple ()#

Fire the decoupler, separating the vehicle into two. Returns once it has fired. Throws an exception if the decoupler is disabled or Decoupler.Decoupled.

Returns:

The vehicles that separated from this one.

Game Scenes:

All

class Parachute#

A parachute. Obtained from Part.Parachute.

Part Part { get; }#

The part the parachute is in.

Game Scenes:

All

ParachuteState State { get; }#

The state of the parachute.

Game Scenes:

All

float Fill { get; }#

How far the canopy is open, from 0 to 1.

Game Scenes:

All

float DeployAltitude { get; }#

The height above the terrain at which an armed parachute deploys, in meters.

Game Scenes:

All

bool CanCut { get; }#

Whether the parachute can be cut away. Main parachutes cannot.

Game Scenes:

All

void Deploy ()#

Arm the parachute, so that it deploys at Parachute.DeployAltitude. Returns once it is armed. Throws an exception if it is not stowed.

Game Scenes:

All

void Cut ()#

Cut the parachute away. Returns once it is cut. Throws an exception if it cannot be cut. See Parachute.CanCut.

Game Scenes:

All

enum ParachuteState#

The state of a parachute. See Parachute.State.

Stowed#

Packed away.

Armed#

Waiting to deploy at Parachute.DeployAltitude.

LineStretch#

Leaving the pack.

Reefed#

Partly open, to limit the opening load.

Disreefing#

Opening from reefed to full.

Full#

Fully open.

Cut#

Cut away.

Ripped#

Torn by too much dynamic pressure.

SeveredLines#

Lost after its lines broke under too much load.

class DockingPort#

A docking port. Obtained from Part.DockingPort.

Part Part { get; }#

The part the docking port is in.

Game Scenes:

All

bool Docked { get; }#

Whether the port is docked.

Game Scenes:

All

Part DockedPart { get; }#

The part the port is docked to, or null if it is not docked.

Game Scenes:

All

IList<Vehicle> Undock ()#

Undock the port, separating the vehicle into two. Returns once it has undocked. Throws an exception if the port is not docked.

Returns:

The new vehicles.

Game Scenes:

All

Note

Docking and undocking replace the vehicles involved. See Vehicle.

class Deployable#

A part that deploys and retracts, such as a landing leg, a solar panel or a service module door. Obtained from Part.Deployables.

Note

Deploying or retracting a part moves its symmetric copies with it, as the part’s menu in the game does.

Part Part { get; }#

The part the deployable is in.

Game Scenes:

All

DeployableState State { get; }#

The state of the part.

Game Scenes:

All

void Deploy ()#

Deploy the part. Returns once it has started to move.

Game Scenes:

All

Note

Throws an exception if the part is broken.

void Retract ()#

Retract the part. Returns once it has started to move.

Game Scenes:

All

Note

Throws an exception if the part is broken.

enum DeployableState#

The state of a deployable part. See Deployable.State.

Deployed#

Fully deployed.

Retracted#

Fully retracted.

Deploying#

Moving toward deployed.

Retracting#

Moving toward retracted.

Broken#

Broken, so it can no longer move.

class MagneticScoop#

A magnetic scoop, which collects gas from space into the vehicle’s tanks. Obtained from Part.MagneticScoops.

Part Part { get; }#

The part the scoop is in.

Game Scenes:

All

bool Active { get; set; }#

Whether the scoop is switched on.

Game Scenes:

All

string Substance { get; }#

The name of the substance the scoop collects. See Resource.Name.

Game Scenes:

All

float CollectionRate { get; }#

The rate the scoop collects gas at, in kilograms per second.

Game Scenes:

All