Difference between revisions of "Module Tips and Tricks"
(→Automatically Copy to KSP For Testing) |
m |
||
(9 intermediate revisions by 4 users not shown) | |||
Line 15: | Line 15: | ||
The repetitive process of copying your plugins to KSP really sucks, so I have a simple modification that makes things quite a bit easier. | 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 ==== | ||
# Right-click on your plugin project (NOT the solution) and choose Properties. | # Right-click on your plugin project (NOT the solution) and choose Properties. | ||
Line 21: | Line 23: | ||
#* You can add more stuff for copying over parts, too. | #* 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 | ||
+ | <syntaxhighlight> | ||
+ | call publish.bat | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | === Automatically Launch KSP === | ||
+ | Likewise, you can launch KSP directly from the Post-build Events. | ||
+ | <syntaxhighlight> | ||
+ | C:\KSP_Lite\KSP.exe | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | [http://forum.kerbalspaceprogram.com/threads/60880-0-24-Magic-Smoke-Industries-DevHelper-v0-6 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 | ||
+ | |||
+ | == What gets reloaded when == | ||
+ | You'll be making hundreds of tiny changes and testing them, so it pays to know what corners you can cut to make that less of a chore. | ||
+ | |||
+ | Changes in C# compiled into PartModule dlls are generally reloaded. However there is at least one exception: KSPEvent Attributes do NOT get refreshed! Attributes set by the parts.cfg do NOT get reloaded for existing vessels. | ||
+ | |||
+ | If you can't figure out why your changes haven't had any effect, try launching a new craft with your part. | ||
+ | |||
+ | == Big, easy-to-click Dummy Part == | ||
+ | Even if your final product is going to be a teeny, tiny part, it may make your life easier to attach your part module to an enormous part instead while you develop! | ||
[[Category:Modding Tutorials]] | [[Category:Modding Tutorials]] |
Latest revision as of 15:22, 1 October 2019
Contents
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.
- Right-click on your plugin project (NOT the solution) and choose Properties.
- Click on the Build tab.
- Change Output Path to ..\bin\Plugins\.
- 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
- Right-click on your plugin project (NOT the solution) and choose Properties.
- Open the Build Events tab
- 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:\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
What gets reloaded when
You'll be making hundreds of tiny changes and testing them, so it pays to know what corners you can cut to make that less of a chore.
Changes in C# compiled into PartModule dlls are generally reloaded. However there is at least one exception: KSPEvent Attributes do NOT get refreshed! Attributes set by the parts.cfg do NOT get reloaded for existing vessels.
If you can't figure out why your changes haven't had any effect, try launching a new craft with your part.
Big, easy-to-click Dummy Part
Even if your final product is going to be a teeny, tiny part, it may make your life easier to attach your part module to an enormous part instead while you develop!