Page MenuHomeWildfire Games

Buildings shortcuts / hotkeys
AbandonedPublic

Authored by nani on Jan 26 2019, 2:55 PM.

Details

Reviewers
None
Summary

Select buildings with the keyboard when the construction panel is available.

Uses Space + Key to refer to each building in an orderly manner from most left top to bottom right giving then exact keyboard mapping to the visual selection panel (easier to remember/use).

Used Space key given that allows for a wider range for all keys combinations and doesn't conflict with any other key-binds.

Test Plan

Test it if it can create the proper buildings and doesn't try to build disabled/hidden ones.

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

nani created this revision.Jan 26 2019, 2:55 PM
Nescio added a subscriber: Nescio.Jan 26 2019, 3:04 PM
  • could you use a different key instead? Perhaps B or \backslash? I use the space bar to pause the game
  • what happens on qwertz and azerty keyboards?
  • what if a faction has more than 24 structures?
  • gui/manual/intro.txt?
nani added a comment.Jan 26 2019, 3:24 PM
In D1766#71096, @Nescio wrote:
  • could you use a different key instead? Perhaps B or \backslash? I use the space bar to pause the game

Space is the best option to reach each key with one hand and much easier to just change pause hotkey to another key imho.

  • what happens on qwertz and azerty keyboards?

Not sure how to solve it elegantly. I looked at hotkey.session.queueunit in default.cfg but I could not see how it was setup to match my keyboard.

  • what if a faction has more than 24 structures?

24 is the maximum for the panel (defined at binaries\data\mods\public\gui\session\selection_panels_right\construction_panel.xml)

  • gui/manual/intro.txt?

Will add if this goes forward.

smiley added a subscriber: smiley.Jan 26 2019, 3:47 PM

(Anyone else thinks merging building hotkeys and training hotkeys is a good idea?)

smiley added inline comments.Jan 26 2019, 3:51 PM
binaries/data/mods/public/gui/session/hotkeys/building.xml
6

Handling in JS would be cleaner IMO. In fact, I think I already have a patch changing training hotkeys as well. Which it self came from the fact that one object was missing. I got a feeling this approach would lead to a repetition of history down the line.

smiley added inline comments.Jan 26 2019, 3:52 PM
binaries/data/mods/public/gui/session/hotkeys/building.xml
6
nani added a comment.Jan 26 2019, 4:13 PM
In D1766#71099, @smiley wrote:

(Anyone else thinks merging building hotkeys and training hotkeys is a good idea?)

Maybe yes maybe no. at least the current way gives more freedom but yours more coherence.

nani marked an inline comment as done.Jan 26 2019, 4:18 PM
nani added inline comments.
binaries/data/mods/public/gui/session/hotkeys/building.xml
6

I don't really like that diff, sure it much shorter but also harder to find and modify.

smiley added inline comments.Jan 26 2019, 4:26 PM
binaries/data/mods/public/gui/session/hotkeys/building.xml
6

Doesn’t matter now anyway ;)
It was mostly to show an alternative way. IMO, this current hotkey system is very prone to oversights and frankly seems like duplication to me. But that is out of scope from this diff.

24 is the maximum for the panel (defined at binaries\data\mods\public\gui\session\selection_panels_right\construction_panel.xml)

The maximum the current GUI displays, yes, but not the maximum a faction or unit can have.

(Anyone else thinks merging building hotkeys and training hotkeys is a good idea?)

They probably shouldn't ignore each other; the GUI already merges training, building, and research queues; try selecting civic centre and infantry together (use Shift).

elexis added a subscriber: elexis.Jan 26 2019, 9:01 PM

Ticket somewhere. fpre has a similar patch too if Im not mistaken. The problem with this enumerating approach is that the player has to learn which number corresponds to which building, and that this is different for every civilization. My idea was to introduce more specific mappings, one key for the fortress, one for the house. To accomplish that, one could add a hotkey identifier to the template, or one could reuse the identity classes.

nani added a comment.Jan 26 2019, 10:49 PM

The maximum the current GUI displays, yes, but not the maximum a faction or unit can have.

The shortcut is for the button appearing at construction_panel.xml nothing else, if the button for that building is not present in the panel (or shared panel) then it will not call it if shortcut is pressed.

nani edited the summary of this revision. (Show Details)Jan 26 2019, 10:50 PM
nani edited the test plan for this revision. (Show Details)
nani updated this revision to Diff 7398.Jan 26 2019, 11:01 PM

Fixed selecting buildings not showing in the panel. Now can't select them.

nani updated this revision to Diff 7400.Jan 27 2019, 12:54 PM

Added hotkey indication at each construction button. Appears if Space is pressed, disappears if released.

nani added a comment.Jan 27 2019, 12:57 PM
In D1766#71112, @elexis wrote:

Ticket somewhere. fpre has a similar patch too if Im not mistaken. The problem with this enumerating approach is that the player has to learn which number corresponds to which building, and that this is different for every civilization. My idea was to introduce more specific mappings, one key for the fortress, one for the house. To accomplish that, one could add a hotkey identifier to the template, or one could reuse the identity classes.

That's another option indeed but leaves the least used or civilization specific buildings without hotkeys no?.

leaves the least used or civilization specific buildings without hotkeys

Unless one wouldn't.

very good patch/mod
more important is stances and formation hotkeys
time is the key
for this two things speed is important in combat
build is less important
i had a trac ticket there made suggestments
also if u wanna have build keys make them to english language like f for farms
if u then wanna have fort too with f make double f hit
very easy to adapt
much better then nub other

look D1284 for another idea of mine
greets

maybe go space+key for builds
shift+space+key for formations
ctrl+space+key for stances

nani abandoned this revision.Jun 12 2019, 1:11 AM

Wrong approach.