Loading...
  OR  Zero-K Name:    Password:   

New U.I. Suggestion: Hot Select for units

20 posts, 2201 views
Post comment
Filter:    Player:  
sort

7 years ago
I'm a long time Planetary Annihilation: Titans player and have just recently jumped on the Zero-K zeitgeist following the Steam release. One of the main draws for both of these games is the level of customization for User Interface. PA even allows for modding of UI, which allows players to assemble their UI through modular additions. Of these UI Mods for PA, probably the most popular is HotBuild2. Hotbuild2 for PA contains a feature that I relied on heavily to control my army in that game, and so far this feature is not represented in Zero-K.

I suggest having the ability to select or de-select a unit type by using Hotkeys. Lets call it Hot Select. Ideally it should be the same hotkey that is used to create the unit at a factory, for consistency.

For example: in PA I would select my bombers by first pressing "Select All Air Units" and then pressing R to narrow my selection to ONLY bombers. Likewise, I could select my Fighter jets by pressing "Select All Air Units" and then press E. This made it extremely easy to micro my airforce as I could very quickly move my bombers and fighters independently to avoid AA or engage the enemy bombers. I could also deselect a unit type after pressing "Select All Air Units" by using the CTRL modifier. This is far more efficient than using CTRL groups or ALT CTRL groups. Hot select allows your micro to play out like this: Draw a box around your army, press a key to select artillery, then click to position your artillery. Draw another box, Press a key to select stealth units, then click to send them to a specific target. This provides a LOT of fine control over your army with very few key presses or having to reconfigure your CTRL groups mid-battle.

If you are having trouble visualizing it, here's a Youtube video introducing HotBuild2 to Plannetary Annihilation. Jump to around 2:45 to see the settings screen where units can be assigned to keys.



So, as a new player to this game, what would it take to implement this feature for Zero-K? Could we use the Windows Key as a new modifier for Hot Selecting units? Let me know if you would also be interested in this UI feature. I would appreciate if someone who knows the game better could describe the benefits or drawbacks of what I'm describing and how difficult it would be to implement. Thanks!

+4 / -0

7 years ago
I bet theres some way to set this up. This game started off being crazy customizable with lots of widgets and personalized keybinds/selection keys. I think somewhere along the line they decided to make it more uniform and harder to personalize because too confusing and lot of bugs etc.

If you look in your Zero-K folder there is LuaUI > Configs > ZKKeys.lua - you can open this with text editor and youll see lines like

"AllMap+_Not_Builder_Not_Building_Not_Transport_Aircraft_Radar+_ClearSelection_SelectAll+", "ctrl+s"}, "

Which is some really specific way of setting up selection keybinds. You might be able to edit this document if you get someone to explain what sort of keybinds you want setting up and how to do it.
+3 / -0


7 years ago
I like the sound of it. Spring games in general have pretty complex and deep unit selection tools, but I haven't seen anything quite like this. I'm not as familiar as I'd like to be with the ingame widgets and gadgets, but I can't imagine it would be that hard to do. ALT CTRL groups are nice, but it would be nice to hotkey selection/deselection from an existing selection.
+0 / -0
Made a ticket for the selection suggestion https://github.com/ZeroK-RTS/Zero-K/issues/3008

The buiding suggestion already exists but requires editing the keybinds file manually (since if you bind a few things to the same key through the ingame UI it clears the others).
+0 / -0
Read this section: https://springrts.com/wiki/Uikeys.txt#selections

Do not implement the selection keys verbatim, as the hotkey system presented on the Spring wiki is outdated. Instead, open LuaUI/Config/zk_keys.lua and add lines. There are already some selection keys in the hotkeys file around line 150. See how far you get, although I think this system may be somewhat limited in the categories that it can access. We could possibly add some nicer categories or it may be easier to write a widget. https://zero-k.info/mediawiki/index.php?title=Mod_Creation#Widgets

We could likely make unit selection keys configurable through the hotkeys menu. This would require some hax similar to the grid hotkey settings in order to make the same key select multiple unit types simultaneously. Alternately, each action could select all units with a hotkey identical to that action.
+1 / -0

7 years ago
Alt-number causes all new units of the same type that are in your selection to be auto-added to that number group.
Ctrl-Z selects all the units of the same type that you have selected.

So, one way to implement (kind of) what you wanted:

-assign different unit types to different numbers, or several to one (for example fighters and bombers to Alt-5).
Now you can press 5 to select all of these aircraft, click the bomber in the selection box at the bottom of the screen, and press ctrl-z to select all bombers.

+0 / -0


7 years ago
You can also shift-click in the unit list window to select all of this type within current selection.
+0 / -0

7 years ago
EErankAdminAnarchid Cool, I didn't know that! right-clicking deselects a unit. Can I shift-right-click to deselect a type?
+0 / -0


7 years ago
No idea, try it? :P
+0 / -0

7 years ago
Tried, Works!
So if you have a selection, you can shift-rightclick a unit picture in the unit selection box at the bottom of the screen to remove that unit type from the selection, or shift-leftclick to select only that unit type.
+0 / -0

7 years ago
Yes, you can currently click into the unit list window to select/deselect units. However, having to manually mouse over to click buttons in the UI is very inefficient. Also, it means that you can not build a muscle memory and teach yourself the hand movements to select the units you want to command. I'm always striving to have a control scheme that I don't have to consciously think about while I play, and for that I need Hotkeys for my unit selection. Since making this thread, I've also been considering the amount of control that the combination of ALT CTRL Groups and Hotkey Selections would give you when used in tandem. It seems very powerful to select any unit on the field within 2 button presses. Until that is possible I'll have to settle for shift clicking into the unit list window. Thanks for the work around though!
+0 / -0
Resurrecting this post because I'm looking deeper into how to implement these changes and I've had time to cement more precisely how it should function.

I'll be using some of the images here to clarify what I'm trying to do.
https://imgur.com/a/vCbIRSo

There is a Simplified version of what I'm trying to do and then an Ideal version.

I'll tackle the Simplified version first (accessing all units in global selection settings):

The simple version of "Hot Select" is assigning Global Selection to all units based on their default grid construction letter. The spacebar is currently criminally under used for taking up so much keyboard real-estate. Glaive is built with "W", so holding spacebar and pressing W should select all of your glaives. Likewise for pressing Spacebar+E to select all of your Ronin. This is mostly consistent across all factories so Space+W would always globally select Raiders, Space+D would always select your anti-air, etc. If you have 2+ factories then Spacebar+W should select all raiders from all factories, but this could be edited to user preference.

Under [Settings> Hotkeys> Selection] is a section for "Global Selection", but only a handful of units are listed here (see reference image 1). If I could add every unit to Global Selection, I could do the entire simplified version of "Hot Select". Currently I would need to dive into config files to make this happen, and I'm struggling to understand the config files and how I would need to manipulate them as I don't have a background in coding.

A lot of the infrastructure already exists. All of the Settings UI that could be used to make this work already exists to add hotkeys for specific unit INFO Panels, but not to select them globally (see reference image 2). How can I repurpose all of this great work that's already been done to add a full list of Global Select hotkeys?

Then the Ideal version (creating a better default for everyone):

Ideally all of these Global Hot Selects should have their own section in the Hotkey Settings Tab to be configured.

  • Defaults for all units sharing their lettering with the factory construction letter

  • Default for Spacebar as the "Global Hot Selection" button

  • Spacebar does not activate "Global Hot Selection" while construction queue or factory queue is active

  • Spacebar+Shift+Key = add units to current selection

  • Spacebar+Ctrl+Key = subtract units from current selection

  • When nothing is selected, Spacebar+Key uses global selection. When units are selected, Spacebar+key filters only among the currently selected units.

  • Strider Hub units and missiles exempted by default

  • Air and sea units should probably not overlap as they don't share unit roles with ground factories.

  • S F G & H tend to be less uniform in their role and may need some special tuning to be more useful defaults when more than 1 factory is in play

  • There are plenty of free keys left to modify with Spacebar to give a unique key to air units, sea, striders, bombs, lobsters, transports, etc.

As the spacebar isn't currently used outside of queue order commands, if these were defaults it shouldn't affect any new players experience. Players could choose to never interact with the system, or minimally decide to use it only for quickly grabbing their forgotten Anti-air units with spacebar+D without setting any Control Groups or Auto Groups.

Zero-K has the reputation of having the best User Interface of any Real Time Strategy game and I think this system would be an amazing addition in terms of putting decision power into the hands of the player with as little resistance as possible. It also frees up your Control Groups to set actual battle squads in the #1-#5 slots instead of spending those on Auto Groups.

Any comments appreciated as I try to determine if there's enough interest in this to work on implementing it to be useable for everyone or if this is something I'll just be working out for my own personal config files. I don't know how to do it yet (reading the documentation currently) so any advice or guidance would be cool.

Thanks!
+1 / -0


22 days ago
You'll want to write a widget that creates a bunch of button options in the hotkeys menu. Like this https://github.com/ZeroK-RTS/Zero-K/blob/master/LuaUI/Widgets/gui_spectate_selected_team.lua#L25-L31

Add a button for each type of selection button you want. The button will be automatically hotkeyable. The OnChange action of the button will involve doing Spring.GetTeamUnits and Spring.GetSelected units, then doing some sort of Spring.ApplyANewSelection (look up the name, idk it off the top of my head). You'll probably also want to filter for selection rank.
+1 / -0
So far I'm looking at using what's been done inside this widget as a starting point: https://github.com/ZeroK-RTS/Zero-K/blob/master/LuaUI/Widgets/gui_selectkeys.lua

This is the widget that currently handles all the options for

  • options_path = 'Hotkeys/Selection'

Looks like it was created in 2010 which is why it's such a piecemeal collection of global options instead of holistic.

It would probably be best to implement the simplified version first by expanding the options inside this widget to simply include every unit.
+0 / -0
A lot of progress has been made. I've adapted gui_selectkeys widget into a full menu with buttons to set a global selection hotkey for any factory-made unit.




The simplified version is almost fully realized except that hotkeys can't be shared across multiple buttons for unit selection. If you're reading this and you have a solution for selecting every unit that has a hotkey assigned to it, let me know!

The workaround is, in addition to the global selection menu, to create custom unit group lists with a single key that represents a unit role. This is sometimes very straightfoward and other times a judgement call as to which unit should belong in which category. The good things is that a lot of different groups can be made to suite a diversity of preference.

The intention is to be using spacebar as the modifier key for unit selection since it's unused by default.

I'll be excluding Air and Naval units as these should get their own specific hotkey groups (working on it).

The first idea I had is to simply use the grid layout from factory production.



And a lot of that works without a hitch for Constructor (Q), Skirmisher (E), Riot (R), Assault (T), Artillery (Y), and Anti-Air (D). This is great because players can develop a muscle memory to select these roles globally regardless of what factory they plop first, and it frees up your valuable Control Groups and Auto Groups to be used situationally while overcoming the biggest barrier to hot key useage: memorization.

But some unit roles are messier and sometimes the unit role doesn't cleanly fit.

Scouts (S), Raiders (W), and Heavy Raiders (using (Q) since it's free on the grid as constructors have different hotkeys). While I'm tempted to throw everything that sits on W in the factory grid into a single grouping, I think it's actually more practical to split it up in this case. Here's what I've come up with, anything in italics has been moved off of it's factory production grid letter.

  • Raiders (W): glaive, bandit, duck, scorcher, pyro, *kodachi, dagger

  • Scouts (S): dirtbag, puppy, dart, *flea,

  • Heavy Raider (Q): *Blitz, *Archer, *bolas, *venom


I'm sure there will diversity of opinion on exactly what the category groupings should be.

That just leaves a few categories:

  • Signature Units (F): phantom, crab, felon, jugglenaut, impaler, cyclops, grizzly

  • Bombs (G): Imp, snitch, skuttle, limpet

  • Utility (H): Iris, aspis, djinn

  • Weirdos: Widow, scythe, dominatrix, tremor, lobster, claymore, striders

I think these lettered groupings are all useful, even if less useful than the prior groups. Players are not likely to often have multiple signature units from different factories in a game so it's helpful to have a button that will select your Grizzlies when playing Amphbot and your Phantoms when playing Cloakbot.

The weirdos are the units that are more suited to having specific hotkeys or being put into Auto Groups.

Once all these special groups have been added I'll be posting the widget for people to try out. Let me know if there's a specific grouping you think would be good and I'll try to prioritize the ones that have the most popularity. All feedback or discussion appreciated.

Now that I've got the basic idea working and I'm testing it, it feels GREAT to be hot selecting my anti-air with Space+D or retreating my Recluse Ball with Space+E without having to think about it.

***EDIT***
I changed some categories for the Scout, Raider, Heavy Raider.

I'm still considering if the Jack should be considered a Weirdo instead of an assault.
+3 / -0




A lot of progress again. I think Hot Select is ready for people to try out and give me feedback on any problems or changes.

I've finished the Hot Select groupings and they are incredibly powerful. Mousing over the Hot Select buttons pops up a description with the units they contain.

There's been a lot of consideration put into how the control scheme feels and how this feeling contributes to the identity of each factory playstyle. I'll try to offer an explanation for whenever I've strayed from the default grid layout.

The priorities are:

1. A good game feel that brings out the identity of the factory you're playing while reducing the distance from strategic idea to execution. Picking a new factory should be somewhat like picking a new champion in a MOBA. You already know the controls, you're just learning how this factory expresses itself in the game.

2. Every unit in a factory gets an individual key (don't group Blitz and Kodachi both onto W)

3. No anti-synergies on the same key across factories (don't put Lobster with Lance, don't put Pyro with Flea. Some exceptions are made for the Signature, Utility, and Unqiue groups)

Ground Mobile Heavy/Alt. Raider (Q)
  • Venom Archer Bolas Blitz

Avoided making a global selection for constructors as I realized this is a trap option that would make it too easy to accidentally cancel all of your build queues. There is already plenty of hotkey support for constructors. Hot Select is focused on combat manuevering. This opened up (Q) on the grid to be used for the alternative raiders. This feels good because it's situated next to the primary Raider key (W) and the theme of the (Q) key is that these raiders have special shots that stun, slow, or go through water.

Ground Mobile Raider (W)
  • Duck Kodachi Pyro Dagger Scorcher Bandit Glaive

The Dagger and Kodachi are technically a scout but function as the primary raider for that factory.

Ground Mobile Skirmisher (E)
  • Fencer Buoy Moderator Recluse Scalpel Rogue Ronin

Straightforward. The fencer must stop to shoot unlike the others, but that's part of the identity of the Rover Factory.

Ground Mobile Riot (R)
  • Placeholder Scallop Ogre Redback Mace Ripper Outlaw Reaver

The Placeholder doesn't do damage but still makes the most sense in this category.

Ground Mobile Assault (T)
  • Minotaur Jack Hermit Halberd Ravager Thug Knight

The Jack is a melee unit that is often split off for wacky base raids but it still makes sense in the Assault category because it's a front-liner and flavors the jumpbot factory.

Ground Mobile Artillery (Y)
  • Bulkhead Lance Emissary Firewalker Badger Racketeer Sling

Removed Lobster for Bulkhead as the bulkhead functions as the amphbot artillery, outranging most static defense. The lance is a Signature unit but makes the most sense as an artillery, and that's how it's grouped on the factory grid. I moved artillery onto the (A) key purely for ergonomics. Reaching my hand over to the (Y) wasn't comfortable and I like the Mnemonic of (A) for (A)rtillery.

Ground Mobile Scout (S)
  • Puppy Flea Dart Dirtbag

Had to leave the Flea in the scout category as it is the quintessential scout and this avoids all of the negative synergy problems of putting the Flea somewhere else.

Ground Mobile Anti-Air (D)
  • Angler Ettin Toad Tarantula Flail Crasher Gremlin Vandal

Straightforward.

Ground Factory Signature Units (F)
  • Grizzly Cyclops Jugglenaut Crab Impaler Felon Phantom

Contributes to factory identity to have these all grouped together. Using the Signature Unit of a factory is like using a MOBA Ultimate ability, it's specific to that Champion/Factory and must be paid attention to. Will becomes less useful in games where multiple different factories are made.

Ground Mobile Bomb (G)
  • Limpet Skuttle Snitch Imp

Feels really good to make these bombs and not have to dedicate any mental energy to a hotkey or autogroup, which I think is a big contributor to people not using bombs as much. It's simply always available on (G) now.

Ground Mobile Utility (H)
  • Djinn Aspis Iris

Non-offensive units.

Ground Mobile Unique (Z)
  • Claymore Lobster Tremor Dominatrix Scythe Widow

All of the units that don't fit any other paradigm or have too much negeative synergy to be paired with anything else. These should ideally have their own individual hotkey or autogroup that you can set, but I wanted to make sure every unit was selectable and there's an identity in this grouping for it's uniqueness.

All Offensive Striders (X)
  • Ultimatum Scorpion Dante Merlin Paladin Detriment Shogun Reef Scylla

It makes sense to select whatever striders you've built. As you build multiple, if the game goes that long, they should probably end up on Control Groups.

----------------------------------------------------


The air units are more straightfoward, I've paired together most of the units that share the same grid so that it's the same muscle memory when playing either Planes or Gunships, since it's rare for people to build both. The one consideration is that you need to de-select everything by clicking a blank space since there no modifier key being used. This ends up being easy since air doesn't have the same micro demands as ground units.

Flying Anti-Air -D-
  • Trident Raptor Swift

Flying Skirmisher -E-
  • Harpy Magpie

Flying Riot -R-
  • Blastwing Phoenix

Flying Prec. Bomber & Assault Raider -T-
  • Revenant Raven

Flying Support -Y-
  • Nimbus Odin

Flying Fortress & Singularity Bomber -F-
  • Likho Krow

Flying Stun & Disarm
  • Thunderbird Gnat

I'll post the widget with instructions on how to install it soon, figuring out the best way to get it to people. It's fully unctional but will need some formatting and cleanup to be merged with the current SelectKeys Widget. All feedback welcome.
+0 / -0

18 days ago
To get the widget working for you:

1. Click this link: https://github.com/FrequentPilgrim/FrequentPilgrim-Files/blob/main/Global_Hotkeys_And_Hot_Select_Rough_Draft10.lua

2. Click "Download Raw File" button in the upper right.

3. Save this .lua file into your Local Zero-K folder inside 'Zero-k/LuaUI/Widgets' (create the Widgets folder if it doesnt exist yet).


4. Launch Zero-K and start a skingleplayer skirmish. Pause the game once it has started.

5. Enter the pause menu with ESC. and go to Settings/Misc.

6. Click on 'Show Advanced Settings'

7. Click 'Local Widget Config' . Make sure both options for 'Enable Local Widgets' and 'Load Local Widgets first' are checked.


8. press enter to chat in the game and type '/luaUI reload'


9. The game will briefly reload and now the widget should be active. Go to Pause Menu: Hotkeys/Hot Select. Special Groups at the bottom is where all of the custom groups are.

Recommended trying these Special Groups with the grid layout I've posted above first as I'm trying to workshop it into a default that will benefit everyone but I need playtesting and feedback to know if it's all working as intended.



[Spoiler]

+0 / -0


16 days ago
It's looking good. I thought of a few things while looking at the list.
  • I'd move Fencer out of the skirmishers, putting it wherever Bulkhead ends up. A mixed selection of skirmishers can be used in a similar way, but Fencer can't be.
  • It would be nice to avoid overflowing artillery into extra slots. Badger could be moved into the skirmisher slot to replace Fencer, as it is used similarly to Recluse and Rogue. Emissary could move to the "deployable" slot that Fencer and Bulkhead should inhabit together. Then only Phantom would remain, but I think it is usual enough to leave in signature unit.
  • Raptor and Swift shouldn't be on the same key. These fighters are used for different things, and selecting fighters can be hard. I'd put Swift on W, as raider.
+0 / -0
These are great notes, thanks.

I've had a lot of insights since starting to use the control scheme full-time in my matches for all of Sunday.

I'll remove the Swift from the ant-air group and put it on W with locust.

Bulkhead and fencer doesn't belong with either skirm or artillery. I was avoiding making too many categories but I think we need one more here.

I'm also considering just adding one more category for heavy artillery (U) for Tremor, Impaler and possibly Merlin as the one strider exception to give the group more purpose. I feel like losing badger and emissary from artillery defies too much expectation if they arn't selected when pressing the "Select my basic artillery" button. I'm thinking of trying an optional "All Artillery" to opt into if a player wants to override the 'no 2 units on the same key' rule. I don't love that there are only 2 "Deployables" for (C) but that's the nature of the game (and since (C) on the build grid is for defenses, it fits into the stationary firing theme).

I'm probably putting the Claymore and Widow onto (G) with the bombs. They both function as those factories equivalent unit and I've found the less truly oddball units that end up on the Unique category, the better. The claymore shoots an exploding projectile and it's unit description claims it is a "suicidal" unit. The Widow is cloaked like 3 of the true bombs and has a 35 second reload meaning it either dies or escapes after it's attack, making it a functional re-usable bomb. Both of these units also sit on the (G) key inside their factory grid. There is some risk of counter-synergy here but I think that's inherent to the Bomb role.

That would leave just Lobster, Dominatrix and Scythe on the Unique category, which makes it more manageable to either use or unbind to create 3 individual hotkeys for those units.

Also, while I've been playtesting I've changed around some spots for ergonomics and ease of use. The groupings themselves are more important as every player can more easily set custom hotkeys per group than they can create custom unit groupings. But I wanted to share how it's looking now:

I moved assault over to (A) as it felt bad to keep reaching over for a group that requires as much micro as Assault. This allowed me to move artillery over to T which is fine since artillery is much less micro intensive. Also Moved strider button to (Z) and Unique to (X) as I felt it themed better.

+0 / -0
https://github.com/FrequentPilgrim/FrequentPilgrim-Files/blob/main/Global_Hotkeys_And_Hot_Select_Rough_Draft11.lua

New updated Global Selection and Hot Select Widget Version 0.11

Added the Heavy Artillery (U), Deployable (C) and Flying Raider (W) for special groups within Hot Select.

Cleaned up some unit categories.

Added claymore and widow to Bombs (G)

If you have installed the previous widget, be sure to clear all assigned hotkeys within the Hot Select category before changing to this new one. Then Move the old widget out of your widget folder.

+1 / -0