Jump to content

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


malkuth

Recommended Posts

Never seen this happen. No code exist in mce2 that even touches code for camera.

A output_log file might help figure it out though.

I'll keep it in mind if I see it again. I suspect if it does have something to do with MCE2 it's not *directly* because of MCE2 but because of one of the other mods it bundles with that's doing it. MCE2 bundled in a few other mods I also had not previously been using.

Link to comment
Share on other sites

This mission bugged up big time. It incorrectly believed that when the vessel landed it had been destroyed when it hadn't. it was just fine and dandy. A nice soft landing at 3 m/s at the point of touchdown. Nothing broke off. Everything was fine.

But the contract incorrectly thought it blew up and thus gave me the failure penalty of 2 million Funds (thus effectively ending that career game as I only had 500000 at the time.)

Here's the screenshot of the false claim of vessel destruction by the mod - where you can see the vessel is just fine and nicely landed.

Is there somewhere in the save game that the alleged failure can be undone?

MCDAvSV.jpg

I suspect the error may be this: Just prior to landing, I still had the uppermost stage of my ascent rocket attached because it still had fuel in it. Rather than discard it with fuel remaining, I decided to use it during the initial part of my descent. I figured it would run out when I was still a few km above the ground, and then I'd decouple it and switch to the lander's engines. This is exactly what I did. BUT this meant that my spent stage was falling just underneath me as I came in to land, and it exploded into the ground (as I'd expected) while I was only about 1km up on my descent. This meant that it exploded into the ground WHILE it was within the 2.5 loading range. I wonder if that explosion confused the mod into thinking it was a relevant part of my main vessel that had experienced a catastrophe when in fact it was just the crash of a spent stage, which is normal and intentional.

Link to comment
Share on other sites

This mission bugged up big time. It incorrectly believed that when the vessel landed it had been destroyed when it hadn't. it was just fine and dandy. A nice soft landing at 3 m/s at the point of touchdown. Nothing broke off. Everything was fine.

But the contract incorrectly thought it blew up and thus gave me the failure penalty of 2 million Funds (thus effectively ending that career game as I only had 500000 at the time.)

Here's the screenshot of the false claim of vessel destruction by the mod - where you can see the vessel is just fine and nicely landed.

Is there somewhere in the save game that the alleged failure can be undone?

http://i.imgur.com/MCDAvSV.jpg

I suspect the error may be this: Just prior to landing, I still had the uppermost stage of my ascent rocket attached because it still had fuel in it. Rather than discard it with fuel remaining, I decided to use it during the initial part of my descent. I figured it would run out when I was still a few km above the ground, and then I'd decouple it and switch to the lander's engines. This is exactly what I did. BUT this meant that my spent stage was falling just underneath me as I came in to land, and it exploded into the ground (as I'd expected) while I was only about 1km up on my descent. This meant that it exploded into the ground WHILE it was within the 2.5 loading range. I wonder if that explosion confused the mod into thinking it was a relevant part of my main vessel that had experienced a catastrophe when in fact it was just the crash of a spent stage, which is normal and intentional.

You can shut the failures off in settings.

But anyway the failures are completely a default kernel space program system. Mce is looking and watching for the vessel destroyed event. Noticed it will be fired if anything on vessel is destroyed while contract is active. Which is why I added the option to turn it on and off. The feature truly is pretty hardcore and I have lost a few contracts because of hard landings.

The good news is that this feature is only part of civilian contracts (they are meant to be hard) and satellite deployments.

Link to comment
Share on other sites

Mce is looking and watching for the vessel destroyed event.

True, but it doesn't look like it's bothering to check whether or not the vessel being destroyed is in fact the one being currently flown, and since spent stages count as vessels, a spent stage falling to the ground is triggering false positives on the crash checker.

I had a cursory glance at the code on github and this part looks suspicious to me, in VesselMustSurvive.cs:


public void vesselDestroyed(EventReport er)
{
if (FlightGlobals.ActiveVessel)
{
VesselAlive = false;
Debug.LogError("Vessel Recorded as destroyed in contract vessleAlive = " + VesselAlive);
}
}

Was this:


if (FlightGlobals.ActiveVessel)

meant to be something more like this instead:


if (er.origin!= null && er.origin.vessel == FlightGlobals.ActiveVessel)

(i.e. not just responding to *every* vessel crash, but limiting to only respond to the ones in which the part being destroyed is part of the active vessel.)

I didn't take the time to examine your entire logic structure of the program - that would be a big project. So I admit I could be easily misinterpreting the intent of if (FlightGLobals.ActiveVessel). But on the surface of it, if the intent was "don't respond to the event unless it's for the current vessel", then that code doesn't do that at all. Just saying if (FlightGlobals.ActiveVessel) by itself is doing nothing more than just ensuring that globally an active vessel exists *somewhere* in the loaded universe. It's not doing a thing to check whether or not the currently crashing part is in any way related to that active vessel.

What happened in my game is that my active vessel did NOT crash in the slightest. My spent stage did, as it *should*. I was being a good space citizen and avoiding Kessler Syndrome. My landing was smooth as silk and nice. But it was the crash of the spent stage that falsely triggered the mission failure, and I think this is why - any crash that occurs in the loaded 2.5km universe anywhere, regardless of which vessel it is for (and spent stages count as separate vessels) is triggering the failure. I suspect it would happen as well if you had say a heavy craft with small starting boosters that separated and fell back to Kerbin very early in the flight and fell to ground before you were 2.5km high. The OnCrash events those boosters would undergo because they didn't unload before impact would be falsely interpreted as crashes that occurred to the main vessel.

Edited by Steven Mading
Link to comment
Share on other sites

I will test things out when I get chance.

Fightglobals.active vessel does the same exact thing your code does only difference is your matching an event vessel name with flightglobsls.activevessel. When flightglobdals.active vessel checks to make sure current vessel is player vessel. Everything else in flightglobsls is not. So if indeed this was not working correctly what you describe would happen. But this should not be the case.

But like I said I will check it out and see if I can reproduce your issue.

Edited by malkuth
Link to comment
Share on other sites

I too am having issues with that contract. I just recorded an amazing episode where we took a bunch of civilians to the Armstrong monument, but sadly I didn't realize that destroying spent stages into Mun count as a mission failure. :( It might be a good idea to have that feature in the civilian contracts default to false, and be turned on for those who are very hardcore. Having to roll back and delete that entire episode was a huge bummer as it was so Epic and IMO a massive success. We showed those civilians a great time up there on Mun! :P

Edited by BevoLJ
Link to comment
Share on other sites

and be turned on for those who are very hardcore.

I disagree very strongly with applying the label "hardcore" to "having to avoid triggering a bug". The description of the contract does NOT claim that separated stages also have to survive undamaged in addition to the main ship. That is NOT intuitive at all from the contract description. Either the bug is in the code doing the wrong check, or the bug is that the mod describes the contract conditions to the player incorrectly. Either way around, its still a bug.

Edited by Steven Mading
Link to comment
Share on other sites

When flightglobdals.active vessel checks to make sure current vessel is player vessel.

Since when does it do that?. (Besides, what do you mean by "current vessel" if it doesn't just mean "player vessel"? Do you mean "the vessel that's experiencing the OnCrash Event?") What you're describing would have to require that FlightGlobals.activevessel be aware of where it was called from. It would have to know it was called from inside an event hook, and which one, to be able to tell you whether or not the active vessel is the vessel associated with the event.

Every time I've ever used it, FlightGlobals meant only "returns the vessel the player is controlling right now" and that's *all* it meant.

Link to comment
Share on other sites

Like I said very possible it's wrong. I have not experienced this bug yet, but I also don't have time to play and check right now. My first thought when you reported this issue was that this problem should pop up well before you get to the nun and stop dropping stages. It should also happen when you launch and start dropping your stages from launch.

I'm suspecting that when a part of vessel is destroyed via the 2.5 m distance this bug is not showing. But a direct in gsme vessel destruction via hitting ground is showing the event, which in my case would explain why never seen this bug. In most my ship builds most my stages are destroyed via distance destruction, and not direct destruction.

If this is the case then I will implement your idea and hopefully will be done with it.

For now I suggest turning it off until I have time to fix it.

Link to comment
Share on other sites

I too am having issues with that contract. I just recorded an amazing episode where we took a bunch of civilians to the Armstrong monument, but sadly I didn't realize that destroying spent stages into Mun count as a mission failure. :( It might be a good idea to have that feature in the civilian contracts default to false, and be turned on for those who are very hardcore. Having to roll back and delete that entire episode was a huge bummer as it was so Epic and IMO a massive success. We showed those civilians a great time up there on Mun! :P

Sorry bevy like I mentioned to Steve when I get some time I will fix the issue. I suggest just turning it off for now. When I added this I added the ability to turn it off in settings just in case I missed something or it had a bug. Which seems to be the case.

Link to comment
Share on other sites

Like I said very possible it's wrong.

What bothered me is that your response implied that you were ready to call FlightGlobals.ActiveVessel buggy if it didn't behave as you expected. It does exactly what it's meant to do. If you assumed it worked as a boolean check to see if the crash event is on the active vessel, then then the bug is in your having made that assumption. No shame in that, as the KSP API is horribly documented and most of the documentation of it is coming from the user community's own guesswork. There's no shame in guessing what it does incorrectly, as it's all any of us are doing is guessing. I wish SQUAD would document their API if they claim they like having modders around so much.

I'm suspecting that when a part of vessel is destroyed via the 2.5 m distance this bug is not showing. But a direct in gsme vessel destruction via hitting ground is showing the event, which in my case would explain why never seen this bug. In most my ship builds most my stages are destroyed via distance destruction, and not direct destruction.

Mine as well. It's actually abnormal to build a rocket in which the first stage hits the ground before you reach an altitude of 2.5km. But that 2.5km value can be changed by other mods. Being reliant on the short unload distance for it to work right is a fragile assumption.

Link to comment
Share on other sites

thanks for pointing this out Steven no acess to my pc to look at this issue but thinking about it you must be right I have to check the event origin vessel as active vessel. The way I have it I'm checking active vessel after the event fired which should return true 100% of time. Which is bad. :(

Link to comment
Share on other sites

I messed up the skylab mission launching without a repair panel. I could only revert as far as the launch. I tried finding the debug option you put in with the instructions you gave a few pages back but they did me no good. First I don't see a way to get to debug from settings, just pressing alt-f12. Then the window remains up when in the tracking station when you say it should disappear. Finally when I jump to the vessel in flight I see no option to set it as skylab in any debug tab. What am I doing wrong?

Link to comment
Share on other sites

By "actually in settings" do you mean the settings.cfg file in the game folder? The only debug option I see there is "verbose debug log". With the game launched in the settings menu before loading a game and after in game I also see no options to turn the debug console on. Could you be more specific about where to look for like what tabs of the menus and how the game phrases the option?

Link to comment
Share on other sites

Sorry bevy like I mentioned to Steve when I get some time I will fix the issue. I suggest just turning it off for now. When I added this I added the ability to turn it off in settings just in case I missed something or it had a bug. Which seems to be the case.

It's no sweat man. I'm very used to such things popping up as I just love modding games. I ended up having to eat the loss of funds and rep in my game (Hard Mode, so no backups) but I have a fun way to write the unfortunate failure of the contract into our story. We will be issuing Bill an official reprimand for not having read the fine print in the contract. lol

Link to comment
Share on other sites

You have reset the vessel. So before you dock if you control the ship you want to be agena target vessel, you then press the debug button to set current vessel as agena.

You might have to change scenes ie go back to space center, then go back to your crewed vessel and dock. Should accept it then.

If not you can just alt f12 and go to contracts tab and press com button to just complete contract. Sometimes this is just easier. :)

Link to comment
Share on other sites

Here's another problem, but it's a problem in the configuration of the missions, not the code.

When you try the historical missions, the Agena launch mission says you need to launch the Agena with "any" docking port on it.

But when you go to the next mission, the Agena Target Vehicle mission, to dock with it, it says it requires not just "any" docking port, but specifically the average-sized one ("Clamp-o-tron docking port").

So if you obeyed the "any" docking port requirement of the Agena by making a Sr or Jr docking port, then the follow-up to dock with it requires the wrong kind of port to dock with 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...