Jump to content

[1.3.0] Filter Extensions 3.0.4 (Jul 11)


Crzyrndm

Recommended Posts

Not really, definitely not if there's no issues with xEvilReeperx maintaining the plugin.

1) Not a fan of directly duplicating functionality of others (hence no active search or scroll functionality here)

2) Not familiar with the issue the plugin resolves

3) Not familiar with the system the plugin is fixing

4) Want to keep feature creep to a minimum here because of how fragile the part list is

Link to comment
Share on other sites

May I suggest to add more info on custom filter on 1st post (from source: isEngine, isCommand, adapter, multicoupler, crewCabin) as well as path/folder ?

What do you think about using subcategory of part, as it is not yet used by Squad but not discarded/rejected from config parser I guess ?

Link to comment
Share on other sites

Documentation update (more like rewrite, most of that is still from ~1.4)? Sounds like a good idea.

On your specific requests:

isEngine: is shorthand for a module check looking for (ModuleEngines OR ModuleEnginesFX OR MultiModeEngine). Not recommended for use, was implemented before multiple or'd variables per Check node was added (needed two/three seperate Filters to achieve originally)

isCommand: is shorthand for a module check looking for (ModuleCommand OR KerbalSeat). Not recommended for use, was implemented before multiple or'd variables per Check node was added

adapter: Returns true if the part has exactly 2 stack nodes, the nodes are of different sizes, and there is no ModuleCommand on the part

multicoupler: Returns true if there are multiple stack nodes at the same 'y' offset as the "last" stack node AND there is atleast one node in another y location AND the part doesn't register as a cargo bay

crewcabin: is shorthand for No ModuleCommand AND a non-zero crew capacity. Not recommended for use. Can be done with a combined module and crew check now (IIRC, the crew check wasn't implemented at that point)

Custom checks are implemented for logic that can't be easily achieved with the functionality that existed when they were introduced. There's no way to write the adapter/multi-coupler checks as it stands, but everything else has the required functionality now

folder: Matches parts based on their root GameData folder. "Squad" gets all parts in the Squad directory, "NASAMission" gets all the ARM parts, "" gets all parts located in GameData itself (or it should, I haven't actually checked that one).

path: Matches the start of the part path. "S" gets all parts in folders in Gamedata starting with an S, "Squad/" hits only the Squad folder, "Squad/Parts/Com" gets all the parts in the command and CompundParts folders in the Squad/Parts directory

What do you think about using subcategory of part, as it is not yet used by Squad but not discarded/rejected from config parser I guess ?

Subcategory could be done (or rather anything written into a part cfg can be used), but that would require people actively using it in their part configs. Functional filters don't rely on anything other than being able to recognise the purpose of a given part.

Edited by Crzyrndm
Link to comment
Share on other sites


{
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{


{
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]

Defining subcategories

SUBCATEGORY nodes define the title and icon of the tab, and contain the logic elements.

FILTER nodes are used to AND together a series of boolean checks. The results of multiple Filter nodes are OR'd together (A part only needs to match one Filter to be added to the subcategory)

CHECK nodes are the actual boolean checks to be performed. At the time of writing there are 15 check types.

The logic of the nodes can be expressed quite simply as: A part must pass all check's in any of the filter's to be accepted into the subcategory

Module title: The name of a module as seen ingame in the right click menu of a part (key : "moduleTitle")


{
type = moduleTitle
value = Command
}
CHECK

Matches the "Command" module listed in the expanded part info panel

UQZSkJa.jpg

Module name: The name of a module as used in cfg files (key: "moduleName")


{
type = moduleName
value = ModuleCommand
}
CHECK

Matches the "ModuleCommand" module in the part's cfg file


name = ModuleCommand
minimumCrew = 1
}
MODULE{

Part name: The part name as defined in it's cfg. This requires an exact match to return true. (key: "name")


{
type = name
value = Mark1Cockpit [COLOR=#0000ff]// <== No kidding, that's it's name in the cfg file...[/COLOR]
}
CHECK

Matches the part with the "name = Mark1Cockpit" line in it's cfg

name = Mark1Cockpit

Part title: The name of a part as seen ingame. This only requires a partial match to return true (so the value: "Cargo Bay" will return true on all stock Cargo Bays) (key: "title")


{
type = title
value = Mk1 Cockpit
}
CHECK

Matches the part that is called "Mk1 Cockpit" ingame

UQZSkJa.jpg

Resource: Check for resources contained within the part. The name to check by is again in the ingame right click menu of a part (key: "resource")


{
type = resource
value = Electric Charge
}
CHECK

Matches parts containing the EC resource

UQZSkJa.jpg

Propellant: Check for the propellant used by any engine type (key: "propellant")


{
type = propellant
value = LiquidFuel
}
CHECK

Matches engines using Liquid Fuel as one of its propellants

McZzDns.jpg

Technology: Check the technology required to access the part (key: "tech")


{
type = tech
value = veryHeavyRocketry
}
CHECK

Matches to parts using the "veryHeavyRocketry" tech node

Manufacturer: Check the part manufacturer (key: "manufacturer")


{
type = manufacturer
value = Kerbodyne
}
CHECK

Matches to parts manufactured by Kerbodyne

McZzDns.jpg

Folder: Checks against the root folder of a part in the gamedata directory, AKA by mod (key: "folder")


{
type = folder
value = NASAMission
}
CHECK

Matches to all parts located in the NASAMission directory in GameData

Path: Checks any length of the part path from the GameData folder (key: path; eg. Squad\Parts\A)


{
type = path
value = Squad/Parts/Com
}
CHECK

Matches all parts in the Squad/Parts/Command and Squad/Parts/CompoundParts directories

Category: Check against the part category as defined in the cfg (key: "category")


{
type = category
value = engine
}
CHECK

Matches all parts with the category defined as engine

Size: Check against the largest stack node in a part. -1 is radial, 0 is 0.625m parts, 1/2/3/* correspond to (val*1.25)m parts (key: "size")


{
type = size
value = 3
}
CHECK

Matches all parts with a size 3 (3.75m) attach node

Crew: Check against the crew capacity of a part


{
type = crew
value = 0
}
CHECK

Matches all parts that can't take any crew

Check: Used to group several different check types with OR logic


{
type = check
CHECK
{
type = moduleName
value = ModuleCommand
}
CHECK
{
type = crew
value = 1
}
}
CHECK

Matches all parts that have a command module OR a crew capacity of 1

Custom: These are checks I have implemented in code which would be difficult or impossible with the other check types


{
type = custom
value = adapter [COLOR=#0000ff]// Returns true if the part has exactly 2 stack nodes, the nodes are of different sizes, and there is no ModuleCommand on the part[/COLOR]
}

CHECK
{
type = custom
value = multicoupler [COLOR=#0000ff]// Returns true if there are multiple stack nodes at the same 'y' offset as the "last" stack node AND there is atleast one node in another y location AND the part doesn't register as a cargo bay[/COLOR]
}
CHECK

Check options


{
type = moduleName
value = ModuleEngines, ModuleEnginesFX [COLOR=#0000FF]// True if the part has either module. "ModuleEngines OR ModuleEnginesFX"[/COLOR]
}
CHECK


{
type = custom
value = multicoupler
invert = true [COLOR=#0000FF]// Inverts the result of the Check. This is a "NOT Multicoupler" Check[/COLOR]
}
CHECK


{
type = moduleName
value = ModuleEngines[COLOR=#0000FF]
[/COLOR] contains = false [COLOR=#0000FF]// returns true for parts with a module other than ModuleEngines. Most common use is combined with invert to specify parts that don't contain anything other than the listed values[/COLOR]
}
CHECK


{
[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]

Remembered to update the config details in the OP. It should be up to date with everything in the current release now.

Edited by Crzyrndm
Link to comment
Share on other sites

Thanks, believe it or not, I actually kept a seperate Stock-Only install...this will allow me to just filter to stock-parts-only for my kerbally needs :)

BTW, It seems that chutes aren't showing up in the Squad category. I do have RealChutes installed, don't know if that has anything to do with it...

Edited by Eleven
Link to comment
Share on other sites

BTW, It seems that chutes aren't showing up in the Squad category. I do have RealChutes installed, don't know if that has anything to do with it...

That's realchutes (Although I thought I had a MM patch that removed that. The way Stupid Chris does this prevents parachutes showing in any of my filters)

- - - Updated - - -

Version 2.0.4

  • Fixed a minor nullref
  • Fixed empty categories not being fully removed
  • Name and icon editing now works for all subcategories that don't have a related config entry (any subCat from another mod or stock, and any subcategories of this mod where no icon was specified)
  • Updated Real Chute patch

- - - Updated - - -

That's realchutes (Although I thought I had a MM patch that removed that...)

And..., it would appear that it has gone walk about. I'll just fix that... (EDIT: Nope, I'm just blind. If you have Real Chutes installed, parachute parts won't show in the utility subcategory)

Edited by Crzyrndm
Link to comment
Share on other sites

That's realchutes (Although I thought I had a MM patch that removed that. The way Stupid Chris does this prevents parachutes showing in any of my filters)

- - - Updated - - -

Version 2.0.4

  • Fixed a minor nullref
  • Fixed empty categories not being fully removed
  • Name and icon editing now works for all subcategories that don't have a related config entry (any subCat from another mod or stock, and any subcategories of this mod where no icon was specified)
  • Updated Real Chute patch

- - - Updated - - -

And..., it would appear that it has gone walk about. I'll just fix that... (EDIT: Nope, I'm just blind. If you have Real Chutes installed, parachute parts won't show in the utility subcategory)

Right on! Thanks for checking into it :)

Link to comment
Share on other sites

Right on! Thanks for checking into it :)

Sorry for the late reply, I didn't see the edited version until today :P

What's happening is that when stupid chris added the parachutes subcategory, he made some changes to parachutes so they wouldn't show in Squad category. However, Filter Extensions filters out any parts that don't appear in a stock category because it isn't normally used for parts (stock uses it for asteroids and a few other things that don't get shown). Instead I've just directly removed parachutes from the utility category if RC is installed (because the utility category is created by FE, doing so is much simpler than what chris would have had to do to achieve the same result).

If you want the parachutes to show in the Utility tab again, go to GameData/*FE Folder which I've fogotten the name of*/Configs/Patches/RealChute.cfg and remove the @SUBCATEGORY bit

EDIT

Or that would work if I hadn't screwed up. In the same file, you'll need to add the @ character I missed highlighted below


@PART
[*]:HAS[[COLOR=#ff0000][B]@[/B][/COLOR]MODULE[RealChuteModule]]:AFTER[RealChute]:NEEDS[RealChute]
{
@category = Utility
}

Edited by Crzyrndm
Link to comment
Share on other sites

If you want the parachutes to show in the Utility tab again, go to GameData/*FE Folder which I've fogotten the name of*/Configs/Patches/RealChute.cfg and remove the @SUBCATEGORY bit

EDIT

Or that would work if I hadn't screwed up. In the same file, you'll need to add the @ character I missed highlighted below


@PART
[*]:HAS[[COLOR=#ff0000][B]@[/B][/COLOR]MODULE[RealChuteModule]]:AFTER[RealChute]:NEEDS[RealChute]
{
@category = Utility
}

That did it! Thanks again :)

Link to comment
Share on other sites

Thanks! Thats awesome, was just about to post something about this.

In the mean time as a work around, the parts can still be accessed if you filter by Tech Level.

They will be in any category that wasn't made by FE (by module and tech with the distributed configs) and subcats made by other mods (this is why they're using the none category I assume, like real chutes they made their own)

- - - Updated - - -

This should fix the IR Rework and KIS parts not showing

@SUBCATEGORY[Utility]:FOR[FilterExtension]
{
@FILTER,0
{
CHECK
{
type = moduleName
value = MuMechToggle, ModuleKISItem
invert = true
}
}
}

@PART
[*]:HAS[MODULE[@MuMechToggle]]:FOR[FilterExtension]
{
@category = Utility
}

@PART
[*]:HAS[MODULE[@ModuleKISItem]]:FOR[FilterExtension]
{
@category = Utility
}

Edited by Crzyrndm
Link to comment
Share on other sites

They will be in any category that wasn't made by FE (by module and tech with the distributed configs) and subcats made by other mods (this is why they're using the none category I assume, like real chutes they made their own)

- - - Updated - - -

This should fix the IR Rework and KIS parts not showing

@SUBCATEGORY[Utility]:FOR[FilterExtension]
{
@FILTER,0
{
CHECK
{
type = moduleName
value = MuMechToggle, ModuleKISItem
invert = true
}
}
}

@PART
[*]:HAS[MODULE[@MuMechToggle]]:FOR[FilterExtension]
{
@category = Utility
}

@PART
[*]:HAS[MODULE[@ModuleKISItem]]:FOR[FilterExtension]
{
@category = Utility
}

Awesome! Thanks for that

Link to comment
Share on other sites

Awesome! Thanks for that

No problem. If anyone else does this as well just let me know (should only be for mods that add their own subcat to Filter by Function). I don't tend to see them due to limited time and very tight part mod selection (I have just 2 small part packs in my modded install) but it only takes a few minutes browsing the repository of the affected mod to whip up the required configs (although IR took a bit longer because their structure was a bit odd)

Edited by Crzyrndm
Link to comment
Share on other sites

They will be in any category that wasn't made by FE (by module and tech with the distributed configs) and subcats made by other mods (this is why they're using the none category I assume, like real chutes they made their own)

- - - Updated - - -

This should fix the IR Rework and KIS parts not showing

@SUBCATEGORY[Utility]:FOR[FilterExtension]
{
@FILTER,0
{
CHECK
{
type = moduleName
value = MuMechToggle, ModuleKISItem
invert = true
}
}
}

@PART
[*]:HAS[MODULE[@MuMechToggle]]:FOR[FilterExtension]
{
@category = Utility
}

@PART
[*]:HAS[MODULE[@ModuleKISItem]]:FOR[FilterExtension]
{
@category = Utility
}

Thanks for this hotfix. Am I right in thinking that this puts all IR parts back into Utilities if FE is installed (and therefore prevents the custom tabs from appearing)?

Link to comment
Share on other sites

The patch does two things:

1) Changes the category of all parts that would only end up in the subcat created by the relevant plugin to one FE doesn't filter out.

2) Removes those parts from displaying in the Utility subcat created by FE.

This keeps the layout of parts in stock subcats exactly the same as when FE isn't installed, but allows those parts to appear in any other category created by FE. If you want to let them show in Utility as well, just remove the @SUBCATEGORY section

Link to comment
Share on other sites

  • 2 weeks later...

So uh, how many people know that combined filters (parts meeting the requirements of multiple filters) are a thing in stock?

8nB2sOn.png

Right click on another category, select subcategories from both at the same time

This I could have done with knowing about months ago...

Link to comment
Share on other sites

v2.0.5

  • KSP v1.0 compatility
  • subcategory deletion is back, only applies to subcategories not created by FE
  • Rename and changing icons can now be applied to all subcategories not created by FE as well as procedural FE subcateories (eg. engines)

proper documentation of changes once I've finished 1.0 compatibility checks :P

Link to comment
Share on other sites

v2.0.5

  • KSP v1.0 compatility
  • subcategory deletion is back, only applies to subcategories not created by FE
  • Rename and changing icons can now be applied to all subcategories not created by FE as well as procedural FE subcateories (eg. engines)

proper documentation of changes once I've finished 1.0 compatibility checks :P

Sweet thanks for the quick update! cannot operate without this mod =D

Link to comment
Share on other sites

v2.1.0

  • Checked over the distributed configs for KSP 1.0 compatibility (ore and ablator resources get a proper icon now, ISRU category shows up, etc.)
  • Added bulkhead (cross-section/profile) check type
  • Added less than/greater than functionality for numeric part stats (NOTE: values are interpreted as integers, don't try and use fractional values)
  • Added mass, cost, crashTolerance, and max Temperature checks

Equality

Check nodes can now have the equality to be applied to numeric check specified. If none is specified, Equals will be used

CHECK
{
///
equality = Equals/LessThan/GreaterThan
///
}

New Checks


type = profile // bulkhead Profiles as specified in the part cfgs
type = mass
type = cost
type = crash // crash tolerance
type = maxTemp

Link to comment
Share on other sites

Hi,

I'm back (sort of). and I will release a new set of icons (some of this will be bases on Alternate resource icons, so you should give credit to them if you use them).

I''ve been keeping a personal cfg files for me (something I liked different than in the "official" version). But in general I really like the original :).

I just have a few questions:

- I saw that you remove specific tanks and I think that becasue you prefer to use the resource panel. Which is fine...until you have lots of different resources (which is my case for a heavy moded ksp). So I still keep some tanks (mostly fuel resources: fuel: oxydyzer, mono, xenon, argon, karbonite, k+, life support). I have no problem with this way on going, since I have plenty of room in the ISRU section to add my tanks. If I'm correct I will not bother sending you my cfg. I've seen that you have used the icons I made for resource tank to the resource itself. I will send you proper icons for those resources whici look better than the one intended for tanks

- Autocategories for engines generate some things a little akward. Karbonite is the best example. It creates icon for karbonite engines and another for karbonite+intake. Which is fine (more than that it's great) but my problem is that karbonite engines included all the engines even those that require atm to work which is odd. Also it makes something odd with nuclear engines. They require only jetfuel (not air) but they are included in jet engines (well, this is a renaming for "IntakeAir/LiquidFuel" category. Again: GREAT this renaming issue)

- Finally I'm having something really odd with some of roverdude mods (karbonite and karbonite plus). Somehow they are included in "gamedata" mod, even if they are in the UmbraSpaceIndustries folder. Anyone else with this problem?

Link to comment
Share on other sites

- I saw that you remove specific tanks and I think that becasue you prefer to use the resource panel. Which is fine...until you have lots of different resources (which is my case for a heavy moded ksp). So I still keep some tanks (mostly fuel resources: fuel: oxydyzer, mono, xenon, argon, karbonite, k+, life support). I have no problem with this way on going, since I have plenty of room in the ISRU section to add my tanks. If I'm correct I will not bother sending you my cfg. I've seen that you have used the icons I made for resource tank to the resource itself. I will send you proper icons for those resources whici look better than the one intended for tanks

- Autocategories for engines generate some things a little akward. Karbonite is the best example. It creates icon for karbonite engines and another for karbonite+intake. Which is fine (more than that it's great) but my problem is that karbonite engines included all the engines even those that require atm to work which is odd. Also it makes something odd with nuclear engines. They require only jetfuel (not air) but they are included in jet engines (well, this is a renaming for "IntakeAir/LiquidFuel" category. Again: GREAT this renaming issue)

- Finally I'm having something really odd with some of roverdude mods (karbonite and karbonite plus). Somehow they are included in "gamedata" mod, even if they are in the UmbraSpaceIndustries folder. Anyone else with this problem?

1) The resources tab is being auto-generated from all the resources it can find now, so all it should need is being pointed to the correct icons and a few renames (ie. updates to the NamesAndIcons.cfg), or did I miss something?

2) I need to look into this, the engines are only meant to match to the exact combination, but some of them obviously aren't

3) Roverdude may be adding his own subcategories to that tab. If he is, it's probably better to add the autogenerated UmbraSpaceIndustries one to the delete list

i seem to be having an issue where some of my mods dont show up in the filter by mod tab http://i.imgur.com/MkMsEQh.jpg heres my Output.log

ugh, looks like I broke the icon loader again...

EDIT

Can you try with this version please

Edited by Crzyrndm
Link to comment
Share on other sites

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