Skip to content
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

[modified] Pickup menu overhaul #2276

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Gingerbeard5773
Copy link
Contributor

Status

  • READY

Description

The pickup menu cannot be used with all blobs in KAG, making it useless in certain scenarios in game. It is also completely useless for mods that have custom items.
This PR rewrites the pickup menu so that it can be used for all blobs in base KAG, as well as mods.

Demonstration of the new menu:

King.Arthur.s.Gold.Build.4762.2024-12-27.22-02-50.mp4
  • Only one selection on the menu can be displayed for any type of blob, eliminating bloat that could potentially occur on the menu.

@TerminalHash
Copy link
Contributor

picked that pr as additional mod setting for testing on Gruhsha

@mugg91
Copy link
Contributor

mugg91 commented Dec 29, 2024

I like the existing pickup menu because I can quickly pick up seeds, which will always be in the bottom like in the screenshot.
So I already know where I should be putting my cursor.

This PR will change positionings every time so it will be difficult to use the menu quickly.

I think what would be really good is if players could customize their own pickup menu, by setting what items they want and in what positionings.

@mugg91
Copy link
Contributor

mugg91 commented Jan 1, 2025

One other thing that might be a problem is since the selection changes based on what's in reach, items getting inside or outside of reach could possibly mess up your selection.

In this demonstration, it's impossible to pick up your desired item.

ItemSelectWheelTest.mp4

@Gingerbeard5773
Copy link
Contributor Author

Current state of the changes. The menu has been redone again, this time using a 'hash map' of sorts to set the items to their own special spot in the wheel. This is a great new method and appears to fix 95% of the previous problems that people have mentioned. The other 5% of the time- the hash method can have collisions, which may move items on the menu. But this doesn't seem to happen almost at all on vanilla, and isn't very jarring when it does occur either.

King.Arthur.s.Gold.Build.4762.2025-01-03.17-31-52.mp4

@mugg91
Copy link
Contributor

mugg91 commented Jan 4, 2025

It seems better, although I would like seed to be in the same spot as before.

When there is a bomb and a mat_bombs, there will be two identical icons (same for waterbombs).

Items seem to be aligned all over the place whereas previously it was sorted more or less.

Before

After

@Gingerbeard5773
Copy link
Contributor Author

Gingerbeard5773 commented Jan 4, 2025

It seems better, although I would like seed to be in the same spot as before.
Items seem to be aligned all over the place whereas previously it was sorted more or less.

This is because the blobs are put into the wheel by hash, which is what allows the menu to have all possible blobs displayed. Adding in specific spots for blobs would bloat the code, even though people can retrain their muscle memory within a few days of using the menu.

When there is a bomb and a mat_bombs, there will be two identical icons (same for waterbombs).

The icons are taken from the inventory_name first and then it goes for the normal name, so this means that the game already made an icon for the inventory_name without my knowledge. I'll mess around to get it looking correct. it seems like kegs have a weird icon as well

edit: resolved the strange icons

@Gingerbeard5773
Copy link
Contributor Author

PR seems to be complete. Looking for testers and reviewers. This current menu can be tested on the Zombie Fortess server and also grusha(?)
This menu is nearly the same as existing base menu aside from blob compatibility and the different layout caused by hashing.

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

Successfully merging this pull request may close these issues.

3 participants