Akira_R

Feasability Question

11 posts in this topic

So I started a thread over in the Add-On Discussion forum and I am realizing that it might have been better to ask here if I want some responses from actual plugin developers, so here is the short version:

Idea: A mod that creates a UI window with the tech tree in it similar to how it appears in the R&D building, but you are able to move parts around between different nodes, you can then save the layout and it will generate a MM patch file that will change the techRequired for the parts to the nodes you put them in, or just a log file that you could use to make a MM patch.

For a more detailed description and reason why i think this is such a good idea please check out the thread linked above.

The Question: Just how feasible is this? Would this be something that would be fairly easy to get working or would this be quite difficult? I have zero C# experience and my C++ experience is limited to two classes in high school almost 9 years ago, so while I have a high level conceptual idea of how it would work I don't actually know how to go about doing it.

If someone thinks this is just a swell idea and wants to try writing it themselves then by all means please do!!

1 person likes this

Share this post


Link to post
Share on other sites

(Hopefully a 3-month necropost can be forgiven if it's on-topic and the first reply...)

This sounds fairly challenging to me in terms of the content/functionality. You're talking about building your own fairly complex UI (even a simple one can require quite a bit of fiddling to get right), with the goal of reading and writing one of KSP's built-in structures (the tech tree), and then code generation on the back end (you can call it a Module Manager "patch," but it has to be parsed/interpreted just like code). If you're not an experienced programmer, this might be a bit overwhelming to attempt. You might give some thought to whether this idea can be broken up into simpler sub-pieces that could be taken on separately; e.g., one standalone mod to let you drag and drop parts around in the stock tech tree, another to generate Module Manager patches to move one specific part based on command line parameters, etc. If you're able to make several pieces like that work separately, you'd then face the much less daunting task of stitching them together into one mod.

On the tech side, C# is a pretty pleasant language with which to work, more forgiving/helpful than C++ in many respects. There are free C# development environments for Windows and Linux, and the full KSP API is semi-documented on SQUAD's web site (all the class, member, and parameter names are there, but very few have useful descriptions). The greatest resource of all is the fact that all existing KSP mods have publicly visible source code (though not necessarily free licenses, a distinction worth bearing in mind). If you want to learn how to do it, all the needed tools and materials are out there.

1 person likes this

Share this post


Link to post
Share on other sites
15 hours ago, HebaruSan said:

and the full KSP API is semi-documented on SQUAD's web site (all the class, member, and parameter names are there, but very few have useful descriptions).

I ll just comment on that. I would use tomf API wiki. It has both Squad docs and community comments.

1 person likes this

Share this post


Link to post
Share on other sites

Posted (edited)

Hi, I'd like to write ONE small mod : a compact display of main flight/target variables. The idea is to add one or two windows integrating graphically with the navball, and displaying numerically   :

- Vessel elevation / radar altitude / vertical speed

- Mouse cursor heading/elevation

- Target heading/elevation/distance/altitude/ETA

Telling details in the case someone searches a simple mod idea and would love to make that :P

But I could have other ideas. So I tried to get some C# IDE for my Mint install, but that took already too much time. I see there are C# online compilers. Is one of them suitable to make DLLs for KSP ? If not, wouldn't it be a cool server...?

Edited by Kenny Kerman
karma modding

Share this post


Link to post
Share on other sites

Posted (edited)

On 3/17/2017 at 2:13 PM, Kenny Kerman said:

Hi, I'd like to write ONE small mod : a compact display of main flight/target variables. The idea is to add one or two windows integrating graphically with the navball, and displaying numerically   :

- Vessel elevation / radar altitude / vertical speed

- Mouse cursor heading/elevation

- Target heading/elevation/distance/altitude/ETA

Telling details in the case someone searches a simple mod idea and would love to make that :P

I'm guessing that most people who like those ideas would install KER or MJ and customize a window instead of writing a whole new mod.

Quote

But I could have other ideas. So I tried to get some C# IDE for my Mint install, but that took already too much time. I see there are C# online compilers. Is one of them suitable to make DLLs for KSP ? If not, wouldn't it be a cool server...?

The Mono C# compiler and Monodevelop IDE that are packaged with your distribution work well for this, and are unlikely to take more time to get working than whatever a "C# online compiler" is. You might want to start a fresh topic in this forum with details of your problems; we occasionally manage to help with such things:

 

Edited by HebaruSan
1 person likes this

Share this post


Link to post
Share on other sites

Thank you, I'm gonna clean up the room and try this (so used to WIn I never can figure out how linux is simple). Writing this window would be for a better screen surface use & begin KSP mod programming without the need of 3D (I'm "working" on it too... Some fun control boxes ideas...)

Share this post


Link to post
Share on other sites
2 hours ago, Kenny Kerman said:

As far as I can tell, those web pages don't generate DLLs. They might be good for experimenting with C# very easily, but you would not be able to run the code in KSP. (And there are other problems as well, such as specifying .NET 3.5 as the target platform or adding references to the Unity and KSP DLLs.)

Share this post


Link to post
Share on other sites

Posted (edited)

1 hour ago, HebaruSan said:

As far as I can tell, those web pages don't generate DLLs. They might be good for experimenting with C# very easily, but you would not be able to run the code in KSP. (And there are other problems as well, such as specifying .NET 3.5 as the target platform or adding references to the Unity and KSP DLLs.)

Sure, as far as I can tell, too. But maybe somewhere... It could be cool to have such a thing, making easy DLL development/generation/deployement/update/sharing specifically for KSP. Btw I did install Monodevelop using the (nearly...) vanilla Mint way, it works just fine.

https://repl.it/languages/python is really usable for devs.

Edited by Kenny Kerman

Share this post


Link to post
Share on other sites
51 minutes ago, Kenny Kerman said:

making easy DLL development/generation/deployement/update/sharing specifically for KSP

Setting up a dev env is not exactly the hard part of KSP plugin modding.

Share this post


Link to post
Share on other sites

Posted (edited)

12 hours ago, sarbian said:

Setting up a dev env is not exactly the hard part of KSP plugin modding.

OK :) I don't see what is actually the hard part, don't spoil me :P Working on some KAL9000 cube. But it would be great to adjust or correct code. Like the littlebugs I see on most mods.

Edited by Kenny Kerman

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now