Jump to content

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


malkuth

Recommended Posts

I will try to look at things this weekend guys to see what I can do. Including checking out again hardcore mode issues. (On vacation right now).

Easiest way to change from .txt to .mpkg is to just change the extension manually with windows change name option.

Link to comment
Share on other sites

Malkuth, I don't know if anyone has brought this up yet or not, but how difficult would it be to put some search options in the mission window? I don't know anything about .dll files, but some kind of simple sort where you could display only available missions and maybe another to show completed missions? I assume from the color coding in the mission screen that this would not be too difficult to accomplish. My pack is non-linear and keeps growing with every update. People are asking for more missions and my branched mission tree is growing new roots every time I update it. Purely a selfish request but it would be nice to have, specially if it wouldn't require too much coding. I'm assuming it wouldn't, something like the following:

listMissions(){

if (completedMissions()=true)

while (moremissions){

display next completed mission

}

if (activeMissions()=true)

while (moremissions){

display next active mission

}

if (inactiveMissions()=true)

while (moremissions){

display next inactive mission

}

}

Obviously drastically oversimplified but the functions that "if" is referring to could be checkboxes or something. Just a thought.

Link to comment
Share on other sites

Found something I think might work for my idea. Forgive me if I made any horrible coding errors, my C++ skill has about 15 years of rust on it. It would require making 3 buttons or checkboxes with a simple script that when clicked/checked they return true. I used the names finishedButtonChecked(), needsMissionButtonChecked(), and openMissionButtonChecked() as the function names that return the true/false values of the boxes. No idea how to make a checkbox so I'm at a loss there.

Basically I took this snipped of code from missionpackageGUI.cs on github:


foreach (Mission m in currentPackage.Missions) {
Status s = calculateStatus (m, false, null);
GUILayout.BeginHorizontal (GUILayout.Width(450));
GUIStyle style = styleButton;

if (s.requiresAnotherMission) {
style = styleRedButton;
}

if (m == currentPreviewMission) {
style = styleGreenButton;
}

if (GUILayout.Button (m.name + "\n" + m.reward + CurrencySuffix, style, GUILayout.Width(350))) {
currentPreviewMission = manager.reloadMission(m, activeVessel);
}

if (s.missionAlreadyFinished) {
GUILayout.Label(iconFinished, GUILayout.MaxWidth (50), GUILayout.MaxHeight (50), GUILayout.ExpandWidth(false),
GUILayout.Width(50), GUILayout.Height(50));
} else {
foreach (Mission.Category c in iconDictionary.Keys) {
if(m.category.Has(c)) {
GUILayout.Label (iconDictionary[c], GUILayout.MaxWidth (50), GUILayout.MaxHeight (50), GUILayout.ExpandWidth(false),
GUILayout.Width(50), GUILayout.Height(50));
}
}
}
GUILayout.EndHorizontal ();
}

And I'm thinking about replacing it with this (button functions included)


foreach (Mission m in currentPackage.Missions) {
Status s = calculateStatus (m, false, null);
GUIStyle style = styleButton;

if (s.requiresAnotherMission) {
style = styleRedButton;
}

if (m == currentPreviewMission) {
style = styleGreenButton;
}

if (GUILayout.Button (m.name + "\n" + m.reward + CurrencySuffix, style, GUILayout.Width(350))) {
currentPreviewMission = manager.reloadMission(m, activeVessel);
}

if ((s.missionAlreadyFinished) && (finishedButtonChecked())) {
GUILayout.BeginHorizontal (GUILayout.Width(450));
GUILayout.Label(iconFinished, GUILayout.MaxWidth (50), GUILayout.MaxHeight (50), GUILayout.ExpandWidth(false),
GUILayout.Width(50), GUILayout.Height(50));
GUILayout.EndHorizontal ();
} else if ((s.requiresAnotherMission) && (needsMissionButtonChecked())) {
GUILayout.BeginHorizontal (GUILayout.Width(450));
foreach (Mission.Category c in iconDictionary.Keys) {
if(m.category.Has(c)) {
GUILayout.Label (iconDictionary[c], GUILayout.MaxWidth (50), GUILayout.MaxHeight (50), GUILayout.ExpandWidth(false),
GUILayout.Width(50), GUILayout.Height(50));
}
GUILayout.EndHorizontal ();
} else if (openMissionButtonChecked()) {
GUILayout.BeginHorizontal (GUILayout.Width(450));
foreach (Mission.Category c in iconDictionary.Keys) {
if(m.category.Has(c)) {
GUILayout.Label (iconDictionary[c], GUILayout.MaxWidth (50), GUILayout.MaxHeight (50), GUILayout.ExpandWidth(false),
GUILayout.Width(50), GUILayout.Height(50));
}
GUILayout.EndHorizontal ();
}
}

I think that would do the trick. Simple (unless I've grossly miscalculated something) yet effective and makes the display a lot more functional for bulky mission packs. Let me know what you think. I tried looking up how to compile .dll's but I'd have to use your script, and like I said I have no idea where to start with the buttons or where to put the functions for them. Could something like this be implemented?

Edited by Geckgo
Noticed a code mistake
Link to comment
Share on other sites

I will second that request. I think it would work best to show both a green icon and a blue one showing that the mission has been completed at least once and that it can still be completed.

And second how do you save a file as a (dot)mpkg? I saw the guide Nobody made for making mission packages (which is super helpful!!!) and thought I would just try editing an existing pack, but when I save it from the text editor it saves as a txt file. I'm sure this is just some lack of knowledge on what a good text editor would be or a trick I don't know. Thanks for the info!

Overall been loving this mod! Thanks for the work you've put into it!

It's a bug with M$Windows :P

Link to comment
Share on other sites

gm537, when you go to "save as" your file, put the filename in quotes, like "mypkg.mpkg"

That will override Notepad's default behavior of appending .txt to everything.

Or use Notepad++ or some other real editor :)

Geckgo: I'll try to add this this evening. Thanks for the code!

BTW we do take pull requests :)

(Sorry I've been so MIA, folks--moving is an utter pain!)

Link to comment
Share on other sites

Sweet deal. I'm new to github. I've only been using linux (except screwing with it in my younger days) for about a year and I've never done any REAL OOP compiling, just basic stuff like writing little dos programs to do various things. Before Win95 came out, I was quite good with QBASIC and used to write little games, but I never jumped on the OOP bandwagon and as a result had a falling out with coding. I'm trying to learn a little here and there as I go now to get back up to speed, but I don't think I'll ever be the programmer I thought I would be growing up.

Do you guys have a planned release date for the next version of MC?

Link to comment
Share on other sites

Pretty new to github myself, actually. Wish I were linux full-time, but for various reasons while I maintain linux on the rest of the family's machines I run Windows on mine...meh.

If you want to mess around with MC[E] on linux, grab nobody44's old source, replace it with the new source, and then add references to the extra files in the makefile. They develop on linux, IIRC (or at least the makefile sure looked recent!).

malkuth has been doing the releases and is currently on vacation--if I get your stuff added, and maybe add some kind of spaceplane recovery (no promises!) I'll see about a release myself. But no promises, alas.

Link to comment
Share on other sites

Ah space plane recovery. I was also looking into this. But alas as usual the limitation of what we can do with plugins hit yet again I think.

All I ask if you do a pull request. Make sure it works. :). Testing everything is a pain in the butt. :)

Also looking at what .22 is bringing. And worried what it will change lol. What it will break. The science stuff and research is going to save me and Nathan a lot if coding time. :)

Link to comment
Share on other sites

This may have been answered already but the forums acting up for me. Where is the file located that saves your progress in the mod? I currently have a game that I intend to play solo by myself then some friends and family along with myself plan on doing a playthrough using telemachus so they can be my minions errr ground control. So i'd like to back up the save somewhere else so i don't have to do either or.

Link to comment
Share on other sites

I started playing with MC a few days ago and I've noticed that I never get any optional goal payouts when I complete missions. This has been true with CSP, COS, and KIS mission packs. The "Total Mission Payout" field at the bottom of the mission window always shows the same number as the main mission reward (usually displayed at the top of the briefing), and never actually sums the payouts from completing optional goals. Is this an issue with MC or with the mission packs?

Edit: I now realize that optional goal payouts are done immediately, rather than when a mission is marked 'finished'.

Edited by DoctorJon
Link to comment
Share on other sites

Hi, first of all I love the mod, it make my gaming experience much more interesting and challenging, its a must have really.

However I started to mess a bit around with planes that are not able to go to space lately, so they are a huge strain on my money because I loose 15% of the cost with each flight plus the fuel. As it is mainly experimenting they are not able to fulfill mission so it really drains my funds fast. I could put the test mode on but I feel it is not fair as if I crash the plane it should cost me way more than 3%.

That is why I downloaded the source files and modified the code to get me back 95% on recycling but I could not recompile the file despite spending all the night trying. It shows me an error saying that namespace "IManager" is missing but I could not find any reference to it. Would you now where that comes from by any chance?

I also had another small glitch: I have a plane ready to launch on the runway, I hit space to start the engine so the price of the plane plus the insurance cost are substracted from my funds. For some reason I decide to abort the lauch half way the runway and hit the breaks, bringing the plane to a halt. At that stage the plane had just rolled a bit in the runway but had not taked off. When I recover the plane from the station I did not got any money back, neither for the plane nor the insurance. I assume you re aware of that but I thought I'de let you know anyway just in case ;)

Edited by gwichy
Link to comment
Share on other sites

Kalista, the same folder that you dropped the KIS.mpkg in has .ps (i think) files that are the same name as your save game. I have to delete them when I start up a new game with the same name. They contain which missions you've completed.

gwitchy, if you change your mind about a lauch try killing the game console and do a full restart. Most of the time this gives you your money back (which I don't feel is cheating, if you wish to be penalized for scheduling the launch hit the hire kerbals button a couple times). On the spaceplanes, watch some videos, read some how-tos and start a game to experiment. It takes a while to figure them out. Here's a short list:

CoG on or slightly forward of CoL, and make sure that CoG will move forward or not at all as tanks drain (use pipes)

Start small, and by small, I mean about 20 parts or less (cockpit, 2 wings, 1 jet, 2 rockets, tanks, ASAS, keep it simple)

More wings is more better. (about .3-.5 per ton)

More control surfaces is more better. (don't forget canards up front.

LOTS of struts. Your plane should not deform at all in flight. If it does, more struts.

There is a fine line between enough intakes and air-hogging, err on the side of air-hogging, and use your jets as long as possible.

If it ain't stable on takeoff it'll never land, don't waste your time after take-off.

And for heaven's sake, thrust directly behind CoG otherwise space manuvers are a pain.

Don't think F-22 Raptor, think X-wing fighter ;)

Just some things I've noticed.

Tiger, trial and error. I use 2 side-mounted chutes for 1m small tanks w/ engine, 3 for long tanks, and 4-8 for anything else. Usually 2 for boosters. Probably overkill but it seems to work for me.

Didn't mean to hi-jack Malkuth, just giving you a hand ;)

Link to comment
Share on other sites

so um is there any chance that we can get it to be able to change mission packs while the timers on missions still ticks or load all packs or something like that because it would be cool to actually leave our scanners in orbit while waiting and doing other things =)

Link to comment
Share on other sites

Tigermisu: You need 70 drag/ton, however you get it. That means, for instance, one radial parachute for each .9 tons of other mass.

I probably should lower the requirement slightly so it's .15t parachute for 1.15 tons mass, so you know for every ton of structure you need a radial chute. Makes calcs easier.

Note that's per ton of DRY mass.

I believe KER will tell you a stage's dry mass; I only use MJ so I do it by hand (you get a feel for it, as Geckgo says).

gwitchy: Geckgo is right on here too (thanks, Geckgo), but it gets a bit more complicated if you use FAR, because CoL shifts in transonic and again in supersonic flight. On the other hand, FAR makes (well-built!) planes a DREAM to fly. Don't leave home without it.

Finally, when I add spaceplane recycling support, I hope to add a bonus for "on the runway" so you should get your .95x back then.

power5000: Huh. Didn't even know timer resets on mission load. When I have a chance I'll look into that.

Link to comment
Share on other sites

Tigermisu: You need 70 drag/ton, however you get it. That means, for instance, one radial parachute for each .9 tons of other mass.

I probably should lower the requirement slightly so it's .15t parachute for 1.15 tons mass, so you know for every ton of structure you need a radial chute. Makes calcs easier.

Note that's per ton of DRY mass.

I believe KER will tell you a stage's dry mass; I only use MJ so I do it by hand (you get a feel for it, as Geckgo says).

gwitchy: Geckgo is right on here too (thanks, Geckgo), but it gets a bit more complicated if you use FAR, because CoL shifts in transonic and again in supersonic flight. On the other hand, FAR makes (well-built!) planes a DREAM to fly. Don't leave home without it.

Finally, when I add spaceplane recycling support, I hope to add a bonus for "on the runway" so you should get your .95x back then.

power5000: Huh. Didn't even know timer resets on mission load. When I have a chance I'll look into that.

yep, I was like oh hmmm 2 hours.... I'll launch a communication probe and then do two missions in the same amount of time.... so I switched missions, launched my probe then went back to the NT mission and it said I had 0 seconds of 2 hours and I was like darn.....

Link to comment
Share on other sites

Ok guys, got a little issue with the fixes from 0.16 and 0.17. Is there a way to turn off the auto-recycle feature temporarily if you are not using it. I'm trying to drop base stations on Kerbin for longer range communications and I don't feel like driving one to the north pole, so I made a spaceplane that can drop light cargo bundles. The probe deploys perfectly and touches down soft but the second it hits the dirt the auto-recycle kills it.

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