linuxgurugamer

[1.5.1, 1.6.1, 1.7.2] KSP-AVC Add-on Version Checker Plugin - MiniAVC

Recommended Posts

11 minutes ago, Stone Blue said:

I prefer full AVC for my play installs, over mini. But I dont install full AVC in my dev install, due to the same reason MOARdV brings up...

Oh, I missunderstood you the first time, I got it now :)

Share this post


Link to post
Share on other sites

Adding a timing check to both the full AVC and MiniAVC is fine and a good idea.  For the Miniacv. I would say put a cfg file in the GameData directory.  It would be optional, would only be there if someone put it there.

 

Share this post


Link to post
Share on other sites

I'm almost done with my work on the AVC update and I would love to get some feedback, especially for the UI I've created :)

What's done so far:

  • Added "Compatibility Override"
  • Added possible time interval between runs of AVC

"Compatibility Override" allows to oppress the "Compatibility Issues" window. Since many mods are not updated to the latest version of KSP but they still run fine, many players will install "incompatible" mods anyway.
Well, AVC doesn't care about whether a mods runs fine or not, it will complain about compatibility issues as soon as  the numbers don't fit. If you are annoyed by AVC complaining, the "Compatibility Override" feature got your back :)

Override by version
Define a KSP version to be compatible with a different KSP version. This allows you to set many mods at once to be compatible. For example: You can set any mod, which is compatible with KSP 1.4.1 to be compatible with KSP 1.6.1.
Individual mods can be removed from the version range by putting them on the "ignore version override". These mods can still use the "override by name" feature.

Override by name
If you don't want to define many mods at once to be compatible, you can also set a single mod (-name) to be compatible with the KSP version, you're running.

Ignore version override
Mods on this list will ignore the "Override by version" settings. "Override by name" is still possible (intended)!

Disable override at all / for a single mod
The features can be disabled at all or for a single mod by adding an entry to the .version file. If a mod creator want's to prevent any compatibility override for his mod, this is the way to got *stares at kopernicus*

The first 4 options can be set by config file or in the UI :) (I'll probably add the ability to enable/disable the compatibility override via UI as well)
Update notifications are not affected!

GUI so far:

Spoiler

zJlhLW6.png

This window will not replace the "update available / compatibility issue" window. It can be opend with a key combination after the mods were checked for updates.

Upper left box:
Here you can see all the mods with compatibility issues, for which KSP versions they are meant to be compatible, see which override option may affects this mod right now (version, name, none), if the compatibility override is enabled and a button to put it on the "Ignore version override" list.
The "ENABLED" button will only control the "override by name", not the "override by version" but is highlighted if any of both modes is enabled!

Upper right box:
This is the list of version overrides. It's not functional yet but it will display which KSP version will be set to be compatible with another KSP version, for example:
1.4.2 => 1.6.1
This means, that all mods which are compatible with KSP 1.4.2 are now set to be compatible with KSP 1.6.1 as well.

Lower left box:
A list of mods which are put on the ignore list for the version override. Can be removed via the "REMOVE" button.

Lower right box:
List of mods which don't allow any compatibility override

 

Time interval between AVC runs
You can set a integer number of hours for AVC to wait before it will check for updates again. Takes effect after a second game start (on the first start, AVC will calculate when it is supposed to run the next time and creates a timestamp in the config file).
It is also possible to disable AVC at all by setting the config entry to "-1", use "0" if you want AVC to run at every game start.

 

If I can get the UI to work properly with the version override, I'll release a beta version tomorrow, but if you already have any suggestions or critic on the features/UI so far, I would love to hear it :)

Share this post


Link to post
Share on other sites
On 2/28/2019 at 4:37 PM, 4x4cheesecake said:

This window will not replace the "update available / compatibility issue" window. It can be opend with a key combination after the mods were checked for updates.

Question: What's the key combination, and can it have a button instead/as well?  (I hate having to remember speciality key combos...)

Share this post


Link to post
Share on other sites
Posted (edited)
1 hour ago, DStaal said:

What's the key combination

So far, it is "alt + insert" and hard coded.

1 hour ago, DStaal said:

can it have a button instead/as well?

If you can present me good idea where to place this button: maybe^^
It cannot be in the "update available / compatibility issue" window since it will not pop up everytime, especially if you use the override feature.

edit: when I think about it: I guess I can sneak in a button into the dropdown addon list since it will always be there :)

How about this @DStaal ?

qJLFJ5t.png

(btw: the blue colored mod name indicates an active compatibility override ;) )

Edited by 4x4cheesecake

Share this post


Link to post
Share on other sites

I like.  ;) (Especially since my keyboard has neither an Alt nor an Insert key...)

Share this post


Link to post
Share on other sites
Posted (edited)
23 hours ago, DStaal said:

I like.  ;) (Especially since my keyboard has neither an Alt nor an Insert key...)

I've changed the key combination to "modkey + 2" as well. I guess, nobody plays KSP without a modkey, so this should work on every machine :)

Also, a little update in general:

gr8IuW4.png

Had to fix two major bugs which took me more time than expected but now, I can finally release a beta version for you guys to try :)

I already know a few issues and they are listed on github but it's more about details, nothing really bad ;)

Pinging @linuxgurugamer @MOARdV @Stone Blue @Tonka Crash I would love to get some feedback on the new features (detailed description above).

Three more thing about the update frequency:
1) So far, it is just part of KSP-AVC, not MiniAVC (the beta version doesn't contain MiniAvc anyway. Want to test it "in the wild" before I implement it in MiniAvc as well. )
2) If you already have set an interval but decide to change it, it will take effect after a) the previous time interval was exceeded or b) you remove the previous timestamp completely and AVC will create a new one for you.
3) Need to be set in the config file (GameData/KSP-AVC/PluginData/AVC.cfg)

https://github.com/4x4cheesecake/KSPAddonVersionChecker/releases/tag/1.2.0.8_beta_2

edit: Totally forgot to mention the proper format to enter version numbers for the version override:

The first version number will be the one which is going to be replaced, any other version number after that will be the "target version number", each version number must be separated by a comma.

for example: 1.4.2, 1.5.1, 1.6.1 will set every mod which is compatible for 1.4.2, to be compatible with 1.5.1 and 1.6.1. You need to enter at least 2 version numbers. If you want to configure the version override via config file instead of using the GUI, the format is still the same.

Also, here is an example config file:

KSP-AVC
{
	OVERRIDE_PRIORITY = none
	SIMPLE_PRIORITY = none
	DISABLE_COMPATIBLE_VERSION_OVERRIDE = False
	OVERRIDE_NAME
	{
		OverrideEnabled = ShipManifest
		OverrideEnabled = PicoPort
	}
	OVERRIDE_VERSION
	{
		OverrideEnabled = 1.4.2, 1.6.1
	}
	OVERRIDE_IGNORE
	{
		IgnoreOverride = PicoPort
		IgnoreOverride = ShipManifest
	}
	INTERVAL
	{
		MinTimeBetweenAvcRuns = 0 //Timespan between AVC runs in hours
		AvcRunsNext = 2/28/2019 3:25:54 PM
	}
}

(the first two *_PRIORITY values don't do anything :P)

Edited by 4x4cheesecake

Share this post


Link to post
Share on other sites
3 hours ago, 4x4cheesecake said:

I've changed the key combination to "modkey + 2" as well. I guess, nobody plays KSP without a modkey, so this should work on every machine :)

Wots a "modkey"??? :P

Kewl... I'll try to give this a run in the next day or two
Thanx ;)

Share this post


Link to post
Share on other sites
10 hours ago, 4x4cheesecake said:

I would love to get some feedback on the new features (detailed description above).

Sorry for the delay ... I got busy on my own mod, and forgot to get this earlier.  I'll give it a try today and have feedback this evening, if all goes well.

Share this post


Link to post
Share on other sites

@4x4cheesecake - I had some time while waiting on my coffee to brew :)

I deleted the old AVC directory and I installed the new files.  I edited the config to set MinTimeBetweenAvcRuns = 1.  Between starts, I would edit the AvcRunsNext value to simulate a long enough interval, and the feature appears to work as expected.

I have some feedback on the feature, plus I saw a couple of other things that were strange.

  1. I like that you show the next time that will be checked, so that I know without having to check the config file.  I think is is better to say "AVC check skipped" - that way, there is a reminder why AVC did not run.  "Temporary disabled" could maybe mean "something is not working correctly" or "remote server is not responding".
  2. With MinTimeBetweenAvcRuns > 0, when the AVC check runs, KSP.log has some garbage characters in the log.  It looks like an invalid string being written, although it is hard to say.
  3. When KSP starts and AVC runs, I see the window AVC generates while it is checking versions.  I then see a very time window that contains only a "CLOSE" button, with part of the title visible ("on Check") - it looks like a dialog that has no text, but only the close button and a title such as "version check".  I do not have any override enabled, so maybe it is related?

I will spend some more time today to see if I can collect more information on the strange things I saw.

Share this post


Link to post
Share on other sites
23 minutes ago, MOARdV said:

 I think is is better to say "AVC check skipped" - that way, there is a reminder why AVC did not run.  "Temporary disabled" could maybe mean "something is not working correctly" or "remote server is not responding".

Fair point, I'll change it.

31 minutes ago, MOARdV said:

With MinTimeBetweenAvcRuns > 0, when the AVC check runs, KSP.log has some garbage characters in the log.  It looks like an invalid string being written, although it is hard to say.

There are still a lot of debug messages I've left in the code  but I cannot find actual garbage in my log.

48 minutes ago, MOARdV said:

When KSP starts and AVC runs, I see the window AVC generates while it is checking versions.  I then see a very time window that contains only a "CLOSE" button, with part of the title visible ("on Check") - it looks like a dialog that has no text, but only the close button and a title such as "version check".  I do not have any override enabled, so maybe it is related?

Does it happen on every game start? Maybe the "you have successfully installed/updated AVC" window is borked for you but it should only show up on the first launch. The Override window cannot be created while the update checker progress window is still visible, so that's probably not related.

51 minutes ago, MOARdV said:

will spend some more time today to see if I can collect more information on the strange things I saw.

That would be kind of you :) Your log would be helpful to find out which window isn't displayed properly ;)

Share this post


Link to post
Share on other sites
2 hours ago, 4x4cheesecake said:

Does it happen on every game start? Maybe the "you have successfully installed/updated AVC" window is borked for you but it should only show up on the first launch. The Override window cannot be created while the update checker progress window is still visible, so that's probably not related.

Yes, every time.  It is visible immediately after the display for "KSP Add-on Version Checker".  The "installed/updated AVC" message happened the first time I ran KSP after installing the update, but it did not appear again.

I put a Zip file on DropBox.  It contains the AVC config file I am using, along with the log that shows garbage (see line 440 - Notepad++ reports this as a bunch of NUL characters).  This garbage text shifts around - it is not at the same exact line every time, but it is near the beginning of the KSP-AVC logging (almost like multiple threads are stomping on the same string concurrently).  It is not present if a) the AVC skips checking because it is not time to check again, or b) if min time is 0.

I also included screen captures of the dialog window I mentioned - avc-check.png shows the normal "checking versions" dialog, and avc-close.png is the window visible after the version check disappears.  It could be the same window, only with the version checking text removed and a close button added, perhaps.

 

Share this post


Link to post
Share on other sites

Looks good so far; no issues here.  I wish that the config file could be a MM-able .cfg file to make it easier to maintain a set of preferences when upgrading KSP-AVC, but a moment's thought shows why that's not possible.

Share this post


Link to post
Share on other sites
11 minutes ago, MOARdV said:

I put a Zip file on DropBox.

Thank you very much :)

6 minutes ago, MOARdV said:

shows garbage (see line 440 - Notepad++ reports this as a bunch of NUL characters)

I see... well, that's a part of AVC I haven't touched but I'll take a look at it :)

8 minutes ago, MOARdV said:

I also included screen captures of the dialog window I mentioned - avc-check.png shows the normal "checking versions" dialog, and avc-close.png is the window visible after the version check disappears.  It could be the same window, only with the version checking text removed and a close button added, perhaps.

Ahhh, that's the window which usually shows the updates and/or compatibility issues. It shouldn't be there if there is nothing to display, i'll fix it :)

 

11 minutes ago, DStaal said:

Looks good so far; no issues here.  I wish that the config file could be a MM-able .cfg file to make it easier to maintain a set of preferences when upgrading KSP-AVC, but a moment's thought shows why that's not possible.

Yep, unfortunately this would cause MM to rebuild the ConfigCache everytime a mod is added/removed from override feature and/or a new timestamp is created for the update frequency, so the config is placed in the PluginData folder on purpose.
Thanks for your feedback :)

Share this post


Link to post
Share on other sites
Posted (edited)

@4x4cheesecake I like it. Using the GUI, I set several version overrides through the gui everything from 1.4 to 1.6 is compatible with 1.6.1. and then set a MinTimeBetweenAvcRuns=4 in the .cfg file. This is how I plan to use it and it does what I expected.

Personally, I don't mind not getting a messages to tell me the AVC check was skipped. I'm of the mindset "No message = Nothing Wrong"

I did find one bug. While waiting for KSP to load when there was no AVC check (before the time saved in AvcRunsNext)  I tried to open the Compatibility Override GUI through the KSP-AVC menu upper left corner. I get no GUI and a NRE is thrown in the log each time the Compatibility Override GUI button is clicked.

Trying Modkey+2 doesn't do anything in this case, no gui, no NRE, it didn't seem active. To be honest I only checked the keyboard shortcut for completeness. I don't think a keyboard shortcut is necessary since the Compatibility Override GUI can be found with just a couple mouse clicks and I'm not going to be using it frequently enough for me to remember what the keyboard shortcut actually is.

[LOG 13:47:49.387] KSP-AVC -> System.NullReferenceException: Object reference not set to an instance of an object
  at KSP_AVC.Toolbar.ToolbarWindow.OverrideGUI () [0x00000] in <filename unknown>:0 
  at KSP_AVC.Toolbar.ToolbarWindow.DrawAddonList () [0x00000] in <filename unknown>:0 
  at KSP_AVC.Toolbar.ToolbarWindow.Window (Int32 windowId) [0x00000] in <filename unknown>:0 

Same message each time the Compatibility Override GUI button is clicked. 

Resetting the MinTimeBetweenAvcRuns back to 0  or changing the time to be in the past so the AVC check runs allowed the button to work again with no NREs.

I see the same type of garbage characters as @MOARdV One thought is it may be from .version files that do not have complete definitions for every field.

Edited by Tonka Crash

Share this post


Link to post
Share on other sites
3 hours ago, 4x4cheesecake said:

Yep, unfortunately this would cause MM to rebuild the ConfigCache everytime a mod is added/removed from override feature and/or a new timestamp is created for the update frequency, so the config is placed in the PluginData folder on purpose.

I was more thinking about the fact that KSP-AVC typically runs *before* MM...

Share this post


Link to post
Share on other sites
Posted (edited)
29 minutes ago, Tonka Crash said:

I like it. Using the GUI, I set several version overrides through the gui everything from 1.4 to 1.6 is compatible with 1.6.1. and then set a MinTimeBetweenAvcRuns=4 in the .cfg file. This is how I plan to use it and it does what I expected.

Glad to hear :)

29 minutes ago, Tonka Crash said:

I did find one bug. While waiting for KSP to load when there was no AVC check (before the time saved in AvcRunsNext)  I tried to open the Compatibility Override GUI through the KSP-AVC menu upper left corner. I get no GUI and a NRE is thrown in the log each time the Compatibility Override GUI button is clicked.

Found this one ~40min as well and fixed it already. The override GUI becomes available as soon as all mods have been checked for updates but the button in the dropdown list didn't know about this fact^^
That also means, that it will never become available, if AVC is skipped.

29 minutes ago, Tonka Crash said:

I see the same type of garbage characters as @MOARdV One thought is it may be from .version files that do not have complete definitions for every field. 

Strange...I wasn't able to replicate the issue so far, which makes it hard to track it down. Would you mind to upload your log as well?

There is already some code to remove gibberish characters which may appear while getting the online .version file, so that doesn't seem to be the case here...

I've build a new .dll which will create some additional log entries which hopefully help to get closer to the culprit of the issue: https://www.dropbox.com/s/znattje7x3d5t5k/KSP-AVC.zip?dl=0

Until I can replicate the issue, I would kindly ask if someone who got this issue can run this version und upload the log for me to check :) (This version includes a new cool feature for the ignore list buttons :cool: , feedback about invalid version input, clearing the input field after versions are added and the fix for the NRE^^)

22 minutes ago, DStaal said:

I was more thinking about the fact that KSP-AVC typically runs *before* MM...

Oh yeah, that would be an issue as well :D

Edited by 4x4cheesecake

Share this post


Link to post
Share on other sites
Posted (edited)
46 minutes ago, Tonka Crash said:

@4x4cheesecake  Here is the KSP.LOG and AVC.cfg using the .dll you provided in your last post.

https://drive.google.com/open?id=1XozqWb0S59U2xR0RbEqfYv0NrNGGIKzN

Helps if I actually link to the logs

Thanks :)

Now, I know that it is not an issue with the .version file or the json parser...that's kinda good news because it would be quiet a mess to fix something in the parser but I also didn't found the log entry I was hoping for...

This one is going to be tricky...

edit: Ok, now it happend once for me but it was gone on the next launch. I'll put it on the bottom of my todo list since it seem to be just a messed up debug message which will not be in the release version.

Edited by 4x4cheesecake

Share this post


Link to post
Share on other sites
Posted (edited)

So, couple things... not sure why, but using the package for 1.2.0.8, and the latest .dll from a few hours ago, the dll seems to think I am running v1.2.0.5... ?? vOv

Also, is seeing *these* in the log, good or bad? :P

"Found no char garbage for : { "

cause that could be read two opposite ways :P
 

Edited by Stone Blue

Share this post


Link to post
Share on other sites
Posted (edited)

@4x4cheesecake @linuxgurugamer just wondering if there is any chance to have the log entries for KSP-AVC *not* added into the KSP.log, since the mod creates its own log in the mod folder?

 

Also wondering if this is normal for the GUI to do, when, I'm guessing, there is nothing "bad" to report during the check/loading... vOv

OuADgJb.png

 

Edited by Stone Blue

Share this post


Link to post
Share on other sites
On 3/4/2019 at 5:40 AM, Stone Blue said:

So, couple things... not sure why, but using the package for 1.2.0.8, and the latest .dll from a few hours ago, the dll seems to think I am running v1.2.0.5... ?? vOv

I haven't changed the internal assembly version but the one in the "KSP-AVC.xml" file because AFAIK, LGG runs a script to do these things. If I accidentally push a changed version to github, it may end in the pull request and AVC would skip a version.

On 3/4/2019 at 5:40 AM, Stone Blue said:

"Found no char garbage for : { "

That's fine, it's one of the debug lines I've added to track down the reason for the gibberish characters which appear in some logs. The "{" is supposed to be the very first character in every .version file and if it is not the case, some code will run to clean it up. Just to be sure it is working properly, I've added an output of this line. There is actually quiet a lot debug code still in there, so if anyone reports an issue, it may helps me to find the culprit, but I'll remove as soon as I'm done ;)

1 hour ago, Stone Blue said:

@4x4cheesecake @linuxgurugamer just wondering if there is any chance to have the log entries for KSP-AVC *not* added into the KSP.log, since the mod creates its own log in the mod folder?
 

Probably yes but I would actually prefer to not remove the log entries from the KSP.log. If a bug related to AVC occurs and someone is going to ask for help in the support subforum, everyone will ask for a KSP.log or output_log but definitly not for a AVC.log.

I have to look at the logger code, maybe I can make it optional but no promises.

Share this post


Link to post
Share on other sites
1 hour ago, 4x4cheesecake said:

That's fine, it's one of the debug lines I've added to track down the reason for the gibberish characters which appear in some logs.

So its looking for "character" garbage, and is reporting there is none... and *not* reporting that there *is* "no-character" garbage, then... ;) Ok

I for one, would prefer the option... When adding/switching mods (which I do a lot of) in my dev installs, I scan thru the KSP.log quite often to spot things I can then fix...So having cleaner logs helps me a lot by having much less to sort thru.

Either way, THANX :D

Share this post


Link to post
Share on other sites
3 hours ago, 4x4cheesecake said:

Probably yes but I would actually prefer to not remove the log entries from the KSP.log. If a bug related to AVC occurs and someone is going to ask for help in the support subforum, everyone will ask for a KSP.log or output_log but definitly not for a AVC.log.

I have to look at the logger code, maybe I can make it optional but no promises.

For ModuleManager I created a command line flag that will disable copying the MM log to the main log.  So far I haven't seen anyone use it who shouldn't.

Share this post


Link to post
Share on other sites

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.