New Mod: Filter Selection

Everything about mods can be found here.

Moderator: Morax

New Mod: Filter Selection

Postby Jip » 16 Aug 2016, 12:29

Hello everyone,

I've been working on this mod for a while now (made a couple of posts too) and it's finally in a state that I can be proud of!

What the mod does is filter the current unit selection on the filters selected. The filters work through categories, so you can easily filter out (or filter in, aka: deselect the rest) all the hover units for example.

The mod can be downloaded from here:
http://81.207.237.170/Jip/SC_FilterSele ... ref=master

Once downloaded, make sure to rename the folder to "FilterSelection" (without the quotes, of course).
Due to Git the name gets messy.

Some hotkey information:
F = Filter
Shift + F = change filter type (red = filter out, green = filter in)
D + 1 through D + 5 = tick the filters on / off.

All the hotkeys and filters can be changed / added in the config file, located inside the mod folder.
The mod also contains extra information about how to add in your own filters.

Now, I tried to upload this to FaF. But for some reason, it does not allow me.
If anyone could upload this to the vault, it'd appreciate it a lot.

Either way, I wanted to bring this into the world because I heard from people that they could really use this.

Any feedback on the mod would be appreciated!

Lots of love,
Jip
Jip
Avatar-of-War
 
Posts: 51
Joined: 12 Jul 2015, 22:25
Has liked: 3 times
Been liked: 11 times
FAF User Name: Jip

Re: New Mod: Filter Selection

Postby nine2 » 17 Aug 2016, 12:41

WARNING: Warning: Unable to find file: /textures/ui/aeon/mods/FilterSelection/textures/Aeon/tab/tab-open_btn_down.dds
WARNING: stack traceback:
WARNING: ...ramdata\faforever\gamedata\lua.nx2\lua\ui\uiutil.lua(425): in function `UIFile'
WARNING: ...rselection\modules\helpmodules\helpuserinterface.lua(39): in function `RetrieveIcon'
WARNING: ...rselection\modules\helpmodules\helpuserinterface.lua(26): in function `CreateButton'
WARNING: ...iance\mods\filterselection\modules\userinterface.lua(21): in function `CreateUI'
WARNING: ...\faforever\gamedata\lua.nx2\lua\ui\game\gamemain.lua(1101): in function <...\faforever\gamedata\lua.nx2\lua\ui\game\gamemain.lua:1097>
WARNING: ...\faforever\gamedata\lua.nx2\lua\ui\game\gamemain.lua(1114): in function <...\faforever\gamedata\lua.nx2\lua\ui\game\gamemain.lua:1113>
WARNING: ...\faforever\gamedata\lua.nx2\lua\ui\game\gamemain.lua(1126): in function `CreateUI'
WARNING: ...\faforever\gamedata\lua.nx2\lua\ui\game\gamemain.lua(408): in function <...\faforever\gamedata\lua.nx2\lua\ui\game\gamemain.lua:402>
WARNING: Warning: Unable to find file: /textures/ui/aeon/mods/FilterSelection/textures/Aeon/tab/tab-open_btn_dis.dds
nine2
Councillor - Promotion
 
Posts: 2416
Joined: 16 Apr 2013, 10:10
Has liked: 285 times
Been liked: 515 times
FAF User Name: Anihilnine

Re: New Mod: Filter Selection

Postby nine2 » 17 Aug 2016, 12:43

Doesn't work for me, I tried the F hotkey, shift F keys and they did nothing. Couldn't see any UI changes at all.

FAF vault is broken and no they can't upload it manually for you, I tried that.

You could rename the folder and zip it :)

I like the idea.
nine2
Councillor - Promotion
 
Posts: 2416
Joined: 16 Apr 2013, 10:10
Has liked: 285 times
Been liked: 515 times
FAF User Name: Anihilnine

Re: New Mod: Filter Selection

Postby Jip » 17 Aug 2016, 18:24

Mmhh, that is really weird. I don't have any of those issues.

But this path: /textures/ui/aeon/mods/FilterSelection/textures/Aeon/tab/tab-open_btn_down.dds

Makes absolutely no sense?
Where did you put your mods into?

If you put it into My Documents -> My Games -> Gas Powered -> Supreme FA -> Mods -> FilterSelection, then it works completely fine.
Two friends of mine already tested it out.

So that remains the question, where did you put the mod? ^^
And how can I accomodate that location too?

Lots of love,
Jip

PS: Thanks for looking at it, I really appreciate it.
Jip
Avatar-of-War
 
Posts: 51
Joined: 12 Jul 2015, 22:25
Has liked: 3 times
Been liked: 11 times
FAF User Name: Jip

Re: New Mod: Filter Selection

Postby Uveso » 18 Aug 2016, 03:53

Well after downloading and renaming the main dir to FilterSelection (there is also a subdir namend FilterSelection with the same content as in the main dir. Thats confusing!) it worked without error.

I like the small filter window on the top of the screen. Look like it where there since the game was made :)

And pressing d+1 should be better explained. Like you have to press the "D" key and the "1" key at the same time.
I didnt know, that you can use "D" as key modifyer like SHIFT and ALT. So i expected to press fist "D" then release "D" and then pressing "1".

I also walked through the files and scripts. I like your programm style with a lots of comment lines. Nice work.

I am wondering, why are there 530 icons inside "Mods\FilterSelection\textures\icons" ?
And additional info sould be found in "/info/*.txt" but there are .lua files, not text files.

But i can't use the mod. What does the filter do ?
I activated and deactived several filters, and selected several units. I don't saw a difference. :(
User avatar
Uveso
Supreme Commander
 
Posts: 1788
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 70 times
Been liked: 291 times
FAF User Name: Uveso

Re: New Mod: Filter Selection

Postby Uveso » 18 Aug 2016, 04:57

lol ok, i got it.

And yes, i can select airplanes and tanks, then just pressing "F" and i only have tanks in my selection.

That's awesome!

No more unwanted planes in my selections. Dude, you made my day :D

I like your mod :)

Btw, i would like to change the keybinding from [SHIFT]+[F] to [SHIFT]+[D].
Its more intuitive to make the "toggle all key" the same as the single toggle switch.

Good work!

[Edit]
If i hover the mouse over the Air icon, the tooltip shows:
- Filter all the air units.

Should me more look like:
- Deselects air units (by pressing "F")
or something like this.

And i dont know what ASF is ? What is that ?

[Edit of Edit] :)
I need one more category -> "EXPERIMENTAL"
If an experimental gets a moveorder with some other units inside the platoon they will spread over the half map.
This is so annoying :D

[Last Edit] :mrgreen:
Pressing D+1 D+2... and clicking the icons will post 1 2 ... as "INFO" into the debug-log window. :)
If you still need this, then type
SPEW('text') instead of LOG('text')
This will make the INFO text to a DEBUG text. and you will only see it, if you check "Debug" inside the Debug-Window.

I can barely see what icon is activated. The red? indicator border is to small for me.

And even if i dont know what ASF is, its need a better icon background.
It looks unfinished with a black backgound.

well i dont find anything else, but in my eyes those icon backgrounds are a little bit washy:
deselecth.png
deselecth.png (14.22 KiB) Viewed 3840 times

if you just reduce the brightness by 10% and add 20% contrast, it looks better
deselectd.png
deselectd.png (14.24 KiB) Viewed 3840 times


Thats all. :mrgreen:
User avatar
Uveso
Supreme Commander
 
Posts: 1788
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 70 times
Been liked: 291 times
FAF User Name: Uveso

Re: New Mod: Filter Selection

Postby Jip » 18 Aug 2016, 14:50

@Uveso,

Great to hear you figured it all out!

Indeed, those files are also in LUA. The reasoning for this is unknown to me right now, haha.
I'll get them changed. The link should remain the same.

The reason it says filters instead of deselect is because you can reverse the filter by pressing Shift + F.
That way you include all the selected categories, instead of excluding them
Aka: If you have planes and tanks selected, and want to include the planes, the tanks get deselected.

You can easily add in your own filters, within the config file.
You do need to open it in Notepad++ or some similiar code-editor, Notepad itself puts everything on 1 line, I don't get why it does that.
Perhaps it has to do with the fact that notepad does not recognize the new line characters, used within Sublime Text.

ASF is an Aerial Superior Fighter, aka: tech 3 Anti Air Air (Tech 3 Air Anti Air?).
The super strong anti air flying units.

Thanks for reminding me about the DEBUG, I'll remove that too in the next version.

I do not fully understand what you mean with the icon backgrounds looking a bit washy, could you be more clear?
(as in, it's not truely black?)

I'll also fix the subdirectory - that's not supposed to be there.

Great to hear you like the mod!
I love the feedback!

PS: The reason for the 530 icons is because people can easily make their own filters.
However, what would a filter be without a proper icon of the unit type you want to filter with it?
People can easily choose an icon that is already in there, or add in his / her own icon.
Jip
Avatar-of-War
 
Posts: 51
Joined: 12 Jul 2015, 22:25
Has liked: 3 times
Been liked: 11 times
FAF User Name: Jip

Re: New Mod: Filter Selection

Postby Uveso » 18 Aug 2016, 18:27

I am red/green color blind, so i didnt saw the differenc if i press [SHIFT]+[F]. I only saw blue and something else. :(
Maybe this is also the reason, why i think that the icons are washy.

I added a new filter for experimentals in config.lua and it works perfect :)
But i cant access the icons from the original game from there, because "/mods/FilterSelection/textures/" is added to every filepath.

And some filepath are not found inside "Help Texture.lua":
(If you check "Debug" inside the debug-window you can see this)
Code: Select all
DEBUG: [uiutil.lua, function UIFile()] - Unable to find file:/textures/ui/uef/mods/FilterSelection/textures/UEF/tab/tab-open_btn_up.dds
DEBUG: [uiutil.lua, function UIFile()] - Unable to find file:/textures/ui/uef/mods/FilterSelection/textures/UEF/tab/tab-open_btn_over.dds
DEBUG: [uiutil.lua, function UIFile()] - Unable to find file:/textures/ui/uef/mods/FilterSelection/textures/UEF/tab/tab-open_btn_down.dds
DEBUG: [uiutil.lua, function UIFile()] - Unable to find file:/textures/ui/uef/mods/FilterSelection/textures/UEF/tab/tab-open_btn_dis.dds
DEBUG: [uiutil.lua, function UIFile()] - Unable to find file:/textures/ui/uef/mods/FilterSelection/textures/UEF/tab/tab-close_btn_up.dds
DEBUG: [uiutil.lua, function UIFile()] - Unable to find file:/textures/ui/uef/mods/FilterSelection/textures/UEF/tab/tab-close_btn_over.dds
DEBUG: [uiutil.lua, function UIFile()] - Unable to find file:/textures/ui/uef/mods/FilterSelection/textures/UEF/tab/tab-close_btn_down.dds
DEBUG: [uiutil.lua, function UIFile()] - Unable to find file:/textures/ui/uef/mods/FilterSelection/textures/UEF/tab/tab-close_btn_dis.dds
DEBUG: [uiutil.lua, function UIFile()] - Unable to find file:/textures/ui/uef/mods/FilterSelection/textures/generic_normal.dds
DEBUG: [uiutil.lua, function UIFile()] - Unable to find file:/textures/ui/uef/mods/FilterSelection/textures/generic_down.dds
DEBUG: [uiutil.lua, function UIFile()] - Unable to find file:/textures/ui/uef/mods/FilterSelection/textures/generic_over.dds
DEBUG: [uiutil.lua, function UIFile()] - Unable to find file:/textures/ui/uef/mods/FilterSelection/textures/generic_up.dds
INFO: Helpuserinterface: Can't find icon in path: /mods/FilterSelection/textures/icons//textures/ui/common/icons/presets/tech-exp.dds
DEBUG: [uiutil.lua, function UIFile()] - Unable to find file:/textures/ui/uef/textures/ui/common/icons/units/default_icon.dds
DEBUG: [uiutil.lua, function UIFile()] - Unable to find file:/textures/ui/uef/mods/FilterSelection/textures/FilterNeutral.dds
DEBUG: [uiutil.lua, function UIFile()] - Unable to find file:/textures/ui/uef/mods/FilterSelection/textures/FilterOut.dds
DEBUG: [uiutil.lua, function UIFile()] - Unable to find file:/textures/ui/uef/mods/FilterSelection/textures/FilterIn.dds
DEBUG: [uiutil.lua, function UIFile()] - Unable to find file:/textures/ui/uef/mods/FilterSelection/textures/icons/air.dds
DEBUG: [uiutil.lua, function UIFile()] - Unable to find file:/textures/ui/uef/mods/FilterSelection/textures/icons/land.dds
DEBUG: [uiutil.lua, function UIFile()] - Unable to find file:/textures/ui/uef/mods/FilterSelection/textures/icons/sea.dds
DEBUG: [uiutil.lua, function UIFile()] - Unable to find file:/textures/ui/uef/mods/FilterSelection/textures/icons/amph.dds
DEBUG: [uiutil.lua, function UIFile()] - Unable to find file:/textures/ui/uef/mods/FilterSelection/textures/icons/UAA0303_icon.dds
DEBUG: [uiutil.lua, function UIFile()] - Unable to find file:/textures/ui/uef/mods/FilterSelection/textures/UEF/bracket/bracket_bmp_t.dds
DEBUG: [uiutil.lua, function UIFile()] - Unable to find file:/textures/ui/uef/mods/FilterSelection/textures/UEF/bracket/bracket_bmp_m.dds
DEBUG: [uiutil.lua, function UIFile()] - Unable to find file:/textures/ui/uef/mods/FilterSelection/textures/UEF/bracket/bracket_bmp_b.dds

The line with "Helpuserinterface" was from me, while i tried to add the experimental icon.

Maybe you could use the original filepath, and only if an icon is not found there, use the mod directory ?
(Thats why i asked for the 500 icon clones/copies)
User avatar
Uveso
Supreme Commander
 
Posts: 1788
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 70 times
Been liked: 291 times
FAF User Name: Uveso

Re: New Mod: Filter Selection

Postby Jip » 18 Aug 2016, 23:32

@ Uveso,

To be honest, I didn't take color blind people into account.
What two colors should I use to still make it feel logical, but also allow you to see the difference?
(aka, blue, red and green, swap out the red / green with some other color)

True, only the icons available inside the icons folder are right now considered.
I could add a simple check to check the game files afterwards, if it's not succesfull.
Question is, all the ingame icons are already present - the reason they are present the way they are is because 95% of the people using the mod will not know how to get to the originial icons simply because they do not their name, let alone that they know the possibility. Therefore I thought, lets just extract all the icons and make it more easy for everyone.

About the warnings - I know they are there.
Thing is, they do show ingame.
Which is why I don't understand the reason for the function to throw the error.

Right now I'm quite busy with other projects (not Supreme Commander related, sadly).
I'll give the mod an update next week, any other good points will be added to the mod too!

Lots of love,
Jip
Jip
Avatar-of-War
 
Posts: 51
Joined: 12 Jul 2015, 22:25
Has liked: 3 times
Been liked: 11 times
FAF User Name: Jip

Re: New Mod: Filter Selection

Postby Uveso » 19 Aug 2016, 17:41

You could use Yellow instead of green or red.

Ok, i understand the reason why you put those icons there.

The warnings from uiutil.lua are valid. Since icedreamer was implementing the global icon support mod from Black ops, it will search for icons on HDD, and if they are not found, you will have this error.
In this case the original string will be returned. And the original filepath will lead to the icon inside your mod. Thats the reason why this works even with this error.

Have a nice weekend!
User avatar
Uveso
Supreme Commander
 
Posts: 1788
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 70 times
Been liked: 291 times
FAF User Name: Uveso

Next

Return to Mods & Tools

Who is online

Users browsing this forum: No registered users and 1 guest