Jump to content

Advice on creating a simple docking port


Recommended Posts

Hi

I've some experience with editing shapes in Blender and editing cfg files, so I've been able to make stretched pieces and similar

I would like to take a piece like a decoupler and edit or create a new cfg file in order that the decoupler can dock with another decoupler of the same size

I need to use a decoupler as there are going to be engines that fire through it, so I effectively need a large docking ring which is open in the centre

I tried this first of all, but it di dnot transfer any docking capability to the part:

------------------------------------------------------------------------------------------------

@PART[Decoupler_4]:FOR[RealismOverhaul] {
  !MODULE[ModuleDecouple]{}
  !MODULE[ModuleTestSubject]{}
  @MODULE[ModuleDockingNode]
  {
    referenceAttachNode = top
    nodeType = size2
    stagingEnabled = False
  }
}

------------------------------------------------------------------------------------------------

Can anyone help?

Many thanks! :)

Link to comment
Share on other sites

Hi @RealTimeShepherd Certain parts need to have what they can do activated in your 3d modeling software to work. If you know your way around said software you could probably look at a docking port and see what you needed. For those like me that can't there is a way around it. There is a process called "Part Stacking" where you put the pathway of another model in it's MODEL brackets after the first. The first model in the config will show up but in most cases the second won't, I have had a few exceptions but usually if you scale that second model right down you are right to go. When you look through the config that I am giving you you will see how it is done. This has been tested in 1.10.1 and works fine with no sign of the Docking port Jr. The docking port allows the model to use the Docking Module. It converts the largest decoupler into a docking port. The only side affect is when you redock the meshes of the 2 ports crossover, but it doesnt stop them from undocking again. Compare what I have done to Decoulpler_3 to see what you need to do if you want to create other sizes. Create a new text file in GameData\Squad\Parts\Coupling\ and call it Decoupler_Dock.cfg and paste in the following. The smaller node that the little triangle on the decoupler points to is the docking side.

If you want this in 1.12.1 then you will need to import the docking port Jr folder into the GameData folder of your KSP from an older version and then correct the pathway of the second model so that it can find the mesh. Good luck.
 

Spoiler

 

PART
{
    name = Decoupler_Docking port
    module = Part
    author = RoverDude
    MODEL
    {
        model = Squad/Parts/Coupling/Assets/Decoupler_3
    }
    MODEL
    {
        model = Squad/Parts/Utility/dockingPortJr/model
        scale = 0.1
    }
    rescaleFactor = 1.0
    node_stack_top = 0.0, 0.15, 0.0, 0.0, 1.0, 0.0, 2
    node_stack_bottom = 0.0, -0.15, 0.0, 0.0, -1.0, 0.0, 3
    TechRequired = largeVolumeContainment
    entryCost = 2400
    cost = 375
    category = Coupling
    subcategory = 0
    title = Docking port through.
    manufacturer = #autoLOC_501676  //#autoLOC_501676 = O.M.B. Demolition Enterprises
    description = #autoLOC_501791   //#autoLOC_501791 = Description Creation Pending
    attachRules = 1,0,1,0,0
    mass = 0.36
    dragModelType = default
    maximum_drag = 0.2
    minimum_drag = 0.3
    angularDrag = 2
    crashTolerance = 6
    breakingForce = 150
    breakingTorque = 150
    maxTemp = 2000 // = 3000
    fuelCrossFeed = True
    stageOffset = 1
    childStageOffset = 1
    bulkheadProfiles = size3
    tags = #autoLOC_501792   //#autoLOC_501792 = decouple
    fx_gasBurst_white = 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, decouple
    sound_decoupler_fire = decouple
    
    MODULE
    {
        name = ModuleDockingNode
        referenceAttachNode = top
        nodeType = size2
        aquireForce = 10.5
        aquireRange = 15
        captureRange = 10
        stagingEnabled = False
        ejectionForce = 2
    }        
    MODULE
    {
        name = ModuleToggleCrossfeed
        crossfeedStatus = false
        toggleEditor = true
        toggleFlight = true
    }

    MODULE
    {
        name = ModulePartVariants
        primaryColor = #ffffff
        secondaryColor = #ffffff
        baseDisplayName = #autoLOC_8007119
        baseThemeName = White
        useMultipleDragCubes = false
        
        VARIANT
        {
            name = YellowAndWhite
            displayName = #autoLOC_8003114
            description = #autoLOC_8003115
            primaryColor = #ffffff
            secondaryColor = #999999
            TEXTURE
            {
                shader=KSP/Bumped Specular
                mainTextureURL = Squad/Parts/Coupling/Assets/Decouplers_whiteYellow
                _BumpMap = Squad/Parts/Coupling/Assets/Decouplers_whiteYellow_N
                _Color  = #ffffff
                _SpecColor = #c4c4c4
                _Shininess = 0.44
            }
        }
    }    
}

 

 

Edited by ColdJ
Link to comment
Share on other sites

@ColdJ

Dude, I'm sorry to come back to you, but I can't undock my ships once docked!

The part doesn't show that action, I;ve tried assigning the action to an action group in the VAB, as undock and decouple both show up, but no joy. I've even used kOS, which also sees the actions, but nothing happens. Any ideas??

 

Link to comment
Share on other sites

Was working fine for me. Tested it repeatedly. When you start set the UnDock and decouple of both ports to a single action and use it to decouple. Sometimes if you use just 1 side it then means the other side then gets the priority next time you redock. Unless you changed the config or are using a mod that is overiding normal docking with an MM patch, it should work.

Link to comment
Share on other sites

It looks like there is something messed up with the models I am connecting the ports to. I managed to explode both docking rings and the craft were still stubbornly welded together!

The StarShip from Tundra has nodes that extend beyond the docking ports, so I'm wondering if they are somehow interfering with each other...

Link to comment
Share on other sites

2 hours ago, RealTimeShepherd said:

It looks like there is something messed up with the models I am connecting the ports to. I managed to explode both docking rings and the craft were still stubbornly welded together!

The StarShip from Tundra has nodes that extend beyond the docking ports, so I'm wondering if they are somehow interfering with each other...

Probably. they might be creating a "Bounding Box issue." Models look like they are separated but are really within each other. So when you go to pull apart, the conflict can't be resolved by the system.

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