Jump to content

Shielded Docking Port stageable version


Recommended Posts

Hello people,

I present you an attempt of mine to make the Clamp-O-Tron docking port stageable by giving it the ability to have something attached to the port.

Currently, though, I have two problems:

 

1. I have changed the complete part cfg, but I think it should be possible by just applying a MM patch to it.

2. It is possible to attach to the closed shield. Of course that's stupid and immersion breaking - does anybody know whether it is possible to only attach it to the closed shield? Or is that outside of the editor capabilities?

 

This is the code, I basically just copied some parts from the regular docking port to the shielded one's:

 

PART
{
	name = dockingPortX
	module = Part
	author = MBennock
	mesh = model.mu
	rescaleFactor = 1
	node_stack_top = 0.0, 0.2828832, 0.0, 0.0, 1.0, 0.0, 1
	node_stack_bottom = 0.0, -0.005308203, 0.0, 0.0, -1.0, 0.0, 1
	node_attach = 0.0, -0.005308203, 0.0, 0.0, -1.0, 0.0, 1
	TechRequired = advMetalworks
	entryCost = 8400
	cost = 400
	category = Utility
	subcategory = 0
	title = Shielded Docking Port
	description = This one can be used opened. Yeah, you heard right. OPENED!
	attachRules = 1,1,1,1,0
	mass = 0.1
	dragModelType = default
	maximum_drag = 0.25
	minimum_drag = 0.25
	angularDrag = 0.5
	crashTolerance = 10
	maxTemp = 2600 // = 3400
	thermalMassModifier = 6.0 // like a nose cone
	emissiveConstant = 0.8
	bulkheadProfiles = size1
	tags = berth capture connect couple dock fasten join moor shield socket
	stagingIcon = DECOUPLER_VERT
	MODULE
	{
		name = ModuleDockingNode
		deployAnimationController = 1
		referenceAttachNode = top
		nodeType = size1
		stagingEnabled = False
	}
	MODULE
	{
		name = ModuleAnimateGeneric
		animationName = dockingring
		actionGUIName = Toggle Shield
		startEventGUIName = Open Shield
		endEventGUIName = Close Shield
		allowAnimationWhileShielded = False
	}
}

 

Link to comment
Share on other sites

Hi what did you add to the part, just modified the attachment nodes?

Here's a basic Copy part script,   // https://github.com/sarbian/ModuleManager/wiki/Module-Manager-Syntax

$PART[wingStrake]     // Copy the wingStrake
{
    %name = Mk1PodMiniWings  // Edit the name so it is a new part
    %rescaleFactor = 0.25    // Mess with the size
    %TechRequired = start   // change where it is in the tech tree
    %title = Mini wings for a Mk1 pod!  // Change the title

   %description = Generic Eventhandlers plastic racing fins, 


    MODULE   // Add an RTG Generator for the sas to work.
    {
        name = ModuleGenerator
        isAlwaysActive = true
        OUTPUT_RESOURCE
        {
            name = ElectricCharge
            rate = 0.75
        }
    }
}

That should help with part one of the question,  the second one I can't help with sorry.

Link to comment
Share on other sites

Hi genericeventhandler, yes, I just edited the attachment nodes. Thanks for your help, I now made this patch:

@PART[dockingPort1]
{
	node_stack_top = 0.0, 0.2828832, 0.0, 0.0, 1.0, 0.0, 1
	@description = Invented after a peaceful protest against the lack of spacecraft attachment systems turned violent, the Clamp-O-Tron Docking Port allows for the firm attachment of two separate vessels. After docking, vessels can be just as easily undocked. The Shielded version has deployable fins to protect the port during ascent. This one is also stageable.
	@attachRules = 1,1,1,1,0
	@MODULE[ModuleDockingNode]
		{
			referenceAttachNode = top
			!staged = False
		{
}

It should simply change the docking port nodes like it did with the "full" part. However, it doesn't and I have no idea why.

 

Edited by MisterBennock
Updated code; typos
Link to comment
Share on other sites

Look in the debug definition of the part,  I am guessing that you have two node-stack_top entries, or just the original. 

Add a @ before the entries to edit them. 

If you make it a copy script, you can compare the definitions to see if everything has been modified while you are in game.

GE.

 

 

Link to comment
Share on other sites

Okay, well, love me, I found the mistake. Check the comment in the faulty patch

$PART[dockingPort1]
{
	%name = stageshield
	%node_stack_top = 0.0, 0.2828832, 0.0, 0.0, 1.0, 0.0, 1
	%title = SSDP
	%description = Invented after a peaceful protest against the lack of spacecraft attachment systems turned violent, the Clamp-O-Tron Docking Port allows for the firm attachment of two separate vessels. After docking, vessels can be just as easily undocked. The Shielded version has deployable fins to protect the port during ascent. This one is also stageable.
	%attachRules = 1,1,1,1,0
	%MODULE[ModuleDockingNode]
		{
			%referenceAttachNode = top
			!staged = False
		{	//WHY IS THIS OPEN?!?!??!
}

Yeah, so it was just an open bracket instead of a closed one. With a closed one it works as it should. I really hate programming of any kind.

 

Anyways, for the other problem, I was thinking of maybe having the shielded docking port open by default. Don't how how I will do this now, though.

Edited by MisterBennock
I R STUPID
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...