Jump to content

Making a mod for newbie


Recommended Posts

I am new to this idea of modding and I have an idea of what I would like to try but no clue where to begin with the actual program making part. I have done programming before, but not much in the way of building programs or add-on. My background is more in scientific computing and MATLAB/python type stuff, so this is a whole new world for me.

I know the theory behind what I want to do, but don't know how to make a mod and get it implemented into KSP. To start I just want to be able to just replicate something like a mechjeb function where you burn automatically or something. Just a simple thing like a GUI button which burns for 10 seconds holding a direction. Maybe something like how to make a maneuver node too, but that's secondary. I think if I could get that far I could do the rest. This first step though is a bit daunting for me.

I've looked at some mod source code like MechJeb and I'm still a bit overwhelmed trying to figure out how to start something simple.

Could anyone help me figure out a few questions?

1- what language should I be using? (C#?)

2- how do I go about making an add on that could interface with KSP while running (how to go from a source file script to a button in the KSP window)

I'm sorry if this is asked a lot, and if there is a tutorial please let me know. It seems that most I find either requires more background than I know, or is directed to part making.

Thank you

Link to comment
Share on other sites

1- Anything that compiled to an CIL dll runnable by mono (i.e. no MS specific classes) should work, C# is your best bet though as virtually everyone else uses it.

2- Compile it to a library (dll) and stick it in the plugins folder. KSP will load the code automatically. To actually get it to be invoked depends on your aim, but the most common way it to extend the PartModule class and then attach a MODULE{ } section to a part naming your class, that is how mechjeb functions for example.

You would generally add Assembly-CSharp.dll and UnityEngine.dll are references to your project (or specify than at compile time if you're doing it the long way). PartModule is contained in the former so it is essential for that approach.

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