Difference between revisions of "Module"
Joshuadery (talk | contribs) (→MODULES POSSIBLY FROM MODS) |
Joshuadery (talk | contribs) (→ModuleDockingNode) |
||
Line 688: | Line 688: | ||
| referenceAttachNode || | | referenceAttachNode || | ||
* top | * top | ||
− | * bottom | + | * bottom |
+ | * dockingNode | ||
|| | || | ||
Specifies the node on the part that is used for the docking port, generally top or bottom | Specifies the node on the part that is used for the docking port, generally top or bottom | ||
Line 702: | Line 703: | ||
* size0 | * size0 | ||
|| Specifies the type of node for attachment. When perform docking operations, nodes must have the same value for nodeType in order to dock with one another. | || Specifies the type of node for attachment. When perform docking operations, nodes must have the same value for nodeType in order to dock with one another. | ||
+ | |- | ||
+ | | nodeTransformName || | ||
+ | * dockingNode | ||
+ | * DOCKING | ||
+ | || unknown | ||
|- | |- | ||
| controlTransformName || | | controlTransformName || | ||
* controlNode | * controlNode | ||
|| apparently only used for docking nodes that have related animations, see dockingPortInline | || apparently only used for docking nodes that have related animations, see dockingPortInline | ||
+ | |- | ||
+ | | undockEjectionForce || | ||
+ | * 0.25 | ||
+ | || Force in d/v applied on undock | ||
+ | |- | ||
+ | | minDistanceToReEngage || | ||
+ | * 3.5 | ||
+ | || Docking Nodes must separate by this many meters before being able to reengage | ||
+ | |- | ||
+ | | acquireForce || | ||
+ | * 3.5 | ||
+ | || magnetic grip, in d/v | ||
+ | |- | ||
+ | | acquireTorque || | ||
+ | * 3.5 | ||
+ | || rotational magnetic grip, in d/v | ||
+ | |- | ||
+ | | acquireRange || | ||
+ | * 3 | ||
+ | || maximum distance to begin applying magnetic grip | ||
+ | |- | ||
+ | | captureRange || | ||
+ | * 1.5 | ||
+ | || maximum range to begin docking | ||
|} | |} | ||
Line 715: | Line 745: | ||
referenceAttachNode = top | referenceAttachNode = top | ||
nodeType = size2 | nodeType = size2 | ||
+ | undockEjectionForce = 0.25 | ||
+ | minDistanceToReEngage = 3.5 | ||
+ | acquireForce = 3.5 | ||
+ | acquireTorque = 3.5 | ||
+ | acquireRange = 3.0 | ||
+ | captureRange = 1.5 | ||
} | } | ||
</pre> | </pre> |
Revision as of 13:47, 26 December 2014
Modules define what specific parts can do. They are generally calls to C-coded or hard-coded functions that define what functionality these parts have in-game. If you are a new part designer, modder, engineer, or someone else who makes parts, please check the STOCK modules list before designing a new module. Each additional module increases the CPU workload and reduces FPS and Physics. All 0.90 stock modules are now included.
name | names define the module in use and are a general indication of what the module subtype does. Specific variables are associated with each [module].[name]. For example, the Clamp-O-Tron Docking Port Sr. has the MODULE.name ModuleDockingNode and its' associates variables are [referenceAttachNode] and [nodeType]. Some [MODULE]s share variables with other modules, which can make deciphering their purpose difficult. |
Contents
- 1 STOCK MODULES
- 1.1 CModuleFuelLine
- 1.2 CModuleLinkedMesh
- 1.3 CModuleStrut
- 1.4 FlagDecal
- 1.5 FXModuleAnimateThrottle
- 1.6 FXModuleConstrainPosition
- 1.7 FXModuleLookAtConstraint
- 1.8 KerbalSeat
- 1.9 LaunchClamp
- 1.10 ModuleAlternator
- 1.11 ModuleAnchoredDecoupler
- 1.12 ModuleAnimateGeneric
- 1.13 ModuleAnimateHeat
- 1.14 ModuleAsteroid
- 1.15 ModuleCommand
- 1.16 ModuleControlSurface
- 1.17 ModuleDataTransmitter
- 1.18 ModuleDecouple
- 1.19 ModuleDeployableSolarPanel
- 1.20 ModuleDockingNode
- 1.21 ModuleEngines
- 1.22 ModuleEnginesFX
- 1.23 ModuleEnviroSensor
- 1.24 ModuleGenerator
- 1.25 ModuleGimbal
- 1.26 ModuleGrappleNode
- 1.27 ModuleJettison
- 1.28 ModuleLandingGear
- 1.29 ModuleLandingLeg
- 1.30 ModuleLight
- 1.31 ModuleParachute
- 1.32 ModuleRCS
- 1.33 ModuleReactionWheel
- 1.34 ModuleResourceIntake
- 1.35 ModuleSAS
- 1.36 ModuleScienceContainer
- 1.37 ModuleScienceExperiment
- 1.38 ModuleScienceLab
- 1.39 ModuleSteering
- 1.40 ModuleTestSubject
- 1.41 ModuleWheel
- 1.42 MultiModeEngine
- 1.43 RetractableLadder
- 2 MODULES FROM MODS
STOCK MODULES
explanation | code examples | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CModuleFuelLineNo known arguments or variables at this time. This module is used by fuelLine, presumably to specify that it is fuel Transfer enabled. More research is clearly called for. This module is new in 0.90. |
MODULE { name = CModuleFuelLine } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CModuleLinkedMeshThis module is new in 0.90 and is used by fuelLine and strutConnector, presumably to created the variable length connectors between two parts (and add end caps on both sides).
|
MODULE { name = CModuleLinkedMesh lineObjName = obj_line targetAnchorName = obj_targetAnchor anchorCapName = obj_anchorCap targetCapName = obj_targetCap } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CModuleStrutThis module is new in 0.90 and is used by strutConnector, presumably to indicate that it is a structural support part.
|
MODULE { name = CModuleStrut linearStrength = 150 angularStrength = 150 } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
FlagDecalParts with this module have a place for a flag on their sides. You don't have to turn it on, but this is how it gets there.
|
MODULE { name = FlagDecal textureQuadName = flagTransform } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
FXModuleAnimateThrottleAnimation for engines and engine bells showing them as they fire up and operate, based on the amount of throttle applied. See ion Engines for a good example.
|
MODULE { name = FXModuleAnimateThrottle animationName = colorAnimation dependOnEngineState = True responseSpeed = 0.5 } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
FXModuleConstrainPositionI don't know what this does.
|
MODULE { name = FXModuleConstrainPosition matchRotation = true matchPosition = false CONSTRAINFX { targetName = steering moversName = lateral } } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
FXModuleLookAtConstraintI don't know what this does either.
|
MODULE { name = FXModuleLookAtConstraint CONSTRAINLOOKFX { targetName = susp2-1 rotatorsName = susp2-2 } CONSTRAINLOOKFX { targetName = susp2-2 rotatorsName = susp2-1 } CONSTRAINLOOKFX { targetName = susp1-2 rotatorsName = susp1-1 } CONSTRAINLOOKFX { targetName = susp1-1 rotatorsName = susp1-2 } } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
KerbalSeatThis module makes the part have an EXTERIOR seat.
|
MODULE { name = KerbalSeat seatPivotName = seatPivot ejectDirection = 0, 1, 0.2 } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
LaunchClampThis module enables the part to hold a vessel in suspension on the launch pad.
|
MODULE { name = LaunchClamp trf_towerPivot_name = obj_girdercap trf_towerStretch_name = obj_girder trf_anchor_name = obj_ground trf_animationRoot_name = launchclamp anim_decouple_name = launchclamp } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ModuleAlternatorSpecifies that this part produced a resource, based on the percentage of thrust produced by the engine.
|
MODULE { name = ModuleAlternator RESOURCE { name = ElectricCharge rate = 5.0 } } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ModuleAnchoredDecouplerThis module specifies that the part is attached (anchored) to another part, and will decouple from yet a third part, forcing the third part away from it.
|
MODULE { name = ModuleAnchoredDecoupler anchorName = anchor ejectionForce = 450 explosiveNodeID = srf } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ModuleAnimateGenericGeneric Animations will be applied to parts with this module. This module is slowly replacing other animation modules as progression is made towards the release version of KSP.
|
MODULE { name = ModuleAnimateGeneric animationName = dish isOneShot = false startEventGUIName = Extend endEventGUIName = Retract actionGUIName = Toggle Antenna } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ModuleAnimateHeatThis module specifies that heating animation will be applied to this part.
|
MODULE { name = ModuleAnimateHeat ThermalAnim = HeatAnimatioEmissiveLiquidEngine3 } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ModuleAsteroidBecause it has no procedures or calls, is new in [0.90] and only appears on a part that you must hack to have available, it is impossible to say for certain what this module does, but it has something to do with being an asteroid. no procedures or calls |
MODULE { name = ModuleAsteroid } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ModuleCommandApplies Command to vessels
|
MODULE { name = ModuleCommand minimumCrew = 1 } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ModuleControlSurfaceThis module gives the part the ability to respond to inputs, generally used for aerodynamic parts to expose more or less effective surface to lift and braking forces in atmospheres.
|
MODULE { name = ModuleControlSurface dragCoeff = 0.5 deflectionLiftCoeff = 0.7 ctrlSurfaceRange = 20 ctrlSurfaceArea = 0.95 } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ModuleDataTransmitterThis module specifies that the part acts as a transmitter of data, typically an antenna of some sort, for broadcasting science data back to the KSC.
|
MODULE { name = ModuleDataTransmitter packetInterval = 0.18 packetSize = 2 packetResourceCost = 20.0 requiredResource = ElectricCharge DeployFxModules = 0 } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ModuleDecoupleModuleDecouple is a slightly upgraded version of ModuleAnchoredDecoupler, and may replace it in the future. Allows for decouplers that separate from both parts to which it is attached.
|
MODULE { name = ModuleDecouple ejectionForce = 250 explosiveNodeID = srf } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ModuleDeployableSolarPanelSolar panels cannot deploy without this module. May be possible to use for other modules which unfold. Optionally specifies whether the part will automatically turn to face the sun. This is one place where you can say how a part breaks.
|
MODULE { name = ModuleDeployableSolarPanel animationName = solarpanels2 resourceName = ElectricCharge chargeRate = 2 powerCurve { key = 206000000000 0 0 0 key = 13599840256 1 0 0 key = 68773560320 0.5 0 0 key = 0 10 0 0 } } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ModuleDockingNodeA module for docking ports
|
MODULE { name = ModuleDockingNode referenceAttachNode = top nodeType = size2 undockEjectionForce = 0.25 minDistanceToReEngage = 3.5 acquireForce = 3.5 acquireTorque = 3.5 acquireRange = 3.0 captureRange = 1.5 } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ModuleEnginesEverything about your engine, all in one module!
|
MODULE { name = ModuleEngines thrustVectorTransform Name = thrustTransform throttleLocked = True exhaustDamage = True allowShutdown = False ignitionThreshold = 0.1 minThrust = 0 maxThrust = 18 heatProduction = 550 fxOffset = 0, 0, 0.02 PROPELLANT { name = SolidFuel ratio = 1.0 DrawGauge = True } atmosphereCurve { key = 0 100 key = 1 100 } } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ModuleEnginesFXAn (updated?) version of ModuleEngines. Required for and allows implementation of multi-modal engines.
|
MODULE { name = ModuleEnginesFX thrustVectorTransformName = thrustTransform exhaustDamage = True ignitionThreshold = 0.1 minThrust = 0 maxThrust = 30 heatProduction = 150 fxOffset = 0, 0, 0.125 PROPELLANT { name = LiquidFuel ratio = 0.9 DrawGauge = True } PROPELLANT { name = Oxidizer ratio = 1.1 } atmosphereCurve { key = 0 350 key = 1 300 } } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ModuleEnviroSensorEnvironmental sensor definitions. Specifies that this part is one of these types of sensors.
|
MODULE { name = ModuleEnviroSensor sensorType = ACC } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ModuleGeneratorGenerators and Alternators serve must the same purpose, but generators are not linked to the percentage of thrust output of an engine, they simply produce. Some cannot be shut off. A generator may produce any available resource.
|
MODULE { name = ModuleGenerator isAlwaysActive = true OUTPUT_RESOURCE { name = ElectricCharge rate = 0.75 } } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ModuleGimbalGimballing represents an engine-bells ability to move around in relation to the engine body, provided a degree of ability to steer the vessel. Higher numbers indicate a higher range, but don't set it too high. Strange things will happen. Recommend limiting range to .90 at the absolute maximum.
|
MODULE { name = ModuleGimbal gimbalTransformName = thrustTransform gimbalRange = 0.5 } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ModuleGrappleNodeAdded in [0.90], specifically for the KASA asteroid capture missions, this part functions much like a dockingNode, however, it does not require a matching docking node on the capture-side. Grapplers can attach to anything (as far as we know).
|
MODULE { name = ModuleGrappleNode nodeTransformName = ArticulatedCap deployAnimationController = 1 nodeType = size1 captureRange = 0.05 captureMinFwdDot = 0.866 captureMaxRvel = 1 } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ModuleJettisonspecifies that pieces of this craft are able to be jettisoned, what they are and how to jettison them
|
MODULE { name = ModuleJettison jettisonName = fairing bottomNodeName = bottom isFairing = True jettisonedObjectMass = 0.1 jettisonForce = 5 jettisonDirection = 0 0 1 } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ModuleLandingGearSpecifies that the part is a landing gear, implying a wheel, and the traits of that wheel. Hopefully being deprecated in favor of moduleWheel below.
|
MODULE { name = ModuleLandingGear BrakeTorque = 12 BrakeSpeed = 3 } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ModuleLandingLegSpecifies that this part is a landing leg and describes compression and resistance factors for the part.
|
MODULE { name = ModuleLandingLeg animationName = Deploy wheelColliderName = wheelCollider suspensionTransformName = Piston orientFootToGround = true landingFootName = foot // Foot is aligned to up Axis instead of forward alignFootUp = true suspensionUpperLimit = 0.60 impactTolerance = 300 suspensionSpring = 1.25 suspensionDamper = 1 suspensionOffset = 0, 0.02,0 } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ModuleLightSpecifies that this part is a light source, and how that light is produced and directed.
|
MODULE { name = ModuleLight lightName = spotlight useAnimationDim = true lightBrightenSpeed = 2.5 lightDimSpeed = 2.5 animationName = LightAnimation resourceAmount = 0.02 useResources = true } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ModuleParachutespecifies that this part is a parachute and describes the operational parameters for parachute operations. Includes default settings for opening height and deployment atmospheric conditions.
|
MODULE { name = ModuleParachute semiDeployedAnimation = semiDeploySmall fullyDeployedAnimation = fullyDeploySmall invertCanopy = true autoCutSpeed = 0.5 capName = cap canopyName = canopy stowedDrag = 0.22 semiDeployedDrag = 1 fullyDeployedDrag = 500 minAirPressureToOpen = 0.01 deployAltitude = 500 deploymentSpeed = 1 semiDeploymentSpeed = 1 } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ModuleRCSSpecifies that this is a Reaction Control System part. Uses variable resources to control directionality of the spacecraft. Unlike engines, RCS parts are generally oriented perpendicular to all directions of a spacecraft in order to provide steering, rather than thrust. Typically, monopropellant is decompressively expelled from an RCS port to push the spacecraft in one direction. Note: ModuleRCS can use either a single resource, or a series of PROPELLANT calls.
|
MODULE { name = ModuleRCS thrusterTransformName = RCSthruster thrusterPower = 12 resourceName = LiquidFuel resourceFlowMode = STAGE_PRIORITY_FLOW PROPELLANT { name = LiquidFuel ratio = 0.9 DrawGauge = True resourceFlowMode = STAGE_PRIORITY_FLOW } PROPELLANT { name = Oxidizer ratio = 1.1 resourceFlowMode = STAGE_PRIORITY_FLOW } atmosphereCurve { key = 0 260 key = 1 140 } } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ModuleReactionWheelSpecifies that this part contains reaction wheels, used to stabilize the directionality of a spacecraft. Typically used for stability, rather than producing change, both are possible. If you're thinking that this does the same thing as RCS, you wouldn't be far off.
|
MODULE { name = ModuleReactionWheel PitchTorque = 30 YawTorque = 30 RollTorque = 30 RESOURCE { name = ElectricCharge rate = 0.6 } } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ModuleResourceIntakeUsed to create a part that produces a resource based on interaction with the environment.
|
MODULE { name = ModuleResourceIntake resourceName = IntakeAir checkForOxygen = true area = 0.006 intakeSpeed = 10 intakeTransformName = Intake } |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ModuleSASUsed as a reference to determine whether this part is activated by the SAS function of the interface. ie. when you turn on SAS, turn on this part. NOTE: [0.90] added SASServiceLevel (0-3)
|
MODULE { name = ModuleSAS SASServiceLevel = 1 } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ModuleScienceContainerA place to store the results of a science experiment.
|
MODULE { name = ModuleScienceContainer reviewActionName = Review Stored Data storeActionName = Store Experiments evaOnlyStorage = True storageRange = 4.0 } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ModuleScienceExperimentA place to conduct a science experiment.
|
MODULE { name = ModuleScienceExperiment experimentID = atmosphereAnalysis experimentActionName = Run Atmosphere Analysis resetActionName = Discard Data reviewActionName = Review Data useStaging = False useActionGroups = True hideUIwhenUnavailable = True rerunnable = True xmitDataScalar = 0.35 dataIsCollectable = True collectActionName = Download Data interactionRange = 1.2 } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ModuleScienceLabA place to modify a science experiment prior to transmission in order to gain more research points from it.
|
MODULE { name = ModuleScienceLab containerModuleIndex = 0 dataTransmissionBoost = 1.15 crewsRequired = 2 canResetConnectedModules = True canResetNearbyModules = True interactionRange = 5 RESOURCE_PROCESS { name = ElectricCharge amount = 10 } } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ModuleSteeringSpecifies that this part is steerable and provides the axis and animation information for steering the part.
|
MODULE { name = ModuleSteering controlAxisType = Forward steeringAxis = 0, 0, 1 steeringTransformName = Steering steeringLocked = true steeringCurve { key = 0 16 key = 10 9 key = 30 2 key = 100 1 } } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ModuleTestSubjectUsed for the contract system, determines atmospheric conditions under which this part may be considered for testing. Also specifies whether the part is able to be tested using the Staging process or must be manually selected and "Perform Test" used to satisfy contract requirements.
|
MODULE { name = ModuleTestSubject // nowhere: 0, srf: 1, ocean: 2, atmo: 4, space: 8 environments = 15 useStaging = False useEvent = True } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ModuleWheelThe better version of landingGear, with lots more options for the operation of wheels, including adding power, steering, and damage information.
|
MODULE { name = ModuleWheel hasMotor = true resourceName = ElectricCharge resourceConsumptionRate = 0.5 canSteer = true controlAxisType = Forward steeringModeType = AutomaticSteer brakeTorque = 180 brakeSpeed = 1.0 impactTolerance = 65 overSpeedDamage = 20 WHEEL { wheelName = wheel wheelColliderName = wheelCollider suspensionTransformName = suspensionTraverse suspensionNeutralPointName = suspensionNeutralPoint damagedObjectName = bustedwheel rotateX = 0 rotateY = 1 rotateZ = 0 } steeringCurve { key = 0 18 key = 15 6 } torqueCurve { key = 0 170 0 0 key = 2.5 100 0 0 key = 12 0 0 0 } } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
MultiModeEngineSpecifies that this part is an engine with multiple modes. Added in [0.90], it allows for engines that use different types of resources and provides different flight characteristics depending on which mode it is operating in. This module defines the different modes and passes them to moduleEnginesFX.
|
MODULE { name = MultiModeEngine primaryEngineID = AirBreathing secondaryEngineID = ClosedCycle }
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RetractableLadderJust like the name implies, this module is attached to parts that are or contain a retractable or collapsible ladder.
|
MODULE { name = RetractableLadder ladderAnimationRootName = TelusBay ladderColliderName = ladderCollider ladderRetractAnimationName = Retract } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
MODULES FROM MODS
Defining a module is a task in and of itself and one that I'm sure has already been covered in other places. Many modules defined by mods are duplicating effects that could be created with stock modules, but for one reason or another, the mod owner has decided to create their own modules (possibly for degree of control, possibly because the stock module didn't quite do everything they needed). In any event, I've looked at some of the Mod modules, and detailed them below. By mod, they are:
Kerbal Assembly System
Kerbal Assembly System is most noted for adding the option to grab and move parts using Kerbals. It also allows for storage of certain parts in containers.
MODULE:NEEDS[KAS] for the module
KASModuleContainer
Specifies that this part can serve as a container for other parts, and how much storage space the part has. Also included is an interaction distance. Kerbals must be this close or closer to open the container. Lots of sounds.
|
MODULE { name = KASModuleContainer maxSize = 80 } |