crzyrndm / filterextension Goto Github PK
View Code? Open in Web Editor NEWExtensions to KSP's stock editor part filters
Extensions to KSP's stock editor part filters
Should check in all the modules and not only the first one for multimode engines
Deep copy of subcategory templates (used when instancing part categories here) is currently achieved by parsing each subcategory to a confignode and then back which is somewhat inefficient since this is being done on every editor entry. Should really just directly clone these, hence the new interface
I did a PR awhile back for some mods I support in which I specify Icons. Seems that the Manufacturer mappings are no longer working. The icons seem to be there but they are showing the ? icon
Do I need to update something further to make this work with latest version?
I think that this means that e.g. "size1, srf" will not be flagged as matching "srf", because it will be split into "size1" and " srf" (with a space). (I'm seeing this happen in my testing.) Maybe we need a .Trim() somewhere in there?
Please add filters:
Have at least three different implementations of contains running in different checks. A standard implementation would be significantly less error prone
Most of the big part mods have icons for them, but mods without icons show up as question marks (or not at all, in the raw dll on the repo as of this posting). It would be cool to put a mod's initials on the tab if there's no icon (like @BlackNecro's PartCatalog, but the other solution of course is to make more icons. Looking at my (heavily mod-laden) 0.25 install, as well as recalling mods I've considered using or seen around, here are some part mod folders which don't yet have icons. Given how many there are (and there will undoubtedly be more), it would probably be easiest to make some initial-generating code (or fix the lack-of-question-marks bug), but feel free to knock a few out on a rainy day (I've got some ideas for some already), especially the ones which are compatible with 0.90 or that you use personally.
(Regarding links; I put the link in the folder name when it's the name of the mod. Not every mod folder matches its name, though.)
If a category contains more than one folder subcategoriers filter are only applied to the parts in the first folder and ignore the other folders.
NFT is a good mod to test this but happens with everything.
With and without contains (separate logic), and for various equalities where applicable. I have a feeling some aren't 100% correct and it needs a thorough check anyway
got a zip package of converted icons in the repo, need to go through and check quality and then replace existing icons where appropriate
doesn't show in either rocket or jets subcategory currently
Users with narrow screens and/or low resolutions may not want to decrease available editor space further
Don't know why this isn't a thing yet
Empty sub's shouldn't be shown. Will have to brute force check it because parts are only assigned as you open them
Should convert part category to string and then do a contains on that, rather than looping through each item and converting the part category multiple times
There are too many for me to type out, but there are a bunch, and I think that Alternate Resource Panel icons would be a good place to start. Also these icons by @Olympic1 (source in this repo here), licensed under CC-BY-NC-SA.
EDIT: Does this mod by default use whatever icon has the same name as the texture? If so, and if 32x16 textures don't get stretched, we might not even have to adapt them, just make those ARP icons a recommended download. Alternatively, it seems that ARP also has a system for designating icons to be associated with resources.
The downside is that those icons are very colorful -- fine on ARP, but maybe not so desirable for fitting in with the editor. We could make greyscale non-selected versions, but then we might as well adapt them completely and make a set to include within this mod.
New stock modules in 1.1 that need to be covered
Disabled for now because it was semi-randomly deleting subcategories
https://github.com/Crzyrndm/FilterExtension/blob/master/FilterExtension/ConfigNodes/customCategory.cs#L146
It there is an icon with the name of a resource the default icon is replaced by a question mark, but not for the resource icon as it should be. So somehow it knows that there is an icon with that name, but it doesn't use it.
Tested with only DRE (minimum mod I found that add new resources), but happen with everyone I have tested.
Add a button to the settings window which writes a .txt file with every icon name and it's location
eg.
cs_main, Squad\PartList\SimpleIcons\cs_main.png
Is it permissible to have the same SUBCATEGORY set in two different configs? I have a "Naval" config and a "SMSolutions" config I am working on and the following seems to cancel each other out. Attaching the full configs
SUBCATEGORY
{
name = SM Marine
icon = smsolutions
FILTER
{
CHECK
{
type = path
value = SM_Marine
}
}
}
Division in convertToColor is integer division, and so everything other than 0xff ends up as zero.
FilterExtensions does not work (doesn't show up) and NullReferenceException
Full Log: https://mega.nz/#!rwtQQJbR!INH47g23TxPXFKB_bZQLs99AaIMkWk2Lsizn8gSjYNk
NullReferenceException
at (wrapper managed-to-native) UnityEngine.MonoBehaviour:StartCoroutine_Auto (System.Collections.IEnumerator)
at UnityEngine.MonoBehaviour.StartCoroutine (IEnumerator routine) [0x00000] in :0
at FilterExtensions.Editor.StartEditor () [0x00000] in :0
at EventVoid.Fire () [0x00000] in :0
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
EventVoid:Fire()
KSP.UI.Screens.c__Iterator123:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
UnityEngine.MonoBehaviour:StartCoroutine_Auto(IEnumerator)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
KSP.UI.Screens.PartCategorizer:Setup()
EventVoid:Fire()
KSP.UI.Screens.EditorPanels:ShowPartsList(Action)
EditorLogic:SelectPanelParts(Boolean)
EditorLogic:StartEditor(Boolean)
c__Iterator30:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
It seems that right now categories requires a type and a value or it doesn't works.
It seems to always try to read that data.
Also not matter what type is set it interprets value as the folder for the filter. (not only with categories with type = mod as expected)
The result is that is not possible (or at least I can't) make a categories that includes part for all the folders.
KSP 1.3.1.1891
modulemanager 3.0.0
all installed and updated via CKAN (manually added only RSS and KSCSwitcher)
added logs
2017-12-02_222900.zip
See description at BobPalmer/CommunityCategoryKit#12. I believe the problem is on CCK's end but I am noting it here for visibility.
Creative Commons themselves suggest not using CC licenses on software. The GPL v3 keeps the share-alikeness, adds some extra freedom goodness with respect to software-specific issues (e.g. source code availability, patents, and DRM), and is a little more straightforwardly compatible with more software projects. (EDIT: the attribution bit is also covered, in that forks must "keep intact all notices" of copyright, and requiring attribution also falls under the permitted "additional terms" of the GPL, e.g. "Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version.") The only "loss" compared to CC-BY-NC is the restriction against non-commercial use, but I figure if somebody figures out a way to make money on something you're giving away for free, more power to 'em. ;) In all seriousness, YouTube videos are commercial derivative works, especially when the creator gets paid, as some of the higher-profile ones are.
(The CC license family does make plenty of sense for art assets, like the icons, though I'd suggest losing the -NC where it's possible, for the same reason as above.)
When the autoag select the part it skips part whose name has dot "." in the name.
Example of part not being loaded:
PART
{ name = My.part
.....
Found this with Gingercorp (http://forum.kerbalspaceprogram.com/threads/80575), which is only a 2 part mod easy to make test.
If part are renamed from the original name to one without "." they are loaded
ModuleManager will rebuild it's ConfigCache whenever something changes in the Gamedata directory. It ignores folders named "PluginData" and everything inside, but any other changed file will trigger a cache rebuild.
GameData/000_FilterExtensions/Settings.cfg updates it's modification time on every startup; given it's place in the alphabet, I'm afraid this happens before MM gets to look for changed files.
Is it necessary that this file gets rewritten, and has to sit in a place where ModuleManager considers it for purposes of cache validation?
Traditionally CKAN has indexed FilterExtensions in a modular fashion with FilterExtension
as the base mod with FilterExtensionsDefaultConfig
and FilterExtensionsStockRework
extending functionality by installing the 000_FilterExtensions Configs
and 000_FilterExtensions Configs/StockRework
folders respectively. In the latest release instead of a StockRework folder there's a .zip (CKAN is unable to unzip a file inside a mod .zip). So with the background out of the way I'm inquiring as to whether this is something that will be changed in future versions or if this is how the mod's packaging will remain.
Thanks.
Using FilterExtension 1.15.2 installed via CKAN, I noticed, that some parts appeared in "Kerbonauts and Control" -> "Passengers" and "Kerbonauts and Control" -> "Multiple Kerbals" that shouldn't appear there.
I started a fresh sandbox game to see all parts and thus found out, that all of those parts have in common that they should not appear at all in the VAB parts list (i.e. should not be buildable at all).
For me those parts are
I guess, the inverted crew check doesn't work for those disabled parts for some reason. Given that the first one (the rock) is a stock part and assuming it's the same bug for all those parts, this should be reproducible without the mods, I hope.
I'm using the x86_64 Linux version of KSP 0.90.0 if that matters.
I did not find anything relevant in Player.log.
Great Mod, BTW. It's just what I was still missing.
Subject says it all. I have KW, and in career nothing showed up. I went into a sandbox game, and only 2 parts showed up: 5m P-fairing base & 5m P-Fairing base expanded. Nothing else.
Starting a test install of KSP 1.2.2 with FilterExtension 2.8.1 and nothing else, going into the editor I find that only the pod category has anything. Fuel tanks, engines, etc. all gone. When filtering by e.g. cross-section, same story -- it only shows pods of the relevant size. This doesn't happen with FE 2.8.0.2.
The log only has this (out of the ordinary) to say: "UIList: RemoveItem didn't find any item to remove."
Rather than dig through the commits, what about a changelog? IIRC, git or GitHub has a means to automagically generate something like that.
The Science/Data Transmitter subcategory is overflowing with command pods and probe cores (because of their INTERNAL antennas), which are not really what I'm after when looking for "proper" antennas. It would also be nice to have direct and relay antennas live in distinct categories.
It's a minimal install for testing.
excerpt of ksp.log containing all FE entries: only the first line is visible using 2.8.1.2
[WRN 10:27:28.459] [Filter Extensions 3.0.0.0]:
[LOG 10:27:28.488] [ModuleManager] Total loading Time = 30.793s
[LOG 10:27:28.561] [ApplicationLauncher] Awake False
[LOG 10:27:28.563] [ApplicationLauncher] SpawnSimpleLayout: VerticalTopDown
[LOG 10:27:28.574] [UiApp] Awake: MessageSystem
[LOG 10:27:28.575] [ApplicationLauncher] OnSceneLoadedGUIReady: scene MAINMENU ShouldBeVisible() True ShouldBeOnTop() True iIsPositionedAtTop True
[LOG 10:27:28.649] [Filter Extensions 3.0.0.0]: resource name already exists, abandoning generation for Liquid Fuel
[LOG 10:27:28.650] [Filter Extensions 3.0.0.0]: resource name already exists, abandoning generation for Oxidizer
[LOG 10:27:28.651] [Filter Extensions 3.0.0.0]: resource name already exists, abandoning generation for Ablator
[LOG 10:27:28.651] [Filter Extensions 3.0.0.0]: resource name already exists, abandoning generation for Electric Charge
[LOG 10:27:28.652] [Filter Extensions 3.0.0.0]: resource name already exists, abandoning generation for Intake Air
[LOG 10:27:28.652] [Filter Extensions 3.0.0.0]: resource name already exists, abandoning generation for Mono Propellant
[LOG 10:27:28.653] [Filter Extensions 3.0.0.0]: resource name already exists, abandoning generation for Solid Fuel
[LOG 10:27:28.654] [Filter Extensions 3.0.0.0]: resource name already exists, abandoning generation for Xenon Gas
[LOG 10:27:28.654] [Filter Extensions 3.0.0.0]: resource name already exists, abandoning generation for Ore
[WRN 10:27:28.675] [Filter Extensions 3.0.0.0]: Could not load type 'KSP.Localization.Localizer' from assembly 'FilterExtensions'.
[WRN 10:27:28.676] [Filter Extensions 3.0.0.0]: Could not load type 'KSP.Localization.Localizer' from assembly 'FilterExtensions'.
[WRN 10:27:28.676] [Filter Extensions 3.0.0.0]: Could not load type 'KSP.Localization.Localizer' from assembly 'FilterExtensions'.
[WRN 10:27:28.677] [Filter Extensions 3.0.0.0]: Could not load type 'KSP.Localization.Localizer' from assembly 'FilterExtensions'.
[WRN 10:27:28.678] [Filter Extensions 3.0.0.0]: Could not load type 'KSP.Localization.Localizer' from assembly 'FilterExtensions'.
[WRN 10:27:28.678] [Filter Extensions 3.0.0.0]: Could not load type 'KSP.Localization.Localizer' from assembly 'FilterExtensions'.
[WRN 10:27:28.679] [Filter Extensions 3.0.0.0]: Could not load type 'KSP.Localization.Localizer' from assembly 'FilterExtensions'.
[WRN 10:27:28.680] [Filter Extensions 3.0.0.0]: Could not load type 'KSP.Localization.Localizer' from assembly 'FilterExtensions'.
[WRN 10:27:28.680] [Filter Extensions 3.0.0.0]: Could not load type 'KSP.Localization.Localizer' from assembly 'FilterExtensions'.
[WRN 10:27:28.681] [Filter Extensions 3.0.0.0]: Could not load type 'KSP.Localization.Localizer' from assembly 'FilterExtensions'.
[WRN 10:27:28.682] [Filter Extensions 3.0.0.0]: Could not load type 'KSP.Localization.Localizer' from assembly 'FilterExtensions'.
[WRN 10:27:28.682] [Filter Extensions 3.0.0.0]: Could not load type 'KSP.Localization.Localizer' from assembly 'FilterExtensions'.
[WRN 10:27:28.683] [Filter Extensions 3.0.0.0]: Could not load type 'KSP.Localization.Localizer' from assembly 'FilterExtensions'.
[WRN 10:27:28.683] [Filter Extensions 3.0.0.0]: Could not load type 'KSP.Localization.Localizer' from assembly 'FilterExtensions'.
[WRN 10:27:28.684] [Filter Extensions 3.0.0.0]: Could not load type 'KSP.Localization.Localizer' from assembly 'FilterExtensions'.
[WRN 10:27:28.685] [Filter Extensions 3.0.0.0]: Could not load type 'KSP.Localization.Localizer' from assembly 'FilterExtensions'.
[LOG 10:27:28.721] [UIApp] Adding MessageSystem to Application Launcher
[LOG 10:27:28.732] [ApplicationLauncher] SetHidden:
[LOG 10:27:28.753] [MessageSystem] OnAppInitialized
[LOG 10:27:28.755] [MessageSystem] Reposition 0.125647 32274
[LOG 10:27:40.261] [ReflectionUtil]: Found 4 types with UpgradeModule attribute in 11 assemblies.
[LOG 10:27:40.273] [KSPUpgradePipeline]: default (1.2.2) is up to date.
[LOG 10:27:40.279] [ExperienceSystem]: Found 0 trait types
[LOG 10:27:40.282] [ExperienceSystem]: Found 25 effect types
[WRN 10:27:40.290] [GameParameters]: Couldn't find type for custom parameter FESettings.
[LOG 10:27:40.308] [ScenarioTypes]: List Created 18 scenario types loaded from 11 loaded assemblies.
[LOG 10:27:40.311] [UIMasterController]: HideUI
[LOG 10:27:40.312] [HighLogic]: =========================== Scene Change : From MAINMENU to SPACECENTER (Async) =====================
[LOG 10:27:40.453] [AddonLoader]: Instantiating addon 'TRActivator' from assembly 'Texture Replacer'
[LOG 10:27:40.455] [UIMasterController]: HideUI
[LOG 10:27:41.305] [AddonLoader]: Instantiating addon 'ContractDefs' from assembly 'KSP'
[LOG 10:27:41.316] [AddonLoader]: Instantiating addon 'CustomConfigsManager' from assembly 'ModuleManager'
[LOG 10:27:41.317] [AddonLoader]: Instantiating addon 'FMRS_Space_Center' from assembly 'FMRS'
[LOG 10:27:41.321] windowPos loaded from file
[LOG 10:27:41.324] [AddonLoader]: Instantiating addon 'FMRS_Register' from assembly 'FMRS'
[LOG 10:27:41.325] [AddonLoader]: Instantiating addon 'RecoveryController' from assembly 'RecoveryController'
[LOG 10:27:41.327] [AddonLoader]: Instantiating addon 'TRActivator' from assembly 'Texture Replacer'
[LOG 10:27:41.327] [AddonLoader]: Instantiating addon 'TRGui' from assembly 'Texture Replacer'
[LOG 10:27:42.955] [UIMasterController]: HideUI
[WRN 10:27:43.017] [GameParameters]: Couldn't find type for custom parameter FESettings.
[................] [ScenarioDestructibles]: Loading... 0 objects registered
[LOG 10:27:46.204] [Filter Extensions 3.0.0.0]: Starting on general categories
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.