Pool KSP Instances with CKAN

,

II- How Does It WOrk?

To complete the explanation, let’s add a mod to this instance.

About To Install MechJeb
About To Install MechJeb
MechJeb is now Installed
MechJeb is now Installed

With that done, it’s time to look under the hood to see what CKAN has done for us:

Root Folder
Root Folder
Explorer Gamedata Folder KSP
Explorer Gamedata Folder KSP

What do we observe? CKAN has created links in the directory where the clone is located, pointing to the original instance. It has also created additional links for the Squad and SquadExpansion directories, which contain all the stock game parts and the two DLCs. This is where the change in functionality I mentioned earlier comes into play.

Windows

If we delve deeper to understand the nature of these links, we observe:

CMD View
CMD View
CMD View for the Gamedata Folder
CMD View for the Gamedata Folder

We can clearly see the difference: the classic directories <DIR> are replaced by elements we’re not used to seeing, called <JUNCTION>. But what is this peculiarity?

Well, a Junction Point in the NTFS file system is a specific entry (a reparse point, to be precise) that references another directory. It acts as an alias to that directory, allowing access to its content via a different path while maintaining a coherent local directory structure. Junction Points are limited to directories and cannot point to individual files. They use absolute paths and are restricted to local volumes, meaning they cannot point to directories on remote file systems. They should not be confused with shortcut .lnk files.

This mechanism allows a cloned instance to share content with the original instance it was derived from. In this case, we created a clone of a bare KSP 1.12.5, saving a substantial 5.46 GB! If, like me, you have numerous KSP instances—say, between 10 and 20—this could amount to nearly 100 GB of savings. That’s huge, and well worth an article!

Linux

And on Linux, you might ask? Well, the principle is almost the same, except here CKAN uses symbolic links, which are very familiar to users of this type of OS. The advantage is that CKAN manages them for you, even though you could have created them manually from the start. This command-line operation is not very complicated and has long been known to users, even beginners.

On the other hand, the Windows equivalent simply required knowing about this NTFS feature and being able to use the mklink command, which was less trivial because the vast majority of gamers on this OS have only a general understanding of the system.

Pages: 1 2 3

Only Light Matters