Jump to content

[1.8.x] CapCom - Mission Control On The Go [v2.11] [11-1-2019]


Recommended Posts

While at first working in 1.0.5 CapCom 1.3 (installed via CKAN) now when I open the window (tried in KSC and Tracking Station) it does not show contracts. Sort, settings and close buttons are shown and are responsive, other than that the window is just empty.

Additionally, the following exception is spammed:


NullReferenceException: Object reference not set to an instance of an object
at UnityEngine.GUI.Button (Rect position, UnityEngine.GUIContent content, UnityEngine.GUIStyle style) [0x00000] in <filename unknown>:0
at CapCom.CapComWindow.currentContractControls (Int32 id) [0x00000] in <filename unknown>:0
at CapCom.CapComWindow.DrawWindow (Int32 id) [0x00000] in <filename unknown>:0
at CapCom.Framework.CC_MBW.DrawWindowInternal (Int32 id) [0x00000] in <filename unknown>:0
at UnityEngine.GUILayout+LayoutedWindow.DoWindow (Int32 windowID) [0x00000] in <filename unknown>:0
at UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style) [0x00000] in <filename unknown>:0

I've 2 active contracts, 2 done and 8 offered.

I'm using Linux, 64 Bits, BTW.

Restarting KSP did help for the moment, I'll see when/if the issue re-appears.

Link to post
Share on other sites
Version 1.4 is out; get it on [URL="https://kerbalstuff.com/mod/710"]Kerbal Stuff[/URL].

It now displays the contract decline penalty for offered contracts. The multi-select function (selecting contracts while holding down Left Control by default) will now de-select a contract if it has already been selected (i.e. it works how the standard Windows multi-select function does). There are also a few fixes for when UI elements aren't properly initialized, and a potential problem with the close box icon.
Link to post
Share on other sites
  • 4 weeks later...

Should the CapCom icon show up in the VAB?  

I like to be able to check my rocket designs against contract requirements while I'm building them and right now all I'm getting in the VAB is the stock contract listing, which is horribly small and unfriendly compared to the CapCom UI.

Thanks!

Link to post
Share on other sites
Just now, mcortez said:

Should the CapCom icon show up in the VAB?  

I like to be able to check my rocket designs against contract requirements while I'm building them and right now all I'm getting in the VAB is the stock contract listing, which is horribly small and unfriendly compared to the CapCom UI.

Thanks!

This isn't designed for monitoring active contracts.

Use Contract Window +.

Link to post
Share on other sites
  • 3 weeks later...

Well this mod still doesn't appare when i'm in the hangar mode, the only place where i need it, to help me to build a vehicle according to contracts..

Also, it has an issue when i accept a contract when i'm on space landing zone, this mod doesn't recognize that i'm on kerbin planet so all the contracts that include kerbin like a goal remain unfulfilled..

 

KSP ver.1.0.5 - Mission control on the go ver. 1.4

Edited by fr33soul
Link to post
Share on other sites
On 1/7/2016 at 4:49 AM, fr33soul said:

Well this mod still doesn't appare when i'm in the hangar mode, the only place where i need it, to help me to build a vehicle according to contracts..

Also, it has an issue when i accept a contract when i'm on space landing zone, this mod doesn't recognize that i'm on kerbin planet so all the contracts that include kerbin like a goal remain unfulfilled..

Those aren't CapCom problems, they are issues with stock contracts not fully initializing when you accept them, you'll have to save and reload to activate them.

Celestial Bodies and Vessels aren't fully loaded while in the editor, so there is a lot of potential for errors when changing contract status there. I suppose I could set CapCom to be in a passive mode while in the editor, just to let people see the offered contracts.

Link to post
Share on other sites
  • 4 weeks later...

When I open CAPCOM, I get the debug log spammed with [warning] null texture passed to GUI.DrawTexture. Any idea what is causing that? I'm using Strategia and theres a current mission activated by it, but the Strategia flag is blank (I'm assuming it's unfinished), no idea if that has anything to do with it.

Link to post
Share on other sites

 

On 2015-12-20 at 1:56 PM, mcortez said:

Should the CapCom icon show up in the VAB?  

I like to be able to check my rocket designs against contract requirements while I'm building them and right now all I'm getting in the VAB is the stock contract listing, which is horribly small and unfriendly compared to the CapCom UI.

Thanks!

On 2015-12-20 at 1:58 PM, DMagic said:

This isn't designed for monitoring active contracts.

Use Contract Window +.

Thank you DMagic. I like this mod a lot.

While I understand this isn't designed for the aforementioned purpose, is it not possible/too much work to make it so that this appears in VAB and SPH as well?

EDIT: A quick glance at the changelog shows that version 1.0 of this mod (for KSP 1.0.2) was allowed to be active in VAB/SPH...

Edited by iFlyAllTheTime
New info!
Link to post
Share on other sites
  • 4 weeks later...
On 12/20/2015 at 10:58 AM, DMagic said:

This isn't designed for monitoring active contracts.

Use Contract Window +.

Thanks for this mod DMagic.

Does that explain why a contract requirement that has actually been met shows as such when the vessel is active but appears unfulfilled otherwise?

Link to post
Share on other sites
12 hours ago, Brigadier said:

Thanks for this mod DMagic.

Does that explain why a contract requirement that has actually been met shows as such when the vessel is active but appears unfulfilled otherwise?

You mean like for a satellite contract where it asks for a new vessel and a specific part and so on?

KSP only tracks the active vessel, so as soon as you switch it thinks that you are trying to complete the contract with your current vessel, which may not meet any of the requirements.

Stock KSP doesn't really have any logic for assigning specific vessels to a specific contract; the satellite contracts that ask you to move a specific vessel won't complete with any other vessel, but it still only tracks the active vessel when deciding whether a contract parameter meets the requirements.

 

A new update should be ready in the next few days. It adds a passive mode when in the Editor (you can already access CapCom in the editor if you are using Blizzy's Toolbar, but it might not work right), and should fix most of the issues with contracts not working right when accepting them while in flight.

Link to post
Share on other sites

Version 2.0 is out; get it on SpaceDock.

CapCom has been moved to a new installation folder and has two required dependencies, both of which are shared by Contracts Window +.

GameData/DMagicUtilities/CapCom

GameData/DMagicUtilities/ContractParser

GameData/DMagicUtilities/ProgressParser

 

This update adds support for showing progress record reports; select the globe icon next to the Contract List Type bar to show progress reports.

It also adds/fixes VAB/SPH support; the contract controls are disabled while in the editor, so you can't accept, decline or cancel contracts.

It fixes most cases where contracts would not behave properly or wouldn't complete when accepted while in-flight without reloading. Some mod contracts may not work correctly until reloading, but stock contracts should activate properly.

It also adds custom contract notes that specify which available parts will satisfy certain contract requirements.

 

Link to post
Share on other sites

I just updated To CapCom 2.0 via CKAN and it seems this version broke the sorting by remaining time (for both offered and active contracts). They are sorted in no recognizable order. Sorting by other criteria seems to work properly, though.

Link to post
Share on other sites

I don't know if this is something caused by updating CapCom, but in my career save both the CapCom window and the Mission Control building are blank. In Mission Control there are no contracts listed under "offered", "active" or "completed" (and it also states I have 99 active contracts while the max is 00 - it should be like 11 or 12 active contracts), and in CapCom I don't even have the buttons "offered", "active" and "completed". Contract Window + shows all my active contracts correctly, but since I can't get new contracts there (I think? I don't use CW+ that often) it's kind of useless regarding the continuity of my career game.

I've tried restarting KSP but nothing changed. Creating a new save, however, apparently 'solved' the problem - CapCom and Mission Control work just fine. Could it be that my save got somehow corrupted? And I know this isn't really the place to ask this, but is there any way to 'rescue' my save, so to speak?

Thanks!

Link to post
Share on other sites

@SpaceNomad The contract times just aren't being updated when they are supposed to; I'll fix it in the next update.

@lexmkr Did you update both CapCom and CW+? Did you delete all of the old folders (CapCom, ContractsWindow, ProgressParser)?

CapCom doesn't save anything, so there is nothing to break when updating. It has an external config file to save your settings, but it stores nothing in the save file.

CW+ stores the contract ids for your different contract lists in the save file.

I'm not sure how either would affect the status of contracts, they don't do anything to the contracts, they just read some data from them.

Do you have log files? Preferably from a game session where you are loading an existing save file that has its contracts screwed up.

I can also look at the broken save file to see if there is something obviously wrong.

Link to post
Share on other sites

@DMagic I used CKAN for installation and updates, so I think CapCom and CW+ were installed/updated correctly. I even tried reverting to a previous version of CapCom that was in ckan's download cache and installing it manually (deleting the 'old' CapCom folder before), but it didn't work either.

How can I get a log file?

EDIT: should I email you my broken save file?

EDIT2: I was just clicking around in the CapCom window, sad because of my 'lost' game, and I got the contracts back. I'm not 100% sure what I did, but it involved clicking on a button that led me to the list of "Kerbin World First Record Keeping" (or whatever) and back. I then saw a "DMAnomalyContract" on the offered contracts list, and when I clicked on it everything went blank again. I tried the technique of clicking on the World First Record Keeping button and got the contracts back. Just to be sure, I tried to open the DMAnomalyContract again and everything went blank again

EDIT3: it also has something to do with the sorting mechanism - I usually have to sort by reputation to get the 'offered' tab working

Edited by lexmkr
Link to post
Share on other sites

@lexmkr See the support thread for details about getting the log files. Try to get log files from a game session where these types of errors are happening.

It sounds like something weird is happening to the contracts, but it's hard to say what. CapCom and CW+ doesn't do anything with the contracts until after they are loaded, so it shouldn't have this type of effect.

 

Link to post
Share on other sites
On 2016年3月6日 at 4:43 AM, DMagic said:

@lexmkr See the support thread for details about getting the log files. Try to get log files from a game session where these types of errors are happening.

It sounds like something weird is happening to the contracts, but it's hard to say what. CapCom and CW+ doesn't do anything with the contracts until after they are loaded, so it shouldn't have this type of effect.

 

Alt+F12 Debug Menu -> Contracts -> Regenerate Current Contracts seems to have fixed it for me.

Link to post
Share on other sites
  • 2 weeks later...

No idea if it's CapCom, and/or something else (maybe Strategia? @nightingale, I have contract roulette 3 active), but I'm getting a weird bug where I can't accept a contract from the mission control building in the KSC, only from the capcom window. When I press the accept contract button in the vanilla contracts screen it looks like it worked and the contract gets removed from the list, but I don't get the advance money, and if I recheck the available contracts, the same contract will be available still. If I accept the contract via CapCom, it works normally.

Another weird thing is the listed money amounts for the contract rewards are wrong in the CapCom window with the contract roulette strategy active (which randomly modifies the contract rewards). The money amounts are correct when viewed in the vanilla contract window, and even though I have to accept contracts via CapCom, it still gives the amount of money listed in the vanilla contracts window.

Link to post
Share on other sites
12 minutes ago, Rodger said:

No idea if it's CapCom, and/or something else (maybe Strategia? @nightingale, I have contract roulette 3 active), but I'm getting a weird bug where I can't accept a contract from the mission control building in the KSC, only from the capcom window. When I press the accept contract button in the vanilla contracts screen it looks like it worked and the contract gets removed from the list, but I don't get the advance money, and if I recheck the available contracts, the same contract will be available still. If I accept the contract via CapCom, it works normally.

Not a bug I've ever heard of before, most likely it's an exception happening when you click the button.  Strategia is as good a guess as any, but will need to see a log file to diagnose further.

12 minutes ago, Rodger said:

Another weird thing is the listed money amounts for the contract rewards are wrong in the CapCom window with the contract roulette strategy active (which randomly modifies the contract rewards). The money amounts are correct when viewed in the vanilla contract window, and even though I have to accept contracts via CapCom, it still gives the amount of money listed in the vanilla contracts window.

Something that me and @DMagic will have to work out.  The Contract Slot Machine strategy isn't significantly different from other strategies that modify contract rewards (including stock ones) - it just uses the modifier query to apply a random % modifier.  The key difference is that I don't have information to tie the rewards to a specific contract, so I just cache it in a Least Recently Used cache using what I have available as a key (which is the Funds/Science/Rep values).  So it's possible that CapCom is getting the values in such a way that overwhelms the LRU cache (it's limited to 100 entries).  The other possibility is CapCom does the currency modifier queries differently than stock (stock does a single query for all three currency types, maybe capcom does one each)?

For reference, this is what the Strategy is using:
https://github.com/jrossignol/Strategia/blob/master/source/Strategia/Effects/CurrencyOperationRandomized.cs

Link to post
Share on other sites
16 minutes ago, nightingale said:

Not a bug I've ever heard of before, most likely it's an exception happening when you click the button.  Strategia is as good a guess as any, but will need to see a log file to diagnose further.

 

Yep, got exceptions like these when I clicked to select contracts or accept/decline:

Spoiler

[EXC 00:52:48.113] NullReferenceException: Object reference not set to an instance of an object
    MissionControl.onButtonSelect (.POINTER_INFO& ptr)
    UIRadioBtn.OnInput (.POINTER_INFO& ptr)
    AutoSpriteControlBase.OnInput (POINTER_INFO ptr)
    UIManager.DispatchHelper (.POINTER_INFO& curPtr, Int32 camIndex)
    UIManager.DispatchInput ()
    UIManager.Update ()
    UIManager.DidAnyPointerHitUI ()
    SpaceCenterCamera2.InputCamera ()
    SpaceCenterCamera2.Update ()
[EXC 00:52:50.113] NullReferenceException: Object reference not set to an instance of an object
    MissionControl.BtnInputDecline (.POINTER_INFO& ptr)
    UIButton.OnInput (.POINTER_INFO& ptr)
    AutoSpriteControlBase.OnInput (POINTER_INFO ptr)
    UIManager.DispatchHelper (.POINTER_INFO& curPtr, Int32 camIndex)
    UIManager.DispatchInput ()
    UIManager.Update ()
    UIManager.DidAnyPointerHitUI ()
    SpaceCenterCamera2.InputCamera ()
    SpaceCenterCamera2.Update ()

 

Link to post
Share on other sites

@Rodger Sounds unrelated to CapCom, since this doesn't do anything to the mission control center.

@nightingale It's possible that too many query events are run. Each contract generates three (advance, reward, penalty) for the contract and two for each parameter (reward, penalty), which can add up.

The code for it is on GitHub; for the contracts; and for the parameters.

Each contract is checked once immediately after the contracts finish loading.

 

Edited by DMagic
Link to post
Share on other sites

@Rodger - Same thing with Contract Configurator / Strategia for that exception.

@DMagic - I doubled checked, and both yours and the stock run the queries for all parameters including ones that have no rewards (which is fine).  As far as I can tell, there's no real issue on your side.

I've increased the cache size - @Rodger, can you grab the dev version of  Strategia here and let me know if it works?  If you still have the same issue there, I suppose it could be a display issue with CapCom.  Do you get strategy modifications displayed correctly for other Strategia strategies that touch contracts?  Stock strategies?

Link to post
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...