Difference between revisions of "Root directory"

From Kerbal Space Program Wiki
Jump to: navigation, search
(Expanded Saves and Ships sections)
(Default locations)
 
(12 intermediate revisions by 7 users not shown)
Line 1: Line 1:
 
{{Stub||Information for the other operation systems}}
 
{{Stub||Information for the other operation systems}}
 
[[File:Root directory contents.png|thumb|The default contents of the root directory, also showing the Steam library path]]
 
[[File:Root directory contents.png|thumb|The default contents of the root directory, also showing the Steam library path]]
For several tasks, like installing [[addon]]s or [[Flag (Image)|flag]]s, it is important to '''locate the installation''' of [[Kerbal Space Program]]. Depending on the operating system and if Steam is used, KSP is installed into different directories. Usually file locations are given relative to the root directory if Kerbal Space Program.
+
For several tasks, like installing [[addon]]s or [[Flag (Image)|flag]]s, it is important to '''locate the installation''' of [[Kerbal Space Program]]. Depending on the operating system and if Steam is used, KSP is installed into different directories. Usually file locations are given relative to the root directory of Kerbal Space Program.
  
 
== Installation directories ==
 
== Installation directories ==
Line 8: Line 8:
 
With Steam installed, it is relatively easy to get to the wanted location. Right clicking<sup>[''Mac users?'']</sup> on Kerbal Space Program in the Steam library opens a menu. Selecting ''properties'' opens a new window. In the tab ''local files'' the button ''browse local files'' opens the root directory where Kerbal Space Program is installed in the file browser.
 
With Steam installed, it is relatively easy to get to the wanted location. Right clicking<sup>[''Mac users?'']</sup> on Kerbal Space Program in the Steam library opens a menu. Selecting ''properties'' opens a new window. In the tab ''local files'' the button ''browse local files'' opens the root directory where Kerbal Space Program is installed in the file browser.
  
==== Default location ====
+
==== Default locations ====
 
Steam allows multiple library folders. The defaults on the operating systems are including the path to KSP:
 
Steam allows multiple library folders. The defaults on the operating systems are including the path to KSP:
 
* Windows x86:  <code>C:\Program Files\Steam\SteamApps\common\Kerbal Space Program</code>
 
* Windows x86:  <code>C:\Program Files\Steam\SteamApps\common\Kerbal Space Program</code>
 
* Windows x64:  <code>C:\Program Files (x86)\Steam\SteamApps\common\Kerbal Space Program</code>
 
* Windows x64:  <code>C:\Program Files (x86)\Steam\SteamApps\common\Kerbal Space Program</code>
* Mac: <code>~/Library/Application Support/Steam/SteamApps/common/Kerbal Space Program</code>
+
* Mac: <code>~/Library/Application Support/Steam/steamapps/common/Kerbal Space Program</code>
* Linux: <code>~/Steam/</code>, alternatively in <code>~/.local/share/Steam/SteamApps/common/Kerbal Space Program</code>
+
* Linux: <code>~/Steam/</code>, alternatively in <code>~/.local/share/Steam/SteamApps/common/Kerbal Space Program</code>, or also check <code>~/.steam/steam/steamapps/common/</code>
 
The default directories on Mac and Linux computers are in the [[w:home directory|home directories]] of the user. Within the library folder, Kerbal Space Program is in the <code>SteamApps/common/Kerbal Space Program</code> directory.
 
The default directories on Mac and Linux computers are in the [[w:home directory|home directories]] of the user. Within the library folder, Kerbal Space Program is in the <code>SteamApps/common/Kerbal Space Program</code> directory.
  
 
=== Manual installation ===
 
=== Manual installation ===
 
The manual installation is distributed in a zip archive. Depending on the operating system there is either ''KSP-win'', ''KSP_linux'' or ''KSP-osx'' which contains the root directory of KSP. When this directory is extracted it can be placed anywhere, so this tutorial can't tell where to exactly find it.
 
The manual installation is distributed in a zip archive. Depending on the operating system there is either ''KSP-win'', ''KSP_linux'' or ''KSP-osx'' which contains the root directory of KSP. When this directory is extracted it can be placed anywhere, so this tutorial can't tell where to exactly find it.
 +
 +
=== Galaxy of Games (GOG) ===
 +
 +
==== Default locations ====
 +
* Windows x64: <code>C:\Program Files (x86)\GOG Galaxy\Games\Kerbal Space Program</code>
 +
* Windows x86: <code>C:\Program Files\GOG Galaxy\Games\Kerbal Space Program</code>
 +
* Mac: <code>/Applications/Kerbal Space Program</code>
  
 
== KSP_Data ==
 
== KSP_Data ==
Line 23: Line 30:
  
 
=== Managed ===
 
=== Managed ===
Contains DLLs for KSP. This is where you look when linking a mod library. Assembly-CSharp.dll contains the KSP API. You need UnityEngine.dll for pretty much any mod and UnityEngine.UI.dll if you're going to make a GUI.  
+
Contains DLLs for KSP which are linked as a mod library. Assembly-CSharp.dll contains the KSP API. The UnityEngine.dll for pretty much needed by any mod and UnityEngine.UI.dll is needed for mods using a GUI.  
  
 
== GameData ==
 
== GameData ==
Line 31: Line 38:
 
The directory for each mod (and Squad) has several standard subdirectories. Each one is optional.
 
The directory for each mod (and Squad) has several standard subdirectories. Each one is optional.
  
* Agencies. These are the organizations who make parts and give you contracts. Adding your agency here gives you a brand, spawns contracts from them, and lets users find your parts with the "by agency" filter in the VAB. (Making it work in the VAB takes a little extra work.)
+
* Agencies. These are the organizations who make parts and supply contracts. Adding agencies here gives adds a brand, spawns contracts from them, and with a little extra work adds a "by agency" filter in the editors.
 
* Experience
 
* Experience
 
* FX
 
* FX
* Parts. Possibly the most common subdirectory for mods. Contains information for parts.
+
* Parts: Contains information for parts.
 
* Resources
 
* Resources
* Spaces. IVA views for pod parts.
+
* Spaces: IVA views for pod parts.
* Contracts. Custom contracts
+
* [[Contract]]s: Custom contracts
* Flags. The flags that go on your vessel, can be planted by your Kerbals, and prepresent agencies.
+
* [[Flag (Image)|Flags]]: The flags that can go on vessels, can be planted by Kerbals, and represent agencies.
 
* PartList
 
* PartList
 
* Props
 
* Props
 
* Sounds
 
* Sounds
* Strategies. Configs for the admin building
+
* Strategies: Configs for the [[Administration Building]]
  
 
==== Parts ====
 
==== Parts ====
You put models, textures, and .cfg files for your part here. Many modders give each part its own directory for all the files it needs. However, different parts can coexist in the same directory.
+
{{Stub|section|Where go the dlls for the part modules}}
 
+
The modules, textures and part configuration files are situated in this subdirectory. Many modders give each part its own directory for all the files it needs. However, different parts can coexist in the same directory.
There must be rules for where part module DLLs must go, but I don't know them.
 
  
 
== Saves ==
 
== Saves ==
 
In the ''saves'' directory all saved sessions are stored. In the directory is a directory for each season named after it. Changing the name won't influence how the entry is named in game. In each session directory are a ''persistent.sfs'' and if quicksaves were used ''quicksave.sfs''. The ''persistent.sfs'' stores the automatic saves done by the game regularly and prior to exiting the session.  
 
In the ''saves'' directory all saved sessions are stored. In the directory is a directory for each season named after it. Changing the name won't influence how the entry is named in game. In each session directory are a ''persistent.sfs'' and if quicksaves were used ''quicksave.sfs''. The ''persistent.sfs'' stores the automatic saves done by the game regularly and prior to exiting the session.  
  
A Hard mode without the ability to save scum is nice in theory, but KSP is still unstable enough (especially with mods) that you can lose *all* your progress to a bad crash if you don't back up your persistent.sfs.
+
A Hard mode without the ability to save may appear nice in theory, but KSP is still unstable enough (especially with mods) that '''all''' progress can be easily lost by a crash and without a backed up persistent.sfs.
  
 
Once launched, ship information is stored in the .sfs and does NOT change if the .craft file it came from is updated.
 
Once launched, ship information is stored in the .sfs and does NOT change if the .craft file it came from is updated.
  
 
=== Ships ===  
 
=== Ships ===  
For each game in the Saves directory, there is a corresponding Ships subdirectory. It contains two directories containing the saved crafts for both the [[VAB]] and [[SPH]]. Craft designs exist independently from saves - you can edit a craft in the "present", then load a save in the "past" and the changes will still be there.
+
For each game in the Saves directory, there is a corresponding Ships subdirectory. It contains two directories containing the saved craft for both the [[VAB]] and [[SPH]]. Craft designs exist independently from saves and changes in the craft files are not represent in the save file without actually launching that changed craft. Otherwise it would mean that any craft already launched would change if the craft in the editor is changed and that would make docking and staging impossible or at least very complicated.
  
You can use crafts from another game or downloaded crafts by moving the .craft files to the VAB/SPH folder in your destination save. When [[subassemblies]] are used, a ''Subassemblies'' directory is created for them. Subassemblies can be moved and downloaded in the same way.
+
Craft files from another game or downloaded craft files can be moved in the VAB/SPH folder in the destination save. When [[subassemblies]] are used, a ''Subassemblies'' directory is created for them. Subassemblies can be moved and downloaded in the same way.
  
 
== Ships ==
 
== Ships ==
There is also a directory for the Stock ships that come with KSP. If you want to delete rid of them, make sure you leave empty VAB and SPH folders or your editors load and save menus won't work.
+
There is also a directory for the [[stock craft]] that come with KSP. It is possible to delete or add craft to this directory but removing the directory itself should be avoided as the editors and save menus won't work.
 +
 
 +
== Files in root ==
 +
These files are in the Kerbal Space Program directory.
 +
 
 +
* PartDatabase.cfg: Contains drag cubes for Parts generated by KSP, so it is safe to delete them when issues arise.
 +
* settings.cfg. Contains game options set in the Settings menu. (Is this safe to delete?)
 +
* (Where do the parts categories live? Custom categories?)
  
 
[[Category:Tutorials]]
 
[[Category:Tutorials]]
 
[[Category:Modding]]
 
[[Category:Modding]]

Latest revision as of 01:53, 8 September 2020

This article is a stub. You can help KSP Wiki by expanding it.
The default contents of the root directory, also showing the Steam library path

For several tasks, like installing addons or flags, it is important to locate the installation of Kerbal Space Program. Depending on the operating system and if Steam is used, KSP is installed into different directories. Usually file locations are given relative to the root directory of Kerbal Space Program.

Installation directories

Steam

Opening the file browser from Steam

With Steam installed, it is relatively easy to get to the wanted location. Right clicking[Mac users?] on Kerbal Space Program in the Steam library opens a menu. Selecting properties opens a new window. In the tab local files the button browse local files opens the root directory where Kerbal Space Program is installed in the file browser.

Default locations

Steam allows multiple library folders. The defaults on the operating systems are including the path to KSP:

  • Windows x86: C:\Program Files\Steam\SteamApps\common\Kerbal Space Program
  • Windows x64: C:\Program Files (x86)\Steam\SteamApps\common\Kerbal Space Program
  • Mac: ~/Library/Application Support/Steam/steamapps/common/Kerbal Space Program
  • Linux: ~/Steam/, alternatively in ~/.local/share/Steam/SteamApps/common/Kerbal Space Program, or also check ~/.steam/steam/steamapps/common/

The default directories on Mac and Linux computers are in the home directories of the user. Within the library folder, Kerbal Space Program is in the SteamApps/common/Kerbal Space Program directory.

Manual installation

The manual installation is distributed in a zip archive. Depending on the operating system there is either KSP-win, KSP_linux or KSP-osx which contains the root directory of KSP. When this directory is extracted it can be placed anywhere, so this tutorial can't tell where to exactly find it.

Galaxy of Games (GOG)

Default locations

  • Windows x64: C:\Program Files (x86)\GOG Galaxy\Games\Kerbal Space Program
  • Windows x86: C:\Program Files\GOG Galaxy\Games\Kerbal Space Program
  • Mac: /Applications/Kerbal Space Program

KSP_Data

Contains core game assets - textures, models, animations, scenes, etc. Use a Unity assets browser to look inside the .assets archive files.

Managed

Contains DLLs for KSP which are linked as a mod library. Assembly-CSharp.dll contains the KSP API. The UnityEngine.dll for pretty much needed by any mod and UnityEngine.UI.dll is needed for mods using a GUI.

GameData

Since version 0.20 the GameData directory was introduced in which most of the addons go. There are exceptions, like addons which were created previously and don't support the new directory format yet or addons which change the behaviour of KSP differently.

Subdirectories

The directory for each mod (and Squad) has several standard subdirectories. Each one is optional.

  • Agencies. These are the organizations who make parts and supply contracts. Adding agencies here gives adds a brand, spawns contracts from them, and with a little extra work adds a "by agency" filter in the editors.
  • Experience
  • FX
  • Parts: Contains information for parts.
  • Resources
  • Spaces: IVA views for pod parts.
  • Contracts: Custom contracts
  • Flags: The flags that can go on vessels, can be planted by Kerbals, and represent agencies.
  • PartList
  • Props
  • Sounds
  • Strategies: Configs for the Administration Building

Parts

This article is a stub. You can help KSP Wiki by expanding it.

section

The modules, textures and part configuration files are situated in this subdirectory. Many modders give each part its own directory for all the files it needs. However, different parts can coexist in the same directory.

Saves

In the saves directory all saved sessions are stored. In the directory is a directory for each season named after it. Changing the name won't influence how the entry is named in game. In each session directory are a persistent.sfs and if quicksaves were used quicksave.sfs. The persistent.sfs stores the automatic saves done by the game regularly and prior to exiting the session.

A Hard mode without the ability to save may appear nice in theory, but KSP is still unstable enough (especially with mods) that all progress can be easily lost by a crash and without a backed up persistent.sfs.

Once launched, ship information is stored in the .sfs and does NOT change if the .craft file it came from is updated.

Ships

For each game in the Saves directory, there is a corresponding Ships subdirectory. It contains two directories containing the saved craft for both the VAB and SPH. Craft designs exist independently from saves and changes in the craft files are not represent in the save file without actually launching that changed craft. Otherwise it would mean that any craft already launched would change if the craft in the editor is changed and that would make docking and staging impossible or at least very complicated.

Craft files from another game or downloaded craft files can be moved in the VAB/SPH folder in the destination save. When subassemblies are used, a Subassemblies directory is created for them. Subassemblies can be moved and downloaded in the same way.

Ships

There is also a directory for the stock craft that come with KSP. It is possible to delete or add craft to this directory but removing the directory itself should be avoided as the editors and save menus won't work.

Files in root

These files are in the Kerbal Space Program directory.

  • PartDatabase.cfg: Contains drag cubes for Parts generated by KSP, so it is safe to delete them when issues arise.
  • settings.cfg. Contains game options set in the Settings menu. (Is this safe to delete?)
  • (Where do the parts categories live? Custom categories?)