Jump to content

Programatically delete a cloned command module in the VAB


Pontiac

Recommended Posts

For Subassembly Loader, there is a bug in which how KSP stores your ship if it doesn't include a command module as the root part. I don't expect Squad to fix this issue any time soon since we're obviously going outside the spectrum of what their game is supposed to do. The save routine basically breaks any mirrored part. The "source" part of the mirror is properly placed, but the parts mirrored parts aren't. So I'm trying to work my way around this limitation by forcing the current command module on the build to be included in the saved assembly, then on load, rip out the command module, and resume work as normal. The save part works, meaning the command pod I inserted in the structure shows up both on screen and in the craft file, but the load part isn't working to expectation. The entire ship shows up, but I cannot, for the life of me, figure out how to properly delete the unwanted command pod. So my question is, how do you delete the very first part in the VAB editor right after you load the assembly?

What is happening now is the command module shows up, but it becomes inert. You can't do anything with it. You can spin the camera around, and you can still see the modules different sides, but, clicking on it, or attempting to attach something to it fails. If I leave the VAB and come back in, the extra command module is gone from the screen.

Additional Details:

When looking at a working, versus non-working craft file, the working craft file has an additional cdata entry that points to the proper part ID, such as fuel tanks. In a non-working craft file, the cdata is pointing to a gas tank, but, with an invalid ID. That invalid ID is -1. My guess is that the each component of the vessel that gets saved is assigned an ID number. This happens when the save occurs. If a command module is clicked saved, then the craft loaded up works, but when just an assembly with no command modules on, the mirrored parts break due to the -1.

Link to comment
Share on other sites

I'm not looking at the code right at the moment, but I THINK it does. I recognize rootPart but I don't recall where its from, be it another class or a variable name, or whatever. I'll poke at it some more tomorrow. Been up +24 hours so far. ;)

Link to comment
Share on other sites

This thread can be closed. The methodology of saving the subassemblies is doomed to fail due to how 0.20 handles moving things around. Pipes and struts are temporarily disconnected, and that state seems to be saved.

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