Module Tips and Tricks

From Kerbal Space Program Wiki
Revision as of 23:01, 20 June 2015 by Bebop (talk | contribs) (Automatically Copy to KSP For Testing: Auto launch tips)
Jump to: navigation, search

Visual Studio Tips

Package As You Build

I frequently set up my plugins so they are shoved into MyKSPSolution/bin/Plugins after being compiled so it's much easier to package, and so I can create parts in bin/Parts.

  1. Right-click on your plugin project (NOT the solution) and choose Properties.
  2. Click on the Build tab.
  3. Change Output Path to ..\bin\Plugins\.
  4. Create YourKSPSolution\bin\Plugins and YourKSPSolution\bin\Parts.

Visual Studio should now place compiled binaries into bin\Plugins for packaging. -- N3X15 (talk) 19:16, 6 March 2012 (UTC)

Automatically Copy to KSP For Testing

The repetitive process of copying your plugins to KSP really sucks, so I have a simple modification that makes things quite a bit easier.

Quick Version

  1. In Visual Studio, right-click on your plugin project (NOT the solution) and choose Properties.
  2. Open the Build Events tab
  3. In the Post-build event box, type copy "$(TargetPath)" "C:\path\to\KSP\Plugins\" (Yes, the quotes are needed!)
    • You can add more stuff for copying over parts, too.

Batch Script

If your wish to be a little fancier, you may wish to make a publish.bat batch script instead. Run it from the same Post-build Events box with

call publish.bat

Automatically Launch KSP

Likewise, you can launch KSP directly from the Post-build Events.

C:\Users\boone\KSP_Lite\KSP.exe

Dev Helper is a handy mod that saves you some clicking. You can set a saved game and Scene that will load when you start KSP. It still mostly works in 1.02. It doesn't load the VAB correctly, but the star map loads fine.