Engine

Some of the Parts returned by LIST PARTS will be of type Engine. It is also possible to get just the Engine parts by executing LIST ENGINES, for example:

LIST ENGINES IN myVariable.
FOR eng IN myVariable {
    print "An engine exists with ISP = " + eng:ISP.
}.
structure Engine
Members

Suffix

Type (units)

Description

All suffixes of Part

ACTIVATE

Turn engine on

SHUTDOWN

Turn engine off

THRUSTLIMIT

Scalar (%)

Tweaked thrust limit

MAXTHRUST

Scalar (kN)

Untweaked thrust limit. Zero if engine disabled.

MAXTHRUSTAT(pressure)

Scalar (kN)

Max thrust at the specified pressure (in standard Kerbin atmospheres). Zero if engine disabled.

THRUST

Scalar (kN)

Current thrust. Zero if engine disabled.

AVAILABLETHRUST

Scalar (kN)

Available thrust at full throttle accounting for thrust limiter. Zero if engine disabled.

AVAILABLETHRUSTAT(pressure)

Scalar (kN)

Available thrust at the specified pressure (in standard Kerbin atmospheres). Zero if engine disabled.

POSSIBLETHRUST

Scalar (kN)

Possible thrust at full throttle accounting for thrust limiter, when the engine is enabled.

POSSIBLETHRUSTAT(pressure)

Scalar (kN)

Possible thrust at the specified pressure (in standard Kerbin atmospheres), when the engine is enabled.

FUELFLOW

Scalar (unit/s)

Current volumetric flow rate of fuel.

MAXFUELFLOW

Scalar (unit/s)

Untweaked maximum volumetric flow rate of fuel at full throttle.

MASSFLOW

Scalar (Mg/s)

Current mass flow rate of fuel.

MAXMASSFLOW

Scalar (Mg/s)

Untweaked maximum mass flow rate of fuel at full throttle.

ISP

Scalar

Specific impulse

ISPAT(pressure)

Scalar

Specific impulse at the given pressure (in standard Kerbin atmospheres).

VACUUMISP

Scalar

Vacuum specific impulse

VISP

Scalar

Synonym for VACUUMISP

SEALEVELISP

Scalar

Specific impulse at Kerbin sealevel

SLISP

Scalar

Synonym for SEALEVELISP

FLAMEOUT

Boolean

Check if no more fuel

IGNITION

Boolean

Check if engine is active

ALLOWRESTART

Boolean

Check if engine can be reactivated

ALLOWSHUTDOWN

Boolean

Check if engine can be shutdown

THROTTLELOCK

Boolean

Check if throttle can not be changed

MULTIMODE

Boolean

Check if engine has multiple modes

MODES

List

List (string) of the engine modes

MODE

String

Name of the current mode (only if multiple)

TOGGLEMODE()

Switch to another mode (only if multiple)

PRIMARYMODE

Boolean

Is the engine in primary mode? (only if multiple)

AUTOSWITCH

Boolean

Can the engine switch modes automatically? (only if multiple)

HASGIMBAL

Boolean

Check if engine has gimbal

GIMBAL

Gimbal

Gimbal of this engine (only if available)

ULLAGE

Boolean

Does this engine need ullage (for RealFuels)

FUELSTABILITY

Scalar

How stable is the fuel for this engine (for RealFuels)

PRESSUREFED

Boolean

Is this engine pressure fed? (for RealFuels)

IGNITIONS

Scalar

Number of ignitions remaining for this engine (for RealFuels)

MINTHROTTLE

Scalar

The minimum throttle setting for this engine (for RealFuels)

CONFIG

String

Engine configuration name (for RealFuels)

CONSUMEDRESOURCES

Lexicon of ConsumedResource

The fuel resources this engine consumes, and in what ratios

Note

Engine is a type of Part, and therefore can use all the suffixes of Part. Shown below are only the suffixes that are unique to Engine.

Engine:ACTIVATE()

Call to make the engine turn on.

Engine:SHUTDOWN()

Call to make the engine turn off.

Engine:THRUSTLIMIT
Access

Get/Set

Type

Scalar (%)

If this an engine with a thrust limiter (tweakable) enabled, what percentage is it limited to? Note that this is expressed as a percentage, not a simple 0..1 coefficient. e.g. To set thrustlimit to half, you use a value of 50.0, not 0.5.

This value is not allowed to go outside the range [0..100]. If you attempt to do so, it will be clamped down into the allowed range.

Note that although a kerboscript is allowed to set the value to a very precise number (for example 10.5123), the stock in-game display widget that pops up when you right-click the engine will automatically round it to the nearest 0.5 whenever you open the panel. So if you do something like set ship:part[20]:thrustlimit to 10.5123. in your script, then look at the rightclick menu for the engine, the very act of just looking at the menu will cause it to become 10.5 instead of 10.5123. There isn’t much that kOS can do to change this. It’s a user interface decision baked into the stock game.

Engine:MAXTHRUST
Access

Get only

Type

Scalar (kN)

How much thrust would this engine give at its current atmospheric pressure and velocity if the throttle was max at 1.0, and the thrust limiter was max at 100%. Note this might not be the engine’s actual max thrust it could have under other air pressure conditions. Some engines have a very different value for MAXTHRUST in vacuum as opposed to at sea level pressure. Also, some jet engines have a very different value for MAXTHRUST depending on how fast they are currently being rammed through the air. Also note that this will read zero if the engine is currently disabled.

Engine:MAXTHRUSTAT(pressure)
Parameters
  • pressure – atmospheric pressure (in standard Kerbin atmospheres)

Return type

Scalar (kN)

How much thrust would this engine give if both the throttle and thrust limtier was max at the current velocity, and at the given atmospheric pressure. Use a pressure of 0.0 for vacuum, and 1.0 for sea level (on Kerbin) (or more than 1 for thicker atmospheres like on Eve). Note that this will read zero if the engine is currently disabled. (Pressure must be greater than or equal to zero. If you pass in a negative value, it will be treated as if you had given a zero instead.)

Engine:THRUST
Access

Get only

Type

Scalar (kN)

How much thrust is this engine giving at this very moment.

Engine:AVAILABLETHRUST
Access

Get only

Type

Scalar (kN)

Taking into account the thrust limiter tweakable setting, how much thrust would this engine give if the throttle was max at its current thrust limit setting and atmospheric pressure and velocity conditions. Note that this will read zero if the engine is currently disabled.

Engine:AVAILABLETHRUSTAT(pressure)
Parameters
  • pressure – atmospheric pressure (in standard Kerbin atmospheres)

Return type

Scalar (kN)

Taking into account the thrust limiter tweakable setting, how much thrust would this engine give if the throttle was max at its current thrust limit setting and velocity, but at a different atmospheric pressure you pass into it. The pressure is measured in ATM’s, meaning 0.0 is a vacuum, 1.0 is sea level at Kerbin. Note that this will read zero if the engine is currently disabled. (Pressure must be greater than or equal to zero. If you pass in a negative value, it will be treated as if you had given a zero instead.)

Engine:POSSIBLETHRUST
Access

Get only

Type

Scalar (kN)

Taking into account the thrust limiter tweakable setting, how much thrust would this engine give if the throttle was max at its current thrust limit setting and atmospheric pressure and velocity conditions. This will give the correct value even if the engine is currently disabled.

Engine:POSSIBLETHRUSTAT(pressure)
Parameters
  • pressure – atmospheric pressure (in standard Kerbin atmospheres)

Return type

Scalar (kN)

Taking into account the thrust limiter tweakable setting, how much thrust would this engine give if the throttle was max at its current thrust limit setting and velocity, but at a different atmospheric pressure you pass into it. The pressure is measured in ATM’s, meaning 0.0 is a vacuum, 1.0 is sea level at Kerbin. This will give the correct value even if the engine is currently disabled. (Pressure must be greater than or equal to zero. If you pass in a negative value, it will be treated as if you had given a zero instead.)

Engine:FUELFLOW
Access

Get only

Type

Scalar (units/s)

How much fuel volume is this engine consuming at this very moment.

Engine:MAXFUELFLOW
Access

Get only

Type

Scalar (units/s)

How much fuel volume would this engine consume at standard pressure and velocity if the throttle was max at 1.0, and the thrust limiter was max at 100%. Note this might not be the engine’s actual max fuel flow it could have under other air pressure conditions. Some jet engines have a very different fuel consumption depending on how fast they are currently being rammed through the air.

Engine:MASSFLOW
Access

Get only

Type

Scalar (Mg/s)

How much fuel mass is this engine consuming at this very moment.

Engine:MAXMASSFLOW
Access

Get only

Type

Scalar (Mg/s)

How much fuel mass would this engine consume at standard pressure and velocity if the throttle was max at 1.0, and the thrust limiter was max at 100%. Note this might not be the engine’s actual max fuel flow it could have under other air pressure conditions. Some jet engines have a very different fuel consumption depending on how fast they are currently being rammed through the air.

Engine:ISP
Access

Get only

Type

Scalar

Specific impulse

Engine:ISPAT(pressure)
Parameters
  • pressure – atmospheric pressure (in standard Kerbin atmospheres)

Return type

Scalar

Specific impulse at the given atmospheric pressure. Use a pressure of 0 for vacuum, and 1 for sea level (on Kerbin). (Pressure must be greater than or equal to zero. If you pass in a negative value, it will be treated as if you had given a zero instead.)

Engine:VACUUMISP
Access

Get only

Type

Scalar

Vacuum specific impulse

Engine:VISP
Access

Get only

Type

Scalar

Synonym for :VACUUMISP

Engine:SEALEVELISP
Access

Get only

Type

Scalar

Specific impulse at Kerbin sealevel.

Engine:SLISP
Access

Get only

Type

Scalar

Synonym for :SEALEVELISP

Engine:FLAMEOUT
Access

Get only

Type

Boolean

Is this engine failed because it is starved of a resource (liquidfuel, oxidizer, oxygen)?

Engine:IGNITION
Access

Get only

Type

Boolean

Has this engine been ignited? If both Engine:IGNITION and Engine:FLAMEOUT are true, that means the engine could start up again immediately if more resources were made available to it.

Engine:ALLOWRESTART
Access

Get only

Type

Boolean

Is this an engine that can be started again? Usually True, but false for solid boosters.

Engine:ALLOWSHUTDOWN
Access

Get only

Type

Boolean

Is this an engine that can be shut off once started? Usually True, but false for solid boosters.

Engine:THROTTLELOCK
Access

Get only

Type

Boolean

Is this an engine that is stuck at a fixed throttle? (i.e. solid boosters)

Engine:MULTIMODE
Access

Get only

Type

Boolean

Does this engine have multiple modes (i.e. RAPIER)? Check this before calling multi-mode specific suffixes.

Engine:MODES
Access

Get only

Type

List of strings

Lists names of modes of this engine if multimode, returns a list of 1 string “Single mode” otherwise.

Engine:MODE
Access

Get only

Type

String

Name of the current mode. Only assessible for multi-mode engines.

Engine:TOGGLEMODE()

Call to switch to another mode. Only assessible for multi-mode engines.

Engine:PRIMARYMODE
Access

Get/Set

Type

Boolean

True for primary mode, false for secondary. Setting to other value equals toggling the mode. Only assessible for multi-mode engines.

Engine:AUTOSWITCH
Access

Get/Set

Type

Boolean

Is automatic switching enabled? Can set to switch between manual and automatic switching. Only assessible for multi-mode engines.

Engine:HASGIMBAL
Access

Get only

Type

Boolean

Does this engine have a gimbal enabled?

Engine:GIMBAL
Access

Get only

Type

Gimbal

Returns the Gimbal attached to this engine. Only accessible if the gimbal is present (Use Engine:HASGIMBAL to check if available).

Engine:ULLAGE
Access

Get only

Type

Boolean

If RealFuels is installed, returns true if this engine is a type of engine that requires ullage, otherwise returns false. Note: this is a static property of the engine, for current fuel status, check FUELSTABILITY.

Engine:FUELSTABILITY
Access

Get only

Type

Scalar

If RealFuels is installed, returns the fuel stability of this engine as a value between 0 and 1 (where 1 is fullly stable), otherwise returns 1. Engines that don’t require ullage will always return 1, unless they are pressure fed and the feed pressure is too low.

Engine:PRESSUREFED
Access

Get only

Type

Boolean

If RealFuels is installed, returns true if this engine is pressure fed, otherwise returns false.

Engine:IGNITIONS
Access

Get only

Type

Scalar

If RealFuels is installed, returns the number of ignitions remaining, or -1 if it is unlimited, otherwise returns -1.

Engine:MINTHROTTLE
Access

Get only

Type

Scalar

If RealFuels is installed, returns the minimum throttle setting as a value between 0 and 1, otherwise returns 0.

Engine:CONFIG
Access

Get only

Type

String

If RealFuels is installed, returns the configuration name of this engine if applicable, otherwise returns the part title.

Engine:CONSUMEDRESOURCES
Access

Get only

Type

Lexicon of ConsumedResource

The fuel resources this engine consumes, and in what ratios.