Jump to content

Docking Port module Decouple option


Recommended Posts

So I tried to make a part that behaves like a docking port. This is almost identical to existing stock docking part, but I do not have a decouple option, only a "control from here" option.

Does that behavior not come with the ModuleDockingNode? Do I need to make a plugin that inherits from the DockingPort class?

Obviously plugins give you alot more control to implement custom code, but when you instead are trying to leverage existing stock behavior, what is the difference between using a module in a part config, versus inheriting from the part in a plugin?


PART {
name = testPort
module = Part
author = aaron


mesh = model.mu
scale = 1
rescaleFactor = 1


node_stack_top = 0.0, 1, 0.0, 0.0, 1.0, 0.0, 1
node_stack_bottom = 0.0, -1, 0.0, 0.0, -1.0, 0.0, 3
node_attach = 0.0, 0, 0.0, 0.0, 0, 1.0


TechRequired = advConstruction
entryCost = 12500
cost = 12500
category = Utility
subcategory = 0
title = Test
manufacturer = Test
description = Test
attachRules = 1,1,1,1,0


// --- standard part parameters ---
mass = 10
dragModelType = override
maximum_drag = 0
minimum_drag = 0
angularDrag = 0
crashTolerance = 9
breakingForce = 600
breakingTorque = 600
maxTemp = 5000

MODULE
{
name = ModuleDockingNode
referenceAttachNode = top
nodeType = size1
}



}

Link to comment
Share on other sites

Inheriting from Part is what was done in KSP a long time ago. If you want to implement a function for a part you need to inherit from PartModule.

As for you problem the part needs a transform to position where the docking is actually done. By default the module search for a transform named "dockingNode" or you can set nodeTransformName with the module config.

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