TK421 Posted July 23, 2015 Share Posted July 23, 2015 Improvement: Added a subcategory override for the global setting "show unpurchased parts"Improvement: Added custom type filter for unpurchased partsThat's awesome. Thanks. Link to comment Share on other sites More sharing options...
Crzyrndm Posted July 23, 2015 Author Share Posted July 23, 2015 After checking many times, I found that this dll is working, with one problem. The above mentioned scenario only happens the first time you enter the VAB. Once you exit the VAB and re-enter, everything is back to normal for the duration of the game. Also wanted to mention that this time neither of the log files contain any errors, only "loading" messages.Can I get a copy of the log file and the configuration files you are using (all your ones, and which (if any) of the distributed set that have been kept if you're still deleting them). I think I know what's happening, but I still don't know exactly why and I want a hard repro case for it. Link to comment Share on other sites More sharing options...
TK421 Posted July 23, 2015 Share Posted July 23, 2015 (edited) I'm not sure if I'm just doing something wrong, but I can't get the new unpurchased check working. The subcategory just won't show up.Following an example from a few pages back I added a line to the FilterByFunction config, then created a new config file for my category.I.e.SUBCATEGORY{ name = Unpurchased Parts icon = Experiment showUnpurchased = true FILTER { CHECK { type = custom value = purchased invert = true } }}As a test I implemented the Life Support config, and that all worked fine, both hiding them from "utility", and adding the new category. It just doesn't work with my setup for unpurchased.I notice in the log:[Filter Extensions] Unpurchased Parts in category Filter by Function has no valid parts and was not initialisedI thought I'd try capitalising purchased (value=Purchased) in case that was what it was supposed to be, and now at least the parts show up, but I guess the filter is just ignored and the default case is therefore to show everything... Usable, but not ideal. Edited July 23, 2015 by TK421 further info Link to comment Share on other sites More sharing options...
Crzyrndm Posted July 23, 2015 Author Share Posted July 23, 2015 (edited) Capitalise the P in showUnPurchased, I made a typo in the release notes (I should say in the code, that shouldn't be capitalised. It will be lower case for future releases) Edited July 23, 2015 by Crzyrndm Link to comment Share on other sites More sharing options...
TK421 Posted July 23, 2015 Share Posted July 23, 2015 I just noticed that (your previous post on it has both variations), and tried adding it that tag to my new lifesupport category, however it still only shows the two purchased parts...Time to make sure that I actually extracted the new dll... Link to comment Share on other sites More sharing options...
Crzyrndm Posted July 23, 2015 Author Share Posted July 23, 2015 No, this one is my problem. I made one too many assumptions Link to comment Share on other sites More sharing options...
TK421 Posted July 23, 2015 Share Posted July 23, 2015 Hmm, well I tried that variation, then a bunch of others such as 'showunPurchased' and 'ShowUnPurchased' however nothing works...Do I really need to restart KSP between each config file change, or is there a way to have it rebuild the filter while the game is running? Link to comment Share on other sites More sharing options...
Crzyrndm Posted July 23, 2015 Author Share Posted July 23, 2015 Hmm, well I tried that variation, then a bunch of others such as 'showunPurchased' and 'ShowUnPurchased' however nothing works...Read my last comment. I forgot to add the override field to the internal copy function and so nothing seemed to ever happen when it should. The line should read "showUnpurchased = true"- - - Updated - - -Version 2.4.1Quick patch for missing subcategories Fix for unpurchased override not being copied and therefore not functioning Link to comment Share on other sites More sharing options...
TK421 Posted July 23, 2015 Share Posted July 23, 2015 I've updated to version 2.4.1 and I'm pleased to say it fixes the 'showUnpurchased' override.Unfortunately it seems that inverting the purchased check doesn't work...I.e. If I have:SUBCATEGORY{ name = Unpurchased Parts icon = Experiment showUnpurchased = true FILTER { CHECK { type = custom value = purchased } }}it works fine, showing all purchased parts (and turning the global hide unpurchased off, still only shows purchased parts).However adding invert = true within the check (which following examples appears to be correct) the category isn't initialised.I.e. this doesn't work:SUBCATEGORY{ name = Unpurchased Parts icon = Experiment showUnpurchased = true FILTER { CHECK { type = custom value = purchased invert = true } }} Link to comment Share on other sites More sharing options...
Targa Posted July 23, 2015 Share Posted July 23, 2015 Can I get a copy of the log file and the configuration files you are using (all your ones, and which (if any) of the distributed set that have been kept if you're still deleting them). I think I know what's happening, but I still don't know exactly why and I want a hard repro case for it.Whatever you did with 2.4.1 has resolved the issue. I now have no problems with the mod working as intended. Link to comment Share on other sites More sharing options...
Crzyrndm Posted July 23, 2015 Author Share Posted July 23, 2015 I've updated to version 2.4.1 and I'm pleased to say it fixes the 'showUnpurchased' override.Unfortunately it seems that inverting the purchased check doesn't work...That is really odd since I have an override in to force it to always say it has valid parts (it even shows up in sandbox locally). Is it possible the category you're adding it to is adding some extra filtering?Working test caseSUBCATEGORY{ name = Unpurchased showUnpurchased = true FILTER { CHECK { type = custom value = purchased invert = true } }}@CATEGORY[Filter?by?Function]{ @SUBCATEGORIES { list = Unpurchased }} Link to comment Share on other sites More sharing options...
TK421 Posted July 24, 2015 Share Posted July 24, 2015 (edited) Okay, I tried saving the config you supplied as a new file and it still doesn't work for me. I still get the error "...no valid parts and was not initialised" in the log.To confirm:I'm running ksp 1.0.4I deleted the entire Filter Extensions and config folder from gamedata, then reinstalled the plugin and recommended default configs from CKANI have the unpurchased parts config you provided as a new cfg file within 000_FilterExtensions ConfigsAll the default new configs seem to work fine. I have a bunch of new categories such as B9, KSPI etc with their appropriate subcategories, as well as a bunch of subcategories within filter by function.Global hideunpurchased is on, though it doesn't seem to make a difference if it's off either.The config you supplied doesn't have an icon specified. I assume this won't be a problem and it'll display a default instead.Is there any possibility of a conflict with KIS? I do have that mod, and it adds it's own "EVA Items" subcategory to filterbyfunction, and it ignores the hideunpurchased setting.Edit: Removed KIS, and no change.Interestingly landing legs/struts don't appear under landing legs, but I guess the default configs simply don't support kerbokatz's balancing gear. Edited July 24, 2015 by TK421 Link to comment Share on other sites More sharing options...
Tarheel1999 Posted July 24, 2015 Share Posted July 24, 2015 Try without CKAN maybe? Link to comment Share on other sites More sharing options...
TK421 Posted July 24, 2015 Share Posted July 24, 2015 (edited) I think I'd already tried that but could do so again to make sure.Edit: It still doesn't work even wiping the ckan install, then using the direct kerbalstuff download which also includes "stockrework" configs (which themselves also show up properly).The weird bit is that it works fine selecting purchased parts, its just when inverted trying to show unpurchased that it doesn't work.Just in case it makes a difference:000_FilterExtensions000_FilterExtensions Configs000_Toolbar001ControlLockB9_AerospaceBetterBuoyancyBoulderCoChattererCommunityResourcePackCommunityTechTreeContractConfiguratorContractPacksContractsWindowCrossFeedEnablerCrowdSourcedScienceDatedQuickSavesDMagicOrbitalScienceDynamic ControlsEnhancedThermalDataEnvironmentalVisualEnhancementsFerramAerospaceResearchFieldExperienceGCMonitorHeatControlInterstellarFuelSwitchJSIKASKerbalEngineerKerbalFlightIndicatorsKerbalJointReinforcementKerboKatzKISkOSKSIKSPIHeatManagementMechJeb2ModularFlightIntegratorModularFuelTanksNavBallDockingAlignmentIndicatorNavyFishNearFuturePropsNereidPartCommanderPIDTunePortraitStatsPreciseNodeRadialEngineMountsPPIRavienRemoteTechSASResetSASTuningFixSCANsatScienceAlertSelectRoot2SeriousBusinessSquadStageRecoveryStationPartsExpansionStockClamshellFairingsTacFuelBalancerTakeCommandTemperatureGaugeKillerTextureReplacerThunderAerospaceTriggerTechTweakScaleUniversalStorageVerneTechWarpPluginWasdEditorCameraWaterSoundsWaypointManager[x] Science!I also have Module Manager 2.6.6 Edited July 24, 2015 by TK421 Link to comment Share on other sites More sharing options...
nimaroth Posted July 29, 2015 Share Posted July 29, 2015 Hi Crzyrndm (tsh, couldn't choose a more simple name ? XD)I tried your mod yesterday (didn't know it existed, I was about to make one similar ^^') and well ... I would like to know if there is a manual for dummies ? After using it, it was even more messy than before ... so many categories were added (in filter by functions) and I didn't really like that.So I would like to know how it works so that I can have something more usable ... Oh yeah, I deleted one of the folder so that it didn't changed the default filter by functions and was way better, I could use the filter by mod and functions who was what I wanted. But it's true that adding some categories (like wheels ...) could be interesting so ... this is why I'm asking you that ^^(too lazy to look into the code >.>) Link to comment Share on other sites More sharing options...
Crzyrndm Posted July 29, 2015 Author Share Posted July 29, 2015 (edited) All the things that make changes are in subdirectories of this folder. The "default" subdirectory is the one containing all the additions to Filter by Function, the rework folder has a different setup for the stock subcategories.All of the extra categories are individual .cfg's inside the "default" subdirectory. If you don't want it, delete it.The additional subcategories in Filter by Function are in the StockCategories.cfg (along with the improved cross section and resources categories)The replacement subcategories in Filter by Function are here. Just remove that folder if you want the stock layoutFilter Extensions uses two root config node types, CATEGORY and SUBCATEGORYCATEGORY nodes set category name, icon, colour of its subcategories, which subcategories are present and in what order, and can restrict what parts show up in their subcategories using the same syntax as the FE subcategoriesSUBCATEGORY nodes do most of the work wrt which parts are actually visible. They only have 4 possible entries: name and icon, "showUnpurchased" to override the plugin setting, and a set of FILTER nodes which decide which parts are visible. The subcategories are referenced by name when setting up a category and can be added to as many categories as you like.tl;drOnce you have the name of a subcategory, just add it to the category of choice with a unique position (between 0 and 999. Duplicates will overwrite each other) and enjoy (NOTE: No position also works, it just gets added to the end of the list)Writing a set of FILTER nodes to get the parts you want:Using the Electric Charge subcategory as an example, what I was aiming to do was improve on the stock Filter by Resource EC category by removing all the parts that often have a capacity of no significance (eg. engines with an alternator have one because of how the stock resource generation works, but that doesn't help the player looking for a battery)The parts I wanted must have storage for the resource Electric Charge and must not be a part that only has EC storage as buffer (through experimentation this was determined to be engines, command modules, and generators)If you're familiar with any programming languages, that would typically be expressed something like thisresult = hasResource("ElectricCharge") && !hasModule("ModuleCommand" || "ModuleEngines" || "ModuleEnginesFX" || "ModuleGenerator");Each CHECK node contains a single condition a part must pass to be visible. Each FILTER contains one set of conditions. If a part passes all the conditions in a FILTER, it will be visible.Multiple FILTER nodes can be used when required (eg. Manned Command, the KerbalSeat module doesn't have a crew capacity of one or more so it needs to be checked for separately), although the comma separated lists have made that quite rare nowThe majority of check types are listed in the first post, and I'll probably get some time this weekend to put together atleast a full listing of them (alternatively, check the code that handles the type) Edited July 29, 2015 by Crzyrndm Link to comment Share on other sites More sharing options...
nimaroth Posted July 29, 2015 Share Posted July 29, 2015 (edited) Thanks for the explanation ... You really did what I had in mind !And hum well yeah, I'm a dev (that's my actual work ...) so it's probably even easier for me to understand code than text XDYeah it's shameless and so what ? >.>(But I don't really know C#, I know java though ^^)From what you said, there are points that are bugging me ... as an example, I had a lot of engine in inlets and well ... that's not really their place ! (The engines from firespitter)I'll look at it when I'll be home.Oh, I just understood about the replacement / adding things in Fliter by functions XDSo hum well, I'll look at it when home.If I delete subs that I don't want, will the parts still show elsewhere ? Edited July 29, 2015 by nimaroth Link to comment Share on other sites More sharing options...
De780 Posted July 29, 2015 Share Posted July 29, 2015 Hello,Thank you very much for this development, using this mod and it is very necessary to improve it to make toys Kerbala better.By installing some other MODs, I discovered that there are no icons mods and when question marks in icons (the manufacturer) was a lot I decided to fix it.So I made a number of icons, namely those that use mods in the game.Once I thought that this meters can be useful for those who use the package FilterExtension.Pack extra icons here. Below is a list of packages, the icons which are made as a supplement:Advanced Landing Capsule for Orbital Rendezvous,http://forum.kerbalspaceprogram.com/threads/54925,alexustas,ASETAtomic Age,http://forum.kerbalspaceprogram.com/threads/104855,Porkjet,AtomicAgeBehemoth Aerospace Engineering Large Parts Pack,http://forum.kerbalspaceprogram.com/threads/124064,greystork,BAECorvus -1.25m Two Kerbal Pod,http://forum.kerbalspaceprogram.com/threads/121062,OrionKermin,CorvusCorvus Extras,http://forum.kerbalspaceprogram.com/threads/121062,OrionKermin,Corvus ExtrasPhoenix Industries Cargo Resupply System,http://forum.kerbalspaceprogram.com/threads/122510,MoviesColin,CTNAstroGamer's EnginesPlus,http://forum.kerbalspaceprogram.com/threads/127424,AstroGamer,EnginesPlusElectric Thrust Engine,http://forum.kerbalspaceprogram.com/threads/121645,JarDev,JarDevK2 Command Pod,http://forum.kerbalspaceprogram.com/threads/104925,jfjohnny5,JFJohnny5Kerbal Historical Institute,http://forum.kerbalspaceprogram.com/threads/99020, blspblackdeath / Fiddlestyx / TheMoonRover,KerbalHistoricalInstituteMI - Fuel Tank Expansion,http://forum.kerbalspaceprogram.com/threads/109885,MunarIndustries,MunarIndustriesTaurus HCV - 3.75 m Stock-ish Crew Pod ,http://forum.kerbalspaceprogram.com/threads/75074,jnrobinson / bsquiklehausen,RSCapsuledyneSETI-CommunityTechTree,http://forum.kerbalspaceprogram.com/threads/106130, Yemo,SETIcttSigma OPM Expansion,http://forum.kerbalspaceprogram.com/threads/112095,Sigma88,SigmaSpaceY Heavy Lifters Parts Pack,http://forum.kerbalspaceprogram.com/threads/100408, NecroBones,SpaceY-LiftersSXT - Stock eXTension,http://forum.kerbalspaceprogram.com/threads/24906, Lack,SXTMk. 1-1 A2 ,http://forum.kerbalspaceprogram.com/threads/98250,Yarbrough08,Yarbrough08Vanguard Astrodynamics VX Series Stockalike Engine,http://forum.kerbalspaceprogram.com/threads/127803,Randazzo,VanguardAstrodynamicsHeat Management,http://forum.kerbalspaceprogram.com/threads/118189,Randazzo,HeatManagementStock Part Revamp,http://forum.kerbalspaceprogram.com/threads/92764,Ven,VenStockRevampI hope it will be useful to someone. Link to comment Share on other sites More sharing options...
Crzyrndm Posted July 30, 2015 Author Share Posted July 30, 2015 From what you said, there are points that are bugging me ... as an example, I had a lot of engine in inlets and well ... that's not really their place ! (The engines from firespitter)...If I delete subs that I don't want, will the parts still show elsewhere ?1) If engines are showing up in the air intakes subcategory, they must also have a ModuleResourceIntake in the part. You could add an invertedd check to that looking for ModuleEngines and that would stop it (no need to check for EnginesFX any more as it respects inheritance and EnginesFX inherits from Engines)2) Only if you set them to show up elsewhere. 99% of parts (everything that uses a "category =" field that doesn't end up as none) don't care if they are never seen and are available for any subcategory in any category. Parts that wouldn't normally show in the stock Filter by Function categories ("category = none") it must show up in a subcategory created through code to be visible (the idea being that you change the subcategory definition, not the part to move things around)I hope it will be useful to someone.I will see about including these in future versions Link to comment Share on other sites More sharing options...
Helmut Posted August 11, 2015 Share Posted August 11, 2015 Hi. Mod is now a lot better.Special thanks for the switch "default to advanced mode".I have two questions:Is it possible to work with sub-categories created by other mods? For example, KIS, KAS and USI Kolonization. To move an item from the standard category, or remove from it.Is it possible to use a filter on the contrary, to exclude the item from the category? In some mods 'category = none' does not help, probably, the item in the desired category is placed by the script.PS: I did not get to use 'type = check' to select multiple conditions. This only works if set separately 'FILTER {CHECK{...}} FILTER {CHECK{...}}'. Link to comment Share on other sites More sharing options...
Crzyrndm Posted August 11, 2015 Author Share Posted August 11, 2015 1) Parts can only be added/excludeed from categories created by FE. You can remove subcategories created by other mods though, so if you really wanted you can replace them with something slightly different.2) Can you give an example of what you want to achieve using an actual part?The check type is normally reserved for when you need NOT(a AND b...), which is quite significantly different to NOT(a) AND NOT(... (the second example is actually equivalent to NOT(a OR b...)). I would say it's superseded now by the subcategory check which is much cleaner syntax wise as well as much more flexible Link to comment Share on other sites More sharing options...
Helmut Posted August 11, 2015 Share Posted August 11, 2015 (edited) You can remove subcategories created by other modsHow to do it?Can you give an example of what you want to achieve using an actual part?Sorry, it was my error.But still there is a problem with 'type = name' in 'StockRework\Subcategories.cfg'. I want to create a category 'Electrical' and move the relevant parts here.SUBCATEGORY{ name = Electrical icon = ElectricCharge FILTER { CHECK { type = path value = Squad/Parts/Resources/FuelCell } } FILTER { CHECK { type = path value = Squad/Parts/Electrical } } FILTER { CHECK { type = name value = kethane_generator } } FILTER { CHECK { type = name value = KA_Generator_02 } }}'kethane_generator' and 'KA_Generator_02' is no work. In addition, it is possible to write simpler? For example, 'value = Squad/Parts/Electrical; Squad/Parts/Electrical' and 'value = kethane_generator, KA_Generator_02'. I tried different ways, nothing works. Edited August 11, 2015 by Helmut Link to comment Share on other sites More sharing options...
Crzyrndm Posted August 12, 2015 Author Share Posted August 12, 2015 Both of those support listing using comma (,) separators, or should do (I can't do any testing/fixing for a week or two) FILTER { CHECK { type = path value = Squad/Parts/Resources/FuelCell, Squad/Parts/Electrical } } FILTER { CHECK { type = name value = kethane_generator, KA_Generator_02 } }RE: The name type not workingI don't know why that's occuring and as stated above I can't do anything about it for a while. I would suggest using title as an alternative if name is functioning incorrecctly for some reason Link to comment Share on other sites More sharing options...
Helmut Posted August 13, 2015 Share Posted August 13, 2015 'type = path' is works good, 'type = name' is not working. I remember, before there was a problem with the 'category = none' in the parts cfg, but I have tried all ways, nothing works.Use the title is not useful in my case. Firstly, it is difficult to choose only what you need, and nothing more. Secondly, the game freezes at startup if the titles on Unicode and subcategories.cfg on Unicode too.And please answer, how to remove subcategories created by other mods? Link to comment Share on other sites More sharing options...
Crzyrndm Posted August 13, 2015 Author Share Posted August 13, 2015 'type = path' is works good, 'type = name' is not working. I remember, before there was a problem with the 'category = none' in the parts cfg, but I have tried all ways, nothing works....And please answer, how to remove subcategories created by other mods?I'll get "name" tested when I get a chance. Could be a while thoughRemoving subcategories:FilterRemove{ remove = <name of subcategory to remove>} Link to comment Share on other sites More sharing options...
Recommended Posts