Feature - Implemented Categorize HP/MP restorers in the auto-restoration panel

philmasterplus

Active member
I'm talking about the in HP/MP Usage panel under the Adventure tab.

hp-mp-usage-list.png

The two lists have grown massive over the years and it is daunting. If we could separate them by type, it would be easier to manage.
  • Items: All usable items. Includes "spleen" items, once-per-day items, and NPC store items.
  • Skills: Skills that can be cast to restore HP or MP
  • Actions: Anything other than the above. Includes resting (campground/campaway/chateau) or doing something special (meatpasting quarks)
For starters, I classified all 62 HP restoring options in HPRestoreItemList.java and 71 MP restoring options in MPRestoreItemList.java. Check out the google sheet.

I also made a mockup of the reorganized HP/MP restoration panel (edit: fixed link, also see thumbnail below) to give you a general idea of what I'm talking about. This showcases two changes: (1) categorizing the sources, and (2) sorting items by name. I'm pushing for idea (1) here, and idea (2) is just an afterthought for now.

mockup-1.png



I'm still exploring how to implement this. For now, it makes sense to convert HPRestoreItem into an abstract class and make three concrete child classes: HPRestoreItemItem, HPRestoreItemSkill, HPRestoreItemAction. We would still have a single array of HPRestoreItem for managing configuration and actually restoring HP/MP. We could make some instanceof checks in RestoreOptionsPanel.java to build three lists.

I'm well out of my depth in this area, so opinions are welcome.
 
Last edited by a moderator:

fronobulax

Developer
Staff member
You might look at Universal Recovery for ideas.

I'm not a big fan of the size of that GUI. There are many cases where an app pops up a window, the scrolling is hosed and portions of the window don't even show up on my laptop screen.

As an example try looking at the Script Menu when you are not using the MRU and not working around the display problem by having subdirectories in scripts/ On my screen it cuts off at the c's

If you go that way, I want a way to filter before I see the display and check items. At the very least I want to know if something is on hand or can be bought and price (so I don't use high value items inadvertently).

It turns out the Restore section of Item Manager does some of this so you might look there for inspiration.

If you are looking to have an impact perhaps you might consider writing a JavaScript based replacement for UR? That might energize interest in JS. :)
 

philmasterplus

Active member
I just installed Universal Recovery and the relay page is impressive. I'm not sure if I can recreate a fraction of that in Java.

Filtering for availability would be nice but require a much greater time investment. I looked at Item Manager, but it has decades of carefully written code and I dare not touch it. Adding a column of checkboxes inside the table would be a nightmare.

Meanwhile, I whipped up a working patch that imitates the mockup shown above. It does NOT sort items by name, nor does it touch the iteration order of HP/MP restorers. That would affect too many things.

This patch changes the UI only and shouldn't affect how configs are loaded/saved...in theory. Since this affects UX and can possibly disrupt user settings, I will dogfood this for a couple of days before requesting this to be committed.

I welcome anyone willing to test this patch. Here's a modified JAR with the changes. Be sure to back up your settings before trying it.

Edit: There was a problem in the first JAR that made TourGuide fail. I uploaded a second JAR that fixes this. Sorry!
 

Attachments

  • philmasterplus-categorize-restorers-ui.patch
    30.2 KB · Views: 1
Last edited:
Top