Jump to content

(KSP 1.10 + 1.12 ) Mission Controller 3.2.0 (Final Version) (Updated 6/25/2021)


malkuth

Recommended Posts

8 hours ago, malkuth said:

Thanks to @DMagic and @Fengist for there UI tutorials on how to do this stuff.

After done with the UI for the in game stuff I will be doing the KSPedia Stuff! 

Can you direct me to those tutorials?

I'm having a hell of a time translation the old ones into the latest Unity.

I may end up picking your brain a bit too.

Link to comment
Share on other sites

sure this is the one I learned most on.

Lazy Coders Guide To KSP UI

35 minutes ago, TranceaddicT said:

Can you direct me to those tutorials?

I'm having a hell of a time translation the old ones into the latest Unity.

I may end up picking your brain a bit too.

Let me just caution you the TextMesh Pro part is completely messed up. Doesn't work at all for KSP 1.10 (believe 1.9 too).. Even though you still have to have it, and install it just like mentions for Parttools.  You have to basically do this that @DMagic mentions in this other thread.  I go find it for you..  and post it in this thread when I do.

 

Here it is.. 

TextMesh Pro Issues

Edited by malkuth
Link to comment
Share on other sites

On 7/18/2020 at 3:35 PM, SpaceGreer said:

Ha! This is sweet! Look forward to it. R

Hey just a question for you since I never used Hanger Mod before.. But when you make a vessel from the hanger do you still end up launching it like normal?  IE  You hit spacebar to actaully launch it still.. Or is it instant out?  And more important can you still right click on part Modules and change things while in this state.

Only wondering because I would like to make it only editable in Pre-Launch state while waiting to hit the spacebar, for Sat Types and Modules.  in the new UI.

Link to comment
Share on other sites

On 7/11/2020 at 1:09 PM, etmoonshade said:

Downloading now, and I'll give it a few kicks as soon as I get this 1kt cargo spaceplane landed...

 

3 hours ago, SpaceGreer said:

I don't know - sorry! I've not tried the hanger mod :/

sorry meant to send that to @etmoonshade

Link to comment
Share on other sites

8 hours ago, malkuth said:

Hey just a question for you since I never used Hanger Mod before.. But when you make a vessel from the hanger do you still end up launching it like normal?  IE  You hit spacebar to actaully launch it still.. Or is it instant out?  And more important can you still right click on part Modules and change things while in this state.

Only wondering because I would like to make it only editable in Pre-Launch state while waiting to hit the spacebar, for Sat Types and Modules.  in the new UI.

As far as I can tell (and @allista can correct me if I'm wrong,) it spawns the vessel inside the hangar with a slight outward push once you "release" it. So "instant out" would probably be the correct way to describe this - as soon as you kick the vessel out of the hangar, it's a separate vessel.

I'm honestly not sure if there's a way to release it but keep it in some sort of "docked" state, and there's certainly not a way to edit it before it's released from the hangar (and even keeping it docked to edit it on the launchpad would defeat the purpose of something like the fairing hangar, where the structure of the hangar disappears once you deploy it.)

It seems you're worried about making satellite contracts trivial (e.g. launching a few satellites beforehand and then just setting them as you accept contracts for easy money) - it might be worth making it a config option somewhere that needs to be explicitly activated so the "default" experience is what you intend it to be, and then people who need the on-the-fly change functionality can enable it if they need it? Or just detect whether Hangar is installed and use a MM patch to change the module that's installed to something with the quick-change functionality? Although the latter sounds like a lot of duplicated code...

Of course, either way you look at it, that gets into making the code more complicated - I'd personally rather deal with not being able to use Hangar on satellite contracts than have you bang your head against the wall trying to balance for it or code around it. :D

Also, that UI looks slick. I look forward to trying it out.

Edited by etmoonshade
Link to comment
Share on other sites

17 minutes ago, etmoonshade said:

As far as I can tell (and @allista can correct me if I'm wrong,) it spawns the vessel inside the hangar with a slight outward push once you "release" it. So "instant out" would probably be the correct way to describe this - as soon as you kick the vessel out of the hangar, it's a separate vessel.

I'm honestly not sure if there's a way to release it but keep it in some sort of "docked" state, and there's certainly not a way to edit it before it's released from the hangar (and even keeping it docked to edit it on the launchpad would defeat the purpose of something like the fairing hangar, where the structure of the hangar disappears once you deploy it.)

It seems you're worried about making satellite contracts trivial (e.g. launching a few satellites beforehand and then just setting them as you accept contracts for easy money) - it might be worth making it a config option somewhere that needs to be explicitly activated so the "default" experience is what you intend it to be, and then people who need the on-the-fly change functionality can enable it if they need it? Or just detect whether Hangar is installed and use a MM patch to change the module that's installed to something with the quick-change functionality? Although the latter sounds like a lot of duplicated code...

Of course, either way you look at it, that gets into making the code more complicated - I'd personally rather deal with not being able to use Hangar on satellite contracts than have you bang your head against the wall trying to balance for it or code around it. :D

Also, that UI looks slick. I look forward to trying it out.

No not worried about using sats over and over.  They are still just a one use thing.. Dead at least the Mission Controller Part after completing 1 mission with it.  

I was just curious if you had to launch the vessel, just like taking off from the launch pad.

 

Anyway  the new UI for Repair Panels and Satellite Panels..

 

New Repair Panel

3HYRxf2.png

 

New Satellite Panel

Euy0y5T.png

Link to comment
Share on other sites

6 minutes ago, malkuth said:

New Satellite Panel

Euy0y5T.png

I really hope that frequency field takes text input. That would be an awesome feature in general, especially when setting up custom contracts with a high orbit (I don't even want to imagine how many clicks it'd take to get a reasonable orbit around the sun in a rescale mod...)

So slick though. I like it.

Edited by etmoonshade
Link to comment
Share on other sites

13 minutes ago, etmoonshade said:

I really hope that frequency field takes text input. That would be an awesome feature in general, especially when setting up custom contracts with a high orbit (I don't even want to imagine how many clicks it'd take to get a reasonable orbit around the sun in a rescale mod...)

So slick though. I like it.

Nope thats just the Frequency setting.. It replaces the old slider in the old system.. You can only go from 1-50.. Either in 1/2 increments or 1.  It works alot better than the slide.

I have not got to the new Custom contracts UI yet.. That one is going to take a long time.  These last 2 took many days.. And still trying to work out all the bugs. LOL...   Only good thing about the Custom Contracts UI is that I don't have to work around the Part Modules, and getting a UI not connected to the part to work with it.   Gah..

 

But for sure the Text Imput for Custom Contracts and Orbital Heights is going to happen.  Mostly because it will save me like a half dozen buttons.

Edited by malkuth
Link to comment
Share on other sites

27 minutes ago, malkuth said:

But for sure the Text Imput for Custom Contracts and Orbital Heights is going to happen.  Mostly because it will save me like a half dozen buttons.

New features that save work. The best sort of features. :D

Link to comment
Share on other sites

15 hours ago, malkuth said:

Hey just a question for you since I never used Hanger Mod before.. But when you make a vessel from the hanger do you still end up launching it like normal?  IE  You hit spacebar to actaully launch it still.. Or is it instant out?  And more important can you still right click on part Modules and change things while in this state.

Only wondering because I would like to make it only editable in Pre-Launch state while waiting to hit the spacebar, for Sat Types and Modules.  in the new UI.

@etmoonshade a bit of technical detail

When Hangar spawns a vessel-stored-in-editor (as opposed to a vessel stored in flight), it performs all the routine of assembling it from the corresponding ShipConstruct, positioning it, setting its orbit and then physically applying force and torque to conserve linear and angular momentum. During this process the vessel exists in PRELAUNCH state briefly, but the state is changed to that of the launching vessel as soon as the launched one is loaded.

@malkuth if you explain me the issue in more detail, I'll try to help to make both mods compatible. E.g. a Hangar,  as soon as the vessel is completely launched, sends dedicated KSPEvent -- onLaunchedFromHangar -- to ALL parts of the launched vessel. This may be a signal for a single-shot configuration.

Link to comment
Share on other sites

6 hours ago, allista said:

@etmoonshade a bit of technical detail

When Hangar spawns a vessel-stored-in-editor (as opposed to a vessel stored in flight), it performs all the routine of assembling it from the corresponding ShipConstruct, positioning it, setting its orbit and then physically applying force and torque to conserve linear and angular momentum. During this process the vessel exists in PRELAUNCH state briefly, but the state is changed to that of the launching vessel as soon as the launched one is loaded.

@malkuth if you explain me the issue in more detail, I'll try to help to make both mods compatible. E.g. a Hangar,  as soon as the vessel is completely launched, sends dedicated KSPEvent -- onLaunchedFromHangar -- to ALL parts of the launched vessel. This may be a signal for a single-shot configuration.

That OnLaunchedFromHangar will work.

Anyway the original issue was @etmoonshade asked if it was possible to be able to edit the Conditions MCE sets for Probes in flight.  Basically we create a contract that has three properties that must be met.  Satellite Type, Satellite Module, and Frequencies, The contract gives you the settings and in the editor you set the conditions yourself.. IE make a satellite type Communication with a Module type and frequency of such and such.

Originally I had this set that you could only do these changes in the editor, not in flight... Didn't make to much sense that you could change a Satellite type in mid flight... Be kinda like launching the Hubble Telescope and while its in space changing it to a starlight satellite... LOL..  So I compromised and made an easy fix to allow the changes in flight. (was easy fix at the time) since you cant change any of those settings from a hanger before launch.. (I believe the vessels are pre loaded already made).

Anyway now I doing a large make over of the UI for Mission Controller and since I was in the code and changing everything I figured I would find a way around this, without the compromise.  But now since you have your own KSPEvent Thats good enough for me, to make it work.  Thanks. :)  which basically just means Im going to only make the compromise if that condition is met.. Any other time its going to be the same as old way.. Only Im updating it to people can change settings at PreLaunch too... to help with another mod.  IE they can edit the settings while the vessel is still sitting on the launch pad.. But not after launch.. Except Freq... Which Im going to allow anytime.

Edited by malkuth
Link to comment
Share on other sites

2 hours ago, malkuth said:

That OnLaunchedFromHangar will work.

In that case, here's how it is sent and what is passed in the data object:

https://github.com/allista/hangar/blob/master/Source/HangarMachinery.cs#L588

and

https://github.com/allista/hangar/blob/master/Source/HangarFairings.cs#L665

And here's how TCA uses it, while also checking if the launch was performed from fairings:

https://github.com/allista/ThrottleControlledAvionics/blob/master/ModuleTCA.cs#L341

Link to comment
Share on other sites

3 hours ago, malkuth said:

Basically we create a contract that has three properties that must be met.  Satellite Type, Satellite Module, and Frequencies, The contract gives you the settings and in the editor you set the conditions yourself.. IE make a satellite type Communication with a Module type and frequency of such and such.

What I don't understand is why doesn't it work as is? Whatever one does in Editor is saved in the ShipConstruct and then is retained by the Vessel that is created from the construct. There's not much difference between launching from Editor to the launchpad and launching later from a hangar in flight.

So if your configuration is saved in some part module it should work after launching from hangar.

Link to comment
Share on other sites

4 minutes ago, allista said:

What I don't understand is why doesn't it work as is? Whatever one does in Editor is saved in the ShipConstruct and then is retained by the Vessel that is created from the construct. There's not much difference between launching from Editor to the launchpad and launching later from a hangar in flight.

So if your configuration is saved in some part module it should work after launching from hangar.

My use case was a standard "satellite launcher" using a fairing hangar and a standardized satellite, rather than having to tweak and reload a subassembly each time I wanted to do a new launch.

Link to comment
Share on other sites

25 minutes ago, allista said:

What I don't understand is why doesn't it work as is? Whatever one does in Editor is saved in the ShipConstruct and then is retained by the Vessel that is created from the construct. There's not much difference between launching from Editor to the launchpad and launching later from a hangar in flight.

So if your configuration is saved in some part module it should work after launching from hangar.

From my understanding they are using a feature thats pre-made vessel from space?  And can't be edited to adjust to a new contract?  So they saved a Pre-Made vessel with Value A,B,C...  But when they get a new contract the contract ask for Values D,E,F but the pre construct is still A,B,C..

Normally you just edit the ship and set it to D,E,F and launch like normal.  I guess I would have to check out Hangar mod to see how it works to see.

 

Edited by malkuth
Link to comment
Share on other sites

3 minutes ago, malkuth said:

So they saved a Pre-Made vessel with Value A,B,C...  But when they get a new contract the contract ask for Values D,E,F but the pre construct is still A,B,C..

Ah, yes, that sounds right. 

Link to comment
Share on other sites

  • 2 weeks later...

@malkuth - quick little bug. It seems that under the satellite type "Navigation," module type 0 is listed as 4 in the interface above. It's also misspelled - should be "Corporate"

yf71r7O.png

 

This actually seems to happen with all the types except for Communication, and on that one "TV Networks (1)" is doubled up - it's also module type 0.

Link to comment
Share on other sites

  • 4 weeks later...

Well I was working on the new UI for Kerbal Space Program for a month or so now.. And well Fs2020 came out, and now I find myself enjoying flight in that game for now.  I will come back to Mission Controller I guess when I get bored with FS2020.  But for now I'm releasing this version as an alpha.. Its pretty stable.. I think I squashed most bugs.  But I'm sure I still have some.  Anyway the changes.
1. New UI for Repair Window.
2. New UI for Satellite Window.
3. Repair contracts have been changed and are now a little more fun because of the New UI.
4. Same with Satellite window.  All changes can be done on the fly now, even in flight.. Other than changing the Satellite Type and Module type.. These can be setup from Editor window or on the flight pad before takeoff.
5. Bunch of changes made to the code, and small fixes that I can't remember everything right now.
6. The Revert feature in Mission Controller has grown.  It now charges like before, but It also charges extra the More you do in the flight. Bringing revert Feature more in line with a Test feature.  Still WIP.
7. AVC File Updated for new version.  Note I don't include AVC just the File.. Mostly for other reasons. 

TODO in future if I come back.  
Finish the New UI for Custom Contracts (sorry ran out of time, more complicated than I thought)
Still have to add hangers Mod Exception for Satellite contracts.. Sorry.. Its on the list again.

 

You can download new version at my Github page.. Please if you find bugs (if anyone actually plays anymore) tag me in this thread.. And send it to my Github page..  I usally look at KSP forum for about 5 seconds to see if I have a tag every day or so. If not I move on.

 

Alpha Version 3.1.4.50

 

Screen shots of new UI.

gVg9tgd.png

 

bY77lMm.png

Link to comment
Share on other sites

  • 3 weeks later...

@malkuth - a small bug in MC 3.14.50.0 for you:

I'm seeing the following spammed (pretty regularly, once per 10 seconds by my count) in my logs:

"[ERR 19:22:54.161] range 1 Is = 200Range 2 is = 1500Total Value is = 257"

There's zero context around these errors - in fact, I had to do a full-text search of GameData to find out that "range 1 Is" was found only in my KSP.log and MissonControllerEC.dll.

I'm not actually seeing any impact from it (that I can see - this is a new game, so that could change,) but it's sort of weird and, of course, cruds up the logs a bit. :D

 

A bit of code diving shows that Tools.cs, line 14 has the following:

Debug.LogError("range 1 Is = " + range1 + "Range 2 is = " + range2 + "Total Value is = " + value);

There are a lot of Debug.Log lines in the same file that are commented out - something accidentally left over?

Edited by etmoonshade
Link to comment
Share on other sites

15 hours ago, etmoonshade said:

@malkuth - a small bug in MC 3.14.50.0 for you:

I'm seeing the following spammed (pretty regularly, once per 10 seconds by my count) in my logs:

"[ERR 19:22:54.161] range 1 Is = 200Range 2 is = 1500Total Value is = 257"

There's zero context around these errors - in fact, I had to do a full-text search of GameData to find out that "range 1 Is" was found only in my KSP.log and MissonControllerEC.dll.

I'm not actually seeing any impact from it (that I can see - this is a new game, so that could change,) but it's sort of weird and, of course, cruds up the logs a bit. :D

 

A bit of code diving shows that Tools.cs, line 14 has the following:


Debug.LogError("range 1 Is = " + range1 + "Range 2 is = " + range2 + "Total Value is = " + value);

There are a lot of Debug.Log lines in the same file that are commented out - something accidentally left over?

Ah just debugging stuff I forgot to shut off.. Nothing major.. Ill get rid of it for next version.

Link to comment
Share on other sites

  • 3 weeks later...

Should contract appear instantly or should I wait few days? I created couple, few days passed I don't see any contract I created.

Also does pressing Transmit button when creating contract should close creation window or is it ok that it does not disapear and otherwise does not show any info of succesfully creating contract?

 

Link to comment
Share on other sites

  • 4 weeks later...

@malkuth I was using Mission Control last night.  Ran into a small problem, was unable to accept a contract while in the editor.  I did not check anywhere else since I was in the midle of a stream.  I tried remapping the key, which worked well, but was still unable to accept a contract. 
The log file is mostly useless, it was 140meg in size due to something else, I’ll take a look later today to see if I can find anything in it.

If you need a full log let me know, I’ll  have to create a new one this evening.

Ksp 1.10.1, all mods installed by CKAN

Edit:  Further testing showed that it only doesn't work in the Editor, it work in all other (tested) scenes.

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