API:List of Part Modules

From Kerbal Space Program Wiki
Revision as of 15:55, 25 March 2016 by Pizzaoverhead (talk | contribs) (Added more details.)
Jump to: navigation, search

Behaviour is added to parts in KSP using modular components called part modules. These are classes which derive from PartModule. Multiple simple modules can be added to parts to build up complex behaviour. For example, the J-90 "Goliath" Turbofan Engine

Part modules can be added to a part by editing that part's configuration file. For example, to add a part module called "ModuleName" to a part, the part's configuration file should be edited to include the following before the final closing '}' in the file:

MODULE
{
	name = ModuleName
}

The following is an incomplete list of the part modules in KSP as of version 1.0.5.

Module name Notes
FXModuleAnimateThrottle Varies the state of an animation based on the current throttle setting. Most commonly used to make rocket engines glow orange when they're running.
FXModuleConstrainPosition Used to automatically position, rotate or constrain movement of a [[1]] relative to another. For example, rotating mounting struts to stay attached to a gimballing engine, or keeping wheel suspension attached to the wheel as it bounces.
ModuleAblator Used for heat shields to provide thermal protection during re-entry. The module consumes the resource named in ablativeResource as it does this (normally Ablator, defined outside the part module). The part's colour is also darkened as ablataiveResource is depleted.
ModuleActiveRadiator Used for radiators to remove heat from the craft at the cost of a named resource, normally electric charge.
ModuleAdvancedLandingGear Unknown. Appears unused.
ModuleAerodynamicLift Unknown. Appears unused.
ModuleAeroSurface Allows toggling to a high-drag mode while activating an animation. Currently used only for the airbrake part.
ModuleAlternator Generates the specified resource, normally electric charge, at a rate dependent on the thrust of an engine module within the same part.
ModuleAnalysisResource Used in the Surface Scanning Module part to provide right-click abundance percentage for the given resourceName, ore.
ModuleAnchoredDecoupler Used in radial decouplers to detach the part.
ModuleAnimateGeneric Used to toggle animations via right-click menu or action group, for example toggling cockpit lights, engaging thrust reversers, or opening and closing cargo bay doors.
ModuleAnimateHeat Varies the state of an animation based on the part's heat. Used to provide the orange glow on intakes and nose cones as they heat up.
ModuleAnimationGroup Used to play "deploy" and looped "running" animations for parts such as the Convert-O-Tron 250 and the 'Drill-O-Matic' Mining Excavator
ModuleAnimatorLandingGear Unknown. Appears unused.
ModuleAsteroid Used to create procedural asteroids.
ModuleAsteroidAnalysis Provides mining resource information to ModuleAnalysisResource for procedural asteroids.
ModuleAsteroidDrill Used in mining drills to allow resource (ore) extraction from procedural asteroids.
ModuleAsteroidInfo Provides right-click information for procedural asteroid mass and resources.
ModuleAsteroidResource Used in procedural asteroids to provide mining resource abundance information for the given resourceName, ore.
ModuleBiomeScanner Used in the Surface Scanning Module to provide resource analysis of a biome.
ModuleCargoBay Used in cargo bays. Controls whether parts inside the bay are shielded from aerodynamic effects.
ModuleCommand Deals with allowing control of a vessel, e.g. in a crew pod or probe core, changing the control point via "Control From Here", as well as renaming the vessel.
ModuleConductionMultiplier Modifies how heat conducts between the part and parts connected to it.
ModuleControlSurface Used for controllable aerodynamic surfaces such as ailerons and fins.
ModuleCoreHeat Used to provide a separate heat area (i.e. not internal or surface) for parts which have high internal temperatures that don't easily conduct through to nearby parts. Used in the RTG, resource harvesters and resource converters.
ModuleDataTransmitter Transmits science data in exchange for electric charge.
ModuleDecouple Used in decouplers to break the connection of the specified attach node.
ModuleDeployableRadiator Used in deployable radiators to provide deployment animation control, sun tracking animation and heat removal.
ModuleDeployableSolarPanel Used in deployable solar panels to provide deployment animation control, sun tracking animation and electric charge generation.
ModuleDisplaceTweak Unknown. Appears unused.
ModuleDockingNode Used in docking ports to provide docking functionality, such as merging two craft into one or splitting them apart, and the docking attraction force between ports. Supports gendered docking ports and angle snap, although these are currently unused in stock KSP.
ModuleDragModifier Used in parachutes to override their debloyed and semideployed drag cube to generate additional drag force.
ModuleEffectTest Unknown. Appears unused.
ModuleEngines This part module has been made obsolete by ModuleEnginesFX. It provides thrust in exchange for a propellant resource.
ModuleEnginesFX An upgraded version of ModuleEngines which provides support for EFFECTS nodes (particle and sound effects).
ModuleEnviroSensor Provides data in the part's right-click menu in exchange for electric charge. The data displayed is determined by sensorType, which can be TEMP (temperature), GRAV (gravity), ACC (accelleration), or PRES (pressure).
ModuleFuelJettison Used in mining resource tanks to destroy contained resources.
ModuleGenerator Creates the specified OUTPUT_RESOURCE at the given rate. Used in the RTG and launch clamps.
ModuleGimbal Provides engine gimballing, i.e. the ability to change the direction thrust leaves an engine.
ModuleGPS Used in the M4435 Narrow-Band Scanner and Surface Scanning Module to provide latitude, longitude, biome and body information to the right-click menu.
ModuleGrappleNode Used in the Advanced Grabbing Unit to dock with other vessels without requiring a docking port on the other vessel.
ModuleHandle Included for clarification, this isn't actually a part of KSP or Unity, but .NET. [here for details].
ModuleHighDefCamera Used in the M4435 Narrow-Band Scanner to draw resource information onto bodies.
ModuleJettison Used to provide a jettisonable interstage fairing over parts such as engines. Provides the "Jettison" right-click menu option.
ModuleJointMotor Unknown. Appears unused.
ModuleJointMotorTest Unknown. Appears unused.
ModuleJointPivot Unknown. Appears unused.
ModuleLandingGear Used in aircraft landing wheels. Controls deploy/retract animations, braking, suspension and headlights.
ModuleLandingGearFixed Used in aircraft landing wheels that can't be retracted. Controls braking and suspension.
ModuleLandingLeg Used in deployable landing legs. Makes use of [[2]] to provide suspension damping.
ModuleLiftingSurface Used in wings to define the amount of lift and drag created.
ModuleLight Used in spotlight parts to create a light source which uses electric charge when active. User colour controls and an animation control to toggle the appearance of the light when active are also provided.
ModuleOrbitalScanner  ??
ModuleOrbitalSurveyor  ??
ModuleOverheadDisplay  ??
ModuleParachute  ??
ModulePhysicMaterial Unknown. Appears unused.
ModuleProceduralFairing  ??
ModuleRCS Used to provide Reaction Control System engines, using a separate player control scheme to regular engines.
ModuleReactionWheel Used in reaction wheels to provide torque used to steer the craft in exchange for consuming a resource (normally electric charge).
ModuleRemoteController Unknown. Appears unused.
ModuleResource Unknown. Appears unused.
ModuleResourceConverter  ??
ModuleResourceHarvester  ??
ModuleResourceIntake Used in air intakes to generate a resource when flying through a body's atmosphere, usually intake air.
ModuleResourceScanner  ??
ModuleRotatingJoint  ??
ModuleSampleCollector  ??
ModuleSampleContainer  ??
ModuleSAS  ??
ModuleScienceContainer  ??
ModuleScienceConverter  ??
ModuleScienceExperiment  ??
ModuleScienceLab  ??
ModuleSeeThroughObject Used in the service bays (1.25m and 2.5m) to allow the part to fade (using the shader specified in shaderName) to transparency on mouseover when in the VAB or SPH, allowing the user to see the contents when the doors are closed.
ModuleSteering Adds the ability to steer aircraft landing gear wheels to part modules implementing ISteerable, such as ModuleLandingGear and ModuleLandingGearFixed.
ModuleSurfaceFX Used with engines to provide dust effects when pointed at the ground, ocean or launchpad.
ModuleTestSubject Marks this part as being suitable for selection for generating part test missions. Specifies the constraints under which these missions should be defined (i.e. don't ask the player to test air-breathing engines in space or docking clamps on the Mun).
ModuleToggleCrossfeed Allows the right-click option to toggle whether fuel can pass through this part.
ModuleTripLogger Unknown. Appears unused.
ModuleWheel Used for rover wheels (not aircraft landing wheels) to control wheels which accept a resource (usually electric charge) and produce torque (i.e. the wheels can accelerate the craft). Also controls steering and suspension.