Jump to content

Programming language requirements for modding KSP?


Talavar

Recommended Posts

Hi guys.. I'm an old goat when it comes to programming.. I started with procedural generation in basic on the old commodore's and apple's Moved on to some C,visual C, then landed on some HTML, on to Blitz3d engine, Now looking forward. Do I just need knowledge of Unity code (which I really haven't looked at yet) or should I be looking elsewhere as well. I'm not sure what Unity is compatible with in terms of other languages (if any).

By the way, I'm talking about the reference DLL.s that are used for plugins, etc.

Edited by Talavar
Link to comment
Share on other sites

Talavar, Unity uses C#. You can use, really, any C# compiler to work with Unity code, so long as you add the KSP dlls as references. You can even use Visual Studio if you got it to work with Unity.

Link to comment
Share on other sites

Most things are written in C#. Which is kind of like a sane version of Java.

However, what it actually runs on is the so-called Common Language Runtime (or to be precise, it's Mono version, based around .NET 3.5) virtual machine, which in theory permits you to use any number of languages which compile to CLR, which is a bloody lot -- Boo is an strongly typed half-brother of Python and is directly supported by Unity, there's no end of exotic languages made specifically for CLR, and in general you have a wide choice. But most people settle on C# because it's best documented in this particular case.

In all cases, you will want to work with what passes for API in KSP (exposed public methods and fields of objects) and you will want to know about Unity scripting API.

Link to comment
Share on other sites

Talavar, Unity uses C#. You can use, really, any C# compiler to work with Unity code, so long as you add the KSP dlls as references. You can even use Visual Studio if you got it to work with Unity.
I found it just as you responded.. Thank you anyway Raven. I'm hoping to make some interesting stuff after I brush up a bit. See you (soon I hope) in the add-ons section!
Link to comment
Share on other sites

Most things are written in C#. Which is kind of like a sane version of Java.

However, what it actually runs on is the so-called Common Language Runtime (or to be precise, it's Mono version, based around .NET 3.5) virtual machine, which in theory permits you to use any number of languages which compile to CLR, which is a bloody lot -- Boo is an strongly typed half-brother of Python and is directly supported by Unity, there's no end of exotic languages made specifically for CLR, and in general you have a wide choice. But most people settle on C# because it's best documented in this particular case.

In all cases, you will want to work with what passes for API in KSP (exposed public methods and fields of objects) and you will want to know about Unity scripting API.

And a very informative answer by Mihara, (seen you around quite a bit!) Thank you! that will definitely help!
Link to comment
Share on other sites

Mihara, I'm not really versed in many of the CLR compatibles.. what would you recommend as a straight forward side language?

If you're not versed in any of the languages on the list, C# is your best bet because it's the best documented pathway to get something to compile quickly. :)

  1. Install Unity Editor. That comes with a copy of MonoDevelop, which is a nice IDE that has direct support for C# and Boo.
  2. Get yourself an account on GitHub and a copy of GitHub for Windows. (if you're on Windows, that is) Forum rules require you to publish the source of your mods regardless of license, might as well keep the source in an open versioning system. It also allows you to publish binary releases better than messy file sharing services like Dropbox or Mediafire and doesn't carry the controversy of Curse.
  3. Take a look at TAC Examples which do well to introduce the basic concepts of writing KSP plugins.

That should get you started.

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...