Configuring core part data
Before configuring the module data for parts, it is recommended to know about [mesh modeling](Modeling the mesh in Blender.md).
General configuration
Add Code Part Data: click on the root object
myMod_myPart> Add Component > Core Part Data.If this option is not available, right-click on the KSP2 package > Reimport.
Fill in the form.
Meta Data
Field name | Value/comment |
|---|---|
Part Name | It has to be the same thing as the root game object: |
Author | Your modder name |
Descriptors
Field name | Value/comment |
|---|---|
Category | See List of categories/families |
Family | See List of categories/families |
Size Category | Choose a size |
(no name)
Field name | Value/comment |
|---|---|
Tags | Keywords allowing you to find the part in the VAB search (eg: "Apollo") |
Properties
Field name | Value/comment |
|---|---|
Fuel Cross Feed | Check it to allow the propellants to pass through the part |
Mass | In metric tons |
Attach Rules | Check the desired attachment types. |
Note
Stack: allows the part to be stacked to another part
Srf Attach: allows the part to be attached to a surface
Allow Stack: allows another part to be stacked to this part
Allow Srf Attach: allows another part to be attached to the surface of this part
The other options do not seem to have any influence on the game.
Attach Nodes
If “Stack” was checked, you must add a top node and a bottom node. If “Srf Attach” was checked, you must add a srfAttach node.
Field name | Value/comment |
|---|---|
Node ID | “top”, “bottom”, “srfAttach”, etc. (case sensitive!) |
Node Type | Select the appropriate value. |
Attach Method |
|
Is Multi Joint | Checked |
Multi Joint Max Joint |
|
Position | Enter the node's coordinates. You can pick theme up in Blender. For easier set up, check “Gizmo” in Unity and display the meshes as wireframes. |
Orientation | Enter the coordinates of the vector in normalized base (length = 1). |
Size |
|
Visual Size |
|
Is Resource Crossfeed |
|
Is Rigid |
|
Additional configuration
Add Module Drag: click on Add Component > Module_Drag.
Depending on what kind of part you are making, reference the part modules sections for additional config options.
Generate prefab: move the root object to the Asset folder in the project window. This generates a prefab.
Apply Options: select the root part and in the Inspector window near the top on the Prefab line, click the Overrides dropdown and choose “Apply All”. If this option is not available, then you’ve got nothing you need to do here. Move along, move along.
Save JSON: at the bottom of the “Core Part Data” panel, click on “Save Part JSON”. Note
Note: It is important to remember that whenever you make any changes to the prefab or its components, you will need to re-apply the overrides (step 4) and save the updated JSON file (step 5).
Features
A part loads only in campaigns that have your mod on. A part can belong to one of the other features of your mod, for example an optional part set. Use the Features section of the Core Part Data panel:
To load the part only while a feature is on, list that feature under Features.
To remove the part while a feature is on, list that feature under Excluded Features.
For a part that is always in your mod, keep both lists empty.
The section writes Addressables labels on the part JSON. The game filters the part JSON, so the prefab and the icon do not need labels.
Part modules
Command modules
Click on Add Component > Module_Command.
Fill in the fields.
Field | Value/Comment |
|---|---|
Module_Command | |
Minimum Crew |
|
Has Hibernation |
|
Requires Comm Net |
|
Alternate Control Orientations |
|
Reaction wheels
Click on Add Component > Module_ReactionWheel.
Fill in the fields.
Field | Value/Comment |
|---|---|
Module_ReactionWheel | |
Pitch Torque | Ex: |
Yaw Torque | Ex: |
Roll Torque | Ex: |
Torque Response Speed | Ex: |
RequiredResources |
|
Decouplers
Click on Add Component > Module_Decouple.
Fill in the fields.
Field | Value/Comment |
|---|---|
Core Part Data | |
Stage Type |
|
Staging Icon Asset Address |
|
Tags | Ex : |
Module_Decouple | |
Explosive Node ID |
|
Explosive Dir |
|
Docking ports
Click on Add Component > Module_Docking Node.
Fill in the fields.
Field | Value/Comment |
|---|---|
Module_Docking Node | |
Docking Transform Name | The name of your game object that defines where the docking port should attach to other docking ports. Remember that foward in Unity is along the blue axis, so point the game object (usually a Empty object) along that direction |
Control Transform Name | The direction to change to when clicking on Control from Here in the Parts action menu in game. Again, point the blue axis in the direction you want |
Attachment Node id | The node to connect to when docking (I think) |
Node Types | Any array of node sizes that determines which types of docking ports yours can dock to. For example, |
Undock Ejection Force | How much force to use when undocking. The default |
Min Distance To Reengage | How far away the ship should get before the docking port will dock again |
Acquire Range | How close the docking port needs to get to the other port before they will magnetically attract |
Acquire Torque | How much torque the docking port can apply to align the connection in the non-roll axis? |
Acquire TorqueRoll | How much torque the docking port can apply to align the connection in the roll axis? |
Capture Range | How far away the two docking ports need to be before they will lock together |
Capture Min Fwd | This value determines how much of a difference there can be in the dot product of the two docking transforms of both docking ports that are currently attempting to dock. |
Capture Min Roll Dot | Not sure |
Capture Max Rvel | Not sure |
fx Dock Prefab Name | The effect to use when docking |
fx Undock Prefab Name | The effect to use when undocking |
Is Gendered | Se to true to make this docking port gendered, which means that you need a male and female port to dock. This could be useful for recreating soviet style drogue and probe docking ports, for example |
Is Gender Female | If using gendered docking ports, marking this true creates a female docking port |
Snap Rotation | Set to true if the docking port should snap to angles |
Snap Offset | The angle to snap to when using Snap Rotation |
Current State | The default state of the port. You probably want to leave this at Ready |
Is Deployable Docking Port | Set to true if this is a deployable docking port, like the stock MK1/2 deployable docking ports |
Generators
Electric charge
Click on Add Component > Module_Generator.
Fill in the fields.
Field | Value/Comment |
|---|---|
Core Part Data | |
Rate | Ex: |
Resource |
|
Acceptance Threshold | Ex: |