Jump to content
  • 1

Can't Undock Bug, How To Fix


Question

So I don't know why it happens but I found out how to fix the undock bug from someone's suggestion in another thread (I forget where I saw it). Since Scott Manley recently encountered this bug in his most recent reusable space program, I thought I'd be a constructive member of the community and post my solution. Excuse me for my lack of proper annotations/formatting, this is probably the first time I've ever really posted in a forum. Maybe the mods can format it properly once I post it? Hope this helps out! It's also a selfish move because I want to see Scott Manley continue his trip to Moho! :D

The bug I'm talking about is when you right click on a docking port and click "Undock" but nothing happens. The reason this doesn't respond is because the docking port you right click knows its docked, but the docking port it's docked to does not. In the save file docking ports have a module that describes their docking behavior. The best way to find the particular docking port that you want is to disable crossfeed before going into the save file on the bugged port that says "Undock" but does nothing. Make sure crossfeed is enbled on every other port (in the whole save file is best, use find and replace to your advantage). Then ctrl+F "enablexfeed" and find the one that says "active = True" that's the bugged docking port. The parts of it you need are as follows, the bits that will have to be changed are bolded, the bits that you need to pay attention to are italicized:

Docking port that shows "Undock" button:

MODULE

{

name = ModuleDockingNode

isEnabled = True

state = Docked (docker)

dockUId = 4018712963

dockNodeIdx = 0

EVENTS

{

Undock

{

active = True

...... <---(indicates my own truncation)

DOCKEDVESSEL

{

vesselName = Thatsnomun RCS Spindle <----name of docked vessel (not a unique vessel in the save file, part of the mother vessel that is the conglomeration of docked vessels where you'll find these docking ports)

vesselType = 2

rootUId = 4159860481

}

......

Docking port that the bugged docking port is attached to (in its bugged state). Find this part by using the dockUId from the port above:

MODULE

{

name = ModuleDockingNode

isEnabled = True

state = Ready

dockUId = 0

dockNodeIdx = 0

EVENTS

{

Undock

{

active = False

......

Note in the above the second docking port doesn't have a "DOCKEDVESSEL" section within the module. You have to create it, which is the hard part. It should look like this:

MODULE

{

name = ModuleDockingNode

isEnabled = True

state = Docked (dockee)

dockUId = 3497032429

dockNodeIdx = 0

EVENTS

{

Undock

{

active = False

......

DOCKEDVESSEL

{

vesselName = Big Rig 1

vesselType = 5

rootUId = 975741807

}

This involves a little bit of remembering what the component vessel names are and finding the rootUId of those vessels.

Find the root ID of the vessel on which the docking port that has the bugged "Undock" botton is. Maybe someone can reply with a way to do this by analyzing the parent/root structure of the save file. I just happened to remember what the root part (the first part you put down in the VAB) of the connected vessel was, and it was the only one on my station. This could be difficult if the part you decoupled to put it on the station wasn't the root part you made in the VAB (i.e. you constructed a lifting vehicle, decoupled the payload, docked the payload to the station, and removed the lifting vehicle), because then the vessel has a name like "[Vessel Name] Debris" or "[Vessel Name] Probe" etc. I know you can find all this stuff with a lot of cross referencing and searching the save file. A LOT. Be prepared to take notes.

Once you found that rootUId, put that in the rootUId in the DOCKEDVESSEL section you're creating. Also carry over the vessel type (not sure how to find that one out) and the vessel name.

Once you have the DOCKEDVESSEL section assembled, paste it into the module for the docking port from which it is missing. It goes after the "ACTIONS" and end that module before the next part or other module (such as if you have the docking port camera mod installed).

Easy, right?

Step 2, you have to change the bit in the beginning of that docking port's module description. (see above).

Change "state = Ready" to "state = Docked (dockee)"

Insert the dockUId. That is the part UId for the docking port the has the active "Undock" button that doesn't do anything.

Once you have changed those values and inserted your new DOCKEDVESSEL section, you should be able to quickload the game and it should undock successfully!

Don't forget to make backups of all the different save games your changing and your persistent.sfs before making any changes! If you screw something up and the load goes bad, start over by copying and renaming your backups appropriately.

I really hope this is do-able for people who don't remember the component vessel names/root parts and for super complicated space stations that might have a bunch of duplicate component vessels that may or may not be bugged. Modders and people familiar with the save file structure, I hope you can help!

Link to post
Share on other sites

Recommended Posts

  • 0

I've got what I think is the same problem, but I'm not sure. I managed to fix it by using hyperedit.

I decoupled the ports, and ended up with two ships (I can switch between them), but they won't separate under thrust.

Anyway, my fix was to launch hyperedit's orbit editor in complex mode, add a digit to the periapsis (multiplying by ten), activate the orbit change, then remove the zero and activate it again. This left me decoupled and a few meters away from the original ship.

Making small orbit changes instead of big changes (probably has to do with staying within the physics bubble) caused the ship to get torn apart by the kraken.

So maybe try that before hacking your save file, if you are nervous.

Link to post
Share on other sites
  • 0

I had this problem back in 0.22 with my Jool expedition (a huge mess of docking ports and some other parts (32 science modules, each with 2 docking ports, docked to beams docked to the core, with a docked engine module...)). Anyway, rather than throwing up my hands in despair, I came up with portjimmy. It's a python script that parses an sfs file looking for docking ports that have gotten their ids mangled due to the parent-child relationship of the ports changing.

I just tested now and it seems to work:

python3 portjimmy.py brokenports.sfs

It will print the ids of the mangled ports, as well as the name and type of the vessel for verification purposes. It is still up to you to actually fix the ids, but once you know the ids, you can go directly to the relevant parts by searching for the ids.

The script works with either python 2 or python 3, and is available from my github repository (yeah a few other tools in there too).

The biggest reason it doesn't do the fixing for you is when I wrote it, cfgnode.py didn't write cfg files.

Link to post
Share on other sites
  • 0
On ‎20‎.‎04‎.‎2016 at 4:22 PM, _Krieger_ said:

I had that happen to me in 1.1 both with stock and modded ports.

Would you please try to fix your docking problem with my KML - Persistence file editor tool and report my or send me your currupted 1.1 savegame? I hadn't the chance to switch to 1.1 yet, and it would take a while to encounter such a problem.

Link to post
Share on other sites
  • 0
1 hour ago, Mythos said:

Would you please try to fix your docking problem with my KML - Persistence file editor tool and report my or send me your currupted 1.1 savegame? I hadn't the chance to switch to 1.1 yet, and it would take a while to encounter such a problem.

I fixed it by editing the save file manually, but I'll definitely try out tour tool, thank you!

Cheers.

Link to post
Share on other sites
  • 0
On 23.04.2016 at 10:55 PM, Mythos said:

Would you please try to fix your docking problem with my KML - Persistence file editor tool and report my or send me your currupted 1.1 savegame? I hadn't the chance to switch to 1.1 yet, and it would take a while to encounter such a problem.

I have encountered this bug in stock 1.1 and succesfully fixed it with KML - Persistence file editor! Thank you very much!

Link to post
Share on other sites
  • 0
40 minutes ago, barsandcat said:

I have encountered this bug in stock 1.1 and succesfully fixed it with KML

Thanks for your feedback! This annoying bug was the reason to start programming KML. It's a pity it still exists in 1.1

Link to post
Share on other sites
  • 0

I have the same issue - I'm a newby to KSP so I really don't know how to edit the save game manually - I tried the KML tool and it detects the problem:

VESSEL (ScienceLabStarter, Ship, ORBITING) -> PART[23](dockingPort3): Docked (same vessel):
Dock part docked to other dock part, but docking not responded from other side. Other dock: PART[21](dockingPort3): Docked(docker): MoonLander

but If I right click and say "Repair docking" I get a blank message and after saving the problem still exists...
I'm on stock KSP (Kerbal Space Program - 1.1.2.1260 (WindowsPlayer), build id = 01260 2016.04.30 at 11:49:48 CEST Branch: master).

 

Anybody can fix my save!? Download here: https://drive.google.com/open?id=0B1jOjppssaQFZ3NydXFiUlh1T00


 

Link to post
Share on other sites
  • 0
3 hours ago, schneida said:

Anybody can fix my save!?

Oh you have encountered a problem with same-vessel-docking in real game. I only knew about this theoretically but never saw in game. I have downloaded your save and can reproduce your bug report (empty message) about my KML tool. This I will fix soon.

About you problem in general: It looks like you have two different dock parts connected to the same third dock part. So its a triple thing, where I would expect couples only. I had a look in game and comparing with data from KML:

  1. There are two docking ports clipping right above each other on the side without the lab. If you undock, the other is in docking range and will disturb the undocking. There is a short time where the docking state is something between docked and undocked and problems often happen then.
  2. This should not be a problem, but it looks strange and may be the reason for having two parts in same place: The dock parts are connected to the probe core not via node but via surface attachment although it looks like it's in the right place for a node attachment. If you build something like this again, try pressing the ALT key while placing the part in the VAB so you force node attachment (the green bubbles).

The duplicate part needs to be deleted and this means the part indices need to be reordered. That's quite a task and KML is not able to do this (yet). I also not recommend to do it in a text editor. Maybe there is a in game tool to delete parts?

What I did for you: Removed all docking functionality from the duplicate part. Moved the part some distance away. Now it looks ugly, but you can see it's there and understand the problem. It needed to be moved to be able to click on the other one that was hidden.

Try this version:

https://drive.google.com/file/d/0BwsNCuH8Jk3-c2drTEc4cE51M3c/view

 

Edited by Mythos
Link to post
Share on other sites
  • 0
On 4/23/2016 at 2:55 PM, Mythos said:

Would you please try to fix your docking problem with my KML - Persistence file editor tool and report my or send me your currupted 1.1 savegame? I hadn't the chance to switch to 1.1 yet, and it would take a while to encounter such a problem.

OMG thank you so much! I have been trying to understand the instructions in this thread but I just wasn't able to follow it. You have saved my Vall expedition good sir!

Link to post
Share on other sites
  • 0
On 4/23/2016 at 0:55 PM, Mythos said:

Would you please try to fix your docking problem with my KML - Persistence file editor tool and report my or send me your currupted 1.1 savegame? I hadn't the chance to switch to 1.1 yet, and it would take a while to encounter such a problem.

 Love your mod sir. It saved my Moho mission yesterday when I had a docked tanker and capsule get this bug.

Link to post
Share on other sites
  • 0

Hi guys, I have this problem in the latest version. I don't know what to do as it's not the same as in the OP.

MODULE
				{
					name = ModuleDockingNode
					isEnabled = True
					crossfeed = True
					stagingEnabled = True
					state = Docked (dockee)
					dockUId = 3365815556
					dockNodeIdx = 0

...
DOCKEDVESSEL
					{
						vesselName = Kerteria 5
						vesselType = 6
						rootUId = 1669695051
					}
...
MODULE
				{
					name = ModuleDockingNode
					isEnabled = True
					crossfeed = True
					stagingEnabled = False
					state = Docked (same vessel)
					dockUId = 2051603203
					dockNodeIdx = 0
...
DOCKEDVESSEL
					{
						vesselName = Kerteria 5 Lander
						vesselType = 5
						rootUId = 3365815556
					}

What's the issue? To confirm, I press undock, nothing happens, the option to undock disappears.

Link to post
Share on other sites
  • 0
4 hours ago, MathmoRichard said:

state = Docked (same vessel)

This would mean that there is this pair of docking ports and another pair of docking ports connecting the same two vessels? If this is not the case it's this pretty common bug that my KML tool mentioned in the previous post should be able to fix.

Link to post
Share on other sites
  • 0
2 hours ago, Mythos said:

This would mean that there is this pair of docking ports and another pair of docking ports connecting the same two vessels? If this is not the case it's this pretty common bug that my KML tool mentioned in the previous post should be able to fix.

Erm. There's just two docking ports in the whole connected (rather shouldn't-be-connected) ship - a classic CSM/LM arrangement.

Link to post
Share on other sites
  • 0

I have solved the issue! At least for me. And you don't have to edit game files! Unfortunatly you will have to always dock manually. (I believe the issue involves mechjeb docking autopilot). Instead of targeting the docking port and letting the computer do it, I have found that manually docking while targeting the command pod of the station (or whatever you're docking with) will allow you to undock at will. This worked for me, so let me know if it works elsewhere!

Link to post
Share on other sites
  • 0
On 6/25/2016 at 3:44 PM, Mythos said:

Do you mean strictly not solving via touching the persistance file? No idea for that one.

Or do you mean not to do such kind of text based changes where you absolutely have to know what you are doing? If you are willing to change the persistence file but with an easy GUI pointing you to the problem and solving via right click menu, you may try my KML - Persistence file editor tool mentioned in some previous posts :)

Thank you!  I got  my rockets back!

Link to post
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
Answer this question...

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