Welcome to another KSP Devblog! This time we’re going to talk about some bugs. In particular, two, Docking Port Drift/Issues and Robotics Drift. What am I talking about when I say drift?
A number of issues have been found and brought up on both the forum and our bug tracker regarding the new Docking Port rotation feature that was introduced in KSP 1.12 On Final Approach.These issues are similar and somewhat related to a number of issues we have known about for some time with regard to the robotic parts from the Breaking Ground DLC. Both sets of problems are inherent to the architecture of KSP due to the way it defines and saves information about the connected parts in a vessel.
In order to address and fix these problems correctly (if indeed it can be fixed totally),we would need to spend quite a bit of time and resources, as well as consider the risk associated with making a large change to the way KSP handles this information, and also do it in a way that would not break everyone’s existing save games.
As you all no doubt know by now, we are no longer planning any further major updates for KSP and instead the whole team is now engaged on KSP2. That said, we know how much these two issues have been hurting the community, and hurting us knowing that, so we have put together a small patch to address these two issues in the most practical way possible considering all the delivery factors.
In order to address these two issues without re-architecting large parts of KSP code we have found a compromise solution that reduces the impact of these issues whilst not completely eliminating them. We hope, to a point, that means they become less of an issue for you all.
Docking Ports and Robotic parts all have an option that allows you to “Lock” the part in place. This option is available via the Part Action Window (PAW) or right click/context menu for each part. The compromise solution involves handling the saving of all the vessel’s parts differently depending on whether a docking port or robotic part is “Locked” or not.
What happens “under the hood” so to speak is that when a Vessel is either Put on Rails or Unloaded / Saved KSP has to Save both the position and rotation of any Unlocked Robotic parts or Docking Ports (as well as ALL of their children in the part hierarchy) so that when it is reloaded or taken off rails it can re-position these parts relative to each other. This is not usually an issue for parts, as their relative position and rotation does not change once the craft has been built in the VAB/SPH and subsequently been launched. The exception of course is the Docking Ports which can now rotate (and rotate everything attached to them) and Robotic parts that can perform rotations, movement, etc.
The changes that have been made involve not saving the rotations and positions of all docking ports and robotic parts (and all their children in each case) if the part has been placed in the “Locked” state.
So in summary,if you want to avoid the “drift” and rotation issues with Docking Ports and Robotic Parts, just remember to always set your Docking Ports and Robotic Parts to “Locked” state when you aren’t rotating or moving them.