Jump to content

NODE{}, stack_node, nodeTransformName and referenceAttachNode problems.


CaptainKipard

Recommended Posts

I've tried a bunch of permutations of these and the only way to make a working docking port that can undock after being docked in the VAB is to still use the old stack_node definitions (instead of NODE{}) and referenceAttachNode referring to a stack node (rather than nodeTransformName referring to an empty) for the docking node.

Is this a bug or am I not doing it right?

Oh and it looks like a dockingNode empty still needs to be in the model eventhough it's not being used. Is this right?

Link to comment
Share on other sites

I've got it working with NODE{} defined nodes... well, it's not USING the NODE...

What I'm doing is defining 3 nodes, all at the same location - a controlNode, dockingNode, and bottomNode.

The bottonNode is in the NODE{} tag, with blue axis arrow pointing out.

the dockingNode points the same way - blue arrow out

the controlNode points with the green axis arrow out.

My docking module looks like this:

MODULE

{

name = ModuleDockingNode

referenceAttachNode = bottom

nodeType = size1

controlTransformName = nodeControl

}

nodeDocking DOES need to be present, it just doesn't have to be listed in the cfg file if you're naming it nodeDocking as this is the default.

Link to comment
Share on other sites

I have had docks working that utilized NODE, but I ended up reverting them to the old attach_node_* system. I forget why.... I think maybe because I needed them to be rescalable and they weren't. (needed 4 different sizes of the same thing)

On the subject the control transform, it is optional IF your control vector is the same as the part's transform. (in fact, if controlTransformName is omitted then it defaults to the part's transform). You only have to have a separate control transform if the dock points in a different direction than the part's Y axis.

Link to comment
Share on other sites

And... in checking one of my parts to try to help you... I discovered that I'd broken something else that I thought worked. Or maybe it did use to work and it's broken on it's own over the last update?

When I add a docking module to a part that is ALSO a probe core, I get two 'Control From Here' buttons in the context menu. I SWEAR that the top one used to set the reference transform back to the pod's rotation, and the bottom one set it to the docking port. Which was what I wanted.

What happens now is that the vessel starts out using the part's transform, and when I click the bottom "Control From Here" it switches to the docking port's transform... but neither button can make it switch back to the part's transform. It stays on the docking node's transform forever. Any thought on what's broken and how to fix it?

Link to comment
Share on other sites

So it's using stack_node definitions?

No, both stack nodes are defined via NODE{} tags. But the docking module also requires two additional gameobjects placed in Unity. That's what I meant by not USING them. With a dockingNode and controlNode, you don't NEED any stack nodes... I believe, but could be wrong because I haven't deleted the line and tested, that pointing referenceAttachNode at a stack node is the bit that allows you to connect it in the VAB and then undock it later... and this works just fine with NODE{} defined attachment points.

And to add to Starwaster's point, a separately placed control transform can be useful even if the docking axis lines up with the part axis if the dockingnode isn't in the same exact position as the object's center in all 3 directions. Both RPM and DPAI calculate x,y and closure distances based on the reference transform, so it can be beneficial to specify exactly where you want them to measure from.

Link to comment
Share on other sites

No, both stack nodes are defined via NODE{} tags. But the docking module also requires two additional gameobjects placed in Unity. That's what I meant by not USING them. With a dockingNode and controlNode, you don't NEED any stack nodes... I believe, but could be wrong because I haven't deleted the line and tested, that pointing referenceAttachNode at a stack node is the bit that allows you to connect it in the VAB and then undock it later... and this works just fine with NODE{} defined attachment points.

The key question that I asked and no one answered yet, is whether anyone managed to get it working AND have it decouple when coupled in the VAB or SPH. I'm pretty sure you need a stack node of some kind at the same place as the docking node.

My problem so far is that with NODE{} and a dockingNode empty (with nodeTransformName ) instead of a referenceAttachNode it, wont decouple when launched, in fact the button says "Undock" instead of "Decouple Node", which is my first clue that the NODEs are connected, and the docking port is just docked after the launch (you know how people create double dock connection? one of the docking ports docks immediately after launch) and undocking it does nothing, because the NODEs are connected.

Link to comment
Share on other sites

PART
{



// --- general parameters ---
name = ltskycrane
module = Part
author = Art


// --- asset parameters ---
MODEL
{
model = AxialAerospace/Parts/landertek/ltskycrane
scale=1,1,1
}
scale = 1
rescaleFactor = 1




// --- node definitions ---
NODE
{
name = top
transform = nodeTop // Or whatever your transform name is.
size = 1 // Will always be 0 until fixed.
method = FIXED_JOINT // will always be FIXED_JOINT until fixed.
}


NODE
{
name = bottom
transform = nodeBot // Or whatever your transform name is.
size = 1 // Will always be 0 until fixed.
method = FIXED_JOINT // will always be FIXED_JOINT until fixed.
}






// --- FX definitions ---


fx_exhaustFlame_blue_small = 0.0, -21.0, 0.0, 0.0, 1.0, 0.0, running
fx_exhaustLight_blue = 0.0, -21.0, 0.0, 0.0, 0.0, 1.0, running
fx_smokeTrail_light = 0.0, -21.0, 0.0, 0.0, 1.0, 0.0, running


// --- Sound FX definition ---


sound_vent_medium = engage
sound_rocket_hard = running
sound_vent_soft = disengage
sound_explosion_low = flameout


// --- editor parameters ---
TechRequired = survivability
entryCost = 1600
cost = 750
category = Pods
subcategory = 0
title = LT Sky Crane
manufacturer = Axial Aerospace
description =Skycrane... crane in the sky.
// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
attachRules = 1,0,1,1,0


// --- standard part parameters ---
mass = 1.2
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.2
angularDrag = 2
crashTolerance = 12
maxTemp = 3600
vesselType = Probe


MODULE
{
name = ModuleCommand
minimumCrew = 0
}


RESOURCE
{
name = ElectricCharge
amount = 150
maxAmount = 150
}


MODULE
{
name = ModuleSAS
SASServiceLevel = 3
}


MODULE
{
name = ModuleDockingNode
referenceAttachNode = bottom
nodeType = size1
controlTransformName = nodeControl
}
MODULE
{
name = ModuleReactionWheel

PitchTorque = 4
YawTorque = 4
RollTorque = 3

RESOURCE
{
name = ElectricCharge
rate = .4
}
}
MODULE
{
name = ModuleEngines
thrustVectorTransformName = thrustTransform
exhaustDamage = True
ignitionThreshold = 0.1
minThrust = 0
maxThrust = 50
heatProduction = 300
fxOffset = 0, 0, 0.21
PROPELLANT
{
name = LiquidFuel
ratio = 0.9
DrawGauge = True
}
PROPELLANT
{
name = Oxidizer
ratio = 1.1
}
atmosphereCurve
{
key = 0 390
key = 1 300
}

}


MODULE
{
name = ModuleGimbal
gimbalTransformName = thrustTransform
gimbalRange = 0.5
}




RESOURCE
{
name = LiquidFuel
amount = 90
maxAmount = 90
}


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






}

FiiSECX.jpg

referenceAttachNode - the node that attaches in VAB (and subsequently decouples) (uses node name, not transform name- bottom or top in this example, not nodeBot or nodeTop)

nodeTransformName - allows you to explicitly rename the docking node. Not necessary if you're using dockingNode as the node name in Unity

controlTransformName - the transform that specifies the control axis, used for 'Control From Here'.

Now, why ksp doesn't automatically use one transform for nodeTransformName and controlTransformName, I don't know, but it doesn't. So I create all three transforms at the same place (with appropriately different rotations), turn nodeBot into a node named bottom (using the NODE{} tag) and define the other two transforms in the docking module cfg.

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...