Jump to content

[1.3.0] Filter Extensions 3.0.4 (Jul 11)


Crzyrndm

Recommended Posts

Easy for FE to defend against, and the mod author of the part module which is causing this should be sorting out.

I will have a new version in the next few days, my KSP 1.2 copy is not currently operational...

Link to comment
Share on other sites

So how do I find the bad mod with the invalid part module name that makes the mod crash?

And does it crash

  1. as soon as the filter category is open?
  2. as soon as I hover the mouse over a bad part?
  3. as soon as I pick a bad part to place it in VAB?
Link to comment
Share on other sites

  • 2 weeks later...
On 21.4.2017 at 7:50 AM, Crzyrndm said:

Most likely, this would have to change through MM. MM patches and their effects are not particularly visible to other mods to the point where it's likely I'd have to reload/parse all the MM patches just for FE. If the part is coming up as "squad", then the game is under the impression that part was loaded from the Squad folder.

 

On 21.4.2017 at 10:39 PM, Crzyrndm said:

The latter. I presume when MM clones a part, it's also just cloning the base directory (hence the issue) and there's not a reasonable indication that I'm aware of that would mark the part as cloned (nvm extracting the patch directory)

I've noticed it checking out Kurrikane. Kurrikanes fins and decoupler are MM-copied Squad parts and are not showing up selecting manufacturer. Using a real copy the part is visible.

Using MM to change FE behavior seems also not possible. Neither adding nor editing nor deleting worked. Same MM-file placed in FE-folder and it's working.

To be correct: adding new CATEGORY is working. Adding to existing CATEGORY is not working.

Edited by khr15714n
To be correct
Link to comment
Share on other sites

10 hours ago, khr15714n said:

To be correct: adding new CATEGORY is working. Adding to existing CATEGORY is not working.

It's the folder/path check types that aren't aware of the locations of MM copies (so if you dont use those, they should show up without issue), and when I said a MM change, I meant the MM plugin would have to start setting the path not some changes to patches

Link to comment
Share on other sites

Filter Extensions v3.0 is now available

  • KSP 1.3 compatible
  • All possible functionality "loaded and compiled" at first main menu entry. This does create a noticeable hitch but is preferable once at menu than multiple slowdowns in editor scene
  • Fix for crash caused by invalid module name (reported by @Gordon Dry)
  • Fixes to bulkhead profiles by @Kerbas_ad_astra

NOTE:
The major version increment reflects just how much of the plugin has been changed. I am expecting a few issues and oversights to pop up and will be trying to squash them quickly :wink:

NOTE 2:
pre 3.0, each time a subcategory was selected all checks involved were run against every part available (which parts satisfy these conditions). Post 3.0, the result is being stored at the main menu, and opening the subcategory only involves a lookup (which parts are in this category). The end result is that Filter complexity can now be essentially unbounded without having subcategories that take time to "open"

Edited by Crzyrndm
Link to comment
Share on other sites

You say "KSP 1.3 compatible", does this mean it also runs on 1.2.2 ?

I ask because I actually test it on 1.2.2 but some of the "special" categories with yellow background are gone, like the engines where I can choose the fuel type in subcategories etc.

Each time I choose any category this is written to the log:

ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
  at System.Collections.Generic.List`1[PartModule].get_Item (Int32 index) [0x00000] in <filename unknown>:0 
  at UpgradesGUI.PatchEditorTooltip.UpdateModuleWidgetInfo (UpgradesGUI.UpgradePrefab upgradePrefab) [0x00000] in <filename unknown>:0 
  at UpgradesGUI.PatchEditorTooltip.Update () [0x00000] in <filename unknown>:0 
 
(Filename:  Line: -1)

The full log, if of any interest:
https://www.dropbox.com/s/y68lxayk3zdqgq4/2017-05-27-1 KSP.log.zip?dl=1

btw, in "Filter by manufacturer" the categories are not sorted alphabetically, it was like that before, but it's just more scrambled now then I was used to.

Edited by Gordon Dry
Link to comment
Share on other sites

@Crzyrndm  You may be aware I'm updating the Mk 2.5 Spaceplane mod.  I've change the bulkhead profile to mk25, and figured to update FE with the following patch:

@SUBCATEGORY[Mk?2.5?Flat?Bottom*]:AFTER[000_FilterExtensions]
{
	@icon = cs_mk25
	@FILTER
	{
		@CHECK
		{
			@value = mk25
		}
	}
}

I also put a new (copied) icon into the following directory:   
    GameData\000_FilterExtensions\Icons\Autoloaded_Icons_CrossSections\cs_mk25.png 
 
 yet it is still coming up as a questionmark. 
 
 Can you tell me what I'm doing wrong, or, alternatively, update FE to reflect the new profile I'm using? 
 
 Thanks

Link to comment
Share on other sites

I'm going to have to look into that a little further, I don't see any reason why that shouldn't be working as expected (the filter showing up at all obviously indicates that the patch is being applied which was my first thought)

Edited by Crzyrndm
Link to comment
Share on other sites

Thanks.  I actually had it working with my patch (must have had a typo earlier), but it 's good to have it integrated.

And that new icon is MUCH better than what I was using.

One suggestion/request, very minor, is that  you move it up (the icon) to between the mk2 and mk3 icons.  Essentially, have all the odd-shaped ones at top, and below are all the circular ones.

Link to comment
Share on other sites

I really appreciate this mod, and have been using it ever since I discovered it for 1.2.2. I even created some of my own custom filters that were useful to me. One displays only fuel tanks, the other only antennae. Today I started playing around with 1.3, and this was one of the first mods I dl'd. In 1.3, my custom categories show up, but have every part in the game showing. Can you take a look at my screenshots and code and give me an idea why my filters work in 1.2.2 but not 1.3? I'm using your latest release v3.0.1.

Thanks for your time and contributions to the community.

My fuel tanks filter code:

CATEGORY
{
	name = Fuel
	icon = stockIcon_fueltank
	colour = #FF90F090
	all = true
	
	FILTER
	{
		CHECK
		{
			type = category
			value = FuelTank
		}
		CHECK
		{
			type = title
			value = adapter
			invert = true
		}
		CHECK
		{
			type = moduleName
			value = ModuleLiftingSurface, ModuleCommand
			invert = true
		}
	}
}

My antennae filter code:

CATEGORY
{
	name = Antennae
	icon = DataTransmitter
	colour = #FF90F090
	all = true
	
	FILTER
	{
		CHECK
		{
			type = moduleName
			value = ModuleLimitedDataTransmitter, ModuleRTAntenna, ModuleSPUPassive, ModuleDataTransmitter
		}
		CHECK
		{
			type = crew
			value = 0
		}
		CHECK
		{
			type = moduleName
			value = ModuleCommand
			invert = true
		}
	}
}

 

Edited by leatherneck6017
Link to comment
Share on other sites

The issue is that you're doing something I never thought of :confused:. On consideration, I do not believe I will be changing the plugin to retain backwards compatibility as this effect was unintentional and does change the behaviour slightly (helps that the fix is very simple as well).

The correct way to do this is to use a separate SUBCATEGORY node and reference that from the category (rather than (slightly) abusing the template mechanism) which is only a very minor modification. I've modified the fuel one appropriately below

CATEGORY
{
	name = Fuel
	icon = stockIcon_fueltank
	colour = #FF90F090
// Modifications begin 
    SUBCATEGORIES
    {
    	name = Fuel
    }
}

SUBCATEGORY
{
	name = Fuel
	icon = stockIcon_fueltank
// modifications end
	FILTER
	{
		CHECK
		{
			type = category
			value = FuelTank
		}
		CHECK
		{
			type = title
			value = adapter
			invert = true
		}
		CHECK
		{
			type = moduleName
			value = ModuleLiftingSurface, ModuleCommand
			invert = true
		}
	}
}

 

Edited by Crzyrndm
Link to comment
Share on other sites

Version 3.0.2 released to fix more icon issues

13 hours ago, leatherneck6017 said:

I did have a sneaking suspicion that I wasn't using the context correctly in 1.2.2, but it worked, so I didn't change anything.

The filters in the categories are intended to allow a particular subset of parts to be shown in the subcategories that come under it (ie. parts have to satisfy category AND subcategory filters). Particularly useful for the Mod categories where it can reuse the generic subcategories defined primarily for "Filter by Function" but only showing the parts from a particular path/folder. The issue with allowing the category to be standalone is that then changes the behaviour of the "All parts.." subcategory from "all parts visible in the subcategories" (intended), to "all parts that satisfy the category filter" (not intended).

 

Edited by Crzyrndm
Link to comment
Share on other sites

 

Hi @Crzyrndm, as you have this patch inside your default configs

 

Also, how to change order of main categories? Because the green categories jumped behind my created categories. Any idea?

EDIT: Also, how to do double check? When I've tried the check bellow, it didn't worked(it was like no check was there...)

CHECK

{

type = check

        CHECK
        {
            type = folder
            value = Firespitter, AviatorArsenal
        }
        CHECK
        {
            type = path
            value = AirplanePlus\Parts\Engine\Early
        }
        CHECK
        {
            type = title
            value = biplane, Biplane, Biplane_
        }

}

 

@PART[*]:HAS[@MODULE[MissileLauncher]:HAS[#missileType[bomb]]]
{
    MODULE
    {
        name = PartModuleFilter
        filterAdd = Bombs// comma delimited list of subcategories to push this part into by name. eg. Engines, Fuel Tanks
        filterBlock = // comma delimited list of subcategories to block this part from by name. eg. Engines, Fuel Tanks
    }

How to ask for it in config?

Something like?

        CHECK
        {
        name = PartModuleFilter
        filterAdd = Bombs
        }

[\spoiler]

 

Edited by Toonu
Link to comment
Share on other sites

  • Main categories are still ordered by loading order (hence the file numbering and other such tricks). Something I forgot to fix with 3.0...
  • That config isn't going to find any parts because it's asking for the parts to be on that path (relative to GameData) AND under one of those folders. Use a single path node (comma separators like normal) for all three and you won't need the outer check node either. (The other option is to put the path and folder nodes into an inverted check node and invert both checks. this will give !(!A AND !B) which is equivalent to (A OR B)
  • PartModuleFilter doesn't require any CHECK node. However it may require the subcategory to be valid without those parts (ie. make sure it has at least one part through its own filters otherwise it might get discarded as having no suitable parts). I can't check right now whether this is actually the case :( (it shouldn't be, but it may be)
Edited by Crzyrndm
Link to comment
Share on other sites

  • 4 weeks later...

@Crzyrndm

I want to thank you once again for this life saver mod!

I have a bug report

https://www.dropbox.com/sh/zq0lrjhkgdjph2o/AAD6Wpzj4QGElV1sMVAAyVo2a?dl=0

https://www.dropbox.com/s/2zkiibtqz4rn0r0/KSP.log?dl=0

For some reason categories icons are messed up in engines.

Also a question (or suggestion): do we have some kind of useful filter extension configs collection (for example mods subcategories like AIES,SXT, and so on or fuel tanks subcategory) - to use filter extensions to the max.?

Link to comment
Share on other sites

Having a minor icon issue - the science icon always has a very dark background. I had this back in at least 1.2.2 iirc...

Rw25qzS.png
I've double checked the icon files in my install, and can't find anything weird there.

Link to comment
Share on other sites

13 hours ago, evileye.x said:

@Crzyrndm

I want to thank you once again for this life saver mod!

I have a bug report

https://www.dropbox.com/sh/zq0lrjhkgdjph2o/AAD6Wpzj4QGElV1sMVAAyVo2a?dl=0

https://www.dropbox.com/s/2zkiibtqz4rn0r0/KSP.log?dl=0

For some reason categories icons are messed up in engines.

Also a question (or suggestion): do we have some kind of useful filter extension configs collection (for example mods subcategories like AIES,SXT, and so on or fuel tanks subcategory) - to use filter extensions to the max.?

Bug: I'll have a look sometime this weekend

Supporting config lib: Not to my knowledge. Would be interesting to see though

12 hours ago, Rodger said:

Having a minor icon issue - the science icon always has a very dark background. I had this back in at least 1.2.2 iirc...

Rw25qzS.png
I've double checked the icon files in my install, and can't find anything weird there.

Looks like it might be picking the incorrect file for the unselected case. Will have to take a look

Link to comment
Share on other sites

8 hours ago, Crzyrndm said:

Looks like it might be picking the incorrect file for the unselected case. Will have to take a look

The background also stays dark when selected, though the icon line art turns white as it should.

Link to comment
Share on other sites

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