Jump to content

[1.8.x] Contracts Window + [v9.4] [11/1/2019]


DMagic

Recommended Posts

Would it be possible that the position and size of the window in the different scenes is saved to the PluginData folder, not inside the persistent file?
So it will be a general setting?

Or make it to be chosen with a toggle in the mod settings.

Link to comment
Share on other sites

@DMagic Bug in KSP 1.4.2:

When I choose the settings

	useStockToolbar = True
	replaceStockApp = True

then the stock toolbar icon is gone and so I have no access at all ...

It's also not existing in the Toolbar when I choose

	useStockToolbar = False
	replaceStockApp = False

but I guess it's "not enough" to just go back to the main menu and load the save again ... so for this single simple setting to change (or test) I have to reboot KSP - thank you Unity engine ...

So I have to restart KSP to see if I get the button back ... either in stock or in Toolbar.

 

In the log it says:

[ContractsWindow] 3/29/2018 10:26:52 PM, Settings File Loaded
 
[ContractsWindow] 3/29/2018 10:26:52 PM, UI prefab bundle loaded and processed
 
[ContractsWindow] 3/29/2018 10:26:52 PM, UI Loaded and Processed
 
...

ContractConfigurator.ContractConfigurator: Multiple assemblies with name 'ContractsWindow' found!
 
...

[ContractsWindow] 3/29/2018 10:33:07 PM, Contracts Window + App Launcher Button Not Initialized; Starting It Now

[ContractsWindow] 3/29/2018 10:33:07 PM, Stock Contracts App Replaced With Contracts Window +

No exception about any of the contracts mods until now, still in SPC.

Log:
https://www.dropbox.com/s/vzt0z63f4zahnpy/2018-03-29_2 KSP.log.7z?dl=1

Link to comment
Share on other sites

@Gordon Dry It works fine for me, though replacing the stock buttons is always a little iffy, so if it doesn't work for some reason just don't use that function.

The "useStockToolbar" field in the settings file is what tells it to use the stock toolbar, rather than Blizzy's toolbar. So if you want the button to appear in the stock toolbar you'll need to set that to true. The settings file is only loaded from disk once, it could be loaded more often, there just isn't really a reason for it and the settings file isn't designed to be edited while playing.

I did notice one problem though, the default position for the window in the tracking station is behind the vessel list. So if it's hidden back there the only way to get to it would be to go to another scene, increase the window's scale to max, and hope that it makes it big enough to peak out from behind the vessel list so that you can drag it somewhere else. The same happens in the VAB, but the parts list is smaller.

Link to comment
Share on other sites

1 minute ago, DMagic said:

I did notice one problem though, the default position for the window in the tracking station is behind the vessel list.

I know, but because I use FilterExtension I can collapse the part list and move it out of there.

And btw a few days ago I asked in this thread if it would be possible to save the window positions in PluginData and not in the persistent file - but I guess I should have added an @DMagic to that post ...

Link to comment
Share on other sites

Hmm.

Now the icon is shown in the Toolbar, but the stock button still is not existing (in SPC)...

	useStockToolbar = False
	replaceStockApp = False

I guess just another issue caused by what ever - and again I send my "thank you" to the Unity engine because it provides these logs that clear out any question ...

Link to comment
Share on other sites

@Gordon Dry I saw the thing about window positions, I just don't always reply. :sticktongue: 

If the stock contract window toolbar button isn't appearing then something else is going wrong. Also, if the useStockToolbar field is set to False in the settings file, but you don't have Blizzy's toolbar installed then the CW+ button should still show up in the stock toolbar.

Link to comment
Share on other sites

  • 4 weeks later...

I'm doing a significant internal overhaul of this mod, since a lot of it is a mess and it causes things not to work as well as they should. I'll look into making sure the persistence of contract lists is handled more carefully, too.

Link to comment
Share on other sites

  • 2 months later...
  • 4 weeks later...
On 7/5/2018 at 10:55 AM, Apollo13 said:

When might this be fixed?  As of today, Contract Lists are still broken and lacking persistence, making them useless.

I should have an update for this (and CapCom, there were some changes to how Progress Nodes are handled in 1.4.4) today or tomorrow, now that there is a semi-not-broken version of KSP to work with.

It will drastically improve the performance (remove the little stutter or delay) of switching modes or contract lists and has a much more robust loading method that isn't susceptible to weird timing issues that might have been causing elements of the mod to be loaded in the wrong order (which would generally result in everything being reset).

But there are lots of changes, as the backend of how contracts are loaded and displayed has essentially been re-written, so it may take a while to test everything.

Link to comment
Share on other sites

I noticed pretty much since I installed Contract Window+ a couple months ago that the ProgressParser dependency spams the logs with InvalidCastExceptions. I'm on Windows 10, KSP 1.4.5 (but this happened in 1.4.3 & 1.4.4) CKAN tells me I'm current before starting this afternoon.

[WRN 14:42:10.721] [Progress Tracking Parser] Error In Finding Progress Node [PointOfInterest] Vessel Reference
System.InvalidCastException: Cannot cast from source type to destination type.^M
  at ProgressParser.progressParser.vesselFromNode (.ProgressNode n) [0x00000] in <filename unknown>:0 ^M

Link to output_log.txt

Link to comment
Share on other sites

Version 9.0 of Contracts Window + is out; get it on Space Dock.

It is updated for KSP 1.4.5 and for version 10 of Progress Parser (@Tonka Crash, this fixes the problem you are seeing). Only versions 1.4.4 and 1.4.5 of KSP are supported.

 

It contains a major overhaul of how contract data is loaded and displayed in the UI, among many other, mostly internal, changes. This results in better performance and less garbage generation when switching between different contract mission lists or between different window modes.

It also has changes to make sure that all contract mission data and contract data is fully loaded before initializing the window.

Link to comment
Share on other sites

I'm reverting to the previous version.

  1. The biggest problem is that the conditions in a contract are not showing green as they are completed. (Did I actually hit the right orbit or not?) (Which tourists still need a ride down to the Mun's surface?) I verified this one with a friend on his game this morning and he sees the same behaviour. This is a mod killer, without it, this mod isn't useful and the reason I'm reverting.
  2. The Contract Window also initialized offscreen in most scenes, but this seems to be a one time nuisance. I had to exit and fix it in the persistence file. It would nice if this were in an external file that could be reread while running, or at least have them reset if you do a reset within the mod. I swap between a 1080p monitor at work (I don't have a lot to do at work lately) and a 4K at home, I've seen this before if I leave a window where it would be offscreen on the 1080p monitor, but I ran into this on the 4K monitor and I didn't think that was possible.
  3. Occasionally I'm seeing the contract window remain empty when I've changed scenes, e.g. from tracking station to flight, switch focus to a different ship. Once I click on the Contract Window it populates.

On a positive note, I'm not seeing the InvalidCastExceptions or any errors for that matter from this mod or it's dependencies.  

Log File I didn't see anything obvious in the log. To create it I loaded the game went into the tracking station and switched to a satellite on a long term contract. Search for "Little Bro Recon". Then exit to main and quit. The Contract Window was open when I got to flight mode showing the contract for the satellite, none of the previously completed conditions were green. (Proper orbit, required equipment, required observations)

Edit to add: I updated off CKAN last night, my friend this morning using CKAN

Edited by Tonka Crash
Link to comment
Share on other sites

@Tonka Crash Whoops, that's what happens when you change a 1000 things then stop working on it for several months and forget what remains to be done.

Version 9.1 is out; get it on Space Dock.

 

It fixes contracts and parameters not updating. The code for all of that was already there, it just wasn't implemented :blush:. Contracts and parameters will update their states when they should, changing text color, displaying/hiding sub-parameters, updating contract/parameter titles.

It also fixes some new and old bugs with window positioning. It will now work properly when dragging the window around the screen; it clamps the window to the edges of the screen to prevent it from getting lost (it only leaves a fairly small portion of the window on screen if you drag it all the way into a corner, so be aware of that). It also checks if the window is on-screen when loading (it was doing that in the last version, too, it just didn't actually do anything about it if the window was off-screen).

The thing with the window being blank isn't entirely new, it just seems worse than it was before. I've fixed it so that it uses an older method for masking the contents of the scroll view (the part where all of the contracts go). It's less efficient when you have a large number of contracts displayed, but it should get around the problem of the window being blank.

Link to comment
Share on other sites

I second that, I already mentioned earlier that I don't like the fact that the window positions are inside the persistant file - they should be in a config in PluginData ...

Why? When I set it up I want to have it to be like that - also when starting a new game.

---

Now after upgading to KSP 1.4.5 and Contracts Window v9.1 the positions were reset AND the windows are always open after a scene change. Also when I closed them before.

Link to comment
Share on other sites

The new update seems faster, once the screen is loaded, which is welcomed, thanks.

However, Contracts Window + opens on every single scene; at the Space Centre, the VAB/SPH, Tracking Centre, in flight etc etc.

Whenever I change scene, it will open again, even if I had previously closed it.

Mot a major bug, but a little annoying.

 

Link to comment
Share on other sites

Version 9.2 is out; get it on Space Dock.

It prevents the window from always opening on scene load, even if you had previously turned it off for that scene.

It also prevents you from switching to progress node display mode during loading, which can interrupt the loading process. This takes place over about 1-2 seconds immediately after a scene loads, so you would have to try pretty hard to switch modes fast enough for this to matter anyway.

Link to comment
Share on other sites

  • 2 months later...
  • 2 weeks later...

For some weeks now the Contracts Window will open top left after pressing "Apply" on the game's pause menu after changing any setting.
It doesn't matter where it was before.

And btw moving the window is very resource intensive - as soon as it's moved the fps drop significantly.

Link to comment
Share on other sites

6 hours ago, Gordon Dry said:

For some weeks now the Contracts Window will open top left after pressing "Apply" on the game's pause menu after changing any setting.
It doesn't matter where it was before.

And btw moving the window is very resource intensive - as soon as it's moved the fps drop significantly.

I think I noticed that a few times, but thought I had just reset something, or done something weird. Now I know where it's coming from.

The performance thing is another issue. I think there might have actually been a regression moving to Unity 2017. The only simple thing that can be done about it is to not display too many contracts in the window at the same time. Make use of the contract lists and hiding contracts.

Link to comment
Share on other sites

  • 4 months later...

Maybe I am doing something wrong but I can't get this window at all. There's nothing - no button (checked both Blizzy's and stock toolbars), nothing.

The mod is installed and re-installed via CKAN ver. 9.2

The log file doesn't seem to have any errors concerning this mod. What might be the issue?

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