Page MenuHomeWildfire Games

Idea For Formations/Stances/Constructions Hotkeys In-Game
Needs ReviewPublic

Authored by ffffffff on Feb 6 2018, 3:39 PM.

Details

Reviewers
bb
elexis
temple
Summary

Happy discuss and completing.

Hotkeys mapped by name (to english language), even if not easy to grab sometimes because 3,4 keys needed to hit, but imaginable to the user. You can not remember keys that map only an order in a selection panel rather than the name that you think of you want to have. Same feeling got temple.
So stances and formations Ctrl+Alt+... key.
Build keys B+...

Idea: https://imgur.com/a/O6U3D

constructions not complete. i took only from athenians atm. all other coming

missing hotkey for raising alert still.

also diplo color hotkey i guess temple doing.

Test Plan

test

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

ffffffff created this revision.Feb 6 2018, 3:39 PM
ffffffff updated this revision to Diff 5675.Feb 6 2018, 3:45 PM
ffffffff updated this revision to Diff 5676.Feb 6 2018, 3:52 PM
elexis added inline comments.Feb 6 2018, 4:01 PM
binaries/data/config/default.cfg
336

I already said something about this some time ago, guess it wasn't read.
The hotkey names should be defined in the templates

ffffffff added inline comments.Feb 6 2018, 4:05 PM
binaries/data/config/default.cfg
336

jea thought about it

not good not all together to see them

ffffffff updated this revision to Diff 5677.Feb 6 2018, 4:27 PM
ffffffff edited the summary of this revision. (Show Details)

Very promising but I don't think that Ctrl + Alt + C = formation type and then right away Ctrl + Alt + D = stance type is good. Confuses people who expect them to be related.
How about numbers for stances?

Alt 1-5 for stances.
And Alt + Shift / Ctrl + Alt for formations.

elexis added a comment.Feb 6 2018, 4:46 PM

The information which templates exist and which don't isn't and shouldn't be hardcoded in the GUI. The misc.xml code shouldn't exist, it should be parsed from the templates.

elexis added a comment.Feb 6 2018, 4:49 PM

The ingame hotkey setter will come with a JSON file that also defines all existing hotkeys. But that could be extended to parse the templates as well. Add a hotkey name to the Selectable component (since exactly the selectable entities can be assinged hotkeys). Then just load all templates and check for the hotkeyname property. The event parsing could be done in input.js I think.

ffffffff updated this revision to Diff 5680.Feb 6 2018, 5:04 PM
ffffffff edited the summary of this revision. (Show Details)Feb 6 2018, 5:07 PM
In D1284#52311, @elexis wrote:

The information which templates exist and which don't isn't and shouldn't be hardcoded in the GUI. The misc.xml code shouldn't exist, it should be parsed from the templates.

we need the object i guess for hotkey?

binaries/data/config/default.cfg
336

also everyone might to set themselfs keys here so keep it

elexis added a comment.Feb 6 2018, 5:26 PM

The last sentence of my previous comment is the answer to your first question. At least that's what I'm expecting from what I recall and read in input.js.

binaries/data/config/default.cfg
336

the default.cfg part will be inevitable to set the defaults with the current config code. But the GUI code part should vanish. You get all the disadvantages of duplication with every step towards duplication. Everytime someone wants to edit a template, they now have to modify and hence understand and possibly break GUI code. modders will have to add GUI code. With this misc.xml approach that seems quite preferably avoidable.

binaries/data/mods/public/gui/session/selection_panels.js
261

The simplicity of having using the generic name property from the Identity component or templatename has advantages. But it also prevents using one hotkey for two similar templates and might collide for template names that happen to contain the name of a different templatename.

ffffffff edited the summary of this revision. (Show Details)Feb 6 2018, 6:42 PM

du darfst heute wieder online kommen und mir erklären

ffffffff added inline comments.Feb 7 2018, 4:53 PM
binaries/data/mods/public/gui/session/selection_panels.js
261

i want to take all the advantages of the template. how can i use them to give me hotkey objects or to get them from a json file?.

elexis added inline comments.Feb 7 2018, 6:16 PM
binaries/data/mods/public/gui/session/selection_panels.js
261

I don't have time to plan it well or think it through completely now. It's a big task.
But from what I recall, it should be the Selectable component storing that information, since only selectable entities can have hotkeys as menitoned above. So the schema of that component has to be extended and all entities would have to be updated with that new property.
Maybe that could be done in a second step too and the GUI code could be removed by just parsing the name of the pressed hotkey.
The militaryonly hotkey for instance also doesn't have a GUI obejct, yet is processed. Dunno, needs time to think about it. Not mine now.