More actions
Compiling info from individual pages on part module data config into one Tag: 2017 source edit |
Moved over content from another config page |
||
Line 1: | Line 1: | ||
Before configuring the module data for parts, it is recommended to know about [[Modeling the mesh in Blender|mesh modeling]]. | Before configuring the module data for parts, it is recommended to know about [[Modeling the mesh in Blender|mesh modeling]]. | ||
== Command modules == | == General configuration == | ||
# Add Code Part Data: click on the root object <code>myMod_myPart</code> '''> Add Component > Core Part Data'''. | |||
# If this option is not available, right-click on the KSP2 package '''>''' '''Reimport'''. | |||
# Fill in the form. | |||
=== Meta Data === | |||
{| class="wikitable" | |||
!Field name | |||
!Value/comment | |||
|- | |||
|Part Name | |||
|It has to be the same thing as the root game object: <code>myMod_myPart</code> | |||
|- | |||
|Author | |||
|Your modder name | |||
|} | |||
=== Descriptors === | |||
{| class="wikitable" | |||
!Field name | |||
!Value/comment | |||
|- | |||
|Category | |||
|See List of categories/families | |||
|- | |||
|Family | |||
|See List of categories/families | |||
|- | |||
|Size Category | |||
|Choose a size | |||
|} | |||
=== (no name) === | |||
{| class="wikitable" | |||
!Field name | |||
!Value/comment | |||
|- | |||
|Tags | |||
|Keywords allowing you to find the part in the VAB search (eg: "Apollo") | |||
|} | |||
=== Properties === | |||
{| class="wikitable" | |||
!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. | |||
|} | |||
<blockquote>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.</blockquote> | |||
=== Attach Nodes === | |||
If “Stack” was checked, you must add a <code>top</code> node and a <code>bottom</code> node. If “Srf Attach” was checked, you must add a <code>srfAttach</code> node. | |||
{| class="wikitable" | |||
!Field name | |||
!Value/comment | |||
|- | |||
|Node ID | |||
|“top”, “bottom”, “srfAttach”, etc. (case sensitive!) | |||
|- | |||
|Node Type | |||
|Select the appropriate value. | |||
|- | |||
|Attach Method | |||
|Fixed_Joint for Stack. Hinge_Joint for Surface Attach. | |||
|- | |||
|Is Multi Joint | |||
|Checked | |||
|- | |||
|Multi Joint Max Joint | |||
|3 | |||
|- | |||
|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 | |||
|1 | |||
|- | |||
|Visual Size | |||
|1 | |||
|- | |||
|Is Resource Crossfeed | |||
|True | |||
|- | |||
|Is Rigid | |||
|True | |||
|} | |||
== 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).''' | |||
== Part modules == | |||
=== Command modules === | |||
# Click on '''Add Component > Module_Command'''. | # Click on '''Add Component > Module_Command'''. | ||
# Fill in the fields. | # Fill in the fields. | ||
Line 31: | Line 151: | ||
[[Category:Parts and modules]] | [[Category:Parts and modules]] | ||
== Reaction wheels == | === Reaction wheels === | ||
# Click on '''Add Component > Module_ReactionWheel'''. | # Click on '''Add Component > Module_ReactionWheel'''. | ||
# Fill in the fields. | # Fill in the fields. | ||
Line 183: | Line 303: | ||
[[Category:Parts and modules]] | [[Category:Parts and modules]] | ||
== Generators == | |||
=== Electric charge === | === Electric charge === | ||
# Click on '''Add Component > Module_Generator'''. | # Click on '''Add Component > Module_Generator'''. |
Latest revision as of 19:22, 9 October 2024
Before configuring the module data for parts, it is recommended to know about mesh modeling.
General configuration[edit | edit source]
- 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[edit | edit source]
Field name | Value/comment |
---|---|
Part Name | It has to be the same thing as the root game object: myMod_myPart
|
Author | Your modder name |
Descriptors[edit | edit source]
Field name | Value/comment |
---|---|
Category | See List of categories/families |
Family | See List of categories/families |
Size Category | Choose a size |
(no name)[edit | edit source]
Field name | Value/comment |
---|---|
Tags | Keywords allowing you to find the part in the VAB search (eg: "Apollo") |
Properties[edit | edit source]
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[edit | edit source]
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 | Fixed_Joint for Stack. Hinge_Joint for Surface Attach. |
Is Multi Joint | Checked |
Multi Joint Max Joint | 3 |
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 | 1 |
Visual Size | 1 |
Is Resource Crossfeed | True |
Is Rigid | True |
Additional configuration[edit | edit source]
- 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).
Part modules[edit | edit source]
Command modules[edit | edit source]
- Click on Add Component > Module_Command.
- Fill in the fields.
Field | Value/Comment |
---|---|
Module_Command | |
Minimum Crew | 1 for pods
0 for probes |
Has Hibernation | False for pods
True for probes |
Requires Comm Net | False for pods
True for probes |
Alternate Control Orientations | Id: "Reversed"
Orientation: 0;0;180 Position: 0;0;0 |
Reaction wheels[edit | edit source]
- Click on Add Component > Module_ReactionWheel.
- Fill in the fields.
Field | Value/Comment |
---|---|
Module_ReactionWheel | |
Pitch Torque | Ex: 5 |
Yaw Torque | Ex: 5 |
Roll Torque | Ex: 5 |
Torque Response Speed | Ex: 30 |
RequiredResources | Rate: 0.025
ResourceName: "ElectricCharge" AcceptanceThreshold: 0.01 |
Decouplers[edit | edit source]
- Click on Add Component > Module_Decouple.
- Fill in the fields.
Field | Value/Comment |
---|---|
Core Part Data | |
Stage Type | Decoupler Horizontal
Decoupler Vertical |
Staging Icon Asset Address | “Staging-Icon-Inline.png” |
Tags | Ex : “break decouple separat split stag” |
Module_Decouple | |
Explosive Node ID | “top” or “bottom” |
Explosive Dir | 0;-1;0 so that the decoupler goes downwards
0;1;0 so that the decoupler goes upwards |
Docking ports[edit | edit source]
- 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, size0 is stock 0.625m diameter docking ports, size1 is 1.25m, and so on. Since this is an array, you can list multiple different types that the port can dock to. You can also use this to create custom docking port sizes, since it is an array of strings rather than enums. |
Undock Ejection Force | How much force to use when undocking. The default 10 is probably too much for smaller ports.
The stock 1.25m port uses a value of 0.4 |
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[edit | edit source]
Electric charge[edit | edit source]
- Click on Add Component > Module_Generator.
- Fill in the fields.
Field | Value/Comment |
---|---|
Core Part Data | |
Rate | Ex: 5.5 |
Resource | "Electric Charge" |
Acceptance Threshold | Ex: 5.5 |