Difference between revisions of "Addon"

From Kerbal Space Program Wiki
Jump to: navigation, search
(Memory size constraints)
(Installing addons)
Line 6: Line 6:
 
In general addons are installed into the [[GameData]] directory. If the installation technique differs there is usually a more detailed description in the readme, on the Curse page or in the forum's opening post. Some mods directly distribute the content which should go into the GameData directory, while others distribute the GameData directory in which all new directories are. There are also some cases in which the root directory of the zip is itself containing a GameData directory. So unless the root directory is not named GameData it is always good to look if there is a GameData directory in the root directory.
 
In general addons are installed into the [[GameData]] directory. If the installation technique differs there is usually a more detailed description in the readme, on the Curse page or in the forum's opening post. Some mods directly distribute the content which should go into the GameData directory, while others distribute the GameData directory in which all new directories are. There are also some cases in which the root directory of the zip is itself containing a GameData directory. So unless the root directory is not named GameData it is always good to look if there is a GameData directory in the root directory.
  
For example some addons contain sample [[craft]]. These are not installed in "Gamedata" folder, but in "Ships/SPH" or "Ships/VAB" folders. The sample [[Subassembly|subassemblies]] are installed in "Subassemblies" folder, of course.
+
For example some addons contain sample [[craft]]. These are not installed in "Gamedata" folder, but in "Ships/SPH" or "Ships/VAB" folders. The sample [[Subassembly|subassemblies]] are installed in the "Subassemblies" folder in save folders, of course.
  
 
To install the content of a ZIP archive a program to unzip is required. Usually there is a program already installed, but there are various available on the internet. Of course it should be checked if the sources are trustworthy.
 
To install the content of a ZIP archive a program to unzip is required. Usually there is a program already installed, but there are various available on the internet. Of course it should be checked if the sources are trustworthy.

Revision as of 09:26, 1 January 2016

Addons, mods or plugins are modifications to the official version of the game. They either add new parts, systems and mechanics to the game or replace existing ones. Addons are generally made by the community rather than the developers and can greatly enhance the playing experience. Due to their widespread popularity, Squad offers an official website for exchanging them on the Curse Network. As an alternative and independent unofficial source Kerbal Stuff is used. Previously the Kerbal SpacePort was used as official, but redirects now to the Curse Network page.

Another source is this post on the Kerbal Space Program forums, maintained by the community.

Installing addons

In general addons are installed into the GameData directory. If the installation technique differs there is usually a more detailed description in the readme, on the Curse page or in the forum's opening post. Some mods directly distribute the content which should go into the GameData directory, while others distribute the GameData directory in which all new directories are. There are also some cases in which the root directory of the zip is itself containing a GameData directory. So unless the root directory is not named GameData it is always good to look if there is a GameData directory in the root directory.

For example some addons contain sample craft. These are not installed in "Gamedata" folder, but in "Ships/SPH" or "Ships/VAB" folders. The sample subassemblies are installed in the "Subassemblies" folder in save folders, of course.

To install the content of a ZIP archive a program to unzip is required. Usually there is a program already installed, but there are various available on the internet. Of course it should be checked if the sources are trustworthy.

The directory structure was changed in 0.20, which introduced the GameData directory. There are still some plugins which use the old directory system which is more complicated and might introduce file conflicts, where two or more files need to be merged.

Directory system

The contents of a ZIP archive are usually:

  • A directory with the mod name (might be omitted)
    • A directory with the name GameData (might be omitted too)
      • Again a directory with the mod name, which might be confused with the first level mod directory
        • Usually there is some documentation like a readme text file, or changelog.
        • The "Parts" folder contains the actual shipbuilding parts you would see in the ship builder interface.
        • The "Plugins" folder contains the plugin_name.dll files that would support the plugin system implemented by the addon.
        • The "Source" folder is just the source code, and is only needed by modders wanting to see how the addon was made and maybe attempt to modify it (with permission/attribution, of course).

Addon dependencies

Sometimes mods require other mods to work which should be mentioned in the readme, Curse or forum page. These are distributed too in most cases with the original mod, which should be checked before copying the contents. Sometimes a mod distribute an older version which might break other plugins which require the newer version. Even worse are mods with a different name, because then the same mod is installed twice which usually break the game. The best way to handle is only installing the mod itself and manually checking if any requirements are already installed and if they might need to be updated.

A common addon which falls into this category is ModuleManager, because many mods rely on it. Because the version number is in the filename so newer versions of ModuleManager don't overwrite older versions so that multiple versions are installed. But on the other hand it is easy to see which versions are installed and in the case of ModuleManager newer versions of it usually support mods which come with older versions.

The Toolbar mod is similar to the ModuleManager but all version share the same directory (000_toolbar) which can cause that a newer version may only partially overwrite an old version.

Memory size constraints

The game comes as a 32-bit and 64-bit application. When started as a 32-bit application there is a limit to the amount of memory it can access. Exceeding this limit results in an Access Violation, in which the game crashes (more often than not without any error message). An error log will then be created in the main directory. That limit is in theory 4 GiB (or 2³² bytes about 4 billion bytes) but the OS itself requires some resources so that applications usually can only access about 3 GiB.

The most common cause of an Access Violation is too many mods so one obvious solution is to uninstall a few mods, but that of course is counterproductive as the player wants to use those mods. Alternatively additional mods can be installed which reduce the memory footprint by compressing textures or similar. One prominent mod is the Active Texture Management mod which does cause most textures in-game to be lower-res.

There are practically no limits on a 64-bit application, but the game's Windows 64-bit client is very, very unstable and prone to crashing, and for a time, Squad ceased development of the 64-bit version to focus on other areas of the game (the version of Unity used at the time development was stopped was uncooperative with x64). There are no such restrictions for the 64 bit Linux editions. Of course this still requires that the hardware and operating system support 64 bit and enough RAM must be installed to hold the additional data.

Squad found that the newest version of Unity is much more agreeable with x64, and will implement a stable 64-bit app for Windows in 1.1. Users who use a large amount of mods are very much looking forward to this, though they may have to wait for a bit upon release so mod authors can update and/or recompile their mods.

Removing addons

In most cases, addons can be easily removed by deleting the addon directory in the GameData directory. Sometimes if other mods require the removed addon which then need to be removed too. If the addon introduced additional parts, craft which use those parts can't be loaded or approached. To disable the functionality without losing the craft, it is possible to change the file extension of all DLL files or remove them completely in the mod directory. Upon loading the game, the mod's code won't be loaded but the parts are still available.

As for installing, removing addons which use the directory system prior to 0.20 is more complex. Each file which was added in that mod needs to be removed manually usually and if files were merged, those needs to be undone.

Addons described on this wiki

Deprecated Mods

See also

  • List of mods: an incomplete list of the most important mods.