Jump to content

How to add parts to a active vessel midflight?


Recommended Posts

I'm trying to add parts to a active vessel and have spend quite some time on research.

I only found people recommending reading the KAS/KIS mod github, but I am not able to make any sense of what is done in the mod to add new parts because the mod is split up in so many different text documents which makes it impossible to read for me. (A terrible amateur coder) 

 Could you tell me what it takes to add new parts to vessels? (I don't need a super detailed explantation but a list of requirements or an example would be nice)

 

Link to comment
Share on other sites

Use docking ports for a Stock option.
Use Kerbal Attachment System (KAS) mod to build outside of the editor.

If you prefer a Kludge-fix, create a Module Manager cfg file to add a docking port module to all parts, referencing their attachment nodes.

Edited by Xyphos
Link to comment
Share on other sites

On 10/4/2019 at 2:29 PM, TheLunaticist said:

I'm trying to add parts to a active vessel and have spend quite some time on research.

I only found people recommending reading the KAS/KIS mod github, but I am not able to make any sense of what is done in the mod to add new parts because the mod is split up in so many different text documents which makes it impossible to read for me. (A terrible amateur coder) 

 Could you tell me what it takes to add new parts to vessels? (I don't need a super detailed explantation but a list of requirements or an example would be nice)

 

1 - Create an object to contain the transform of the part you wish to attach something to (Transform parentTransform = parentPart.transform)

2 - instantiate the part you want to attach and then make its transform the child of parentPart.transform (childPart.transform.parent = parentTransform)

3 - Be sure to adjust the childPart.transform.localPosition before attaching to the parent transform or things can get 'splodey 

This is just 3 things off the top of my head that you will need to know how to do in order to attach parts in the flight scene ... and there is a bunch of other stuff you will need to know (waiting a couple fixed updates before unpacking so the Kraken doesn't show up, getting the mesh bounds of the parent part, adjusting part orientation, set part temp to a positive value, declaring initial part spawn location, etc..., etc..., etc...)

TL;DR - it's a bit more complicated than writing a few lines of code ... just look at KIS and KAS, more than a few lines of code there :wink:

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