Jump to content

[1.3.0] Filter Extensions 3.0.4 (Jul 11)


Crzyrndm

Recommended Posts

So I just downloaded this and loaded it up in a sandbox save for testing, and noticed something. The Resource Mining and Processing tab was empty. Curious, and a little confused, I decided to look around in the configs. It was there that I noticed the Resource Extractors (Drills.cfg) and Resource Processors (ResourceProcessor.cfg) subtabs were set for all the various mod tabs and Resource Storage and Processing. I added Resource Mining and Processing to the start of the list, loaded KSP back up, and found the subtabs there like I assume they should be.

Just thought I should point that out. It seems like an easy thing to miss.

BTW: tabs refers to the main filers and subtabs refers to the subcategories on those.

Link to comment
Share on other sites

So I just downloaded this and loaded it up in a sandbox save for testing, and noticed something. The Resource Mining and Processing tab was empty. Curious, and a little confused, I decided to look around in the configs. It was there that I noticed the Resource Extractors (Drills.cfg) and Resource Processors (ResourceProcessor.cfg) subtabs were set for all the various mod tabs and Resource Storage and Processing. I added Resource Mining and Processing to the start of the list, loaded KSP back up, and found the subtabs there like I assume they should be.

Just thought I should point that out. It seems like an easy thing to miss.

BTW: tabs refers to the main filers and subtabs refers to the subcategories on those.

I had some problems like this when this current version first came out. I simply bumped my version back to the previous version but glad to see there may be a fix for it.

Link to comment
Share on other sites

So I just downloaded this and loaded it up in a sandbox save for testing, and noticed something. The Resource Mining and Processing tab was empty. Curious, and a little confused, I decided to look around in the configs. It was there that I noticed the Resource Extractors (Drills.cfg) and Resource Processors (ResourceProcessor.cfg) subtabs were set for all the various mod tabs and Resource Storage and Processing. I added Resource Mining and Processing to the start of the list, loaded KSP back up, and found the subtabs there like I assume they should be.

Good catch, I'll add that to the list of things I need to fix when I get time...

Link to comment
Share on other sites

  • 4 weeks later...

Am I correct in that there's no way to define your default category? Meaning the category that you want to be opened when entering the VAB/SPH instead of "Filter by Function." If not, is that possible?

Link to comment
Share on other sites

Not currently no. It can be done, but there is a possibility it may be post-1.0 before the next update given how long this one is taking me ;) (I am making progress. Just a little short on time currently)

EDIT

internalIcon_plus

internalIcon_ionicSymphonic

internalIcon_kerlington

internalIcon_probodobodyne

stockIcon_fallback

stockIcon_function

stockIcon_module

stockIcon_resource

stockIcon_manufacturer

stockIcon_usage

stockIcon_bulkheadprofile

stockIcon_aerodynamics

stockIcon_cmdctrl

stockIcon_crew

stockIcon_decals

stockIcon_pods

stockIcon_propulsion

stockIcon_science

stockIcon_structural

stockIcon_utility

stockIcon_subassemblies

stockIcon_techlevel

stockIcon_fueltank

stockIcon_engine

fuels_monopropellant

fuels_oxidizer

fuels_solidfuel

fuels_xenongas

number1

number2

number3

number4

number5

number6

number7

number8

number9

R&D_node_icon_advaerodynamics

R&D_node_icon_advancedmotors

R&D_node_icon_advconstruction

R&D_node_icon_advelectrics

R&D_node_icon_advexploration

R&D_node_icon_advflightcontrol

R&D_node_icon_advlanding

R&D_node_icon_advmetalworks

R&D_node_icon_advrocketry

R&D_node_icon_advsciencetech

R&D_node_icon_advunmanned

R&D_node_icon_aerodynamicsystems

R&D_node_icon_aerospacetech

R&D_node_icon_automation

R&D_node_icon_basicprobes

R&D_node_icon_basicrocketry

R&D_node_icon_composites

R&D_node_icon_electrics

R&D_node_icon_electronics

R&D_node_icon_evatech

R&D_node_icon_experimentalaerodynamics

R&D_node_icon_experimentalelectrics

R&D_node_icon_experimentalmotors

R&D_node_icon_experimentalrocketry

R&D_node_icon_experimentalscience

R&D_node_icon_fieldscience

R&D_node_icon_flightcontrol

R&D_node_icon_fuelsystems

R&D_node_icon_generalconstruction

R&D_node_icon_generalrocketry

R&D_node_icon_generic

R&D_node_icon_heavierrocketry

R&D_node_icon_heavyaerodynamics

R&D_node_icon_heavyrocketry

R&D_node_icon_highaltitudeflight

R&D_node_icon_highaltitudepropulsion

R&D_node_icon_hypersonicflight

R&D_node_icon_ionpropulsion

R&D_node_icon_landing

R&D_node_icon_largecontrol

R&D_node_icon_largeelectrics

R&D_node_icon_largeprobes

R&D_node_icon_metamaterials

R&D_node_icon_nanolathing

R&D_node_icon_nuclearpropulsion

R&D_node_icon_precisionengineering

R&D_node_icon_robotics

R&D_node_icon_sciencetech

R&D_node_icon_specializedconstruction

R&D_node_icon_specializedcontrol

R&D_node_icon_specializedelectrics

R&D_node_icon_stability

R&D_node_icon_start

R&D_node_icon_supersonicflight

R&D_node_icon_survivability

R&D_node_icon_unmannedtech

R&D_node_icon_veryheavyrocketry

Edited by Crzyrndm
Link to comment
Share on other sites

THIS IS AN ALPHA RELEASE

v1.x configs will need some editing to work as expected, some old functionality may not work as expected

Filter Extensions v2 Alpha 1 - Download from Github

  • Categories have full control over the order of their subcategories
  • Subcategories in Stock Categories can now be fully redefined with significantly less effort (except Filter by Manufacturer, I need to fix that)
  • Path check type allows any length of part url to be specified (extension of the folder type check which only matched the root GameData folder)

The major (config breaking) change is in how subcategories are linked to categories. A v2 category config looks like this:


CATEGORY
{
name = Kerbonauts and Control
icon = Kerbal_Drones
colour = #FF90F090
all = true

SUBCATEGORIES
{
list = 0, Manned Command
list = 1, Drone
list = 2, Reaction Wheels with Control
list = 3, Reaction Wheels without Control
list = 4, RCS
list = 5, Command with RCS
list = 6, Passengers
list = 7, 1 Kerbal
list = 8, 2 Kerbals
list = 9, 3 Kerbals
list = 10, Multiple Kerbals
}
}

It looks for subcategories by name and inserts them by the specified index. If two items in the SUBCATEGORIES node have the same index, the later will overwrite the former (easy to MM patch an overwrite). To rewrite a stock category completely, you need a category with the key "stock = true" (Filter by Function and Filter by Resource included for examples).

A lot of the v1.x code has been ripped out while getting this working, so some expected functionality may not be working just yet. If you notice something while using the pre-release, please poke me about it.

EDIT

Templates are replacing the "mod" type categories. Adding a FILTER node to the category definition tags all the Filters in its subcategories with the listed Checks. Much more flexible than the original system.

CATEGORY{
name = Squad
...

FILTER
{
CHECK
{
type = folder
value = Squad, NASAmission
}
}

...
}

Edited by Crzyrndm
Link to comment
Share on other sites

v2.0 Alpha 3 includes:

  • all the conflict checking present in 1.17 now working in 2.0
  • a default category/subCategory setting (to be selected on entering the editor)
  • Replacing Filter by Manufacturer with the modlist is optional

I believe the only missing v1.17 feature now is the procedural generation of engine type subCategories. I'm not having any luck at all with the part sorting so that may have to be delayed beyond v2 (indefinitely at this stage)

If you want anything else, now would be the time to ask

Link to comment
Share on other sites

Is it possible right now to set it up so I see all the parts except for a certain mod's (or resource/module)? I would love to be able to hide B9 except when building planes and such. If that's possible to add it would be my number 1 request. Otherwise such a great mod.

Link to comment
Share on other sites

FILTER{
CHECK
{
type = folder
value = B9_Aerospace
invert = true
}
}

Would get you all parts that don't exist in the B9 folder. With the new templating system (you need the 2.0 version), you can very easily set up a category that is exactly the opposite of the current B9 category so you don't get entirely drowned in parts


CATEGORY:NEEDS[B9_Aerospace]
{
name = Not B9 Aerospace
icon = B9_Aerospace
colour = #FF0047AB
all = true

FILTER
{
CHECK
{
type = folder
value = B9_Aerospace
invert = true
}
}

SUBCATEGORIES
{
list = 0,Pods
list = 1,Fuel Tanks
list = 2,Engines
list = 3,Command and Control
list = 4,Structural
list = 5,Aerodynamics
list = 6,Utility
list = 7,Science
}
}

Edited by Crzyrndm
Link to comment
Share on other sites

Ok cool. I guess it isn't possible to have multiple selected at a time though? At least I can make a couple for the biggest part packs or some combinations (No Aero, No Structural, No Station). Thanks!

  • Path check type allows any length of part url to be specified (extension of the folder type check which only matched the root GameData folder)

This would allow for value = B9_Areospace/Parts/Command right?

Link to comment
Share on other sites

So there is this wonderful mod here: http://forum.kerbalspaceprogram.com/threads/113111-0-90-Kerbal-Inventory-System-%28KIS%29-1-0-0

It tries to add its own category, which gets overwritten by filter extension, I think. How do I get this to work with Filter Extension?

Also, I am getting empty "Resource Mining and Processing" category.

Link to comment
Share on other sites

This would allow for value = B9_Areospace/Parts/Command right?

Should do so long as you stick to using forward slashes for folders (not Windows default backslash). I forgot about that, will be either in the next version

So there is this wonderful mod here: http://forum.kerbalspaceprogram.com/threads/113111-0-90-Kerbal-Inventory-System-%28KIS%29-1-0-0

It tries to add its own category, which gets overwritten by filter extension, I think. How do I get this to work with Filter Extension?

Also, I am getting empty "Resource Mining and Processing" category.

SubCategories from other mods:

I'm still getting an "EVA items" category created by KIS, a Parachutes category defined by RealChute, and a Hangar category defined by the Hangar mod. They will all sit below FE's subcategories in Filter by Function, but they are there just fine.

Empty subcategories:

*doh*. Empty check reactivated

Edited by Crzyrndm
Link to comment
Share on other sites

There shouldn't be any conflict with any other mod. As far as I know, Filter Extensions loading method is unique and shouldn't interfere with or be interfered with by any other mod *unless* the other mod specifically tries to interact (editing or removing existing categories). It's independent like that because I got sick of minor exceptions in other mods killing it off :mad: (The part categorizer is stupidly fragile and flakes out way too often)

Any exceptions logged?

Edited by Crzyrndm
Link to comment
Share on other sites

VERSION 2.0 RELEASE

  • Subcategories are now requested from the category and have order control. This is a breaking change. v1.x configs will need editing to work with v2.0 (distributed configs are updated obviously)
  • Added Path type Check, an extension of the folder check that matches any length of the part path from GameData
  • Editing and deleting subcategories is removed, all categories and subcategories are now exposed to configs directly
  • Redefining stock categories is done the same as any other category. Add: (type = stock) and your category will address the stock category of the same name. If you include: (value = replace) it will clear the existing subcategories before adding new ones
  • Added Category templates. Any subcategory added to a category has the template Checks added to it. Replaces mod type categories
  • Added a default category/subcategory to be selected upon opening the editor
  • Added option to not replace the manufacturers with the GameData folders in the Filter by Manufaturer Category
  • Added a way to edit the names and icons of procedural subcategories (Filter by Manufacturer, Resources, Engines)

v2.0 examples


{
[COLOR=#0000ff]// Normal stuff: name, icon, colour, etc.[/COLOR]
name = B9 Aerospace
icon = B9_Aerospace
colour = #FFF0F0F0
all = true
[COLOR=#0000ff] // type = engine, stock <-- valid types. Engine will add subcategories of all engine variants (based on propellant combinations). stock must be specified to edit stock categories
// value = replace <-- only valid value, only used with stock types[/COLOR]
[COLOR=#0000ff]// This is the template to be added to subcategories in this category. All CHECK nodes contained by the first FILTER node will be added to all Filters in all subcategories that are added[/COLOR]
FILTER
{
CHECK
{
type = folder
value = B9_Aerospace
}
}
[COLOR=#0000ff]// This is the subcategories listed by name. The number is the order they will appear in[/COLOR]
SUBCATEGORIES
{
list = 0,Pods
list = 1,Fuel Tanks
list = 2,Engines
list = 3,Command and Control
list = 4,Structural
list = 5,Aerodynamics
list = 6,Utility
list = 7,Science
}
}
CATEGORY:NEEDS[B9_Aerospace]


{
name = Filter by Function
type = stock [COLOR=#0000ff]// If this isn't present it will go and make a new category[/COLOR]
value = replace [COLOR=#0000ff]// Tells it to clear all existing subcategories and completely redefine the subcategories present. If not used, the listed subcategories will just be added to the end of the list[/COLOR]
[COLOR=#0000ff]// Refer to the first spoiler for details on templating and addressing subcategories. It's all the same[/COLOR]
}
CATEGORY


[COLOR=#0000ff]// Same stuff as v1.x, but the category is no longer specified[/COLOR]

name = Air Intake
icon = AirIntake
FILTER
{
CHECK
{
type = moduleName
value = ModuleResourceIntake
}
}
}
SUBCATEGORY{

Settings file located at: 000_FilterExtensions\PluginData\FilterExtensions\config.xml


<bool name="replaceFbM">1</bool> [COLOR=#0000ff]// 1 = Use mod folders in Filter by Manufacturer, 0 = Leave as Stock[/COLOR]
<string name="categoryDefault">Filter by Function</string> [COLOR=#0000ff]// The category to select on entering the editor (by name)[/COLOR]
<string name="subCategoryDefault">none</string> [COLOR=#0000ff]// The subcategory to select on entering the editor (by name)[/COLOR]
</config>
<config>


{
name = LiquidFuel/Oxidizer, Rockets [COLOR=#0000ff]// name = <originalName>, <newName>[/COLOR]
name = ElectricCharge/XenonGas, Ions
name = IntakeAir/LiquidFuel, Jets
name = SolidFuel, SRBs
name = MonoPropellant, MonoProp
}


PROCICONS [COLOR=#0000FF]// Replacing the target icons of subcategories generated by Filter Extensions. If the name is also redefined, use the new name to target the change[/COLOR]
{
icon = Rockets, EngineLFO [COLOR=#0000FF]// icon = <subCategoryName>, <iconName>[/COLOR]
icon = Ions, EngineIon
icon = Jets, EngineJet
icon = SRBs, EngineSolid
icon = MonoProp, EngineMono
}
PROCNAMES [COLOR=#0000ff]// Replacing the names of subcategories generated by Filter Extensions[/COLOR]


type = path
value = Squad/Parts\Ae [COLOR=#0000ff]// Both / & \ are valid directory seperators. Can cut off at any point[/COLOR]
}
CHECK{

NOTE: The placement number for the subcategories allows any value between 0 and 999. You do not need to specify them in order (eg. you can have 0, 3, 10, and 837). Specifying the same number twice will overwrite the earlier entry with the later one.

NOTE: Procedural categories will always list everything they generate. However you can specify any number of those categories like normal and the order of the specified categories will be respected. Anything not specified will be added to the end in random order

Edited by Crzyrndm
Link to comment
Share on other sites

Hmm.


[LOG 10:01:42.262] [Filter Extensions] Version 2.0
[LOG 10:01:42.511] [Filter Extensions] trusslrg duplicated part key in part path dictionary
[LOG 10:01:42.514] [Filter Extensions] trusslrg-adapter duplicated part key in part path dictionary
[LOG 10:01:42.519] [Filter Extensions] trusslrg-hub duplicated part key in part path dictionary
[LOG 10:01:42.642] [Filter Extensions] DLTLoXMixwingMountA duplicated part key in part path dictionary
[EXC 10:01:42.936] NullReferenceException: Object reference not set to an instance of an object
ListExtension.AddUniqueRange[String] (IList`1 list, IEnumerable`1 items)
FilterExtensions.ConfigNodes.customCategory.generateEngineTypes ()
FilterExtensions.ConfigNodes.customCategory.typeSwitch ()
FilterExtensions.ConfigNodes.customCategory..ctor (.ConfigNode node)
FilterExtensions.Core.Awake ()
UnityEngine.GameObject:AddComponent(Type)
AddonLoader:StartAddon(LoadedAssembly, Type, KSPAddon, Startup)
AddonLoader:StartAddons(Startup)
AddonLoader:OnLevelWasLoaded(Int32)

Can I get some clues to try and debug that? the truss parts are just a MM misconfig I've fixed, but not sure what the last bit is about.

Link to comment
Share on other sites

The duplicated messages should only happen if two parts have the exact same name, which shouldn't be possible in the first place. What happened there?

The nullref I'll just fix and make 2.0.1

Link to comment
Share on other sites

Huh. I have the parachute category from realchute too. Thought it was from this one. Wonder what makes KIS eva item not working then.

Could there be possible conflict with Quick Search?

im using quick search, hanger and kis with this and have no issues at all

Link to comment
Share on other sites

It sometimes behaves strangely with QuickScroll, but QuickSearch works fine.

Strangely how?

- - - Updated - - -

Version 2.0.2

  • Integrated pull request from dak180 integrating support for several mods and adding the ISRU category I forgot
  • Fixed a number of minor errors
  • Fixed a typo in the Lights subcategory

Link to comment
Share on other sites

Well here's a new one - this is all it's giving me, but it's blocking all functionality unsurprisingly.


[EXC 04:00:03.682] KeyNotFoundException: The given key was not present in the dictionary.
System.Collections.Generic.Dictionary`2[System.String,System.String].get_Item (System.String key)
FilterExtensions.Utility.PartType.checkFolder (.AvailablePart part, System.String[] values)
FilterExtensions.Utility.PartType.checkFolder (.AvailablePart part, System.String value)
FilterExtensions.ConfigNodes.Check.checkPart (.AvailablePart part)
FilterExtensions.ConfigNodes.Filter.checkFilter (.AvailablePart part)
FilterExtensions.ConfigNodes.customSubCategory.checkFilters (.AvailablePart part)
FilterExtensions.ConfigNodes.customSubCategory.<initialise>b__0 (.AvailablePart p)
System.Linq.Enumerable+<CreateWhereIterator>c__Iterator1D`1[AvailablePart].MoveNext ()
System.Collections.Generic.List`1[AvailablePart].AddEnumerable (IEnumerable`1 enumerable)
System.Collections.Generic.List`1[AvailablePart]..ctor (IEnumerable`1 collection)
System.Linq.Enumerable.ToList[AvailablePart] (IEnumerable`1 source)
EditorPartListFilterList`1[AvailablePart].GetFilteredList (System.Collections.Generic.List`1 list)
EditorPartList.RefreshPartList ()
EditorPartList.Refresh ()
EditorPartList.Refresh (State state)
PartCategorizer+.MoveNext ()

Link to comment
Share on other sites

Another silly mistake (atleast the stacktrace points right to it...), and yes any error at all normally ends up with the part selection UI being totally dead. It's the reason I had to move to my own initialisation method

v2.0.3

I wonder which part it failed to resolve a path for though...

Edited by Crzyrndm
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...