Jump to content

[1.3.0] Filter Extensions 3.0.4 (Jul 11)


Crzyrndm

Recommended Posts

I managed to add bulkhead cross section icon for "octotruss" and "HexTruss" by adding icons to "GameData\Squad\PartList\SimpleIcons\" by the name "octotruss.png" and "Hex Truss.png". Please note the space in Hex Truss. This is a bit strange but "HexTruss.png" didn't work.

Link to comment
Share on other sites

the CKAN version on the other hand still seems to work

Except the version CKAN is pointing to (2.1.1) is the latest version. What version are you referring to?

Link to comment
Share on other sites

Except the version CKAN is pointing to (2.1.1) is the latest version. What version are you referring to?

I included a copy of Version 2.1.1 in my download. Perhaps they are somehow different?

Link to comment
Share on other sites

Hey!, you did it with engines!!!, finally engines are not duplicated bewteen Karbonite and Karbonite/intake.

Also, since I've changed ny mods for this version I'm creating new icons for them. I'll hope to have them ready this weekend.

@FreeThinker, I'll try my best to give you an icon got your wartp engines, thou I'm not best artist I hate to not have icon at all.

Link to comment
Share on other sites

Hey!, you did it with engines!!!, finally engines are not duplicated bewteen Karbonite and Karbonite/intake.

What can I say, I don't like leaving such obvious bugs hanging around :P

Link to comment
Share on other sites

For now I created a new SubCategory WarpEngines, since the arpEngines, doesn't actualy work like regular engines work, by acceleration. I only need a better Icon for it.

Not the better icon in the world, but you can this one.

I included it with the others:

https://www.dropbox.com/s/6fbsuibyib5sl2e/Icons.rar?dl=0

Edited by KaiserSoze
Link to comment
Share on other sites

Hey, I'm having problems, I can't narrow the exact reproduction steps, but occasionally when I enter the VAB/SPH I'm missing all categories.

Pic related (includes logs): http://a.pomf.se/ymtiby.jpg

Edit: Actually checking the error log from the begining, I think it may have something to do with Cryogenic Engines mod (http://forum.kerbalspaceprogram.com/threads/117766-1-02-Cryogenic-Engines-high-Isp-chemical-rockets!-%2803-05-15-fuel-switch-fix%29)?

Screenshot 2: http://a.pomf.se/ioizlm.jpg

Edit 2: it seems to happen when you do a "Revert back to SPH/VAB"

Edited by eodh
Link to comment
Share on other sites

Thank you very much, I added you to the list of list op people eho helped realise KSPI Extended

Thank you very much.

I would probably ended adding some icons and cfg for my personal use anyway, but feels good to know people use my work :P

BTW: you made a typo with my nick ;)

Link to comment
Share on other sites

I need a copy of your output_log.txt (or Mac/Linux equivalent: player.log)

Ok I did an installation with all the mods I had when it started happening. I can actually reproduce the error exactly. For example, go SPH, launch, fly a bit, and return to sph.

Just did that, here's the log: https://drive.google.com/file/d/0BxWJPHau1WxfcXJ5RHVZc182NXM/view?usp=sharing

Link to comment
Share on other sites

I'm making a custom "filter by function" subcategory for a life support mod (specifically TACLS), but have a question. There's no way to actually change the name of the category value in a part's .cfg without the game failing to load, is there? For example I want to change "category = Utilities" to my custom "category = LifeSupport", where I already defined a Life Support subcategory in the "Categories_FilterbyFunction.cfg". However when I do this, the game can never finish loading and gets held up at the part that I had tried to change the category.

Instead I'm using a workaround where I just delete the category line with Module Manager, and then just filter by title or whatever like normal (this removes the part from Utilities but still adds it to my Life Support subcategory, just like I want). However if possible I'd prefer to do it the other way explained above.

Link to comment
Share on other sites

You can't use the categories in the part cfg to put them in a custom filter. KSP just doesn't know what "category = LifeSupport" means.

The best way is to add an exclusion to Utility for the parts you want.

@SUBCATEGORY[Utility]:FOR[FilterExtension]:NEEDS[<yourModHere>]
{
@FILTER,0
{
///--- copy your CHECKs here and add the line "invert = true"
}
}

Link to comment
Share on other sites

Ok I did an installation with all the mods I had when it started happening. I can actually reproduce the error exactly. For example, go SPH, launch, fly a bit, and return to sph.

Just did that, here's the log: https://drive.google.com/file/d/0BxWJPHau1WxfcXJ5RHVZc182NXM/view?usp=sharing

Can you try with this version please

Link to comment
Share on other sites

You can't use the categories in the part cfg to put them in a custom filter. KSP just doesn't know what "category = LifeSupport" means.

The best way is to add an exclusion to Utility for the parts you want.

@SUBCATEGORY[Utility]:FOR[FilterExtension]:NEEDS[<yourModHere>]
{
@FILTER,0
{
///--- copy your CHECKs here and add the line "invert = true"
}
}

I use a module to simulate a category:


class Category1 : PartModule{}


SUBCATEGORY
{
name = perso1
icon = number1
FILTER
{
CHECK
{
type = moduleName
value = Category1
}
}
}


@PART[fuelTankSmall]
{
@category = none
MODULE{ name = Category1 }
}

Once the new "category" in place, i find it easier to add/remove parts for it this way.

Link to comment
Share on other sites

You can't use the categories in the part cfg to put them in a custom filter. KSP just doesn't know what "category = LifeSupport" means.

The best way is to add an exclusion to Utility for the parts you want.

@SUBCATEGORY[Utility]:FOR[FilterExtension]:NEEDS[<yourModHere>]
{
@FILTER,0
{
///--- copy your CHECKs here and add the line "invert = true"
}
}

Hmmm I tried what you said, but couldn't get it to work. What does the zero mean in @Filter,0? Also, where is the reference to the Life Support subcategory? I'd like to try it your way because it seems like less of a pain than referencing individual part names in an MM file like I did (which you can see at the bottom of this post).

For reference, what I had come up with that works is a combination of a filter extension file and module manager file. But first I had to add "list = 8,Life Support" in "Categories_FilterbyFunction.cfg" (I had previously removed all other numbers after 7):

//Adds TACLS parts to Life Support subcategory
SUBCATEGORY:NEEDS[ThunderAerospace]
{
name = Life Support
icon = StorageLS

FILTER
{
CHECK
{
type = title
value = Life Support, TACLS
}
}
}

//Removes Thunder Aerospace LS Parts from default category (Utility)
@PART[Tac*|HexCan*]:FOR[FilterExtension]:AFTER[ThunderAerospace]
{
-category = dummy
}

I was afraid of getting false positives with the "value =" field, but I just realized I could add a bunch of CHECKs to make sure that doesn't happen. But the @PART[~] field in my module manager file could get annoying to fill in, as is the case for a similar MM for Universal Storage (below), which is why I want to try your method if you could explain a bit more.



//Removes Universal Storage LS (only) Parts from default category (Utility?)
@PART[*Wedge_Elektron|*Wedge_Sabatier|*Wedge_WRS|*Wedge_CarbonDioxide|*Wedge_Food|*Wedge_Hydrogen|*Wedge_Oxygen|*Wedge_Waste|*Wedge_Waste|*Wedge_Water|*Wedge_WasteWater|*Radial_Oxygen]:FOR[FilterExtension]:AFTER[UniversalStorage]
{
-category = dummy
}

Edited by ev0
Link to comment
Share on other sites

Hmmm I tried what you said, but couldn't get it to work. What does the zero mean in @Filter,0? Also, where is the reference to the Life Support subcategory? I'd like to try it your way because it seems like less of a pain than referencing individual part names in an MM file like I did (which you can see at the bottom of this post).

Ah, the snippet I posted was just the replacement for the "-category = dummy". You still needed the rest of it ;)

So we have the exclusion filter to prevent the parts showing in Utility

@SUBCATEGORY[Utility]:AFTER[FilterExtension]:NEEDS[ThunderAerospace]
{
@FILTER,* [COLOR=#ff0000]//[/COLOR] ,0 means the first FILTER node. ,* means all FILTER nodes
{
CHECK
{
type = title
value = Life Support, TACLS
invert = true
}
}
}

A new subcategory to put them in

//Adds TACLS parts to Life Support subcategory
SUBCATEGORY:NEEDS[ThunderAerospace]
{
name = Life Support
icon = StorageLS

FILTER
{
CHECK
{
type = title
value = Life Support, TACLS
}
}
}

And add that subcategory to the appropriate category

@CATEGORY[Filter?by?Function]:AFTER[FilterExtension]
{
@SUBCATEGORIES
{
list = 8,Life Support
}
}

PS

MM Tip: don't mix BEFORE, FOR, and AFTER, you only want one of them per patch. FOR is typically used by the mod, BEFORE/AFTER is so you can enforce when your changes happen relative to those if need be (the category edits in particular should be after to make sure something I change doesn't overwrite them).

Nope, that didn't do it :/

-.-

Edited by Crzyrndm
Link to comment
Share on other sites

Ah, the snippet I posted was just the replacement for the "-category = dummy". You still needed the rest of it ;)

Wohoo, your method works like a charm! Thanks!! I think I finally understand your mod enough to unlock it's true power:D

Just out of curiosity, what does "invert" actually invert? I can't seem to figure out its meaning from the context of the code...

There was one problem though. While I thought multiple checks in one FILTER acted as an AND condition, the following two files don't work as intended. I only want some parts from US to move to the Life Support subcategory (namely, those listed in the "title" CHECK), and the rest to stay in Utility. With these two files, the parts listed in the "title" CHECK change subcategories like intended, but the other parts just disappear and don't show up in Utility or Life Support. I'm guessing the problem is in my second file somewhere...

Either way, the second CHECK is plenty specific, so I just deleted the first CHECK and got what I want. This was just more of a test that didn't work.

SUBCATEGORY:NEEDS[UniversalStorage]
{
name = Life Support
icon = StorageLS

FILTER
{
CHECK
{
type = manufacturer
value = New Horizons & Nox Industrial
CHECK
{
type = title
value = Elektron, Sabatier Reactor, Water Purifier, C02 Canister, Food Bag, Hydrogen Tank, Oxygen Tank, Waste Tank, Water Tank, Greywater Tank, Radial Oxygen Tank
}
}
}

@SUBCATEGORY[Utility]:AFTER[FilterExtension]:NEEDS[UniversalStorage]
{
@FILTER,* //1 doesn't work either
{

[INDENT]CHECK[/INDENT]


{
type = manufacturer
value = New Horizons & Nox Industrial
invert = true
}

CHECK
{
type = title
value = Elektron, Sabatier Reactor, Water Purifier, C02 Canister, Food Bag, Hydrogen Tank, Oxygen Tank, Waste Tank, Water Tank, Greywater Tank, Radial Oxygen Tank
invert = true
}
}
}

Link to comment
Share on other sites

Just out of curiosity, what does "invert" actually invert?

"Invert = true" takes the result of that block and returns it's inverted state (so a match returns false, a miss returns true).

The issue with the disappearing parts is one of grouping. You're saying: I don't want parts manufactured by "x" and I also don't want parts that have "y" in their title (so the manufacturer block gets ALL parts by that manufacturer). To put it into a typical boolean expression:

valid = NOT(manufacturer) AND NOT(title)

When what you actually wanted to say was: I don't want the parts manufacured by "x" that have "y" in their title

valid = NOT(manufacturer AND title)

@SUBCATEGORY[Utility]:AFTER[FilterExtension]:NEEDS[UniversalStorage]
{
@FILTER,* //1 doesn't work either
{

[INDENT] CHECK
{
[/INDENT]


[INDENT=2] type = check // check types group other checks for their value (yes I know, worst name ever)
invert = true
[/INDENT]

[INDENT] CHECK
{
type = manufacturer
value = New Horizons & Nox Industrial
}

CHECK
{
type = title
value = Elektron, Sabatier Reactor, Water Purifier, C02 Canister, Food Bag, Hydrogen Tank, Oxygen Tank, Waste Tank, Water Tank, Greywater Tank, Radial Oxygen Tank
}
}
[/INDENT]


}
}

PS

The first node is a 0, that's why the 1 didn't work. * is still the best idea though

Edited by Crzyrndm
Link to comment
Share on other sites

The issue with the disappearing parts is one of grouping. You're saying: I don't want parts manufactured by "x" and I also don't want parts that have "y" in their title (so the manufacturer block gets ALL parts by that manufacturer). To put it into a typical boolean expression:

valid = NOT(manufacturer) AND NOT(title)

When what you actually wanted to say was: I don't want the parts manufacured by "x" that have "y" in their title

valid = NOT(manufacturer AND title)

Ah, that makes sense. Thanks for the clear explanation! I just fixed it and it works.:D I'll be personalizing my VAB a lot more now thanks to your mod.

Was there any readme or wiki that has goal-oriented examples like what I was trying to do? I guess you could refer us to specific config files in the Config folder; looking at them now, I understand what's going on, but before your explanations I was a bit lost.

PS

The first node is a 0, that's why the 1 didn't work. * is still the best idea though

Whoops, I thought the 1 was going to reference the second CHECK node I wrote and skip the first one... but it's actually referencing the FILTER nodes from my first file. Yes, that makes way more sense in context.

Link to comment
Share on other sites

So for all the people around here who've obviously delved into the mechanics of the new parts lists, is this the most straightforward way we've got to arrange parts now?

Pre-.90, there was mod called PartArranger that allowed you to reorganize parts within the old tabs while in the editors. It would save any changes to a text file and then load the parts lists off that.

I'd love to have something like that for the current version, but it seems like this is the only real game in town now for an organizational mod.

Link to comment
Share on other sites

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