Jump to content

Editing Docking Port Connections In Save File?


Recommended Posts

So I have a station floating in orbit around Kerbin, it's six segments attached by 2-pair docking ports (see these posts for examples of the construction).

But for the life of me I can't get all the docking ports to connect. Typically just 1 of the 2-pairs will attach, the others just slightly off. They're constructed to line up correctly, it's just my approach that ends with them being a degree off perfect.

So rather than spending the rest of my life detaching & reattaching them, I want to edit the collections correct in the save file.

Has anyone done this before? Are there tools that makes this easier? I know all the parts and their connections are outlined in the save files, but I'm not sure how I'd go about editing their connections without lots of trial & error.

So, anyone?

Link to comment
Share on other sites

Every parts has a UUID; the docking port, when connected, has the UUID of it's partner written somewhere. That should be easy to figure out just from looking at a savegame. However, I suggest you don't even try: you'd also need to edit every part's position relative to everything else, and that's not trivial. Have the ports come together in the game, that's far easier.

If your ports look as if they were aligned properly, you can try to undock-and-quicksave; when you load that savegame, the ports no longer know that they have undocked recently and can connect immediately. If this doesn't work, chances are that some of your ports have already become stuck during your previous docking attempts. This can happen if ports want to connect but cannot, because they're held ever-so-slightly apart by the misalignment of another port. In that case, you may edit your savegame to make them become unstuck again.

Look for any post from Claw, and follow the link in his signature. The "common bugs and workarounds" post has a chapter on stuck docking ports. Reading that chapter would also be helpful if you want to go through with your initial plan. Be warned that this can be a mind-rending business if your vessel has more than a few docking ports.

Alternatively: create your station on the ground, and edit your savegame to swap places with the station in orbit. Or use the hyperedit mod to move it into space in one piece.

Edited by Laie
Link to comment
Share on other sites

Since I heard Laie say my name, I figured I should appear.

Docking ports are indeed a difficult beast to tame. Editing the save file can be tricky. Adding a second docked connection itself isn't easy, but possible. The other problem is that the first connected port must also have the correct rotation/orientation in order to keep the dual docking ports from ripping themselves apart. And I think the rotation vectors are stored as quarternions, which require some extensive math and understanding. (You can't just simply input a turn of "2 degrees" or equivalent radians or fraction thereof, for example.) It's not impossible, just be prepared to do some homework and trial/error (and be patient).

Give the quicksave/quickload trick a try. That's the usual method I do and you can get very good docking alignment with it. If you angle the camera right, you can also provide some input while the magnets are doing their thing to aid in getting everything latched on. There are also several docking alignment add-ons that might work if you're not opposed to mods. I can't recommend any in particular since I don't use them myself.

Stock multi-dock is an art in itself.

Cheers,

~Claw

Link to comment
Share on other sites

Yeah, I caved and downloaded an alignment mod to help me with the struggle, but even then if I was even a hair (I'm talking like, a pixel or two the wrong rotation) off both ports wouldn't connect.

This may've been the answer to my problem: http://forum.kerbalspaceprogram.com/threads/76693-WIN-Fix-My-Docking-v-0-3

But seems Alo may've abandoned the project.

I'll try the quicksave/quickload trick, but it's 6 segments with 4 ports each so I'd be surprised if it was as easy as all that.

Link to comment
Share on other sites

Like some of the ports are straight-up flush and touching but NOPE, they're just friends, not looking for commitment.

Sounds as if they got stuck in some previous docking attempt. That can be fixed with reasonable effort by editing the savegame. Though if there's more than a few ports afflicted, you may be tempted to look at the alternatives I posted above.

Personally, I found that multi-docking works much better if all ports involved have some leeway. Not overly much, but some. Maybe that makes it easier for the ports to find each other?

tri-dock.png

(from the Laythe Capitalism challenge)

You can probably guess that the orange tanks can be quite wobbly on their own. The space hotel isn't too rigid either. But bring them together (which is easy), and the whole assembly is rock solid (which I found surprising).

Edited by Laie
Link to comment
Share on other sites

Hey, which one of Claw's posts has the common bugs and workarounds? I have a related issue; I've got ports on a space station that say they're docked, they definitely hooked up with one another when the docking took place but you reload it you can definitely see a visible gap between the ports even though the game says they're docked. I'm pretty sure this is an old issue but I could still use some guidance on how to fix it.

Link to comment
Share on other sites

I've got ports on a space station that say they're docked, they definitely hooked up with one another when the docking took place but you reload it you can definitely see a visible gap between the ports even though the game says they're docked.

Ha, since my scrapping of the station that sparked this thread and trying a new single-dock ring this is now my problem, too. I've got a pair of ports that say they're docked but they're not symmetrical, and you wouldn't guess they're docked.

Looks like I'll be reading through Claw's tutorials as well.

Edited by Franklin
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...