#Fassst Selectionssss Widget

1 messages · Page 1 of 1 (latest)

little spire
#

TLDR: you control some units -> those units automagically become a squad. With the widget hotkey you can select a whole squad closest to your mouse cursor.

My friend (playername yyyy) made this QoL widget for unit selection that I think needs to be in the base game.

The main goal of the widget is to allow you to "select units as fast as possible, moving towards the larger lofty goal of controlling units at the speed of thought". Currently this is done by creating a new type of temporary group, called a squad. The widget automagically creates these subgroups/squads whenever you issue a command to selected units (specifically on right-click).
Then using a hotkey registered by the widget, we can quickly select any of those squads again based on proximity to the mouse cursor.

It's difficult to demonstrate how useful this is with just a video but still here's a quick demo. Please do try out the widget yourself in a skirmish game to really understand how useful it is.

For example, if you have 10 grunts selected and you move them closer to the enemy, that selection becomes a squad. You can now reselect all 10 using the widget's hotkey, without having to draw a selection box. Often this means that you only need to move your mouse to a single location (the destination).
If you in any way select 4 of those grunts and issue them a move or any other command, those 4 grunts become a new squad, so at this point you will have two squads, one with 6 grunts and one with 4 grunts. With the hotkey you can quickly select either of those squads again based on which squad is closer to your mouse cursor.
If you later reselect all 10 grunts and do a right click, the widget merges the two squads back into one.

These squads are internal to the widget, you can still have those grunts in an ordinary control group or autogroup as well.

#

In 1v1 especially, we often have many groups of units scattered across the map, making control groups impractical. This widget lets you manage any number of squads quickly and effectively with minimal overhead.

In my opinion this widget provides such a big QoL improvement that I'm personally afraid to use it until it becomes a default widget. Once you experience selecting squads this way, going back to box selection and control groups feels terrible. If widgets get disabled in competitive play, anyone who learned to rely on this would be at a massive disadvantage.

#

Features:

  • Proximity-based selection: the widget provides a function closest_group_select to select the squad closest to the mouse cursor. This allows for very quick selection of squads without having to manually box-select them.
  • Split selection: the widget provides a function split_select to split the current selection into two squads based on proximity to the mouse cursor. This is very similar to the default 'select PrevSelection++_ClearSelection_SelectPart_50+' functionality, except that the split is done based on proximity to the mouse cursor and also you can specify the split ratio differently. For example bind sc_s split_select 0.25 0.5 0.75 1 means that pressing the s hotkey once will select 25% of the units closest to the mouse, pressing it twice will select 50%, etc.
  • Transfer selection: the widget provides a function closest_group_transfer to transfer the current selection into the squad closest to the mouse cursor. This is useful for recombining squads, or for joining new units from the lab into existing squads.
  • Multiple autogroup support: the widget supports multiple autogroups and ungrouped units. Each autogroup has its own set of squads. For example, suppose you have sharpshooters in autogroup 1 and welders in autogroup 2, and you select them all and split that selection in half. Then after you issue a command to that new selection the widget will create two new squads for sharpshooters and welders separately.
#

Example hotkey setup (Note: These keys will likely conflict with your current setup. I'm not sure which keys would be best to use as an example, please tell me and then I will edit this). Also, only one of these is actually necessary:

bind sc_z closest_group_select discard 1
bind sc_x closest_group_select discard 2
bind sc_c closest_group_select discard 3
bind Shift+sc_z closest_group_select append 1
bind Shift+sc_x closest_group_select append 2
bind Shift+sc_c closest_group_select append 3
bind Ctrl+sc_z closest_group_transfer 1
bind Ctrl+sc_x closest_group_transfer 2
bind Ctrl+sc_c closest_group_transfer 3
bind sc_s split_select 0.25 0.5 0.75 1
bind sc_d closest_group_select discard any
bind Shift+sc_d closest_group_select append any
bind Ctrl+sc_d closest_group_transfer any
#

yyyy doesn't have Discord so I'm acting as liaison. He's open to suggestions, improvements, and also collaboration if anyone is interested in helping him develop this further.

He copy-pasted some code from other sources and maybe it's also fair to say that he's not the most experienced widget developer. At the same time he's willing to rewrite and improve this widget further BUT only if there's a realistic chance of this becoming a default widget.

Possible improvement for example is a visual indication of the squads.

lost shoal
#

Interesting

little spire
#

The long list of hotkeys might be intimidating. The only hotkey needed to try out the widget is bind sc_d closest_group_select discard any.

fleet oar
#

Very interesting widget.

little spire
midnight hemlock
#

Who would be the person to ping to approve this?

little spire
#

Just to be a bit more precise, the widget is not ready for approval yet, it's only a prototype. The concept itself needs to be pre-approved so yyyy can continue spend time on it and eventually make it ready for approval.
But yeah, it would be nice to know who would be the person to ping for pre-approval, maybe @red echo?

fleet oar
little spire
#

I guess the issue is just that this widget approval process is a bit opaque.

This is probably not an issue for most widgets though. For example the 'Area Rebuild' widget seems very fun and useful but I don't think anyone really cares if it's default or not. If I were to install that widget, I would use it occasionally and if custom widgets are disabled, well I would just rebuild stuff manually, no big deal.

But this selection widget is different. I think nobody should use it until it becomes default. Partly because it can be considered a bit unfair to use it when others don't have it, but also because this is not a widget just to use occasionally, it's a widget that could replace the primary method of selecting units at least for 1v1 players.
Losing that primary method when custom widgets are disabled would be crippling.

#

Catch 22 kind of thing. Nobody will use it until it's default, but it won't become default with the approval process we have now (if I understand that process correctly).

red echo
#

I see. It looks really awesome. So, the last selection of units closest to the cursor becomes a group selectable via hotkey?

little spire
red echo
#

Ok, mirrored internally. I like it!

dense flint
#

This looks really nice indeed. You might even be able to get rid of the hotkey itself, by letting a left click "near" a squad select it, and deselecting if it "far" enough away. That is something that needs testing if it's intuitive enough though.

little spire
dense flint
#

Definitely needs a good check indeed and edge cases may make it fail. It needs to be predictable and consistent. I can't think of a case that would break it though (doesn't mean it doesn't exist)

little spire
# dense flint Definitely needs a good check indeed and edge cases may make it fail. It needs t...

I was thinking of things like, what if a tool or command is active such as fight or set target, I assumed it would be difficult to consider all these things in the widget itself.

But thinking about it more, I'm now pretty sure it would actually be very easy since the selecbox widget (unit_smart_select.lua) has solved the same problem with negative layer value and such.
So yeah, I think it could work on simple left click.

torn fractal
#

wow, this would be a huge QoL improvement for steam deck / controller gaming

jagged plaza
#

@little spire can you ask yyyy to contact me (he should have my email) I want to work on this with him.

fleet oar
little spire
#

I would like to help as well. In fact I already have a competing implementation I made to show him a way to avoid the issue with control groups (with his implementation, we can't have squads that have units from multiple control groups).

But my problem is, that I think our goal is very different. I would like something which is simple and useful at some things while he wants something perfect and complex that solves all the problems and answers to all use cases.
If you agree with my approach, maybe you could help me convince him to just make a simple version of the widget first?

jagged plaza
#

fwiw I think having competing implementations is a great idea

#

And I think his ambition is pretty respectable, so I don't think I'd want to convince him to do what you're doing any more than I'd want to convince you to do what he's doing.

little spire
#

that's fair

jagged plaza
#

But trading results from your experiments is a great idea

little spire
#

I also have questions, I mean the type of questions I think the community should answer. Do you think I should share them here or on github/element with you two first?

#

Here's one:

#

When should a squad be created?

  1. when we press the right mouse button (this is my preference)
  2. when we issue a command

I prefer the simple right click option because that's simple and intuitive, and also easy to implement (already implemented). It wouldn't create squads with some commands, for example we can give a fight command with left click drag and this wouldn't create a squad, but I think that's fine, we probably already have those units in a squad anyway.
And I think it would even be useful to give some commands without creating a squad, for example I might want to select just one unit out of a squad and give it an attack circle command with left click on a tick to kill that but I don't want that one unit to be in its own squad. Same with bombers to set individual targets while keeping them all in the same squad.

If it creates squads with every command, then it's just not easy to see when that would happen, for example would a guard command create a squad? And I just don't see what we would gain from that.

little spire
#

yeah but if yyyy has his own preference, the widget will do that right?

#

I mean, I don't want competing implementation that essentially steals credit and makes it difficult to have either one as a default widget. We should focus on one and that should be his since he had this great idea in the first place

jagged plaza
# little spire ## When should a squad be created? 1. when we press the right mouse button (thi...

Issuing a command would be my preference, but highly recommend you experiment with that.
Could even make the squad on selection. That could be super useful in some cases.
But then there's the question of control. I think there needs to be some way to express the intention to create a squad, that's almost as easy as just clicking.

There are a bunch of different problems yall are trying to solve:
1 (potentially) make selecting un-grouped units
2 make forming units into groups easier (is this just an umbrella term for 1 & 3?)
3 make assigning groups easier
4 make selecting groups easier
5 make knowing what groups you have easier
Any more?

jagged plaza
#

I'd say focus on learning first because this is something we can all agree none of us know the "best" way to solve this yet

little spire
# jagged plaza I'd say focus on learning first because this is something we can all agree none ...

none of us know the "best" way to solve this yet

Yeah but to me the best solution is the one that just works and I can use as soon as possible even if custom widgets are disabled. A perfect solution would be preferable of course, but an imperfect solution already exists and works so I would rather go with that.

I don't mind that I would still need to use control groups, or that I don't have a visual indication of the squads (I actually didn't notice we have that with normal control groups until last week...), etc.

#

I guess I clean up my implementation and share it here and we will see what happens.

jagged plaza
#

Yeah the current state of widgets in pub games is frustrating

little spire
#

The GDT already pre-approved the concept. So I see a fair chance that if it's implemented in a bug free and performant way, then it could become a default widget relatively soon. And I think it's more likely that can happen with a simple implementation than with a complex one that tries to solve all the things.

jagged plaza
#

fair

jagged plaza
#

@little spire does the recent announcement about non-unit-control widgets being allowed change your attitude? Or would you still be concerned about tournament mode or sth else?

little spire
# jagged plaza <@533543024760979458> does the recent announcement about non-unit-control widget...

Yes it was great to read that announcement. I'm no longer worried about what will happen with the concept/widget.

Also I think we have some room now to have two (or more) competing implementations as well without hurting the chances of the concept in general.

It's still important for adoption to have either one of them become a default but now it no longer matters which one is that and when, players can simply choose the one they like more.

I personally still prefer a simple implementation that works perfectly well for 98% of use cases instead of a complex implementation that aims for 100% but in exchange requires dozens of hotkeys and settings to customize. But in the end it doesn't actually matter anymore, we can just have both.

#

Also I'm almost done with cleaning up and refactoring my simpler implementation, I will share the repo probably in 1-2 days and then I suggest to add complexity to a fork from there.
I mean, the original implementation is fine but yyyy made some choices how the data should be structured and that choice doesn't really allow much flexibility in my opinion.

jagged plaza
#

Excited to see what you guys have done. I've been pretty busy and haven't got to it.