Jump to content

Dealing with the weirdness of part rooting.


PB666

Recommended Posts

This is in response to another post dealing with rooting. In this example demonstrates how to identify and get around rooting problems. This example is a worst case example for rooting since the primary node I want to create is not a predefined node, but it is on a solid surface. Here is the stock parts cfg file:

PART
{
name = Size3to2Adapter
module = Part
author = Squad

mesh = Size3Adapter.mu
rescaleFactor = 1

[B]node_stack_top = 0.0, 1.1, 0.0, 0.0, 1.0, 0.0, 2
node_stack_bottom = 0.0, -1.1, 0.0, 0.0, 1.0, 0.0, 3[/B]

TechRequired = veryHeavyRocketry
entryCost = 8800
cost = 2600
category = Structural
subcategory = 0
title = Kerbodyne ADTP-2-3
manufacturer = Kerbodyne
description = This adapter is used to bridge between Kerbodyne and Rockomax rocket bodies.

attachRules = 1,0,1,1,0

mass = 0.2
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.3
angularDrag = 2
crashTolerance = 6
breakingForce = 200
breakingTorque = 200
maxTemp = 2900

}

The above part would prefer to attach to the bottom node or alternatively its top node. If you added another node to the top of the bolded list it would basically ignore that node (my experience) for rooting.

This part was an ideal starting point for creating a head for a nacell such as a core rocket with three ground pointing nacells. As such it would make an good lander, with wide set feet, but also since the nacells arm would carry fuel, the entire ship can be ported and fuel from a single point (particularly convinient if one has a fuel generator), without the need for dorky looking fuel lines.

I wanted to use parts top and bottom node_stack points, and I wanted to add a nacell. This is not what I arrived at however due to the limitations of configuration. This is the part I derived. If you don't want to get into part modding I will summarize, the most desired attachment node is the last one in the list. Others maybe ignored, depending on the circumstances.

To understand how to create a new node you have to understand how attachment nodes are defined. In the example above the node is coordinated on the first three coordinates ....... = X, Y, Z. The math is funky and may change with version because of scale factoring so some fiddling may be required. The next three numbers are the orientation of the node = , , , X, Y, Z. These are important in determining the default attachment angle, getting this right makes attachment easier.

PART
{
name = FT50ThreeForthsToOneHalf
module = Part
author = derived of Squad

mesh = Size3Adapter.mu
rescaleFactor = 0.23

node_stack_bottom = 0.0, -1.1, 0.0, 0.0, 1.0, 0.0, 0
node_stack_top = 0.0, 0.0, 1.6, 0.0, 0.258, 0.965, 0

TechRequired = basicRocketry
entryCost = 300
cost = 110
category = Propulsion
subcategory = 0
title = Diagnonal mounted Nacell Head, Feuled
manufacturer =
description =

attachRules = 1,0,1,1,0

mass = 0.0270
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.3
angularDrag = 2
crashTolerance = 8
breakingForce = 75
breakingTorque = 75
maxTemp = 3500
RESOURCE
{
name = LiquidFuel
amount = 22.5
maxAmount = 22.5
}

RESOURCE
{
name = Oxidizer
amount = 27.5
maxAmount = 27.5
}
}

Note that this:

node_stack_top = 0.0, 1.1, 0.0, 0.0, 1.0, 0.0, 2
node_stack_bottom = 0.0, -1.1, 0.0, 0.0, 1.0, 0.0, 3

became this:

node_stack_bottom = 0.0, -1.1, 0.0, 0.0, 1.0, 0.0, 0
node_stack_top = 0.0, 0.0, 1.6, 0.0, 0.258, 0.965, 0

The most important line for directing rooting was the last line in the node_stack entry. I did fiddle around with this. I could deal without node_stack_bottom, replacing it with a node starting part, however the node_stack_bottom did not upset the part rooting. Adding another node_stack entry or node_attach disrupted or made difficult the attachment.

In this version of the part the top stack preferentially attaches to a radial node. The radial/rooting part should have a node pointing south and the part should approach the radial node from the south for convenient attachment. Fuel parts can attach to the node_stack_bottom. To create a node attachment on the CoG top one needs to use a node starter like modular girder segment (or modded equivalent) and then add nodes to top.

Note the stock part copy mod needs a new name

name = Altwhatever

and new title

title = Alternative Whatever . . . . 

and you may wish to tweek the attach rules.

You might not wish to modify your parts, but if you know where in the KSP directory your part is, by looking at the order of entries in the node_ . . . . list you can determine whether your stuff is buggy or it simply will not root through a certain node.

If anyone knows of a better way to design this part let me know.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...