Jump to content

[1.3.0] Filter Extensions 3.0.4 (Jul 11)


Crzyrndm

Recommended Posts

Improvement: Added a subcategory override for the global setting "show unpurchased parts"

Improvement: Added custom type filter for unpurchased parts

That's awesome. Thanks.

Link to comment
Share on other sites

After checking many times, I found that this dll is working, with one problem. The above mentioned scenario only happens the first time you enter the VAB. Once you exit the VAB and re-enter, everything is back to normal for the duration of the game. Also wanted to mention that this time neither of the log files contain any errors, only "loading" messages.

Can I get a copy of the log file and the configuration files you are using (all your ones, and which (if any) of the distributed set that have been kept if you're still deleting them). I think I know what's happening, but I still don't know exactly why and I want a hard repro case for it.

Link to comment
Share on other sites

I'm not sure if I'm just doing something wrong, but I can't get the new unpurchased check working. The subcategory just won't show up.

Following an example from a few pages back I added a line to the FilterByFunction config, then created a new config file for my category.

I.e.

SUBCATEGORY{
name = Unpurchased Parts
icon = Experiment
showUnpurchased = true
FILTER
{
CHECK
{
type = custom
value = purchased
invert = true
}
}
}

As a test I implemented the Life Support config, and that all worked fine, both hiding them from "utility", and adding the new category. It just doesn't work with my setup for unpurchased.

I notice in the log:

[Filter Extensions] Unpurchased Parts in category Filter by Function has no valid parts and was not initialised

I thought I'd try capitalising purchased (value=Purchased) in case that was what it was supposed to be, and now at least the parts show up, but I guess the filter is just ignored and the default case is therefore to show everything... Usable, but not ideal.

Edited by TK421
further info
Link to comment
Share on other sites

Capitalise the P in showUnPurchased, I made a typo in the release notes (I should say in the code, that shouldn't be capitalised. It will be lower case for future releases)

Edited by Crzyrndm
Link to comment
Share on other sites

I just noticed that (your previous post on it has both variations), and tried adding it that tag to my new lifesupport category, however it still only shows the two purchased parts...

Time to make sure that I actually extracted the new dll...

Link to comment
Share on other sites

Hmm, well I tried that variation, then a bunch of others such as 'showunPurchased' and 'ShowUnPurchased' however nothing works...

Do I really need to restart KSP between each config file change, or is there a way to have it rebuild the filter while the game is running?

Link to comment
Share on other sites

Hmm, well I tried that variation, then a bunch of others such as 'showunPurchased' and 'ShowUnPurchased' however nothing works...

Read my last comment. I forgot to add the override field to the internal copy function and so nothing seemed to ever happen when it should. The line should read "showUnpurchased = true"

- - - Updated - - -

Version 2.4.1

  • Quick patch for missing subcategories
  • Fix for unpurchased override not being copied and therefore not functioning

Link to comment
Share on other sites

I've updated to version 2.4.1 and I'm pleased to say it fixes the 'showUnpurchased' override.

Unfortunately it seems that inverting the purchased check doesn't work...

I.e. If I have:


SUBCATEGORY
{
name = Unpurchased Parts
icon = Experiment
showUnpurchased = true
FILTER
{
CHECK
{
type = custom
value = purchased
}
}
}

it works fine, showing all purchased parts (and turning the global hide unpurchased off, still only shows purchased parts).

However adding invert = true within the check (which following examples appears to be correct) the category isn't initialised.

I.e. this doesn't work:

SUBCATEGORY
{
name = Unpurchased Parts
icon = Experiment
showUnpurchased = true
FILTER
{
CHECK
{
type = custom
value = purchased
invert = true
}
}
}

Link to comment
Share on other sites

Can I get a copy of the log file and the configuration files you are using (all your ones, and which (if any) of the distributed set that have been kept if you're still deleting them). I think I know what's happening, but I still don't know exactly why and I want a hard repro case for it.

Whatever you did with 2.4.1 has resolved the issue. I now have no problems with the mod working as intended.

Link to comment
Share on other sites

I've updated to version 2.4.1 and I'm pleased to say it fixes the 'showUnpurchased' override.

Unfortunately it seems that inverting the purchased check doesn't work...

That is really odd since I have an override in to force it to always say it has valid parts (it even shows up in sandbox locally). Is it possible the category you're adding it to is adding some extra filtering?

Working test case

SUBCATEGORY
{
name = Unpurchased
showUnpurchased = true
FILTER
{
CHECK
{
type = custom
value = purchased
invert = true
}
}
}

@CATEGORY[Filter?by?Function]
{
@SUBCATEGORIES
{
list = Unpurchased
}
}

Link to comment
Share on other sites

Okay, I tried saving the config you supplied as a new file and it still doesn't work for me. I still get the error "...no valid parts and was not initialised" in the log.

To confirm:

  • I'm running ksp 1.0.4
  • I deleted the entire Filter Extensions and config folder from gamedata, then reinstalled the plugin and recommended default configs from CKAN
  • I have the unpurchased parts config you provided as a new cfg file within 000_FilterExtensions Configs
  • All the default new configs seem to work fine. I have a bunch of new categories such as B9, KSPI etc with their appropriate subcategories, as well as a bunch of subcategories within filter by function.
  • Global hideunpurchased is on, though it doesn't seem to make a difference if it's off either.

The config you supplied doesn't have an icon specified. I assume this won't be a problem and it'll display a default instead.

Is there any possibility of a conflict with KIS? I do have that mod, and it adds it's own "EVA Items" subcategory to filterbyfunction, and it ignores the hideunpurchased setting.

Edit: Removed KIS, and no change.

Interestingly landing legs/struts don't appear under landing legs, but I guess the default configs simply don't support kerbokatz's balancing gear.

Edited by TK421
Link to comment
Share on other sites

I think I'd already tried that but could do so again to make sure.

Edit: It still doesn't work even wiping the ckan install, then using the direct kerbalstuff download which also includes "stockrework" configs (which themselves also show up properly).

The weird bit is that it works fine selecting purchased parts, its just when inverted trying to show unpurchased that it doesn't work.

Just in case it makes a difference:

000_FilterExtensions

000_FilterExtensions Configs

000_Toolbar

001ControlLock

B9_Aerospace

BetterBuoyancy

BoulderCo

Chatterer

CommunityResourcePack

CommunityTechTree

ContractConfigurator

ContractPacks

ContractsWindow

CrossFeedEnabler

CrowdSourcedScience

DatedQuickSaves

DMagicOrbitalScience

Dynamic Controls

EnhancedThermalData

EnvironmentalVisualEnhancements

FerramAerospaceResearch

FieldExperience

GCMonitor

HeatControl

InterstellarFuelSwitch

JSI

KAS

KerbalEngineer

KerbalFlightIndicators

KerbalJointReinforcement

KerboKatz

KIS

kOS

KSI

KSPIHeatManagement

MechJeb2

ModularFlightIntegrator

ModularFuelTanks

NavBallDockingAlignmentIndicator

NavyFish

NearFutureProps

Nereid

PartCommander

PIDTune

PortraitStats

PreciseNode

RadialEngineMountsPPI

Ravien

RemoteTech

SASReset

SASTuningFix

SCANsat

ScienceAlert

SelectRoot2

SeriousBusiness

Squad

StageRecovery

StationPartsExpansion

StockClamshellFairings

TacFuelBalancer

TakeCommand

TemperatureGaugeKiller

TextureReplacer

ThunderAerospace

TriggerTech

TweakScale

UniversalStorage

VerneTech

WarpPlugin

WasdEditorCamera

WaterSounds

WaypointManager

[x] Science!

I also have Module Manager 2.6.6

Edited by TK421
Link to comment
Share on other sites

Hi Crzyrndm (tsh, couldn't choose a more simple name ? XD)

I tried your mod yesterday (didn't know it existed, I was about to make one similar ^^') and well ... I would like to know if there is a manual for dummies ? :P

After using it, it was even more messy than before ... so many categories were added (in filter by functions) and I didn't really like that.

So I would like to know how it works so that I can have something more usable ...

Oh yeah, I deleted one of the folder so that it didn't changed the default filter by functions and was way better, I could use the filter by mod and functions who was what I wanted. But it's true that adding some categories (like wheels ...) could be interesting so ... this is why I'm asking you that ^^

(too lazy to look into the code >.>)

Link to comment
Share on other sites

All the things that make changes are in subdirectories of this 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 categories are individual .cfg's inside the "default" subdirectory. If you don't want it, delete it.

The additional subcategories in Filter by Function are in the StockCategories.cfg (along with the improved cross section and resources categories)

The replacement subcategories in Filter by Function are here. Just remove that folder if you want the stock layout

Filter Extensions uses two root config node types, CATEGORY and SUBCATEGORY

CATEGORY 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

SUBCATEGORY 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)

Writing a set of FILTER nodes to get the parts you want:

Using the Electric Charge 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 must have storage for the resource Electric Charge and must not be a part that only has EC storage as buffer (through experimentation this was determined to be engines, command modules, and generators)

If you're familiar with any programming languages, that would typically be expressed something like this

result = hasResource("ElectricCharge") && !hasModule("ModuleCommand" || "ModuleEngines" || "ModuleEnginesFX" || "ModuleGenerator");

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. Manned Command, 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 code that handles the type)

Edited by Crzyrndm
Link to comment
Share on other sites

Thanks for the explanation ... You really did what I had in mind !

And hum well yeah, I'm a dev (that's my actual work ...) so it's probably even easier for me to understand code than text XD

Yeah it's shameless and so what ? >.>

(But I don't really know C#, I know java though ^^)

From what you said, there are points that are bugging me ... as an example, I had a lot of engine in inlets and well ... that's not really their place ! (The engines from firespitter)

I'll look at it when I'll be home.

Oh, I just understood about the replacement / adding things in Fliter by functions XD

So hum well, I'll look at it when home.

If I delete subs that I don't want, will the parts still show elsewhere ?

Edited by nimaroth
Link to comment
Share on other sites

Hello,

Thank you very much for this development, using this mod and it is very necessary to improve it to make toys Kerbala better.

By installing some other MODs, I discovered that there are no icons mods and when question marks in icons (the manufacturer) was a lot I decided to fix it.

So I made a number of icons, namely those that use mods in the game.

Once I thought that this meters can be useful for those who use the package FilterExtension.

Pack extra icons here.

Below is a list of packages, the icons which are made as a supplement:

Advanced Landing Capsule for Orbital Rendezvous,http://forum.kerbalspaceprogram.com/threads/54925,alexustas,ASET

Atomic Age,http://forum.kerbalspaceprogram.com/threads/104855,Porkjet,AtomicAge

Behemoth Aerospace Engineering Large Parts Pack,http://forum.kerbalspaceprogram.com/threads/124064,greystork,BAE

Corvus -1.25m Two Kerbal Pod,http://forum.kerbalspaceprogram.com/threads/121062,OrionKermin,Corvus

Corvus Extras,http://forum.kerbalspaceprogram.com/threads/121062,OrionKermin,Corvus Extras

Phoenix Industries Cargo Resupply System,http://forum.kerbalspaceprogram.com/threads/122510,MoviesColin,CTN

AstroGamer's EnginesPlus,http://forum.kerbalspaceprogram.com/threads/127424,AstroGamer,EnginesPlus

Electric Thrust Engine,http://forum.kerbalspaceprogram.com/threads/121645,JarDev,JarDev

K2 Command Pod,http://forum.kerbalspaceprogram.com/threads/104925,jfjohnny5,JFJohnny5

Kerbal Historical Institute,http://forum.kerbalspaceprogram.com/threads/99020, blspblackdeath / Fiddlestyx / TheMoonRover,KerbalHistoricalInstitute

MI - Fuel Tank Expansion,http://forum.kerbalspaceprogram.com/threads/109885,MunarIndustries,MunarIndustries

Taurus HCV - 3.75 m Stock-ish Crew Pod ,http://forum.kerbalspaceprogram.com/threads/75074,jnrobinson / bsquiklehausen,RSCapsuledyne

SETI-CommunityTechTree,http://forum.kerbalspaceprogram.com/threads/106130, Yemo,SETIctt

Sigma OPM Expansion,http://forum.kerbalspaceprogram.com/threads/112095,Sigma88,Sigma

SpaceY Heavy Lifters Parts Pack,http://forum.kerbalspaceprogram.com/threads/100408, NecroBones,SpaceY-Lifters

SXT - Stock eXTension,http://forum.kerbalspaceprogram.com/threads/24906, Lack,SXT

Mk. 1-1 A2 ,http://forum.kerbalspaceprogram.com/threads/98250,Yarbrough08,Yarbrough08

Vanguard Astrodynamics VX Series Stockalike Engine,http://forum.kerbalspaceprogram.com/threads/127803,Randazzo,VanguardAstrodynamics

Heat Management,http://forum.kerbalspaceprogram.com/threads/118189,Randazzo,HeatManagement

Stock Part Revamp,http://forum.kerbalspaceprogram.com/threads/92764,Ven,VenStockRevamp

I hope it will be useful to someone.:wink:

Link to comment
Share on other sites

From what you said, there are points that are bugging me ... as an example, I had a lot of engine in inlets and well ... that's not really their place ! (The engines from firespitter)

...

If I delete subs that I don't want, will the parts still show elsewhere ?

1) If engines are showing up in the air intakes subcategory, they must also have a ModuleResourceIntake in the part. You could add an invertedd check to that looking for ModuleEngines and that would stop it (no need to check for EnginesFX any more as it respects inheritance and EnginesFX inherits from Engines)

2) Only if you set them to show up elsewhere. 99% of parts (everything that uses a "category =" field that doesn't end up as none) don't care if they are never seen and are available for any subcategory in any category. Parts that wouldn't normally show in the stock Filter by Function categories ("category = none") it must show up in a subcategory created through code to be visible (the idea being that you change the subcategory definition, not the part to move things around)

I hope it will be useful to someone.:wink:

I will see about including these in future versions

Link to comment
Share on other sites

  • 2 weeks later...

Hi. Mod is now a lot better.

Special thanks for the switch "default to advanced mode".

I have two questions:

Is it possible to work with sub-categories created by other mods? For example, KIS, KAS and USI Kolonization. To move an item from the standard category, or remove from it.

Is it possible to use a filter on the contrary, to exclude the item from the category? In some mods 'category = none' does not help, probably, the item in the desired category is placed by the script.

PS: I did not get to use 'type = check' to select multiple conditions. This only works if set separately 'FILTER {CHECK{...}} FILTER {CHECK{...}}'.

Link to comment
Share on other sites

1) Parts can only be added/excludeed from categories created by FE. You can remove subcategories created by other mods though, so if you really wanted you can replace them with something slightly different.

2) Can you give an example of what you want to achieve using an actual part?

The check type is normally reserved for when you need NOT(a AND b...), which is quite significantly different to NOT(a) AND NOT(B)... (the second example is actually equivalent to NOT(a OR b...)). I would say it's superseded now by the subcategory check which is much cleaner syntax wise as well as much more flexible

Link to comment
Share on other sites

You can remove subcategories created by other mods

How to do it?

Can you give an example of what you want to achieve using an actual part?

Sorry, it was my error.

But still there is a problem with 'type = name' in 'StockRework\Subcategories.cfg'. I want to create a category 'Electrical' and move the relevant parts here.


SUBCATEGORY
{
name = Electrical
icon = ElectricCharge
FILTER
{
CHECK
{
type = path
value = Squad/Parts/Resources/FuelCell
}
}
FILTER
{
CHECK
{
type = path
value = Squad/Parts/Electrical
}
}
FILTER
{
CHECK
{
type = name
value = kethane_generator
}
}
FILTER
{
CHECK
{
type = name
value = KA_Generator_02
}
}
}

'kethane_generator' and 'KA_Generator_02' is no work. In addition, it is possible to write simpler? For example, 'value = Squad/Parts/Electrical; Squad/Parts/Electrical' and 'value = kethane_generator, KA_Generator_02'. I tried different ways, nothing works.

Edited by Helmut
Link to comment
Share on other sites

Both of those support listing using comma (,) separators, or should do (I can't do any testing/fixing for a week or two)

    FILTER    {
CHECK
{
type = path
value = Squad/Parts/Resources/FuelCell, Squad/Parts/Electrical
}
}
FILTER
{
CHECK
{
type = name
value = kethane_generator, KA_Generator_02
}
}

RE: The name type not working

I don't know why that's occuring and as stated above I can't do anything about it for a while. I would suggest using title as an alternative if name is functioning incorrecctly for some reason

Link to comment
Share on other sites

'type = path' is works good, 'type = name' is not working. I remember, before there was a problem with the 'category = none' in the parts cfg, but I have tried all ways, nothing works.

Use the title is not useful in my case. Firstly, it is difficult to choose only what you need, and nothing more. Secondly, the game freezes at startup if the titles on Unicode and subcategories.cfg on Unicode too.

And please answer, how to remove subcategories created by other mods?

Link to comment
Share on other sites

'type = path' is works good, 'type = name' is not working. I remember, before there was a problem with the 'category = none' in the parts cfg, but I have tried all ways, nothing works.

...

And please answer, how to remove subcategories created by other mods?

I'll get "name" tested when I get a chance. Could be a while though

Removing subcategories:

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

Link to comment
Share on other sites

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