Jump to content

[1.3.0] Filter Extensions 3.0.4 (Jul 11)


Crzyrndm

Recommended Posts

Removing subcategories:

FilterRemove
{
remove = <name of subcategory to remove>
}

I can not get this to work.

If I write

FilterRemove
{
remove = Kolonization
}

then in the game will be only one category 'Kolonization'. Deletes all the others, except this.

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...

Howdy folks,

For my own convenience I've added "Fuel Tanks" between "Kerbonauts & Control" and "Engines", as follows:

CATEGORY{
name = Fuel Tanks
icon = stockIcon_fueltank
colour = #FF90F090
all = true

SUBCATEGORIES
{
list = 0,LFO Tank [0.625m]
list = 1,LFO Tank [1.25m]
list = 2,LFO Tank [2.5m]
list = 3,LFO Tank [3.75m]
list = 4,Liquid Fuel Tank
list = 5,Oxidizer Tank
list = 6,Monopropellant Tank
list = 7,Xenon Gas Tank
list = 8,Radial Tank
}
}


SUBCATEGORY
{
name = LFO Tank [0.625m]
icon = cs_size0

FILTER
{
CHECK
{
type = category
value = Fuel Tanks
}
CHECK
{
type = profile
value = size0
}
CHECK
{
type = resource
value = LiquidFuel
}
CHECK
{
type = resource
value = Oxidizer
}
}
}

SUBCATEGORY
{
name = LFO Tank [1.25m]
icon = cs_size1

FILTER
{
CHECK
{
type = profile
value = size1
}
CHECK
{
type = category
value = Fuel Tanks
}
CHECK
{
type = resource
value = LiquidFuel
}
CHECK
{
type = resource
value = Oxidizer
}
}
}

SUBCATEGORY
{
name = LFO Tank [2.5m]
icon = cs_size2

FILTER
{
CHECK
{
type = profile
value = size2
}
CHECK
{
type = category
value = Fuel Tanks
}
CHECK
{
type = resource
value = LiquidFuel
}
CHECK
{
type = resource
value = Oxidizer
}
}
}


SUBCATEGORY
{
name = LFO Tank [3.75m+]
icon = cs_size3

FILTER
{
CHECK
{
type = profile
value = size3,size4,size5,size6
}
CHECK
{
type = category
value = Fuel Tanks
}
CHECK
{
type = resource
value = LiquidFuel
}
CHECK
{
type = resource
value = Oxidizer
}
}
}


SUBCATEGORY
{
name = Liquid Fuel Tank
icon = R&D_node_icon_fuelsystems

FILTER
{
CHECK
{
type = category
value = Fuel Tanks
}
CHECK
{
type = resource
value = LiquidFuel
}
CHECK
{
type = resource
value = Oxidizer
invert = true
}
}
}


SUBCATEGORY
{
name = Oxidizer Tank
icon = fuels_oxidizer

FILTER
{
CHECK
{
type = category
value = Fuel Tanks
}
CHECK
{
type = resource
value = LiquidFuel
invert = true
}
CHECK
{
type = resource
value = Oxidizer
}
}
}


SUBCATEGORY
{
name = Monopropellant Tank
icon = fuels_monopropellant

FILTER
{
CHECK
{
type = category
value = Fuel Tanks
}
CHECK
{
type = resource
value = MonoPropellant
}
}
}




SUBCATEGORY
{
name = Xenon Gas Tank
icon = fuels_xenongas

FILTER
{
CHECK
{
type = category
value = Fuel Tanks
}
CHECK
{
type = resource
value = XenonGas
}
}
}


SUBCATEGORY
{
name = Radial Tank
icon = cs_surface


FILTER
{
CHECK
{
type = category
value = Fuel Tanks
}
CHECK
{
type = profile
value = srf
}
}
}


All works well, except for the Radial Tanks category which simply returns all items of type "Fuel Tank". I'm using the filtering method employed in 00_FilterExtensions Configs/SubCategories_Bulkhead.cfg, which seems to have similar issues.

I also tried:

CHECK
{
type = bulkheadProfiles
value = srf
}

which didn't work (matches nothing), as does trying value = *srf*. bulkheadProfiles seems to be an array, since it's often initialized with something like:

bulkheadProfiles = size1, srf

I'm not sure if a CHECK {} block can query an array, if that's what it is. So basically, what's the best way to filter for surface-connected items?

Link to comment
Share on other sites

It does query the entire array (see: Mk2-Mk3 adapter, Mk2-1.25m adapters, etc.), the issue you're having goes a little deeper than that.

  • It looks like most of the stock tanks have srf as a part of their profile
  • If a part doesn't have any profile defined, it gets tossed in the srf category as well

The solution to the first problem is probably an extra check to block parts that have profiles other than srf

type = profile
value = srf
contains = false // part has a value not in the list
invert = true // block part if above conditions are met

^^ Will work for the majority of stock tanks as they all appear to have a profile definition. However, it will only find blister tanks and I can't currently think of a way to handle dedicated radial booster tanks (ie. no top node, meant to be radial attached)

Link to comment
Share on other sites

I screwed up the 1.0.5 release packaging and missed all the configs and icons that had been submitted through github since the previous release. Version bumped to 2.4.1.2 with all contributions included, and my apologies to kerbas_ad_astra and WCapelle for initially missing your contributions

Link to comment
Share on other sites

Crzyrndm,

there is something strange going on. I'm the maintainer of WASDEditorCameraContinued.

When I install WASD by itself, everything is fine. But, when I install FilterExtensions (with the default config) via CKAN, the WASD button goes white (ie: it can't be loaded for some reason). This image from another user shows the problem:

http://www.dropbox.com/s/2t2gcyb6gt4w8qh/missicon.jpg?dl=0

I assume you have a number of ModuleManager configs, I can only assume that one of them is either overwriting or deleting my icon.

Edit: After some testing, I narrowed it down to your dll. No idea what is going on

Edited by linuxgurugamer
Link to comment
Share on other sites

  • 2 weeks later...
[quote name='Crzyrndm']All the things that make changes are in subdirectories of [URL="https://github.com/Crzyrndm/FilterExtension/tree/master/GameData/000_FilterExtensions%20Configs"]this[/URL] 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 [B]categories[/B] are individual .cfg's inside the "default" subdirectory. If you don't want it, delete it.
The additional [B]subcategories[/B] in Filter by Function are in the [URL="https://github.com/Crzyrndm/FilterExtension/blob/master/GameData/000_FilterExtensions%20Configs/Default/StockCategories.cfg#L1-L17"]StockCategories.cfg[/URL] (along with the improved cross section and resources categories)
The replacement [B]subcategories[/B] in Filter by Function are [URL="https://github.com/Crzyrndm/FilterExtension/blob/master/GameData/000_FilterExtensions%20Configs/StockRework/FilterbyFunction.cfg#L1-L16"]here[/URL]. Just remove that folder if you want the stock layout

Filter Extensions uses two root config node types, CATEGORY and SUBCATEGORY
[URL="https://github.com/Crzyrndm/FilterExtension/blob/master/GameData/000_FilterExtensions%20Configs/Default/Mod_B9.cfg"]CATEGORY[/URL] 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 subcategories
[URL="https://github.com/Crzyrndm/FilterExtension/blob/master/GameData/000_FilterExtensions%20Configs/SubCategories_Stock.cfg#L1-L14"]SUBCATEGORY[/URL] 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;dr
Once 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)

[B]Writing a set of FILTER nodes to get the parts you want:[/B]
Using the [URL="https://github.com/Crzyrndm/FilterExtension/blob/master/GameData/000_FilterExtensions%20Configs/SubCategories_Stock.cfg#L155-L174"]Electric Charge[/URL] 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 [B]must[/B] have storage for the [URL="https://github.com/Crzyrndm/FilterExtension/blob/master/GameData/000_FilterExtensions%20Configs/SubCategories_Stock.cfg#L164"]resource[/URL] Electric Charge [URL="https://github.com/Crzyrndm/FilterExtension/blob/master/GameData/000_FilterExtensions%20Configs/SubCategories_Stock.cfg#L167"]and[/URL] [B]must[/B] [URL="https://github.com/Crzyrndm/FilterExtension/blob/master/GameData/000_FilterExtensions%20Configs/SubCategories_Stock.cfg#L171"]not[/URL] be a part that only has EC storage as buffer (through experimentation this was determined to be [URL="https://github.com/Crzyrndm/FilterExtension/blob/master/GameData/000_FilterExtensions%20Configs/SubCategories_Stock.cfg#L170"]engines, command modules, and generators[/URL])
If you're familiar with any programming languages, that would typically be expressed something like this
[code]result = hasResource("ElectricCharge") && !hasModule("ModuleCommand" || "ModuleEngines" || "ModuleEnginesFX" || "ModuleGenerator");[/code]
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. [URL="https://github.com/Crzyrndm/FilterExtension/blob/master/GameData/000_FilterExtensions%20Configs/SubCategories_Control.cfg#L166-L192"]Manned Command[/URL], 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 now

The 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 [URL="https://github.com/Crzyrndm/FilterExtension/blob/master/FilterExtension/ConfigNodes/Check.cs#L220-L261"]code[/URL] that handles the type)[/QUOTE]

Absolutely fantastic mod---made even better by your clear explanations! I was having some difficulty understanding the relationship between categories and subcategories, until the above post cleared up all of my confusion and answered all of my questions. I'd actually suggest cutting-and-pasting it into the OP, perhaps under "further explanation"-type spoiler tags: I think it will fill in some of the gaps in understanding how to configure things for more people than just myself :)

Thanks for your work on this great tool!
Link to comment
Share on other sites

  • 2 weeks later...

hi,

i checked some pages now as well as different mods, but i cant find a hint, so i end up asking:

from time to time i lose my 2nd column / categories when i "revert to SPH / VAB" leaving me no option to select any part. Leaving to KSC and returning to the building "fixes" it.

Any idea what could be causing this? Or is it even already known? I really could'nt find anything.

Thanks for any hints.

Modlist:

Spoiler

KSP: 1.0.5 (Win32) - Unity: 4.6.4f1 - OS: Windows 8.1  (6.3.9600) 64bit
Filter Extensions - 2.4.1.3
AutoAsparagus - 1.1
Chatterer - 0.9.7.86
Community Resource Pack - 0.4.7
Connected Living Space - 1.2.0.1
Contract Configurator - 1.8.3
Contracts Window Plus - 1.0.5.5
Firespitter - 7.1.5
Interstellar Fuel Switch - 1.18
Kerbal Attachment System - 0.5.5
Kerbal Engineer Redux - 1.0.19.2
Kerbal Joint Reinforcement - 3.1.4
InlineBallutes - 1.2.2
Kerbal Inventory System - 1.2.3
KSP-AVC Plugin - 1.1.5
KW-Rocketry-Community-Fixes - 0.4.1
Mach Gauge - 3.0
Modular Rocket Systems - 1.11
QuickScroll - 1.3.2
QuickStart - 1.1.2
RCS Build Aid - 0.7.4
RCS Sounds - 4.3
SCANsat - 1.1.4.4
ShipManifest - 4.4.2
TextureReplacer - 2.4.11
Transfer Window Planner - 1.4
TweakScale - 2.2.5
UbioWeldingLtd 1.0.5 Release - 2.2.2
KSP Interstellar Extended - 1.6.1
WildBlueTools - 1.0.24

 

Edited by Speadge
Link to comment
Share on other sites

I know I've figured this out before but for the life of me I can't figure out where Squad is storing some of their icons. I'm looking for the icons used in the stock categories, like Pods, Engines, etc. In FE they are referred to as stockIcon_*.

Where are they stored? I'm thinking maybe they are part of an asset file? If so can anyone list the names or better, provide a link that shows a pic and their names?

Edited by mreadshaw
Link to comment
Share on other sites

Some are in an asset file, the rest are in Squad / PartList / SimpleIcons. The following was a complete list, I think it's missing a few now

Spoiler

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

NOTE: These are the names used to address the icons in FE configs. From memory, the "stockicon_" is something I tagged some of them with to reduce crossovers

Edited by Crzyrndm
Link to comment
Share on other sites

  • 3 weeks later...

I try and avoid excessive proliferation of categories in the main distribution, so I don't feel like either of the requests should be integrated. However:

8 hours ago, WuphonsReach said:
  • Decouplers could be broken down into radial / stack

MM patch to split stack/radial decouplers:

@CATEGORY[Filter?by?Function]:FINAL // user customisation
{
	!SUBCATEGORIES {} // delete existing node
	SUBCATEGORIES
	{
		list = 100,Adapter
		list = 101,Multi-Coupler
		list = 102,Stack Decouplers // split decouplers into stack and radial decouplers
		list = 103,Radial Decouplers
		list = 104,Docking Ports
		list = 105,Control Surface
		list = 106,Air Intake
		list = 107,Landing Gear
		list = 108,Landing Legs
		list = 109,Solar Panels
		list = 110,Power Storage
		list = 111,Data Transmitter
	}
}

+SUBCATEGORY[Decouplers] // copy existing config
{
	@name = Stack Decouplers
	@Filter
	{
		CHECK // not surface attachable
		{
			type = profile
			value = srf
			invert = true
		}
	}
}
@SUBCATEGORY[Decouplers] // copy existing config
{
	@name = Radial Decouplers
	@Filter
	{
		CHECK // not surface attachable
		{
			type = profile
			value = srf
		}
	}
}
8 hours ago, WuphonsReach said:
  • Science Parts / Data Transmitter could be broken down into omnidirectional and directional
  • There's no category for fuel tanks or storage tanks?
  • Remote Tech specific parameters aren't currently accessible
  • Any install should have a fuel tanks subcategory in Filter by Function as the second or third entry, and the default pack also includes a Fuel tanks category and subcategories with a more specific breakdown. If you don't have these I need to see logs and a MM cache
Link to comment
Share on other sites

  • 2 weeks later...

This Mod makes the building of my vessels much easier :D

but i have too many parts and want to change some things with the Categories/supcategories.

After Hours of reading and trying....

i want to delete mod-parts from the utility-category using:

000_FilterExtensions Configs->SubCategories_Stock.cfg

(Like Targa posted Juli 17.)

SUBCATEGORY
{
    name = Utility
    icon = stockIcon_utility

    FILTER
    {
        CHECK
        {
            type = title
            value = Umbra Space Industries
            invert = true
        }

tried it with different 'value' names (UmbraSpaceIndustries or USI), it wont work...

and on other thing is, why i have more categories in the VAB/SPH then in the 'Default'-Folder.

For Example the UmbraSpaceIndustries Mods uses a Rover, a Kolonization and a third (dont remember what is was) Category. In the Discription from Juli 29th 2015: 'All of the extra categories are individual .cfg's inside the "default" subdirectory. If you don't want it, delete it.' But there are no such .cfg.

I understand how to make an UmbraSpaceIndustries Kategory and it works perfect, but than i dont need the Rover, Kolonization Categories anymore.

Thank You!

 

Link to comment
Share on other sites

Possibly the extra categories are created by the USI mods rather than FE (either through code or an FE .cfg in the USI directory). If it's in code (quite likely), then FE is not able to do anything about them (It did at one point, but removing non-stock additions was a buggy nightmare...)

As for removing USI parts from Utility, try basing the filtering on the folder, not the name

@SUBCATEGORY[Utility]
{
	@FILTER,*
    {
    	CHECK
        {
        	type = folder
            value = USI
            invert = true
        }
    }
}

 

Edited by Crzyrndm
Link to comment
Share on other sites

12 hours ago, Crzyrndm said:

Possibly the extra categories are created by the USI mods rather than FE (either through code or an FE .cfg in the USI directory). If it's in code (quite likely), then FE is not able to do anything about them (It did at one point, but removing non-stock additions was a buggy nightmare...)

As for removing USI parts from Utility, try basing the filtering on the folder, not the name


@SUBCATEGORY[Utility]
{
	@FILTER,*
    {
    	CHECK
        {
        	type = folder
            value = USI
            invert = true
        }
    }
}

 

Thanks for the support!!

The filtering on the folder works fine, of course :D Saw on the github wiki that there are even more filtering possibilities. I will try them, for the perfect category experience.

With the extra categories, i will search in the folders and try around, or ask in the USI-forums.

Great MOD Crzyrndm!

Link to comment
Share on other sites

On 09.01.2016 at 7:12 PM, JohnMcLane said:

 

I understand how to make an UmbraSpaceIndustries Kategory and it works perfect, but than i dont need the Rover, Kolonization Categories anymore.

Yeah, I really wanted to do it. As a result, I have just downloaded the source of USI_Tools, KIS and InfernalRobotics mods and removed the function that creates subcategories 'Robotic Parts', 'Eva Items', 'Freight' and 'Kolonization'.

But it is very bad and inconvenient way. It would be nice to do it somehow easier.

If you need ithere my edited USITools.dll v0.5.4 without creating unnecessary categories 'Freight', 'Kolonization', 'Rover' e.t.c. Do not forget to fix the parts cfg 'category = none' to something else.

Edited by Helmut
Link to comment
Share on other sites

4 hours ago, skYman said:

Is there an option to show all researched but not yet bought parts by default in career mode? If I filter by module they show up, if I filter by function, they don't. Any way to enable it for every filter?

In the space centre scene, there is a rather non-descript black rectangular window like icon in the applauncher. There is a toggle in there to hide/show the unpurchased parts. Filter by Module is unaffected because it's still built by the stock system while Function is outright replaced by FE for maximum ease of use

1 hour ago, Helmut said:

Yeah, I really wanted to do it. As a result, I have just downloaded the source of USI_Tools, KIS and InfernalRobotics mods and removed the function that creates subcategories 'Robotic Parts', 'Eva Items', 'Freight' and 'Kolonization'.

But it is very bad and inconvenient way. It would be nice to do it somehow easier.

After 1.1, FE features are going to be heavily re-evaluated with changes really depending on how much KSP changes. I would like to bring back the removal functionality, but only if I can make a more stable implementation (and if it does come back, it will be much more tightly controlled...)

Link to comment
Share on other sites

24 minutes ago, Crzyrndm said:

In the space centre scene, there is a rather non-descript black rectangular window like icon in the applauncher. There is a toggle in there to hide/show the unpurchased parts. Filter by Module is unaffected because it's still built by the stock system while Function is outright replaced by FE for maximum ease of use

After 1.1, FE features are going to be heavily re-evaluated with changes really depending on how much KSP changes. I would like to bring back the removal functionality, but only if I can make a more stable implementation (and if it does come back, it will be much more tightly controlled...)

Now that I read it, the way it works makes complete sense to me :blush: Thank you for clearing that up and also thank you for your work on this nifty mod.

Link to comment
Share on other sites

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