• 0
roscoe_jones

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!

Share this post


Link to post
Share on other sites

108 answers to this question

Recommended Posts

  • 0

I was able to solve this problem by using Kerbal Attachment System to 'detach' the two stuck docking ports from each other.

Share this post


Link to post
Share on other sites
  • 0

If you use KAS (kerbal attachment system) you can use an engineer to disconnect the ports

Share this post


Link to post
Share on other sites
  • 0

THAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANKS, MYTHOS. VEEEEEEEEEEEEEEEEEEEEEEEEERY MUCH! :D:cool::sticktongue:

 

 KML - Persistence file editor

 

Thats the answer to the UNDOCKING PROBLEM. Just install and it will tell wich docking port is problematic, then just press "FIX IT". BRILLIANT! EXCELENT!

Again, Thaaaaanks, Mythos. I worship you! haha. ^_^^_^^_^

Share this post


Link to post
Share on other sites
  • 0

I had to join the forums for this as well... The bug just bit me again a couple days ago. I couldn't believe how far back this bug has been around. I'm going to look into the KML, I hope it's the solution that Surreaux is making it out to be. 

Share this post


Link to post
Share on other sites
  • 0
Posted (edited)

EDIT: of course this is what I get for not scrolling to the last page before spending the time to write this up. I'm not the first to identify the KAS/KIS method, and I'm not sure if the errors identified by KML would have resolved themselves or not. Cheers everyone.

 

----

 

Sorry if this is redundant with anything above. Hope this can help someone who's stuck, or help Squad better understand a way to solve this issue.

This bug ruined a big assembly for me a year or so back and did a bunch of manual sfs editing with these original instructions. It hit me again today and I actually discovered a pretty easy way that is mostly in game, but it does involve KAS/KIS if you don't use that and also uses KML. On that note, KML is my new favorite tool for bug squashing (Kraken-slaying?)

First, clarification on the DOCKEE vs DOCKER terms, mostly so I don't confuse myself:

The DOCKER is this vessel doing the docking

The DOCKEE is the vessel that is being docked with.

The DOCKEE is the vessel that when you dock, the new 'assembly' inherits the name. I believe KSP determines it by mass (bigger vessel is being docked with, smaller vessel is docking). I've seen some people report that this has to do with which vessel is being controlled during the dock, but through some experimentation I wasn't able to get the relation to swap. In practice I've had a station core with RCS pick up 'dumb' modules to reduce part count, and the name of the station remains unchanged. Really it doesn't matter for the scope of this.

Every time I've had this happen it's because I tried to dock two vessels that already had other vessels docked to them. As someone above mentioned, I think it has something to do with the game confusing itself trying to flip around who is the dockee/docker. So avoid that.

Quick description of my issue, arrows point to the DOCKEE.

[fuel module]--->[Station core]<---[shuttlecraft]

/\

|

|

Docked to

|

|

[greenhouse/lab module]--->[transfer stage]<---[greenhouse/lab module]

 

 

PROBLEM:

When trying to undock the transfer stage, the greenhouse parts would go flying off through the rest of the station. No collisions, no explosions. Looking a little closer here, the ship never undocked either; you can still right click on parts both on the transfer stage and the station.

FRUITLESS TROUBLESHOOTING:

Undock lab modules: The lab modules become separate vessels, but are still physically attached to the transfer stage.

Undock lab modules, undock transfer stage: the lab modules again become separate vessels, and the transfer stage breaks into pieces when undocked, even with all the ALT + F12 cheats on.

KML editing the stable .sfs: No errors thrown.

KML editing the .sfs after undocking: autorepair yielded various versions of "this is fixed but this isn't", which upon loading cause glorious explosions and cause an interesting failure mode similar to the apocolypse Kraken: When quickloading back to a stable save, there is no Sun/Mun and some of the textures are corrupted (station was transparent-ish?). Returning to the spacecenter shows that we are now in an eternal night.

 

SWEET SUCCESS

In game:

Using KIS/KAS, flew up to the station. Used the power drill and the 'detach' function, I was able to separate the docking ports from each other and the transfer stage was completely free!

KML sanity check:

An examination of the .sfs threw a few errors with both docking ports that autorepair was unable to fix. In practice I believe this would have prevented the ports from being used again. But the autorepair tool gave me the exact part numbers so they were easy to find.

KML fix:

Navigate to both docking ports, 'ModuleDockingNode'.

Set dockUId to 0.

Set the state to READY

delete the 'DOCKED VESSEL' node. Yes, delete. Poof.

 

 

Save, load, and fly safe!

 

Edited by jmill050

Share this post


Link to post
Share on other sites
  • 0
16 hours ago, jmill050 said:

I believe KSP determines it by mass (bigger vessel is being docked with, smaller vessel is docking). I've seen some people report that this has to do with which vessel is being controlled during the dock, but through some experimentation I wasn't able to get the relation to swap.

I've read many rumors about the rules for this, but the mass theory is new to me. I can't explain exactly what is happening, but my experience tells it has to do with which ship was build latest (the older ship likes to be dockee) and the type of the ships (stations tend to be dockee and such).

16 hours ago, jmill050 said:

delete the 'DOCKED VESSEL' node. Yes, delete.

Confirmed. If you know what you're doing, deletion of broken content is often the fix.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now