# 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 (l/s maybe) Rate of fuel burn
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)

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 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 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) 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 scalar (kN)

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

Engine:AVAILABLETHRUST
Access: Get only 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) 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 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) 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 scalar (Liters/s? maybe)

Rate at which fuel is being burned. Not sure what the units are.

Engine:ISP
Access: Get only scalar

Specific impulse

Engine:ISPAT(pressure)
Parameters: pressure – atmospheric pressure (in standard Kerbin atmospheres) 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 scalar

Vacuum specific impulse

Engine:VISP
Access: Get only scalar

Synonym for :VACUUMISP

Engine:SEALEVELISP
Access: Get only scalar

Specific impulse at Kerbin sealevel.

Engine:SLISP
Access: Get only scalar

Synonym for :SEALEVELISP

Engine:FLAMEOUT
Access: Get only Boolean

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

Engine:IGNITION
Access: Get only 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 Boolean

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

Engine:ALLOWSHUTDOWN
Access: Get only Boolean

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

Engine:THROTTLELOCK
Access: Get only Boolean

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

Engine:MULTIMODE
Access: Get only Boolean

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

Engine:MODES
Access: Get only 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 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 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 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 Boolean

Does this engine have a gimbal enabled?

Engine:GIMBAL
Access: Get only Gimbal

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