Enums

Many fields take one of a fixed set of named values. In Lua you write them as strings (for example part.category = "Engine"). This page lists the value sets you are most likely to use. The complete set, including the rarer ones, is in pm-types.d.lua and surfaces in your editor's autocomplete.

When a field is an enum, your editor will offer the valid values as you type the string. Use that first. This page is for looking one up away from the editor.

Part categories

The editor category a part appears under (category on a part).

none, Production, Control, Structural, Aero, Utility, Science, Pods, FuelTank, Engine, Communication, Electrical, Ground, Thermal, Payload, Coupling, ColonyEssentials, Favorites, SubAssemblies, Amenities, Storage

Engine type

The propulsion category of an engine mode (engineType on an engine mode).

Generic, SolidBooster, Methalox, Piston, Turbine, ScramJet, Electric, Nuclear, MonoProp, Helium3, MetallicHydrogen, NuclearSaltwater, Antimatter

Resource flow mode

How a resource moves between parts (flowMode on a resource). Usable by name or number.

NULL, NO_FLOW, ALL_VESSEL, STAGE_PRIORITY_FLOW, STACK_PRIORITY_SEARCH, STAGE_STACK_FLOW_BALANCE

Resource transfer mode

NONE, PUMP

Attach node type and method

The kind of attachment node (nodeType) and its physics method (attachMethod).

  • Node type: Stack, Surface, Dock

  • Attach method: FIXED_JOINT, HINGE_JOINT, LOCKED_JOINT, MERGED_PHYSICS, NO_PHYSICS, NONE

Science situations

The environment a science experiment is taken in.

None, HighOrbit, LowOrbit, Atmosphere, Splashed, Landed

Science experiment and report type

  • Experiment type: DataType, SampleType, Both

  • Report type: DataType, SampleType

Mission enums

Used when patching missions. See Missions.

  • Owner: None, Global, Agency, Player

  • Type: Primary, Secondary, Tutorial, FTUE

  • State: Inactive, Active, Complete, Failed, Invalid

  • Reward type: None, SciencePoints

  • Logical operator (conditions): OR, AND, XOR, NOT

  • Property operator (conditions): LESSER, EQUAL, GREATER

Patch pass and ordering

Set through the chain methods, not as strings, but listed here for completeness. See The patch lifecycle.

  • Pass: Early, Default, Late (via :Early(), :Late())

  • Ordering: First, Default, Last (via :First(), :Last())