Jump to content

Help a mod n00b out - Exploded-Ship (Orthographic) view plugin


bigorangemachine

Recommended Posts

For those of you who haven't been following the "Exploded ship view + Axes on the VAB + other stuff: now released into public domain" thread and on giggleplex's suggestion I'm starting this thread :)

I recently updated the plugin so that it'll save screenshots again and create 'exploded views' of your ships in the VAB/SPH.

I've spent the last few months reading C# books and I'm a very experience web developer so I do have some coding chops. What I need is some help getting some of these features working and maybe some direction in how to use the UnityEngine GUILayout features to smooth out this plugin a little.

If I can't PM/IRC/Skype someone could people share a few pointers here on how to:

  1. Put a close/hide button in for the plugin. Is this like anything else I create one panel for the open view and one for the hide view or is unity better than that?
  2. Improve UI (preview button, other steps to avoid needing to disable/enable buttons in the Builder UI)
  3. How to debug integration with P-Fairings?
  4. How to offer different shaders as a drop down menu.
  5. Maybe a better idea how to integrate with KSP. Maybe there is a way to make this a standalone? Is that a licensing problem? This would be kinda neat if we could make rocket posters with Delta-V, tonnage, science potential and whatever else :)
  6. Do I have to restart KSP everytime I build a DLL?! This really makes debugging a PAIN! (I am use to web where you just refresh :D). How can I smooth out my work process?

I really want to learn C#! I think this would be a great starting point to get my legs in it. Thanks in advance!

[uPDATE]

People looking for help for this plugin should use only the thread linked to above. This thread is related to getting help in maintaining the project.

Edited by bigorangemachine
Link to comment
Share on other sites

Here's a few things for a few of them:

1)To show hide a Boolean like philotical said - to have different styles of window - full, minimal, etc you can either have multiple windows or logic in em to draw them differently. I've done both and it really comes down to whats easier to work on as you are writing everything in code.

4)Drop Down menus are "fun" as you have to code everything and use blocking buttons. Theres on one in teh ARP mod in my sig if you wanted to look at how I did it - or blizzy's toolbar has a menu style too

5) You might be able to have a second copy of KSP running side by side - I think I saw a plugin that did that and then draw em up, but not sre myself

6) Here's a few tricks to speed up the restart cycle - but you do have to restart KSP each time as dlls cant be unloaded while its got them open

http://forum.kerbalspaceprogram.com/entries/1253-An-Adventure-in-Plugin-Coding-3-A-Fast-Dev-Environment-I-hope

Link to comment
Share on other sites

FWIW, learning modding here may not be the best way to learn C#. Programming for Unity is more like scripting than programming. You're boxed into Unity's MonoBehaviour implementation, which is set up to allow a scripting-like interface to the API. And the Unity documentation is tailored toward non-programmers, so you kind of have to read between the lines to figure out how the API actually functions within the more typical C# object model. (For instance, the lack of constructors in MonoBehaviour derived classes can be confusing, or more generally, the way the API relies on reflection.)

That said, I like modding because it provides a nice workout for my C# skills while they languish in between projects at work. Just be aware that Unity is kind of a walled-off environment.

Link to comment
Share on other sites

I downloaded this awesome plugin. But i don't understand how to get the "exploded" view? I clicked on explode button but it seem not working.

Some examples of my capsule family and my munar rocket:

http://i.imgur.com/mmKHaeV.png

http://i.imgur.com/mDsHfcj.png

I had the same issues, but I found that if you go into Config rather than View, then check the parts you want exploded, it'll work.

My Kerbal Album

Link to comment
Share on other sites

Hey Guys,

Everyone; Please keep this thread related to coding stuff. Please use the old one for issues with the plugin and such.

FWIW, learning modding here may not be the best way to learn C#. Programming for Unity is more like scripting than programming....

I'm fine with this. I use to customize Flash Components. Luckily at my last Job a co-worker was a Unity Guy. I caught a lot 2nd hand. That's why I knew I needed to ask some questions... Unity does a lot! I also started a designer so I'm use to stumbling through documentation. You are right though it was pretty unclear.

Very Helpful thanks!

1. only display the window if some bool is "true" - the close button would only change the bool state. if that's not the answer, please clarify the question
1)To show hide a Boolean like philotical said - to have different styles of window - full, minimal, etc you can either have multiple windows or logic in em to draw them differently. I've done both and it really comes down to whats easier to work on as you are writing everything in code.

Ah gotcha... so Unity doesn't have these kind of 'minimize' apis I could use. I saw some posts about using a boolean. I wasn't sure if it was an old Post because of the recent move to Unity5. I was hoping the GUYLayout had minimize window API built in but I understand that isn't the case now.

5) You might be able to have a second copy of KSP running side by side - I think I saw a plugin that did that and then draw em up, but not sre myself

6) Here's a few tricks to speed up the restart cycle - but you do have to restart KSP each time as dlls cant be unloaded while its got them open

http://forum.kerbalspaceprogram.com/entries/1253-An-Adventure-in-Plugin-Coding-3-A-Fast-Dev-Environment-I-hope

Helpful! Thank you.

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