linuxgurugamer Posted September 11, 2016 Share Posted September 11, 2016 (edited) Janitor's Closet The new version for KSP 1.4.1 has new dependencies Dependency Click Through Blocker New Dependency SpaceTuxLibrary CKAN has been updated to install the dependencies, if needed. You are a serious player. You have dozens if not hundreds of mods install. Your part list is extreme! What do you do when the plumbing is clogged? You call the janitor. For the problem of too many parts, you use the Janitor's Closet Description This mod will allow you to block parts from being displayed in the Editor, either on a soft basis or hard basis. The difference is that a soft basis doesn't do anything to the parts, it merely blocks the parts from being displayed. In this case, the parts are still loaded. This would be useful in an ongoing career, where you have ships with parts you don't use anymore, but are still active. A hard basis is where the files get renamed so that none of the parts or their assets will be loaded. This can speed up loading a game, but is potentially game-breaking, in that if you prune a part and it is in use on a vessel, the vessel will be deleted the next time you start the game. There is also the ability to export a list of all blocked parts, so that you can either import it into another game or send it to someone else. The PermaPrune was added based on a request from a user. I don't particularly like it, renaming parts is too prone to problems. That being said, I think I've gotten all the problems fixed (as of 0.0.3) Many thanks to @xEvilReeperx, who patiently answered my questions about some KSP internals and wrote some code which is included in the mod. Thanks to @Papa_Joe for pointing me to a fix for the click-through problem https://www.patreon.com/linuxgurugamer PayPal Note This mod is incompatible with Adjustable Mod Panel (KAMP) Download from: Spacedock: http://spacedock.info/mod/944/The Janitor's Closet GitHub: https://github.com/linuxgurugamer/JanitorsCloset/releases/ License: CC-BY-NC-4.0 Alternate Download for older versions of KSP https://github.com/linuxgurugamer/JanitorsCloset/releases New Features in update 0.3.5 Fixed resource filter to also filter on propellants used by engines & RCS Optimized filters a bit Added an inverse filter, to exclude specific mods/ size/resources Fixed the "Reset All" button to properly reset the Resources filters Added help screen to mod filter window Fixed inability to save Mod Filter Window settings properly Added PartModule filter Added Module Blacklist (ignores modules in the blacklist) Added ReadableNames list Added Module Filter screen There is now a new file: PluginData/filtersConfig.cfg. It contains two types of information at present: Module Blacklist - List of modules which will be ignored by the PartModule Filter ReadableNames - List of module names and how each module is presented in the filter window. If an unknown module is found, Janitor's Closet will make a "best guess" as to what a readable version of the module name would be, and saves it in this file. Keep in mind that this file will be replaced whenever JC is updated, so if you have a better readable name for a part module, please let me know and I'll incorporate it in the next release Review by Kottabos Space Program Instructions In the editor (VAB or SPH), hold the Alt key while clicking on a part. A two line menu will be shown, giving you the option to block the part in the scene you are currently in (VAB or SPH), or block it entirely: This does the soft blocking, where it isn't changed, but just blocked from displaying. There is a toolbar button, of a broom & dustbin. Hovering the mouse over it will display a popup menu: ShowBlocked will display a list of all parts blocked, and, if a soft basis, a button so you can unblock a single part Unblock will unblock all parts which are blocked via the soft basis PermaPrune will display a new menu with the following: Permanent Prune will permanently rename files to prevent them from being loaded. It will only do this to parts which are blocked everywhere. Undo Permanent Prune will undo all the permanently pruned files Import/Export will display a new menu with the following: Export will present a dialog where you can name the list of pruned parts you are exporting. Export lists are always saved to the GameData/JanitorsCloset/PluginData directory, with a suffix of ".prnlst", and the full path is stored in the system clipboard after the export: Import will present a file dialog where you can select a file to import. It starts in the PluginData directory, but you can go anywhere to find a file. Again, it only displays files which have the suffix ".prnlst".: Toolbar Functionality Toolbar buttons can be hidden, either in the current screen or everywhere. This is somewhat misleading, since all hidden buttons are still available by clicking on the Janitor’s Closet toolbar button. Toolbar buttons can also be moved to folders, either a new folder or an existing one. Modes of Operation No hidden buttons (ie: when first starting) If no buttons have been hidden, then clicking on the Janitor’s Closet button will open a help window with these instructions If in the editor, hovering over the button will bring up the toolbar popup menu, with the following buttons: Show Blocked Unblock PermaPrune Mod Filter Export/Import ShowBlocked will display a list of all parts blocked, and, if a soft basis, a button so you can unblock a single part Unblock will unblock all parts which are blocked via the soft basis. PermaPrune will display a new menu Mod Filter will display a window where you can select which mods you want to filter (ie: show parts from) Import/Export will display a new menu Hidden Buttons Clicking on the Janitor’s Closet button will show all buttons which are hidden in the current scene Toolbar Operations Any toolbar button can be hidden, either on the current scene or all scenes. Any toolbar button can be moved, either to a new or existing button folder. To activate this, hold the ALT button (on Windows) and right-click the button you want to hide/move. Linux and OSX users need to use the MOD button for their system. A popup menu will be displayed, with the following: Hide here Hide everywhere Move to new folder and, if there are already folders created and displayed, there will be an additional button for each folder on the toolbar, with the folder displayed followed by the words “Move to folder” Hide here will remove the button from the toolbar in this scene only Hide everywhere will remove the button from the toolbar in all scenes Move to new folder will create a new button folder and move this button into the new button folder Move to folder will move this button into the selected button folder Button Folders Button folders are new buttons added to hold other buttons. At present you can’t select which icon to use for a new folder. They look like a colored folder with the broom & dustbin on top. Moving the mouse over a button folder will do an instant popup toolbar perpendicular to the current toolbar showing all the buttons in the toolbar. Moving the mouse away will hide the popup. To keep the popup, click on the button folder. Once a popup toolbar is visible, you can click on the button just like normal. Hovering over a button works as well. Settings page Toolbar Functionality enabled/disabled Enable/disable Menu popup on mouseover for toolbar button folders Enable/disable popup menu in Editor Configurable time for hover menus If popup menu in editor is disabled, then right-click on button brings it up The settings page is accessed using the standard KSP settings page. Known Issues It rarely generates nullrefs at times, mostly harmless When using the Mod Filter, if you exit the editor and then go back in, the filter won't be active UNTIL you show the filter window one time Edited January 16, 2023 by linuxgurugamer Quote Link to comment Share on other sites More sharing options...
DStaal Posted September 11, 2016 Share Posted September 11, 2016 I believe I need this. Quote Link to comment Share on other sites More sharing options...
Bombaatu Posted September 11, 2016 Share Posted September 11, 2016 This... this is glorious. Quote Link to comment Share on other sites More sharing options...
Stone Blue Posted September 11, 2016 Share Posted September 11, 2016 (edited) .... Edited May 30, 2017 by Stone Blue Quote Link to comment Share on other sites More sharing options...
SpannerMonkey(smce) Posted September 11, 2016 Share Posted September 11, 2016 How can this only have just been done! I'm so glad it became a reality. Goodbye stock parts, I've never used you and now I wont have to look at you. Thanks so much. Quote Link to comment Share on other sites More sharing options...
White Owl Posted September 12, 2016 Share Posted September 12, 2016 I like it. Quote Link to comment Share on other sites More sharing options...
Superfluous J Posted September 12, 2016 Share Posted September 12, 2016 Very nice. So many parts to block... Quote Link to comment Share on other sites More sharing options...
nightingale Posted September 12, 2016 Share Posted September 12, 2016 Be careful with the way you've implemented the perma-prune - deleting/renaming files will play havok with CKAN users (unless CKAN has changed, but last I checked it would freak out when uninstalling/updating a mod when all files it expected to be there weren't there). You may be better off writing a LoadingSystem mod that executes after GameDatabase (or better yet, after ModuleManager) and before PartDatabase. That being said - cool idea! Quote Link to comment Share on other sites More sharing options...
Maars Posted September 12, 2016 Share Posted September 12, 2016 I'm jumping on the bandwagon of the above posts and declaring this to be AWESOME Quote Link to comment Share on other sites More sharing options...
theJesuit Posted September 12, 2016 Share Posted September 12, 2016 All the comments thus far sum up my appreciation for this mod idea and it's implementation. My humble thanks. Peace. Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted September 12, 2016 Author Share Posted September 12, 2016 (edited) On 9/12/2016 at 5:12 AM, nightingale said: Be careful with the way you've implemented the perma-prune - deleting/renaming files will play havok with CKAN users (unless CKAN has changed, but last I checked it would freak out when uninstalling/updating a mod when all files it expected to be there weren't there). You may be better off writing a LoadingSystem mod that executes after GameDatabase (or better yet, after ModuleManager) and before PartDatabase. That being said - cool idea! Expand I don't belive CKAN will have a problem with missing files, but I'll check. That being said, your suggestion is valid, and I'd like to learn how to do that. Edit: I just permapruned some parts, and then removed the mod with CKAN, no problems Edited September 12, 2016 by linuxgurugamer Quote Link to comment Share on other sites More sharing options...
Torih Posted September 12, 2016 Share Posted September 12, 2016 Got a slight issue, blocked a few items using "all", then went to permaprune. the window appeared and renamed 1 of the 10ish I had selected then just threw and error in the log. https://dl.dropboxusercontent.com/u/26687/output_log.txt It is removing them from the VAB just seems to be an issue renaming. Quote Link to comment Share on other sites More sharing options...
DaMachinator Posted September 12, 2016 Share Posted September 12, 2016 On 9/11/2016 at 8:29 PM, SpannerMonkey(smce) said: How can this only have just been done! I'm so glad it became a reality. Goodbye stock parts, I've never used you and now I wont have to look at you. Thanks so much. Expand Wow, that's harsh Quote Link to comment Share on other sites More sharing options...
Superfluous J Posted September 12, 2016 Share Posted September 12, 2016 (edited) On 9/12/2016 at 5:12 AM, nightingale said: Be careful with the way you've implemented the perma-prune - deleting/renaming files will play havok with CKAN users (unless CKAN has changed, but last I checked it would freak out when uninstalling/updating a mod when all files it expected to be there weren't there). You may be better off writing a LoadingSystem mod that executes after GameDatabase (or better yet, after ModuleManager) and before PartDatabase. That being said - cool idea! Expand Also for stock parts, if you use Steam and "verify local data" after pruning parts, Steam may put them back. It also may leave the pruned copies there. At the very least you (@linuxgurugamer not nightingale ) should try to error out gracefully when you get in this situation, possibly notifying the player of the likely cause. I can imagine people reporting "I keep deleting this part and it keeps coming back!" a lot This would also likely happen after any update through Steam or through the new-and-improved-hopefully Launcher. Edited September 12, 2016 by 5thHorseman Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted September 12, 2016 Author Share Posted September 12, 2016 On 9/12/2016 at 2:57 PM, 5thHorseman said: Also for stock parts, if you use Steam and "verify local data" after pruning parts, Steam may put them back. It also may leave the pruned copies there. At the very least you (@linuxgurugamer not nightingale ) should try to error out gracefully when you get in this situation, possibly notifying the player of the likely cause. I can imagine people reporting "I keep deleting this part and it keeps coming back!" a lot This would also likely happen after any update through Steam or through the new-and-improved-hopefully Launcher. Expand I know. I actually don't recommend using the PermaPruner, the load time (unless you delete a LOT of parts) won't be impacted that much if you only block them from displaying. The way it's written, when a part is blocked and PermaPruned, it remains in the block list, so even if Steam restores it, you won't see it; it will load but not be visible (unless you unblock everything) On 9/12/2016 at 12:59 PM, Torih said: Got a slight issue, blocked a few items using "all", then went to permaprune. the window appeared and renamed 1 of the 10ish I had selected then just threw and error in the log. https://dl.dropboxusercontent.com/u/26687/output_log.txt It is removing them from the VAB just seems to be an issue renaming. Expand I fixed that this morning, please download version 0.0.3 Quote Link to comment Share on other sites More sharing options...
Papa_Joe Posted September 12, 2016 Share Posted September 12, 2016 Nice to see you got this done. I will be down loading it myself. As for the click through. I believe PWBFuelBalancer has some code that can help. I just took over maintenance of it and discovered that chunk of code. I was planning on implementing that in my other mods. Take a look. Quote Link to comment Share on other sites More sharing options...
Torih Posted September 12, 2016 Share Posted September 12, 2016 On 9/12/2016 at 3:13 PM, linuxgurugamer said: I fixed that this morning, please download version 0.0.3 Expand Ah thanks, latest off ckan was .2 earlier. May I suggest you put the latest version number in the title Quote Link to comment Share on other sites More sharing options...
Streetwind Posted September 12, 2016 Share Posted September 12, 2016 Earmarked for future use and abuse! Quote Link to comment Share on other sites More sharing options...
Kerbart Posted September 12, 2016 Share Posted September 12, 2016 I am clueless in this regards, but could permaprune perhaps be done through module manager? also, would it be possible to apply these settings per save? I might want to see RT parts in my RemoteTech save, but not in my Kareer save, for instance. Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted September 12, 2016 Author Share Posted September 12, 2016 (edited) On 9/12/2016 at 4:49 PM, Kerbart said: I am clueless in this regards, but could permaprune perhaps be done through module manager? Expand No, but Nightingale suggested an alternative, which I'll be looking into On 9/12/2016 at 4:49 PM, Kerbart said: also, would it be possible to apply these settings per save? I might want to see RT parts in my RemoteTech save, but not in my Kareer save, for instance. Expand Yes. Don't use PermaPrune. PermaPrune is dangerous, and affects ALL saves. If you don't use it, then anything blocked will only apply to the save you are in. On 9/12/2016 at 4:38 PM, Torih said: Ah thanks, latest off ckan was .2 earlier. May I suggest you put the latest version number in the title Expand I have 31 mods to deal with, it's too much trouble to update the title every time I update the mod. I use the MiniAVC mod with all my mods, so if you aren't using CKAN you will get notified at game start that there is a new version. On 9/12/2016 at 4:23 PM, Papa_Joe said: Nice to see you got this done. I will be down loading it myself. As for the click through. I believe PWBFuelBalancer has some code that can help. I just took over maintenance of it and discovered that chunk of code. I was planning on implementing that in my other mods. Take a look. Expand That's actually a pretty cool mod. I'll be looking at the code. Can you point me to that code? Found it Edited September 12, 2016 by linuxgurugamer Quote Link to comment Share on other sites More sharing options...
Papa_Joe Posted September 12, 2016 Share Posted September 12, 2016 (edited) On 9/12/2016 at 5:15 PM, linuxgurugamer said: No, but Nightingale suggested an alternative, which I'll be looking into Yes. Don't use PermaPrune. PermaPrune is dangerous, and affects ALL saves. If you don't use it, then anything blocked will only apply to the save you are in. I have 31 mods to deal with, it's too much trouble to update the title every time I update the mod. I use the MiniAVC mod with all my mods, so if you aren't using CKAN you will get notified at game start that there is a new version. That's actually a pretty cool mod. I'll be looking at the code. Can you point me to that code? Found it Expand Look here, starting at line 132. then look at the OnWindow method for implementation. https://github.com/codepoetpbowden/PWBFuelBalancer/blob/master/PWBFuelBalancerAddon.cs credit for this code is cybutek. (noted in the source) It goes back a ways... Lol, I see I was too late Edited September 12, 2016 by Papa_Joe Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted September 12, 2016 Author Share Posted September 12, 2016 @Papa_Joe Thanks. Is that mod ready for 1.1.3? Quote Link to comment Share on other sites More sharing options...
Papa_Joe Posted September 12, 2016 Share Posted September 12, 2016 (edited) On 9/12/2016 at 6:37 PM, linuxgurugamer said: @Papa_Joe Thanks. Is that mod ready for 1.1.3? Expand No problem! Yes. I'm working a couple of bugs, but it is updated for 1.1.3. note the new thread in my sig. Edited September 12, 2016 by Papa_Joe Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted September 12, 2016 Author Share Posted September 12, 2016 On 9/12/2016 at 8:02 PM, Papa_Joe said: No problem! Yes. I'm working a couple of bugs, but it is updated for 1.1.3. note the new thread in my sig. Expand ok, thanks. Let me know if you need any help. Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted September 12, 2016 Author Share Posted September 12, 2016 On 9/12/2016 at 5:31 PM, Papa_Joe said: Look here, starting at line 132. then look at the OnWindow method for implementation. https://github.com/codepoetpbowden/PWBFuelBalancer/blob/master/PWBFuelBalancerAddon.cs credit for this code is cybutek. (noted in the source) It goes back a ways... Lol, I see I was too late Expand I think you meant to look at OnGUI, not OnWindow (putting this here for reference for other people) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.