Jump to content

Add part to vessel during flight


Recommended Posts

Yes. By editing the safe file. You have to look into one of the bottom most scenarios called FLIGHTSTATE{} and find the craft in question. It's best if you replace the entire vehicle definition with one from a modified craft you just launch for that very purpose. Alternatively, you can do the second thing you described and put the vessel you want to dock onto the launch pad and then replace the orbital information in the save file with the orbital information from the first craft changing just the mean anomaly. They'll be in the same orbit after you load the file, just separated by the number of degrees you chose.

Link to comment
Share on other sites

Are you wanting to write code to do this as part of a plugin? If yes then you could refer to some existing examples:

38 minutes ago, flywlyx said:

Is it possible to add a part to the active vessel during flight?

KIS does this (see here).

38 minutes ago, flywlyx said:

If not, is it possible to create a vessel from thin air and dock it to our vessel immediately(which is an alternative way)?

Routine Mission Manager can spawn a docked vessel (source is bundled in download see routine.cs for docking code).

For other references for spawning vessels in specific locations: see mods like Contract Configurator, Extraplanetary Launchpads, Ground Construction.

Link to comment
Share on other sites

21 hours ago, Aelfhe1m said:

Are you wanting to write code to do this as part of a plugin? If yes then you could refer to some existing examples:

KIS does this (see here).

Routine Mission Manager can spawn a docked vessel (source is bundled in download see routine.cs for docking code).

For other references for spawning vessels in specific locations: see mods like Contract Configurator, Extraplanetary Launchpads, Ground Construction.

Thank you, this is very helpful!

 

21 hours ago, Benjamin Kerman said:

Or you can just grab the Orbit from the first vessel and remove it, then add the new vessel with that Orbit. 

For landed vessel, place the vessel will always result in some issues...

 

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