Jump to content

Help with targeting science


Recommended Posts

I am looking to make my first plug in. I would like to make a science plugin that uses something like the Hubble telescope. it can be in orbit around Kerbin. target Duna and slowly gain science point from Duna. then target Jool and slowly gain science point from jool. possibly also give a list of fake targets outside of the solar system.

the last time I did any programming was Visual Basic 6. I know there will be one or two people that will tell me to go to read book X on c# programming. I have never been able to learn that way. unfortunately being dyslexic and ADD don't help you're learning process.

if someone has a basic "hello world" set of project files for a kerbal plugin. ready to compile. a list of some good tutorials on some basic kerbal functions and can tell me the what compiler to use. from there I can learn alot. then ask a question here or there on how to do something specification.

any help thank you for your time and patience

Link to comment
Share on other sites

Wiki has some good tutorials (some albeit slightly outdated). I've never been able to do the whole read book X thing either.

Do you have an IDE? Or are you new to C#? If you have coded before then picking up a new language should be simple enough.

You can choose Visual Studio, MonoDevelop or SharpDevelop, as the wiki explains. Visual studio has a free Express version, and MonoDevelop and SharpDevelop are LGPL or open-source. I would recommend Visual Studio. KSP is based on the Unity game engine so you can use the Unity scripting reference for some things.

Unity Scripting reference: http://docs.unity3d.com/Documentation/ScriptReference/index.html

Here is C# reference: http://msdn.microsoft.com/en-us/library/vstudio/618ayhy6.aspx

Here is start page for plugins on wiki: http://wiki.kerbalspaceprogram.com/wiki/Plugins

Here are some longer examples: http://wiki.kerbalspaceprogram.com/wiki/Module_code_examples

Also just scour around here, and also all Addons should be open source. If you are confident enough to do so, you can just peer at the Source of other plugins. On the subject of the telescope, you could just have a GUI to select a target, and point it automatically in the rough direction of the planet, or do a full on raycast system.

Happy coding!

Edited by tom1499
Link to comment
Share on other sites

It is hard to find some up to date tutorial/info.

Check this thread if you are looking for non part plugin.

This is very old and not everything is still good, but the setup of visual studio is still ok:

(watch the whole serie, so you have some idea on how the GUI works)

Also the best, is to look at the plugin that does something you want, and see how they did.

Link to comment
Share on other sites

Also a note on debugging: KSP does not debug well. Unity doesn't have any live editing or debugging stuff, so debugging plugins isn't the easiest. You can try doing multiple try{} catch(){} statements, or if you have a small snippets you know don't work, comment out individual lines and build, until you find the issue.

Link to comment
Share on other sites

Looking around in Add-On development forums or searching google didn't lead you to this stickied post?

I must admit this time I didn't hunt around for the info... Sorry.

I just posted this thread. I know I was going to need it from time to time. And I was bing lazy. Instead of me finding a lot of posts and reading tell my eyes hurt. I know KSP modding people are very helpful. I could get started before I got discouraged and gave up. even you a little annoyed at me are very helpful. (It looked like you are annoyed a little but if I'm wrong sorry for assuming Incorrectly.)

Or are you new to C#?

I would recommend Visual Studio. KSP is based on the Unity game engine so you can use the Unity scripting reference for some things.

Happy coding!

No never coded C#

Thank you for the help and incuragement.

It is hard to find some up to date tutorial/info.

Check this thread if you are looking for non part plugin.

This is very old and not everything is still good, but the setup of visual studio is still ok:

(watch the whole serie, so you have some idea on how the GUI works)

Also the best, is to look at the plugin that does something you want, and see how they did.

thank you. When I get home I'll try that

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...