linuxgurugamer

[1.7.2] Filter Extensions (No localization)

Recommended Posts

You guys beat me to it. I wondered for the longest time why certain mods wouldnt show the categories. Glad to know you guys are up on trying to get Breaking Ground parts going.

Share this post


Link to post
Share on other sites
10 hours ago, Iso-Polaris said:

With the new breaking groud update, the new stock catagries will be missing if this mod is to be installed

 

4 hours ago, dxeh said:

I Second @Iso-Polaris

Filter Extention will need to be updated for breaking ground

 

Noted

Share this post


Link to post
Share on other sites
Posted (edited)
20 hours ago, linuxgurugamer said:

Noted

I across of the same issue and see that is already reported. Don't know if it will be of any help, but when you have IR mod installed, it create additional robotic category.
Without filter extension, you have two robotic icons and two robotic category. Stock category contains only stock robotic parts. I assume that new stock robotic category have different name, but haven't checked yet.

When you install filter extension, only category from IR mod is shown and it contains only robotic parts from IR mod.

Not sure if those info will be of any help, but better to have more info than none.

EDIT:

Also noticed some Nullreference error when coming back from game to main menu, before exit to desktop. It does not show from which mod it comes from, it may or may not comes from Filter extensions mod. I just noticed this and it seems that same does not happen without Filter Extensions mod. But, that is just speculation for now. I have to do more testing to confirm this.

 

Edited by kcs123

Share this post


Link to post
Share on other sites

I've started working on this

Share this post


Link to post
Share on other sites

New release, 3.2.3 for KSP 1.7.1 only

  • Fixed for new categories in KSP 1.7.1
    • Note:  The Filter by Function has been changed from a replace to an append with all the identical lines with stock commented out
    • Note 2: This version is only compatible with 1.7.1 and future

Share this post


Link to post
Share on other sites
4 hours ago, linuxgurugamer said:

New release, 3.2.3 for KSP 1.7.1 only

  • Fixed for new categories in KSP 1.7.1
    • Note:  The Filter by Function has been changed from a replace to an append with all the identical lines with stock commented out
    • Note 2: This version is only compatible with 1.7.1 and future

Just installed 3.2.3, new categories still not showing.

Share this post


Link to post
Share on other sites
5 hours ago, linuxgurugamer said:

New release, 3.2.3 for KSP 1.7.1 only

  • Fixed for new categories in KSP 1.7.1
    • Note:  The Filter by Function has been changed from a replace to an append with all the identical lines with stock commented out
    • Note 2: This version is only compatible with 1.7.1 and future

Is the 000_FilterExtensions_Configs folder supposed to be removed?

Share this post


Link to post
Share on other sites
3 hours ago, HebaruSan said:

Is the 000_FilterExtensions_Configs folder supposed to be removed?

No

5 hours ago, MaxPeck said:

Just installed 3.2.3, new categories still not showing.

Please verify that you are running 3.2.3.  It appears that CKAN installed the previous version when I just tried installing it, and actually, CKAN is not listing the new version yet

 

Share this post


Link to post
Share on other sites

It appears that the build is missing the 000_FilterExtensions_Configs and zFinal_FilterExtensions folders, I'll get that fixed.  This would cause CKAN to not show the new, updated version.  Also, even a manual install would have the same issue

Share this post


Link to post
Share on other sites

New release, 3.2.3.1

  • Version bump because of a bad build

Note:  Icons need updating

If anyone is good at icons, I need some new icons for these categories, size is 32x32:

  • New icons needed for the new Cargo subcategories:
    • Containers
    • Science
  • New icons needed for the new Robotics subcategories
    • Rotation
    • Controller
    • Servos
    • Hinges
    • Pistons
    • Rotors
    • Rotation Servo

Share this post


Link to post
Share on other sites
7 hours ago, linuxgurugamer said:

 

Please verify that you are running 3.2.3.  It appears that CKAN installed the previous version when I just tried installing it, and actually, CKAN is not listing the new version yet

 

Running 3.2.3 and don't use CKAN, but it looks like you've got it sorted.  As always, you da man.

Share this post


Link to post
Share on other sites

I fixed the issue of stock categories not working as replacers.

I deleted every single config file except for SubCategories_Stock and FilterByFunction.

Still didn't work. So I sorted the filter by functions to Squad default. Then I went through SubCategories_Stock, figuring it might be some kind of load order issue, and sorted those to the same order as defined in FilterByFunction.

It was then that I realized that...

SubCategories_Stock doesn't define the subcategory "Payload." I added it in and everything works as it should in replacing stock categories.

Share this post


Link to post
Share on other sites
19 minutes ago, Optical_Tyranno said:

I fixed the issue of stock categories not working as replacers.

I deleted every single config file except for SubCategories_Stock and FilterByFunction.

Still didn't work. So I sorted the filter by functions to Squad default. Then I went through SubCategories_Stock, figuring it might be some kind of load order issue, and sorted those to the same order as defined in FilterByFunction.

It was then that I realized that...

SubCategories_Stock doesn't define the subcategory "Payload." I added it in and everything works as it should in replacing stock categories.

Including the robotics?

Share this post


Link to post
Share on other sites
24 minutes ago, Optical_Tyranno said:

I fixed the issue of stock categories not working as replacers.

I deleted every single config file except for SubCategories_Stock and FilterByFunction.

Still didn't work. So I sorted the filter by functions to Squad default. Then I went through SubCategories_Stock, figuring it might be some kind of load order issue, and sorted those to the same order as defined in FilterByFunction.

It was then that I realized that...

SubCategories_Stock doesn't define the subcategory "Payload." I added it in and everything works as it should in replacing stock categories.

Ummm, I just checked, and I do see a SUBCATEGORY for Payload in that file, around line 200:

SUBCATEGORY
{
	name = Pods
	icon = stockIcon_pods
	
	FILTER
	{
		CHECK
		{
			type = category
			value = Pods
		}
	}
}
SUBCATEGORY
{
	name = Fuel Tanks
	icon = stockIcon_fueltank
	
	FILTER
	{
		CHECK
		{
			type = category
			value = Fuel Tanks
		}
	}
}
SUBCATEGORY
{
	name = Engines
	icon = stockIcon_engine
	
	FILTER
	{
		CHECK
		{
			type = category
			value = Engines
		}
	}
}
SUBCATEGORY
{
	name = Command and Control
	icon = stockIcon_cmdctrl
	
	FILTER
	{
		CHECK
		{
			type = category
			value = Control
		}
	}
}
SUBCATEGORY
{
	name = Structural
	icon = stockIcon_structural
	
	FILTER
	{
		CHECK
		{
			type = category
			value = Structural
		}
	}
}
SUBCATEGORY
{
	name = Robotics
	icon = serenityIcon_robotics
	
	FILTER
	{
		CHECK
		{
			type = category
			value = XenonGas
		}
	}
}

SUBCATEGORY
{
	name = Aerodynamics
	icon = stockIcon_aerodynamics
	
	FILTER
	{
		CHECK
		{
			type = category
			value = Aerodynamics
		}
	}
}
SUBCATEGORY
{
	name = Utility
	icon = stockIcon_utility
	
	FILTER
	{
		CHECK
		{
			type = category
			value = Utility
		}
	}
}
SUBCATEGORY
{
	name = Science
	icon = stockIcon_science
	
	FILTER
	{
		CHECK
		{
			type = category
			value = Science
		}
	}
}
SUBCATEGORY
{
	name = Ground
	icon = stockIcon_ground
	
	FILTER
	{
		CHECK
		{
			type = category
			value = Ground
		}
	}
}
SUBCATEGORY
{
	name = Thermal
	icon = stockIcon_thermal
	
	FILTER
	{
		CHECK
		{
			type = category
			value = Thermal
		}
	}
}
SUBCATEGORY
{
	name = Electrical
	icon = stockIcon_electrical
	
	FILTER
	{
		CHECK
		{
			type = category
			value = Electrical
		}
	}
}
SUBCATEGORY
{
	name = Communications
	icon = stockIcon_communication
	
	FILTER
	{
		CHECK
		{
			type = category
			value = Communications
		}
	}
}
SUBCATEGORY
{
	name = Coupling
	icon = stockIcon_coupling
	
	FILTER
	{
		CHECK
		{
			type = category
			value = Coupling
		}
	}
}
SUBCATEGORY
{
	name = Payload
	icon = stockIcon_payload
	
	FILTER
	{
		CHECK
		{
			type = category
			value = Payload
		}
	}
}
SUBCATEGORY
{
	name = Undefined
	icon = stockIcon_fallback
	
	FILTER
	{
		CHECK
		{
			type = category
			value = None
		}
	}
}
SUBCATEGORY
{
	name = Liquid Fuel
	icon = R&D_node_icon_fuelsystems
	
	FILTER
	{
		CHECK
		{
			type = resource
			value = LiquidFuel
		}
	}
}
SUBCATEGORY
{
	name = Oxidizer
	icon = fuels_oxidizer
	
	FILTER
	{
		CHECK
		{
			type = resource
			value = Oxidizer
		}
	}
}
SUBCATEGORY
{
	name = Electric Charge
	icon = R&D_node_icon_advelectrics
	
	FILTER
	{
		CHECK
		{
			type = resource
			value = ElectricCharge
		}
		CHECK
		{
			type = moduleName
			value = ModuleCommand, ModuleEngines, ModuleGenerator, ModuleRadioisotopeGenerator
			invert = true
		}
	}
}
SUBCATEGORY
{
	name = Mono Propellant
	icon = fuels_monopropellant
	
	FILTER
	{
		CHECK
		{
			type = resource
			value = MonoPropellant
		}
	}
}
SUBCATEGORY
{
	name = Solid Fuel
	icon = fuels_solidfuel
	
	FILTER
	{
		CHECK
		{
			type = resource
			value = SolidFuel
		}
	}
}
SUBCATEGORY
{
	name = Xenon Gas
	icon = fuels_xenongas
	
	FILTER
	{
		CHECK
		{
			type = resource
			value = XenonGas
		}
	}
}
SUBCATEGORY
{
	name = Intake Air
	icon = R&D_node_icon_experimentalaerodynamics
	
	FILTER
	{
		CHECK
		{
			type = resource
			value = IntakeAir
		}
	}
}
SUBCATEGORY
{
	name = Ablator
	icon = Ablative_Shield
	
	FILTER
	{
		CHECK
		{
			type = resource
			value = XenonGas
		}
	}
}
SUBCATEGORY
{
	name = Ore
	icon = fuels_ore
	
	FILTER
	{
		CHECK
		{
			type = resource
			value = XenonGas
		}
	}
}

SUBCATEGORY
{
	name = Cargo
	icon = stockIcon_cargo
	
	FILTER
	{
		CHECK
		{
			type = category
			value = Cargo
		}
	}
}

 

Share this post


Link to post
Share on other sites
Posted (edited)
1 hour ago, linuxgurugamer said:

Including the robotics?

Yes, but then I somehow borked it a minute later. I swear I had it working with categories, but was unable to get it functioning using categories again. The code below does work, but calls out robotics parts individually by name.

FilterByFunction.cfg

CATEGORY
{
	name = Filter by Function
	type = stock
	value = replace

	SUBCATEGORIES
	{
		list = 0,Pods
		list = 1,Fuel Tanks
		list = 2,Engines
		list = 3,Command and Control
		list = 4,Structural
		list = 5,Robotics
		list = 6,Coupling
		list = 7,Payload
		list = 8,Aerodynamics
		list = 9,Ground
		list = 10,Thermal
		list = 11,Electrical
		list = 12,Communications
		list = 13,Science
		list = 14,Cargo
		list = 15,Utility
	}
}

SubCategories_Stock.cfg

SUBCATEGORY
{
	name = Pods
	icon = stockIcon_pods
	
	FILTER
	{
		CHECK
		{
			type = category
			value = Pods
		}
	}
}
SUBCATEGORY
{
	name = Fuel Tanks
	icon = stockIcon_fueltank
	
	FILTER
	{
		CHECK
		{
			type = category
			value = FuelTank, Propulsion
		}
	}
}
SUBCATEGORY
{
	name = Engines
	icon = stockIcon_engine
	
	FILTER
	{
		CHECK
		{
			type = category
			value = Engine
		}
	}
}
SUBCATEGORY
{
	name = Command and Control
	icon = stockIcon_cmdctrl
	
	FILTER
	{
		CHECK
		{
			type = category
			value = Control
		}
	}
}
SUBCATEGORY
{
	name = Structural
	icon = stockIcon_structural
	
	FILTER
	{
		CHECK
		{
			type = category
			value = Structural
		}
	}
}
SUBCATEGORY
{
	name = Robotics
	icon = serenityIcon_robotics
	
	FILTER
	{
		CHECK
		{
			type = name
			value = hinge_01, hinge_01_s, hinge_03, hinge_03_s, hinge_04, piston_01, piston_02, piston_03, piston_04, rotor_01, rotor_02, rotor_03, rotoServo_00, rotoServo_02, rotoServo_03, rotoServo_04
		}
	}
}
SUBCATEGORY
{
	name = Coupling
	icon = stockIcon_coupling
	
	FILTER
	{
		CHECK
		{
			type = category
			value = Coupling
		}
	}
}
SUBCATEGORY
{
	name = Payload
	icon = stockIcon_payload
	
	FILTER
	{
		CHECK
		{
			type = category
			value = Payload
		}
	}
}
SUBCATEGORY
{
	name = Aerodynamics
	icon = stockIcon_aerodynamics
	
	FILTER
	{
		CHECK
		{
			type = category
			value = Aero
		}
	}
}
SUBCATEGORY
{
	name = Ground
	icon = stockIcon_ground
	
	FILTER
	{
		CHECK
		{
			type = category
			value = Ground
		}
	}
}
SUBCATEGORY
{
	name = Thermal
	icon = stockIcon_thermal
	
	FILTER
	{
		CHECK
		{
			type = category
			value = Thermal
		}
	}
}
SUBCATEGORY
{
	name = Electrical
	icon = stockIcon_electrical
	
	FILTER
	{
		CHECK
		{
			type = category
			value = Electrical
		}
	}
}
SUBCATEGORY
{
	name = Communications
	icon = stockIcon_communication
	
	FILTER
	{
		CHECK
		{
			type = category
			value = Communications
		}
	}
}
SUBCATEGORY
{
	name = Science
	icon = stockIcon_science
	
	FILTER
	{
		CHECK
		{
			type = category
			value = Science
		}
	}
}
SUBCATEGORY
{
	name = Cargo
	icon = stockIcon_cargo
	
	FILTER
	{
		CHECK
		{
			type = category
			value = Cargo
		}
	}
}
SUBCATEGORY
{
	name = Utility
	icon = stockIcon_utility
	
	FILTER
	{
		CHECK
		{
			type = category
			value = Utility
		}
	}
}

 

Edited by Optical_Tyranno

Share this post


Link to post
Share on other sites
8 hours ago, Optical_Tyranno said:

CHECK { type = name value = hinge_01, hinge_01_s, hinge_03, hinge_03_s, hinge_04, piston_01, piston_02, piston_03, piston_04, rotor_01, rotor_02, rotor_03, rotoServo_00, rotoServo_02, rotoServo_03, rotoServo_04 }

Yes, it works, but two problems:

First, you missed a  part:

KAL1000: controller1000

Second, hard-coding the names means that anytime a new part from anywhere is added to the game,either by a mod or by a new update/DLC, it will not show up, or an update will have to be pushed out.

Another problem is that with this config, for some reason the icon for Science in the custom categories is replaced with the Cargo icon, and again, it doesn't make sense and I don't have time to figure these things out.  

 

 

Share this post


Link to post
Share on other sites
Posted (edited)
9 hours ago, linuxgurugamer said:

Yes, it works, but two problems:

First, you missed a  part:

KAL1000: controller1000

Second, hard-coding the names means that anytime a new part from anywhere is added to the game,either by a mod or by a new update/DLC, it will not show up, or an update will have to be pushed out.

Another problem is that with this config, for some reason the icon for Science in the custom categories is replaced with the Cargo icon, and again, it doesn't make sense and I don't have time to figure these things out.  

 

 

The issue with the science icon being replaced by cargo is because of SubCategories_Cargo.cfg. It also creates a subcategory named "Science" using "stockIcon_cargo". I'm assuming that because it has the same name as the stock category, it calls the wrong one. Renaming it to something else fixes it.

Edited by Optical_Tyranno

Share this post


Link to post
Share on other sites

My concern is why this is occurring.  Until I know what's causing it, I'm  going to leave it as-is.

Once I figure out the why, i can fix it.

Share this post


Link to post
Share on other sites
Posted (edited)

While doing a total rewrite of the filter extension configuration, it came to my attention, and not sure if this is related to the above mentioned problem, that the following config excerpt:
 

Spoiler

 

SUBCATEGORY
{
    name = Karbonite
    icon = KarboniteEngine
    FILTER
    {
        CHECK
        {
            type = moduleName
            value = ModuleEngines, ModuleEnginesFX
        }
        CHECK
        {
           type = resource
           value = Karbonite
        }
    }
}

SUBCATEGORY
{
    name = Karbonite
    icon = KarboniteRes
    FILTER
    {
        CHECK
        {
            type = resource
            value = Karbonite
        }
    }
}

and subsequently:

CATEGORY
{
    name = Filter by Resource
    type = stock
    value = replace

    SUBCATEGORIES
    {
        list = 0,Karbonite
    }
}

CATEGORY
{
    name = Filter by Engine Type
    icon = EngineRocket
    colour = #FF90F090
    all = true
    value = engine

    SUBCATEGORIES
    {
        list = 0,Karbonite
    }
}

Won't work properly. FilterExtension will report that Karbonite is already define and one of the subcategory will overwrite the other. Fair enough, they both have the same name. One could do something like this to circumvent the problem:

SUBCATEGORY
{
    name = KarboniteResource

...

}

...

SUBCATEGORY
{
    name = KarboniteEngine

...

}

CATEGORY
{
    ...

    SUBCATEGORIES
    {
        list = 0,KarboniteRes
    }
}

CATEGORY
{
   ...

    SUBCATEGORIES
    {
        list = 0,KarboniteEngine
    }
}

This would work, albeit showing some less than optimal filter name displayed in game as "KarboniteResource" and "KarboniteEngine" while all was really wanted was showing "Karbonite" both under Filter by Resource and Filter by Engine Type.

Using another trick prove, again, ineffective as shown below:

FilterRename
{
    KarboniteRes=>Karbonite

    KarboniteEngine=>Karbonite
}
FilterSetIcon
{

...
}

This result in FilterExtension behaving just like the first excerpt. i.e, One filter overwrite the other.

I think, what we need, is an extended "title" entry like this:

SUBCATEGORY
{
    name = KarboniteEngine

    title = Karbonite
    icon = KarboniteEngine
    FILTER
    {

      ...
    }
}

SUBCATEGORY
{
    name = KarboniteRes

    title = Karbonite
    icon = KarboniteRes
    FILTER
    {
        ...
    }
}

and then using the normal way of defining filters. FilterExtension would simply substitute the in-game filter text with whatever "title" contents.

 

TLDR (yeah, I do no like doing that but...)

To simplify subcategory and filter association, FilterExtension could use an additional entry called "title" that would behave just like it does for part:

name = Name_Used_To_ID_This_Entry

title = Text shown in the game editor

icon = Image displayed in the game editor

 

Edited by Galenmacil
Typographical error fixing

Share this post


Link to post
Share on other sites

More of a documentation is needed. The link to the wiki on the OP shows an empty wiki page.

So, my question:

FilterRename
{
	name = LiquidFuel,Oxidizer,Kerosene,LqdOxygen=>Rockets

...

Will this work? Is it a sensitive check or does it just check if all of them are included?

If all, will this work instead?

	name = LiquidFuel,Oxidizer=>Rockets
	name = Kerosene,LqdOxygen=>Rockets

Is it allowed to have 2 entries that point to the same name?

(I am actually trying to edit all configs to make them RO RP-1 compatible)

Share this post


Link to post
Share on other sites

Looking good. Actually pushing my commits to my branch.

 

Share this post


Link to post
Share on other sites
Posted (edited)

What I've done until now:

  • Procedural Avionics appears in Procedural Parts category
  • "SRBs" also lists parts with HTPB, PBAN and PSPC
  • "Rockets" also lists parts with Kerosene/LqdOxygen and HTP/Kerosene/LqdOxygen
  • Added subcategory "Sounding Rockets" for the fuel combo Aniline/Furfuryl/IRFNA-III
  • Added subcategory "Early Rockets" for the fuel combos Ethanol75/LqdOxygen | Ethanol75/HTP/LqdOxygen | Ethanol90/HTP/LqdOxygen | Hydyne/HTP/LqdOxygen | AK20/Kerosene
  • Added subcategory "Upper Stage Engines" for the fuel combos IWFNA/UDMH | HTP/Kerosene
  • Added subcategory "GPS" to science in favor of KerbalGPS
  • Repaired appearance in Science category
Edited by Gordon Dry

Share this post


Link to post
Share on other sites

@ everybody

My PR is on hold because the main intention of my edits is not possible to be done with the actual build of FE.
In short:

  • first line taken, rest ignored
  • ModuleEngineConfigs not taken into account when ModuleEnginesRF got no fuel config

See
https://github.com/linuxgurugamer/FilterExtension/pull/23#issuecomment-500603085

So if anybody could help out that would be great.

It's about nothing less than having FE properly work with RO / RP-1 / RealFuels.

Share this post


Link to post
Share on other sites

New release, 3.2.3.2

  • Thanks to @Galenmacil for pointing out that some icons were missing due to mods being renamed:
    • Added missing icons for QuizTech Continued and Universal Storage 2
  • Thanks to @Galenmacil for contributing the following icons:
    • Mk3Expansion
    • VanguardTechnologies
    • WheelsCollection
  • Updated for 1.7.2
  • Updated AssemblyVersion.tt
  • Removed ModuleManager from release

Share this post


Link to post
Share on other sites

I've tried installing Filter Extensions - Default Configuration from CKAN. For whatever reason, multiple parts including Hydraulic Cylinders and the KAL were not responding to user input properly when I had it installed.

I have no clue why, I don't even know if this specific mod caused it, but removing the mod always fixed the issue.

I don't have any log files, as this didn't cause any crashes.

Here's a pastebin with my mods from CKAN.

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.