Adding parts from other mods to Kerbal Attachment System

kerbal-space-programmods

I've played KSP for a while now, and my approach here has been the same as with other games: First try it out vanilla, then add mods as I see which holes they'd fill.

I added mechjeb first, to automate the repetitive stuff that I'd done manually more than Jebediah himself. Works fine.
I then added kethane to set up a fuel depot on Minimus and Duna. Also works fine.
Added Kerbal Attachment System to create a hauler/worker. Retrieving space debris and hauling stuff down from orbit. Workis fine, but with some limitations.

What I would like to do now is to use KAS for retrofitting various crafts with mechjeb and kethane parts. How do I go about configuring this? I've found no specific instructions for doing this except seeing videos of people who've already done it, praising KAS's ability to support this.

What I have so far is this in GameData/aoeu/aoeu.cfg to add the mechjeb unit to KAS, gathered from snippets of information found by googling:

@PART[mumech_MJ2_AR202]{
    MODULE
    {
        name = mumech_MJ2_AR202
        stockPartName = mumech_MJ2_AR202
        evaPartPos = (0.0, -0.05, -0.2)
        evaPartDir = (0,0,-1)
        physicJoint = False
        storable = True
        storedSize = 5
        attachOnPart = True
        attachOnEva = True
        attachOnStatic = False
        attachSendMsgOnly = False
        customGroundPos = true
        dropPartPos = (0.0, 0.0, -1.0)
        dropPartRot = (0.0, 0.0, 0.0)
    }
}

However, the only result of the above is a duplicate item under the control tab, seemingly with the same properties. I still do not find a part in the list when trying to add it to the container of my worker-ship, still in the construction bay. What am I missing?

As mentioned above, I've found bits and pieces of info relating to this, but what I've found more of is people trying to do the same thing, and what I've found none of is a complete overview of the process of how to achieve this, be it mechjeb, kethane, or parts from any other mods.

Best Answer

Figured it out with the help of the guys on KSP forums:

@PART[mumech_MJ2_AR202]{
@attachRules = 1,1,1,1,0
MODULE
{
    name = KASModuleGrab
    stockPartName = mumech_MJ2_AR202
    evaPartPos = (0.0, 0.0, -0.15)
    evaPartDir = (0,0,-1)
    physicJoint = False
    storable = True
    storedSize = 5
    attachOnPart = True
    attachOnEva = False
    attachOnStatic = False
    attachSendMsgOnly = False
    customGroundPos = true
    dropPartPos = (0.0, 0.0, -1.0)
    dropPartRot = (0.0, 0.0, 0.0)
}
}

name needs to reference the name which handles this function. The above code works, and should in theory work with other modules as well by substituting the mumech_MJ2_AR202 (two entries) with the appropriate name of other module.

The Mechjeb item is still duplicated, presumably one of them being the one i can find in the containerable-list. Both work fine for normal use attached to a ship, so it's not an issue, but a curiosity rather. Considering this solved.