Jump to content

[1.12.x] Filter Extensions, no Localization for now


linuxgurugamer

Recommended Posts

Originally written by @Crzyrndm, he is not active and gave permission for me to continue this.  Original thread is here:  https://forum.kerbalspaceprogram.com/index.php?/topic/93955-130-filter-extensions-304-jul-11/

Release is here:

With the stock editor now supporting custom filters in a reasonable way, creating more and better filters is the next logical step. However, the requirement for categories to be managed via code is just a terrible idea. Not to mention that there is no easy way to be compatible with anyone else. Filter Extensions allows the usage of .cfg files to create, edit, or delete all categories and sub-categories. It uses standard config files allowing for patches to be applied and dependencies allowed for using Module Manager.

Github - https://github.com/linuxgurugamer/FilterExtension

Downloadhttps://github.com/linuxgurugamer/FilterExtension/releases

It will be available on CKAN when I do a full release, probably on Sunday

License:
Icons and configs distributed with FE are under CC-BY-SA 4.0
Plugin is covered by GPLv3.

sBqMgMx.jpg
 

Configs and Icons

Configs and icons contributed by users are distributed with the download. Think something is missing and you can fill the gap? Just send the cfg's or icons my way :wink:

Docs are in the Filter Extensions Wiki

  Reveal hidden contents

Some additional explanation of the cfg structure

  Reveal hidden contents

Using Near Future Propulsion's Argon Gas resource as an example

To remove a subcategory that you don't want to show, only specify the category (Filter by /*Insert here*/) and the title shown ingame for the offending subcategory

 

 
SUBCATEGORY
{
	category = Filter by Resource
	oldTitle = Argon Gas
}

 

To change the icon and title displayed, use the keys title and icon.

 

 
SUBCATEGORY
{
	category = Filter by Resource
	title = Wheels
	oldTitle = Argon Gas
	icon = R&D_node_icon_fieldscience

}

 

 

 

 

Acknowledgements
stupid_chris
 through RealChute which I originally used as a template. Getting started would have been much more difficult without that reference.
Nertea for the idea of the icon auto-loader
KaiserSoze - Adapting many icons, sharing configs, and reporting bugs

Mod icons are mostly adaptions of:

  • Part Catalog icons - originally by BlackNecro
  • Flags, manufacturer icons, and toolbar icons included with a mod. You can find links to the mods for all included icons here

To everyone that has contributed icons and/or cfg's to make others life easier - Your generosity is sincerely appreciated

Reporting Bugs

There are two types of bugs, so depending on what your problem is, there are different steps you may need to follow

Exceptions: Red text in the alt+f2 log, functionality breaks down completely, etc.
I need the information specified here

Functional issues: If the log shows no errors, then I need

  • The config you were trying to use
  • The mod that this applies to
  • A description of the expected behaviour
  • A description of the behaviour experienced
Edited by linuxgurugamer
Link to comment
Share on other sites

Note that in the new beta will be a lot of changes and some of the stuff i copied isnt gonna work!
I copied that from the old threat, from Targa who postet this on page 22:
Found this helpful to create your own filter extensions categories.

TAC Life Support cfgs

This is what I did to create a new VAB/SPH Filter by Function category named "Life Support", place all the TAC-LS parts in it, and remove the TAC-LS parts from the Utility category. You're free to mess around with your own config files if you want something different from Filter Extensions.

Step 1: Download and install Filter Extensions mod. This should give you 2 folders. One named 000_FilterExtensions and another one named 000_FilterExtensions Configs.

Step 2: In the 000_FilterExtensions Configs folder, delete the subfolder named StockRework.

Step 3. In the 000_FilterExtensions Configs folder, open the file named FilterByFunction.cfg with Notepad or similar text editor. Add another line reading: list = 8,Life Support. It should look like the code below:

FilterByFunction.cfg - adds a new category named "Life Support"

  Reveal hidden contents

Step 4: In the 000_FilterExtensions Configs folder, open the file named SubCategories_Stock.cfg. Scroll down until you find the line "name = Utility". In this section add a check for Life Support and TACLS title. The code of that part should look like this:

Subcategories_Stock.cfg - Removes TAC-LS parts from the Utility category

  Reveal hidden contents

Step 5: In the 000_FilterExtensions Configs folder, create a new text document named Subcategories_LifeSupport.cfg, paste the following code into it and save:

Subcategories_LifeSupport.cfg - Adds all TAC-LS parts to the new Life Support filter by function category

  Reveal hidden contents

Enjoy a spam-free Utility tab in the VAB/SPH!

Universal Storage parts for life support can also be added to these filters. If you wish to move them to the Life Support tab and remove them from the Utility tab, change the following two files that you've already edited to this:

  Reveal hidden contents

Subcategories_LifeSupport.cfg

  Reveal hidden contents

 

Edited by JohnMcLane
Link to comment
Share on other sites

I've been getting a lot of help from one person, @flart, who has been extremely helpful.

But he and I can't do it alone.  If I don't get anybody else testing, then I'll end up releasing something which will have problems, and everyone will get frustrated.

The localization of this mod is a real mess and a big pain, the more eyes which look at it, the better

Link to comment
Share on other sites

@linuxgurugamer The localisation is messing up many of the SUBCATEGORY entries (e.g. parachutes, launch clamps and many others). The problem seems to be that when the "name = fe_*" line gets localised it breaks the references in the CATEGORY blocks. Example in spoiler

  Reveal hidden contents

 

Suggestion - add a displayName field to CATEGORY and SUBCATEGORY for display in the GUI and apply localisations to that field with keys that don't clash with the names.

 

Link to comment
Share on other sites

@-MadMan-@Aelfhe1m, and anybody else:

I reverted back to the version before I started the localization and went at this a different way (ie: using a new field displayName).  This has the advantage of keeping compatibility with the pre-localized versions, so that any changes I do to the files themselves will work in the old version.

Please try this out and let me know how it goes:

 https://jenkins.spacetux.net/job/A-F/job/FilterExtension/lastSuccessfulBuild/artifact/000_FilterExtensions-original-3.1.0.6.zip

Link to comment
Share on other sites

@linuxgurugamer That latest build (#51) seems to have fixed all the issues with categories and sub-categories (at least in en-us :wink:). But the filter by manufacturer tab has reverted to stock behaviour rather than showing buttons per mod folder (the config setting has no effect either). This may be related to the following message in the log:

  Quote

[Filter Extensions 3.0.1]: No category of this name was found to manipulate: lgg0 Filter by Manufacturer

Expand  

 

Link to comment
Share on other sites

  On 11/8/2017 at 3:29 AM, Aelfhe1m said:

@linuxgurugamer That latest build (#51) seems to have fixed all the issues with categories and sub-categories (at least in en-us :wink:). But the filter by manufacturer tab has reverted to stock behaviour rather than showing buttons per mod folder (the config setting has no effect either). This may be related to the following message in the log:

 

Expand  

Ah.  Looks like a debug flag wasn't deleted, I'll get it fixed and updated in a minute

Link to comment
Share on other sites

That fixed the Manufacturers filter thanks.

New issue: if the player defines a custom category that doesn't have a displayName entry (it's new after all) then FE throws an exception to the log and stops working completely.

  Reveal hidden contents

 

Link to comment
Share on other sites

New beta, 3.1.0.9:

https://jenkins.spacetux.net/job/A-F/job/FilterExtension/66/artifact/000_FilterExtensions-original-3.1.0.9.zip

  • Updated the NearFutureTechnologies category with the rest of @Nertea's mods
  • Fixed nullref if no displayName was specified for a SubCategory
  • Added check for empty displayName, if so, set it equal to the SubCategory name

So it seems I am finally getting to the end.  I verified that the nullref for the subcategory wouldn't happen for the category, that code already had a check in there.

I'm hoping this will be it, please test.  If I get good reports by this evening, I'll do a full release and update CKAN

Edited by linuxgurugamer
Link to comment
Share on other sites

  On 11/8/2017 at 10:45 AM, linuxgurugamer said:

Ummm, I'm not sure this is an issue.  It now requires the displayName, and if it's not there, it's bad data.

Garbage in, Garbage out.

Expand  

I agree completely but some mods package their own filter extension configs and it would have taken a while for them to realise they needed to update and in the meantime you'd have had people complaining about FE being broken. But you've already fixed this so problem avoided :cool:.

The latest beta seems to be working perfectly as far as I can tell. I've also put a PR on GitHub with a few suggested updates to improve support for SSTU and KSPWheels.

Link to comment
Share on other sites

  On 11/9/2017 at 3:41 PM, Aelfhe1m said:

I agree completely but some mods package their own filter extension configs and it would have taken a while for them to realise they needed to update and in the meantime you'd have had people complaining about FE being broken. But you've already fixed this so problem avoided :cool:.

The latest beta seems to be working perfectly as far as I can tell. I've also put a PR on GitHub with a few suggested updates to improve support for SSTU and KSPWheels.

Expand  

Which is why I fixed it :D

I'll take a look at the PR, thanks.

Link to comment
Share on other sites

Home stretch beta:

https://jenkins.spacetux.net/job/A-F/job/FilterExtension/70/artifact/000_FilterExtensions-original-3.1.0.11.zip

  • Fixes a null ref if engines are included which don't a have a corresponding filter rename line for the fuel mixture
  • Following contributed by @Aelfhe1m:
    • Add repulsors category to landing filter
    • Update filter for KSPWheel modules
    • Add SSTU parachutes module to filter
    • Add SSTU module types to heat shield and fairing filters
    • Add SSTU module types to solar panels filter
Link to comment
Share on other sites

Engines using unrecognised fuel mixtures (from the rename list) are no longer appearing in the advanced=>engines category (e.g. Aerozine50,NTO from SSTU).

While it's easy enough to write an MM patch for an isolated instance or two (tested with the Az/NTO mix mentioned above), there is real fuels to consider... (probably KSPIE as well though I don't have either in a 1.3.1 install at the moment)

Link to comment
Share on other sites

  On 11/10/2017 at 5:39 PM, Aelfhe1m said:

Engines using unrecognised fuel mixtures (from the rename list) are no longer appearing in the advanced=>engines category (e.g. Aerozine50,NTO from SSTU).

While it's easy enough to write an MM patch for an isolated instance or two (tested with the Az/NTO mix mentioned above), there is real fuels to consider... (probably KSPIE as well though I don't have either in a 1.3.1 install at the moment)

Expand  

The real question is, is that what was happening in the original mod?

Please try it with this:

https://github.com/linuxgurugamer/FilterExtension/releases/download/3.1.0/000_FilterExtensions-3.1.0.zip

which is the mod before I started working on it, and let me know.  The more info the better, including pictures and log file 

Thanks

Link to comment
Share on other sites

  • 2 weeks later...

Just an FYI: as it stands, if you install the version from CKAN, the program crashes.  Elided error logs from various log files below.   Not its not a bug report, just an FYI.  Uninstalling fixed the problem, reinstalling caused it to happen again.

 

  Quote

 

[UIMasterController]: ShowUI

Unity Player [version: Unity 5.4.0p4_b15b5ae035b7]
mono.dll caused an Access Violation (0xc0000005)
  in module mono.dll at 0033:0fed0e18.

Read from location 00000000 caused an access violation.

 

Expand  

I have > 100 mods installed and do not have the time to sort out what might be causing the conflict. I'm happy to wait until other things get resolved until we go on a wild bug chase that might simply be a mod conflict. 

Edited by Murdabenne
Link to comment
Share on other sites

  On 11/10/2017 at 7:13 PM, linuxgurugamer said:
Expand  

Hey there. Thank you for your great work. I wanted to test the beta since I also end up with the access violation in mono.dll with the version from ckan. However, the link above seems to be dead for me...

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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.

×
×
  • Create New...