Skip to content

Allow to create custom list/group #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Audionysos opened this issue Mar 6, 2025 · 5 comments
Open

Allow to create custom list/group #3

Audionysos opened this issue Mar 6, 2025 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@Audionysos
Copy link

Current in-game GUI requires lot of back and forward scrolling/searching. Lets say I'm not happy with current bind for "Go To Town Center", I need to open settings, select menu and scroll through big alphabetical list. Not a big deal if you want to change a single hotkey, however when you want to change many hotkeys at the same time it is very annoying. I Change bindings for villager, military, few build and... "wait, what hotkey did I set for town center?"
I've just watched some Hera video on this and he recommends changing one hotkey at a time but this is not always possible since you often want to use a key that is already used for something different, so you need to change that one as well, and that one replaces another one, and...
The search option in your editor is nice however if you want to edit multiple hotkeys it still quickly becomes frustrating to type in the filter back and forward, especially that you can't edit the file during game (or can you? didn't tested this yet).

I think ability to create a custom list would be a game changer.
At the moment I'm interested in changing only few most frequently used bindings like.

  • Go town center (I whish the was a option to just select instead of go to, as there is a Go To Selected Object)
  • Go to vill
  • Go to event
  • Go to previous screen.

And maybe few more, but the list is not that long.
If we could just select those first and then focus on how to arrange the hotkeys it would be much simpler and faster.
And on top of that we would have a small list of all new hotkeys that we could just print or put on another screen.

@Audionysos Audionysos added the enhancement New feature or request label Mar 6, 2025
@Patchnote-v2
Copy link
Owner

I've added a Favorites group that is pinned to the top of the far-left column. If you want to try it out you can add or remove a hotkey to the favorites by right-clicking on a hotkey. Please do let me know how it works out for you and if you have any improvements you can see!

To try and help with information overload I've also added the ability to collapse hotkey groups. Unfortunately it will cause some groups to shift columns, so I recommend collapsing what you don't want first. I've made some groups, like "Control Groups 1-10", collapsed by default.

If you're at all interested, I'd love to grab any .hkp files you've been using to have another profile to use for compatibility testing. If you don't want to that's totally fine too.

@Audionysos
Copy link
Author

Audionysos commented Mar 14, 2025

Thank you, that is great!

if you have any improvements you can see

Are we talking the custom list or in general? Because I already had ideas for two other issues when I was writing this one. Now after I've played with the tool some more, I could give you a full list for improvements you could make, but most of them are unrelated. I can write them in single "Improvements ideas" issue, if you don't mind.

In terms of this issue:

  • Changing items order would be nice. Ideally the list should be sorted by user's subjective importance.
  • The background colour change could be confusing at first. IMHO having a star/heart icon on hotkey item would be better. There is also no need to indicate item are favorite inside a favorites list - the star icon/background change could be placed on the list's header.

Now, below I will write how I dream about it, but I guess that would require a lot of work and since the favorite list is already doing it's job, there could be things that may enhance the app much more with much less work.

  • There are two main columns. Each have a header and independently scrollable stacks contents. The first column is for your custom lists stack. The other column if for searching all build-in hotkeys.
  • In first column you have the "⭐Favorites" list by default, but there is also a ➕ button on the main header. You click that and new "📋List 1" shows up.
  • Double click on "My list 1" and you can rename it to lets say "My uncommon hotkeys".
  • On right main column you have the "🔍 Search..." box. Type here to filter groups only on right column - the left stack is not affected by that.
  • Once you've found the hotkey you want, you drag and drop the item from group on right column to one of your custom lists.
  • When your custom lists are getting to long, you can click on 🌪️(funnel) button to make your custom list also affected by the search box from the right column.
  • You can click on lists icons (⭐, 📋) to pick different one or drag your own image. Those icons show up on hotkey items found in main right stack.
  • There are also buttons on each custom list's header to duplicate and delete them. If you click on a duplicate button it will copy all items selected on that list into "My list 2". If there is nothing selected, the whole list is duplicated.
  • In custom lists column there is also a "🔧 Modified" list, which is not editable and contains all changes made from time the file was loaded. This list is always last and folded by default.
  • All list items with modified hotkeys (except those in "🔧Modified") have red border around them... but I guess we are now goin to "not this issue" territory.

I should also mention why I think it's useful to be able to create your own list. The hotkeys you use very often like "Go to town center" you will remember right away, after first game, but those more rare or used in late game are not so easy. Having different list with subset of the changes would be good for quick screenshot...

Also it would be nice to create a custom and more friendly file format for the hotkeys, so that after downloading and trying them in game you can upload the file back to website and quick-adjust with your custom lists present.
There could be a .json version alongside game files in the zip. The binary format is not very useful to work with in other programs, especially that it's not well documented. The day I created this issue I've created parser for the file in C# and I wasted 2h trying to figure out why it's not working and analysing python in your repo, just to finally realize it's compressed using deflate algorithm... 🤦‍♂️

@Audionysos
Copy link
Author

If you're at all interested, I'd love to grab any .hkp files you've been using to have another profile to use for compatibility testing. If you don't want to that's totally fine too.

Sure, but aren't you collecting uploaded hotkeys?

lapek.zip

I've created them using on the day I created the issue.
One thing about them to add to my previous point - I set them up so I don't really need to remember most of them, but I needed to change a lot of hotkeys.
For build its the default: Q/W -> order of buttons in GUI.
Select military building: Alt + order of buttons in GUI (in villager's "build view").
Select economy building: Ctrl + order of buttons in GUI.
The Alt-Ctrl is reversed vs Q-W because we use military buildings much often and Alt is more convenient, but otherwise you don't need to remember much since the letter keys are the same as for buildings.

@Patchnote-v2
Copy link
Owner

Hm, there's some good ideas in there. I'm definitely a fan of a human-readable format you can download and the modified auto-group. Custom groups/lists also makes sense so that a user isn't entirely reliant on how the groups are pre-organized.
I was also thinking of adding a star for favorites, but I didn't like how it cut into the already precious space inside each listing. I think I'll still have it display a star for favorited ones, although that could cause a change in height if the hotkey text is too wide.

Since this was my first React project (and still my only, haha), the code's pretty bad and I think that things like dragging and dropping, and custom groups are a little more involved and would require messing with the core logic again. I have been interested in doing that since at the time I made it I got it only to "good enough" and I've have some ideas of how to improve it. Ideally I could improve the bit of laggy feeling the site, too.

If you'll still be messing around with the .hkp files and parsing them yourself, be sure to check out this gist, as it gives all the details about the file's structure... unless you want to do it yourself, of course. :)

Sure, but aren't you collecting uploaded hotkeys?

I'm actually not. I'm not saving anything the user does as I consider it refreshing to not have to worry about that. Only web server and Django logs for me. Maybe I'll do that in the future as the data could be fun to see.

@Audionysos
Copy link
Author

I totally get it! That's why I wrote it's just my dream and I don't expect someone would actually do it . For me only hearing words "web GUI" and "React" gives me chills... :) Well the Microsoft could do something to improve this, instead of spamming 5 new campaigns each year, for which I don't have time to play, because I'm busy configuring my hotkeys... ;P

If you'll still be messing around with the .hkp files and parsing them yourself, be sure to check out this gist, as it gives all the details about the file's structure...

Thank you, this is actually form where I started :) I already did all this but there is not a single mention about compression there... I remember glancing something about unziping somewhere but I could find it again... I tried unpacking it as zip which obviously didn't work...
Anyway, I made some improvements and put the repo online: https://github.com/Audionysos/AgeOfSharpKeys
If you would like to check it out, I would love to know if it works for anyone outside my PC. I understand you are not a C# developer but if you maybe have VS installed it shouldn't be a big hurdle I hope. If you don't have time or don't want to do that for any other reason I also totally understand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants