Jump to content

ZeroMiniAVC


linuxgurugamer

Recommended Posts

ZeroMiniAVC is a little mod which simply removes any MiniAVC.dll or MiniAVC-v2.dll files

This used to be the development  thread, now being used as the release thread.

 

This is going to be a development thread for some ZeroMiniAVC (ZMAVC) development work, hopefully short lived.

ZMAVC disables and prunes all MiniAVC added by others mods by renaming the dlls at runtime.  Apparently this is now causing an obvious problem in ModuleManager, as well as potential problems elsewhere in the game.  As a result, the following goals are being done to rectify the situation:

  • Exit the game after all dlls have been pruned, if any at all have been pruned
  • Show a message explaining why the game is exiting
  • Attempt to restart the game using the same arguments and settings as it was originally started with

Exiting the game is easy, it's the second and third which are more problematic.  Work on this will be started Tuesday, June 15 evening starting around 6:30, I'll be streaming it on Twitch:  https://twitch.tv/linuxgurugamer

I will need some beta testers as these changes are potentially game breaking and I'll want it tested on as many different systems as possible before I release it.

Suggestions are welcome, and while I'm streaming, I do listen to chat and respond to comments and suggestions

Edited by linuxgurugamer
Link to comment
Share on other sites

3 minutes ago, HebaruSan said:

So if I don't want my game to restart at startup because some mod depends on this one, I'll need to install ZeroZeroMiniAVC?

No, this  effort will be to upgrade ZeroMiniAVC.  @Lisias made some good points in the MM thread about the renaming of DLLs, and I think he knows more than I do about the internals of Unity, so I'm going to try to implement these features in ZeroMiniAVC.  See his points in this post:

 

This will only restart the game if any DLLs get pruned (ie: renamed)

Edited by linuxgurugamer
Link to comment
Share on other sites

It appears that ideally the pruning would occur before the game is launched.  Is there an avenue possible for pre-game scripts for Windows, linux/mac that do what ZeroMiniAVC does?  I'm assuming this would need os specific flavors which is not ideal, in one sense, but more ideal in that no restart is required

[edit] CKAN does this via filters as now.  But many users don't use CKAN and many mods don't leverage CKAN.  A standalone mono ZMAVC run prior to the game would be os friendly and scriptable by the player

 

 

 

Edited by darthgently
Link to comment
Share on other sites

16 minutes ago, darthgently said:

It appears that ideally the pruning would occur before the game is launched.  Is there an avenue possible for pre-game scripts for Windows, linux/mac that do what ZeroMiniAVC does?  I'm assuming this would need os specific flavors which is not ideal, in one sense, but more ideal in that no restart is required

[edit] CKAN does this via filters as now.  But many users don't use CKAN and many mods don't leverage CKAN.  A standalone mono ZMAVC run prior to the game would be os friendly and scriptable by the player

And obviously easier, but not a viable solution.  Lots of people don't use CKAN, asking people to run yet another pre-game script is just not user-friendly

OS specific isn't a problem, it's the user which needs to be considered

Link to comment
Share on other sites

7 minutes ago, linuxgurugamer said:

And obviously easier, but not a viable solution.  Lots of people don't use CKAN, asking people to run yet another pre-game script is just not user-friendly

OS specific isn't a problem, it's the user which needs to be considered

I was imagining it as a parallel solution, not a replacement.  CKAN will filter MAVC now and I run it before launch so I'm covered. Was just thinking of that 3rd group

Link to comment
Share on other sites

30 minutes ago, darthgently said:

many users don't use CKAN

11 minutes ago, linuxgurugamer said:

Lots of people don't use CKAN

True, but how many of those users also know about and choose to install ZeroMiniAVC? Meanwhile many, many CKAN users have been forced to install ZeroMiniAVC via the ToolbarController/ClickThroughBlocker "dependencies". So a CKAN-specific solution would solve the problem for a significant portion of the affected users.

Link to comment
Share on other sites

3 minutes ago, HebaruSan said:

True, but how many of those users also know about and choose to install ZeroMiniAVC? Meanwhile many, many CKAN users have been forced to install ZeroMiniAVC via the ToolbarController/ClickThroughBlocker "dependencies". So a CKAN-specific solution would solve the problem for a significant portion of the affected users.

From what I've seen in the forums over time, many users will not use CKAN, and that is the way it is

Link to comment
Share on other sites

4 minutes ago, darthgently said:

From what I've seen in the forums over time, many users will not use CKAN, and that is the way it is

I'm not trying to get into that argument, people can use whatever they want. My point is that this ZeroMiniAVC problem is largely a CKAN problem.

Link to comment
Share on other sites

28 minutes ago, HebaruSan said:

I'm not trying to get into that argument, people can use whatever they want. My point is that this ZeroMiniAVC problem is largely a CKAN problem.

Ok, that clarifies. So the 3rd group I was positing that doesn't use CKAN but does use ZMAVC is non-existent or very tiny because you posit that many ZMAVC installs are from CKAN dependencies (which are presumably in place because of mods that install MAVC inside or outside of CKAN).  Is that accurate?

Link to comment
Share on other sites

Beta release available, 1.1.3

  • Added code to exit the game (and restart) if any DLLs are renamed
  • Added window to give a 15 second windows to show what's going on
  • Added new restart option to settings.cfg to control if game should restart or not
    • Note:  If restarting, the option "-single-instance" will be stripped from the command line arguments, otherwise KSP itself will not allow a restart
  • Added log.cs for local log control
  • Added logging to <GAMEDIR>/Log/ZeroMiniAVC.log

https://github.com/linuxgurugamer/ZeroMiniAVC/releases/tag/1.1.3

I need feedback, both good and bad.  When you test, you will have to install one or more mods which have the MiniAVC.dll (or MiniAVC-v2.dll) file to test the pruning and restart.

It needs to be tested on Windows, OSX and Linux, I do not have a linux system available right now to test, but the methods I used are OS generic.

One thing to look at is the log file, it appears that on Windows the log files (Player.log & KSP.log) are reused when the game is restarted.  Please verify that on all three environments if you can.

Please post all test results here

Thank  you

Edited by linuxgurugamer
Link to comment
Share on other sites

57 minutes ago, linuxgurugamer said:

Please post all test results here

System: Windows 11 Home 22H2

KSP 1.12.4 launched as Non-Steam game from Steam library
Used default config for mod
Results:

  • Detected MiniAVC DLL
  • Pop up window with countdown appeared during load.
  • Pressed button to manually restart
  • DLL was pruned 
  • Game successfully restarted
  • Full Steam overlay functional. 
  • Gameplay normal

Log: 

INFO:2022-11-15 22:10:46.698  =================================================
INFO:2022-11-15 22:10:46.698  ZeroMiniAVC started at: 11/15/2022 10:10:46 PM
INFO:2022-11-15 22:10:46.702  ZeroMiniAVC: Awake
INFO:2022-11-15 22:10:57.272  Arg[0]: C:\Kerbal\Active\Kerbal Space Program1.12.4\KSP_x64.exe
INFO:2022-11-15 22:10:57.272  Arg[1]: -popupwindow
INFO:2022-11-15 22:10:57.272  ZeroMiniAVC started ...
INFO:2022-11-15 22:10:57.288  MiniAVC pruned for KIS
INFO:2022-11-15 22:10:57.288  MiniAVC pruned for KIS, path: C:\Kerbal\Active\Kerbal Space Program1.12.4\GameData\KIS\Plugins\MiniAVC-V2.dll.pruned
INFO:2022-11-15 22:11:07.960  startInfo.FileName: C:\Kerbal\Active\Kerbal Space Program1.12.4\KSP_x64.exe, startInfo.Arguments: -popupwindow
INFO:2022-11-15 22:11:19.328  =================================================
INFO:2022-11-15 22:11:19.329  ZeroMiniAVC started at: 11/15/2022 10:11:19 PM
INFO:2022-11-15 22:11:19.333  ZeroMiniAVC: Awake
INFO:2022-11-15 22:11:29.506  Arg[0]: C:\Kerbal\Active\Kerbal Space Program1.12.4\KSP_x64.exe
INFO:2022-11-15 22:11:29.506  Arg[1]: -popupwindow
INFO:2022-11-15 22:11:29.507  ZeroMiniAVC started ...
INFO:2022-11-15 22:11:29.521  ZeroMiniAVC destroyed...

 

Link to comment
Share on other sites

CKAN really is somehow wicked now, it says it wants to remove (latest official released) ZeroMiniAVC 1.1.2.5 but then hangs after clicking on "Apply".
I cannot remove it manually via CKAN after restoring the last registry.json as the chain of dependencies forces me to uninstall a quarter of my mods then.

I guess I have to ignore all CKAN messages about ZeroMiniAVC for now.

Link to comment
Share on other sites

On 11/16/2022 at 9:58 AM, Gordon Dry said:

CKAN really is somehow wicked now, it says it wants to remove (latest official released) ZeroMiniAVC 1.1.2.5 but then hangs after clicking on "Apply".
I cannot remove it manually via CKAN after restoring the last registry.json as the chain of dependencies forces me to uninstall a quarter of my mods then.

I guess I have to ignore all CKAN messages about ZeroMiniAVC for now.

Could you give the beta a test, please, and report back?  Would help if you tested on a non-critical install, with some mods manually installed with the MiniaVC dll there

Thx

Link to comment
Share on other sites

New beta release, 1.1.3.1

  • Added code to search for leftover MiniAVC.dll files and prune them

https://github.com/linuxgurugamer/ZeroMiniAVC/releases/tag/1.1.3.1

 

The first beta was only removing the first MiniAVC.dll found due to a change in the way KSP was loading DLLS (back in 1.12.3), this fixes that to find all of them.  Issue showed up if there were multiple MiniAVC.dll files, the game would be restarted once for each one found until they were all removed

Link to comment
Share on other sites

12 hours ago, linuxgurugamer said:

New beta release, 1.1.3.1

Windows 10 
KIS the only mod I know of that has a miniAVC  
Tested on both KSP 1.12.3 (on accident) and 1.12.4 
Behavior of ZeroMiniAVC was identical in both versions. A pop-up appeared saying it found things to prune and that the game would need to restart, and then the game restarted on its own a single time. No pop up after the restart, and the game loads and plays normally. For my 1.12.4 install Sandcastle seems to be broken pretty badly and the game plays as expected in that state and it didn't seem to affect ZeroMiniAVC at all. 
ZeroMiniAVC Log for 1.12.4

INFO:2022-11-20 19:15:42.156  ZeroMiniAVC started at: 11/20/2022 7:15:42 PM
INFO:2022-11-20 19:15:42.159  ZeroMiniAVC: Awake
INFO:2022-11-20 19:15:54.847  Arg[0]: D:\SteamLibrary\steamapps\common\Kerbal Space Program\KSP_x64.exe
INFO:2022-11-20 19:15:54.847  ZeroMiniAVC started ...
INFO:2022-11-20 19:15:54.851  cleanMiniAVC
INFO:2022-11-20 19:15:54.853  MiniAVC pruned for KIS
INFO:2022-11-20 19:15:54.854  MiniAVC pruned for KIS, path: D:\SteamLibrary\steamapps\common\Kerbal Space Program\GameData\KIS\Plugins\MiniAVC-V2.dll.pruned
INFO:2022-11-20 19:15:55.665  showwin set to true
INFO:2022-11-20 19:16:10.675  startInfo.FileName: D:\SteamLibrary\steamapps\common\Kerbal Space Program\KSP_x64.exe, startInfo.Arguments: 
INFO:2022-11-20 19:16:24.557  =================================================
INFO:2022-11-20 19:16:24.558  ZeroMiniAVC started at: 11/20/2022 7:16:24 PM
INFO:2022-11-20 19:16:24.561  ZeroMiniAVC: Awake
INFO:2022-11-20 19:16:37.546  Arg[0]: D:\SteamLibrary\steamapps\common\Kerbal Space Program\KSP_x64.exe
INFO:2022-11-20 19:16:37.546  ZeroMiniAVC started ...
INFO:2022-11-20 19:16:37.550  cleanMiniAVC
INFO:2022-11-20 19:16:37.553  ZeroMiniAVC destroyed...

ZeroMiniAVC Log for 1.12.3 :

INFO:2022-11-20 18:53:34.704  ZeroMiniAVC started at: 11/20/2022 6:53:34 PM
INFO:2022-11-20 18:53:34.707  ZeroMiniAVC: Awake
INFO:2022-11-20 18:53:40.927  Arg[0]: D:\Kerbal Space Program\KSP_x64.exe
INFO:2022-11-20 18:53:40.927  ZeroMiniAVC started ...
INFO:2022-11-20 18:53:40.938  cleanMiniAVC
INFO:2022-11-20 18:53:40.941  MiniAVC pruned for KIS
INFO:2022-11-20 18:53:40.941  MiniAVC pruned for KIS, path: D:\Kerbal Space Program\GameData\KIS\Plugins\MiniAVC-V2.dll.pruned
INFO:2022-11-20 18:53:41.513  showwin set to true
INFO:2022-11-20 18:54:02.346  startInfo.FileName: D:\Kerbal Space Program\KSP_x64.exe, startInfo.Arguments: 
INFO:2022-11-20 18:54:15.568  =================================================
INFO:2022-11-20 18:54:15.569  ZeroMiniAVC started at: 11/20/2022 6:54:15 PM
INFO:2022-11-20 18:54:15.570  ZeroMiniAVC: Awake
INFO:2022-11-20 18:54:21.777  Arg[0]: D:\Kerbal Space Program\KSP_x64.exe
INFO:2022-11-20 18:54:21.777  ZeroMiniAVC started ...
INFO:2022-11-20 18:54:21.792  cleanMiniAVC
INFO:2022-11-20 18:54:21.796  ZeroMiniAVC destroyed...


Let me know if there are any other mods with MiniAVCs you'd like me to test. 
Oh, and as a disclaimer, I have no idea what MiniAVCs are/do so I won't be able to provide much insight beyond what behavior I observe and what's in the logs
One more thing, dunno if it's helpful or not, but when I manually inserted the beta into the GameData folder ckan was *extremely* unhappy. It threw an error when applying any other mod updates that an object being referenced didn't exist, and when hitting "continue" instead of quit it brought up the "mods to install" window with no list at all. But when I ignored all those warning signs and hit "apply" anyways it properly updated/installed the mods I selected and then removed ZeroMiniAVC. I reinstalled the beta manually after that and then ran the program from it's icon in the file system, so I don't know if ckan is still angry at it.
Before I manually replaced the ckan install with the beta, I was also experiencing ckan freezing when hitting "apply" to remove the ckan install of ZeroMiniAVC, but it was also freezing even if I just clicked the little checkbox in the list. I let it try to resolve for over three minutes one time before force quitting ckan

Edited by WaywardScythe
Link to comment
Share on other sites

10 hours ago, WaywardScythe said:

One more thing, dunno if it's helpful or not, but when I manually inserted the beta into the GameData folder ckan was *extremely* unhappy. It threw an error when applying any other mod updates that an object being referenced didn't exist, and when hitting "continue" instead of quit it brought up the "mods to install" window with no list at all. But when I ignored all those warning signs and hit "apply" anyways it properly updated/installed the mods I selected and then removed ZeroMiniAVC. I reinstalled the beta manually after that and then ran the program from it's icon in the file system, so I don't know if ckan is still angry at it.

You overwrote the existing ZeroMiniAVC when you installed it?

Which version of CKAN are you running?

Link to comment
Share on other sites

1 hour ago, linuxgurugamer said:

You overwrote the existing ZeroMiniAVC when you installed it?

Initially, yeah. functionally though, I ended up using ckan to delete my overwrite install and then I installed it fresh (not overwriting anything), manually. Sorry if I'm being confusing. 

1 hour ago, linuxgurugamer said:

Which version of CKAN are you running?

I'm using v1.31.2

Link to comment
Share on other sites

Full release, 1.1.3.2

All changes since 1.1.2.5 (last official release)

  • Added code to search for all files matching lowercase miniavc.dll for Mac and Linux systems
  • Changed countdown from 15 to 30 seconds
  • Added code to search for leftover MiniAVC.dll files and prune them
  • Added code to exit the game (and restart) if any DLLs are renamed
  • Added window to give a 15 second windows to show what's going on
  • Added new restart option to settings to control if game should restart or not
    • Note:  If restarting, the option "-single-instance" will be stripped from the command line arguments, otherwise KSP itself will not allow a restart
  • Added log.cs for local log control
  • Added logging to <GAMEDIR>/Log/ZeroMiniAVC.log
     
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...