Jump to content

Question About Modding KSP -- Basic C# Unity Knowledge -- Looking to update an Outdated Mod


Recommended Posts

Hello,

As the title says, I have some basic knowledge of C# (Actually C# in Unity), and am looking to update an outdated mod, specifically ShipEffects Sound Mod: Dynamic Sound Effects which explicitly states that development is haulted and anyone is welcome to update it (Which the license also allows for)

Since I have some basic knowledge of C#, I opened up the source file and had a look. However while I understand the syntax of things, I have never modded KSP before so am not quite sure what I should be doing to "update" the mod. On which note I also have no idea what makes a mod "Outdated"? I mean I know that certain code in a mod won't work in a new version because the classes that the mod accesses from the game may have been changed in the update, but I'm not quite sure how I would go about determining what makes the mod not function properly in a new version of the game.

I'll be honest here, I am not asking for somebody to update it for me or tell me exactly how to do it -- I am simply asking for guidance in updating a mod that I enjoy playing with. I would also assume my basic C# knowledge with Unity would also give me a leg up from somebody completely new to coding asking this same question.

P.S ~ To point out the main question here more directly...

Question: How do I determine what causes an outdated mod to crash or not function correctly in a new version of KSP, and what are the basic steps I may take to remedy the problem.

Link to comment
Share on other sites

Step one:

Setup the mod source in your IDE as you would for any plugin (http://wiki.kerbalspaceprogram.com/wiki/Plugins). The IDE will highlight any variables that no longer exist for w/e reason. All of these need to be resolved

Step two:

Compile the mod and install it. Verify that it functions as expected and doesn't create any errors in the logs. When an error occurs, it will print a stack trace to the log which will tell you which function the error occurred in. If you need to narrow it down further, add some logging statements to that function to determine where in the function the error occurred using Debug.Log()

When the plugin compiles, shows expected behaviour, and doesn't put any errors in the log files, the plugin can be considered updated.

Link to comment
Share on other sites

Huh... So I opened it up to check for any highlighted variables as you mentioned, and well -- There weren't any. So on that note I just realized that I sort of made a mistake in assuming the mod didn't work because it was outdated without actually testing it first. (That being said, I just tested it now and it appears to function correctly and not be in need of an update... Woops)

Though all of that being said -- Your post was actually very helpful and I'm sure your advice will probably help me in the future with this if it ever comes up. :)

EDIT: Well I spoke too soon, the mod has a problem that only happens under certain conditions >_< Will now attempt to fix.

Edited by CoriW
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...