Difference between revisions of "Plugins"

From Kerbal Space Program Wiki
Jump to: navigation, search
(Creating Plugins)
(Updated the introduction.)
Line 1: Line 1:
Starting with KSP 0.14, the game supports custom part behaviors called '''Plugins'''.  Defining custom behaviors allows you to create totally new kinds of parts, such as flight control computers, new types of fuel supply chains, etc.  You can then add these to the game in the form of plugins.  These DLLs can be loaded on any platform that can run KSP.
+
'''Plugins''' are user-made [[addons]] which add to or change the behavior of KSP. They consist of one or more [[w:c:wikipedia:Dynamic-link_library|DLL]] files written in the [[w:c:wikipedia:C_Sharp_(programming_language)|C# programming language]]. Plugins allow changing how the game itself works, anything from showing new information windows to making a hovercraft part, or even new planets. Plugin support was added to KSP in version 0.14, and is available on all operating systems.
 
 
'''READ THE [http://forum.kerbalspaceprogram.com/index.php?topic=8088.0 POSTING GUIDELINES] BEFORE PUBLISHING YOUR PLUGIN'''
 
  
 
== Using Plugins ==
 
== Using Plugins ==
  
To use a Part Module Plugin, just drop the DLL into KSP/Plugins. If the folder doesn't exist, you can create it.
+
To use a Part Module Plugin, just drop the DLL into KSP/GameData/ or a new sub folder inside it. To stop using a plugin, just delete it or move it outside the KSP/GameData/ folder.
  
 
== Creating Plugins ==
 
== Creating Plugins ==
  
To start with, you need to decide which IDE you will use. An IDE is a program that helps you to write code (in our case the language C#). Listed here are some of the most popular options. Green means it is available for that OS, and red means it isn’t available.
+
Plugins can be written in any text editor and compiled with a standalone compiler, but the easiest way to start coding is to use an [[w:c:wikipedia:Integrated Development Environment|Integrated Development Environment]] or IDE for short. An IDE is a program that helps you to write code (in our case the language C#). Listed here are some of the most popular options.
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 34: Line 32:
 
|}
 
|}
  
Now, you can get started.
+
See the above links for setting up your chosen IDE for building KSP plugins. Once you're ready to build, try [[Tutorial:Creating your first module|creating your first module]].
  
 +
* [[Community API Documentation]]
 
* [[Tutorial:Creating your first module|Creating your first module]]
 
* [[Tutorial:Creating your first module|Creating your first module]]
 
* [[Module Tips and Tricks]]
 
* [[Module Tips and Tricks]]
 
* [[CFG File Documentation#Part Modules|List of stock Part Modules.]]
 
* [[CFG File Documentation#Part Modules|List of stock Part Modules.]]
 
* [[Module code examples]]
 
* [[Module code examples]]
* [[Community API Documentation]]
 
 
* [https://www.youtube.com/watch?v=ilWZjYx7brE cybutek's .20+ quick start video guides]
 
* [https://www.youtube.com/watch?v=ilWZjYx7brE cybutek's .20+ quick start video guides]
 
* [http://forum.kerbalspaceprogram.com/forums/30-Plugin-Development-Help-and-Support KSP Forum Plugin Development Support section]
 
* [http://forum.kerbalspaceprogram.com/forums/30-Plugin-Development-Help-and-Support KSP Forum Plugin Development Support section]
  
 
[[Category:Modding]]
 
[[Category:Modding]]

Revision as of 11:05, 6 January 2015

Plugins are user-made addons which add to or change the behavior of KSP. They consist of one or more DLL files written in the C# programming language. Plugins allow changing how the game itself works, anything from showing new information windows to making a hovercraft part, or even new planets. Plugin support was added to KSP in version 0.14, and is available on all operating systems.

Using Plugins

To use a Part Module Plugin, just drop the DLL into KSP/GameData/ or a new sub folder inside it. To stop using a plugin, just delete it or move it outside the KSP/GameData/ folder.

Creating Plugins

Plugins can be written in any text editor and compiled with a standalone compiler, but the easiest way to start coding is to use an Integrated Development Environment or IDE for short. An IDE is a program that helps you to write code (in our case the language C#). Listed here are some of the most popular options.

IDE License Windows Mac Linux
Visual Studio Commercial style="background: #9f9; vertical-align: middle; text-align: center;" class="table-yes" | Yes style="background: #f99; vertical-align: middle; text-align: center;" class="table-no" | No style="background: #f99; vertical-align: middle; text-align: center;" class="table-no" | No
MonoDevelop (aka Xamarin Studio) LGPLv2 / MIT (Free) style="background: #9f9; vertical-align: middle; text-align: center;" class="table-yes" | Yes style="background: #9f9; vertical-align: middle; text-align: center;" class="table-yes" | Yes style="background: #9f9; vertical-align: middle; text-align: center;" class="table-yes" | Yes
SharpDevelop Open-source (Free) style="background: #9f9; vertical-align: middle; text-align: center;" class="table-yes" | Yes style="background: #f99; vertical-align: middle; text-align: center;" class="table-no" | No style="background: #f99; vertical-align: middle; text-align: center;" class="table-no" | No

See the above links for setting up your chosen IDE for building KSP plugins. Once you're ready to build, try creating your first module.