Jump to content

How to make new part functions


Recommended Posts

How do you do this? Making standard parts is fairly simple as you just make the 3d model, add a collision mesh, copy and paste a config file from another part and tweak it to your needs, but how do you make something that you intend to function completely different from stock parts. For example, the interstellar mod has a warp plugin, nuclear reactors, new fuels and resources etc etc etc, which to the stock game should mean absolutely nothing. I would like to make a whole new fuel system that extends the realism of engine ignition, a bit like the engine igniter plugin, but with a bit more depth to it. The only problem with this is I can't start typing things like UDMH and RP-1 into part configs because the game is not programmed to compute resources like that.

So, all I am really asking is how to you access the game code and program into it to start variables like UDMH and RP-1 to act as resources for the game and can be used as propellants etc. I know the game runs on c#.

Any help would be great

Links to info pages about these things would be appreciated a lot

Link to comment
Share on other sites

I only started writing plugins a few days ago but have been making parts for almost a year now.

I am not entirely sure what you want to do but if you just want to add a new fuel type to use in the config you can do that without a plugin. Take a look at this.

If you want to add more functionality, requiring a plugin then I would recommend checking out the links on this thread - scroll to the bottom where it says "Plugin Development"

Link to comment
Share on other sites

Hi,

It's basicly what you said. Copy a part, replace the model, but then you also need to add a plugin.dll to tell the part how to function.

It's basicly these two tutorials:

http://wiki.kerbalspaceprogram.com/wiki/Setting_up_Visual_Studio

http://wiki.kerbalspaceprogram.com/wiki/Tutorial:Creating_your_first_module

*Download visual studio 2013 update 4 : http://www.microsoft.com/en-us/download/details.aspx?id=44921

Although debugging is a real pain in the ass...

Link to comment
Share on other sites

The resources are defined in \GameData\Squad\Resources\resourcesGeneric.cfg. I think. Try defining your resources there, then editing the part .cfg's to store or require that resource. If you want a part to have functionality that already exists in other parts, copy the relevant module data into your part. If you want new or different functionality, that's where the .dll's come in.

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