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

Implementations of suggested items QoL #462

Merged
merged 18 commits into from
Oct 21, 2024
Merged

Conversation

PiotrKaszuba
Copy link
Contributor

Referring #459 and #460.

Initially:

@PiotrKaszuba PiotrKaszuba marked this pull request as draft October 6, 2024 13:52
@PiotrKaszuba
Copy link
Contributor Author

PiotrKaszuba commented Oct 7, 2024

  • fully implemented point 3. of QoL: item control #460 with modifications and extensions: used ctrl click, generalized the idea - full description in commit implementing this: 1419b7a

@PiotrKaszuba
Copy link
Contributor Author

  • implemented part of point 4. of QoL: item control #460: label showing average level of permanent items in horadric cube (turns out consumables/oils are level 0 and should be skipped for average level calculation for all recipes)

@PiotrKaszuba
Copy link
Contributor Author

  • implemented point 2. of QoL: item control #460 fully; also sorting by item type (permanent vs non-permanent) and item_id

@PiotrKaszuba
Copy link
Contributor Author

…, and from tower inventory to horadric cube.

extend shift click on item: now also moves item from item stash to horadric cube.
all these quick moves now force swap with last item slot of the target container if target container is at full capacity.
update hints with logic of these controls
…ube (using HoradricCube._get_average_ingredient_level func) updated _on_horadric_stash_items_changed
…ty then levels and then ids.

use exported variable for _horadric_cube_avg_item_level_label - connected in inspector
…s - should be faster, do not differentiate between consumables and oil types when sorting
…m stash - enables a view only on locked items
@PiotrKaszuba
Copy link
Contributor Author

Rebased onto main that changed history of the branch.

@Kvel2D
Copy link
Collaborator

Kvel2D commented Oct 17, 2024

Hi, could you try to finalize this PR without point 1 from #460 ?
This PR is already quite big and point 1 is even more complex. Would be easier to review/merge if PR is not too big.

@PiotrKaszuba
Copy link
Contributor Author

PiotrKaszuba commented Oct 17, 2024

Hi, thank you for looking into this. I also think that point 1 from #460 should be left out.

I'll try to summarize state of changes vs #459 and #460. Then I'll point out additional thoughts about the PR.

This PR will:

#459

  • Show item cooldowns and charges in Horadric Cube. Still missing either of these for item stash.

My thoughts on use cases:

  • (cooldowns) It allows the player to swap out of active items on towers and keep track of when to equip active items again to maximize their outputs - while keeping them in the Horadric Cube. My personal experience with keeping items there is "items that I'd often swap out" - between batches of cubing with recipes.
  • (charges) My current use case was to gather (via recipe item grab button) many copies of "Strange item" and equip to towers those with low innate charges (higher future yield) and combine in the cube those with higher charges. I was able to spot better copies without equipping all copies separately.

#460, point 1:

  • Not implemented.

#460, point 2:

  • Add additional button in upper right corner of item stash that reads "SORT". When clicked items in item stash will be sorted by: item type (consumables & oils then permanent items), then by item rarity, then by item level and then by item ID. While sorting stash blank spaces are removed.

My thoughts on use cases:

  • useful tool to tidy the item stash and help player find what they are looking for, helps planning item conversions with appropriate levels. When playtesting: I hit it often after a few items drop - feels convenient.

#460, point 3:

  • add new ctrl click on item: quick move it to selected tower inventory, and from tower inventory to horadric cube.
  • extend shift click on item: now also moves item from item stash to horadric cube.
  • all these quick moves now force swap with last item slot of the target container if target container is at full capacity.
  • update hints with logic of these controls

My thoughts on use cases:

  • convenient tools to avoid item dragging which takes longer - require some time to accustom to.
  • from playtesting: after some time I use it almost exclusively instead of dragging; personal use cases:
  • swapping out last item for bonuses that adapt to wave type with single click on prepared item in horadric cube
  • swapping out any item - with double click (on tower and cube/stash) - for this dragging could be similarly efficient though
  • bulk inventory swaps / horadric cube swaps

#460, point 4:

  • add label showing average level of permanent items in horadric cube below horadric cube; updated _on_horadric_stash_items_changed()

My thoughts on use cases:

  • Planning cubing recipes
  • While playtesting: making sure that average item level is a bit below the level of item I was looking for (assuming the chances are close to optimal that way).

#460, point 5:

  • make horadric lock visible in tower
  • allow changing state of horadric lock in tower and horadric cube

My thoughts on use cases:

  • Clarity and simplicity of item interface: consistent control and display of items, regarding horadric lock
  • While playtesting:
  • a "process" of building set of horadric locked items that continues throughout the game. I'd horadric lock most of the items that are equipped by towers. I'd be annoyed if I had to move the item to item stash to do this and re-equip it or otherwise remember to horadric lock it later.
  • in other cases I'd use item grabbing button for recipe and lock useful items in place, without having to move them to item stash.

#460, point 6:

  • add button in upper left corner of item stash with the icon of horadric lock. It is a toggle button that, when on, extends item filter in the item stash by filtering out items that are not horadric locked.

My thoughts on use cases:

  • ability to obtain a custom view on the items that for whatever reason player decides to put horadric lock on.
  • goes well with mentioned above a "process" of building set of horadric locked items that continues throughout the game
  • When playtesting: useful for the same reasons as mentioned above, I've used it, but not that often as other improvements. Introduction of sorting button reduced the need for opening custom view too often. I'd still keep this one though.

@PiotrKaszuba
Copy link
Contributor Author

Now, other points about the PR:

  • not sure if the code/approach to particular extensions is as good as it could be. I've probably rushed some of these a bit to test them out. However, some of these were quite simple to implement and might even look good implementation wise.
  • not sure about the quality of UI introduced elements.
  • So, I'd like to ask for both code review and some runtime testing.
  • Fortunately, I don't think I've encountered any serious bugs.

@PiotrKaszuba PiotrKaszuba marked this pull request as ready for review October 17, 2024 16:50
@Kvel2D
Copy link
Collaborator

Kvel2D commented Oct 18, 2024

Thank you, I will try to review this PR during the weekend.

@Kvel2D
Copy link
Collaborator

Kvel2D commented Oct 20, 2024

The height of item stash menu is now different from height of tower stash and elements menu. This is because the new buttons in item stash menu increased the height.

I tried making tower stash and elements menu taller to match height of item stash menu but it looked bad because tower stash looked too tall.

I would like for these 3 menus to have the same height, as before, but couldn't come up with a solution at the moment.

Remove unneeded TODO about get_player() vs get_local_player() - in this
\ case need to use get_local_player()
Remove unneeded nullcheck for selected_unit, "is Tower" check is enough
Use belongs_to_local_player()
Add InstantMoveType enum
# Conflicts:
#	src/game_scene/game_scene.gd
#	src/singletons/event_bus.gd
@Kvel2D
Copy link
Collaborator

Kvel2D commented Oct 20, 2024

Almost done with review, didn't find any bugs so far but changed some things.
Need to test in multiplayer.

@PiotrKaszuba
Copy link
Contributor Author

Thank you for this work. I can see the overview of code structure changes. Did anything change functionally?

Got added by accident during merge
@Kvel2D
Copy link
Collaborator

Kvel2D commented Oct 21, 2024

Thank you for this work. I can see the overview of code structure changes. Did anything change functionally?

No, final behavior is the same.

Except that the "sort item stash" is now done through "Action", which means it gets routed through GameHost and GameClinet, but same behavior basically.

Copy link
Collaborator

@Kvel2D Kvel2D left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked new features in multiplayer and didn't find any issues.

  • "Sort item stash" is implemented as Action - no multiplayer desync here
  • Filtering out locked items in item stash doesn't affect gameplay - desync not possible, don't need this to be "Action"
  • New item move operations are implemented as existing move/swap Actions - no desyncs here

src/hud/item_stash_menu/item_stash_menu.gd Outdated Show resolved Hide resolved
@Kvel2D Kvel2D merged commit 4cf882e into Praytic:main Oct 21, 2024
@Kvel2D Kvel2D mentioned this pull request Oct 21, 2024
@PiotrKaszuba
Copy link
Contributor Author

Thank you for accepting the ideas and taking care of this. Even though its already merged - let me know if there's anything else related to this I should look into.

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.

2 participants